From python-dev@python.org Sat Jul 1 00:04:20 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:04:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules signalmodule.c,2.40,2.41 Message-ID: <200006302304.QAA04637@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv4629 Modified Files: signalmodule.c Log Message: Fix another error on AIX by using a proper cast. Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.40 retrieving revision 2.41 diff -C2 -r2.40 -r2.41 *** signalmodule.c 2000/06/28 22:26:21 2.40 --- signalmodule.c 2000/06/30 23:04:18 2.41 *************** *** 357,365 **** d = PyModule_GetDict(m); ! x = DefaultHandler = PyLong_FromVoidPtr(SIG_DFL); if (!x || PyDict_SetItemString(d, "SIG_DFL", x) < 0) goto finally; ! x = IgnoreHandler = PyLong_FromVoidPtr(SIG_IGN); if (!x || PyDict_SetItemString(d, "SIG_IGN", x) < 0) goto finally; --- 357,365 ---- d = PyModule_GetDict(m); ! x = DefaultHandler = PyLong_FromVoidPtr((void *)SIG_DFL); if (!x || PyDict_SetItemString(d, "SIG_DFL", x) < 0) goto finally; ! x = IgnoreHandler = PyLong_FromVoidPtr((void *)SIG_IGN); if (!x || PyDict_SetItemString(d, "SIG_IGN", x) < 0) goto finally; From python-dev@python.org Sat Jul 1 00:22:37 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 30 Jun 2000 16:22:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_pty.py,NONE,1.1 Message-ID: <200006302322.QAA05862@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv5851/test Added Files: test_pty.py Log Message: Thomas Wouters : Test case for the pty module. --- NEW FILE --- import pty, os, sys, string from test_support import verbose, TestFailed TEST_STRING_1 = "I wish to buy a fish license." TEST_STRING_2 = "For my pet fish, Eric." TEST_STRING_3 = "And now for something completely different..." TEST_STRING_4 = "but you pronounce it throatwobbler mangrove." if verbose: def debug(msg): print msg else: def debug(msg): pass # Marginal testing of pty suite. Cannot do extensive 'do or fail' testing # because pty code is not too portable. try: debug("Calling master_open()") master_fd, slave_name = pty.master_open() debug("Got master_fd '%d', slave_name '%s'"%(master_fd, slave_name)) debug("Calling slave_open(%s)"%`slave_name`) slave_fd = pty.slave_open(slave_name) debug("Got slave_fd '%d'"%slave_fd) except OSError: # " An optional feature could not be imported " ... ? raise ImportError, "Pseudo-terminals (seemingly) not functional." ## # Please uncomment these if os.isatty() is added. ## if not os.isatty(master_fd): ## raise TestFailed, "master_fd is not a tty" ## if not os.isatty(slave_fd): ## raise TestFailed, "slave_fd is not a tty" debug("Writing to slave_fd") os.write(slave_fd, TEST_STRING_1) # should check return value print os.read(master_fd, 1024) os.write(slave_fd, TEST_STRING_2[:5]) os.write(slave_fd, TEST_STRING_2[5:]) print os.read(master_fd, 1024) os.close(slave_fd) os.close(master_fd) # basic pty passed. debug("calling pty.fork()") pid, master_fd = pty.fork() if pid == pty.CHILD: ## # Please uncomment these when os.isatty() is added. ## if not os.isatty(1): ## debug("Child's fd 1 is not a tty?!") ## os._exit(3) try: debug("In child, calling os.setsid()") os.setsid() except OSError: # Good, we already were session leader debug("OSError was raised.") pass except AttributeError: # Have pty, but not setsid() ? debug("AttributeError was raised.") pass except: # We don't want this error to propagate, escape the call to # os._exit(), and cause very peculiar behaviour in the calling # regrtest.py ! debug("Some other error was raised.") os._exit(1) else: debug("os.setsid() succeeded! (bad!)") os._exit(2) os._exit(4) else: debug("Waiting for child (%d) to finish."%pid) (pid, status) = os.waitpid(pid, 0) debug("Child (%d) exited with status %d."%(pid, status)) if status / 256 == 1: raise TestFailed, "Child raised an unexpected exception in os.setsid()" elif status / 256 == 2: raise TestFailed, "pty.fork() failed to make child a session leader." elif status / 256 == 3: raise TestFailed, "Child spawned by pty.fork() did not have a tty as stdout" elif status / 256 <> 4: raise TestFailed, "pty.fork() failed for unknown reasons:" print os.read(master_fd, 65536) os.close(master_fd) # pty.fork() passed. From python-dev@python.org Sat Jul 1 00:22:37 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 30 Jun 2000 16:22:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_pty,NONE,1.1 Message-ID: <200006302322.QAA05865@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv5851/test/output Added Files: test_pty Log Message: Thomas Wouters : Test case for the pty module. --- NEW FILE --- test_pty I wish to buy a fish license. For my pet fish, Eric. From python-dev@python.org Sat Jul 1 00:50:42 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:50:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC/os2vacpp config.c,1.3,1.4 getpathp.c,1.5,1.6 Message-ID: <200006302350.QAA07555@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC/os2vacpp In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/PC/os2vacpp Modified Files: config.c getpathp.c Log Message: Change copyright notice. Index: config.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/os2vacpp/config.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** config.c 1998/09/28 22:02:36 1.3 --- config.c 2000/06/30 23:50:39 1.4 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: getpathp.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/os2vacpp/getpathp.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** getpathp.c 2000/05/26 21:49:07 1.5 --- getpathp.c 2000/06/30 23:50:39 1.6 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ From python-dev@python.org Sat Jul 1 00:50:42 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:50:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC config.c,1.23,1.24 getpathp.c,1.15,1.16 Message-ID: <200006302350.QAA07553@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/PC Modified Files: config.c getpathp.c Log Message: Change copyright notice. Index: config.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/config.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** config.c 2000/06/30 05:02:53 1.23 --- config.c 2000/06/30 23:50:39 1.24 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: getpathp.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/getpathp.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** getpathp.c 2000/06/28 22:20:06 1.15 --- getpathp.c 2000/06/30 23:50:39 1.16 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ From python-dev@python.org Sat Jul 1 00:50:42 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:50:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/modulator/Templates copyright,1.2,1.3 Message-ID: <200006302350.QAA07593@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/modulator/Templates In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/Tools/modulator/Templates Modified Files: copyright Log Message: Change copyright notice. Index: copyright =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/Templates/copyright,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** copyright 1996/10/25 14:44:06 1.2 --- copyright 2000/06/30 23:50:40 1.3 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ From python-dev@python.org Sat Jul 1 00:50:42 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:50:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/scripts fixnotice.py,1.2,1.3 Message-ID: <200006302350.QAA07605@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/scripts In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/Tools/scripts Modified Files: fixnotice.py Log Message: Change copyright notice. Index: fixnotice.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/scripts/fixnotice.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** fixnotice.py 1998/03/24 05:30:22 1.2 --- fixnotice.py 2000/06/30 23:50:40 1.3 *************** *** 20,45 **** NEW_NOTICE = """ ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. """ --- 20,30 ---- NEW_NOTICE = """ ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. """ From python-dev@python.org Sat Jul 1 00:50:43 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:50:43 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.35,2.36 bufferobject.c,2.8,2.9 classobject.c,2.94,2.95 cobject.c,2.8,2.9 complexobject.c,2.25,2.26 dictobject.c,2.55,2.56 fileobject.c,2.75,2.76 floatobject.c,2.59,2.60 frameobject.c,2.39,2.40 funcobject.c,2.25,2.26 intobject.c,2.43,2.44 listobject.c,2.76,2.77 longobject.c,1.58,1.59 methodobject.c,2.29,2.30 moduleobject.c,2.25,2.26 object.c,2.76,2.77 rangeobject.c,2.13,2.14 stringobject.c,2.70,2.71 tupleobject.c,2.39,2.40 typeobject.c,2.12,2.13 xxobject.c,2.15,2.16 Message-ID: <200006302350.QAA07642@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/Objects Modified Files: abstract.c bufferobject.c classobject.c cobject.c complexobject.c dictobject.c fileobject.c floatobject.c frameobject.c funcobject.c intobject.c listobject.c longobject.c methodobject.c moduleobject.c object.c rangeobject.c stringobject.c tupleobject.c typeobject.c xxobject.c Log Message: Change copyright notice. Index: abstract.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** abstract.c 2000/06/18 18:43:14 2.35 --- abstract.c 2000/06/30 23:50:39 2.36 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: bufferobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/bufferobject.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** bufferobject.c 2000/06/30 15:01:00 2.8 --- bufferobject.c 2000/06/30 23:50:39 2.9 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: classobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/classobject.c,v retrieving revision 2.94 retrieving revision 2.95 diff -C2 -r2.94 -r2.95 *** classobject.c 2000/06/30 15:01:00 2.94 --- classobject.c 2000/06/30 23:50:39 2.95 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: cobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/cobject.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** cobject.c 2000/05/03 23:44:34 2.8 --- cobject.c 2000/06/30 23:50:39 2.9 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: complexobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/complexobject.c,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** complexobject.c 2000/06/29 19:17:04 2.25 --- complexobject.c 2000/06/30 23:50:39 2.26 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dictobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/dictobject.c,v retrieving revision 2.55 retrieving revision 2.56 diff -C2 -r2.55 -r2.56 *** dictobject.c 2000/06/30 05:02:53 2.55 --- dictobject.c 2000/06/30 23:50:39 2.56 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.75 retrieving revision 2.76 diff -C2 -r2.75 -r2.76 *** fileobject.c 2000/06/30 15:01:00 2.75 --- fileobject.c 2000/06/30 23:50:39 2.76 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: floatobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v retrieving revision 2.59 retrieving revision 2.60 diff -C2 -r2.59 -r2.60 *** floatobject.c 2000/06/30 15:01:00 2.59 --- floatobject.c 2000/06/30 23:50:39 2.60 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: frameobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/frameobject.c,v retrieving revision 2.39 retrieving revision 2.40 diff -C2 -r2.39 -r2.40 *** frameobject.c 2000/05/03 23:44:34 2.39 --- frameobject.c 2000/06/30 23:50:39 2.40 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: funcobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/funcobject.c,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** funcobject.c 2000/06/30 15:01:00 2.25 --- funcobject.c 2000/06/30 23:50:39 2.26 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: intobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/intobject.c,v retrieving revision 2.43 retrieving revision 2.44 diff -C2 -r2.43 -r2.44 *** intobject.c 2000/06/30 15:01:00 2.43 --- intobject.c 2000/06/30 23:50:39 2.44 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: listobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v retrieving revision 2.76 retrieving revision 2.77 diff -C2 -r2.76 -r2.77 *** listobject.c 2000/06/30 05:02:53 2.76 --- listobject.c 2000/06/30 23:50:39 2.77 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: longobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -r1.58 -r1.59 *** longobject.c 2000/06/01 18:37:36 1.58 --- longobject.c 2000/06/30 23:50:39 1.59 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: methodobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/methodobject.c,v retrieving revision 2.29 retrieving revision 2.30 diff -C2 -r2.29 -r2.30 *** methodobject.c 2000/06/30 22:46:04 2.29 --- methodobject.c 2000/06/30 23:50:39 2.30 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: moduleobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/moduleobject.c,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** moduleobject.c 2000/05/03 23:44:35 2.25 --- moduleobject.c 2000/06/30 23:50:39 2.26 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.76 retrieving revision 2.77 diff -C2 -r2.76 -r2.77 *** object.c 2000/06/30 15:01:00 2.76 --- object.c 2000/06/30 23:50:39 2.77 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: rangeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/rangeobject.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** rangeobject.c 2000/06/15 14:50:20 2.13 --- rangeobject.c 2000/06/30 23:50:39 2.14 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.70 retrieving revision 2.71 diff -C2 -r2.70 -r2.71 *** stringobject.c 2000/06/30 10:29:17 2.70 --- stringobject.c 2000/06/30 23:50:39 2.71 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: tupleobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/tupleobject.c,v retrieving revision 2.39 retrieving revision 2.40 diff -C2 -r2.39 -r2.40 *** tupleobject.c 2000/06/30 05:02:53 2.39 --- tupleobject.c 2000/06/30 23:50:39 2.40 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: typeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** typeobject.c 1997/06/02 14:43:07 2.12 --- typeobject.c 2000/06/30 23:50:39 2.13 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: xxobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/xxobject.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** xxobject.c 2000/05/03 23:44:36 2.15 --- xxobject.c 2000/06/30 23:50:39 2.16 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ From python-dev@python.org Sat Jul 1 00:50:43 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:50:43 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser acceler.c,2.12,2.13 assert.h,2.7,2.8 bitset.c,2.7,2.8 firstsets.c,2.7,2.8 grammar.c,2.13,2.14 grammar1.c,2.8,2.9 intrcheck.c,2.30,2.31 listnode.c,2.9,2.10 metagrammar.c,2.7,2.8 myreadline.c,2.18,2.19 node.c,2.8,2.9 parser.c,2.11,2.12 parser.h,2.9,2.10 parsetok.c,2.18,2.19 pgen.c,2.12,2.13 pgen.h,2.9,2.10 pgenmain.c,2.17,2.18 printgrammar.c,2.8,2.9 tokenizer.c,2.42,2.43 tokenizer.h,2.12,2.13 Message-ID: <200006302350.QAA07637@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/Parser Modified Files: acceler.c assert.h bitset.c firstsets.c grammar.c grammar1.c intrcheck.c listnode.c metagrammar.c myreadline.c node.c parser.c parser.h parsetok.c pgen.c pgen.h pgenmain.c printgrammar.c tokenizer.c tokenizer.h Log Message: Change copyright notice. Index: acceler.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/acceler.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** acceler.c 1997/08/02 03:02:25 2.12 --- acceler.c 2000/06/30 23:50:39 2.13 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: assert.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/assert.h,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** assert.h 1996/10/25 14:37:45 2.7 --- assert.h 2000/06/30 23:50:39 2.8 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: bitset.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/bitset.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** bitset.c 1997/04/29 21:02:21 2.7 --- bitset.c 2000/06/30 23:50:39 2.8 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: firstsets.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/firstsets.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** firstsets.c 1997/04/29 21:02:24 2.7 --- firstsets.c 2000/06/30 23:50:39 2.8 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: grammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/grammar.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** grammar.c 1998/04/10 22:09:36 2.13 --- grammar.c 2000/06/30 23:50:39 2.14 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: grammar1.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/grammar1.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** grammar1.c 1997/04/29 21:02:31 2.8 --- grammar1.c 2000/06/30 23:50:39 2.9 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: intrcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/intrcheck.c,v retrieving revision 2.30 retrieving revision 2.31 diff -C2 -r2.30 -r2.31 *** intrcheck.c 1998/12/04 18:50:20 2.30 --- intrcheck.c 2000/06/30 23:50:39 2.31 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: listnode.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/listnode.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** listnode.c 1997/04/29 21:02:37 2.9 --- listnode.c 2000/06/30 23:50:39 2.10 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: metagrammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/metagrammar.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** metagrammar.c 1997/04/29 21:02:40 2.7 --- metagrammar.c 2000/06/30 23:50:39 2.8 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: myreadline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/myreadline.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** myreadline.c 2000/06/28 22:00:02 2.18 --- myreadline.c 2000/06/30 23:50:39 2.19 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: node.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/node.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** node.c 2000/06/20 19:10:44 2.8 --- node.c 2000/06/30 23:50:39 2.9 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: parser.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parser.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** parser.c 2000/06/20 19:10:44 2.11 --- parser.c 2000/06/30 23:50:39 2.12 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: parser.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parser.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** parser.h 1997/04/29 21:02:47 2.9 --- parser.h 2000/06/30 23:50:39 2.10 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: parsetok.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parsetok.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** parsetok.c 2000/06/28 22:00:02 2.18 --- parsetok.c 2000/06/30 23:50:39 2.19 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pgen.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgen.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** pgen.c 1998/04/10 22:09:39 2.12 --- pgen.c 2000/06/30 23:50:39 2.13 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pgen.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgen.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** pgen.h 1997/04/29 21:02:56 2.9 --- pgen.h 2000/06/30 23:50:39 2.10 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pgenmain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgenmain.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** pgenmain.c 2000/06/28 22:00:02 2.17 --- pgenmain.c 2000/06/30 23:50:39 2.18 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: printgrammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/printgrammar.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** printgrammar.c 1997/05/07 23:50:06 2.8 --- printgrammar.c 2000/06/30 23:50:39 2.9 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: tokenizer.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/tokenizer.c,v retrieving revision 2.42 retrieving revision 2.43 diff -C2 -r2.42 -r2.43 *** tokenizer.c 2000/06/28 22:00:02 2.42 --- tokenizer.c 2000/06/30 23:50:39 2.43 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: tokenizer.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/tokenizer.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** tokenizer.h 1998/04/09 21:38:06 2.12 --- tokenizer.h 2000/06/30 23:50:39 2.13 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ From python-dev@python.org Sat Jul 1 00:50:44 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:50:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _tkinter.c,1.102,1.103 almodule.c,1.24,1.25 arraymodule.c,2.42,2.43 audioop.c,1.36,1.37 binascii.c,2.19,2.20 bsddbmodule.c,1.19,1.20 cdmodule.c,1.19,1.20 cgensupport.c,2.11,2.12 cgensupport.h,2.11,2.12 clmodule.c,2.20,2.21 config.c.in,1.67,1.68 cstubs,2.18,2.19 dbmmodule.c,2.17,2.18 dlmodule.c,2.7,2.8 errnomodule.c,2.9,2.10 fcntlmodule.c,2.19,2.20 flmodule.c,1.37,1.38 fmmodule.c,1.11,1.12 gdbmmodule.c,2.22,2.23 getpath.c,1.23,1.24 glmodule.c,2.3,2.4 grpmodule.c,2.9,2.10 imageop.c,2.20,2.21 imgfile.c,1.22,1.23 main.c,1.38,1.39 mathmodule.c,2.45,2.46 md5module.c,2.15,2.16 mpzmodule.c,2.25,2.26 newmodule.c,2.21,2.22 parsermodule.c,2.39,2.40 pcremodule.c,2.19,2.20 posixmodule.c,2.139,2.140 pwdmodule.c,1.17,1.18 pyexpat.c,2.5,2.6 regexmodule.c,1.34,1.35 resource.c,2.10,2.11 selectmodule.c,2.33,2.34 sgimodule.c,1.11,1.12 shamodule.c,2.5,2.6 signalmodule.c,2.41,2.42 socketmodule.c,1.109,1.110 stropmodule.c,2.63,2.64 structmodule.c,2.31,2.32 sun! audiodev.c,1.17,1.18 svmodule.c,2.11,2.12 threadmodule.c,2.31,2.32 timemodule.c,2.86,2.87 xxmodule.c,2.16,2.17 yuv.h,2.5,2.6 yuvconvert.c,2.4,2.5 Message-ID: <200006302350.QAA07688@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/Modules Modified Files: _tkinter.c almodule.c arraymodule.c audioop.c binascii.c bsddbmodule.c cdmodule.c cgensupport.c cgensupport.h clmodule.c config.c.in cstubs dbmmodule.c dlmodule.c errnomodule.c fcntlmodule.c flmodule.c fmmodule.c gdbmmodule.c getpath.c glmodule.c grpmodule.c imageop.c imgfile.c main.c mathmodule.c md5module.c mpzmodule.c newmodule.c parsermodule.c pcremodule.c posixmodule.c pwdmodule.c pyexpat.c regexmodule.c resource.c selectmodule.c sgimodule.c shamodule.c signalmodule.c socketmodule.c stropmodule.c structmodule.c sunaudiodev.c svmodule.c threadmodule.c timemodule.c xxmodule.c yuv.h yuvconvert.c Log Message: Change copyright notice. Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.102 retrieving revision 1.103 diff -C2 -r1.102 -r1.103 *** _tkinter.c 2000/06/30 15:00:59 1.102 --- _tkinter.c 2000/06/30 23:50:38 1.103 *************** *** 6,31 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 6,16 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: almodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/almodule.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** almodule.c 2000/05/03 23:44:31 1.24 --- almodule.c 2000/06/30 23:50:38 1.25 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: arraymodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v retrieving revision 2.42 retrieving revision 2.43 diff -C2 -r2.42 -r2.43 *** arraymodule.c 2000/06/28 21:27:21 2.42 --- arraymodule.c 2000/06/30 23:50:38 2.43 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: audioop.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/audioop.c,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** audioop.c 2000/05/02 21:18:13 1.36 --- audioop.c 2000/06/30 23:50:38 1.37 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: binascii.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/binascii.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** binascii.c 2000/02/29 13:59:22 2.19 --- binascii.c 2000/06/30 23:50:38 2.20 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: bsddbmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/bsddbmodule.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** bsddbmodule.c 2000/06/30 04:17:11 1.19 --- bsddbmodule.c 2000/06/30 23:50:38 1.20 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: cdmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cdmodule.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** cdmodule.c 2000/05/03 23:44:31 1.19 --- cdmodule.c 2000/06/30 23:50:38 1.20 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: cgensupport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cgensupport.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** cgensupport.c 1997/04/29 15:43:55 2.11 --- cgensupport.c 2000/06/30 23:50:38 2.12 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: cgensupport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cgensupport.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** cgensupport.h 1997/04/29 15:35:28 2.11 --- cgensupport.h 2000/06/30 23:50:38 2.12 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: clmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/clmodule.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** clmodule.c 2000/05/03 23:44:31 2.20 --- clmodule.c 2000/06/30 23:50:38 2.21 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: config.c.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/config.c.in,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -r1.67 -r1.68 *** config.c.in 1997/04/29 20:31:59 1.67 --- config.c.in 2000/06/30 23:50:38 1.68 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: cstubs =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cstubs,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** cstubs 1998/04/28 16:09:16 2.18 --- cstubs 2000/06/30 23:50:38 2.19 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dbmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/dbmmodule.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** dbmmodule.c 2000/05/03 23:44:32 2.17 --- dbmmodule.c 2000/06/30 23:50:38 2.18 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/dlmodule.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** dlmodule.c 2000/05/03 23:44:32 2.7 --- dlmodule.c 2000/06/30 23:50:38 2.8 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: errnomodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/errnomodule.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** errnomodule.c 1999/01/27 18:04:05 2.9 --- errnomodule.c 2000/06/30 23:50:38 2.10 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: fcntlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fcntlmodule.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** fcntlmodule.c 2000/02/29 13:59:23 2.19 --- fcntlmodule.c 2000/06/30 23:50:38 2.20 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: flmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/flmodule.c,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -r1.37 -r1.38 *** flmodule.c 2000/06/30 15:00:59 1.37 --- flmodule.c 2000/06/30 23:50:38 1.38 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: fmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fmmodule.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** fmmodule.c 2000/05/03 23:44:32 1.11 --- fmmodule.c 2000/06/30 23:50:38 1.12 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: gdbmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gdbmmodule.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** gdbmmodule.c 2000/05/03 23:44:32 2.22 --- gdbmmodule.c 2000/06/30 23:50:38 2.23 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: getpath.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/getpath.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** getpath.c 2000/06/28 21:29:03 1.23 --- getpath.c 2000/06/30 23:50:38 1.24 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: glmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/glmodule.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** glmodule.c 1998/10/21 16:10:40 2.3 --- glmodule.c 2000/06/30 23:50:38 2.4 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: grpmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/grpmodule.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** grpmodule.c 1998/12/04 18:49:50 2.9 --- grpmodule.c 2000/06/30 23:50:38 2.10 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: imageop.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/imageop.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** imageop.c 1998/12/04 18:49:50 2.20 --- imageop.c 2000/06/30 23:50:38 2.21 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: imgfile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/imgfile.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** imgfile.c 1997/10/01 04:26:35 1.22 --- imgfile.c 2000/06/30 23:50:38 1.23 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: main.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/main.c,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** main.c 2000/05/02 19:20:26 1.38 --- main.c 2000/06/30 23:50:38 1.39 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: mathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** mathmodule.c 2000/05/11 18:40:42 2.45 --- mathmodule.c 2000/06/30 23:50:38 2.46 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: md5module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/md5module.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** md5module.c 2000/05/03 23:44:32 2.15 --- md5module.c 2000/06/30 23:50:38 2.16 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: mpzmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mpzmodule.c,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** mpzmodule.c 2000/06/30 15:00:59 2.25 --- mpzmodule.c 2000/06/30 23:50:38 2.26 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: newmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/newmodule.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** newmodule.c 2000/06/30 05:02:53 2.21 --- newmodule.c 2000/06/30 23:50:38 2.22 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: parsermodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v retrieving revision 2.39 retrieving revision 2.40 diff -C2 -r2.39 -r2.40 *** parsermodule.c 2000/05/03 23:44:32 2.39 --- parsermodule.c 2000/06/30 23:50:38 2.40 *************** *** 82,107 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 82,92 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pcremodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pcremodule.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** pcremodule.c 2000/05/03 23:44:32 2.19 --- pcremodule.c 2000/06/30 23:50:38 2.20 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.139 retrieving revision 2.140 diff -C2 -r2.139 -r2.140 *** posixmodule.c 2000/06/30 22:45:12 2.139 --- posixmodule.c 2000/06/30 23:50:38 2.140 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pwdmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pwdmodule.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** pwdmodule.c 1998/12/04 18:50:00 1.17 --- pwdmodule.c 2000/06/30 23:50:38 1.18 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pyexpat.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pyexpat.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** pyexpat.c 2000/06/27 00:33:30 2.5 --- pyexpat.c 2000/06/30 23:50:38 2.6 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: regexmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/regexmodule.c,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** regexmodule.c 2000/05/03 23:44:33 1.34 --- regexmodule.c 2000/06/30 23:50:38 1.35 *************** *** 10,35 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 10,20 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: resource.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/resource.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** resource.c 2000/02/29 13:59:23 2.10 --- resource.c 2000/06/30 23:50:38 2.11 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: selectmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -r2.33 -r2.34 *** selectmodule.c 2000/06/28 21:18:13 2.33 --- selectmodule.c 2000/06/30 23:50:38 2.34 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: sgimodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sgimodule.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** sgimodule.c 1996/12/10 00:32:31 1.11 --- sgimodule.c 2000/06/30 23:50:38 1.12 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: shamodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/shamodule.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** shamodule.c 2000/05/03 23:44:33 2.5 --- shamodule.c 2000/06/30 23:50:38 2.6 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.41 retrieving revision 2.42 diff -C2 -r2.41 -r2.42 *** signalmodule.c 2000/06/30 23:04:18 2.41 --- signalmodule.c 2000/06/30 23:50:38 2.42 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.109 retrieving revision 1.110 diff -C2 -r1.109 -r1.110 *** socketmodule.c 2000/06/30 02:46:07 1.109 --- socketmodule.c 2000/06/30 23:50:38 1.110 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: stropmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/stropmodule.c,v retrieving revision 2.63 retrieving revision 2.64 diff -C2 -r2.63 -r2.64 *** stropmodule.c 2000/05/03 23:44:33 2.63 --- stropmodule.c 2000/06/30 23:50:38 2.64 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: structmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/structmodule.c,v retrieving revision 2.31 retrieving revision 2.32 diff -C2 -r2.31 -r2.32 *** structmodule.c 2000/06/01 02:02:46 2.31 --- structmodule.c 2000/06/30 23:50:38 2.32 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: sunaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sunaudiodev.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** sunaudiodev.c 2000/05/03 23:44:33 1.17 --- sunaudiodev.c 2000/06/30 23:50:39 1.18 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: svmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/svmodule.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** svmodule.c 2000/05/03 23:44:33 2.11 --- svmodule.c 2000/06/30 23:50:39 2.12 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: threadmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/threadmodule.c,v retrieving revision 2.31 retrieving revision 2.32 diff -C2 -r2.31 -r2.32 *** threadmodule.c 2000/05/03 23:44:33 2.31 --- threadmodule.c 2000/06/30 23:50:39 2.32 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.86 retrieving revision 2.87 diff -C2 -r2.86 -r2.87 *** timemodule.c 2000/06/29 21:31:02 2.86 --- timemodule.c 2000/06/30 23:50:39 2.87 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: xxmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/xxmodule.c,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** xxmodule.c 2000/05/03 23:44:33 2.16 --- xxmodule.c 2000/06/30 23:50:39 2.17 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: yuv.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/yuv.h,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** yuv.h 1996/10/25 14:41:05 2.5 --- yuv.h 2000/06/30 23:50:39 2.6 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: yuvconvert.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/yuvconvert.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** yuvconvert.c 1996/10/25 14:41:08 2.4 --- yuvconvert.c 2000/06/30 23:50:39 2.5 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ From python-dev@python.org Sat Jul 1 00:50:45 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:50:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python atof.c,2.3,2.4 bltinmodule.c,2.163,2.164 ceval.c,2.180,2.181 compile.c,2.110,2.111 dynload_aix.c,2.3,2.4 dynload_beos.c,2.2,2.3 dynload_dl.c,2.2,2.3 dynload_hpux.c,2.2,2.3 dynload_mac.c,2.4,2.5 dynload_next.c,2.3,2.4 dynload_os2.c,2.2,2.3 dynload_shlib.c,2.2,2.3 dynload_stub.c,2.1,2.2 dynload_win.c,2.3,2.4 errors.c,2.45,2.46 fmod.c,2.9,2.10 frozen.c,1.6,1.7 frozenmain.c,2.20,2.21 getargs.c,2.34,2.35 getcompiler.c,1.5,1.6 getcopyright.c,1.6,1.7 getcwd.c,1.10,1.11 getmtime.c,2.10,2.11 getplatform.c,1.4,1.5 getversion.c,1.10,1.11 import.c,2.136,2.137 importdl.c,2.64,2.65 importdl.h,2.12,2.13 marshal.c,1.49,1.50 memmove.c,2.4,2.5 modsupport.c,2.43,2.44 mystrtoul.c,2.17,2.18 pystate.c,2.9,2.10 pythonrun.c,2.98,2.99 sigcheck.c,2.4,2.5 strerror.c,2.6,2.7 structmember.c,2.14,2.15 sysmodule.c,2.66,2.67 thread.c,2.29,2.30 thread_beos.h,2.3,2.4 thread_cthread.h,2.9,2.10 thread_foobar.h,2.7,2.8 thread_lwp.h,2.8,2.9 thread_nt.h,2.12,2.13 thread_os2.h,! 2.6,2.7 thread_pth.h,2.2,2.3 thread_pthread.h,2.25,2.26 thread_sgi.h,2.10,2.11 thread_solaris.h,2.11,2.12 thread_wince.h,2.2,2.3 traceback.c,2.28,2.29 Message-ID: <200006302350.QAA07714@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/Python Modified Files: atof.c bltinmodule.c ceval.c compile.c dynload_aix.c dynload_beos.c dynload_dl.c dynload_hpux.c dynload_mac.c dynload_next.c dynload_os2.c dynload_shlib.c dynload_stub.c dynload_win.c errors.c fmod.c frozen.c frozenmain.c getargs.c getcompiler.c getcopyright.c getcwd.c getmtime.c getplatform.c getversion.c import.c importdl.c importdl.h marshal.c memmove.c modsupport.c mystrtoul.c pystate.c pythonrun.c sigcheck.c strerror.c structmember.c sysmodule.c thread.c thread_beos.h thread_cthread.h thread_foobar.h thread_lwp.h thread_nt.h thread_os2.h thread_pth.h thread_pthread.h thread_sgi.h thread_solaris.h thread_wince.h traceback.c Log Message: Change copyright notice. Index: atof.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/atof.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** atof.c 1996/10/25 14:42:36 2.3 --- atof.c 2000/06/30 23:50:39 2.4 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.163 retrieving revision 2.164 diff -C2 -r2.163 -r2.164 *** bltinmodule.c 2000/06/28 21:12:25 2.163 --- bltinmodule.c 2000/06/30 23:50:39 2.164 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.180 retrieving revision 2.181 diff -C2 -r2.180 -r2.181 *** ceval.c 2000/06/28 22:07:35 2.180 --- ceval.c 2000/06/30 23:50:39 2.181 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.110 retrieving revision 2.111 diff -C2 -r2.110 -r2.111 *** compile.c 2000/06/30 16:20:13 2.110 --- compile.c 2000/06/30 23:50:39 2.111 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dynload_aix.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_aix.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** dynload_aix.c 1999/12/22 14:09:35 2.3 --- dynload_aix.c 2000/06/30 23:50:39 2.4 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dynload_beos.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_beos.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** dynload_beos.c 1999/12/22 14:09:35 2.2 --- dynload_beos.c 2000/06/30 23:50:39 2.3 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dynload_dl.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_dl.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** dynload_dl.c 1999/12/22 14:09:35 2.2 --- dynload_dl.c 2000/06/30 23:50:39 2.3 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dynload_hpux.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_hpux.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** dynload_hpux.c 1999/12/22 14:09:35 2.2 --- dynload_hpux.c 2000/06/30 23:50:39 2.3 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dynload_mac.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_mac.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** dynload_mac.c 2000/04/24 15:08:01 2.4 --- dynload_mac.c 2000/06/30 23:50:39 2.5 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dynload_next.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_next.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** dynload_next.c 2000/04/10 12:45:10 2.3 --- dynload_next.c 2000/06/30 23:50:39 2.4 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dynload_os2.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_os2.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** dynload_os2.c 1999/12/22 14:09:35 2.2 --- dynload_os2.c 2000/06/30 23:50:39 2.3 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dynload_shlib.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_shlib.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** dynload_shlib.c 1999/12/22 14:09:35 2.2 --- dynload_shlib.c 2000/06/30 23:50:39 2.3 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dynload_stub.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_stub.c,v retrieving revision 2.1 retrieving revision 2.2 diff -C2 -r2.1 -r2.2 *** dynload_stub.c 1999/12/20 21:18:49 2.1 --- dynload_stub.c 2000/06/30 23:50:39 2.2 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dynload_win.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_win.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** dynload_win.c 2000/06/28 22:07:35 2.3 --- dynload_win.c 2000/06/30 23:50:39 2.4 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: errors.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/errors.c,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** errors.c 2000/05/02 19:27:51 2.45 --- errors.c 2000/06/30 23:50:39 2.46 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: fmod.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/fmod.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** fmod.c 1996/10/25 14:43:04 2.9 --- fmod.c 2000/06/30 23:50:39 2.10 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: frozen.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/frozen.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** frozen.c 1998/04/03 21:10:36 1.6 --- frozen.c 2000/06/30 23:50:39 1.7 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: frozenmain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/frozenmain.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** frozenmain.c 1999/01/02 21:42:48 2.20 --- frozenmain.c 2000/06/30 23:50:39 2.21 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: getargs.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v retrieving revision 2.34 retrieving revision 2.35 diff -C2 -r2.34 -r2.35 *** getargs.c 2000/06/28 23:53:56 2.34 --- getargs.c 2000/06/30 23:50:39 2.35 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: getcompiler.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getcompiler.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** getcompiler.c 1997/07/19 19:48:41 1.5 --- getcompiler.c 2000/06/30 23:50:40 1.6 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: getcopyright.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getcopyright.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** getcopyright.c 2000/05/10 20:06:00 1.6 --- getcopyright.c 2000/06/30 23:50:40 1.7 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: getcwd.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getcwd.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** getcwd.c 2000/06/28 22:07:35 1.10 --- getcwd.c 2000/06/30 23:50:40 1.11 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: getmtime.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getmtime.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** getmtime.c 2000/06/30 16:18:57 2.10 --- getmtime.c 2000/06/30 23:50:40 2.11 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: getplatform.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getplatform.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** getplatform.c 1997/07/19 19:48:05 1.4 --- getplatform.c 2000/06/30 23:50:40 1.5 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: getversion.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getversion.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** getversion.c 1999/04/22 12:03:40 1.10 --- getversion.c 2000/06/30 23:50:40 1.11 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.136 retrieving revision 2.137 diff -C2 -r2.136 -r2.137 *** import.c 2000/06/30 16:18:57 2.136 --- import.c 2000/06/30 23:50:40 2.137 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: importdl.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/importdl.c,v retrieving revision 2.64 retrieving revision 2.65 diff -C2 -r2.64 -r2.65 *** importdl.c 1999/12/22 14:09:35 2.64 --- importdl.c 2000/06/30 23:50:40 2.65 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: importdl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/importdl.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** importdl.h 1999/12/20 22:55:03 2.12 --- importdl.h 2000/06/30 23:50:40 2.13 *************** *** 12,37 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 12,22 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: marshal.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/marshal.c,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -r1.49 -r1.50 *** marshal.c 2000/06/28 23:24:19 1.49 --- marshal.c 2000/06/30 23:50:40 1.50 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: memmove.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/memmove.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** memmove.c 1996/10/25 14:43:30 2.4 --- memmove.c 2000/06/30 23:50:40 2.5 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: modsupport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/modsupport.c,v retrieving revision 2.43 retrieving revision 2.44 diff -C2 -r2.43 -r2.44 *** modsupport.c 2000/06/28 22:07:35 2.43 --- modsupport.c 2000/06/30 23:50:40 2.44 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: mystrtoul.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/mystrtoul.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** mystrtoul.c 1999/04/07 16:07:21 2.17 --- mystrtoul.c 2000/06/30 23:50:40 2.18 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pystate.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pystate.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** pystate.c 1999/06/18 14:22:24 2.9 --- pystate.c 2000/06/30 23:50:40 2.10 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pythonrun.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v retrieving revision 2.98 retrieving revision 2.99 diff -C2 -r2.98 -r2.99 *** pythonrun.c 2000/06/20 19:10:44 2.98 --- pythonrun.c 2000/06/30 23:50:40 2.99 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: sigcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/sigcheck.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** sigcheck.c 1997/04/29 20:08:14 2.4 --- sigcheck.c 2000/06/30 23:50:40 2.5 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: strerror.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/strerror.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** strerror.c 1996/10/25 14:43:41 2.6 --- strerror.c 2000/06/30 23:50:40 2.7 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: structmember.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/structmember.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** structmember.c 1998/05/20 22:25:32 2.14 --- structmember.c 2000/06/30 23:50:40 2.15 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: sysmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v retrieving revision 2.66 retrieving revision 2.67 diff -C2 -r2.66 -r2.67 *** sysmodule.c 2000/06/28 22:07:35 2.66 --- sysmodule.c 2000/06/30 23:50:40 2.67 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread.c,v retrieving revision 2.29 retrieving revision 2.30 diff -C2 -r2.29 -r2.30 *** thread.c 2000/05/08 13:36:49 2.29 --- thread.c 2000/06/30 23:50:40 2.30 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread_beos.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_beos.h,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** thread_beos.h 2000/06/30 15:01:00 2.3 --- thread_beos.h 2000/06/30 23:50:40 2.4 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. BeOS thread support by Chris Herborth (chrish@qnx.com) --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. BeOS thread support by Chris Herborth (chrish@qnx.com) Index: thread_cthread.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_cthread.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** thread_cthread.h 2000/06/30 15:01:00 2.9 --- thread_cthread.h 2000/06/30 23:50:40 2.10 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread_foobar.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_foobar.h,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** thread_foobar.h 2000/06/30 15:01:00 2.7 --- thread_foobar.h 2000/06/30 23:50:40 2.8 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread_lwp.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_lwp.h,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** thread_lwp.h 2000/06/30 15:01:00 2.8 --- thread_lwp.h 2000/06/30 23:50:40 2.9 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread_nt.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_nt.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** thread_nt.h 2000/06/30 15:01:00 2.12 --- thread_nt.h 2000/06/30 23:50:40 2.13 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread_os2.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_os2.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** thread_os2.h 2000/06/30 15:01:00 2.6 --- thread_os2.h 2000/06/30 23:50:40 2.7 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread_pth.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_pth.h,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** thread_pth.h 2000/06/30 15:01:00 2.2 --- thread_pth.h 2000/06/30 23:50:40 2.3 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread_pthread.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_pthread.h,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** thread_pthread.h 2000/06/30 15:01:00 2.25 --- thread_pthread.h 2000/06/30 23:50:40 2.26 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread_sgi.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_sgi.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** thread_sgi.h 2000/06/30 15:01:00 2.10 --- thread_sgi.h 2000/06/30 23:50:40 2.11 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread_solaris.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_solaris.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** thread_solaris.h 2000/06/30 15:01:00 2.11 --- thread_solaris.h 2000/06/30 23:50:40 2.12 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread_wince.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_wince.h,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** thread_wince.h 2000/06/30 15:01:00 2.2 --- thread_wince.h 2000/06/30 23:50:40 2.3 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: traceback.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/traceback.c,v retrieving revision 2.28 retrieving revision 2.29 diff -C2 -r2.28 -r2.29 *** traceback.c 2000/06/28 22:07:35 2.28 --- traceback.c 2000/06/30 23:50:40 2.29 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ From python-dev@python.org Sat Jul 1 00:51:10 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:51:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc README,1.38,1.39 Message-ID: <200006302351.QAA07745@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/Doc Modified Files: README Log Message: Change copyright notice. Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/README,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** README 2000/04/28 16:53:35 1.38 --- README 2000/06/30 23:50:37 1.39 *************** *** 199,223 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ---------------------------------------------------------------------- --- 199,208 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ---------------------------------------------------------------------- From python-dev@python.org Sat Jul 1 00:51:10 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:51:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc python.man,1.13,1.14 Message-ID: <200006302351.QAA07751@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/Misc Modified Files: python.man Log Message: Change copyright notice. Index: python.man =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/python.man,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** python.man 1999/08/20 13:30:49 1.13 --- python.man 2000/06/30 23:50:38 1.14 *************** *** 291,314 **** All Rights Reserved .PP ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. --- 291,299 ---- All Rights Reserved .PP ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. From python-dev@python.org Sat Jul 1 00:51:12 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:51:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include Python.h,2.17,2.18 abstract.h,2.18,2.19 bitset.h,2.9,2.10 bufferobject.h,2.2,2.3 ceval.h,2.31,2.32 classobject.h,2.28,2.29 cobject.h,2.5,2.6 compile.h,2.19,2.20 dictobject.h,2.16,2.17 errcode.h,2.9,2.10 eval.h,2.10,2.11 fileobject.h,2.17,2.18 floatobject.h,2.13,2.14 frameobject.h,2.24,2.25 funcobject.h,2.16,2.17 grammar.h,2.10,2.11 import.h,2.22,2.23 intobject.h,2.17,2.18 intrcheck.h,2.5,2.6 listobject.h,2.17,2.18 longintrepr.h,2.5,2.6 longobject.h,2.13,2.14 marshal.h,2.6,2.7 metagrammar.h,2.7,2.8 methodobject.h,2.16,2.17 modsupport.h,2.28,2.29 moduleobject.h,2.13,2.14 mymalloc.h,2.19,2.20 myproto.h,2.6,2.7 myselect.h,2.10,2.11 mytime.h,2.4,2.5 node.h,2.13,2.14 object.h,2.57,2.58 objimpl.h,2.17,2.18 opcode.h,2.23,2.24 osdefs.h,2.10,2.11 parsetok.h,2.10,2.11 patchlevel.h,2.36,2.37 pgenheaders.h,2.18,2.19 pydebug.h,2.11,2.12 pyerrors.h,2.35,2.36 pystate.h,2.9,2.10 pythonrun.h,2.28,2.29 pythread.h,2.13,2.14 rangeobject.h,2.11,2.12 stringobj! ect.h,2.17,2.18 structmember.h,2.12,2.13 sysmodule.h,2.17,2.18 token.h,2.12,2.13 traceback.h,2.14,2.15 tupleobject.h,2.20,2.21 Message-ID: <200006302351.QAA07801@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/Include Modified Files: Python.h abstract.h bitset.h bufferobject.h ceval.h classobject.h cobject.h compile.h dictobject.h errcode.h eval.h fileobject.h floatobject.h frameobject.h funcobject.h grammar.h import.h intobject.h intrcheck.h listobject.h longintrepr.h longobject.h marshal.h metagrammar.h methodobject.h modsupport.h moduleobject.h mymalloc.h myproto.h myselect.h mytime.h node.h object.h objimpl.h opcode.h osdefs.h parsetok.h patchlevel.h pgenheaders.h pydebug.h pyerrors.h pystate.h pythonrun.h pythread.h rangeobject.h stringobject.h structmember.h sysmodule.h token.h traceback.h tupleobject.h Log Message: Change copyright notice. Index: Python.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** Python.h 2000/05/28 20:29:48 2.17 --- Python.h 2000/06/30 23:50:38 2.18 *************** *** 9,34 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 9,19 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: abstract.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/abstract.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** abstract.h 2000/06/18 18:43:13 2.18 --- abstract.h 2000/06/30 23:50:38 2.19 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: bitset.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/bitset.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** bitset.h 1996/10/25 14:37:47 2.9 --- bitset.h 2000/06/30 23:50:38 2.10 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: bufferobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/bufferobject.h,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** bufferobject.h 1998/12/04 18:47:51 2.2 --- bufferobject.h 2000/06/30 23:50:38 2.3 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: ceval.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/ceval.h,v retrieving revision 2.31 retrieving revision 2.32 diff -C2 -r2.31 -r2.32 *** ceval.h 2000/05/08 14:04:54 2.31 --- ceval.h 2000/06/30 23:50:38 2.32 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: classobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/classobject.h,v retrieving revision 2.28 retrieving revision 2.29 diff -C2 -r2.28 -r2.29 *** classobject.h 1998/12/04 18:47:53 2.28 --- classobject.h 2000/06/30 23:50:38 2.29 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: cobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/cobject.h,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** cobject.h 1998/12/04 18:47:54 2.5 --- cobject.h 2000/06/30 23:50:38 2.6 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: compile.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/compile.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** compile.h 1998/12/04 18:47:55 2.19 --- compile.h 2000/06/30 23:50:38 2.20 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dictobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/dictobject.h,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** dictobject.h 2000/03/30 22:27:28 2.16 --- dictobject.h 2000/06/30 23:50:38 2.17 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: errcode.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/errcode.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** errcode.h 2000/06/20 19:10:44 2.9 --- errcode.h 2000/06/30 23:50:38 2.10 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: eval.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/eval.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** eval.h 1998/12/04 18:47:58 2.10 --- eval.h 2000/06/30 23:50:38 2.11 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: fileobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/fileobject.h,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** fileobject.h 1998/12/04 18:47:59 2.17 --- fileobject.h 2000/06/30 23:50:38 2.18 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: floatobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/floatobject.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** floatobject.h 1999/10/12 19:54:34 2.13 --- floatobject.h 2000/06/30 23:50:38 2.14 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: frameobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/frameobject.h,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -r2.24 -r2.25 *** frameobject.h 1998/12/04 18:48:01 2.24 --- frameobject.h 2000/06/30 23:50:38 2.25 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: funcobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/funcobject.h,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** funcobject.h 1998/12/04 18:48:02 2.16 --- funcobject.h 2000/06/30 23:50:38 2.17 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: grammar.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/grammar.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** grammar.h 1997/08/12 14:57:08 2.10 --- grammar.h 2000/06/30 23:50:38 2.11 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: import.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/import.h,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** import.h 1999/01/04 16:39:38 2.22 --- import.h 2000/06/30 23:50:38 2.23 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: intobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/intobject.h,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** intobject.h 2000/04/05 20:11:08 2.17 --- intobject.h 2000/06/30 23:50:38 2.18 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: intrcheck.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/intrcheck.h,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** intrcheck.h 1998/12/04 18:48:04 2.5 --- intrcheck.h 2000/06/30 23:50:38 2.6 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: listobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/listobject.h,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** listobject.h 2000/03/01 15:06:53 2.17 --- listobject.h 2000/06/30 23:50:38 2.18 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: longintrepr.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/longintrepr.h,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** longintrepr.h 1998/12/04 18:48:06 2.5 --- longintrepr.h 2000/06/30 23:50:38 2.6 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: longobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/longobject.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** longobject.h 2000/04/05 20:11:08 2.13 --- longobject.h 2000/06/30 23:50:38 2.14 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: marshal.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/marshal.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** marshal.h 1998/12/04 18:48:07 2.6 --- marshal.h 2000/06/30 23:50:38 2.7 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: metagrammar.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/metagrammar.h,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** metagrammar.h 1996/10/25 14:38:29 2.7 --- metagrammar.h 2000/06/30 23:50:38 2.8 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: methodobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/methodobject.h,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** methodobject.h 1998/12/04 18:48:08 2.16 --- methodobject.h 2000/06/30 23:50:38 2.17 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: modsupport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/modsupport.h,v retrieving revision 2.28 retrieving revision 2.29 diff -C2 -r2.28 -r2.29 *** modsupport.h 2000/03/29 01:46:45 2.28 --- modsupport.h 2000/06/30 23:50:38 2.29 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: moduleobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/moduleobject.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** moduleobject.h 1999/02/15 14:43:11 2.13 --- moduleobject.h 2000/06/30 23:50:38 2.14 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: mymalloc.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mymalloc.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** mymalloc.h 2000/05/05 15:36:09 2.19 --- mymalloc.h 2000/06/30 23:50:38 2.20 *************** *** 7,32 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 7,17 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: myproto.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/myproto.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** myproto.h 1997/05/07 23:50:40 2.6 --- myproto.h 2000/06/30 23:50:38 2.7 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: myselect.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/myselect.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** myselect.h 2000/04/24 15:12:54 2.10 --- myselect.h 2000/06/30 23:50:38 2.11 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: mytime.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mytime.h,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** mytime.h 1996/10/25 14:38:42 2.4 --- mytime.h 2000/06/30 23:50:38 2.5 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: node.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/node.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** node.h 2000/06/20 19:10:44 2.13 --- node.h 2000/06/30 23:50:38 2.14 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: object.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/object.h,v retrieving revision 2.57 retrieving revision 2.58 diff -C2 -r2.57 -r2.58 *** object.h 2000/06/29 19:17:04 2.57 --- object.h 2000/06/30 23:50:38 2.58 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: objimpl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/objimpl.h,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** objimpl.h 2000/06/30 05:02:52 2.17 --- objimpl.h 2000/06/30 23:50:38 2.18 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: opcode.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/opcode.h,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** opcode.h 2000/03/29 00:10:03 2.23 --- opcode.h 2000/06/30 23:50:38 2.24 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: osdefs.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/osdefs.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** osdefs.h 1997/12/05 21:39:25 2.10 --- osdefs.h 2000/06/30 23:50:38 2.11 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: parsetok.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/parsetok.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** parsetok.h 1998/12/04 18:48:14 2.10 --- parsetok.h 2000/06/30 23:50:38 2.11 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: patchlevel.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/patchlevel.h,v retrieving revision 2.36 retrieving revision 2.37 diff -C2 -r2.36 -r2.37 *** patchlevel.h 2000/06/29 22:29:24 2.36 --- patchlevel.h 2000/06/30 23:50:38 2.37 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pgenheaders.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pgenheaders.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** pgenheaders.h 2000/06/28 20:55:34 2.18 --- pgenheaders.h 2000/06/30 23:50:38 2.19 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pydebug.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pydebug.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** pydebug.h 2000/05/01 17:51:41 2.11 --- pydebug.h 2000/06/30 23:50:38 2.12 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pyerrors.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyerrors.h,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** pyerrors.h 2000/03/10 22:33:32 2.35 --- pyerrors.h 2000/06/30 23:50:38 2.36 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pystate.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pystate.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** pystate.h 1998/12/21 20:21:19 2.9 --- pystate.h 2000/06/30 23:50:38 2.10 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pythonrun.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pythonrun.h,v retrieving revision 2.28 retrieving revision 2.29 diff -C2 -r2.28 -r2.29 *** pythonrun.h 2000/06/26 14:37:53 2.28 --- pythonrun.h 2000/06/30 23:50:38 2.29 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pythread.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pythread.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** pythread.h 1999/03/24 19:02:09 2.13 --- pythread.h 2000/06/30 23:50:38 2.14 *************** *** 8,33 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 8,18 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: rangeobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/rangeobject.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** rangeobject.h 1998/12/04 18:48:19 2.11 --- rangeobject.h 2000/06/30 23:50:38 2.12 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: stringobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/stringobject.h,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** stringobject.h 1998/12/04 18:48:21 2.17 --- stringobject.h 2000/06/30 23:50:38 2.18 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: structmember.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/structmember.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** structmember.h 1998/12/04 18:48:22 2.12 --- structmember.h 2000/06/30 23:50:38 2.13 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: sysmodule.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/sysmodule.h,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** sysmodule.h 1998/12/04 18:48:22 2.17 --- sysmodule.h 2000/06/30 23:50:38 2.18 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: token.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/token.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** token.h 1998/12/04 18:48:23 2.12 --- token.h 2000/06/30 23:50:38 2.13 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: traceback.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/traceback.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** traceback.h 1998/12/04 18:48:24 2.14 --- traceback.h 2000/06/30 23:50:38 2.15 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: tupleobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/tupleobject.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** tupleobject.h 2000/03/01 15:06:53 2.20 --- tupleobject.h 2000/06/30 23:50:38 2.21 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ From python-dev@python.org Sat Jul 1 00:58:08 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:58:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC/os2vacpp config.c,1.4,1.5 getpathp.c,1.6,1.7 Message-ID: <200006302358.QAA08427@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC/os2vacpp In directory slayer.i.sourceforge.net:/tmp/cvs-serv8335/PC/os2vacpp Modified Files: config.c getpathp.c Log Message: Change copyright notice - 2nd try. Index: config.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/os2vacpp/config.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** config.c 2000/06/30 23:50:39 1.4 --- config.c 2000/06/30 23:58:05 1.5 *************** *** 1,8 **** /* -*- C -*- *********************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: getpathp.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/os2vacpp/getpathp.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** getpathp.c 2000/06/30 23:50:39 1.6 --- getpathp.c 2000/06/30 23:58:05 1.7 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- From python-dev@python.org Sat Jul 1 00:58:08 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:58:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC config.c,1.24,1.25 getpathp.c,1.16,1.17 Message-ID: <200006302358.QAA08421@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv8335/PC Modified Files: config.c getpathp.c Log Message: Change copyright notice - 2nd try. Index: config.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/config.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** config.c 2000/06/30 23:50:39 1.24 --- config.c 2000/06/30 23:58:05 1.25 *************** *** 1,8 **** /* -*- C -*- *********************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: getpathp.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/getpathp.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** getpathp.c 2000/06/30 23:50:39 1.16 --- getpathp.c 2000/06/30 23:58:05 1.17 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- From python-dev@python.org Sat Jul 1 00:58:08 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:58:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/modulator/Templates copyright,1.3,1.4 Message-ID: <200006302358.QAA08447@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/modulator/Templates In directory slayer.i.sourceforge.net:/tmp/cvs-serv8335/Tools/modulator/Templates Modified Files: copyright Log Message: Change copyright notice - 2nd try. Index: copyright =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/Templates/copyright,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** copyright 2000/06/30 23:50:40 1.3 --- copyright 2000/06/30 23:58:06 1.4 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,15 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,9 ---- From python-dev@python.org Sat Jul 1 00:58:10 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:58:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.36,2.37 bufferobject.c,2.9,2.10 classobject.c,2.95,2.96 cobject.c,2.9,2.10 complexobject.c,2.26,2.27 dictobject.c,2.56,2.57 fileobject.c,2.76,2.77 floatobject.c,2.60,2.61 frameobject.c,2.40,2.41 funcobject.c,2.26,2.27 intobject.c,2.44,2.45 listobject.c,2.77,2.78 longobject.c,1.59,1.60 methodobject.c,2.30,2.31 moduleobject.c,2.26,2.27 object.c,2.77,2.78 rangeobject.c,2.14,2.15 stringobject.c,2.71,2.72 tupleobject.c,2.40,2.41 typeobject.c,2.13,2.14 xxobject.c,2.16,2.17 Message-ID: <200006302358.QAA08531@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv8335/Objects Modified Files: abstract.c bufferobject.c classobject.c cobject.c complexobject.c dictobject.c fileobject.c floatobject.c frameobject.c funcobject.c intobject.c listobject.c longobject.c methodobject.c moduleobject.c object.c rangeobject.c stringobject.c tupleobject.c typeobject.c xxobject.c Log Message: Change copyright notice - 2nd try. Index: abstract.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v retrieving revision 2.36 retrieving revision 2.37 diff -C2 -r2.36 -r2.37 *** abstract.c 2000/06/30 23:50:39 2.36 --- abstract.c 2000/06/30 23:58:05 2.37 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: bufferobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/bufferobject.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** bufferobject.c 2000/06/30 23:50:39 2.9 --- bufferobject.c 2000/06/30 23:58:05 2.10 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: classobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/classobject.c,v retrieving revision 2.95 retrieving revision 2.96 diff -C2 -r2.95 -r2.96 *** classobject.c 2000/06/30 23:50:39 2.95 --- classobject.c 2000/06/30 23:58:05 2.96 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: cobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/cobject.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** cobject.c 2000/06/30 23:50:39 2.9 --- cobject.c 2000/06/30 23:58:05 2.10 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: complexobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/complexobject.c,v retrieving revision 2.26 retrieving revision 2.27 diff -C2 -r2.26 -r2.27 *** complexobject.c 2000/06/30 23:50:39 2.26 --- complexobject.c 2000/06/30 23:58:05 2.27 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dictobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/dictobject.c,v retrieving revision 2.56 retrieving revision 2.57 diff -C2 -r2.56 -r2.57 *** dictobject.c 2000/06/30 23:50:39 2.56 --- dictobject.c 2000/06/30 23:58:05 2.57 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.76 retrieving revision 2.77 diff -C2 -r2.76 -r2.77 *** fileobject.c 2000/06/30 23:50:39 2.76 --- fileobject.c 2000/06/30 23:58:05 2.77 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: floatobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v retrieving revision 2.60 retrieving revision 2.61 diff -C2 -r2.60 -r2.61 *** floatobject.c 2000/06/30 23:50:39 2.60 --- floatobject.c 2000/06/30 23:58:05 2.61 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: frameobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/frameobject.c,v retrieving revision 2.40 retrieving revision 2.41 diff -C2 -r2.40 -r2.41 *** frameobject.c 2000/06/30 23:50:39 2.40 --- frameobject.c 2000/06/30 23:58:05 2.41 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: funcobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/funcobject.c,v retrieving revision 2.26 retrieving revision 2.27 diff -C2 -r2.26 -r2.27 *** funcobject.c 2000/06/30 23:50:39 2.26 --- funcobject.c 2000/06/30 23:58:05 2.27 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: intobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/intobject.c,v retrieving revision 2.44 retrieving revision 2.45 diff -C2 -r2.44 -r2.45 *** intobject.c 2000/06/30 23:50:39 2.44 --- intobject.c 2000/06/30 23:58:05 2.45 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: listobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v retrieving revision 2.77 retrieving revision 2.78 diff -C2 -r2.77 -r2.78 *** listobject.c 2000/06/30 23:50:39 2.77 --- listobject.c 2000/06/30 23:58:05 2.78 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: longobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -r1.59 -r1.60 *** longobject.c 2000/06/30 23:50:39 1.59 --- longobject.c 2000/06/30 23:58:05 1.60 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: methodobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/methodobject.c,v retrieving revision 2.30 retrieving revision 2.31 diff -C2 -r2.30 -r2.31 *** methodobject.c 2000/06/30 23:50:39 2.30 --- methodobject.c 2000/06/30 23:58:05 2.31 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: moduleobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/moduleobject.c,v retrieving revision 2.26 retrieving revision 2.27 diff -C2 -r2.26 -r2.27 *** moduleobject.c 2000/06/30 23:50:39 2.26 --- moduleobject.c 2000/06/30 23:58:05 2.27 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.77 retrieving revision 2.78 diff -C2 -r2.77 -r2.78 *** object.c 2000/06/30 23:50:39 2.77 --- object.c 2000/06/30 23:58:05 2.78 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: rangeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/rangeobject.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** rangeobject.c 2000/06/30 23:50:39 2.14 --- rangeobject.c 2000/06/30 23:58:05 2.15 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.71 retrieving revision 2.72 diff -C2 -r2.71 -r2.72 *** stringobject.c 2000/06/30 23:50:39 2.71 --- stringobject.c 2000/06/30 23:58:05 2.72 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: tupleobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/tupleobject.c,v retrieving revision 2.40 retrieving revision 2.41 diff -C2 -r2.40 -r2.41 *** tupleobject.c 2000/06/30 23:50:39 2.40 --- tupleobject.c 2000/06/30 23:58:05 2.41 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: typeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** typeobject.c 2000/06/30 23:50:39 2.13 --- typeobject.c 2000/06/30 23:58:05 2.14 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: xxobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/xxobject.c,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** xxobject.c 2000/06/30 23:50:39 2.16 --- xxobject.c 2000/06/30 23:58:05 2.17 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- From python-dev@python.org Sat Jul 1 00:58:10 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:58:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser acceler.c,2.13,2.14 assert.h,2.8,2.9 bitset.c,2.8,2.9 firstsets.c,2.8,2.9 grammar.c,2.14,2.15 grammar1.c,2.9,2.10 intrcheck.c,2.31,2.32 listnode.c,2.10,2.11 metagrammar.c,2.8,2.9 myreadline.c,2.19,2.20 node.c,2.9,2.10 parser.c,2.12,2.13 parser.h,2.10,2.11 parsetok.c,2.19,2.20 pgen.c,2.13,2.14 pgen.h,2.10,2.11 pgenmain.c,2.18,2.19 printgrammar.c,2.9,2.10 tokenizer.c,2.43,2.44 tokenizer.h,2.13,2.14 Message-ID: <200006302358.QAA08532@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv8335/Parser Modified Files: acceler.c assert.h bitset.c firstsets.c grammar.c grammar1.c intrcheck.c listnode.c metagrammar.c myreadline.c node.c parser.c parser.h parsetok.c pgen.c pgen.h pgenmain.c printgrammar.c tokenizer.c tokenizer.h Log Message: Change copyright notice - 2nd try. Index: acceler.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/acceler.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** acceler.c 2000/06/30 23:50:39 2.13 --- acceler.c 2000/06/30 23:58:05 2.14 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: assert.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/assert.h,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** assert.h 2000/06/30 23:50:39 2.8 --- assert.h 2000/06/30 23:58:05 2.9 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: bitset.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/bitset.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** bitset.c 2000/06/30 23:50:39 2.8 --- bitset.c 2000/06/30 23:58:05 2.9 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: firstsets.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/firstsets.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** firstsets.c 2000/06/30 23:50:39 2.8 --- firstsets.c 2000/06/30 23:58:05 2.9 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: grammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/grammar.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** grammar.c 2000/06/30 23:50:39 2.14 --- grammar.c 2000/06/30 23:58:05 2.15 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: grammar1.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/grammar1.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** grammar1.c 2000/06/30 23:50:39 2.9 --- grammar1.c 2000/06/30 23:58:05 2.10 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: intrcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/intrcheck.c,v retrieving revision 2.31 retrieving revision 2.32 diff -C2 -r2.31 -r2.32 *** intrcheck.c 2000/06/30 23:50:39 2.31 --- intrcheck.c 2000/06/30 23:58:05 2.32 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: listnode.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/listnode.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** listnode.c 2000/06/30 23:50:39 2.10 --- listnode.c 2000/06/30 23:58:05 2.11 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: metagrammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/metagrammar.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** metagrammar.c 2000/06/30 23:50:39 2.8 --- metagrammar.c 2000/06/30 23:58:05 2.9 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: myreadline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/myreadline.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** myreadline.c 2000/06/30 23:50:39 2.19 --- myreadline.c 2000/06/30 23:58:05 2.20 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: node.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/node.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** node.c 2000/06/30 23:50:39 2.9 --- node.c 2000/06/30 23:58:05 2.10 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: parser.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parser.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** parser.c 2000/06/30 23:50:39 2.12 --- parser.c 2000/06/30 23:58:05 2.13 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: parser.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parser.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** parser.h 2000/06/30 23:50:39 2.10 --- parser.h 2000/06/30 23:58:05 2.11 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: parsetok.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parsetok.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** parsetok.c 2000/06/30 23:50:39 2.19 --- parsetok.c 2000/06/30 23:58:05 2.20 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: pgen.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgen.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** pgen.c 2000/06/30 23:50:39 2.13 --- pgen.c 2000/06/30 23:58:05 2.14 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: pgen.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgen.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** pgen.h 2000/06/30 23:50:39 2.10 --- pgen.h 2000/06/30 23:58:05 2.11 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: pgenmain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgenmain.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** pgenmain.c 2000/06/30 23:50:39 2.18 --- pgenmain.c 2000/06/30 23:58:05 2.19 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: printgrammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/printgrammar.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** printgrammar.c 2000/06/30 23:50:39 2.9 --- printgrammar.c 2000/06/30 23:58:05 2.10 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: tokenizer.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/tokenizer.c,v retrieving revision 2.43 retrieving revision 2.44 diff -C2 -r2.43 -r2.44 *** tokenizer.c 2000/06/30 23:50:39 2.43 --- tokenizer.c 2000/06/30 23:58:05 2.44 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: tokenizer.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/tokenizer.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** tokenizer.h 2000/06/30 23:50:39 2.13 --- tokenizer.h 2000/06/30 23:58:05 2.14 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- From python-dev@python.org Sat Jul 1 00:58:10 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:58:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include Python.h,2.18,2.19 abstract.h,2.19,2.20 bitset.h,2.10,2.11 bufferobject.h,2.3,2.4 ceval.h,2.32,2.33 classobject.h,2.29,2.30 cobject.h,2.6,2.7 compile.h,2.20,2.21 dictobject.h,2.17,2.18 errcode.h,2.10,2.11 eval.h,2.11,2.12 fileobject.h,2.18,2.19 floatobject.h,2.14,2.15 frameobject.h,2.25,2.26 funcobject.h,2.17,2.18 grammar.h,2.11,2.12 import.h,2.23,2.24 intobject.h,2.18,2.19 intrcheck.h,2.6,2.7 listobject.h,2.18,2.19 longintrepr.h,2.6,2.7 longobject.h,2.14,2.15 marshal.h,2.7,2.8 metagrammar.h,2.8,2.9 methodobject.h,2.17,2.18 modsupport.h,2.29,2.30 moduleobject.h,2.14,2.15 mymalloc.h,2.20,2.21 myproto.h,2.7,2.8 myselect.h,2.11,2.12 mytime.h,2.5,2.6 node.h,2.14,2.15 object.h,2.58,2.59 objimpl.h,2.18,2.19 opcode.h,2.24,2.25 osdefs.h,2.11,2.12 parsetok.h,2.11,2.12 patchlevel.h,2.37,2.38 pgenheaders.h,2.19,2.20 pydebug.h,2.12,2.13 pyerrors.h,2.36,2.37 pystate.h,2.10,2.11 pythonrun.h,2.29,2.30 pythread.h,2.14,2.15 rangeobject.h,2.12,2.13 string! object.h,2.18,2.19 structmember.h,2.13,2.14 sysmodule.h,2.18,2.19 token.h,2.13,2.14 traceback.h,2.15,2.16 tupleobject.h,2.21,2.22 Message-ID: <200006302358.QAA08569@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv8335/Include Modified Files: Python.h abstract.h bitset.h bufferobject.h ceval.h classobject.h cobject.h compile.h dictobject.h errcode.h eval.h fileobject.h floatobject.h frameobject.h funcobject.h grammar.h import.h intobject.h intrcheck.h listobject.h longintrepr.h longobject.h marshal.h metagrammar.h methodobject.h modsupport.h moduleobject.h mymalloc.h myproto.h myselect.h mytime.h node.h object.h objimpl.h opcode.h osdefs.h parsetok.h patchlevel.h pgenheaders.h pydebug.h pyerrors.h pystate.h pythonrun.h pythread.h rangeobject.h stringobject.h structmember.h sysmodule.h token.h traceback.h tupleobject.h Log Message: Change copyright notice - 2nd try. Index: Python.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** Python.h 2000/06/30 23:50:38 2.18 --- Python.h 2000/06/30 23:58:04 2.19 *************** *** 4,12 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 4,7 ---- *************** *** 16,20 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 11,14 ---- Index: abstract.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/abstract.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** abstract.h 2000/06/30 23:50:38 2.19 --- abstract.h 2000/06/30 23:58:04 2.20 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: bitset.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/bitset.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** bitset.h 2000/06/30 23:50:38 2.10 --- bitset.h 2000/06/30 23:58:04 2.11 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: bufferobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/bufferobject.h,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** bufferobject.h 2000/06/30 23:50:38 2.3 --- bufferobject.h 2000/06/30 23:58:04 2.4 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: ceval.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/ceval.h,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -r2.32 -r2.33 *** ceval.h 2000/06/30 23:50:38 2.32 --- ceval.h 2000/06/30 23:58:04 2.33 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: classobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/classobject.h,v retrieving revision 2.29 retrieving revision 2.30 diff -C2 -r2.29 -r2.30 *** classobject.h 2000/06/30 23:50:38 2.29 --- classobject.h 2000/06/30 23:58:04 2.30 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: cobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/cobject.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** cobject.h 2000/06/30 23:50:38 2.6 --- cobject.h 2000/06/30 23:58:04 2.7 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: compile.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/compile.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** compile.h 2000/06/30 23:50:38 2.20 --- compile.h 2000/06/30 23:58:04 2.21 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: dictobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/dictobject.h,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** dictobject.h 2000/06/30 23:50:38 2.17 --- dictobject.h 2000/06/30 23:58:04 2.18 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: errcode.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/errcode.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** errcode.h 2000/06/30 23:50:38 2.10 --- errcode.h 2000/06/30 23:58:04 2.11 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: eval.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/eval.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** eval.h 2000/06/30 23:50:38 2.11 --- eval.h 2000/06/30 23:58:04 2.12 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: fileobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/fileobject.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** fileobject.h 2000/06/30 23:50:38 2.18 --- fileobject.h 2000/06/30 23:58:04 2.19 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: floatobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/floatobject.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** floatobject.h 2000/06/30 23:50:38 2.14 --- floatobject.h 2000/06/30 23:58:04 2.15 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: frameobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/frameobject.h,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** frameobject.h 2000/06/30 23:50:38 2.25 --- frameobject.h 2000/06/30 23:58:04 2.26 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: funcobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/funcobject.h,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** funcobject.h 2000/06/30 23:50:38 2.17 --- funcobject.h 2000/06/30 23:58:04 2.18 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: grammar.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/grammar.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** grammar.h 2000/06/30 23:50:38 2.11 --- grammar.h 2000/06/30 23:58:04 2.12 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: import.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/import.h,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** import.h 2000/06/30 23:50:38 2.23 --- import.h 2000/06/30 23:58:04 2.24 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: intobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/intobject.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** intobject.h 2000/06/30 23:50:38 2.18 --- intobject.h 2000/06/30 23:58:04 2.19 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: intrcheck.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/intrcheck.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** intrcheck.h 2000/06/30 23:50:38 2.6 --- intrcheck.h 2000/06/30 23:58:04 2.7 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: listobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/listobject.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** listobject.h 2000/06/30 23:50:38 2.18 --- listobject.h 2000/06/30 23:58:04 2.19 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: longintrepr.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/longintrepr.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** longintrepr.h 2000/06/30 23:50:38 2.6 --- longintrepr.h 2000/06/30 23:58:04 2.7 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: longobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/longobject.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** longobject.h 2000/06/30 23:50:38 2.14 --- longobject.h 2000/06/30 23:58:04 2.15 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: marshal.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/marshal.h,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** marshal.h 2000/06/30 23:50:38 2.7 --- marshal.h 2000/06/30 23:58:04 2.8 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: metagrammar.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/metagrammar.h,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** metagrammar.h 2000/06/30 23:50:38 2.8 --- metagrammar.h 2000/06/30 23:58:04 2.9 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: methodobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/methodobject.h,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** methodobject.h 2000/06/30 23:50:38 2.17 --- methodobject.h 2000/06/30 23:58:04 2.18 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: modsupport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/modsupport.h,v retrieving revision 2.29 retrieving revision 2.30 diff -C2 -r2.29 -r2.30 *** modsupport.h 2000/06/30 23:50:38 2.29 --- modsupport.h 2000/06/30 23:58:04 2.30 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: moduleobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/moduleobject.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** moduleobject.h 2000/06/30 23:50:38 2.14 --- moduleobject.h 2000/06/30 23:58:04 2.15 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: mymalloc.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mymalloc.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** mymalloc.h 2000/06/30 23:50:38 2.20 --- mymalloc.h 2000/06/30 23:58:04 2.21 *************** *** 2,10 **** #define Py_MYMALLOC_H /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 2,5 ---- *************** *** 14,18 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 9,12 ---- Index: myproto.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/myproto.h,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** myproto.h 2000/06/30 23:50:38 2.7 --- myproto.h 2000/06/30 23:58:04 2.8 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: myselect.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/myselect.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** myselect.h 2000/06/30 23:50:38 2.11 --- myselect.h 2000/06/30 23:58:04 2.12 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: mytime.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mytime.h,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** mytime.h 2000/06/30 23:50:38 2.5 --- mytime.h 2000/06/30 23:58:04 2.6 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: node.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/node.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** node.h 2000/06/30 23:50:38 2.14 --- node.h 2000/06/30 23:58:04 2.15 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: object.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/object.h,v retrieving revision 2.58 retrieving revision 2.59 diff -C2 -r2.58 -r2.59 *** object.h 2000/06/30 23:50:38 2.58 --- object.h 2000/06/30 23:58:04 2.59 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: objimpl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/objimpl.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** objimpl.h 2000/06/30 23:50:38 2.18 --- objimpl.h 2000/06/30 23:58:04 2.19 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: opcode.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/opcode.h,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -r2.24 -r2.25 *** opcode.h 2000/06/30 23:50:38 2.24 --- opcode.h 2000/06/30 23:58:04 2.25 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: osdefs.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/osdefs.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** osdefs.h 2000/06/30 23:50:38 2.11 --- osdefs.h 2000/06/30 23:58:04 2.12 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: parsetok.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/parsetok.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** parsetok.h 2000/06/30 23:50:38 2.11 --- parsetok.h 2000/06/30 23:58:04 2.12 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: patchlevel.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/patchlevel.h,v retrieving revision 2.37 retrieving revision 2.38 diff -C2 -r2.37 -r2.38 *** patchlevel.h 2000/06/30 23:50:38 2.37 --- patchlevel.h 2000/06/30 23:58:04 2.38 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: pgenheaders.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pgenheaders.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** pgenheaders.h 2000/06/30 23:50:38 2.19 --- pgenheaders.h 2000/06/30 23:58:04 2.20 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: pydebug.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pydebug.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** pydebug.h 2000/06/30 23:50:38 2.12 --- pydebug.h 2000/06/30 23:58:04 2.13 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: pyerrors.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyerrors.h,v retrieving revision 2.36 retrieving revision 2.37 diff -C2 -r2.36 -r2.37 *** pyerrors.h 2000/06/30 23:50:38 2.36 --- pyerrors.h 2000/06/30 23:58:04 2.37 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: pystate.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pystate.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** pystate.h 2000/06/30 23:50:38 2.10 --- pystate.h 2000/06/30 23:58:04 2.11 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: pythonrun.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pythonrun.h,v retrieving revision 2.29 retrieving revision 2.30 diff -C2 -r2.29 -r2.30 *** pythonrun.h 2000/06/30 23:50:38 2.29 --- pythonrun.h 2000/06/30 23:58:04 2.30 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: pythread.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pythread.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** pythread.h 2000/06/30 23:50:38 2.14 --- pythread.h 2000/06/30 23:58:04 2.15 *************** *** 3,11 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 3,6 ---- *************** *** 15,19 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 10,13 ---- Index: rangeobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/rangeobject.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** rangeobject.h 2000/06/30 23:50:38 2.12 --- rangeobject.h 2000/06/30 23:58:04 2.13 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: stringobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/stringobject.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** stringobject.h 2000/06/30 23:50:38 2.18 --- stringobject.h 2000/06/30 23:58:04 2.19 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: structmember.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/structmember.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** structmember.h 2000/06/30 23:50:38 2.13 --- structmember.h 2000/06/30 23:58:04 2.14 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: sysmodule.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/sysmodule.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** sysmodule.h 2000/06/30 23:50:38 2.18 --- sysmodule.h 2000/06/30 23:58:04 2.19 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: token.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/token.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** token.h 2000/06/30 23:50:38 2.13 --- token.h 2000/06/30 23:58:04 2.14 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: traceback.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/traceback.h,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** traceback.h 2000/06/30 23:50:38 2.15 --- traceback.h 2000/06/30 23:58:04 2.16 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: tupleobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/tupleobject.h,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** tupleobject.h 2000/06/30 23:50:38 2.21 --- tupleobject.h 2000/06/30 23:58:04 2.22 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- From python-dev@python.org Sat Jul 1 00:58:11 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:58:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python atof.c,2.4,2.5 bltinmodule.c,2.164,2.165 ceval.c,2.181,2.182 compile.c,2.111,2.112 dynload_aix.c,2.4,2.5 dynload_beos.c,2.3,2.4 dynload_dl.c,2.3,2.4 dynload_hpux.c,2.3,2.4 dynload_mac.c,2.5,2.6 dynload_next.c,2.4,2.5 dynload_os2.c,2.3,2.4 dynload_shlib.c,2.3,2.4 dynload_stub.c,2.2,2.3 dynload_win.c,2.4,2.5 errors.c,2.46,2.47 fmod.c,2.10,2.11 frozen.c,1.7,1.8 frozenmain.c,2.21,2.22 getargs.c,2.35,2.36 getcompiler.c,1.6,1.7 getcwd.c,1.11,1.12 getmtime.c,2.11,2.12 getplatform.c,1.5,1.6 getversion.c,1.11,1.12 import.c,2.137,2.138 importdl.c,2.65,2.66 importdl.h,2.13,2.14 marshal.c,1.50,1.51 memmove.c,2.5,2.6 modsupport.c,2.44,2.45 mystrtoul.c,2.18,2.19 pystate.c,2.10,2.11 pythonrun.c,2.99,2.100 sigcheck.c,2.5,2.6 strerror.c,2.7,2.8 structmember.c,2.15,2.16 sysmodule.c,2.67,2.68 thread.c,2.30,2.31 thread_beos.h,2.4,2.5 thread_cthread.h,2.10,2.11 thread_foobar.h,2.8,2.9 thread_lwp.h,2.9,2.10 thread_nt.h,2.13,2.14 thread_pth.h,2.3,2.4 thread_pth! read.h,2.26,2.27 thread_sgi.h,2.11,2.12 thread_solaris.h,2.12,2.13 thread_wince.h,2.3,2.4 traceback.c,2.29,2.30 Message-ID: <200006302358.QAA08603@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv8335/Python Modified Files: atof.c bltinmodule.c ceval.c compile.c dynload_aix.c dynload_beos.c dynload_dl.c dynload_hpux.c dynload_mac.c dynload_next.c dynload_os2.c dynload_shlib.c dynload_stub.c dynload_win.c errors.c fmod.c frozen.c frozenmain.c getargs.c getcompiler.c getcwd.c getmtime.c getplatform.c getversion.c import.c importdl.c importdl.h marshal.c memmove.c modsupport.c mystrtoul.c pystate.c pythonrun.c sigcheck.c strerror.c structmember.c sysmodule.c thread.c thread_beos.h thread_cthread.h thread_foobar.h thread_lwp.h thread_nt.h thread_pth.h thread_pthread.h thread_sgi.h thread_solaris.h thread_wince.h traceback.c Log Message: Change copyright notice - 2nd try. Index: atof.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/atof.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** atof.c 2000/06/30 23:50:39 2.4 --- atof.c 2000/06/30 23:58:05 2.5 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.164 retrieving revision 2.165 diff -C2 -r2.164 -r2.165 *** bltinmodule.c 2000/06/30 23:50:39 2.164 --- bltinmodule.c 2000/06/30 23:58:05 2.165 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.181 retrieving revision 2.182 diff -C2 -r2.181 -r2.182 *** ceval.c 2000/06/30 23:50:39 2.181 --- ceval.c 2000/06/30 23:58:05 2.182 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.111 retrieving revision 2.112 diff -C2 -r2.111 -r2.112 *** compile.c 2000/06/30 23:50:39 2.111 --- compile.c 2000/06/30 23:58:06 2.112 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dynload_aix.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_aix.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** dynload_aix.c 2000/06/30 23:50:39 2.4 --- dynload_aix.c 2000/06/30 23:58:06 2.5 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dynload_beos.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_beos.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** dynload_beos.c 2000/06/30 23:50:39 2.3 --- dynload_beos.c 2000/06/30 23:58:06 2.4 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dynload_dl.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_dl.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** dynload_dl.c 2000/06/30 23:50:39 2.3 --- dynload_dl.c 2000/06/30 23:58:06 2.4 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dynload_hpux.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_hpux.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** dynload_hpux.c 2000/06/30 23:50:39 2.3 --- dynload_hpux.c 2000/06/30 23:58:06 2.4 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dynload_mac.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_mac.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** dynload_mac.c 2000/06/30 23:50:39 2.5 --- dynload_mac.c 2000/06/30 23:58:06 2.6 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dynload_next.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_next.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** dynload_next.c 2000/06/30 23:50:39 2.4 --- dynload_next.c 2000/06/30 23:58:06 2.5 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dynload_os2.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_os2.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** dynload_os2.c 2000/06/30 23:50:39 2.3 --- dynload_os2.c 2000/06/30 23:58:06 2.4 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dynload_shlib.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_shlib.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** dynload_shlib.c 2000/06/30 23:50:39 2.3 --- dynload_shlib.c 2000/06/30 23:58:06 2.4 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dynload_stub.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_stub.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** dynload_stub.c 2000/06/30 23:50:39 2.2 --- dynload_stub.c 2000/06/30 23:58:06 2.3 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dynload_win.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_win.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** dynload_win.c 2000/06/30 23:50:39 2.4 --- dynload_win.c 2000/06/30 23:58:06 2.5 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: errors.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/errors.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** errors.c 2000/06/30 23:50:39 2.46 --- errors.c 2000/06/30 23:58:06 2.47 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: fmod.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/fmod.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** fmod.c 2000/06/30 23:50:39 2.10 --- fmod.c 2000/06/30 23:58:06 2.11 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: frozen.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/frozen.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** frozen.c 2000/06/30 23:50:39 1.7 --- frozen.c 2000/06/30 23:58:06 1.8 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: frozenmain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/frozenmain.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** frozenmain.c 2000/06/30 23:50:39 2.21 --- frozenmain.c 2000/06/30 23:58:06 2.22 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: getargs.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** getargs.c 2000/06/30 23:50:39 2.35 --- getargs.c 2000/06/30 23:58:06 2.36 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: getcompiler.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getcompiler.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** getcompiler.c 2000/06/30 23:50:40 1.6 --- getcompiler.c 2000/06/30 23:58:06 1.7 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: getcwd.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getcwd.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** getcwd.c 2000/06/30 23:50:40 1.11 --- getcwd.c 2000/06/30 23:58:06 1.12 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: getmtime.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getmtime.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** getmtime.c 2000/06/30 23:50:40 2.11 --- getmtime.c 2000/06/30 23:58:06 2.12 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: getplatform.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getplatform.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** getplatform.c 2000/06/30 23:50:40 1.5 --- getplatform.c 2000/06/30 23:58:06 1.6 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: getversion.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getversion.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** getversion.c 2000/06/30 23:50:40 1.11 --- getversion.c 2000/06/30 23:58:06 1.12 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.137 retrieving revision 2.138 diff -C2 -r2.137 -r2.138 *** import.c 2000/06/30 23:50:40 2.137 --- import.c 2000/06/30 23:58:06 2.138 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: importdl.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/importdl.c,v retrieving revision 2.65 retrieving revision 2.66 diff -C2 -r2.65 -r2.66 *** importdl.c 2000/06/30 23:50:40 2.65 --- importdl.c 2000/06/30 23:58:06 2.66 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: importdl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/importdl.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** importdl.h 2000/06/30 23:50:40 2.13 --- importdl.h 2000/06/30 23:58:06 2.14 *************** *** 7,15 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 7,10 ---- *************** *** 19,23 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 14,17 ---- Index: marshal.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/marshal.c,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -r1.50 -r1.51 *** marshal.c 2000/06/30 23:50:40 1.50 --- marshal.c 2000/06/30 23:58:06 1.51 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: memmove.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/memmove.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** memmove.c 2000/06/30 23:50:40 2.5 --- memmove.c 2000/06/30 23:58:06 2.6 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: modsupport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/modsupport.c,v retrieving revision 2.44 retrieving revision 2.45 diff -C2 -r2.44 -r2.45 *** modsupport.c 2000/06/30 23:50:40 2.44 --- modsupport.c 2000/06/30 23:58:06 2.45 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: mystrtoul.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/mystrtoul.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** mystrtoul.c 2000/06/30 23:50:40 2.18 --- mystrtoul.c 2000/06/30 23:58:06 2.19 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: pystate.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pystate.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** pystate.c 2000/06/30 23:50:40 2.10 --- pystate.c 2000/06/30 23:58:06 2.11 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: pythonrun.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v retrieving revision 2.99 retrieving revision 2.100 diff -C2 -r2.99 -r2.100 *** pythonrun.c 2000/06/30 23:50:40 2.99 --- pythonrun.c 2000/06/30 23:58:06 2.100 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: sigcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/sigcheck.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** sigcheck.c 2000/06/30 23:50:40 2.5 --- sigcheck.c 2000/06/30 23:58:06 2.6 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: strerror.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/strerror.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** strerror.c 2000/06/30 23:50:40 2.7 --- strerror.c 2000/06/30 23:58:06 2.8 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: structmember.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/structmember.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** structmember.c 2000/06/30 23:50:40 2.15 --- structmember.c 2000/06/30 23:58:06 2.16 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: sysmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v retrieving revision 2.67 retrieving revision 2.68 diff -C2 -r2.67 -r2.68 *** sysmodule.c 2000/06/30 23:50:40 2.67 --- sysmodule.c 2000/06/30 23:58:06 2.68 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: thread.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread.c,v retrieving revision 2.30 retrieving revision 2.31 diff -C2 -r2.30 -r2.31 *** thread.c 2000/06/30 23:50:40 2.30 --- thread.c 2000/06/30 23:58:06 2.31 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: thread_beos.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_beos.h,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** thread_beos.h 2000/06/30 23:50:40 2.4 --- thread_beos.h 2000/06/30 23:58:06 2.5 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - BeOS thread support by Chris Herborth (chrish@qnx.com) ******************************************************************/ --- 7,10 ---- Index: thread_cthread.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_cthread.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** thread_cthread.h 2000/06/30 23:50:40 2.10 --- thread_cthread.h 2000/06/30 23:58:06 2.11 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: thread_foobar.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_foobar.h,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** thread_foobar.h 2000/06/30 23:50:40 2.8 --- thread_foobar.h 2000/06/30 23:58:06 2.9 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: thread_lwp.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_lwp.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** thread_lwp.h 2000/06/30 23:50:40 2.9 --- thread_lwp.h 2000/06/30 23:58:06 2.10 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: thread_nt.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_nt.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** thread_nt.h 2000/06/30 23:50:40 2.13 --- thread_nt.h 2000/06/30 23:58:06 2.14 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: thread_pth.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_pth.h,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** thread_pth.h 2000/06/30 23:50:40 2.3 --- thread_pth.h 2000/06/30 23:58:06 2.4 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: thread_pthread.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_pthread.h,v retrieving revision 2.26 retrieving revision 2.27 diff -C2 -r2.26 -r2.27 *** thread_pthread.h 2000/06/30 23:50:40 2.26 --- thread_pthread.h 2000/06/30 23:58:06 2.27 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: thread_sgi.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_sgi.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** thread_sgi.h 2000/06/30 23:50:40 2.11 --- thread_sgi.h 2000/06/30 23:58:06 2.12 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: thread_solaris.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_solaris.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** thread_solaris.h 2000/06/30 23:50:40 2.12 --- thread_solaris.h 2000/06/30 23:58:06 2.13 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: thread_wince.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_wince.h,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** thread_wince.h 2000/06/30 23:50:40 2.3 --- thread_wince.h 2000/06/30 23:58:06 2.4 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: traceback.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/traceback.c,v retrieving revision 2.29 retrieving revision 2.30 diff -C2 -r2.29 -r2.30 *** traceback.c 2000/06/30 23:50:40 2.29 --- traceback.c 2000/06/30 23:58:06 2.30 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- From python-dev@python.org Sat Jul 1 00:58:11 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:58:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules almodule.c,1.25,1.26 arraymodule.c,2.43,2.44 audioop.c,1.37,1.38 bsddbmodule.c,1.20,1.21 cdmodule.c,1.20,1.21 cgensupport.c,2.12,2.13 cgensupport.h,2.12,2.13 clmodule.c,2.21,2.22 config.c.in,1.68,1.69 cstubs,2.19,2.20 dbmmodule.c,2.18,2.19 dlmodule.c,2.8,2.9 errnomodule.c,2.10,2.11 fcntlmodule.c,2.20,2.21 flmodule.c,1.38,1.39 fmmodule.c,1.12,1.13 gdbmmodule.c,2.23,2.24 getpath.c,1.24,1.25 glmodule.c,2.4,2.5 grpmodule.c,2.10,2.11 imageop.c,2.21,2.22 imgfile.c,1.23,1.24 main.c,1.39,1.40 mathmodule.c,2.46,2.47 md5module.c,2.16,2.17 mpzmodule.c,2.26,2.27 newmodule.c,2.22,2.23 parsermodule.c,2.40,2.41 posixmodule.c,2.140,2.141 pwdmodule.c,1.18,1.19 regexmodule.c,1.35,1.36 resource.c,2.11,2.12 selectmodule.c,2.34,2.35 sgimodule.c,1.12,1.13 signalmodule.c,2.42,2.43 socketmodule.c,1.110,1.111 stropmodule.c,2.64,2.65 structmodule.c,2.32,2.33 sunaudiodev.c,1.18,1.19 svmodule.c,2.12,2.13 threadmodule.c,2.32,2.33 timemodule.c,2.87,2.88 xxmodule.c,2.! 17,2.18 yuv.h,2.6,2.7 yuvconvert.c,2.5,2.6 Message-ID: <200006302358.QAA08590@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8335/Modules Modified Files: almodule.c arraymodule.c audioop.c bsddbmodule.c cdmodule.c cgensupport.c cgensupport.h clmodule.c config.c.in cstubs dbmmodule.c dlmodule.c errnomodule.c fcntlmodule.c flmodule.c fmmodule.c gdbmmodule.c getpath.c glmodule.c grpmodule.c imageop.c imgfile.c main.c mathmodule.c md5module.c mpzmodule.c newmodule.c parsermodule.c posixmodule.c pwdmodule.c regexmodule.c resource.c selectmodule.c sgimodule.c signalmodule.c socketmodule.c stropmodule.c structmodule.c sunaudiodev.c svmodule.c threadmodule.c timemodule.c xxmodule.c yuv.h yuvconvert.c Log Message: Change copyright notice - 2nd try. Index: almodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/almodule.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** almodule.c 2000/06/30 23:50:38 1.25 --- almodule.c 2000/06/30 23:58:05 1.26 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: arraymodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v retrieving revision 2.43 retrieving revision 2.44 diff -C2 -r2.43 -r2.44 *** arraymodule.c 2000/06/30 23:50:38 2.43 --- arraymodule.c 2000/06/30 23:58:05 2.44 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: audioop.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/audioop.c,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -r1.37 -r1.38 *** audioop.c 2000/06/30 23:50:38 1.37 --- audioop.c 2000/06/30 23:58:05 1.38 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: bsddbmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/bsddbmodule.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** bsddbmodule.c 2000/06/30 23:50:38 1.20 --- bsddbmodule.c 2000/06/30 23:58:05 1.21 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: cdmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cdmodule.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** cdmodule.c 2000/06/30 23:50:38 1.20 --- cdmodule.c 2000/06/30 23:58:05 1.21 *************** *** 1,8 **** /********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: cgensupport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cgensupport.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** cgensupport.c 2000/06/30 23:50:38 2.12 --- cgensupport.c 2000/06/30 23:58:05 2.13 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: cgensupport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cgensupport.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** cgensupport.h 2000/06/30 23:50:38 2.12 --- cgensupport.h 2000/06/30 23:58:05 2.13 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: clmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/clmodule.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** clmodule.c 2000/06/30 23:50:38 2.21 --- clmodule.c 2000/06/30 23:58:05 2.22 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: config.c.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/config.c.in,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -r1.68 -r1.69 *** config.c.in 2000/06/30 23:50:38 1.68 --- config.c.in 2000/06/30 23:58:05 1.69 *************** *** 1,8 **** /* -*- C -*- *********************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: cstubs =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cstubs,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** cstubs 2000/06/30 23:50:38 2.19 --- cstubs 2000/06/30 23:58:05 2.20 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dbmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/dbmmodule.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** dbmmodule.c 2000/06/30 23:50:38 2.18 --- dbmmodule.c 2000/06/30 23:58:05 2.19 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/dlmodule.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** dlmodule.c 2000/06/30 23:50:38 2.8 --- dlmodule.c 2000/06/30 23:58:05 2.9 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: errnomodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/errnomodule.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** errnomodule.c 2000/06/30 23:50:38 2.10 --- errnomodule.c 2000/06/30 23:58:05 2.11 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: fcntlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fcntlmodule.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** fcntlmodule.c 2000/06/30 23:50:38 2.20 --- fcntlmodule.c 2000/06/30 23:58:05 2.21 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: flmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/flmodule.c,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** flmodule.c 2000/06/30 23:50:38 1.38 --- flmodule.c 2000/06/30 23:58:05 1.39 *************** *** 1,8 **** /********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: fmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fmmodule.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** fmmodule.c 2000/06/30 23:50:38 1.12 --- fmmodule.c 2000/06/30 23:58:05 1.13 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: gdbmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gdbmmodule.c,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** gdbmmodule.c 2000/06/30 23:50:38 2.23 --- gdbmmodule.c 2000/06/30 23:58:05 2.24 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: getpath.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/getpath.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** getpath.c 2000/06/30 23:50:38 1.24 --- getpath.c 2000/06/30 23:58:05 1.25 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: glmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/glmodule.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** glmodule.c 2000/06/30 23:50:38 2.4 --- glmodule.c 2000/06/30 23:58:05 2.5 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: grpmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/grpmodule.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** grpmodule.c 2000/06/30 23:50:38 2.10 --- grpmodule.c 2000/06/30 23:58:05 2.11 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: imageop.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/imageop.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** imageop.c 2000/06/30 23:50:38 2.21 --- imageop.c 2000/06/30 23:58:05 2.22 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: imgfile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/imgfile.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** imgfile.c 2000/06/30 23:50:38 1.23 --- imgfile.c 2000/06/30 23:58:05 1.24 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: main.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/main.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** main.c 2000/06/30 23:50:38 1.39 --- main.c 2000/06/30 23:58:05 1.40 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: mathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** mathmodule.c 2000/06/30 23:50:38 2.46 --- mathmodule.c 2000/06/30 23:58:05 2.47 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: md5module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/md5module.c,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** md5module.c 2000/06/30 23:50:38 2.16 --- md5module.c 2000/06/30 23:58:05 2.17 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: mpzmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mpzmodule.c,v retrieving revision 2.26 retrieving revision 2.27 diff -C2 -r2.26 -r2.27 *** mpzmodule.c 2000/06/30 23:50:38 2.26 --- mpzmodule.c 2000/06/30 23:58:05 2.27 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: newmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/newmodule.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** newmodule.c 2000/06/30 23:50:38 2.22 --- newmodule.c 2000/06/30 23:58:05 2.23 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: parsermodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v retrieving revision 2.40 retrieving revision 2.41 diff -C2 -r2.40 -r2.41 *** parsermodule.c 2000/06/30 23:50:38 2.40 --- parsermodule.c 2000/06/30 23:58:05 2.41 *************** *** 77,85 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 77,80 ---- *************** *** 89,93 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 84,87 ---- Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.140 retrieving revision 2.141 diff -C2 -r2.140 -r2.141 *** posixmodule.c 2000/06/30 23:50:38 2.140 --- posixmodule.c 2000/06/30 23:58:05 2.141 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: pwdmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pwdmodule.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** pwdmodule.c 2000/06/30 23:50:38 1.18 --- pwdmodule.c 2000/06/30 23:58:05 1.19 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: regexmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/regexmodule.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** regexmodule.c 2000/06/30 23:50:38 1.35 --- regexmodule.c 2000/06/30 23:58:05 1.36 *************** *** 5,13 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 5,8 ---- *************** *** 17,21 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 12,15 ---- Index: resource.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/resource.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** resource.c 2000/06/30 23:50:38 2.11 --- resource.c 2000/06/30 23:58:05 2.12 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: selectmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v retrieving revision 2.34 retrieving revision 2.35 diff -C2 -r2.34 -r2.35 *** selectmodule.c 2000/06/30 23:50:38 2.34 --- selectmodule.c 2000/06/30 23:58:05 2.35 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: sgimodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sgimodule.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** sgimodule.c 2000/06/30 23:50:38 1.12 --- sgimodule.c 2000/06/30 23:58:05 1.13 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.42 retrieving revision 2.43 diff -C2 -r2.42 -r2.43 *** signalmodule.c 2000/06/30 23:50:38 2.42 --- signalmodule.c 2000/06/30 23:58:05 2.43 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -r1.110 -r1.111 *** socketmodule.c 2000/06/30 23:50:38 1.110 --- socketmodule.c 2000/06/30 23:58:05 1.111 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: stropmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/stropmodule.c,v retrieving revision 2.64 retrieving revision 2.65 diff -C2 -r2.64 -r2.65 *** stropmodule.c 2000/06/30 23:50:38 2.64 --- stropmodule.c 2000/06/30 23:58:05 2.65 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: structmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/structmodule.c,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -r2.32 -r2.33 *** structmodule.c 2000/06/30 23:50:38 2.32 --- structmodule.c 2000/06/30 23:58:05 2.33 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: sunaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sunaudiodev.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** sunaudiodev.c 2000/06/30 23:50:39 1.18 --- sunaudiodev.c 2000/06/30 23:58:05 1.19 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: svmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/svmodule.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** svmodule.c 2000/06/30 23:50:39 2.12 --- svmodule.c 2000/06/30 23:58:05 2.13 *************** *** 1,8 **** /********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: threadmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/threadmodule.c,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -r2.32 -r2.33 *** threadmodule.c 2000/06/30 23:50:39 2.32 --- threadmodule.c 2000/06/30 23:58:05 2.33 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.87 retrieving revision 2.88 diff -C2 -r2.87 -r2.88 *** timemodule.c 2000/06/30 23:50:39 2.87 --- timemodule.c 2000/06/30 23:58:05 2.88 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: xxmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/xxmodule.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** xxmodule.c 2000/06/30 23:50:39 2.17 --- xxmodule.c 2000/06/30 23:58:05 2.18 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: yuv.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/yuv.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** yuv.h 2000/06/30 23:50:39 2.6 --- yuv.h 2000/06/30 23:58:05 2.7 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: yuvconvert.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/yuvconvert.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** yuvconvert.c 2000/06/30 23:50:39 2.5 --- yuvconvert.c 2000/06/30 23:58:05 2.6 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- From python-dev@python.org Sat Jul 1 01:03:45 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 30 Jun 2000 17:03:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild readme.txt,1.6,1.7 Message-ID: <200007010003.RAA15118@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv15105/python/dist/src/pcbuild Modified Files: readme.txt Log Message: Update for 2.0b1. Also add more text, to be more explicit about what the dozen+ subprojects are for, which are and aren't expected to build out of the box, and what else is needed to get them all to build. Also explained that Alpha configurations don't refer to pre-beta, but to the Alpha processor! That's baffled me for years <0.7 wink>. Index: readme.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/readme.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** readme.txt 2000/06/30 09:04:35 1.6 --- readme.txt 2000/07/01 00:03:43 1.7 *************** *** 1,40 **** ! Building Python using VC++ 5.0 or 6.0 ------------------------------------- ! ! This directory is used to build Python for Win32 platforms, ! e.g. Windows 95, 98 and NT. It requires Microsoft Visual C++ 6.x ! or 5.x. (For other Windows platforms and compilers, see ../PC/readme.txt.) ! Unlike previous versions, there's no longer a need to copy the project ! files from the PC/vc5x subdirectory to the PCbuild directory -- they ! come in PCbuild. ! ! All you need to do is open the workspace "pcbuild.dsw" in MSVC++, ! select the Debug or Release setting (using Set Active ! Configuration... in the Build menu), and build the projects. ! ! The proper order to build is ! ! 1) python16 (this builds python16.dll and python16.lib) ! 2) python (this builds python.exe) ! 3) the other subprojects ! ! Some subprojects require that you have distributions of other ! software: Tcl/Tk, bsddb and zlib. If you don't have these, you can't ! build the corresponding extensions. If you do have them, you may have ! to change the project settings to point to the right include files, ! libraries etc. When using the Debug setting, the output files have a _d added to ! their name: python16_d.dll, python_d.exe, parser_d.pyd, and so on. ! If you want to create your own extension module DLL, there's an ! example with easy-to-follow instructions in ../PC/example/; read the ! file readme.txt there first. ! ! Pointers: ! Python http://www.python.org ! Tcl/Tk http://dev.scriptics.com ! zlib http://www.winimage.com/zLibDll ! bsddb Sam Rushing's web/ftp site --- 1,98 ---- ! Building Python using VC++ 6.0 or 5.0 ------------------------------------- ! This directory is used to build Python for Win32 platforms, e.g. Windows ! 95, 98 and NT. It requires Microsoft Visual C++ 6.x or 5.x. (For other Windows platforms and compilers, see ../PC/readme.txt.) + XXX There are still (Python 2.0b1) a few compiler warnings under VC6. + XXX There are likely a few more under VC5. + + Unlike older versions, there's no longer a need to copy the project files + from a subdirectory of PC/ to the PCbuild directory -- they come in PCbuild. + + All you need to do is open the workspace "pcbuild.dsw" in MSVC++, select + the Debug or Release setting (using Build -> Set Active Configuration...), + and build the projects. + + The proper order to build subprojects is: + + 1) python20 (this builds the main Python DLL and library files, + python20.{dll, lib}) + + 2) python (this builds the main Python executable, python.exe) ! 3) the other subprojects, as desired or needed (note: you probably don't ! want to build most of the other subprojects, unless you're building an ! entire Python distribution from scratch, or specifically making changes ! to the subsystems they implement; see SUBPROJECTS below) When using the Debug setting, the output files have a _d added to ! their name: python20_d.dll, python_d.exe, parser_d.pyd, and so on. ! SUBPROJECTS ! ----------- ! These subprojects should build out of the box. Subprojects other than the ! main ones (python20, python, pythonw) generally build a DLL (renamed to ! .pyd) from a specific module so that users don't have to load the code ! supporting that module unless they import the module. ! ! python20 ! .dll and .lib ! python ! .exe ! pythonw ! pythonw.exe, a variant of python.exe that doesn't pop up a DOS box ! _socket ! socketmodule.c ! _sre ! Unicode-aware regular expression engine ! mmap ! mmapmodule.c ! parser ! the parser module ! select ! selectmodule.c ! unicodedata ! large tables of Unicode data ! winreg ! Windows registry API ! winsound ! play sounds (typically .wav files) under Windows ! ! The following subprojects will generally NOT build out of the box. They ! wrap code Python doesn't control, and you'll need to download the base ! packages first (study the subproject structure from within MSVC to see ! where each expects to find the unpacked packages): ! ! _tkinter ! Python wrapper for the Tk windowing system. Requires tcl831.exe from ! http://dev.scriptics.com/software/tcltk/downloadnow83.tml ! ! zlib ! Python wrapper for the zlib compression library. Requires ! http://www.winimage.com/zLibDll/zlib133dll.zip ! and ! ftp://ftp.uu.net/graphics/png/src/zlib133.zip ! ! bsddb ! Python wrapper for the BSD database 1.85. Requires bsddbmodule.zip, ! from the bsddb link at ! http://www.nightmare.com/software.html ! ! pyexpat ! Python wrapper for accelerated XML parsing. Requires ! ftp://ftp.jclark.com/pub/xml/expat.zip ! ! ! NOTE ON CONFIGURATIONS ! ---------------------- ! Under Build -> Configuration ..., you'll find several Alpha configurations, ! such as "Win32 Alpha Release". These do not refer to alpha versions (as in ! alpha, beta, final), but to the DEC/COMPAQ Alpha processor. Ignore them if ! you're not building on an Alpha box. ! ! ! YOUR OWN EXTENSION DDLs ! ----------------------- ! If you want to create your own extension module DLL, there's an example ! with easy-to-follow instructions in ../PC/example/; read the file ! readme.txt there first. From python-dev@python.org Sat Jul 1 01:10:06 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 17:10:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/BeOS dl_export.h,1.1,1.2 Message-ID: <200007010010.RAA15464@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/BeOS In directory slayer.i.sourceforge.net:/tmp/cvs-serv15449 Modified Files: dl_export.h Log Message: Change copyright notice. Index: dl_export.h =================================================================== RCS file: /cvsroot/python/python/dist/src/BeOS/dl_export.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** dl_export.h 1999/01/12 20:30:23 1.1 --- dl_export.h 2000/07/01 00:10:03 1.2 *************** *** 10,35 **** * Python: * ! * 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 ! * supporting documentation, and that the names of Stichting Mathematisch ! * Centrum or CWI or Corporation for National Research Initiatives or ! * CNRI not be used in advertising or publicity pertaining to ! * distribution of the software without specific, written prior ! * permission. ! * ! * While CWI is the initial source for this software, a modified version ! * is made available by the Corporation for National Research Initiatives ! * (CNRI) at the Internet address ftp://ftp.python.org. ! * ! * STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! * CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! * PERFORMANCE OF THIS SOFTWARE. * * - Chris Herborth (chrish@beoscentral.com) --- 10,20 ---- * Python: * ! * Copyright (c) 2000, BeOpen.com. ! * Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! * Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! * All rights reserved. ! * ! * See the file "Misc/COPYRIGHT" for information on usage and ! * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. * * - Chris Herborth (chrish@beoscentral.com) From python-dev@python.org Sat Jul 1 01:13:13 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 17:13:13 -0700 Subject: [Python-checkins] CVS: python/dist/src Makefile.in,1.89,1.90 Message-ID: <200007010013.RAA15705@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv15698 Modified Files: Makefile.in Log Message: Change copyright notice. Index: Makefile.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Makefile.in,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -r1.89 -r1.90 *** Makefile.in 2000/06/30 16:03:26 1.89 --- Makefile.in 2000/07/01 00:13:10 1.90 *************** *** 1,30 **** ######################################################################## ! # 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, ! # provided that the above copyright notice appear in all copies and that ! # both that copyright notice and this permission notice appear in ! # supporting documentation, and that the names of Stichting Mathematisch ! # Centrum or CWI or Corporation for National Research Initiatives or ! # CNRI not be used in advertising or publicity pertaining to ! # distribution of the software without specific, written prior ! # permission. # ! # While CWI is the initial source for this software, a modified version ! # is made available by the Corporation for National Research Initiatives ! # (CNRI) at the Internet address ftp://ftp.python.org. ! # ! # STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! # REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! # MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! # CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! # DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! # PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! # PERFORMANCE OF THIS SOFTWARE. ######################################################################## --- 1,10 ---- ######################################################################## ! # Copyright (c) 2000, BeOpen.com. ! # Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! # Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! # All rights reserved. # ! # See the file "Misc/COPYRIGHT" for information on usage and ! # redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ######################################################################## From python-dev@python.org Sat Jul 1 01:16:15 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 17:16:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules cgen.py,2.14,2.15 Message-ID: <200007010016.RAA15827@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv15820 Modified Files: cgen.py Log Message: Change copyright notice. Index: cgen.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cgen.py,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** cgen.py 1997/04/29 21:34:06 2.14 --- cgen.py 2000/07/01 00:16:13 2.15 *************** *** 1,30 **** ######################################################################## ! # 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, ! # provided that the above copyright notice appear in all copies and that ! # both that copyright notice and this permission notice appear in ! # supporting documentation, and that the names of Stichting Mathematisch ! # Centrum or CWI or Corporation for National Research Initiatives or ! # CNRI not be used in advertising or publicity pertaining to ! # distribution of the software without specific, written prior ! # permission. # ! # While CWI is the initial source for this software, a modified version ! # is made available by the Corporation for National Research Initiatives ! # (CNRI) at the Internet address ftp://ftp.python.org. ! # ! # STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! # REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! # MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! # CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! # DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! # PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! # PERFORMANCE OF THIS SOFTWARE. ######################################################################## --- 1,10 ---- ######################################################################## ! # Copyright (c) 2000, BeOpen.com. ! # Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! # Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! # All rights reserved. # ! # See the file "Misc/COPYRIGHT" for information on usage and ! # redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ######################################################################## From python-dev@python.org Sat Jul 1 01:34:41 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 17:34:41 -0700 Subject: [Python-checkins] CVS: python/dist/src README,1.87,1.88 Message-ID: <200007010034.RAA16716@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv16709 Modified Files: README Log Message: Update a bunch of URLs. No longer suggests to join PSA or Consortium. Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -r1.87 -r1.88 *** README 2000/06/30 17:30:18 1.87 --- README 2000/07/01 00:34:39 1.88 *************** *** 48,69 **** Python is an interpreted object-oriented programming language, and is often compared to Tcl, Perl, Java or Scheme. To find out more, point ! your browser to http://www.python.org/. - A modest plug - ------------- - - ************************************************************************ - * Without your support, I won't be able to continue to work on Python! * - ************************************************************************ - - If you use Python, please consider joining the Python Software - Activity (PSA). See http://www.python.org/psa/. - - Organizations that make heavy use of Python are especially encouraged - to become corporate members -- or better still, to join the Python - Consortium (see http://www.python.org/consortium/). - - How do I learn Python? ---------------------- --- 48,54 ---- Python is an interpreted object-oriented programming language, and is often compared to Tcl, Perl, Java or Scheme. To find out more, point ! your browser to http://www.pythonlabs.com/. How do I learn Python? ---------------------- *************** *** 660,664 **** Of course, there are also binary distributions available for these ! platforms -- see http://www.python.org/python/. To port Python to a new non-UNIX system, you will have to fake the --- 645,649 ---- Of course, there are also binary distributions available for these ! platforms -- see http://www.pythonlabs.com/downloads.html To port Python to a new non-UNIX system, you will have to fake the *************** *** 688,692 **** All documentation is also available online via the Python web site ! (http://www.python.org/, see below). It is available online for occaissional reference, or can be downloaded in many formats for faster access. The documents are available in HTML, PostScript, PDF, --- 673,677 ---- All documentation is also available online via the Python web site ! (http://www.python.org/doc/, see below). It is available online for occaissional reference, or can be downloaded in many formats for faster access. The documents are available in HTML, PostScript, PDF, *************** *** 701,710 **** Misc/python-mode.el. Originally written by the famous Tim Peters, it is now maintained by the equally famous Barry Warsaw ! . The latest version, along with various ! other contributed Python-related Emacs goodies, is online at . And if you are planning to edit the Python C code, please pick up the latest version of CC Mode ; it contains a "python" style ! used throughout most of the Python C source files. --- 686,697 ---- Misc/python-mode.el. Originally written by the famous Tim Peters, it is now maintained by the equally famous Barry Warsaw ! . The latest version, along with various other ! contributed Python-related Emacs goodies, is online at . And if you are planning to edit the Python C code, please pick up the latest version of CC Mode ; it contains a "python" style ! used throughout most of the Python C source files. (Newer versions of ! Emacs or XEmacs may already come with the latest version of ! python-mode.) *************** *** 712,728 **** -------- ! Python's own web site has URL http://www.python.org/. Come visit us! ! There are a number of mirrors, and a list of mirrors is accessible ! from the home page -- try a mirror that's close you you. - Ftp site - -------- - - Python's own ftp site is ftp://ftp.python.org/pub/python/. There are - numerous mirrors; the list of mirrors is accessible from - http://www.python.org/. - - Newsgroups ---------- --- 699,706 ---- -------- ! Python's own web site has URL http://www.pythonlabs.com/. Come visit ! us! Newsgroups ---------- *************** *** 747,755 **** ----------- ! Bugs are best reported to the comp.lang.python newsgroup (or the ! Python mailing list) -- see the section "Newsgroups" above. Before ! posting, check the newsgroup archives (see above) to see if your bug ! has already been reported! If you don't want to go public, send them ! to me: . --- 725,730 ---- ----------- ! To report or search for bugs, please use the Python Bugs List at ! http://www.python.org/search/search_bugs.html *************** *** 760,764 **** best to post to the comp.lang.python or the Python mailing list (see above). If you specifically don't want to involve the newsgroup or ! mailing list, send questions to (a group of volunteers which does *not* include me). Because of my work and email volume, I'm often be slow in answering questions sent to me directly; --- 735,739 ---- best to post to the comp.lang.python or the Python mailing list (see above). If you specifically don't want to involve the newsgroup or ! mailing list, send questions to (a group of volunteers which does *not* include me). Because of my work and email volume, I'm often be slow in answering questions sent to me directly; *************** *** 772,782 **** also usable from Python. Since this requires that you first build and install Tcl/Tk, the Tk interface is not enabled by default. Python ! supports all Tcl/Tk versions from version 7.5/4.1 through 8.0 (and it ! is expected that it will also work with newer versions). Tcl/Tk ! 7.4/4.0 is no longer supported. 8.0 or any later non-alpha non-beta ! release is recommended. ! See http://sunscript.sun.com/ for more info on Tcl/Tk, including the ! on-line manual pages. --- 747,754 ---- also usable from Python. Since this requires that you first build and install Tcl/Tk, the Tk interface is not enabled by default. Python ! supports Tcl/Tk starting with version 8.0. ! See http://dev.ajubasolutions.com/ for more info on Tcl/Tk, including ! the on-line manual pages. *************** *** 787,802 **** will have to edit the first line to fix or add -I and -L options. (Also see the general instructions at the top of that file.) - - There is little documentation on how to use Tkinter; however most of - the Tk manual pages apply quite straightforwardly. Begin with - fetching the "Tk Lifesaver" document, - e.g. ftp://ftp.python.org/pub/python/doc/tkinter-doc.tar.gz (a gzipped - tar file containing a PostScript file) or the on-line version - http://www.python.org/doc/life-preserver/index.html. Reading the - Tkinter.py source will reveal most details on how Tkinter calls are - translated into Tcl code. ! A more recent introduction to Tkinter programming, by Fredrik Lundh, ! is at http://www.pythonware.com/library/tkinter/introduction/index.htm. There are demos in the Demo/tkinter directory, in the subdirectories --- 759,765 ---- will have to edit the first line to fix or add -I and -L options. (Also see the general instructions at the top of that file.) ! For more Tkinter information, see the Tkinter Resource page: ! http://www.python.org/topics/tkinter/ There are demos in the Demo/tkinter directory, in the subdirectories From python-dev@python.org Sat Jul 1 01:38:22 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 17:38:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules arraymodule.c,2.44,2.45 Message-ID: <200007010038.RAA16914@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv16905 Modified Files: arraymodule.c Log Message: In b_setitem(), instead of the platform dependent CHAR_MIN and CHAR_MAX, use hardcoded -128 and 127. This may seem strange, unless you realize that we're talking about signed bytes here! Bytes are always 8 bits and 2's complement. CHAR_MIN and CHAR_MAX are properties of the char data type, which is guaranteed to hold at least 8 bits anyway. Otherwise you'd get failing tests on platforms where unsigned char is the default (e.g. AIX). Thanks, Vladimir Marangozov, for finding this nit! Index: arraymodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v retrieving revision 2.44 retrieving revision 2.45 diff -C2 -r2.44 -r2.45 *** arraymodule.c 2000/06/30 23:58:05 2.44 --- arraymodule.c 2000/07/01 00:38:19 2.45 *************** *** 100,109 **** if (!PyArg_Parse(v, "h;array item must be integer", &x)) return -1; ! else if (x < CHAR_MIN) { PyErr_SetString(PyExc_OverflowError, "signed char is less than minimum"); return -1; } ! else if (x > CHAR_MAX) { PyErr_SetString(PyExc_OverflowError, "signed char is greater than maximum"); --- 100,109 ---- if (!PyArg_Parse(v, "h;array item must be integer", &x)) return -1; ! else if (x < -128) { PyErr_SetString(PyExc_OverflowError, "signed char is less than minimum"); return -1; } ! else if (x > 127) { PyErr_SetString(PyExc_OverflowError, "signed char is greater than maximum"); From python-dev@python.org Sat Jul 1 01:51:54 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 17:51:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.15,2.16 Message-ID: <200007010051.RAA17476@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv17467 Modified Files: mmapmodule.c Log Message: clean up warnings in Win32 build of mmapmodule.c Index: mmapmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** mmapmodule.c 2000/06/18 19:06:49 2.15 --- mmapmodule.c 2000/07/01 00:51:51 2.16 *************** *** 569,573 **** { CHECK_VALID(NULL); ! if (i < 0 || i >= self->size) { PyErr_SetString(PyExc_IndexError, "mmap index out of range"); return NULL; --- 569,573 ---- { CHECK_VALID(NULL); ! if (i < 0 || (size_t)i >= self->size) { PyErr_SetString(PyExc_IndexError, "mmap index out of range"); return NULL; *************** *** 584,588 **** if (ilow < 0) ilow = 0; ! else if (ilow > self->size) ilow = self->size; if (ihigh < 0) --- 584,588 ---- if (ilow < 0) ilow = 0; ! else if ((size_t)ilow > self->size) ilow = self->size; if (ihigh < 0) *************** *** 590,594 **** if (ihigh < ilow) ihigh = ilow; ! else if (ihigh > self->size) ihigh = self->size; --- 590,594 ---- if (ihigh < ilow) ihigh = ilow; ! else if ((size_t)ihigh > self->size) ihigh = self->size; *************** *** 629,633 **** if (ilow < 0) ilow = 0; ! else if (ilow > self->size) ilow = self->size; if (ihigh < 0) --- 629,633 ---- if (ilow < 0) ilow = 0; ! else if ((size_t)ilow > self->size) ilow = self->size; if (ihigh < 0) *************** *** 635,639 **** if (ihigh < ilow) ihigh = ilow; ! else if (ihigh > self->size) ihigh = self->size; --- 635,639 ---- if (ihigh < ilow) ihigh = ilow; ! else if ((size_t)ihigh > self->size) ihigh = self->size; *************** *** 662,666 **** CHECK_VALID(-1); ! if (i < 0 || i >= self->size) { PyErr_SetString(PyExc_IndexError, "mmap index out of range"); return -1; --- 662,666 ---- CHECK_VALID(-1); ! if (i < 0 || (size_t)i >= self->size) { PyErr_SetString(PyExc_IndexError, "mmap index out of range"); return -1; From python-dev@python.org Sat Jul 1 02:00:38 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 18:00:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include objimpl.h,2.19,2.20 Message-ID: <200007010100.SAA19200@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv19078 Modified Files: objimpl.h Log Message: Neil Schemenauer: small fixes for GC Index: objimpl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/objimpl.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** objimpl.h 2000/06/30 23:58:04 2.19 --- objimpl.h 2000/07/01 01:00:35 2.20 *************** *** 184,187 **** --- 184,189 ---- (typeobj), (n)) ) + #define PyObject_DEL(op) PyObject_FREE(op) + /* This example code implements an object constructor with a custom allocator, where PyObject_New is inlined, and shows the important *************** *** 222,226 **** Py_TPFLAGS_GC and define the type method tp_recurse. You should also add the method tp_clear if your object is mutable. Include ! PyGC_INFO_SIZE in the calculation of tp_basicsize. Call PyObject_GC_Init after the pointers followed by tp_recurse become valid (usually just before returning the object from the allocation --- 224,228 ---- Py_TPFLAGS_GC and define the type method tp_recurse. You should also add the method tp_clear if your object is mutable. Include ! PyGC_HEAD_SIZE in the calculation of tp_basicsize. Call PyObject_GC_Init after the pointers followed by tp_recurse become valid (usually just before returning the object from the allocation *************** *** 235,239 **** #define PyObject_AS_GC(op) (op) #define PyObject_FROM_GC(op) (op) - #define PyObject_DEL(op) PyObject_FREE(op) #else --- 237,240 ---- *************** *** 268,275 **** /* Get the object given the PyGC_Head */ #define PyObject_FROM_GC(g) ((PyObject *)(((PyGC_Head *)g)+1)) - - #define PyObject_DEL(op) PyObject_FREE( PyObject_IS_GC(op) ? \ - (ANY *)PyObject_AS_GC(op) : \ - (ANY *)(op) ) #endif /* WITH_CYCLE_GC */ --- 269,272 ---- From python-dev@python.org Sat Jul 1 02:00:41 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 18:00:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects classobject.c,2.96,2.97 dictobject.c,2.57,2.58 funcobject.c,2.27,2.28 listobject.c,2.78,2.79 object.c,2.78,2.79 tupleobject.c,2.41,2.42 Message-ID: <200007010100.SAA19385@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv19080 Modified Files: classobject.c dictobject.c funcobject.c listobject.c object.c tupleobject.c Log Message: Neil Schemenauer: small fixes for GC Index: classobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/classobject.c,v retrieving revision 2.96 retrieving revision 2.97 diff -C2 -r2.96 -r2.97 *** classobject.c 2000/06/30 23:58:05 2.96 --- classobject.c 2000/07/01 01:00:38 2.97 *************** *** 129,132 **** --- 129,133 ---- Py_XDECREF(op->cl_setattr); Py_XDECREF(op->cl_delattr); + op = (PyClassObject *) PyObject_AS_GC(op); PyObject_DEL(op); } *************** *** 474,477 **** --- 475,479 ---- PyObject_GC_Init(inst); if (inst->in_dict == NULL) { + inst = (PyInstanceObject *) PyObject_AS_GC(inst); PyObject_DEL(inst); return NULL; *************** *** 589,592 **** --- 591,595 ---- Py_DECREF(inst->in_class); Py_XDECREF(inst->in_dict); + inst = (PyInstanceObject *) PyObject_AS_GC(inst); PyObject_DEL(inst); } *************** *** 1764,1767 **** --- 1767,1771 ---- PyMethodObject *im = free_list; free_list = (PyMethodObject *)(im->im_self); + im = (PyMethodObject *) PyObject_AS_GC(im); PyObject_DEL(im); } Index: dictobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/dictobject.c,v retrieving revision 2.57 retrieving revision 2.58 diff -C2 -r2.57 -r2.58 *** dictobject.c 2000/06/30 23:58:05 2.57 --- dictobject.c 2000/07/01 01:00:38 2.58 *************** *** 473,476 **** --- 473,477 ---- if (mp->ma_table != NULL) PyMem_DEL(mp->ma_table); + mp = (dictobject *) PyObject_AS_GC(mp); PyObject_DEL(mp); Py_TRASHCAN_SAFE_END(mp) Index: funcobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/funcobject.c,v retrieving revision 2.27 retrieving revision 2.28 diff -C2 -r2.27 -r2.28 *** funcobject.c 2000/06/30 23:58:05 2.27 --- funcobject.c 2000/07/01 01:00:38 2.28 *************** *** 173,176 **** --- 173,177 ---- Py_XDECREF(op->func_defaults); Py_XDECREF(op->func_doc); + op = (PyFunctionObject *) PyObject_AS_GC(op); PyObject_DEL(op); } Index: listobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v retrieving revision 2.78 retrieving revision 2.79 diff -C2 -r2.78 -r2.79 *** listobject.c 2000/06/30 23:58:05 2.78 --- listobject.c 2000/07/01 01:00:38 2.79 *************** *** 210,213 **** --- 210,214 ---- PyMem_FREE(op->ob_item); } + op = (PyListObject *) PyObject_AS_GC(op); PyObject_DEL(op); Py_TRASHCAN_SAFE_END(op) Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.78 retrieving revision 2.79 diff -C2 -r2.78 -r2.79 *** object.c 2000/06/30 23:58:05 2.78 --- object.c 2000/07/01 01:00:38 2.79 *************** *** 172,183 **** { #ifdef WITH_CYCLE_GC ! if (PyType_IS_GC(op->ob_type)) { ! PyGC_Head *g = PyObject_AS_GC(op); ! PyObject_FREE(g); ! } else ! #endif ! { ! PyObject_FREE(op); } } --- 172,180 ---- { #ifdef WITH_CYCLE_GC ! if (op && PyType_IS_GC(op->ob_type)) { ! op = (PyObject *) PyObject_AS_GC(op); } + #endif + PyObject_FREE(op); } Index: tupleobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/tupleobject.c,v retrieving revision 2.41 retrieving revision 2.42 diff -C2 -r2.41 -r2.42 *** tupleobject.c 2000/06/30 23:58:05 2.41 --- tupleobject.c 2000/07/01 01:00:38 2.42 *************** *** 176,179 **** --- 176,180 ---- #endif } + op = (PyTupleObject *) PyObject_AS_GC(op); PyObject_DEL(op); done: *************** *** 560,563 **** --- 561,565 ---- if (sv == NULL) { PyObject_GC_Init((PyObject *)v); + v = (PyTupleObject *) PyObject_AS_GC(v); PyObject_DEL(v); PyErr_NoMemory(); *************** *** 596,599 **** --- 598,602 ---- q = p; p = (PyTupleObject *)(p->ob_item[0]); + q = (PyTupleObject *) PyObject_AS_GC(q); PyObject_DEL(q); } From python-dev@python.org Sat Jul 1 02:06:58 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 18:06:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python import.c,2.138,2.139 Message-ID: <200007010106.SAA24578@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv24571 Modified Files: import.c Log Message: Jack Jansen, Mac patch: Include stat.h if needed; different Mac filename compare Index: import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.138 retrieving revision 2.139 diff -C2 -r2.138 -r2.139 *** import.c 2000/06/30 23:58:06 2.138 --- import.c 2000/07/01 01:06:56 2.139 *************** *** 40,43 **** --- 40,45 ---- #ifndef DONT_HAVE_SYS_STAT_H #include + #elif defined(HAVE_STAT_H) + #include #endif *************** *** 1130,1135 **** return 0; } ! p2cstr(fss.name); ! if ( strncmp(name, (char *)fss.name, namelen) != 0 ) { PyErr_Format(PyExc_NameError, "Case mismatch for module name %.100s\n(filename %.300s)", --- 1132,1136 ---- return 0; } ! if ( namelen > fss.name[0] || strncmp(name, (char *)fss.name+1, namelen) != 0 ) { PyErr_Format(PyExc_NameError, "Case mismatch for module name %.100s\n(filename %.300s)", From python-dev@python.org Sat Jul 1 02:07:40 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 18:07:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python getargs.c,2.36,2.37 Message-ID: <200007010107.SAA24694@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv24623 Modified Files: getargs.c Log Message: Jack Jansen, Mac patch: Include limits.h if we have it. Index: getargs.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v retrieving revision 2.36 retrieving revision 2.37 diff -C2 -r2.36 -r2.37 *** getargs.c 2000/06/30 23:58:06 2.36 --- getargs.c 2000/07/01 01:07:38 2.37 *************** *** 19,22 **** --- 19,25 ---- #include + #ifdef HAVE_LIMITS_H + #include + #endif From python-dev@python.org Sat Jul 1 02:08:14 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 18:08:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python getmtime.c,2.12,2.13 Message-ID: <200007010108.SAA24720@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv24712 Modified Files: getmtime.c Log Message: Jack Jansen, Mac patch: If we have stat.h include it if we don't have sys/stat.h Index: getmtime.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getmtime.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** getmtime.c 2000/06/30 23:58:06 2.12 --- getmtime.c 2000/07/01 01:08:11 2.13 *************** *** 17,22 **** --- 17,28 ---- #include + #ifndef DONT_HAVE_SYS_TYPES_H #include + #endif + #ifndef DONT_HAVE_SYS_STAT_H #include + #elif defined(HAVE_STAT_H) + #include + #endif time_t From python-dev@python.org Sat Jul 1 02:09:45 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 18:09:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules arraymodule.c,2.45,2.46 Message-ID: <200007010109.SAA24756@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv24747 Modified Files: arraymodule.c Log Message: Jack Jansen, Mac patch: Include limits.h if we have it. Index: arraymodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** arraymodule.c 2000/07/01 00:38:19 2.45 --- arraymodule.c 2000/07/01 01:09:43 2.46 *************** *** 23,26 **** --- 23,29 ---- #endif /* DONT_HAVE_SYS_TYPES_H */ #endif /* !STDC_HEADERS */ + #ifdef HAVE_LIMITS_H + #include + #endif /* HAVE_LIMITS_H */ struct arrayobject; /* Forward */ From python-dev@python.org Sat Jul 1 02:13:33 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 18:13:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_openpty.py,NONE,1.1 Message-ID: <200007010113.SAA24952@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv24946 Added Files: test_openpty.py Log Message: Thomas Wouters: Test script for openpty() --- NEW FILE --- # Test to see if openpty works. (But don't worry if it isn't available.) import os from test_support import verbose, TestFailed try: if verbose: print "Calling os.openpty()" master, slave = os.openpty() if verbose: print "(master, slave) = (%d, %d)"%(master, slave) except AttributeError: raise ImportError, "No openpty() available." ## # Please uncomment these if os.isatty() is added. ## if not os.isatty(master): ## raise TestFailed, "Master-end of pty is not a terminal." ## if not os.isatty(slave): ## raise TestFailed, "Slave-end of pty is not a terminal." os.write(slave, 'Ping!') print os.read(master, 1024) From python-dev@python.org Sat Jul 1 02:41:59 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 30 Jun 2000 18:41:59 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/texinputs copyright.tex,1.6,1.7 Message-ID: <200007010141.SAA26222@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/texinputs In directory slayer.i.sourceforge.net:/tmp/cvs-serv26210/texinputs Modified Files: copyright.tex Log Message: The new copyright / license. Index: copyright.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/copyright.tex,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** copyright.tex 1998/02/11 14:42:06 1.6 --- copyright.tex 2000/07/01 01:41:55 1.7 *************** *** 1,29 **** ! Copyright \copyright{} 1991-1995 by Stichting Mathematisch Centrum, ! Amsterdam, The Netherlands. ! \begin{center} ! All Rights Reserved ! \end{center} ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address \url{ftp://ftp.python.org}. ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. --- 1,37 ---- ! \leftline{Copyright \copyright{} 2000, BeOpen.com.} ! \leftline{Copyright \copyright{} 1995-2000, Corporation for National Research Initiatives.} ! \leftline{Copyright \copyright{} 1990-1995, Stichting Mathematisch Centrum.} ! \leftline{All rights reserved.} ! Redistribution and use in source and binary forms, with or without ! modification, are permitted provided that the following conditions are ! met: ! \begin{itemize} ! \item ! Redistributions of source code must retain the above copyright ! notice, this list of conditions and the following disclaimer. ! \item ! Redistributions in binary form must reproduce the above copyright ! notice, this list of conditions and the following disclaimer in the ! documentation and/or other materials provided with the distribution. ! \item ! Neither names of the copyright holders nor the names of their ! contributors may be used to endorse or promote products derived from ! this software without specific prior written permission. ! \end{itemize} ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ! A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ! HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS ! OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ! ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE ! USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH ! DAMAGE. From python-dev@python.org Sat Jul 1 03:37:40 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 30 Jun 2000 19:37:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile,1.196,1.197 Message-ID: <200007010237.TAA02661@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv2654 Modified Files: Makefile Log Message: Do not build the "longhtml" version for pre-release versions. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.196 retrieving revision 1.197 diff -C2 -r1.196 -r1.197 *** Makefile 2000/06/30 16:06:19 1.196 --- Makefile 2000/07/01 02:37:37 1.197 *************** *** 311,315 **** ziplatex: latex-$(RELEASE).zip ! zips: zippdf zipps ziphtml ziplonghtml bziphtml: html-$(RELEASE).tar.bz2 --- 311,319 ---- ziplatex: latex-$(RELEASE).zip ! # Only build the longhtml version for final releases; use the second ! # version of this for pre-release versions. ! # ! #zips: zippdf zipps ziphtml ziplonghtml ! zips: zippdf zipps ziphtml bziphtml: html-$(RELEASE).tar.bz2 From python-dev@python.org Sat Jul 1 03:51:26 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 30 Jun 2000 19:51:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild readme.txt,1.7,1.8 Message-ID: <200007010251.TAA03264@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv3242/python/dist/src/pcbuild Modified Files: readme.txt Log Message: Repaired two URLs. Index: readme.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/readme.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** readme.txt 2000/07/01 00:03:43 1.7 --- readme.txt 2000/07/01 02:51:23 1.8 *************** *** 31,37 **** SUBPROJECTS ----------- ! These subprojects should build out of the box. Subprojects other than the ! main ones (python20, python, pythonw) generally build a DLL (renamed to ! .pyd) from a specific module so that users don't have to load the code supporting that module unless they import the module. --- 31,37 ---- SUBPROJECTS ----------- ! These subprojects should build out of the box. Subprojects other than the ! main ones (python20, python, pythonw) generally build a DLL (renamed to ! .pyd) from a specific module so that users don't have to load the code supporting that module unless they import the module. *************** *** 66,70 **** _tkinter Python wrapper for the Tk windowing system. Requires tcl831.exe from ! http://dev.scriptics.com/software/tcltk/downloadnow83.tml zlib --- 66,70 ---- _tkinter Python wrapper for the Tk windowing system. Requires tcl831.exe from ! http://dev.scriptics.com/software/tcltk/downloadnow83.html zlib *************** *** 75,80 **** bsddb ! Python wrapper for the BSD database 1.85. Requires bsddbmodule.zip, ! from the bsddb link at http://www.nightmare.com/software.html --- 75,80 ---- bsddb ! Python wrapper for the BSD database 1.85. Requires db.1.85.win32.zip, ! from the "bsd db" link at http://www.nightmare.com/software.html From python-dev@python.org Sat Jul 1 04:13:03 2000 From: python-dev@python.org (Mark Hammond) Date: Fri, 30 Jun 2000 20:13:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild winsound.dsp,1.2,1.3 winreg.dsp,1.4,1.5 unicodedata.dsp,1.2,1.3 python20.dsp,1.3,1.4 mmap.dsp,1.4,1.5 Message-ID: <200007010313.UAA10536@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv10440 Modified Files: winsound.dsp winreg.dsp unicodedata.dsp python20.dsp mmap.dsp Log Message: Update all projects so Debug builds use "/Zi" instead of "/ZI", which means everything should still build under MSVC5 NOTE: All these projects had messed-up line endings (but MSVC didnt mind). Executing a diff with "--ignore-all-space" will show the specific changes, but I made a complete checkin with correct line endiings as it is the correct thing to do! Index: winsound.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/winsound.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** winsound.dsp 2000/04/21 21:43:40 1.2 --- winsound.dsp 2000/07/01 03:12:59 1.3 *************** *** 1,99 **** ! # Microsoft Developer Studio Project File - Name="winsound" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=winsound - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "winsound.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "winsound.mak" CFG="winsound - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "winsound - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "winsound - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "winsound" ! # PROP Scc_LocalPath "..\pc" ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "winsound - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Release" ! # PROP BASE Intermediate_Dir "Release" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\winsound" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0xc09 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib winmm.lib /nologo /base:"0x1D130000" /dll /machine:I386 /out:"./winsound.pyd" /export:initwinsound ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "winsound - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Debug" ! # PROP BASE Intermediate_Dir "Debug" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\winsound" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0xc09 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib winmm.lib /nologo /base:"0x1D130000" /dll /debug /machine:I386 /out:"./winsound_d.pyd" /pdbtype:sept /export:initwinsound ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "winsound - Win32 Release" ! # Name "winsound - Win32 Debug" ! # Begin Source File ! ! SOURCE=..\PC\winsound.c ! # End Source File ! # End Target ! # End Project --- 1,99 ---- ! # Microsoft Developer Studio Project File - Name="winsound" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=winsound - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "winsound.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "winsound.mak" CFG="winsound - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "winsound - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "winsound - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "winsound" ! # PROP Scc_LocalPath "..\pc" ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "winsound - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Release" ! # PROP BASE Intermediate_Dir "Release" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\winsound" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0xc09 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib winmm.lib /nologo /base:"0x1D130000" /dll /machine:I386 /out:"./winsound.pyd" /export:initwinsound ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "winsound - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Debug" ! # PROP BASE Intermediate_Dir "Debug" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\winsound" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0xc09 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib winmm.lib /nologo /base:"0x1D130000" /dll /debug /machine:I386 /out:"./winsound_d.pyd" /pdbtype:sept /export:initwinsound ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "winsound - Win32 Release" ! # Name "winsound - Win32 Debug" ! # Begin Source File ! ! SOURCE=..\PC\winsound.c ! # End Source File ! # End Target ! # End Project Index: winreg.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/winreg.dsp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** winreg.dsp 2000/06/29 16:43:49 1.4 --- winreg.dsp 2000/07/01 03:12:59 1.5 *************** *** 72,76 **** F90=df.exe # ADD BASE CPP /nologo /MTd /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "winreg_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\Include" /I "..\PC" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 --- 72,76 ---- F90=df.exe # ADD BASE CPP /nologo /MTd /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "winreg_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "..\Include" /I "..\PC" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 Index: unicodedata.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/unicodedata.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** unicodedata.dsp 2000/04/21 21:26:07 1.2 --- unicodedata.dsp 2000/07/01 03:12:59 1.3 *************** *** 1,103 **** ! # Microsoft Developer Studio Project File - Name="unicodedata" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=unicodedata - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "unicodedata.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "unicodedata.mak" CFG="unicodedata - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "unicodedata - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "unicodedata - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "unicodedata" ! # PROP Scc_LocalPath ".." ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "unicodedata - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Release" ! # PROP BASE Intermediate_Dir "Release" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\unicodedata" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0xc09 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1D120000" /dll /machine:I386 /out:"./unicodedata.pyd" /export:initunicodedata ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "unicodedata - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Debug" ! # PROP BASE Intermediate_Dir "Debug" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\unicodedata" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0xc09 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1D120000" /dll /debug /machine:I386 /out:"./unicodedata_d.pyd" /pdbtype:sept /export:initunicodedata ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "unicodedata - Win32 Release" ! # Name "unicodedata - Win32 Debug" ! # Begin Source File ! ! SOURCE=..\Modules\unicodedata.c ! # End Source File ! # Begin Source File ! ! SOURCE=..\Modules\unicodedatabase.c ! # End Source File ! # End Target ! # End Project --- 1,103 ---- ! # Microsoft Developer Studio Project File - Name="unicodedata" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=unicodedata - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "unicodedata.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "unicodedata.mak" CFG="unicodedata - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "unicodedata - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "unicodedata - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "unicodedata" ! # PROP Scc_LocalPath ".." ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "unicodedata - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Release" ! # PROP BASE Intermediate_Dir "Release" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\unicodedata" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0xc09 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1D120000" /dll /machine:I386 /out:"./unicodedata.pyd" /export:initunicodedata ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "unicodedata - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Debug" ! # PROP BASE Intermediate_Dir "Debug" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\unicodedata" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0xc09 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1D120000" /dll /debug /machine:I386 /out:"./unicodedata_d.pyd" /pdbtype:sept /export:initunicodedata ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "unicodedata - Win32 Release" ! # Name "unicodedata - Win32 Debug" ! # Begin Source File ! ! SOURCE=..\Modules\unicodedata.c ! # End Source File ! # Begin Source File ! ! SOURCE=..\Modules\unicodedatabase.c ! # End Source File ! # End Target ! # End Project Index: python20.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/python20.dsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** python20.dsp 2000/06/30 20:30:03 1.3 --- python20.dsp 2000/07/01 03:12:59 1.4 *************** *** 1,1689 **** ! # Microsoft Developer Studio Project File - Name="python20" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! # TARGTYPE "Win32 (ALPHA) Dynamic-Link Library" 0x0602 ! ! CFG=python20 - Win32 Alpha Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run [...3350 lines suppressed...] ! !ENDIF ! ! # End Source File ! # Begin Source File ! ! SOURCE=..\Modules\yuvconvert.c ! ! !IF "$(CFG)" == "python20 - Win32 Release" ! ! !ELSEIF "$(CFG)" == "python20 - Win32 Debug" ! ! !ELSEIF "$(CFG)" == "python20 - Win32 Alpha Debug" ! ! !ELSEIF "$(CFG)" == "python20 - Win32 Alpha Release" ! ! !ENDIF ! ! # End Source File ! # End Target ! # End Project Index: mmap.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/mmap.dsp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** mmap.dsp 2000/04/24 14:17:17 1.4 --- mmap.dsp 2000/07/01 03:12:59 1.5 *************** *** 72,76 **** F90=df.exe # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 --- 72,76 ---- F90=df.exe # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 From python-dev@python.org Sat Jul 1 04:14:53 2000 From: python-dev@python.org (Mark Hammond) Date: Fri, 30 Jun 2000 20:14:53 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild ucnhash.dsp,1.1,1.2 Message-ID: <200007010314.UAA10590@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv10580 Modified Files: ucnhash.dsp Log Message: ucnhash now correctly builds for Windows. Index: ucnhash.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/ucnhash.dsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** ucnhash.dsp 2000/06/28 16:40:10 1.1 --- ucnhash.dsp 2000/07/01 03:14:51 1.2 *************** *** 39,48 **** # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "ucnhash___Win32_Release0" ! # PROP Intermediate_Dir "ucnhash___Win32_Release0" # PROP Target_Dir "" F90=df.exe # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 --- 39,49 ---- # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\ucnhash" ! # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" F90=df.exe # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 *************** *** 54,58 **** LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 !ELSEIF "$(CFG)" == "ucnhash - Win32 Debug" --- 55,60 ---- LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 /nologo /dll /machine:I386 /out:"ucnhash.pyd" /export:initucnhash ! # SUBTRACT LINK32 /pdb:none !ELSEIF "$(CFG)" == "ucnhash - Win32 Debug" *************** *** 65,74 **** # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "ucnhash___Win32_Debug0" ! # PROP Intermediate_Dir "ucnhash___Win32_Debug0" # PROP Target_Dir "" F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 --- 67,77 ---- # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\ucnhash" ! # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 *************** *** 80,84 **** LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept !ENDIF --- 83,88 ---- LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 /nologo /dll /debug /machine:I386 /out:"ucnhash_d.pyd" /pdbtype:sept /export:initucnhash ! # SUBTRACT LINK32 /pdb:none !ENDIF *************** *** 88,103 **** # Name "ucnhash - Win32 Release" # Name "ucnhash - Win32 Debug" ! # Begin Group "Source Files" ! # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" ! # End Group ! # Begin Group "Header Files" ! ! # PROP Default_Filter "h;hpp;hxx;hm;inl" ! # End Group ! # Begin Group "Resource Files" ! ! # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" ! # End Group # End Target # End Project --- 92,99 ---- # Name "ucnhash - Win32 Release" # Name "ucnhash - Win32 Debug" ! # Begin Source File ! SOURCE=..\Modules\ucnhash.c ! # End Source File # End Target # End Project From python-dev@python.org Sat Jul 1 04:15:39 2000 From: python-dev@python.org (Mark Hammond) Date: Fri, 30 Jun 2000 20:15:39 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild pcbuild.dsw,1.17,1.18 Message-ID: <200007010315.UAA10620@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv10613 Modified Files: pcbuild.dsw Log Message: Add ucnhash to the workspace, as a dependency of python20. Index: pcbuild.dsw =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/pcbuild.dsw,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** pcbuild.dsw 2000/06/30 14:04:10 1.17 --- pcbuild.dsw 2000/07/01 03:15:37 1.18 *************** *** 166,169 **** --- 166,184 ---- ############################################################################### + Project: "ucnhash"=".\ucnhash.dsp" - Package Owner=<4> + + Package=<5> + {{{ + }}} + + Package=<4> + {{{ + Begin Project Dependency + Project_Dep_Name python20 + End Project Dependency + }}} + + ############################################################################### + Project: "unicodedata"=".\unicodedata.dsp" - Package Owner=<4> *************** *** 237,240 **** ############################################################################### - --- 252,254 ---- From python-dev@python.org Sat Jul 1 04:27:25 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 20:27:25 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild bsddb.dsp,1.10,1.11 Message-ID: <200007010327.UAA11113@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv11092 Modified Files: bsddb.dsp Log Message: Define a magical symbol and magic include path so it will compile without changes to the bsddb source. Index: bsddb.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/bsddb.dsp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** bsddb.dsp 2000/04/21 21:26:07 1.10 --- bsddb.dsp 2000/07/01 03:27:22 1.11 *************** *** 170,174 **** --- 170,180 ---- !IF "$(CFG)" == "bsddb - Win32 Release" + # ADD CPP /I "..\..\bsddb\PORT\win32\include" /I "..\..\bsddb\PORT\include" /D "__DBINTERFACE_PRIVATE" + # SUBTRACT CPP /X /I "..\..\bsddb\port\include" + !ELSEIF "$(CFG)" == "bsddb - Win32 Debug" + + # ADD CPP /I "..\..\bsddb\PORT\win32\include" /I "..\..\bsddb\PORT\include" /D "__DBINTERFACE_PRIVATE" + # SUBTRACT CPP /I "..\..\bsddb\port\include" !ELSEIF "$(CFG)" == "bsddb - Win32 Alpha Debug" From python-dev@python.org Sat Jul 1 04:34:16 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 20:34:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_openpty,NONE,1.1 Message-ID: <200007010334.UAA11441@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv11430 Added Files: test_openpty Log Message: output for openpty test --- NEW FILE --- test_openpty Ping! From python-dev@python.org Sat Jul 1 04:40:15 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 30 Jun 2000 20:40:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.111,1.112 Message-ID: <200007010340.UAA11703@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv11696 Modified Files: socketmodule.c Log Message: Restore strict checking of socket address values; addresses passed to the bind(), connect(), and connect_ex() methods must be a single parameter. Originally part of 1.98, reverted in 1.100. Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.111 retrieving revision 1.112 diff -C2 -r1.111 -r1.112 *** socketmodule.c 2000/06/30 23:58:05 1.111 --- socketmodule.c 2000/07/01 03:40:12 1.112 *************** *** 46,58 **** Socket methods: - (NB: an argument list of the form (sockaddr...) means that multiple - arguments are treated the same as a single tuple argument, for backwards - compatibility. This is deprecated, and will be removed in future versions.) - s.accept() --> new socket object, sockaddr ! - s.bind(sockaddr...) --> None - s.close() --> None ! - s.connect(sockaddr...) --> None ! - s.connect_ex(sockaddr...) --> 0 or errno (handy for e.g. async connect) - s.fileno() --> file descriptor - s.dup() --> same as socket.fromfd(os.dup(s.fileno(), ...) --- 46,55 ---- Socket methods: - s.accept() --> new socket object, sockaddr ! - s.bind(sockaddr) --> None - s.close() --> None ! - s.connect(sockaddr) --> None ! - s.connect_ex(sockaddr) --> 0 or errno (handy for e.g. async connect) - s.fileno() --> file descriptor - s.dup() --> same as socket.fromfd(os.dup(s.fileno(), ...) *************** *** 857,861 **** ! /* s.bind(sockaddr...) method */ static PyObject * --- 854,858 ---- ! /* s.bind(sockaddr) method */ static PyObject * *************** *** 865,869 **** int addrlen; int res; ! if (!getsockaddrarg(s, args, &addr, &addrlen)) return NULL; Py_BEGIN_ALLOW_THREADS --- 862,869 ---- int addrlen; int res; ! PyObject *addro; ! if (!PyArg_ParseTuple(args, "O:bind", &addro)) ! return NULL; ! if (!getsockaddrarg(s, addro, &addr, &addrlen)) return NULL; Py_BEGIN_ALLOW_THREADS *************** *** 908,912 **** ! /* s.connect(sockaddr...) method */ static PyObject * --- 908,912 ---- ! /* s.connect(sockaddr) method */ static PyObject * *************** *** 916,921 **** int addrlen; int res; ! if (!getsockaddrarg(s, args, &addr, &addrlen)) return NULL; Py_BEGIN_ALLOW_THREADS res = connect(s->sock_fd, addr, addrlen); --- 916,924 ---- int addrlen; int res; ! PyObject *addro; ! if (!PyArg_ParseTuple(args, "O:connect", &addro)) return NULL; + if (!getsockaddrarg(s, addro, &addr, &addrlen)) + return NULL; Py_BEGIN_ALLOW_THREADS res = connect(s->sock_fd, addr, addrlen); *************** *** 934,938 **** ! /* s.connect_ex(sockaddr...) method */ static PyObject * --- 937,941 ---- ! /* s.connect_ex(sockaddr) method */ static PyObject * *************** *** 942,946 **** int addrlen; int res; ! if (!getsockaddrarg(s, args, &addr, &addrlen)) return NULL; Py_BEGIN_ALLOW_THREADS --- 945,952 ---- int addrlen; int res; ! PyObject *addro; ! if (!PyArg_ParseTuple(args, "O:connect_ex", &addro)) ! return NULL; ! if (!getsockaddrarg(s, addro, &addr, &addrlen)) return NULL; Py_BEGIN_ALLOW_THREADS *************** *** 1322,1332 **** {"accept", (PyCFunction)PySocketSock_accept, 1, accept_doc}, ! {"bind", (PyCFunction)PySocketSock_bind, 0, bind_doc}, {"close", (PyCFunction)PySocketSock_close, 1, close_doc}, ! {"connect", (PyCFunction)PySocketSock_connect, 0, connect_doc}, ! {"connect_ex", (PyCFunction)PySocketSock_connect_ex, 0, connect_ex_doc}, #ifndef NO_DUP --- 1328,1338 ---- {"accept", (PyCFunction)PySocketSock_accept, 1, accept_doc}, ! {"bind", (PyCFunction)PySocketSock_bind, 1, bind_doc}, {"close", (PyCFunction)PySocketSock_close, 1, close_doc}, ! {"connect", (PyCFunction)PySocketSock_connect, 1, connect_doc}, ! {"connect_ex", (PyCFunction)PySocketSock_connect_ex, 1, connect_ex_doc}, #ifndef NO_DUP From python-dev@python.org Sat Jul 1 04:43:36 2000 From: python-dev@python.org (Mark Hammond) Date: Fri, 30 Jun 2000 20:43:36 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild ucnhash.dsp,1.2,1.3 Message-ID: <200007010343.UAA11847@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv11840 Modified Files: ucnhash.dsp Log Message: The Python include paths were not specified. Index: ucnhash.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/ucnhash.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ucnhash.dsp 2000/07/01 03:14:51 1.2 --- ucnhash.dsp 2000/07/01 03:43:33 1.3 *************** *** 45,49 **** F90=df.exe # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 --- 45,49 ---- F90=df.exe # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 *************** *** 73,77 **** F90=df.exe # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 --- 73,77 ---- F90=df.exe # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 From python-dev@python.org Sat Jul 1 04:46:40 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 20:46:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild readme.txt,1.8,1.9 Message-ID: <200007010346.UAA11960@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv11951 Modified Files: readme.txt Log Message: Add ucnhash (new subproject). Index: readme.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/readme.txt,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** readme.txt 2000/07/01 02:51:23 1.8 --- readme.txt 2000/07/01 03:46:38 1.9 *************** *** 52,56 **** select selectmodule.c ! unicodedata large tables of Unicode data winreg --- 52,56 ---- select selectmodule.c ! ucnhash, unicodedata large tables of Unicode data winreg From python-dev@python.org Sat Jul 1 05:03:35 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 21:03:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild python20.dsp,1.4,1.5 ucnhash.dsp,1.3,1.4 unicodedata.dsp,1.3,1.4 winsound.dsp,1.3,1.4 Message-ID: <200007010403.VAA19090@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv19080 Modified Files: python20.dsp ucnhash.dsp unicodedata.dsp winsound.dsp Log Message: A bunch of project files were checked in as text files. They should all be binary (cvs admin -kv has now been applied). Index: python20.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/python20.dsp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** python20.dsp 2000/07/01 03:12:59 1.4 --- python20.dsp 2000/07/01 04:03:32 1.5 *************** *** 1,1690 **** ! # Microsoft Developer Studio Project File - Name="python20" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! # TARGTYPE "Win32 (ALPHA) Dynamic-Link Library" 0x0602 ! ! CFG=python20 - Win32 Alpha Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run [...3351 lines suppressed...] ! !ENDIF ! ! # End Source File ! # Begin Source File ! ! SOURCE=..\Modules\yuvconvert.c ! ! !IF "$(CFG)" == "python20 - Win32 Release" ! ! !ELSEIF "$(CFG)" == "python20 - Win32 Debug" ! ! !ELSEIF "$(CFG)" == "python20 - Win32 Alpha Debug" ! ! !ELSEIF "$(CFG)" == "python20 - Win32 Alpha Release" ! ! !ENDIF ! ! # End Source File ! # End Target ! # End Project Index: ucnhash.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/ucnhash.dsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** ucnhash.dsp 2000/07/01 03:43:33 1.3 --- ucnhash.dsp 2000/07/01 04:03:32 1.4 *************** *** 1,99 **** ! # Microsoft Developer Studio Project File - Name="ucnhash" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=ucnhash - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "ucnhash.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "ucnhash.mak" CFG="ucnhash - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "ucnhash - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "ucnhash - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "" ! # PROP Scc_LocalPath "" ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "ucnhash - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "ucnhash___Win32_Release0" ! # PROP BASE Intermediate_Dir "ucnhash___Win32_Release0" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\ucnhash" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0x409 /d "NDEBUG" ! # ADD RSC /l 0x409 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 /nologo /dll /machine:I386 /out:"ucnhash.pyd" /export:initucnhash ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "ucnhash - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "ucnhash___Win32_Debug0" ! # PROP BASE Intermediate_Dir "ucnhash___Win32_Debug0" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\ucnhash" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0x409 /d "_DEBUG" ! # ADD RSC /l 0x409 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 /nologo /dll /debug /machine:I386 /out:"ucnhash_d.pyd" /pdbtype:sept /export:initucnhash ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "ucnhash - Win32 Release" ! # Name "ucnhash - Win32 Debug" ! # Begin Source File ! ! SOURCE=..\Modules\ucnhash.c ! # End Source File ! # End Target ! # End Project --- 1,99 ---- ! # Microsoft Developer Studio Project File - Name="ucnhash" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=ucnhash - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "ucnhash.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "ucnhash.mak" CFG="ucnhash - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "ucnhash - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "ucnhash - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "" ! # PROP Scc_LocalPath "" ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "ucnhash - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "ucnhash___Win32_Release0" ! # PROP BASE Intermediate_Dir "ucnhash___Win32_Release0" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\ucnhash" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0x409 /d "NDEBUG" ! # ADD RSC /l 0x409 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 /nologo /dll /machine:I386 /out:"ucnhash.pyd" /export:initucnhash ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "ucnhash - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "ucnhash___Win32_Debug0" ! # PROP BASE Intermediate_Dir "ucnhash___Win32_Debug0" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\ucnhash" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0x409 /d "_DEBUG" ! # ADD RSC /l 0x409 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 /nologo /dll /debug /machine:I386 /out:"ucnhash_d.pyd" /pdbtype:sept /export:initucnhash ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "ucnhash - Win32 Release" ! # Name "ucnhash - Win32 Debug" ! # Begin Source File ! ! SOURCE=..\Modules\ucnhash.c ! # End Source File ! # End Target ! # End Project Index: unicodedata.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/unicodedata.dsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** unicodedata.dsp 2000/07/01 03:12:59 1.3 --- unicodedata.dsp 2000/07/01 04:03:32 1.4 *************** *** 1,103 **** ! # Microsoft Developer Studio Project File - Name="unicodedata" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=unicodedata - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "unicodedata.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "unicodedata.mak" CFG="unicodedata - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "unicodedata - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "unicodedata - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "unicodedata" ! # PROP Scc_LocalPath ".." ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "unicodedata - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Release" ! # PROP BASE Intermediate_Dir "Release" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\unicodedata" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0xc09 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1D120000" /dll /machine:I386 /out:"./unicodedata.pyd" /export:initunicodedata ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "unicodedata - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Debug" ! # PROP BASE Intermediate_Dir "Debug" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\unicodedata" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0xc09 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1D120000" /dll /debug /machine:I386 /out:"./unicodedata_d.pyd" /pdbtype:sept /export:initunicodedata ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "unicodedata - Win32 Release" ! # Name "unicodedata - Win32 Debug" ! # Begin Source File ! ! SOURCE=..\Modules\unicodedata.c ! # End Source File ! # Begin Source File ! ! SOURCE=..\Modules\unicodedatabase.c ! # End Source File ! # End Target ! # End Project --- 1,103 ---- ! # Microsoft Developer Studio Project File - Name="unicodedata" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=unicodedata - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "unicodedata.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "unicodedata.mak" CFG="unicodedata - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "unicodedata - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "unicodedata - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "unicodedata" ! # PROP Scc_LocalPath ".." ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "unicodedata - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Release" ! # PROP BASE Intermediate_Dir "Release" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\unicodedata" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0xc09 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1D120000" /dll /machine:I386 /out:"./unicodedata.pyd" /export:initunicodedata ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "unicodedata - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Debug" ! # PROP BASE Intermediate_Dir "Debug" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\unicodedata" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0xc09 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1D120000" /dll /debug /machine:I386 /out:"./unicodedata_d.pyd" /pdbtype:sept /export:initunicodedata ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "unicodedata - Win32 Release" ! # Name "unicodedata - Win32 Debug" ! # Begin Source File ! ! SOURCE=..\Modules\unicodedata.c ! # End Source File ! # Begin Source File ! ! SOURCE=..\Modules\unicodedatabase.c ! # End Source File ! # End Target ! # End Project Index: winsound.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/winsound.dsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** winsound.dsp 2000/07/01 03:12:59 1.3 --- winsound.dsp 2000/07/01 04:03:32 1.4 *************** *** 1,99 **** ! # Microsoft Developer Studio Project File - Name="winsound" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=winsound - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "winsound.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "winsound.mak" CFG="winsound - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "winsound - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "winsound - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "winsound" ! # PROP Scc_LocalPath "..\pc" ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "winsound - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Release" ! # PROP BASE Intermediate_Dir "Release" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\winsound" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0xc09 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib winmm.lib /nologo /base:"0x1D130000" /dll /machine:I386 /out:"./winsound.pyd" /export:initwinsound ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "winsound - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Debug" ! # PROP BASE Intermediate_Dir "Debug" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\winsound" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0xc09 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib winmm.lib /nologo /base:"0x1D130000" /dll /debug /machine:I386 /out:"./winsound_d.pyd" /pdbtype:sept /export:initwinsound ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "winsound - Win32 Release" ! # Name "winsound - Win32 Debug" ! # Begin Source File ! ! SOURCE=..\PC\winsound.c ! # End Source File ! # End Target ! # End Project --- 1,99 ---- ! # Microsoft Developer Studio Project File - Name="winsound" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=winsound - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "winsound.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "winsound.mak" CFG="winsound - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "winsound - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "winsound - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "winsound" ! # PROP Scc_LocalPath "..\pc" ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "winsound - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Release" ! # PROP BASE Intermediate_Dir "Release" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\winsound" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0xc09 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib winmm.lib /nologo /base:"0x1D130000" /dll /machine:I386 /out:"./winsound.pyd" /export:initwinsound ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "winsound - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Debug" ! # PROP BASE Intermediate_Dir "Debug" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\winsound" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0xc09 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib winmm.lib /nologo /base:"0x1D130000" /dll /debug /machine:I386 /out:"./winsound_d.pyd" /pdbtype:sept /export:initwinsound ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "winsound - Win32 Release" ! # Name "winsound - Win32 Debug" ! # Begin Source File ! ! SOURCE=..\PC\winsound.c ! # End Source File ! # End Target ! # End Project From python-dev@python.org Sat Jul 1 05:23:50 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 21:23:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/dos-8x3 sre_comp.py,1.3,1.4 sre_pars.py,1.3,1.4 Message-ID: <200007010423.VAA19770@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/dos-8x3 In directory slayer.i.sourceforge.net:/tmp/cvs-serv19761 Modified Files: sre_comp.py sre_pars.py Log Message: the usual Index: sre_comp.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/sre_comp.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** sre_comp.py 2000/06/30 16:13:37 1.3 --- sre_comp.py 2000/07/01 04:23:47 1.4 *************** *** 40,44 **** else: emit(OPCODES[op]) ! fixup = lambda x: x skip = len(code); emit(0) for op, av in av: --- 40,44 ---- else: emit(OPCODES[op]) ! fixup = lambda x: x skip = len(code); emit(0) for op, av in av: *************** *** 119,123 **** emit(OPCODES[op]) if flags & SRE_FLAG_MULTILINE: ! emit(ATCODES[AT_MULTILINE[av]]) else: emit(ATCODES[av]) --- 119,123 ---- emit(OPCODES[op]) if flags & SRE_FLAG_MULTILINE: ! emit(ATCODES[AT_MULTILINE.get(av, av)]) else: emit(ATCODES[av]) *************** *** 204,208 **** import sre_parse pattern = p ! p = sre_parse.parse(p) else: pattern = None --- 204,208 ---- import sre_parse pattern = p ! p = sre_parse.parse(p, flags) else: pattern = None Index: sre_pars.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/sre_pars.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** sre_pars.py 2000/06/30 16:13:37 1.3 --- sre_pars.py 2000/07/01 04:23:47 1.4 *************** *** 20,25 **** MAXREPEAT = 32767 ! # FIXME: same here ! CHARMASK = 0x7fff SPECIAL_CHARS = ".\\[{()*+?^$|" --- 20,26 ---- MAXREPEAT = 32767 ! # FIXME: might change in 2.0 final. but for now, this seems ! # to be the best way to be compatible with 1.5.2 ! CHARMASK = 0xff SPECIAL_CHARS = ".\\[{()*+?^$|" *************** *** 31,35 **** HEXDIGITS = tuple("0123456789abcdefABCDEF") ! WHITESPACE = string.whitespace ESCAPES = { --- 32,36 ---- HEXDIGITS = tuple("0123456789abcdefABCDEF") ! WHITESPACE = tuple(string.whitespace) ESCAPES = { *************** *** 296,300 **** return subpattern ! def _parse(source, state, flags=0): # parse regular expression pattern into an operator list. --- 297,301 ---- return subpattern ! def _parse(source, state): # parse regular expression pattern into an operator list. *************** *** 468,472 **** b = [] while 1: ! p = _parse(source, state, flags) if source.next == ")": if b: --- 469,473 ---- b = [] while 1: ! p = _parse(source, state) if source.next == ")": if b: *************** *** 495,499 **** group = state.getgroup(name) while 1: ! p = _parse(source, state, flags) if source.match(")"): if b: --- 496,500 ---- group = state.getgroup(name) while 1: ! p = _parse(source, state) if source.match(")"): if b: *************** *** 532,538 **** source = Tokenizer(pattern) state = State() b = [] while 1: ! p = _parse(source, state, flags) tail = source.get() if tail == "|": --- 533,540 ---- source = Tokenizer(pattern) state = State() + state.flags = flags b = [] while 1: ! p = _parse(source, state) tail = source.get() if tail == "|": *************** *** 617,623 **** sep = match.string[:0] if type(sep) is type(""): ! char = chr else: ! char = unichr for c, s in template: if c is LITERAL: --- 619,625 ---- sep = match.string[:0] if type(sep) is type(""): ! char = chr else: ! char = unichr for c, s in template: if c is LITERAL: From python-dev@python.org Sat Jul 1 05:45:55 2000 From: python-dev@python.org (Barry Warsaw) Date: Fri, 30 Jun 2000 21:45:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python exceptions.c,1.3,1.4 Message-ID: <200007010445.VAA20645@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv20637 Modified Files: exceptions.c Log Message: init_exceptions(): Decref `doc' so it doesn't leak. Index: exceptions.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** exceptions.c 2000/06/30 04:59:59 1.3 --- exceptions.c 2000/07/01 04:45:52 1.4 *************** *** 910,913 **** --- 910,914 ---- PyDict_SetItemString(mydict, "__doc__", doc); + Py_DECREF(doc); if (PyErr_Occurred()) Py_FatalError("exceptions bootstrapping error."); From python-dev@python.org Sat Jul 1 05:58:50 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 30 Jun 2000 21:58:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/dom minidom.py,1.1,1.2 pulldom.py,1.1,1.2 Message-ID: <200007010458.VAA21265@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv21246/dom Modified Files: minidom.py pulldom.py Log Message: Reference cycle fixes Index: minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/minidom.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** minidom.py 2000/06/29 19:39:57 1.1 --- minidom.py 2000/07/01 04:58:47 1.2 *************** *** 30,38 **** NOTATION_NODE = 12 ! allnodes=[] def __init__( self ): self.childNodes=[] ! Node.allnodes.append( repr( id( self ))+repr( self.__class__ )) def __getattr__( self, key ): --- 30,46 ---- NOTATION_NODE = 12 ! allnodes={} ! _debug=0 ! _makeParentNodes=1 ! debug=None def __init__( self ): self.childNodes=[] ! if Node._debug: ! index=repr( id( self ))+repr( self.__class__ ) ! Node.allnodes[index]=repr( self.__dict__ ) ! if Node.debug==None: ! Node.debug=open( "debug4.out", "w" ) ! Node.debug.write( "create %s\n"%index ) def __getattr__( self, key ): *************** *** 73,82 **** --- 81,117 ---- else: return 0 + def _get_firstChild( self ): + return self.childNodes[0] + + def _get_lastChild( self ): + return self.childNodes[-1] + def insertBefore( self, newChild, refChild): index=self.childNodes.index( refChild ) self.childNodes.insert( index, newChild ) + if self._makeParentNodes: + newChild.parentNode=self def appendChild( self, node ): self.childNodes.append( node ) + return node + + def replaceChild( self, newChild, oldChild ): + index=self.childNodes.index( oldChild ) + self.childNodes[index]=oldChild + + def removeChild( self, oldChild ): + index=self.childNodes.index( oldChild ) + del self.childNodes[index] + + def cloneNode( self, deep ): + import new + clone=new.instance( self.__class__, self.__dict__ ) + clone.attributes=self.attributes.copy() + if not deep: + clone.childNodes=[] + else: + clone.childNodes=map( lambda x: x.cloneNode, self.childNodes ) + return clone def unlink( self ): *************** *** 87,95 **** self.childNodes=None if self.attributes: ! for attr in self.attributes.values(): ! attr.unlink() ! self.attributes=None ! index=Node.allnodes.index( repr( id( self ))+repr( self.__class__ )) ! del Node.allnodes[index] def _write_data( writer, data): --- 122,133 ---- self.childNodes=None if self.attributes: ! for attr in self._attrs.values(): ! self.removeAttributeNode( attr ) ! assert not len( self._attrs ) ! assert not len( self._attrsNS ) ! if Node._debug: ! index=repr( id( self ))+repr( self.__class__ ) ! self.debug.write( "Deleting: %s\n" % index ) ! del Node.allnodes[index] def _write_data( writer, data): *************** *** 101,109 **** writer.write(data) - def _closeElement( element ): - del element.parentNode - for node in element.elements: - _closeElement( node ) - def _getElementsByTagNameHelper( parent, name, rc ): for node in parent.childNodes: --- 139,142 ---- *************** *** 124,138 **** class Attr(Node): nodeType=Node.ATTRIBUTE_NODE ! def __init__( self, qName, namespaceURI="", prefix="", ! localName=None ): ! Node.__init__( self ) ! assert qName # skip setattr for performance - self.__dict__["nodeName"] = self.__dict__["name"] = qName self.__dict__["localName"]=localName or qName ! self.__dict__["prefix"]=prefix self.__dict__["namespaceURI"]=namespaceURI ! # nodeValue and value are set elsewhere self.attributes=None def __setattr__( self, name, value ): --- 157,170 ---- class Attr(Node): nodeType=Node.ATTRIBUTE_NODE ! def __init__( self, qName, namespaceURI="", localName=None, ! prefix=None ): # skip setattr for performance self.__dict__["localName"]=localName or qName ! self.__dict__["nodeName"] = self.__dict__["name"] = qName self.__dict__["namespaceURI"]=namespaceURI ! self.__dict__["prefix"]=prefix self.attributes=None + Node.__init__( self ) + # nodeValue and value are set elsewhere def __setattr__( self, name, value ): *************** *** 143,152 **** class AttributeList: ! # the attribute list is a transient interface to the underlying dictionaries ! # mutations here will change the underlying element's dictionary def __init__( self, attrs, attrsNS ): ! self.__attrs=attrs ! self.__attrsNS=attrs ! self.length=len( self.__attrs.keys() ) def item( self, index ): --- 175,185 ---- class AttributeList: ! """the attribute list is a transient interface to the underlying ! dictionaries. mutations here will change the underlying element's ! dictionary""" def __init__( self, attrs, attrsNS ): ! self._attrs=attrs ! self._attrsNS=attrsNS ! self.length=len( self._attrs.keys() ) def item( self, index ): *************** *** 158,175 **** def items( self ): return map( lambda node: (node.tagName, node.value), ! self.__attrs.values() ) def itemsNS( self ): return map( lambda node: ((node.URI, node.localName), node.value), ! self.__attrs.values() ) def keys( self ): ! return self.__attrs.keys() def keysNS( self ): ! return self.__attrsNS.keys() def values( self ): ! return self.__attrs.values() def __len__( self ): --- 191,208 ---- def items( self ): return map( lambda node: (node.tagName, node.value), ! self._attrs.values() ) def itemsNS( self ): return map( lambda node: ((node.URI, node.localName), node.value), ! self._attrs.values() ) def keys( self ): ! return self._attrs.keys() def keysNS( self ): ! return self._attrsNS.keys() def values( self ): ! return self._attrs.values() def __len__( self ): *************** *** 177,181 **** def __cmp__( self, other ): ! if self.__attrs is other.__attrs: return 0 else: --- 210,214 ---- def __cmp__( self, other ): ! if self._attrs is getattr( other, "_attrs", None ): return 0 else: *************** *** 184,195 **** #FIXME: is it appropriate to return .value? def __getitem__( self, attname_or_tuple ): ! if type( attname_or_tuple ) == type( (1,2) ): ! return self.__attrsNS[attname_or_tuple].value else: ! return self.__attrs[attname_or_tuple].value def __setitem__( self, attname ): raise TypeError, "object does not support item assignment" ! class Element( Node ): nodeType=Node.ELEMENT_NODE --- 217,234 ---- #FIXME: is it appropriate to return .value? def __getitem__( self, attname_or_tuple ): ! if type( attname_or_tuple ) == type( () ): ! return self._attrsNS[attname_or_tuple] else: ! return self._attrs[attname_or_tuple] def __setitem__( self, attname ): raise TypeError, "object does not support item assignment" ! ! def __delitem__( self, attname_or_tuple ): ! node=self[attname_or_tuple] ! node.unlink() ! del self._attrs[node.name] ! del self._attrsNS[(node.namespaceURI, node.localName)] ! class Element( Node ): nodeType=Node.ELEMENT_NODE *************** *** 203,208 **** self.nodeValue=None ! self.__attrs={} # attributes are double-indexed: ! self.__attrsNS={}# tagName -> Attribute # URI,localName -> Attribute # in the future: consider lazy generation of attribute objects --- 242,247 ---- self.nodeValue=None ! self._attrs={} # attributes are double-indexed: ! self._attrsNS={}# tagName -> Attribute # URI,localName -> Attribute # in the future: consider lazy generation of attribute objects *************** *** 211,218 **** def getAttribute( self, attname ): ! return self.__attrs[attname].value def getAttributeNS( self, namespaceURI, localName ): ! return self.__attrsNS[(namespaceURI, localName)].value def setAttribute( self, attname, value ): --- 250,257 ---- def getAttribute( self, attname ): ! return self._attrs[attname].value def getAttributeNS( self, namespaceURI, localName ): ! return self._attrsNS[(namespaceURI, localName)].value def setAttribute( self, attname, value ): *************** *** 223,246 **** def setAttributeNS( self, namespaceURI, qualifiedName, value ): ! attr=createAttributeNS( namespaceURI, qualifiedName ) # for performance attr.__dict__["value"]=attr.__dict__["nodeValue"]=value self.setAttributeNode( attr ) def setAttributeNode( self, attr ): ! self.__attrs[attr.name]=attr ! self.__attrsNS[(attr.namespaceURI,attr.localName)]=attr def removeAttribute( self, name ): ! attr = self.__attrs[name] self.removeAttributeNode( attr ) def removeAttributeNS( self, namespaceURI, localName ): ! attr = self.__attrsNS[(uri, localName)] self.removeAttributeNode( attr ) def removeAttributeNode( self, node ): ! del self.__attrs[node.name] ! del self.__attrsNS[(node.namespaceURI, node.localName)] def getElementsByTagName( self, name ): --- 262,296 ---- def setAttributeNS( self, namespaceURI, qualifiedName, value ): ! prefix,localname=_nssplit( qualifiedName ) # for performance + attr = Attr( qualifiedName, namespaceURI, localname, prefix ) attr.__dict__["value"]=attr.__dict__["nodeValue"]=value self.setAttributeNode( attr ) + def getAttributeNode( self, attrname ): + return self._attrs.get( attrname ) + + def getAttributeNodeNS( self, namespaceURI, localName ): + return self._attrsNS[(namespaceURI, localName)] + def setAttributeNode( self, attr ): ! old=self._attrs.get( attr.name, None) ! if old: ! old.unlink() ! self._attrs[attr.name]=attr ! self._attrsNS[(attr.namespaceURI,attr.localName)]=attr def removeAttribute( self, name ): ! attr = self._attrs[name] self.removeAttributeNode( attr ) def removeAttributeNS( self, namespaceURI, localName ): ! attr = self._attrsNS[(namespaceURI, localName)] self.removeAttributeNode( attr ) def removeAttributeNode( self, node ): ! node.unlink() ! del self._attrs[node.name] ! del self._attrsNS[(node.namespaceURI, node.localName)] def getElementsByTagName( self, name ): *************** *** 272,276 **** def _get_attributes( self ): ! return AttributeList( self.__attrs, self.__attrsNS ) class Comment( Node ): --- 322,326 ---- def _get_attributes( self ): ! return AttributeList( self._attrs, self._attrsNS ) class Comment( Node ): *************** *** 314,326 **** _write_data( writer, self.data ) class Document( Node ): nodeType=Node.DOCUMENT_NODE def __init__( self ): Node.__init__( self ) - self.documentElement=None self.attributes=None self.nodeName="#document" self.nodeValue=None createElement=Element --- 364,391 ---- _write_data( writer, self.data ) + def _nssplit( qualifiedName ): + fields = string.split(qualifiedName, ':') + if len(fields) == 2: + return fields + elif len(fields) == 1: + return( '', fields[0] ) + class Document( Node ): nodeType=Node.DOCUMENT_NODE + documentElement=None def __init__( self ): Node.__init__( self ) self.attributes=None self.nodeName="#document" self.nodeValue=None + def appendChild( self, node ): + if node.nodeType==Node.ELEMENT_NODE and self.documentElement: + raise TypeError, "Two document elements disallowed" + else: + self.documentElement=node + Node.appendChild( self, node ) + return node + createElement=Element *************** *** 334,362 **** def createElementNS(self, namespaceURI, qualifiedName): ! fields = string.split(qualifiedName, ':') ! if len(fields) == 2: ! prefix = fields[0] ! localName = fields[1] ! elif len(fields) == 1: ! prefix = '' ! localName = fields[0] ! return Element(self, qualifiedName, namespaceURI, prefix, localName) def createAttributeNS(self, namespaceURI, qualifiedName): ! fields = string.split(qualifiedName,':') ! if len(fields) == 2: ! localName = fields[1] ! prefix = fields[0] ! elif len(fields) == 1: ! localName = fields[0] ! prefix = None ! return Attr(qualifiedName, namespaceURI, prefix, localName) def getElementsByTagNameNS(self,namespaceURI,localName): _getElementsByTagNameNSHelper( self, namespaceURI, localName ) - - def close( self ): - for node in self.elements: - _closeElement( node ) def unlink( self ): --- 399,411 ---- def createElementNS(self, namespaceURI, qualifiedName): ! prefix,localName=_nssplit( qualifiedName ) ! return Element(qualifiedName, namespaceURI, prefix, localName) def createAttributeNS(self, namespaceURI, qualifiedName): ! prefix,localName=_nssplit( qualifiedName ) ! return Attr(namespaceURI, qualifiedName, localName, prefix) def getElementsByTagNameNS(self,namespaceURI,localName): _getElementsByTagNameNSHelper( self, namespaceURI, localName ) def unlink( self ): Index: pulldom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/pulldom.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pulldom.py 2000/06/29 19:39:57 1.1 --- pulldom.py 2000/07/01 04:58:47 1.2 *************** *** 3,7 **** import string import sys - import pyexpat from xml.sax import ExpatParser --- 3,6 ---- *************** *** 141,150 **** if token !=END_ELEMENT: ! cur_node.parentNode.childNodes.append( cur_node ) event=self.getEvent() - if node.nodeType==minidom.Node.DOCUMENT_NODE: - for child in node.childNodes: - if child.nodeType==minidom.Node.ELEMENT_NODE: - node.documentElement=child def getEvent( self ): --- 140,145 ---- if token !=END_ELEMENT: ! cur_node.parentNode.appendChild( cur_node ) event=self.getEvent() def getEvent( self ): *************** *** 194,267 **** bufsize=len( string ) ! stringio( string ) parser=_getParser() return DOMEventStream( buf, parser, bufsize ) - #FIXME: Use Lars' instead!!! - class SAX_expat: - "SAX driver for the Pyexpat C module." - - def __init__(self): - self.parser=pyexpat.ParserCreate() - self.started=0 - - def setDocumentHandler( self, handler ): - self.parser.StartElementHandler = handler.startElement - self.parser.EndElementHandler = handler.endElement - self.parser.CharacterDataHandler = handler.datachars - self.parser.ProcessingInstructionHandler = handler.processingInstruction - self.doc_handler=handler - - def setErrorHandler( self, handler ): - self.err_handler=handler - - # --- Locator methods. Only usable after errors. - - def getLineNumber(self): - return self.parser.ErrorLineNumber - - def getColumnNumber(self): - return self.parser.ErrorColumnNumber - - # --- Internal - - def __report_error(self): - msg=pyexpat.ErrorString(self.parser.ErrorCode) - self.err_handler.fatalError(msg) - - # --- EXPERIMENTAL PYTHON SAX EXTENSIONS - - def get_parser_name(self): - return "pyexpat" - - def get_parser_version(self): - return "Unknown" - - def get_driver_version(self): - return version - - def is_validating(self): - return 0 - - def is_dtd_reading(self): - return 0 - - def reset(self): - self.parser=pyexpat.ParserCreate() - self.parser.StartElementHandler = self.startElement - self.parser.EndElementHandler = self.endElement - self.parser.CharacterDataHandler = self.characters - self.parser.ProcessingInstructionHandler = self.processingInstruction - - def feed(self,data): - if not self.started: - self.doc_handler.startDocument() - self.started=1 - if not self.parser.Parse(data): - self.__report_error() - - def close(self): - if not self.parser.Parse("",1): - self.__report_error() - self.doc_handler.endDocument() - self.parser = None --- 189,194 ---- bufsize=len( string ) ! buf=stringio( string ) parser=_getParser() return DOMEventStream( buf, parser, bufsize ) From python-dev@python.org Sat Jul 1 05:58:50 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 30 Jun 2000 21:58:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml __init__.py,1.1,1.2 Message-ID: <200007010458.VAA21264@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml In directory slayer.i.sourceforge.net:/tmp/cvs-serv21246 Modified Files: __init__.py Log Message: Reference cycle fixes Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/__init__.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** __init__.py 2000/06/29 19:25:53 1.1 --- __init__.py 2000/07/01 04:58:46 1.2 *************** *** 9,13 **** sax -- The Simple API for XML, developed by XML-Dev, led by David ! Megginson. This supports the SAX 2 API. ! """ --- 9,13 ---- sax -- The Simple API for XML, developed by XML-Dev, led by David ! Megginson and ported to Python by Lars Marius Garsholm. This ! supports the SAX 2 API. """ From python-dev@python.org Sat Jul 1 05:58:50 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 30 Jun 2000 21:58:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax __init__.py,1.1,1.2 Message-ID: <200007010458.VAA21266@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv21246/sax Modified Files: __init__.py Log Message: Reference cycle fixes Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/__init__.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** __init__.py 2000/06/29 19:33:43 1.1 --- __init__.py 2000/07/01 04:58:47 1.2 *************** *** 24,25 **** --- 24,49 ---- from _exceptions import SAXParseException import xmlreader + + def parse( filename_or_stream, handler, errorHandler=ErrorHandler() ): + parser=ExpatParser() + parser.setContentHandler( handler ) + parse.setErrorHandler( errorHandler ) + parser.parse( filename_or_stream ) + + # this may not work yet...Expat doesn't handle buffer inputs + def parseString( string, handler, errorHandler=ErrorHandler() ): + try: + import cStringIO + stringio=cStringIO.StringIO + except ImportError: + import StringIO + stringio=StringIO.StringIO + + bufsize=len( string ) + buf=stringio( string ) + + parser=ExpatParser() + parser.setContentHandler( handler ) + parse.setErrorHandler( errorHandler ) + parser.parse( buf ) + From python-dev@python.org Sat Jul 1 07:26:48 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 30 Jun 2000 23:26:48 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools/sgmlconv conversion.xml,1.7,1.8 Message-ID: <200007010626.XAA05011@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools/sgmlconv In directory slayer.i.sourceforge.net:/tmp/cvs-serv5002 Modified Files: conversion.xml Log Message: Martin von Loewis : Correct typo that caused a well-formedness failure. Index: conversion.xml =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/sgmlconv/conversion.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** conversion.xml 2000/01/20 22:51:14 1.7 --- conversion.xml 2000/07/01 06:26:44 1.8 *************** *** 609,613 **** ! ABC --- 609,613 ---- ! ABC From python-dev@python.org Sat Jul 1 07:36:53 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 30 Jun 2000 23:36:53 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib ntpath.py,1.23,1.24 Message-ID: <200007010636.XAA05365@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv5358/Lib Modified Files: ntpath.py Log Message: Fix bug #345 reported by David Bolen : getatime() returned the mtime instead of the atime. Similar to an old bug in posixpath.py. Index: ntpath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ntpath.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** ntpath.py 2000/02/17 17:30:40 1.23 --- ntpath.py 2000/07/01 06:36:51 1.24 *************** *** 184,188 **** """Return the last access time of a file, reported by os.stat()""" st = os.stat(filename) ! return st[stat.ST_MTIME] --- 184,188 ---- """Return the last access time of a file, reported by os.stat()""" st = os.stat(filename) ! return st[stat.ST_ATIME] From python-dev@python.org Sat Jul 1 08:03:32 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 1 Jul 2000 00:03:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib urllib.py,1.95,1.96 Message-ID: <200007010703.AAA12554@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv12547/Lib Modified Files: urllib.py Log Message: Fix bug #314, reported by Craig Allen : splittype(): Always lower-case the URL scheme; these are supposed to be normalized according to RFC 1738 anyway. Index: urllib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/urllib.py,v retrieving revision 1.95 retrieving revision 1.96 diff -C2 -r1.95 -r1.96 *** urllib.py 2000/06/10 01:41:48 1.95 --- urllib.py 2000/07/01 07:03:30 1.96 *************** *** 849,853 **** if match: scheme = match.group(1) ! return scheme, url[len(scheme) + 1:] return None, url --- 849,853 ---- if match: scheme = match.group(1) ! return scheme.lower(), url[len(scheme) + 1:] return None, url From python-dev@python.org Sat Jul 1 11:52:30 2000 From: python-dev@python.org (Guido van Rossum) Date: Sat, 1 Jul 2000 03:52:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib macpath.py,1.21,1.22 Message-ID: <200007011052.DAA20595@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv20572 Modified Files: macpath.py Log Message: getatime() returned the mtime instead of the atime. Similar to an old bug in ntpath.py. Index: macpath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/macpath.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** macpath.py 2000/02/04 15:10:33 1.21 --- macpath.py 2000/07/01 10:52:26 1.22 *************** *** 115,119 **** """Return the last access time of a file, reported by os.stat().""" st = os.stat(filename) ! return st[ST_MTIME] --- 115,119 ---- """Return the last access time of a file, reported by os.stat().""" st = os.stat(filename) ! return st[ST_ATIME] From python-dev@python.org Sat Jul 1 11:52:52 2000 From: python-dev@python.org (Guido van Rossum) Date: Sat, 1 Jul 2000 03:52:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib dospath.py,1.12,1.13 Message-ID: <200007011052.DAA20668@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv20661 Modified Files: dospath.py Log Message: getatime() returned the mtime instead of the atime. Similar to an old bug in ntpath.py. Index: dospath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dospath.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** dospath.py 2000/02/04 15:39:29 1.12 --- dospath.py 2000/07/01 10:52:49 1.13 *************** *** 132,136 **** """Return the last access time of a file, reported by os.stat().""" st = os.stat(filename) ! return st[stat.ST_MTIME] --- 132,136 ---- """Return the last access time of a file, reported by os.stat().""" st = os.stat(filename) ! return st[stat.ST_ATIME] From python-dev@python.org Sat Jul 1 14:44:07 2000 From: python-dev@python.org (Paul Prescod) Date: Sat, 1 Jul 2000 06:44:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax __init__.py,1.2,1.3 Message-ID: <200007011344.GAA21526@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv21514 Modified Files: __init__.py Log Message: Tightened xml.sax.__init__.py Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/__init__.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** __init__.py 2000/07/01 04:58:47 1.2 --- __init__.py 2000/07/01 13:44:04 1.3 *************** *** 18,27 **** """ ! from handler import * ! from expatreader import * ! from _exceptions import * ! from saxutils import * ! from _exceptions import SAXParseException import xmlreader def parse( filename_or_stream, handler, errorHandler=ErrorHandler() ): --- 18,27 ---- """ ! from handler import ContentHandler, ErrorHandler ! from expatreader import ExpatParser ! from _exceptions import SAXException, SAXNotRecognizedException, \ ! SAXParseException, SAXNotSupportedException import xmlreader + import saxutils def parse( filename_or_stream, handler, errorHandler=ErrorHandler() ): From python-dev@python.org Sat Jul 1 15:31:12 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 1 Jul 2000 07:31:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects object.c,2.79,2.80 Message-ID: <200007011431.HAA30328@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv30087/Objects Modified Files: object.c Log Message: changed repr and str to always convert unicode strings to 8-bit strings, using the default encoding. Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.79 retrieving revision 2.80 diff -C2 -r2.79 -r2.80 *** object.c 2000/07/01 01:00:38 2.79 --- object.c 2000/07/01 14:31:09 2.80 *************** *** 266,269 **** --- 266,277 ---- if (res == NULL) return NULL; + if (PyUnicode_Check(res)) { + PyObject* str; + str = PyUnicode_AsEncodedString(res, NULL, NULL); + if (str) { + Py_DECREF(res); + res = str; + } + } if (!PyString_Check(res)) { PyErr_Format(PyExc_TypeError, *************** *** 303,306 **** --- 311,322 ---- if (res == NULL) return NULL; + if (PyUnicode_Check(res)) { + PyObject* str; + str = PyUnicode_AsEncodedString(res, NULL, NULL); + if (str) { + Py_DECREF(res); + res = str; + } + } if (!PyString_Check(res)) { PyErr_Format(PyExc_TypeError, From python-dev@python.org Sat Jul 1 15:50:23 2000 From: python-dev@python.org (Paul Prescod) Date: Sat, 1 Jul 2000 07:50:23 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_minidom,NONE,1.1 Message-ID: <200007011450.HAA31396@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv31383/output Added Files: test_minidom Log Message: Added minidom tests. --- NEW FILE --- Test Succeeded testAAA Test Succeeded testAAB Test Succeeded testAddAttr Test Succeeded testAppendChild Test Succeeded testAttrListItem Test Succeeded testAttrListItemNS Test Succeeded testAttrListItems Test Succeeded testAttrListKeys Test Succeeded testAttrListKeysNS Test Succeeded testAttrListLength Test Succeeded testAttrListValues Test Succeeded testAttrList__getitem__ Test Succeeded testAttrList__setitem__ Test Succeeded testAttributeRepr Test Succeeded testChangeAttr Test Succeeded testChildNodes Test Succeeded testCloneAttributeDeep Test Succeeded testCloneAttributeShallow Test Succeeded testCloneDocumentDeep Test Succeeded testCloneDocumentShallow Test Succeeded testCloneElementDeep Test Succeeded testCloneElementShallow Test Succeeded testCloneElementShallowCopiesAttributes Test Succeeded testClonePIDeep Test Succeeded testClonePIShallow Test Succeeded testComment Test Succeeded testCreatAttributeNS Test Succeeded testCreateElementNS Test Succeeded testDeleteAttr Test Succeeded testDocumentElement Test Succeeded testElement Test Succeeded testElementReprAndStr Test Succeeded testFirstChild Test Succeeded testGetAttrLength Test Succeeded testGetAttrList Test Succeeded testGetAttrValues Test Succeeded testGetAttribute Test Succeeded testGetAttributeNS Test Succeeded testGetAttributeNode Test Succeeded testGetElementsByTagName Test Succeeded testGetElementsByTagNameNS Test Succeeded testGetEmptyNodeListFromElementsByTagNameNS Test Succeeded testHasChildNodes Test Succeeded testInsertBefore Test Succeeded testNonZero Test Succeeded testParse Test Succeeded testParseAttributeNamespaces Test Succeeded testParseAttributes Test Succeeded testParseElement Test Succeeded testParseElementNamespaces Test Succeeded testParseProcessingInstructions Test Succeeded testParseString Test Succeeded testProcessingInstruction Test Succeeded testProcessingInstructionRepr Test Succeeded testRemoveAttr Test Succeeded testRemoveAttrNS Test Succeeded testRemoveAttributeNode Test Succeeded testSetAttrValueandNodeValue Test Succeeded testTextNodeRepr Test Succeeded testTextRepr Test Succeeded testTooManyDocumentElements Test Succeeded testUnlink Test Succeeded testWriteText Test Succeeded testWriteXML From python-dev@python.org Sat Jul 1 15:50:23 2000 From: python-dev@python.org (Paul Prescod) Date: Sat, 1 Jul 2000 07:50:23 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_minidom.py,NONE,1.1 Message-ID: <200007011450.HAA31393@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv31383 Added Files: test_minidom.py Log Message: Added minidom tests. --- NEW FILE --- from xml.dom.minidom import parse, Node, Document, parseString import traceback, sys tstfile="test.xml" Node._debug=1 def testGetElementsByTagName( ): dom=parse( tstfile ) assert dom.getElementsByTagName( "LI" )==\ dom.documentElement.getElementsByTagName( "LI" ) dom.unlink() dom=None assert( len( Node.allnodes ))==0 def testInsertBefore( ): dom=parse( tstfile ) docel=dom.documentElement #docel.insertBefore( dom.createProcessingInstruction("a", "b"), # docel.childNodes[1]) #docel.insertBefore( dom.createProcessingInstruction("a", "b"), # docel.childNodes[0]) #assert docel.childNodes[0].target=="a" #assert docel.childNodes[2].target=="a" dom.unlink() del dom del docel assert( len( Node.allnodes ))==0 def testAppendChild(): dom=parse( tstfile ) dom.documentElement.appendChild( dom.createComment( u"Hello" )) assert dom.documentElement.childNodes[-1].nodeName=="#comment" assert dom.documentElement.childNodes[-1].data=="Hello" dom.unlink() dom=None assert( len( Node.allnodes ))==0 def testNonZero(): dom=parse( tstfile ) assert dom # should not be zero dom.appendChild( dom.createComment( "foo" ) ) assert not dom.childNodes[-1].childNodes dom.unlink() dom=None assert( len( Node.allnodes ))==0 def testUnlink(): dom=parse( tstfile ) dom.unlink() dom=None assert( len( Node.allnodes ))==0 def testElement(): dom=Document() dom.appendChild( dom.createElement( "abc" ) ) assert dom.documentElement dom.unlink() dom=None assert( len( Node.allnodes ))==0 def testAAA(): dom=parseString( "" ) el=dom.documentElement el.setAttribute( "spam", "jam2" ) dom.unlink() dom=None def testAAB(): dom=parseString( "" ) el=dom.documentElement el.setAttribute( "spam", "jam" ) el.setAttribute( "spam", "jam2" ) dom.unlink() dom=None def testAddAttr(): dom=Document() child=dom.appendChild( dom.createElement( "abc" ) ) child.setAttribute( "def", "ghi" ) assert child.getAttribute( "def" )=="ghi" assert child.attributes["def"].value=="ghi" child.setAttribute( "jkl", "mno" ) assert child.getAttribute( "jkl" )=="mno" assert child.attributes["jkl"].value=="mno" assert len( child.attributes )==2 child.setAttribute( "def", "newval" ) assert child.getAttribute( "def" )=="newval" assert child.attributes["def"].value=="newval" assert len( child.attributes )==2 dom.unlink() dom=None child=None def testDeleteAttr(): dom=Document() child=dom.appendChild( dom.createElement( "abc" ) ) assert len( child.attributes)==0 child.setAttribute( "def", "ghi" ) assert len( child.attributes)==1 del child.attributes["def"] assert len( child.attributes)==0 dom.unlink() assert( len( Node.allnodes ))==0 def testRemoveAttr(): dom=Document() child=dom.appendChild( dom.createElement( "abc" ) ) child.setAttribute( "def", "ghi" ) assert len( child.attributes)==1 child.removeAttribute("def" ) assert len( child.attributes)==0 dom.unlink() def testRemoveAttrNS(): dom=Document() child=dom.appendChild( dom.createElementNS( "http://www.python.org", "python:abc" ) ) child.setAttributeNS( "http://www.w3.org", "xmlns:python", "http://www.python.org" ) child.setAttributeNS( "http://www.python.org", "python:abcattr", "foo" ) assert len( child.attributes )==2 child.removeAttributeNS( "http://www.python.org", "abcattr" ) assert len( child.attributes )==1 dom.unlink() dom=None def testRemoveAttributeNode(): dom=Document() child=dom.appendChild( dom.createElement( "foo" ) ) child.setAttribute( "spam", "jam" ) assert len( child.attributes )==1 node=child.getAttributeNode( "spam" ) child.removeAttributeNode( node ) assert len( child.attributes )==0 dom.unlink() dom=None assert len( Node.allnodes )==0 def testChangeAttr(): dom=parseString( "" ) el=dom.documentElement el.setAttribute( "spam", "jam" ) assert len( el.attributes )==1 el.setAttribute( "spam", "bam" ) assert len( el.attributes )==1 el.attributes["spam"]="ham" assert len( el.attributes )==1 el.setAttribute( "spam2", "bam" ) assert len( el.attributes )==2 el.attributes[ "spam2"]= "bam2" assert len( el.attributes )==2 dom.unlink() dom=None assert len( Node.allnodes )==0 def testGetAttrList(): pass def testGetAttrValues(): pass def testGetAttrLength(): pass def testGetAttribute(): pass def testGetAttributeNS(): pass def testGetAttributeNode(): pass def testGetElementsByTagNameNS(): pass def testGetEmptyNodeListFromElementsByTagNameNS(): pass def testElementReprAndStr(): dom=Document() el=dom.appendChild( dom.createElement( "abc" ) ) string1=repr( el ) string2=str( el ) assert string1==string2 dom.unlink() # commented out until Fredrick's fix is checked in def _testElementReprAndStrUnicode(): dom=Document() el=dom.appendChild( dom.createElement( u"abc" ) ) string1=repr( el ) string2=str( el ) assert string1==string2 dom.unlink() # commented out until Fredrick's fix is checked in def _testElementReprAndStrUnicodeNS(): dom=Document() el=dom.appendChild( dom.createElementNS( u"http://www.slashdot.org", u"slash:abc" )) string1=repr( el ) string2=str( el ) assert string1==string2 assert string1.find("slash:abc" )!=-1 dom.unlink() def testAttributeRepr(): dom=Document() el=dom.appendChild( dom.createElement( u"abc" ) ) node=el.setAttribute( "abc", "def" ) assert str( node ) == repr( node ) dom.unlink() def testTextNodeRepr(): pass def testWriteXML(): pass def testProcessingInstruction(): pass def testProcessingInstructionRepr(): pass def testTextRepr(): pass def testWriteText(): pass def testDocumentElement(): pass def testTooManyDocumentElements(): pass def testCreateElementNS(): pass def testCreatAttributeNS(): pass def testParse(): pass def testParseString(): pass def testComment(): pass def testAttrListItem(): pass def testAttrListItems(): pass def testAttrListItemNS(): pass def testAttrListKeys(): pass def testAttrListKeysNS(): pass def testAttrListValues(): pass def testAttrListLength(): pass def testAttrList__getitem__(): pass def testAttrList__setitem__(): pass def testSetAttrValueandNodeValue(): pass def testParseElement(): pass def testParseAttributes(): pass def testParseElementNamespaces(): pass def testParseAttributeNamespaces(): pass def testParseProcessingInstructions(): pass def testChildNodes(): pass def testFirstChild(): pass def testHasChildNodes(): pass def testCloneElementShallow(): pass def testCloneElementShallowCopiesAttributes(): pass def testCloneElementDeep(): pass def testCloneDocumentShallow(): pass def testCloneDocumentDeep(): pass def testCloneAttributeShallow(): pass def testCloneAttributeDeep(): pass def testClonePIShallow(): pass def testClonePIDeep(): pass names=globals().keys() names.sort() for name in names: if name.startswith( "test" ): func=globals()[name] try: func() print "Test Succeeded", name if len( Node.allnodes ): print "Garbage left over:" print Node.allnodes.items()[0:10] Node.allnodes={} except Exception, e : print "Test Failed: ", name apply( traceback.print_exception, sys.exc_info() ) print `e` Node.allnodes={} raise From python-dev@python.org Sat Jul 1 15:54:18 2000 From: python-dev@python.org (Paul Prescod) Date: Sat, 1 Jul 2000 07:54:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test.xml,NONE,1.1 Message-ID: <200007011454.HAA31638@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv31632 Added Files: test.xml Log Message: Added minidom tests. --- NEW FILE --- Introduction to XSL

Introduction to XSL


Overview

  • 1.Intro
  • 2.History
  • 3.XSL Basics
  • Lunch
  • 4.An XML Data Model
  • 5.XSL Patterns
  • 6.XSL Templates
  • 7.XSL Formatting Model

Intro

  • Who am I?
  • Who are you?
  • Why are we here?

History: XML and SGML

  • XML is a subset of SGML.
  • SGML allows the separation of abstract content from formatting.
  • Also one of XML's primary virtues (in the doc publishing domain).

History: What are stylesheets?

  • Stylesheets specify the formatting of SGML/XML documents.
  • Stylesheets put the "style" back into documents.
  • New York Times content+NYT Stylesheet = NYT paper

History: FOSI

  • FOSI: "Formatted Output Specification Instance"
    • MIL-STD-28001
    • FOSI's are SGML documents
    • A stylesheet for another document
  • Obsolete but implemented...
From python-dev@python.org Sat Jul 1 18:43:22 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 1 Jul 2000 10:43:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libnntplib.tex,1.24,1.25 Message-ID: <200007011743.KAA25562@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv25554/Doc/lib Modified Files: libnntplib.tex Log Message: Send a "ARTICLE" --> Send an "ARTICLE" Usage error noted by Grant Griffin . Index: libnntplib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libnntplib.tex,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** libnntplib.tex 2000/02/10 20:26:45 1.24 --- libnntplib.tex 2000/07/01 17:43:19 1.25 *************** *** 204,208 **** \begin{methoddesc}{article}{id} ! Send a \samp{ARTICLE} command, where \var{id} has the same meaning as for \method{stat()}. Return as for \method{head()}. \end{methoddesc} --- 204,208 ---- \begin{methoddesc}{article}{id} ! Send an \samp{ARTICLE} command, where \var{id} has the same meaning as for \method{stat()}. Return as for \method{head()}. \end{methoddesc} From python-dev@python.org Sat Jul 1 18:47:40 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 1 Jul 2000 10:47:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libpickle.tex,1.25,1.26 Message-ID: <200007011747.KAA25745@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv25737/Doc/lib Modified Files: libpickle.tex Log Message: others --> other's (possessive) Usage error noted by Grant Griffin . Index: libpickle.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpickle.tex,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** libpickle.tex 2000/04/06 15:04:30 1.25 --- libpickle.tex 2000/07/01 17:47:38 1.26 *************** *** 387,389 **** certain objects, it's possible that the two modules produce different pickled data for the same input objects; however they will always be ! able to read each others pickles back in.) --- 387,389 ---- certain objects, it's possible that the two modules produce different pickled data for the same input objects; however they will always be ! able to read each other's pickles back in.) From python-dev@python.org Sat Jul 1 18:51:06 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 1 Jul 2000 10:51:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.17,2.18 Message-ID: <200007011751.KAA25898@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv25808/Modules Modified Files: _sre.c Log Message: today's SRE update: -- changed 1.6 to 2.0 in the file headers -- fixed ISALNUM macro for the unicode locale. this solution isn't perfect, but the best I can do with Python's current unicode database. Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** _sre.c 2000/06/30 21:40:20 2.17 --- _sre.c 2000/07/01 17:50:59 2.18 *************** *** 26,30 **** * * Portions of this engine have been developed in cooperation with ! * CNRI. Hewlett-Packard provided funding for 1.6 integration and * other compatibility work. */ --- 26,30 ---- * * Portions of this engine have been developed in cooperation with ! * CNRI. Hewlett-Packard provided funding for 2.0 integration and * other compatibility work. */ *************** *** 53,57 **** #if PY_VERSION_HEX >= 0x01060000 ! /* defining this enables unicode support (default under 1.6) */ #define HAVE_UNICODE #endif --- 53,57 ---- #if PY_VERSION_HEX >= 0x01060000 ! /* defining this enables unicode support (default under 1.6a1 and later) */ #define HAVE_UNICODE #endif *************** *** 144,152 **** return (unsigned int) Py_UNICODE_TOLOWER((Py_UNICODE)(ch)); } ! #define SRE_UNI_TO_LOWER(ch) Py_UNICODE_TOLOWER((Py_UNICODE)(ch)) #define SRE_UNI_IS_DIGIT(ch) Py_UNICODE_ISDIGIT((Py_UNICODE)(ch)) #define SRE_UNI_IS_SPACE(ch) Py_UNICODE_ISSPACE((Py_UNICODE)(ch)) #define SRE_UNI_IS_LINEBREAK(ch) Py_UNICODE_ISLINEBREAK((Py_UNICODE)(ch)) ! #define SRE_UNI_IS_ALNUM(ch) ((ch) < 256 ? isalnum((ch)) : 0) #define SRE_UNI_IS_WORD(ch) (SRE_IS_ALNUM((ch)) || (ch) == '_') #endif --- 144,159 ---- return (unsigned int) Py_UNICODE_TOLOWER((Py_UNICODE)(ch)); } ! ! #if !defined(Py_UNICODE_ISALNUM) ! /* FIXME: workaround. should be fixed in unicodectype.c */ ! #define Py_UNICODE_ISALNUM(ch)\ ! (Py_UNICODE_ISLOWER(ch) || Py_UNICODE_ISUPPER(ch) ||\ ! Py_UNICODE_ISTITLE(ch) || Py_UNICODE_ISDIGIT(ch)) ! #endif ! #define SRE_UNI_IS_DIGIT(ch) Py_UNICODE_ISDIGIT((Py_UNICODE)(ch)) #define SRE_UNI_IS_SPACE(ch) Py_UNICODE_ISSPACE((Py_UNICODE)(ch)) #define SRE_UNI_IS_LINEBREAK(ch) Py_UNICODE_ISLINEBREAK((Py_UNICODE)(ch)) ! #define SRE_UNI_IS_ALNUM(ch) Py_UNICODE_ISALNUM((Py_UNICODE)(ch)) #define SRE_UNI_IS_WORD(ch) (SRE_IS_ALNUM((ch)) || (ch) == '_') #endif From python-dev@python.org Sat Jul 1 18:51:06 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 1 Jul 2000 10:51:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre.py,1.17,1.18 sre_compile.py,1.18,1.19 sre_constants.py,1.12,1.13 sre_parse.py,1.18,1.19 Message-ID: <200007011751.KAA25902@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv25808/Lib Modified Files: sre.py sre_compile.py sre_constants.py sre_parse.py Log Message: today's SRE update: -- changed 1.6 to 2.0 in the file headers -- fixed ISALNUM macro for the unicode locale. this solution isn't perfect, but the best I can do with Python's current unicode database. Index: sre.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** sre.py 2000/06/30 13:55:14 1.17 --- sre.py 2000/07/01 17:50:59 1.18 *************** *** 7,11 **** # # Portions of this engine have been developed in cooperation with ! # CNRI. Hewlett-Packard provided funding for 1.6 integration and # other compatibility work. # --- 7,11 ---- # # Portions of this engine have been developed in cooperation with ! # CNRI. Hewlett-Packard provided funding for 2.0 integration and # other compatibility work. # Index: sre_compile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** sre_compile.py 2000/06/30 22:37:31 1.18 --- sre_compile.py 2000/07/01 17:50:59 1.19 *************** *** 7,11 **** # # Portions of this engine have been developed in cooperation with ! # CNRI. Hewlett-Packard provided funding for 1.6 integration and # other compatibility work. # --- 7,11 ---- # # Portions of this engine have been developed in cooperation with ! # CNRI. Hewlett-Packard provided funding for 2.0 integration and # other compatibility work. # Index: sre_constants.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_constants.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** sre_constants.py 2000/06/30 10:41:30 1.12 --- sre_constants.py 2000/07/01 17:50:59 1.13 *************** *** 8,12 **** # # Portions of this engine have been developed in cooperation with ! # CNRI. Hewlett-Packard provided funding for 1.6 integration and # other compatibility work. # --- 8,12 ---- # # Portions of this engine have been developed in cooperation with ! # CNRI. Hewlett-Packard provided funding for 2.0 integration and # other compatibility work. # Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** sre_parse.py 2000/06/30 22:37:31 1.18 --- sre_parse.py 2000/07/01 17:50:59 1.19 *************** *** 7,11 **** # # Portions of this engine have been developed in cooperation with ! # CNRI. Hewlett-Packard provided funding for 1.6 integration and # other compatibility work. # --- 7,11 ---- # # Portions of this engine have been developed in cooperation with ! # CNRI. Hewlett-Packard provided funding for 2.0 integration and # other compatibility work. # From python-dev@python.org Sat Jul 1 20:17:46 2000 From: python-dev@python.org (Paul Prescod) Date: Sat, 1 Jul 2000 12:17:46 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_minidom,1.1,1.2 Message-ID: <200007011917.MAA10073@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv10064 Modified Files: test_minidom Log Message: Fixed test output Index: test_minidom =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_minidom,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_minidom 2000/07/01 14:50:21 1.1 --- test_minidom 2000/07/01 19:17:43 1.2 *************** *** 1,2 **** --- 1,3 ---- + test_minidom Test Succeeded testAAA Test Succeeded testAAB From python-dev@python.org Sat Jul 1 20:19:34 2000 From: python-dev@python.org (Paul Prescod) Date: Sat, 1 Jul 2000 12:19:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax saxutils.py,1.1,1.2 Message-ID: <200007011919.MAA10146@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv10136 Modified Files: saxutils.py Log Message: Removed unncessary dependency. Index: saxutils.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/saxutils.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** saxutils.py 2000/06/29 19:34:54 1.1 --- saxutils.py 2000/07/01 19:19:32 1.2 *************** *** 6,10 **** """ ! import types, string, sys, urllib import handler --- 6,10 ---- """ ! import types, string, sys import handler From python-dev@python.org Sat Jul 1 20:21:50 2000 From: python-dev@python.org (Paul Prescod) Date: Sat, 1 Jul 2000 12:21:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/dom minidom.py,1.2,1.3 Message-ID: <200007011921.MAA10240@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv10231 Modified Files: minidom.py Log Message: Misc fixes and improvements. Index: minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/minidom.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** minidom.py 2000/07/01 04:58:47 1.2 --- minidom.py 2000/07/01 19:21:47 1.3 *************** *** 41,45 **** Node.allnodes[index]=repr( self.__dict__ ) if Node.debug==None: ! Node.debug=open( "debug4.out", "w" ) Node.debug.write( "create %s\n"%index ) --- 41,46 ---- Node.allnodes[index]=repr( self.__dict__ ) if Node.debug==None: ! Node.debug=StringIO() ! #open( "debug4.out", "w" ) Node.debug.write( "create %s\n"%index ) *************** *** 217,227 **** #FIXME: is it appropriate to return .value? def __getitem__( self, attname_or_tuple ): ! if type( attname_or_tuple ) == type( () ): return self._attrsNS[attname_or_tuple] else: return self._attrs[attname_or_tuple] ! def __setitem__( self, attname ): ! raise TypeError, "object does not support item assignment" def __delitem__( self, attname_or_tuple ): --- 218,239 ---- #FIXME: is it appropriate to return .value? def __getitem__( self, attname_or_tuple ): ! if type( attname_or_tuple ) == types.TupleType: return self._attrsNS[attname_or_tuple] else: return self._attrs[attname_or_tuple] ! # same as set ! def __setitem__( self, attname, value ): ! if type( value ) == types.StringType: ! node=Attr( attname ) ! node.value=value ! else: ! assert isinstance( value, Attr ) or type( value )==types.StringType ! node=value ! old=self._attrs.get( attname, None) ! if old: ! old.unlink() ! self._attrs[node.name]=node ! self._attrsNS[(node.namespaceURI,node.localName)]=node def __delitem__( self, attname_or_tuple ): From python-dev@python.org Sat Jul 1 21:38:30 2000 From: python-dev@python.org (Tim Peters) Date: Sat, 1 Jul 2000 13:38:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild readme.txt,1.9,1.10 Message-ID: <200007012038.NAA20714@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv20693/python/dist/src/PCbuild Modified Files: readme.txt Log Message: Typo repair. Index: readme.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/readme.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** readme.txt 2000/07/01 03:46:38 1.9 --- readme.txt 2000/07/01 20:38:27 1.10 *************** *** 92,96 **** ! YOUR OWN EXTENSION DDLs ----------------------- If you want to create your own extension module DLL, there's an example --- 92,96 ---- ! YOUR OWN EXTENSION DLLs ----------------------- If you want to create your own extension module DLL, there's an example From python-dev@python.org Sat Jul 1 21:57:05 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 1 Jul 2000 13:57:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-win winreg.py,1.2,1.3 Message-ID: <200007012057.NAA21601@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/plat-win In directory slayer.i.sourceforge.net:/tmp/cvs-serv21594/Lib/plat-win Modified Files: winreg.py Log Message: test(): Removed; regression test is in test.test_winreg2, not testreg. Index: winreg.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/plat-win/winreg.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** winreg.py 2000/06/30 20:31:39 1.2 --- winreg.py 2000/07/01 20:57:03 1.3 *************** *** 304,309 **** "REG_OPTION_CREATE_LINK"] - def test(): - import testreg #unusednames=_RegNotifyChangeKeyValueOptions+_RegRestoreKeyOptions+_RegCreateKeyExOptions --- 304,307 ---- From python-dev@python.org Sun Jul 2 00:49:16 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 1 Jul 2000 16:49:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre_parse.py,1.19,1.20 Message-ID: <200007012349.QAA15984@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv15852/Lib Modified Files: sre_parse.py Log Message: - fixed "{ in any other context" bug - minor comment touchups in the C module Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** sre_parse.py 2000/07/01 17:50:59 1.19 --- sre_parse.py 2000/07/01 23:49:14 1.20 *************** *** 143,152 **** class Tokenizer: def __init__(self, string): - self.index = 0 self.string = string ! self.next = self.__next() def __next(self): if self.index >= len(self.string): ! return None char = self.string[self.index] if char[0] == "\\": --- 143,153 ---- class Tokenizer: def __init__(self, string): self.string = string ! self.index = 0 ! self.__next() def __next(self): if self.index >= len(self.string): ! self.next = None ! return char = self.string[self.index] if char[0] == "\\": *************** *** 157,175 **** char = char + c self.index = self.index + len(char) ! return char def match(self, char): if char == self.next: ! self.next = self.__next() ! return 1 ! return 0 ! def match_set(self, set): ! if self.next and self.next in set: ! self.next = self.__next() return 1 return 0 def get(self): this = self.next ! self.next = self.__next() return this def isident(char): --- 158,175 ---- char = char + c self.index = self.index + len(char) ! self.next = char def match(self, char): if char == self.next: ! self.__next() return 1 return 0 def get(self): this = self.next ! self.__next() return this + def tell(self): + return self.index, self.next + def seek(self, index): + self.index, self.next = index def isident(char): *************** *** 382,385 **** --- 382,386 ---- min, max = 1, MAXREPEAT elif this == "{": + here = source.tell() min, max = 0, MAXREPEAT lo = hi = "" *************** *** 392,396 **** hi = lo if not source.match("}"): ! raise error, "bogus range" if lo: min = int(lo) --- 393,399 ---- hi = lo if not source.match("}"): ! subpattern.append((LITERAL, ord(this))) ! source.seek(here) ! continue if lo: min = int(lo) From python-dev@python.org Sun Jul 2 00:49:16 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 1 Jul 2000 16:49:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.18,2.19 Message-ID: <200007012349.QAA15988@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv15852/Modules Modified Files: _sre.c Log Message: - fixed "{ in any other context" bug - minor comment touchups in the C module Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** _sre.c 2000/07/01 17:50:59 2.18 --- _sre.c 2000/07/01 23:49:14 2.19 *************** *** 20,24 **** * 00-06-28 fl fixed findall (0.9.1) * 00-06-29 fl fixed split, added more scanner features (0.9.2) ! * 00-06-30 fl tuning, fast search (0.9.3) * 00-06-30 fl added assert (lookahead) primitives, etc (0.9.4) * --- 20,24 ---- * 00-06-28 fl fixed findall (0.9.1) * 00-06-29 fl fixed split, added more scanner features (0.9.2) ! * 00-06-30 fl added fast search optimization (0.9.3) * 00-06-30 fl added assert (lookahead) primitives, etc (0.9.4) * *************** *** 366,369 **** --- 366,370 ---- case SRE_OP_LITERAL: + /* args: */ if (ch == set[0]) return ok; *************** *** 372,375 **** --- 373,377 ---- case SRE_OP_RANGE: + /* args: */ if (set[0] <= ch && ch <= set[1]) return ok; *************** *** 378,381 **** --- 380,384 ---- case SRE_OP_CATEGORY: + /* args: */ if (sre_category(set[0], (int) ch)) return ok; From python-dev@python.org Sun Jul 2 13:00:09 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 2 Jul 2000 05:00:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.19,2.20 sre_constants.h,2.5,2.6 Message-ID: <200007021200.FAA11452@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv10442/Modules Modified Files: _sre.c sre_constants.h Log Message: -- use charset bitmaps where appropriate. this gives a 5-10% speedup for some tests, including the python tokenizer. -- added support for an optional charset anchor to the engine (currently unused by the code generator). -- removed workaround for array module bug. Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** _sre.c 2000/07/01 23:49:14 2.19 --- _sre.c 2000/07/02 12:00:07 2.20 *************** *** 379,382 **** --- 379,389 ---- break; + case SRE_OP_CHARSET: + /* args: (16 bits per code word) */ + if (ch < 256 && (set[ch >> 4] & (1 << (ch & 15)))) + return ok; + set += 16; + break; + case SRE_OP_CATEGORY: /* args: */ *************** *** 953,979 **** SRE_CHAR* end = state->end; int status = 0; ! int prefix_len = 0; ! SRE_CODE* prefix; ! SRE_CODE* overlap; ! int literal = 0; if (pattern[0] == SRE_OP_INFO) { /* optimization info block */ ! /* args: <1=skip> <2=flags> <3=min> <4=max> <5=prefix> <6=data...> */ if (pattern[3] > 0) { /* adjust end point (but make sure we leave at least one ! character in there) */ end -= pattern[3]-1; if (end <= ptr) end = ptr+1; } - - literal = pattern[2]; - - prefix = pattern + 6; - prefix_len = pattern[5]; ! overlap = prefix + prefix_len - 1; pattern += 1 + pattern[1]; --- 960,989 ---- SRE_CHAR* end = state->end; int status = 0; ! int prefix_len; ! SRE_CODE* prefix = NULL; ! SRE_CODE* charset = NULL; ! SRE_CODE* overlap = NULL; ! int flags = 0; if (pattern[0] == SRE_OP_INFO) { /* optimization info block */ ! /* args: <1=skip> <2=flags> <3=min> <4=max> <5=prefix info> */ ! ! flags = pattern[2]; if (pattern[3] > 0) { /* adjust end point (but make sure we leave at least one ! character in there, so literal search will work) */ end -= pattern[3]-1; if (end <= ptr) end = ptr+1; } ! if (flags & SRE_INFO_PREFIX) { ! prefix_len = pattern[5]; ! prefix = pattern + 6; ! overlap = prefix + prefix_len - 1; ! } else if (flags & SRE_INFO_CHARSET) ! charset = pattern + 5; pattern += 1 + pattern[1]; *************** *** 981,985 **** #if defined(USE_FAST_SEARCH) ! if (prefix_len > 1) { /* pattern starts with a known prefix. use the overlap table to skip forward as fast as we possibly can */ --- 991,995 ---- #if defined(USE_FAST_SEARCH) ! if (prefix && overlap && prefix_len > 1) { /* pattern starts with a known prefix. use the overlap table to skip forward as fast as we possibly can */ *************** *** 999,1004 **** state->start = ptr - prefix_len + 1; state->ptr = ptr + 1; ! if (literal) ! return 1; /* all of it */ status = SRE_MATCH(state, pattern + 2*prefix_len); if (status != 0) --- 1009,1014 ---- state->start = ptr - prefix_len + 1; state->ptr = ptr + 1; ! if (flags & SRE_INFO_LITERAL) ! return 1; /* we got all of it */ status = SRE_MATCH(state, pattern + 2*prefix_len); if (status != 0) *************** *** 1017,1023 **** #endif ! if (pattern[0] == SRE_OP_LITERAL) { ! /* pattern starts with a literal character. this is used for ! short prefixes, and if fast search is disabled*/ SRE_CODE chr = pattern[1]; for (;;) { --- 1027,1033 ---- #endif ! if (pattern[0] == SRE_OP_LITERAL) { ! /* pattern starts with a literal character. this is used ! for short prefixes, and if fast search is disabled */ SRE_CODE chr = pattern[1]; for (;;) { *************** *** 1033,1036 **** --- 1043,1062 ---- break; } + #if 0 + } else if (charset) { + /* pattern starts with a character from a known set */ + for (;;) { + while (ptr < end && !SRE_MEMBER(charset, ptr[0])) + ptr++; + if (ptr == end) + return 0; + TRACE(("%8d: === SEARCH === charset\n", PTR(ptr))); + state->start = ptr; + state->ptr = ptr; + status = SRE_MATCH(state, pattern); + if (status != 0) + break; + } + #endif } else /* general case */ *************** *** 1045,1048 **** --- 1071,1075 ---- return status; } + #if !defined(SRE_RECURSIVE) Index: sre_constants.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sre_constants.h,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** sre_constants.h 2000/06/30 10:41:31 2.5 --- sre_constants.h 2000/07/02 12:00:07 2.6 *************** *** 21,41 **** #define SRE_OP_CALL 7 #define SRE_OP_CATEGORY 8 ! #define SRE_OP_GROUP 9 ! #define SRE_OP_GROUP_IGNORE 10 ! #define SRE_OP_IN 11 ! #define SRE_OP_IN_IGNORE 12 ! #define SRE_OP_INFO 13 ! #define SRE_OP_JUMP 14 ! #define SRE_OP_LITERAL 15 ! #define SRE_OP_LITERAL_IGNORE 16 ! #define SRE_OP_MARK 17 ! #define SRE_OP_MAX_REPEAT 18 ! #define SRE_OP_MAX_REPEAT_ONE 19 ! #define SRE_OP_MIN_REPEAT 20 ! #define SRE_OP_NOT_LITERAL 21 ! #define SRE_OP_NOT_LITERAL_IGNORE 22 ! #define SRE_OP_NEGATE 23 ! #define SRE_OP_RANGE 24 ! #define SRE_OP_REPEAT 25 #define SRE_AT_BEGINNING 0 #define SRE_AT_BEGINNING_LINE 1 --- 21,42 ---- #define SRE_OP_CALL 7 #define SRE_OP_CATEGORY 8 ! #define SRE_OP_CHARSET 9 ! #define SRE_OP_GROUP 10 ! #define SRE_OP_GROUP_IGNORE 11 ! #define SRE_OP_IN 12 ! #define SRE_OP_IN_IGNORE 13 ! #define SRE_OP_INFO 14 ! #define SRE_OP_JUMP 15 ! #define SRE_OP_LITERAL 16 ! #define SRE_OP_LITERAL_IGNORE 17 ! #define SRE_OP_MARK 18 ! #define SRE_OP_MAX_REPEAT 19 ! #define SRE_OP_MAX_REPEAT_ONE 20 ! #define SRE_OP_MIN_REPEAT 21 ! #define SRE_OP_NOT_LITERAL 22 ! #define SRE_OP_NOT_LITERAL_IGNORE 23 ! #define SRE_OP_NEGATE 24 ! #define SRE_OP_RANGE 25 ! #define SRE_OP_REPEAT 26 #define SRE_AT_BEGINNING 0 #define SRE_AT_BEGINNING_LINE 1 *************** *** 69,70 **** --- 70,74 ---- #define SRE_FLAG_UNICODE 32 #define SRE_FLAG_VERBOSE 64 + #define SRE_INFO_PREFIX 1 + #define SRE_INFO_LITERAL 2 + #define SRE_INFO_CHARSET 4 From python-dev@python.org Sun Jul 2 13:00:09 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 2 Jul 2000 05:00:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre_compile.py,1.19,1.20 sre_constants.py,1.13,1.14 sre_parse.py,1.20,1.21 Message-ID: <200007021200.FAA11448@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv10442/Lib Modified Files: sre_compile.py sre_constants.py sre_parse.py Log Message: -- use charset bitmaps where appropriate. this gives a 5-10% speedup for some tests, including the python tokenizer. -- added support for an optional charset anchor to the engine (currently unused by the code generator). -- removed workaround for array module bug. Index: sre_compile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** sre_compile.py 2000/07/01 17:50:59 1.19 --- sre_compile.py 2000/07/02 12:00:06 1.20 *************** *** 17,21 **** # find an array type code that matches the engine's code size ! for WORDSIZE in "BHil": if len(array.array(WORDSIZE, [0]).tostring()) == _sre.getcodesize(): break --- 17,21 ---- # find an array type code that matches the engine's code size ! for WORDSIZE in "Hil": if len(array.array(WORDSIZE, [0]).tostring()) == _sre.getcodesize(): break *************** *** 23,26 **** --- 23,85 ---- raise RuntimeError, "cannot find a useable array type" + MAXCODE = 65535 + + def _charset(charset, fixup): + # internal: optimize character set + out = [] + charmap = [0]*256 + try: + for op, av in charset: + if op is NEGATE: + out.append((op, av)) + elif op is LITERAL: + charmap[fixup(av)] = 1 + elif op is RANGE: + for i in range(fixup(av[0]), fixup(av[1])+1): + charmap[i] = 1 + elif op is CATEGORY: + # FIXME: could append to charmap tail + return charset # cannot compress + except IndexError: + # unicode + return charset + # compress character map + i = p = n = 0 + runs = [] + for c in charmap: + if c: + if n == 0: + p = i + n = n + 1 + elif n: + runs.append((p, n)) + n = 0 + i = i + 1 + if n: + runs.append((p, n)) + if len(runs) <= 2: + # use literal/range + for p, n in runs: + if n == 1: + out.append((LITERAL, p)) + else: + out.append((RANGE, (p, p+n-1))) + if len(out) < len(charset): + return out + else: + # use bitmap + data = [] + m = 1; v = 0 + for c in charmap: + if c: + v = v + m + m = m << 1 + if m > MAXCODE: + data.append(v) + m = 1; v = 0 + out.append((CHARSET, data)) + return out + return charset + def _compile(code, pattern, flags): # internal: compile a (sub)pattern *************** *** 42,46 **** fixup = lambda x: x skip = len(code); emit(0) ! for op, av in av: emit(OPCODES[op]) if op is NEGATE: --- 101,105 ---- fixup = lambda x: x skip = len(code); emit(0) ! for op, av in _charset(av, fixup): emit(OPCODES[op]) if op is NEGATE: *************** *** 51,54 **** --- 110,115 ---- emit(fixup(av[0])) emit(fixup(av[1])) + elif op is CHARSET: + code.extend(av) elif op is CATEGORY: if flags & SRE_FLAG_LOCALE: *************** *** 156,161 **** def _compile_info(code, pattern, flags): # internal: compile an info block. in the current version, ! # this contains min/max pattern width and a literal prefix, ! # if any lo, hi = pattern.getwidth() if lo == 0: --- 217,222 ---- def _compile_info(code, pattern, flags): # internal: compile an info block. in the current version, ! # this contains min/max pattern width, and an optional literal ! # prefix or a character map lo, hi = pattern.getwidth() if lo == 0: *************** *** 163,166 **** --- 224,228 ---- # look for a literal prefix prefix = [] + charset = [] # not used if not (flags & SRE_FLAG_IGNORECASE): for op, av in pattern.data: *************** *** 175,198 **** # literal flag mask = 0 ! if len(prefix) == len(pattern.data): ! mask = 1 emit(mask) # pattern length ! emit(lo) ! if hi < 32768: emit(hi) else: emit(0) # add literal prefix - emit(len(prefix)) if prefix: ! code.extend(prefix) ! # generate overlap table ! table = [-1] + ([0]*len(prefix)) ! for i in range(len(prefix)): ! table[i+1] = table[i]+1 ! while table[i+1] > 0 and prefix[i] != prefix[table[i+1]-1]: ! table[i+1] = table[table[i+1]-1]+1 ! code.extend(table[1:]) # don't store first entry code[skip] = len(code) - skip --- 237,274 ---- # literal flag mask = 0 ! if prefix: ! mask = SRE_INFO_PREFIX ! if len(prefix) == len(pattern.data): ! mask = mask + SRE_INFO_LITERAL ! elif charset: ! mask = mask + SRE_INFO_CHARSET emit(mask) # pattern length ! if lo < MAXCODE: ! emit(lo) ! else: ! emit(MAXCODE) ! prefix = prefix[:MAXCODE] ! if hi < MAXCODE: emit(hi) else: emit(0) # add literal prefix if prefix: ! emit(len(prefix)) ! if prefix: ! code.extend(prefix) ! # generate overlap table ! table = [-1] + ([0]*len(prefix)) ! for i in range(len(prefix)): ! table[i+1] = table[i]+1 ! while table[i+1] > 0 and prefix[i] != prefix[table[i+1]-1]: ! table[i+1] = table[table[i+1]-1]+1 ! code.extend(table[1:]) # don't store first entry ! elif charset: ! for char in charset: ! emit(OPCODES[LITERAL]) ! emit(char) ! emit(OPCODES[FAILURE]) code[skip] = len(code) - skip Index: sre_constants.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_constants.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** sre_constants.py 2000/07/01 17:50:59 1.13 --- sre_constants.py 2000/07/02 12:00:06 1.14 *************** *** 29,32 **** --- 29,33 ---- CALL = "call" CATEGORY = "category" + CHARSET = "charset" GROUP = "group" GROUP_IGNORE = "group_ignore" *************** *** 88,91 **** --- 89,93 ---- CALL, CATEGORY, + CHARSET, GROUP, GROUP_IGNORE, IN, IN_IGNORE, *************** *** 167,177 **** # flags ! SRE_FLAG_TEMPLATE = 1 ! SRE_FLAG_IGNORECASE = 2 ! SRE_FLAG_LOCALE = 4 ! SRE_FLAG_MULTILINE = 8 ! SRE_FLAG_DOTALL = 16 ! SRE_FLAG_UNICODE = 32 ! SRE_FLAG_VERBOSE = 64 if __name__ == "__main__": --- 169,184 ---- # flags ! SRE_FLAG_TEMPLATE = 1 # template mode (disable backtracking) ! SRE_FLAG_IGNORECASE = 2 # case insensitive ! SRE_FLAG_LOCALE = 4 # honour system locale ! SRE_FLAG_MULTILINE = 8 # treat target as multiline string ! SRE_FLAG_DOTALL = 16 # treat target as a single string ! SRE_FLAG_UNICODE = 32 # use unicode locale ! SRE_FLAG_VERBOSE = 64 # ignore whitespace and comments ! ! # flags for INFO primitive ! SRE_INFO_PREFIX = 1 # has prefix ! SRE_INFO_LITERAL = 2 # entire pattern is literal (given by prefix) ! SRE_INFO_CHARSET = 4 # pattern starts with character from given set if __name__ == "__main__": *************** *** 202,205 **** --- 209,213 ---- dump(f, ATCODES, "SRE") dump(f, CHCODES, "SRE") + f.write("#define SRE_FLAG_TEMPLATE %d\n" % SRE_FLAG_TEMPLATE) f.write("#define SRE_FLAG_IGNORECASE %d\n" % SRE_FLAG_IGNORECASE) *************** *** 209,212 **** --- 217,225 ---- f.write("#define SRE_FLAG_UNICODE %d\n" % SRE_FLAG_UNICODE) f.write("#define SRE_FLAG_VERBOSE %d\n" % SRE_FLAG_VERBOSE) + + f.write("#define SRE_INFO_PREFIX %d\n" % SRE_INFO_PREFIX) + f.write("#define SRE_INFO_LITERAL %d\n" % SRE_INFO_LITERAL) + f.write("#define SRE_INFO_CHARSET %d\n" % SRE_INFO_CHARSET) + f.close() print "done" Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** sre_parse.py 2000/07/01 23:49:14 1.20 --- sre_parse.py 2000/07/02 12:00:06 1.21 *************** *** 17,25 **** from sre_constants import * ! # FIXME: should be 65535, but the arraymodule is still broken ! MAXREPEAT = 32767 ! # FIXME: might change in 2.0 final. but for now, this seems ! # to be the best way to be compatible with 1.5.2 CHARMASK = 0xff --- 17,24 ---- from sre_constants import * ! MAXREPEAT = 65535 ! # FIXME: the following might change in 2.0 final. but for now, this ! # seems to be the best way to be compatible with 1.5.2 CHARMASK = 0xff From python-dev@python.org Sun Jul 2 14:52:24 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 2 Jul 2000 06:52:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml __init__.py,1.2,1.3 Message-ID: <200007021352.GAA28307@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml In directory slayer.i.sourceforge.net:/tmp/cvs-serv28300 Modified Files: __init__.py Log Message: Typo (mine): Garsholm --> Garshol Noted by Rob Hooft . Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/__init__.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** __init__.py 2000/07/01 04:58:46 1.2 --- __init__.py 2000/07/02 13:52:21 1.3 *************** *** 9,13 **** sax -- The Simple API for XML, developed by XML-Dev, led by David ! Megginson and ported to Python by Lars Marius Garsholm. This supports the SAX 2 API. """ --- 9,13 ---- sax -- The Simple API for XML, developed by XML-Dev, led by David ! Megginson and ported to Python by Lars Marius Garshol. This supports the SAX 2 API. """ From python-dev@python.org Sun Jul 2 18:33:30 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 2 Jul 2000 10:33:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.20,2.21 sre.h,2.10,2.11 sre_constants.h,2.6,2.7 Message-ID: <200007021733.KAA31666@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv31347/Modules Modified Files: _sre.c sre.h sre_constants.h Log Message: - actually enabled charset anchors in the engine (still not used by the code generator) - changed max repeat value in engine (to match earlier array fix) - added experimental "which part matched?" mechanism to sre; see http://hem.passagen.se/eff/2000_07_01_bot-archive.htm#416954 or python-dev for details. Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** _sre.c 2000/07/02 12:00:07 2.20 --- _sre.c 2000/07/02 17:33:27 2.21 *************** *** 22,25 **** --- 22,26 ---- * 00-06-30 fl added fast search optimization (0.9.3) * 00-06-30 fl added assert (lookahead) primitives, etc (0.9.4) + * 00-07-02 fl added charset optimizations, etc (0.9.5) * * Copyright (c) 1997-2000 by Secret Labs AB. All rights reserved. *************** *** 32,36 **** #ifndef SRE_RECURSIVE ! char copyright[] = " SRE 0.9.4 Copyright (c) 1997-2000 by Secret Labs AB "; #include "Python.h" --- 33,37 ---- #ifndef SRE_RECURSIVE ! char copyright[] = " SRE 0.9.5 Copyright (c) 1997-2000 by Secret Labs AB "; #include "Python.h" *************** *** 588,591 **** --- 589,600 ---- break; + case SRE_OP_INDEX: + /* set index */ + /* args: */ + TRACE(("%8d: set index %d\n", PTR(ptr), pattern[0])); + state->index = pattern[0]; + pattern++; + break; + case SRE_OP_JUMP: case SRE_OP_INFO: *************** *** 811,815 **** points to the stack */ ! while (pattern[2] == 32767 || count < (int) pattern[2]) { state->stackbase = stack; i = SRE_MATCH(state, pattern + 3); --- 820,824 ---- points to the stack */ ! while (pattern[2] == 65535 || count < (int) pattern[2]) { state->stackbase = stack; i = SRE_MATCH(state, pattern + 3); *************** *** 981,988 **** --- 990,999 ---- if (flags & SRE_INFO_PREFIX) { + /* pattern starts with a known prefix */ prefix_len = pattern[5]; prefix = pattern + 6; overlap = prefix + prefix_len - 1; } else if (flags & SRE_INFO_CHARSET) + /* pattern starts with a character from a known set */ charset = pattern + 5; *************** *** 1043,1047 **** break; } - #if 0 } else if (charset) { /* pattern starts with a character from a known set */ --- 1054,1057 ---- *************** *** 1058,1062 **** break; } - #endif } else /* general case */ --- 1068,1071 ---- *************** *** 1205,1208 **** --- 1214,1219 ---- state->mark[i] = NULL; + state->index = -1; + state->stack = NULL; state->stackbase = 0; *************** *** 1287,1290 **** --- 1298,1303 ---- match->mark[j+2] = match->mark[j+3] = -1; /* undefined */ + match->index = state->index; + return (PyObject*) match; *************** *** 1887,1890 **** --- 1900,1912 ---- if (!strcmp(name, "endpos")) return Py_BuildValue("i", 0); /* FIXME */ + + if (!strcmp(name, "index")) { + /* experimental */ + if (self->index < 0) { + Py_INCREF(Py_None); + return Py_None; + } else + return Py_BuildValue("i", self->index); + } PyErr_SetString(PyExc_AttributeError, name); Index: sre.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sre.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** sre.h 2000/06/29 18:03:25 2.10 --- sre.h 2000/07/02 17:33:27 2.11 *************** *** 34,37 **** --- 34,38 ---- PyObject* string; /* link to the target string */ PatternObject* pattern; /* link to the regex (pattern) object */ + int index; /* last index marker seen by the engine (-1 if none) */ int groups; /* number of groups (start/end marks) */ int mark[2]; *************** *** 58,61 **** --- 59,63 ---- int charsize; /* registers */ + int index; int lastmark; void* mark[SRE_MARK_SIZE]; Index: sre_constants.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sre_constants.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** sre_constants.h 2000/07/02 12:00:07 2.6 --- sre_constants.h 2000/07/02 17:33:27 2.7 *************** *** 24,42 **** #define SRE_OP_GROUP 10 #define SRE_OP_GROUP_IGNORE 11 ! #define SRE_OP_IN 12 ! #define SRE_OP_IN_IGNORE 13 ! #define SRE_OP_INFO 14 ! #define SRE_OP_JUMP 15 ! #define SRE_OP_LITERAL 16 ! #define SRE_OP_LITERAL_IGNORE 17 ! #define SRE_OP_MARK 18 ! #define SRE_OP_MAX_REPEAT 19 ! #define SRE_OP_MAX_REPEAT_ONE 20 ! #define SRE_OP_MIN_REPEAT 21 ! #define SRE_OP_NOT_LITERAL 22 ! #define SRE_OP_NOT_LITERAL_IGNORE 23 ! #define SRE_OP_NEGATE 24 ! #define SRE_OP_RANGE 25 ! #define SRE_OP_REPEAT 26 #define SRE_AT_BEGINNING 0 #define SRE_AT_BEGINNING_LINE 1 --- 24,43 ---- #define SRE_OP_GROUP 10 #define SRE_OP_GROUP_IGNORE 11 ! #define SRE_OP_INDEX 12 ! #define SRE_OP_IN 13 ! #define SRE_OP_IN_IGNORE 14 ! #define SRE_OP_INFO 15 ! #define SRE_OP_JUMP 16 ! #define SRE_OP_LITERAL 17 ! #define SRE_OP_LITERAL_IGNORE 18 ! #define SRE_OP_MARK 19 ! #define SRE_OP_MAX_REPEAT 20 ! #define SRE_OP_MAX_REPEAT_ONE 21 ! #define SRE_OP_MIN_REPEAT 22 ! #define SRE_OP_NOT_LITERAL 23 ! #define SRE_OP_NOT_LITERAL_IGNORE 24 ! #define SRE_OP_NEGATE 25 ! #define SRE_OP_RANGE 26 ! #define SRE_OP_REPEAT 27 #define SRE_AT_BEGINNING 0 #define SRE_AT_BEGINNING_LINE 1 From python-dev@python.org Sun Jul 2 18:33:30 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 2 Jul 2000 10:33:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre.py,1.18,1.19 sre_compile.py,1.20,1.21 sre_constants.py,1.14,1.15 sre_parse.py,1.21,1.22 Message-ID: <200007021733.KAA31658@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv31347/Lib Modified Files: sre.py sre_compile.py sre_constants.py sre_parse.py Log Message: - actually enabled charset anchors in the engine (still not used by the code generator) - changed max repeat value in engine (to match earlier array fix) - added experimental "which part matched?" mechanism to sre; see http://hem.passagen.se/eff/2000_07_01_bot-archive.htm#416954 or python-dev for details. Index: sre.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** sre.py 2000/07/01 17:50:59 1.18 --- sre.py 2000/07/02 17:33:27 1.19 *************** *** 156,157 **** --- 156,188 ---- copy_reg.pickle(type(_compile("")), _pickle, _compile) + + # -------------------------------------------------------------------- + # experimental stuff (see python-dev discussions for details) + + class Scanner: + def __init__(self, lexicon): + self.lexicon = lexicon + p = [] + for phrase, action in lexicon: + p.append("(?:%s)(?P#%d)" % (phrase, len(p))) + self.scanner = sre.compile("|".join(p)) + def scan(self, string): + result = [] + append = result.append + match = self.scanner.match + i = 0 + while 1: + m = match(string, i) + if not m: + break + j = m.end() + if i == j: + break + action = self.lexicon[m.index][1] + if callable(action): + self.match = match + action = action(self, m.group()) + if action is not None: + append(action) + i = j + return result, string[i:] Index: sre_compile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** sre_compile.py 2000/07/02 12:00:06 1.20 --- sre_compile.py 2000/07/02 17:33:27 1.21 *************** *** 209,213 **** emit(OPCODES[op]) emit(av-1) ! elif op is MARK: emit(OPCODES[op]) emit(av) --- 209,213 ---- emit(OPCODES[op]) emit(av-1) ! elif op in (MARK, INDEX): emit(OPCODES[op]) emit(av) Index: sre_constants.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_constants.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** sre_constants.py 2000/07/02 12:00:06 1.14 --- sre_constants.py 2000/07/02 17:33:27 1.15 *************** *** 34,37 **** --- 34,38 ---- IN = "in" IN_IGNORE = "in_ignore" + INDEX = "index" INFO = "info" JUMP = "jump" *************** *** 91,94 **** --- 92,96 ---- CHARSET, GROUP, GROUP_IGNORE, + INDEX, IN, IN_IGNORE, INFO, Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** sre_parse.py 2000/07/02 12:00:06 1.21 --- sre_parse.py 2000/07/02 17:33:27 1.22 *************** *** 452,455 **** --- 452,472 ---- raise error, "unknown group name" subpattern.append((GROUP, gid)) + elif source.match("#"): + index = "" + while 1: + char = source.get() + if char is None: + raise error, "unterminated index" + if char == ")": + break + index = index + char + try: + index = int(index) + if index < 0 or index > MAXREPEAT: + raise ValueError + except ValueError: + raise error, "illegal index" + subpattern.append((INDEX, index)) + continue else: char = source.get() From python-dev@python.org Sun Jul 2 21:17:11 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 2 Jul 2000 13:17:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mathmodule.c,2.47,2.48 Message-ID: <200007022017.NAA25954@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv25919/python/dist/src/modules Modified Files: mathmodule.c Log Message: Repair docs for math.frexp (they were wrong). Reported on c.l.py by Kirill Simonov. Index: mathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v retrieving revision 2.47 retrieving revision 2.48 diff -C2 -r2.47 -r2.48 *** mathmodule.c 2000/06/30 23:58:05 2.47 --- mathmodule.c 2000/07/02 20:17:08 2.48 *************** *** 172,176 **** "frexp(x)\n\ \n\ ! Return the matissa and exponent for x. The mantissa is positive."; --- 172,178 ---- "frexp(x)\n\ \n\ ! Return the matissa and exponent of x, as pair (m, e).\n\ ! m is a float and e is an int, such that x = m * 2.**e.\n\ ! If x is 0, m and e are both 0. Else 0.5 <= abs(m) < 1.0."; From python-dev@python.org Sun Jul 2 23:25:42 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 2 Jul 2000 15:25:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre_compile.py,1.21,1.22 sre_parse.py,1.22,1.23 Message-ID: <200007022225.PAA13755@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv13488/Lib Modified Files: sre_compile.py sre_parse.py Log Message: - experimental: added two new attributes to the match object: "lastgroup" is the name of the last matched capturing group, "lastindex" is the index of the same group. if no group was matched, both attributes are set to None. the (?P#) feature will be removed in the next relase. Index: sre_compile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** sre_compile.py 2000/07/02 17:33:27 1.21 --- sre_compile.py 2000/07/02 22:25:39 1.22 *************** *** 299,305 **** "sorry, but this version only supports 100 named groups" return _sre.compile( pattern, flags, array.array(WORDSIZE, code).tostring(), ! p.pattern.groups-1, p.pattern.groupdict ) --- 299,311 ---- "sorry, but this version only supports 100 named groups" + # map in either direction + groupindex = p.pattern.groupdict + indexgroup = [None] * p.pattern.groups + for k, i in groupindex.items(): + indexgroup[i] = k + return _sre.compile( pattern, flags, array.array(WORDSIZE, code).tostring(), ! p.pattern.groups-1, groupindex, indexgroup ) Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** sre_parse.py 2000/07/02 17:33:27 1.22 --- sre_parse.py 2000/07/02 22:25:39 1.23 *************** *** 516,519 **** --- 516,521 ---- while 1: p = _parse(source, state) + if group is not None: + p.append((INDEX, group)) if source.match(")"): if b: From python-dev@python.org Sun Jul 2 23:25:42 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 2 Jul 2000 15:25:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.21,2.22 sre.h,2.11,2.12 Message-ID: <200007022225.PAA13760@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv13488/Modules Modified Files: _sre.c sre.h Log Message: - experimental: added two new attributes to the match object: "lastgroup" is the name of the last matched capturing group, "lastindex" is the index of the same group. if no group was matched, both attributes are set to None. the (?P#) feature will be removed in the next relase. Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** _sre.c 2000/07/02 17:33:27 2.21 --- _sre.c 2000/07/02 22:25:39 2.22 *************** *** 1105,1111 **** int groups = 0; PyObject* groupindex = NULL; ! if (!PyArg_ParseTuple(args, "OiO!|iO", &pattern, &flags, &PyString_Type, &code, ! &groups, &groupindex)) return NULL; --- 1105,1112 ---- int groups = 0; PyObject* groupindex = NULL; ! PyObject* indexgroup = NULL; ! if (!PyArg_ParseTuple(args, "OiO!|iOO", &pattern, &flags, &PyString_Type, &code, ! &groups, &groupindex, &indexgroup)) return NULL; *************** *** 1128,1131 **** --- 1129,1135 ---- self->groupindex = groupindex; + Py_XINCREF(indexgroup); + self->indexgroup = indexgroup; + return (PyObject*) self; } *************** *** 1884,1888 **** PyErr_Clear(); ! /* attributes */ if (!strcmp(name, "string")) { Py_INCREF(self->string); --- 1888,1913 ---- PyErr_Clear(); ! if (!strcmp(name, "lastindex")) { ! /* experimental */ ! if (self->index >= 0) ! return Py_BuildValue("i", self->index); ! Py_INCREF(Py_None); ! return Py_None; ! } ! ! if (!strcmp(name, "lastgroup")) { ! /* experimental */ ! if (self->pattern->indexgroup) { ! PyObject* result = PySequence_GetItem( ! self->pattern->indexgroup, self->index ! ); ! if (result) ! return result; ! PyErr_Clear(); ! } ! Py_INCREF(Py_None); ! return Py_None; ! } ! if (!strcmp(name, "string")) { Py_INCREF(self->string); *************** *** 1900,1912 **** if (!strcmp(name, "endpos")) return Py_BuildValue("i", 0); /* FIXME */ - - if (!strcmp(name, "index")) { - /* experimental */ - if (self->index < 0) { - Py_INCREF(Py_None); - return Py_None; - } else - return Py_BuildValue("i", self->index); - } PyErr_SetString(PyExc_AttributeError, name); --- 1925,1928 ---- Index: sre.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sre.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** sre.h 2000/07/02 17:33:27 2.11 --- sre.h 2000/07/02 22:25:39 2.12 *************** *** 22,25 **** --- 22,26 ---- int groups; PyObject* groupindex; + PyObject* indexgroup; /* compatibility */ PyObject* pattern; /* pattern source (or None) */ From python-dev@python.org Mon Jul 3 00:00:00 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 2 Jul 2000 16:00:00 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre.py,1.19,1.20 Message-ID: <200007022300.QAA15786@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv15713/Lib Modified Files: sre.py Log Message: - changed sre.Scanner to use lastindex instead of index. Index: sre.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** sre.py 2000/07/02 17:33:27 1.19 --- sre.py 2000/07/02 22:59:57 1.20 *************** *** 166,170 **** for phrase, action in lexicon: p.append("(?:%s)(?P#%d)" % (phrase, len(p))) ! self.scanner = sre.compile("|".join(p)) def scan(self, string): result = [] --- 166,170 ---- for phrase, action in lexicon: p.append("(?:%s)(?P#%d)" % (phrase, len(p))) ! self.scanner = _compile("|".join(p)) def scan(self, string): result = [] *************** *** 179,183 **** if i == j: break ! action = self.lexicon[m.index][1] if callable(action): self.match = match --- 179,183 ---- if i == j: break ! action = self.lexicon[m.lastindex][1] if callable(action): self.match = match From python-dev@python.org Mon Jul 3 00:18:46 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 2 Jul 2000 16:18:46 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC/example_nt example.dsp,1.2,1.3 example.dsw,1.1,1.2 readme.txt,1.6,1.7 example.mak,1.3,NONE Message-ID: <200007022318.QAA23342@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC/example_nt In directory slayer.i.sourceforge.net:/tmp/cvs-serv23043/python/dist/src/PC/example_nt Modified Files: example.dsp example.dsw readme.txt Removed Files: example.mak Log Message: The example_nt directory was old enough to vote. Frank Stajano pointed out some of the problems he had following the instructions, and I stumbled into the others: MSVC has changed in several respects, Python has changed the directories into which it builds its own Windows outputs, and we grew the unusual scheme of appending "_d" to the names of debug-mode output files. This should all work with VC6 + CVS Python now. Some other Windows geek please confirm! And the less you know, the better <0.5 wink>. Explanations and examples for versions of MSVC before 6, and versions of Python before 2.0b1, have been removed, because they're too different and so confuse life. This last step I OK'ed with Guido first (indeed, 'twas his idea!). Index: example.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/example_nt/example.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** example.dsp 1997/12/11 04:06:04 1.2 --- example.dsp 2000/07/02 23:18:42 1.3 *************** *** 1,4 **** # Microsoft Developer Studio Project File - Name="example" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 5.00 # ** DO NOT EDIT ** --- 1,4 ---- # Microsoft Developer Studio Project File - Name="example" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** *************** *** 18,27 **** !MESSAGE Possible choices for configuration are: !MESSAGE ! !MESSAGE "example - Win32 Release" (based on\ ! "Win32 (x86) Dynamic-Link Library") !MESSAGE "example - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP Scc_ProjName "" # PROP Scc_LocalPath "" --- 18,27 ---- !MESSAGE Possible choices for configuration are: !MESSAGE ! !MESSAGE "example - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "example - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project + # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" *************** *** 71,75 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c # ADD BASE MTL /nologo /D "_DEBUG" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 --- 71,75 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c # ADD BASE MTL /nologo /D "_DEBUG" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 Index: example.dsw =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/example_nt/example.dsw,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** example.dsw 1997/12/11 03:43:29 1.1 --- example.dsw 2000/07/02 23:18:43 1.2 *************** *** 1,8 **** ! Microsoft Developer Studio Workspace File, Format Version 5.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### ! Project: "example"=".\example.dsp" - Package Owner=<4> Package=<5> --- 1,8 ---- ! Microsoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### ! Project: "example"=.\example.dsp - Package Owner=<4> Package=<5> Index: readme.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/example_nt/readme.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** readme.txt 1997/12/11 04:01:25 1.6 --- readme.txt 2000/07/02 23:18:43 1.7 *************** *** 2,98 **** ======================================= ! This directory contains everything you need to build a Python ! extension module using Microsoft VC++ ("Developer Studio") version 4.x ! or 5.x, except for the Python distribution. It has been tested with ! VC++ 4.2 on Python 1.5a3, and with VC++ 5.0 on Python 1.5b2. ! ! The "example_nt" subdirectory should be an immediate subdirectory of ! the Python source directory -- a direct sibling of Include and PC, in ! particular, which are referenced as "..\Include" and "..\PC". In ! other words, it should *not* be used "as is". Copy or move it up one ! level or you will regret it! (This is done to keep all the PC ! specific files inside the PC subdirectory of the distribution, where ! they belong.) ! ! When using the VC++ 4.x project (makefile), it is assumed that the ! build results of Python are in the directory ..\vc40. In particular, ! the python15.lib file is referred to as "..\vc40\python15.lib". If ! you have problems with this file, the best thing to do is to delete it ! from the project and add it again. ! ! When using the VC++ 5.x project (workspace), the build results of ! Python are assumed to be in ..\PCbuild. Since the provided VC++ 5.x ! project and workspace files have a different structure (to support ! separate "release" and "debug" builds), the example project and ! workspace match this structure. ! ! In order to use the example project from VC++ 4.x, use the "File->Open ! Workspace..." dialog (*not* the "File->Open..." dialog!). Change the ! pattern to "*.mak" and select the file "example.mak". Now choose ! "File->Save All" and the othe project files will be created. ! From VC+ 5.x, do the same except don't change the pattern, and select ! the example.dsw workspace file. In order to check that everything is set up right, try building: - choose "Build->Build example.dll". This creates all intermediate and - result files in a subdirectory which is called either Debug or Release - depending on which configuration you have chosen. - - Once the build has succeeded, test the resulting DLL. In a DOS - command window, chdir to that directory. You should now be able to - repeat the following session "(C>" is the DOS prompt, ">>>" is the - Python prompt): - - C> ..\..\vc40\python.exe - >>> import example - >>> example.foo() - Hello, world - >>> - - When using VC++ 5.x, issue these commands: - - C> ..\..\PCbuild\Release\python.exe - >>> import example - >>> example.foo() - Hello, world - >>> - ! Creating the project ! -------------------- ! There are two ways to use this example to create a project for your ! own module. First, choose a name ("spam" is always a winner :-) and ! create a directory for it. Copy your C sources into it. Note that ! the module source file name does not necessarily have to match the ! module name, but the "init" function name should match the module name ! -- i.e. you can only import a module "spam" if its init function is ! called "initspam()", and it should call Py_InitModule with the string ! "spam" as its first argument. By convention, it lives in a file called "spam.c" or "spammodule.c". The output file should be called ! "spam.dll" or "spam.pyd" (the latter is supported to avoid confusion ! with a system library "spam.dll" to which your module could be a ! Python interface). Now your options are: ! 1) Clone example.mak. Start by copying example_nt\example.mak to ! spam\spam.mak. Do a global edit on spam.mak, replacing all ! occurrences of the string "example" by "spam", and all occurrences of ! "DEP_CPP_EXAMP" by something like "DEP_CPP_SPAM". You can now use ! this makefile to create a project file by opening it as a workspace ! (you have to change the pattern to *.mak first). (When using VC++ ! 5.x, you can clone example.dsp and example.dsw in a similar way.) 2) Create a brand new project; instructions are below. ! In both cases, copy example_nt\example.def to spam\spam.def, and edit ! spam\spam.def so its second line contains the string "initspam". If ! you created a new project yourself, add the file spam.def to the ! project now. (This is an annoying little file with only two lines. ! An alternative approach is to forget about the .def file, and add the ! option "/export:initspam" somewhere to the Link settings, by manually ! editing the "Project Options" box). You are now all set to build your extension, unless it requires other --- 2,114 ---- ======================================= ! This directory contains everything needed (except for the Python ! distribution!) to build a Python extension module using Microsoft VC++ ! ("Developer Studio") version 6. It has been tested with VC++ 6.0 on Python ! 2.0b1. You can also use earlier versions of VC to build Python extensions, ! but the sample VC project file (example.dsw in this directory) is in VC 6 ! format. ! COPY THIS DIRECTORY! ! -------------------- ! This "example_nt" directory is a subdirectory of the PC directory, in order ! to keep all the PC-specific files under the same directory. However, the ! example_nt directory can't actually be used from this location. You first ! need to copy or move it up one level, so that example_nt is a direct ! sibling of the PC\ and Include\ directories. Do all your work from within ! this new location -- sorry, but you'll be sorry if you don't. ! ! OPEN THE PROJECT ! ---------------- ! From VC 6.x, use the ! File -> Open Workspace... ! dialog (*not* the "File -> Open..." dialog!). Navigate to and select the ! file "example.dsw". Click Open. + BUILD THE EXAMPLE DLL + --------------------- In order to check that everything is set up right, try building: ! 1. Select a configuration. This step is optional. Do ! Build -> Select Active Configuration... ! and select either "example - Win32 Release" or "example - Win32 Debug". ! If you skip this step, you'll use the Debug configuration by default. ! ! 2. Build the DLL. Do ! Build -> Build example_d.dll ! in Debug mode, or ! Build -> Build example.dll ! in Release mode. ! This creates all intermediate and result files in a subdirectory which ! is called either Debug or Release, depending on which configuration you ! picked in the preceding step. ! ! TESTING THE DEBUG-MODE DLL ! -------------------------- ! Once the Debug build has succeeded, bring up a DOS box, and cd to ! example_nt\Debug. You should now be able to repeat the following session ! ("C>" is the DOS prompt, ">>>" is the Python prompt) (note that various ! debug output from Python may not match this screen dump exactly): ! ! C>..\..\PCbuild\python_d ! Adding parser accelerators ... ! Done. ! Python 2.0b1 (#0, Jul 1 2000, 11:29:37) [MSC 32 bit (Intel)] on win32 ! Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam ! Copyright 1995-2000 Corporation for National Research Initiatives (CNRI) ! >>> import example ! [8830 refs] ! >>> example.foo() ! Hello, world ! [8830 refs] ! >>> ! TESTING THE RELEASE-MODE DLL ! ---------------------------- ! Once the Release build has succeeded, bring up a DOS box, and cd to ! example_nt\Release. You should now be able to repeat the following session ! ("C>" is the DOS prompt, ">>>" is the Python prompt): ! ! C>..\..\PCbuild\python ! Python 2.0b1 (#0, Jul 1 2000, 11:28:35) [MSC 32 bit (Intel)] on win32 ! Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam ! Copyright 1995-2000 Corporation for National Research Initiatives (CNRI) ! >>> import example ! >>> example.foo() ! Hello, world ! >>> ! ! Congratulations! You've successfully built your first Python extension ! module. ! ! CREATING YOUR OWN PROJECT ! ------------------------- ! Choose a name ("spam" is always a winner :-) and create a directory for ! it. Copy your C sources into it. Note that the module source file name ! does not necessarily have to match the module name, but the "init" function ! name should match the module name -- i.e. you can only import a module ! "spam" if its init function is called "initspam()", and it should call ! Py_InitModule with the string "spam" as its first argument (use the minimal ! example.c in this directory as a guide). By convention, it lives in a file called "spam.c" or "spammodule.c". The output file should be called ! "spam.dll" or "spam.pyd" (the latter is supported to avoid confusion with a ! system library "spam.dll" to which your module could be a Python interface) ! in Release mode, or spam_d.dll or spam_d.pyd in Debug mode. Now your options are: ! 1) Copy example.dsw and example.dsp, rename them to spam.*, and edit them ! by hand. + or + 2) Create a brand new project; instructions are below. ! In either case, copy example_nt\example.def to spam\spam.def, and edit the ! new spam.def so its second line contains the string "initspam". If you ! created a new project yourself, add the file spam.def to the project now. ! (This is an annoying little file with only two lines. An alternative ! approach is to forget about the .def file, and add the option ! "/export:initspam" somewhere to the Link settings, by manually editing the ! "Project Options" box). You are now all set to build your extension, unless it requires other *************** *** 101,148 **** ! Creating a brand new project ---------------------------- ! ! If you don't feel comfortable with editing Makefiles or project and ! workspace files, you can create a brand new project from scratch ! easily. ! ! Use the "File->New..." dialog to create a new Project Workspace. ! Select Dynamic-Link Library, enter the name ("spam"), and make sure ! the "Location" is set to the spam directory you have created (which ! should be a direct subdirectory of the Python build tree). Select ! Win32 as the platform (in my version, this is the only choice). Click ! "Create". ! ! Now open the "Build->Settings..." dialog. (Impressive, isn't it? :-) ! You only need to change a few settings. Make sure you have both the ! Debug and the Release configuration selected when you make the first ! change. Select the "C/C++" tab. Choose the "Preprocessor" category ! in the popup menu at the top. Type the following text in the entry ! box labeled "Addditional include directories:" ! ! ..\Include,..\PC ! ! Next, for both configurations, select the "Link" tab, choose the ! "General" category, and add "python15.lib" to the end of the ! "Object/library modules" box. ! ! Then, separately for the Release and Debug configurations, choose the ! "Input" category in the Link tab, and enter "..\PCbuild\Release" or ! "..\PCbuild\Debug", respectively, in the "Additional library path" ! box. ! ! Finally, you must change the run-time library. This must also be done ! separately for the Release and Debug configurations. Choose the "Code ! Generation" category in the C/C++ tab. In the box labeled "Use ! run-time library", choose "Multithreaded DLL" for the Release ! configuration, and "Debug Multithreaded DLL" for the Debug ! configuration. That's all. ! ! You should now first create the file spam.def as instructed in the ! previous section. ! ! Now chose the "Insert->Files into Project..." dialog. Set the pattern ! to *.* and select both spam.c and spam.def and click OK. (Inserting ! them one by one is fine too.) ! --- 117,165 ---- ! CREATING A BRAND NEW PROJECT ---------------------------- ! Use the ! File -> New... -> Projects ! dialog to create a new Project Workspace. Select "Win32 Dynamic-Link ! Library", enter the name ("spam"), and make sure the "Location" is set to ! the spam directory you have created (which should be a direct subdirectory ! of the Python build tree, a sibling of Inclue and PC). Select Win32 as the ! platform (in my version, this is the only choice). Make sure the "Create ! new workspace" radio button is selected. Click OK. ! ! Now open the ! Project -> Settings... ! dialog. (Impressive, isn't it? :-) You only need to change a few ! settings. Make sure "All Configurations" is selected from the "Settings ! for:" dropdown list. Select the "C/C++" tab. Choose the "Preprocessor" ! category in the popup menu at the top. Type the following text in the ! entry box labeled "Addditional include directories:" ! ! ..\Include,..\PC ! ! Then, choose the "Input" category in the Link tab, and enter ! ..\PCbuild ! in the "Additional library path:" box. ! ! Now you need to add some mode-specific settings: ! ! Select "Win32 Release" in the "Settings for:" dropdown list. Click the ! "Link" tab, choose the "Input" Category, and append "python20.lib" to the ! list in the "Object/library modules:" box. ! ! Select "Win32 Debug" in the "Settings for:" dropdown list, and append ! "python20_d.lib" to the list in the "Object/library modules:" box. Then ! click on the C/C++ tab, select "Code Generation" from the "Category:" ! dropdown list, and select "Debug Multithreaded DLL" from the "Use run-time ! library:" dropdown list. ! ! Select "Win32 Release" again from the "Settings for:" dropdown list. ! Select "Multithreaded DLL" from the "Use run-time library:" dropdown list. ! ! That's all . ! ! You should now create the file spam.def as instructed in the previous ! section. Then chose the ! Insert -> Files into Project... ! dialog. Set the pattern to *.* and select both spam.c and spam.def and ! click OK. (Inserting them one by one is fine too.) From python-dev@python.org Mon Jul 3 00:21:51 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 2 Jul 2000 16:21:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC/example_nt example.dsp,1.3,1.4 Message-ID: <200007022321.QAA23494@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC/example_nt In directory slayer.i.sourceforge.net:/tmp/cvs-serv23461/python/dist/src/PC/example_nt Modified Files: example.dsp Log Message: Checked in a wrong version. Index: example.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/example_nt/example.dsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** example.dsp 2000/07/02 23:18:42 1.3 --- example.dsp 2000/07/02 23:21:49 1.4 *************** *** 54,58 **** LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib python15.lib /nologo /subsystem:windows /dll /machine:I386 /libpath:"..\PCbuild\Release" /export:initexample # SUBTRACT LINK32 /pdb:none --- 54,58 ---- LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib python20.lib /nologo /subsystem:windows /dll /machine:I386 /libpath:"..\PCbuild" /export:initexample # SUBTRACT LINK32 /pdb:none *************** *** 81,85 **** LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib python15.lib /nologo /subsystem:windows /dll /debug /machine:I386 /libpath:"..\PCbuild\Debug" /export:initexample # SUBTRACT LINK32 /pdb:none --- 81,85 ---- LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib python20_d.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:".\Debug/example_d.dll" /libpath:"..\PCbuild" /export:initexample # SUBTRACT LINK32 /pdb:none From python-dev@python.org Mon Jul 3 07:38:19 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 2 Jul 2000 23:38:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libmath.tex,1.21,1.22 Message-ID: <200007030638.XAA22944@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv22936/lib Modified Files: libmath.tex Log Message: Tim-blessed documentation for math.frexp(). Index: libmath.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmath.tex,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** libmath.tex 2000/05/18 05:07:38 1.21 --- libmath.tex 2000/07/03 06:38:17 1.22 *************** *** 65,74 **** \begin{funcdesc}{frexp}{x} ! Convert a floating-point number to fractional and integral ! components. If \var{x} is zero, returns \code{(0.0, 0)}, otherwise ! returns \code{(\var{frac}, \var{exp})} such that \code{\var{frac} * ! 2**\var{exp}} will equal \var{x}. \var{exp} will be an integer, and ! the absolute value of \var{frac} will be in the range [0.5, 1.0) ! (\var{frac} will share the sign of \var{x}). \end{funcdesc} --- 65,74 ---- \begin{funcdesc}{frexp}{x} ! % Blessed by Tim. ! Return the mantissa and exponent of \var{x} as the pair ! \code{(\var{m}, \var{e})}. \var{m} is a float and \var{e} is an ! integer such that \code{\var{x} == \var{m} * 2**\var{e}}. ! If \var{x} is zero, returns \code{(0.0, 0)}, otherwise ! \code{0.5 <= abs(\var{m}) < 1}. \end{funcdesc} From python-dev@python.org Mon Jul 3 08:23:16 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 00:23:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib string.py,1.49,1.50 Message-ID: <200007030723.AAA31664@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv31657 Modified Files: string.py Log Message: Martin von Löwis : This patch delegates more string functions to string object methods, uses the varargs delegation syntax, and stops using stringold. Closes SourceForge patch #100712. Index: string.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/string.py,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -r1.49 -r1.50 *** string.py 2000/04/05 20:11:18 1.49 --- string.py 2000/07/03 07:23:13 1.50 *************** *** 126,132 **** joinfields = join - # for a little bit of speed - _apply = apply - # Find substring, raise exception if not found def index(s, *args): --- 126,129 ---- *************** *** 136,140 **** """ ! return _apply(s.index, args) # Find last substring, raise exception if not found --- 133,137 ---- """ ! return s.index(*args) # Find last substring, raise exception if not found *************** *** 145,149 **** """ ! return _apply(s.rindex, args) # Count non-overlapping occurrences of substring --- 142,146 ---- """ ! return s.rindex(*args) # Count non-overlapping occurrences of substring *************** *** 156,160 **** """ ! return _apply(s.count, args) # Find substring, return -1 if not found --- 153,157 ---- """ ! return s.count(*args) # Find substring, return -1 if not found *************** *** 169,173 **** """ ! return _apply(s.find, args) # Find last substring, return -1 if not found --- 166,170 ---- """ ! return s.find(*args) # Find last substring, return -1 if not found *************** *** 182,186 **** """ ! return _apply(s.rfind, args) # for a bit of speed --- 179,183 ---- """ ! return s.rfind(*args) # for a bit of speed *************** *** 240,246 **** """ ! n = width - len(s) ! if n <= 0: return s ! return s + ' '*n # Right-justify a string --- 237,241 ---- """ ! return s.ljust(width) # Right-justify a string *************** *** 253,259 **** """ ! n = width - len(s) ! if n <= 0: return s ! return ' '*n + s # Center a string --- 248,252 ---- """ ! return s.rjust(width) # Center a string *************** *** 266,276 **** """ ! n = width - len(s) ! if n <= 0: return s ! half = n/2 ! if n%2 and width%2: ! # This ensures that center(center(s, i), j) = center(s, j) ! half = half+1 ! return ' '*half + s + ' '*(n-half) # Zero-fill a number, e.g., (12, 3) --> '012' and (-3, 3) --> '-03' --- 259,263 ---- """ ! return s.center(width) # Zero-fill a number, e.g., (12, 3) --> '012' and (-3, 3) --> '-03' *************** *** 303,315 **** """ ! res = line = '' ! for c in s: ! if c == '\t': ! c = ' '*(tabsize - len(line) % tabsize) ! line = line + c ! if c == '\n': ! res = res + line ! line = '' ! return res + line # Character translation through look-up table. --- 290,294 ---- """ ! return s.expandtabs(tabsize) # Character translation through look-up table. *************** *** 380,393 **** return s.replace(old, new, maxsplit) - - # XXX: transitional - # - # If string objects do not have methods, then we need to use the old string.py - # library, which uses strop for many more things than just the few outlined - # below. - try: - ''.upper - except AttributeError: - from stringold import * # Try importing optional built-in module "strop" -- if it exists, --- 359,362 ---- From python-dev@python.org Mon Jul 3 09:18:49 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 01:18:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib filecmp.py,1.5,1.6 Message-ID: <200007030818.BAA08449@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv8435 Modified Files: filecmp.py Log Message: cmpfiles(): Added shallow and use_statcache parameters, with same meanings and defaults as for filecmp.cmp(). Updated docstring accordingly, and formatted it more like others in the standard library. Index: filecmp.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/filecmp.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** filecmp.py 2000/06/29 14:13:28 1.5 --- filecmp.py 2000/07/03 08:18:47 1.6 *************** *** 17,21 **** BUFSIZE=8*1024 ! def cmp(f1, f2, shallow=1,use_statcache=0): """Compare two files. --- 17,21 ---- BUFSIZE=8*1024 ! def cmp(f1, f2, shallow=1, use_statcache=0): """Compare two files. *************** *** 268,291 **** ! # Compare common files in two directories. ! # Return: ! # - files that compare equal ! # - files that compare different ! # - funny cases (can't stat etc.) ! # ! def cmpfiles(a, b, common): """Compare common files in two directories. ! cmpfiles(a,b,common) ! A and B are directory names ! COMMON is a list of file names ! returns a tuple of three lists: files that compare equal files that are different ! filenames that aren't regular files.""" res = ([], [], []) for x in common: ! res[_cmp(os.path.join(a, x), os.path.join(b, x))].append(x) return res --- 268,290 ---- ! def cmpfiles(a, b, common, shallow=1, use_statcache=0): """Compare common files in two directories. + + a, b -- directory names + common -- list of file names found in both directories + shallow -- if true, do comparison based solely on stat() information + use_statcache -- if true, use statcache.stat() instead of os.stat() ! Returns a tuple of three lists: files that compare equal files that are different ! filenames that aren't regular files. + """ res = ([], [], []) for x in common: ! ax = os.path.join(a, x) ! bx = os.path.join(b, x) ! res[_cmp(ax, bx, shallow, use_statcache)].append(x) return res From python-dev@python.org Mon Jul 3 09:24:52 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 01:24:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libfilecmp.tex,1.1,1.2 Message-ID: <200007030824.BAA09132@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9125/lib Modified Files: libfilecmp.tex Log Message: Moshe Zadka : Substantial updates to reflect Moshe's Gordon's enhancements to the module. Additional changes from Fred to reflect his changes to the module as well. Index: libfilecmp.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfilecmp.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** libfilecmp.tex 1999/10/29 17:23:15 1.1 --- libfilecmp.tex 2000/07/03 08:24:49 1.2 *************** *** 1,4 **** \section{\module{filecmp} --- ! File Comparisons} \declaremodule{standard}{filecmp} --- 1,4 ---- \section{\module{filecmp} --- ! File and Directory Comparisons} \declaremodule{standard}{filecmp} *************** *** 6,22 **** \modulesynopsis{Compare files efficiently.} - The \module{filecmp} module defines a function to compare files, taking all - sort of short-cuts to make it a highly efficient operation. The \module{filecmp} module defines the following function: \begin{funcdesc}{cmp}{f1, f2\optional{, shallow\optional{, use_statcache}}} ! Compare the files named \var{f1} and \var{f2}, returning \code{1} ! if they seem equal, \code{0} otherwise. Unless \var{shallow} is given and is false, files with identical ! \function{os.stat()} signatures are taken to be equal. If \var{use_statcache} is given and is true, ! \function{statcache.stat()} will be called rather then \var{os.stat()}. Files that were compared using this function will not be compared again --- 6,24 ---- \modulesynopsis{Compare files efficiently.} + The \module{filecmp} module defines functions to compare files and directories, + with various optional time/correctness trade-offs. + The \module{filecmp} module defines the following function: \begin{funcdesc}{cmp}{f1, f2\optional{, shallow\optional{, use_statcache}}} ! Compare the files named \var{f1} and \var{f2}, returning \code{1} if ! they seem equal, \code{0} otherwise. Unless \var{shallow} is given and is false, files with identical ! \function{os.stat()} signatures are taken to be equal. If \var{use_statcache} is given and is true, ! \function{statcache.stat()} will be called rather then ! \function{os.stat()}; the default is to use \function{os.stat()}. Files that were compared using this function will not be compared again *************** *** 26,33 **** cache. ! Note that no external programs are called from this module giving it portability and efficiency. \end{funcdesc} Example: --- 28,49 ---- cache. ! Note that no external programs are called from this function, giving it portability and efficiency. \end{funcdesc} + \begin{funcdesc}{cmpfiles}{dir1, dir2, common\optional{, + shallow\optional{, use_statcache}}} + Returns three lists of file names: \var{match}, \var{mismatch}, + \var{errors}. \var{match} contains the list of files match in both + directories, \var{mismatch} includes the names of those that don't, + and \var{errros} lists the names of files which could not be + compared. Files may be listed in \var{errors} because the user may + lack permission to read them or many other reasons, but always that + the comparison could not be done for some reason. + + The \var{shallow} and \var{use_statcache} parameters have the same + meanings and default values as for \function{filecmp.cmp()}. + \end{funcdesc} + Example: *************** *** 39,40 **** --- 55,138 ---- 0 \end{verbatim} + + + \subsection{The \protect\class{dircmp} class \label{dircmp-objects}} + + \begin{classdesc}{dircmp}{a, b\optional{, ignore\optional{, hide}}} + Construct a new directory comparison object, to compare the + directories \var{a} and \var{b}. \var{ignore} is a list of names to + ignore, and defaults to \code{['RCS', 'CVS', 'tags']}. \var{hide} is a + list of names to hid, and defaults to \code{[os.curdir, os.pardir]}. + \end{classdesc} + + \begin{methoddesc}[dircmp]{report}{} + Print (to \code{sys.stdout}) a comparison between \var{a} and \var{b}. + \end{methoddesc} + + \begin{methoddesc}[dircmp]{report_partial_closure}{} + Print a comparison between \var{a} and \var{b} and common immediate + subdirctories. + \end{methoddesc} + + \begin{methoddesc}[dircmp]{report_full_closure}{} + Print a comparison between \var{a} and \var{b} and common + subdirctories (recursively). + \end{methoddesc} + + \begin{memberdesc}[dircmp]{left_list} + Files and subdirectories in \var{a}, filtered by \var{hide} and + \var{ignore}. + \end{memberdesc} + + \begin{memberdesc}[dircmp]{right_list} + Files and subdirectories in \var{b}, filtered by \var{hide} and + \var{ignore}. + \end{memberdesc} + + \begin{memberdesc}[dircmp]{common} + Files and subdirectories in both \var{a} and \var{b}. + \end{memberdesc} + + \begin{memberdesc}[dircmp]{left_only} + Files and subdirectories only in \var{a}. + \end{memberdesc} + + \begin{memberdesc}[dircmp]{right_only} + Files and subdirectories only in \var{b}. + \end{memberdesc} + + \begin{memberdesc}[dircmp]{common_dirs} + Subdirectories in both \var{a} and \var{b}. + \end{memberdesc} + + \begin{memberdesc}[dircmp]{common_files} + Files in both \var{a} and \var{b} + \end{memberdesc} + + \begin{memberdesc}[dircmp]{common_funny} + Names in both \var{a} and \var{b}, such that the type differs between + the directories, or names for which \function{os.stat()} reports an + error. + \end{memberdesc} + + \begin{memberdesc}[dircmp]{same_files} + Files which are identical in both \var{a} and \var{b}. + \end{memberdesc} + + \begin{memberdesc}[dircmp]{diff_files} + Files which are in both \var{a} and \var{b}, whose contents differ. + \end{memberdesc} + + \begin{memberdesc}[dircmp]{funny_files} + Files which are in both \var{a} and \var{b}, but could not be + compared. + \end{memberdesc} + + \begin{memberdesc}[dircmp]{subdirs} + A dictionary mapping names in \member{common_dirs} to + \class{dircmp} objects. + \end{memberdesc} + + Note that via \method{__getattr__()} hooks, all attributes are + computed lazilly, so there is no speed penalty if only those + attributes which are lightweight to compute are used. From python-dev@python.org Mon Jul 3 10:56:26 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 02:56:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib shlex.py,1.7,1.8 Message-ID: <200007030956.CAA25001@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv24985/Lib Modified Files: shlex.py Log Message: Eric S. Raymond : This patch implements relative-path semantics for the "source" facility resembling those of cpp(1), documents the change, and improves the shlex test main to make it easier to test this feature. Along the way, it fixes a name error in the existing docs. [Additional documentation markup changes for consistency by FLD.] Index: shlex.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/shlex.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** shlex.py 2000/05/01 20:14:12 1.7 --- shlex.py 2000/07/03 09:56:23 1.8 *************** *** 4,9 **** --- 4,11 ---- # Input stacking and error message cleanup added by ESR, March 2000 + import os.path import sys + class shlex: "A lexical analyzer class for simple shell-like syntaxes." *************** *** 27,31 **** self.source = None if self.debug: ! print 'shlex: reading from %s, line %d' % (self.instream,self.lineno) def push_token(self, tok): --- 29,34 ---- self.source = None if self.debug: ! print 'shlex: reading from %s, line %d' \ ! % (self.instream, self.lineno) def push_token(self, tok): *************** *** 48,52 **** while raw == self.source: (newfile, newstream) = self.sourcehook(self.read_token()) ! self.filestack = [(self.infile,self.instream,self.lineno)] + self.filestack self.infile = newfile self.instream = newstream --- 51,55 ---- while raw == self.source: (newfile, newstream) = self.sourcehook(self.read_token()) ! self.filestack.insert(0, (self.infile, self.instream, self.lineno)) self.infile = newfile self.instream = newstream *************** *** 64,68 **** self.filestack = self.filestack[1:] if self.debug: ! print 'shlex: popping to %s, line %d' % (self.instream, self.lineno) self.state = ' ' raw = self.get_token() --- 67,72 ---- self.filestack = self.filestack[1:] if self.debug: ! print 'shlex: popping to %s, line %d' \ ! % (self.instream, self.lineno) self.state = ' ' raw = self.get_token() *************** *** 83,87 **** self.lineno = self.lineno + 1 if self.debug >= 3: ! print "shlex: in state " + repr(self.state) + " I see character: " + repr(nextchar) if self.state == None: self.token = ''; # past end of file --- 87,92 ---- self.lineno = self.lineno + 1 if self.debug >= 3: ! print "shlex: in state", repr(self.state), \ ! "I see character:", repr(nextchar) if self.state == None: self.token = ''; # past end of file *************** *** 157,160 **** --- 162,168 ---- if newfile[0] == '"': newfile = newfile[1:-1] + # This implements cpp-like semantics for relative-path inclusion. + if type(self.infile) == type("") and not os.path.isabs(newfile): + newfile = os.path.join(os.path.dirname(self.infile), newfile) return (newfile, open(newfile, "r")) *************** *** 167,177 **** return "\"%s\", line %d: " % (infile, lineno) - if __name__ == '__main__': ! lexer = shlex() while 1: tt = lexer.get_token() ! print "Token: " + repr(tt) ! if not tt: break - --- 175,189 ---- return "\"%s\", line %d: " % (infile, lineno) ! if __name__ == '__main__': ! if len(sys.argv) == 1: ! lexer = shlex() ! else: ! file = sys.argv[1] ! lexer = shlex(open(file), file) while 1: tt = lexer.get_token() ! if tt: ! print "Token: " + repr(tt) ! else: break From python-dev@python.org Mon Jul 3 10:56:25 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 02:56:25 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libshlex.tex,1.7,1.8 Message-ID: <200007030956.CAA24997@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv24985/Doc/lib Modified Files: libshlex.tex Log Message: Eric S. Raymond : This patch implements relative-path semantics for the "source" facility resembling those of cpp(1), documents the change, and improves the shlex test main to make it easier to test this feature. Along the way, it fixes a name error in the existing docs. [Additional documentation markup changes for consistency by FLD.] Index: libshlex.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libshlex.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** libshlex.tex 2000/05/01 20:14:47 1.7 --- libshlex.tex 2000/07/03 09:56:23 1.8 *************** *** 14,18 **** Python applications. ! \begin{classdesc}{shlex}{\optional{stream}, \optional{file}} A \class{shlex} instance or subclass instance is a lexical analyzer object. The initialization argument, if present, specifies where to --- 14,18 ---- Python applications. ! \begin{classdesc}{shlex}{\optional{stream\optional{, file}}} A \class{shlex} instance or subclass instance is a lexical analyzer object. The initialization argument, if present, specifies where to *************** *** 36,39 **** --- 36,40 ---- A \class{shlex} instance has the following methods: + \begin{methoddesc}{get_token}{} Return a token. If tokens have been stacked using *************** *** 53,85 **** \end{methoddesc} ! \begin{methoddesc}{openhook}{filename} ! When shlex detects a source request (see \member{source} below) ! this method is given the following token as argument, and expected to ! return a tuple consisting of a filename and an opened stream object. ! ! Normally, this method just strips any quotes off the argument and ! treats it as a filename, calling \code{open()} on it. It is exposed so that ! you can use it to implement directory search paths, addition of ! file extensions, and other namespace hacks. There is no corresponding `close' hook, but a shlex instance will call ! the \code{close()} method of the sourced input stream when it returns EOF. \end{methoddesc} ! \begin{methoddesc}{error_leader}{\optional{file}, \optional{line}} This method generates an error message leader in the format of a ! Unix C compiler error label; the format is '"\%s", line \%d: ', ! where the \%s is replaced with the name of the current source file and ! the \%d with the current input line number (the optional arguments ! can be used to override these). ! ! This convenience is provided to encourage shlex users to generate ! error messages in the standard, parseable format understood by Emacs ! and other Unix tools. \end{methoddesc} Instances of \class{shlex} subclasses have some public instance ! variables which either control lexical analysis or can be used ! for debugging: \begin{memberdesc}{commenters} --- 54,96 ---- \end{methoddesc} ! \begin{methoddesc}{sourcehook}{filename} ! When \class{shlex} detects a source request (see ! \member{source} below) this method is given the following token as ! argument, and expected to return a tuple consisting of a filename and ! an open file-like object. ! ! Normally, this method first strips any quotes off the argument. If ! the result is an absolute pathname, or there was no previous source ! request in effect, or the previous source was a stream ! (e.g. \code{sys.stdin}), the result is left alone. Otherwise, if the ! result is a relative pathname, the directory part of the name of the ! file immediately before it on the source inclusion stack is prepended ! (this behavior is like the way the C preprocessor handles ! \code{\#include "file.h"}). The result of the manipulations is treated ! as a filename, and returned as the first component of the tuple, with ! \function{open()} called on it to yield the second component. + This hook is exposed so that you can use it to implement directory + search paths, addition of file extensions, and other namespace hacks. There is no corresponding `close' hook, but a shlex instance will call ! the \method{close()} method of the sourced input stream when it ! returns \EOF. \end{methoddesc} ! \begin{methoddesc}{error_leader}{\optional{file\optional{, line}}} This method generates an error message leader in the format of a ! \UNIX{} C compiler error label; the format is '"\%s", line \%d: ', ! where the \samp{\%s} is replaced with the name of the current source ! file and the \samp{\%d} with the current input line number (the ! optional arguments can be used to override these). ! ! This convenience is provided to encourage \module{shlex} users to ! generate error messages in the standard, parseable format understood ! by Emacs and other \UNIX{} tools. \end{methoddesc} Instances of \class{shlex} subclasses have some public instance ! variables which either control lexical analysis or can be used for ! debugging: \begin{memberdesc}{commenters} *************** *** 91,95 **** \begin{memberdesc}{wordchars} The string of characters that will accumulate into multi-character ! tokens. By default, includes all \ASCII{} alphanumerics and underscore. \end{memberdesc} --- 102,106 ---- \begin{memberdesc}{wordchars} The string of characters that will accumulate into multi-character ! tokens. By default, includes all \ASCII{} alphanumerics and underscore. \end{memberdesc} *************** *** 115,136 **** \begin{memberdesc}{instream} ! The input stream from which this shlex instance is reading characters. \end{memberdesc} \begin{memberdesc}{source} ! This member is None by default. If you assign a string to it, that ! string will be recognized as a lexical-level inclusion request similar ! to the `source' keyword in various shells. That is, the immediately ! following token will opened as a filename and input taken from that ! stream until EOF, at which point the \code{close()} method of that ! stream will be called and the input source will again become the ! original input stream. Source requests may be stacked any number of ! levels deep. \end{memberdesc} \begin{memberdesc}{debug} ! If this member is numeric and 1 or more, a shlex instance will print ! verbose progress output on its behavior. If you need to use this, ! you can read the module source code to learn the details. \end{memberdesc} --- 126,149 ---- \begin{memberdesc}{instream} ! The input stream from which this \class{shlex} instance is reading ! characters. \end{memberdesc} \begin{memberdesc}{source} ! This member is \code{None} by default. If you assign a string to it, ! that string will be recognized as a lexical-level inclusion request ! similar to the \samp{source} keyword in various shells. That is, the ! immediately following token will opened as a filename and input taken ! from that stream until \EOF, at which point the \method{close()} ! method of that stream will be called and the input source will again ! become the original input stream. Source requests may be stacked any ! number of levels deep. \end{memberdesc} \begin{memberdesc}{debug} ! If this member is numeric and \code{1} or more, a \class{shlex} ! instance will print verbose progress output on its behavior. If you ! need to use this, you can read the module source code to learn the ! details. \end{memberdesc} From python-dev@python.org Mon Jul 3 10:57:55 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Mon, 3 Jul 2000 02:57:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects object.c,2.80,2.81 Message-ID: <200007030957.CAA25291@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv25267/Objects Modified Files: object.c Log Message: If auto-conversion fails, the Unicode codecs will return NULL. This is now checked and the error passed on to the caller. Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.80 retrieving revision 2.81 diff -C2 -r2.80 -r2.81 *** object.c 2000/07/01 14:31:09 2.80 --- object.c 2000/07/03 09:57:53 2.81 *************** *** 269,276 **** PyObject* str; str = PyUnicode_AsEncodedString(res, NULL, NULL); ! if (str) { ! Py_DECREF(res); res = str; ! } } if (!PyString_Check(res)) { --- 269,277 ---- PyObject* str; str = PyUnicode_AsEncodedString(res, NULL, NULL); ! Py_DECREF(res); ! if (str) res = str; ! else ! return NULL; } if (!PyString_Check(res)) { *************** *** 311,322 **** if (res == NULL) return NULL; ! if (PyUnicode_Check(res)) { ! PyObject* str; ! str = PyUnicode_AsEncodedString(res, NULL, NULL); ! if (str) { ! Py_DECREF(res); ! res = str; ! } ! } if (!PyString_Check(res)) { PyErr_Format(PyExc_TypeError, --- 312,324 ---- if (res == NULL) return NULL; ! if (PyUnicode_Check(res)) { ! PyObject* str; ! str = PyUnicode_AsEncodedString(res, NULL, NULL); ! Py_DECREF(res); ! if (str) ! res = str; ! else ! return NULL; ! } if (!PyString_Check(res)) { PyErr_Format(PyExc_TypeError, From python-dev@python.org Mon Jul 3 11:52:16 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Mon, 3 Jul 2000 03:52:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include unicodeobject.h,2.10,2.11 Message-ID: <200007031052.DAA08285@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv8276/Include Modified Files: unicodeobject.h Log Message: Added new Py_UNICODE_ISALPHA() and Py_UNICODE_ISALNUM() macros which are true for alphabetic and alphanumeric characters resp. The macros are currently implemented using the existing is* tables but will have to be updated to meet the Unicode standard definitions (add tables for non-cased letters and letter modifiers). Index: unicodeobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/unicodeobject.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** unicodeobject.h 2000/06/18 22:22:27 2.10 --- unicodeobject.h 2000/07/03 10:52:13 2.11 *************** *** 161,164 **** --- 161,175 ---- #endif + #define Py_UNICODE_ISALPHA(ch) \ + (Py_UNICODE_ISLOWER(ch) || \ + Py_UNICODE_ISUPPER(ch) || \ + Py_UNICODE_ISTITLE(ch)) + + #define Py_UNICODE_ISALNUM(ch) \ + (Py_UNICODE_ISALPHA(ch) || \ + Py_UNICODE_ISDECIMAL(ch) || \ + Py_UNICODE_ISDIGIT(ch) || \ + Py_UNICODE_ISNUMERIC(ch)) + #define Py_UNICODE_COPY(target, source, length)\ (memcpy((target), (source), (length)*sizeof(Py_UNICODE))) From python-dev@python.org Mon Jul 3 14:38:12 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 06:38:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/api api.tex,1.71,1.72 Message-ID: <200007031338.GAA12404@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/api In directory slayer.i.sourceforge.net:/tmp/cvs-serv12392/api Modified Files: api.tex Log Message: Marc-Andre Lemburg : Update the API docs for the new macros Py_UNICODE_ISALPHA() and Py_UNICODE_ISALNUM(). Index: api.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/api.tex,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -r1.71 -r1.72 *** api.tex 2000/06/30 15:52:39 1.71 --- api.tex 2000/07/03 13:38:10 1.72 *************** *** 1994,1998 **** \begin{cfuncdesc}{int}{Py_UNICODE_ISUPPER}{Py_UNICODE ch} ! Returns 1/0 depending on whether \var{ch} is a uppercase character. \end{cfuncdesc} --- 1994,1998 ---- \begin{cfuncdesc}{int}{Py_UNICODE_ISUPPER}{Py_UNICODE ch} ! Returns 1/0 depending on whether \var{ch} is an uppercase character. \end{cfuncdesc} *************** *** 2015,2018 **** --- 2015,2026 ---- \begin{cfuncdesc}{int}{Py_UNICODE_ISNUMERIC}{Py_UNICODE ch} Returns 1/0 depending on whether \var{ch} is a numeric character. + \end{cfuncdesc} + + \begin{cfuncdesc}{int}{Py_UNICODE_ISALPHA}{Py_UNICODE ch} + Returns 1/0 depending on whether \var{ch} is an alphabetic character. + \end{cfuncdesc} + + \begin{cfuncdesc}{int}{Py_UNICODE_ISALNUM}{Py_UNICODE ch} + Returns 1/0 depending on whether \var{ch} is an alphanumeric character. \end{cfuncdesc} From python-dev@python.org Mon Jul 3 14:44:28 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 06:44:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib pty.py,1.4,1.5 Message-ID: <200007031344.GAA12804@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv12796 Modified Files: pty.py Log Message: Fix bug #379, reported by Phillip Porch : openpty(): Fallback code when os.openpty() does not exist attempted to call _slave_open(), which should have been slave_open(). This bug only showed on platforms which do not provide a working openpty() in the C library. Index: pty.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/pty.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** pty.py 2000/06/28 16:40:38 1.4 --- pty.py 2000/07/03 13:44:25 1.5 *************** *** 26,30 **** pass master_fd, slave_name = _open_terminal() ! slave_fd = _slave_open(slave_name) return master_fd, slave_fd --- 26,30 ---- pass master_fd, slave_name = _open_terminal() ! slave_fd = slave_open(slave_name) return master_fd, slave_fd From python-dev@python.org Mon Jul 3 15:32:07 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 07:32:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libsgmllib.tex,1.18,1.19 Message-ID: <200007031432.HAA22037@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv22029/lib Modified Files: libsgmllib.tex Log Message: get_starttag_text(): Document this method. Index: libsgmllib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsgmllib.tex,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** libsgmllib.tex 1999/04/22 18:25:32 1.18 --- libsgmllib.tex 2000/07/03 14:32:04 1.19 *************** *** 71,74 **** --- 71,82 ---- \end{methoddesc} + \begin{methoddesc}{get_starttag_text}{} + Return the text of the most recently opened start tag. This should + not normally be needed for structured processing, but may be useful in + dealing with HTML ``as deployed'' or for re-generating input with + minimal changes (whitespace between attributes can be preserved, + etc.). + \end{methoddesc} + \begin{methoddesc}{handle_starttag}{tag, method, attributes} This method is called to handle start tags for which either a From python-dev@python.org Mon Jul 3 17:37:45 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 09:37:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_minidom.py,1.1,1.2 Message-ID: <200007031637.JAA10323@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv10312/test Modified Files: test_minidom.py Log Message: Compute the name of the test file so that it can be found both when this test is run as a script and when imported via the regression test framework. Problem reported by Phillip Porch . Index: test_minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_minidom.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_minidom.py 2000/07/01 14:50:21 1.1 --- test_minidom.py 2000/07/03 16:37:42 1.2 *************** *** 1,6 **** from xml.dom.minidom import parse, Node, Document, parseString ! import traceback, sys ! tstfile="test.xml" Node._debug=1 --- 1,16 ---- + # test for xml.dom.minidom + from xml.dom.minidom import parse, Node, Document, parseString ! ! import os.path ! import sys ! import traceback ! if __name__ == "__main__": ! base = sys.argv[0] ! else: ! base = __file__ ! tstfile = os.path.join(os.path.dirname(base), "test.xml") ! del base Node._debug=1 From python-dev@python.org Mon Jul 3 19:07:45 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 11:07:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules parsermodule.c,2.41,2.42 Message-ID: <200007031807.LAA28166@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv28159 Modified Files: parsermodule.c Log Message: Andrew Kuchling : Typo in string literal: execpt --> except Index: parsermodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v retrieving revision 2.41 retrieving revision 2.42 diff -C2 -r2.41 -r2.42 *** parsermodule.c 2000/06/30 23:58:05 2.41 --- parsermodule.c 2000/07/03 18:07:43 2.42 *************** *** 1652,1656 **** && validate_suite(CHILD(tree, nch - 1))); else { ! const char* name = "execpt"; char buffer[60]; if (TYPE(CHILD(tree, nch - 3)) != except_clause) --- 1652,1656 ---- && validate_suite(CHILD(tree, nch - 1))); else { ! const char* name = "except"; char buffer[60]; if (TYPE(CHILD(tree, nch - 3)) != except_clause) From python-dev@python.org Mon Jul 3 19:11:59 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 11:11:59 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mathmodule.c,2.48,2.49 Message-ID: <200007031811.LAA28478@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv28471 Modified Files: mathmodule.c Log Message: ANSI-fication, remove Py_PROTO, etc. Revise math_1(), math_2(), stub-generating macros, and function tables to use PyArg_ParseTuple() and properly provide the function name for error message generation. Fix pow() docstring for MPW 3.1; had said "power" instead of "pow". Index: mathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v retrieving revision 2.48 retrieving revision 2.49 diff -C2 -r2.48 -r2.49 *** mathmodule.c 2000/07/02 20:17:08 2.48 --- mathmodule.c 2000/07/03 18:11:56 2.49 *************** *** 17,24 **** #ifndef _MSC_VER #ifndef __STDC__ ! extern double fmod Py_PROTO((double, double)); ! extern double frexp Py_PROTO((double, int *)); ! extern double ldexp Py_PROTO((double, int)); ! extern double modf Py_PROTO((double, double *)); #endif /* __STDC__ */ #endif /* _MSC_VER */ --- 17,24 ---- #ifndef _MSC_VER #ifndef __STDC__ ! extern double fmod (double, double); ! extern double frexp (double, int *); ! extern double ldexp (double, int); ! extern double modf (double, double *); #endif /* __STDC__ */ #endif /* _MSC_VER */ *************** *** 52,61 **** static PyObject * ! math_1(args, func) ! PyObject *args; ! double (*func) Py_FPROTO((double)); { double x; ! if (! PyArg_Parse(args, "d", &x)) return NULL; errno = 0; --- 52,59 ---- static PyObject * ! math_1(PyObject *args, double (*func) (double), char *argsfmt) { double x; ! if (! PyArg_ParseTuple(args, argsfmt, &x)) return NULL; errno = 0; *************** *** 71,80 **** static PyObject * ! math_2(args, func) ! PyObject *args; ! double (*func) Py_FPROTO((double, double)); { double x, y; ! if (! PyArg_Parse(args, "(dd)", &x, &y)) return NULL; errno = 0; --- 69,76 ---- static PyObject * ! math_2(PyObject *args, double (*func) (double, double), char *argsfmt) { double x, y; ! if (! PyArg_ParseTuple(args, argsfmt, &x, &y)) return NULL; errno = 0; *************** *** 89,163 **** } ! #define FUNC1(stubname, func, docstring_name, docstring) \ ! static PyObject * stubname(self, args) PyObject *self, *args; { \ ! return math_1(args, func); \ }\ ! static char docstring_name [] = docstring; ! #define FUNC2(stubname, func, docstring_name, docstring) \ ! static PyObject * stubname(self, args) PyObject *self, *args; { \ ! return math_2(args, func); \ }\ ! static char docstring_name [] = docstring; ! FUNC1(math_acos, acos, math_acos_doc, "acos(x)\n\nReturn the arc cosine of x.") ! FUNC1(math_asin, asin, math_asin_doc, "asin(x)\n\nReturn the arc sine of x.") ! FUNC1(math_atan, atan, math_atan_doc, "atan(x)\n\nReturn the arc tangent of x.") ! FUNC2(math_atan2, atan2, math_atan2_doc, "atan2(y, x)\n\nReturn atan(y/x).") ! FUNC1(math_ceil, ceil, math_ceil_doc, "ceil(x)\n\nReturn the ceiling of x as a real.") ! FUNC1(math_cos, cos, math_cos_doc, "cos(x)\n\nReturn the cosine of x.") ! FUNC1(math_cosh, cosh, math_cosh_doc, "cosh(x)\n\nReturn the hyperbolic cosine of x.") ! FUNC1(math_exp, exp, math_exp_doc, "exp(x)\n\nReturn e raised to the power of x.") ! FUNC1(math_fabs, fabs, math_fabs_doc, "fabs(x)\n\nReturn the absolute value of the real x.") ! FUNC1(math_floor, floor, math_floor_doc, "floor(x)\n\nReturn the floor of x as a real.") ! FUNC2(math_fmod, fmod, math_fmod_doc, "fmod(x,y)\n\nReturn x % y.") ! FUNC2(math_hypot, hypot, math_hypot_doc, "hypot(x,y)\n\nReturn the Euclidean distance, sqrt(x*x + y*y).") ! FUNC1(math_log, log, math_log_doc, "log(x)\n\nReturn the natural logarithm of x.") ! FUNC1(math_log10, log10, math_log10_doc, "log10(x)\n\nReturn the base-10 logarithm of x.") #ifdef MPW_3_1 /* This hack is needed for MPW 3.1 but not for 3.2 ... */ ! FUNC2(math_pow, power, math_pow_doc, ! "power(x,y)\n\nReturn x**y.") #else ! FUNC2(math_pow, pow, math_pow_doc, "pow(x,y)\n\nReturn x**y.") #endif #ifdef HAVE_RINT ! FUNC1(math_rint, rint, math_rint_doc, "rint(x)\n\nReturn the integer nearest to x as a real.") #endif ! FUNC1(math_sin, sin, math_sin_doc, "sin(x)\n\nReturn the sine of x.") ! FUNC1(math_sinh, sinh, math_sinh_doc, "sinh(x)\n\nReturn the hyperbolic sine of x.") ! FUNC1(math_sqrt, sqrt, math_sqrt_doc, "sqrt(x)\n\nReturn the square root of x.") ! FUNC1(math_tan, tan, math_tan_doc, "tan(x)\n\nReturn the tangent of x.") ! FUNC1(math_tanh, tanh, math_tanh_doc, "tanh(x)\n\nReturn the hyperbolic tangent of x.") static PyObject * ! math_frexp(self, args) ! PyObject *self; ! PyObject *args; { double x; int i; ! if (! PyArg_Parse(args, "d", &x)) return NULL; errno = 0; --- 85,157 ---- } ! #define FUNC1(funcname, func, docstring) \ ! static PyObject * math_##funcname(PyObject *self, PyObject *args) { \ ! return math_1(args, func, "d:" #funcname); \ }\ ! static char math_##funcname##_doc [] = docstring; ! #define FUNC2(funcname, func, docstring) \ ! static PyObject * math_##funcname(PyObject *self, PyObject *args) { \ ! return math_2(args, func, "dd:" #funcname); \ }\ ! static char math_##funcname##_doc [] = docstring; ! FUNC1(acos, acos, "acos(x)\n\nReturn the arc cosine of x.") ! FUNC1(asin, asin, "asin(x)\n\nReturn the arc sine of x.") ! FUNC1(atan, atan, "atan(x)\n\nReturn the arc tangent of x.") ! FUNC2(atan2, atan2, "atan2(y, x)\n\nReturn atan(y/x).") ! FUNC1(ceil, ceil, "ceil(x)\n\nReturn the ceiling of x as a real.") ! FUNC1(cos, cos, "cos(x)\n\nReturn the cosine of x.") ! FUNC1(cosh, cosh, "cosh(x)\n\nReturn the hyperbolic cosine of x.") ! FUNC1(exp, exp, "exp(x)\n\nReturn e raised to the power of x.") ! FUNC1(fabs, fabs, "fabs(x)\n\nReturn the absolute value of the real x.") ! FUNC1(floor, floor, "floor(x)\n\nReturn the floor of x as a real.") ! FUNC2(fmod, fmod, "fmod(x,y)\n\nReturn x % y.") ! FUNC2(hypot, hypot, "hypot(x,y)\n\nReturn the Euclidean distance, sqrt(x*x + y*y).") ! FUNC1(log, log, "log(x)\n\nReturn the natural logarithm of x.") ! FUNC1(log10, log10, "log10(x)\n\nReturn the base-10 logarithm of x.") #ifdef MPW_3_1 /* This hack is needed for MPW 3.1 but not for 3.2 ... */ ! FUNC2(pow, power, ! "pow(x,y)\n\nReturn x**y.") #else ! FUNC2(pow, pow, "pow(x,y)\n\nReturn x**y.") #endif #ifdef HAVE_RINT ! FUNC1(rint, rint, "rint(x)\n\nReturn the integer nearest to x as a real.") #endif ! FUNC1(sin, sin, "sin(x)\n\nReturn the sine of x.") ! FUNC1(sinh, sinh, "sinh(x)\n\nReturn the hyperbolic sine of x.") ! FUNC1(sqrt, sqrt, "sqrt(x)\n\nReturn the square root of x.") ! FUNC1(tan, tan, "tan(x)\n\nReturn the tangent of x.") ! FUNC1(tanh, tanh, "tanh(x)\n\nReturn the hyperbolic tangent of x.") static PyObject * ! math_frexp(PyObject *self, PyObject *args) { double x; int i; ! if (! PyArg_ParseTuple(args, "d:frexp", &x)) return NULL; errno = 0; *************** *** 178,188 **** static PyObject * ! math_ldexp(self, args) ! PyObject *self; ! PyObject *args; { double x; int exp; ! if (! PyArg_Parse(args, "(di)", &x, &exp)) return NULL; errno = 0; --- 172,180 ---- static PyObject * ! math_ldexp(PyObject *self, PyObject *args) { double x; int exp; ! if (! PyArg_ParseTuple(args, "di:ldexp", &x, &exp)) return NULL; errno = 0; *************** *** 204,221 **** static PyObject * ! math_modf(self, args) ! PyObject *self; ! PyObject *args; { double x, y; ! if (! PyArg_Parse(args, "d", &x)) return NULL; errno = 0; #ifdef MPW /* MPW C modf expects pointer to extended as second argument */ ! { ! extended e; ! x = modf(x, &e); ! y = e; ! } #else x = modf(x, &y); --- 196,211 ---- static PyObject * ! math_modf(PyObject *self, PyObject *args) { double x, y; ! if (! PyArg_ParseTuple(args, "d:modf", &x)) return NULL; errno = 0; #ifdef MPW /* MPW C modf expects pointer to extended as second argument */ ! { ! extended e; ! x = modf(x, &e); ! y = e; ! } #else x = modf(x, &y); *************** *** 235,264 **** static PyMethodDef math_methods[] = { ! {"acos", math_acos, 0, math_acos_doc}, ! {"asin", math_asin, 0, math_asin_doc}, ! {"atan", math_atan, 0, math_atan_doc}, ! {"atan2", math_atan2, 0, math_atan2_doc}, ! {"ceil", math_ceil, 0, math_ceil_doc}, ! {"cos", math_cos, 0, math_cos_doc}, ! {"cosh", math_cosh, 0, math_cosh_doc}, ! {"exp", math_exp, 0, math_exp_doc}, ! {"fabs", math_fabs, 0, math_fabs_doc}, ! {"floor", math_floor, 0, math_floor_doc}, ! {"fmod", math_fmod, 0, math_fmod_doc}, ! {"frexp", math_frexp, 0, math_frexp_doc}, ! {"hypot", math_hypot, 0, math_hypot_doc}, ! {"ldexp", math_ldexp, 0, math_ldexp_doc}, ! {"log", math_log, 0, math_log_doc}, ! {"log10", math_log10, 0, math_log10_doc}, ! {"modf", math_modf, 0, math_modf_doc}, ! {"pow", math_pow, 0, math_pow_doc}, #ifdef HAVE_RINT ! {"rint", math_rint, 0, math_rint_doc}, #endif ! {"sin", math_sin, 0, math_sin_doc}, ! {"sinh", math_sinh, 0, math_sinh_doc}, ! {"sqrt", math_sqrt, 0, math_sqrt_doc}, ! {"tan", math_tan, 0, math_tan_doc}, ! {"tanh", math_tanh, 0, math_tanh_doc}, {NULL, NULL} /* sentinel */ }; --- 225,254 ---- static PyMethodDef math_methods[] = { ! {"acos", math_acos, METH_VARARGS, math_acos_doc}, ! {"asin", math_asin, METH_VARARGS, math_asin_doc}, ! {"atan", math_atan, METH_VARARGS, math_atan_doc}, ! {"atan2", math_atan2, METH_VARARGS, math_atan2_doc}, ! {"ceil", math_ceil, METH_VARARGS, math_ceil_doc}, ! {"cos", math_cos, METH_VARARGS, math_cos_doc}, ! {"cosh", math_cosh, METH_VARARGS, math_cosh_doc}, ! {"exp", math_exp, METH_VARARGS, math_exp_doc}, ! {"fabs", math_fabs, METH_VARARGS, math_fabs_doc}, ! {"floor", math_floor, METH_VARARGS, math_floor_doc}, ! {"fmod", math_fmod, METH_VARARGS, math_fmod_doc}, ! {"frexp", math_frexp, METH_VARARGS, math_frexp_doc}, ! {"hypot", math_hypot, METH_VARARGS, math_hypot_doc}, ! {"ldexp", math_ldexp, METH_VARARGS, math_ldexp_doc}, ! {"log", math_log, METH_VARARGS, math_log_doc}, ! {"log10", math_log10, METH_VARARGS, math_log10_doc}, ! {"modf", math_modf, METH_VARARGS, math_modf_doc}, ! {"pow", math_pow, METH_VARARGS, math_pow_doc}, #ifdef HAVE_RINT ! {"rint", math_rint, METH_VARARGS, math_rint_doc}, #endif ! {"sin", math_sin, METH_VARARGS, math_sin_doc}, ! {"sinh", math_sinh, METH_VARARGS, math_sinh_doc}, ! {"sqrt", math_sqrt, METH_VARARGS, math_sqrt_doc}, ! {"tan", math_tan, METH_VARARGS, math_tan_doc}, ! {"tanh", math_tanh, METH_VARARGS, math_tanh_doc}, {NULL, NULL} /* sentinel */ }; From python-dev@python.org Mon Jul 3 19:44:24 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 3 Jul 2000 11:44:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_sre.py,1.2,1.3 Message-ID: <200007031844.LAA30938@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv30343/Lib/test Modified Files: test_sre.py Log Message: - added lookbehind support (?<=pattern), (?a)|(?Pb))(?Pc)?') ! assert pat.match('a').group(1, 2, 3) == ('a', None, None) ! assert pat.match('b').group('a1', 'b2', 'c3') == (None, 'b', None) ! assert pat.match('ac').group(1, 'b2', 3) == ('a', None, 'c') except AssertionError: raise TestFailed, "match .group() method" --- 202,213 ---- try: # A single group ! m = sre.match('(a)', 'a') ! assert m.group(0) == 'a' ; assert m.group(0) == 'a' assert m.group(1) == 'a' ; assert m.group(1, 1) == ('a', 'a') pat = sre.compile('(?:(?Pa)|(?Pb))(?Pc)?') ! assert pat.match('a').group(1, 2, 3) == ('a', None, None) ! assert pat.match('b').group('a1', 'b2', 'c3') == (None, 'b', None) ! assert pat.match('ac').group(1, 'b2', 3) == ('a', None, 'c') except AssertionError: raise TestFailed, "match .group() method" *************** *** 253,260 **** assert sre.L == sre.LOCALE assert sre.M == sre.MULTILINE ! assert sre.S == sre.DOTALL ! assert sre.X == sre.VERBOSE ! assert sre.T == sre.TEMPLATE ! assert sre.U == sre.UNICODE except AssertionError: raise TestFailed, 're module constants' --- 253,260 ---- assert sre.L == sre.LOCALE assert sre.M == sre.MULTILINE ! assert sre.S == sre.DOTALL ! assert sre.X == sre.VERBOSE ! assert sre.T == sre.TEMPLATE ! assert sre.U == sre.UNICODE except AssertionError: raise TestFailed, 're module constants' *************** *** 273,277 **** # To save time, only run the first and last 10 tests #tests = tests[:10] + tests[-10:] ! pass for t in tests: --- 273,277 ---- # To save time, only run the first and last 10 tests #tests = tests[:10] + tests[-10:] ! pass for t in tests: *************** *** 281,285 **** pattern, s, outcome, repl, expected = t elif len(t)==3: ! pattern, s, outcome = t else: raise ValueError, ('Test tuples should have 3 or 5 fields',t) --- 281,285 ---- pattern, s, outcome, repl, expected = t elif len(t)==3: ! pattern, s, outcome = t else: raise ValueError, ('Test tuples should have 3 or 5 fields',t) *************** *** 289,293 **** except sre.error: if outcome==SYNTAX_ERROR: pass # Expected a syntax error ! else: print '=== Syntax error:', t except KeyboardInterrupt: raise KeyboardInterrupt --- 289,293 ---- except sre.error: if outcome==SYNTAX_ERROR: pass # Expected a syntax error ! else: print '=== Syntax error:', t except KeyboardInterrupt: raise KeyboardInterrupt *************** *** 357,361 **** # break (because it won't match at the end or start of a # string), so we'll ignore patterns that feature it. ! if pattern[:2]!='\\B' and pattern[-2:]!='\\B': obj=sre.compile(pattern) --- 357,361 ---- # break (because it won't match at the end or start of a # string), so we'll ignore patterns that feature it. ! if pattern[:2]!='\\B' and pattern[-2:]!='\\B': obj=sre.compile(pattern) From python-dev@python.org Mon Jul 3 19:44:24 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 3 Jul 2000 11:44:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre_compile.py,1.22,1.23 sre_parse.py,1.23,1.24 Message-ID: <200007031844.LAA30930@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv30343/Lib Modified Files: sre_compile.py sre_parse.py Log Message: - added lookbehind support (?<=pattern), (?= 0: ! emit(0) # look ahead ! else: ! lo, hi = av[1].getwidth() ! if lo != hi: ! raise error, "look-behind requires fixed-width pattern" ! emit(lo) # look behind ! _compile(code, av[1], flags) ! emit(OPCODES[SUCCESS]) ! code[skip] = len(code) - skip ! elif op is CALL: emit(OPCODES[op]) skip = len(code); emit(0) *************** *** 306,311 **** return _sre.compile( ! pattern, flags, ! array.array(WORDSIZE, code).tostring(), ! p.pattern.groups-1, groupindex, indexgroup ) --- 311,316 ---- return _sre.compile( ! pattern, flags, code, ! p.pattern.groups-1, ! groupindex, indexgroup ) Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** sre_parse.py 2000/07/02 22:25:39 1.23 --- sre_parse.py 2000/07/03 18:44:21 1.24 *************** *** 483,489 **** break source.get() ! elif source.next in ("=", "!"): # lookahead assertions char = source.get() b = [] while 1: --- 483,495 ---- break source.get() ! elif source.next in ("=", "!", "<"): # lookahead assertions char = source.get() + dir = 1 + if char == "<": + if source.next not in ("=", "!"): + raise error, "syntax error" + dir = -1 # lookbehind + char = source.get() b = [] while 1: *************** *** 494,500 **** p = _branch(state, b) if char == "=": ! subpattern.append((ASSERT, p)) else: ! subpattern.append((ASSERT_NOT, p)) break elif source.match("|"): --- 500,506 ---- p = _branch(state, b) if char == "=": ! subpattern.append((ASSERT, (dir, p))) else: ! subpattern.append((ASSERT_NOT, (dir, p))) break elif source.match("|"): From python-dev@python.org Mon Jul 3 19:44:24 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 3 Jul 2000 11:44:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.22,2.23 sre.h,2.12,2.13 Message-ID: <200007031844.LAA30940@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv30343/Modules Modified Files: _sre.c sre.h Log Message: - added lookbehind support (?<=pattern), (? */ TRACE(("%8d: set index %d\n", PTR(ptr), pattern[0])); ! state->index = pattern[0]; pattern++; break; --- 586,590 ---- /* args: */ TRACE(("%8d: set index %d\n", PTR(ptr), pattern[0])); ! state->lastindex = pattern[0]; pattern++; break; *************** *** 607,614 **** case SRE_OP_ASSERT: /* assert subpattern */ ! /* args: */ ! TRACE(("%8d: assert subpattern\n", PTR(ptr))); ! state->ptr = ptr; ! i = SRE_MATCH(state, pattern + 1); if (i < 0) return i; --- 600,609 ---- case SRE_OP_ASSERT: /* assert subpattern */ ! /* args: */ ! TRACE(("%8d: assert subpattern %d\n", PTR(ptr), pattern[1])); ! state->ptr = ptr - pattern[1]; ! if (state->ptr < state->beginning) ! goto failure; ! i = SRE_MATCH(state, pattern + 2); if (i < 0) return i; *************** *** 621,627 **** /* assert not subpattern */ /* args: */ ! TRACE(("%8d: assert not subpattern\n", PTR(ptr))); ! state->ptr = ptr; ! i = SRE_MATCH(state, pattern + 1); if (i < 0) return i; --- 616,624 ---- /* assert not subpattern */ /* args: */ ! TRACE(("%8d: assert not subpattern %d\n", PTR(ptr), pattern[1])); ! state->ptr = ptr - pattern[1]; ! if (state->ptr < state->beginning) ! goto failure; ! i = SRE_MATCH(state, pattern + 2); if (i < 0) return i; *************** *** 1099,1102 **** --- 1096,1100 ---- PatternObject* self; + int i, n; PyObject* pattern; *************** *** 1106,1119 **** PyObject* groupindex = NULL; PyObject* indexgroup = NULL; ! if (!PyArg_ParseTuple(args, "OiO!|iOO", &pattern, &flags, ! &PyString_Type, &code, &groups, &groupindex, &indexgroup)) return NULL; ! self = PyObject_NEW(PatternObject, &Pattern_Type); ! if (self == NULL) return NULL; Py_INCREF(pattern); self->pattern = pattern; --- 1104,1133 ---- PyObject* groupindex = NULL; PyObject* indexgroup = NULL; ! if (!PyArg_ParseTuple(args, "OiO|iOO", &pattern, &flags, &code, &groups, &groupindex, &indexgroup)) return NULL; ! code = PySequence_Fast(code, "code argument must be a sequence"); ! if (!code) ! return NULL; + n = PySequence_Length(code); + + self = PyObject_NEW_VAR(PatternObject, &Pattern_Type, 100*n); + if (!self) { + Py_DECREF(code); return NULL; + } + + for (i = 0; i < n; i++) { + PyObject *o = PySequence_Fast_GET_ITEM(code, i); + self->code[i] = (SRE_CODE) PyInt_AsLong(o); + } + + Py_DECREF(code); + if (PyErr_Occurred()) + return NULL; + Py_INCREF(pattern); self->pattern = pattern; *************** *** 1121,1127 **** self->flags = flags; - Py_INCREF(code); - self->code = code; - self->groups = groups; --- 1135,1138 ---- *************** *** 1218,1222 **** state->mark[i] = NULL; ! state->index = -1; state->stack = NULL; --- 1229,1233 ---- state->mark[i] = NULL; ! state->lastindex = -1; state->stack = NULL; *************** *** 1275,1280 **** /* create match object (with room for extra group marks) */ ! match = PyObject_NEW_VAR(MatchObject, &Match_Type, 2*pattern->groups); ! if (match == NULL) return NULL; --- 1286,1292 ---- /* create match object (with room for extra group marks) */ ! match = PyObject_NEW_VAR(MatchObject, &Match_Type, ! 2*(pattern->groups+1)); ! if (!match) return NULL; *************** *** 1301,1306 **** } else match->mark[j+2] = match->mark[j+3] = -1; /* undefined */ ! match->index = state->index; return (PyObject*) match; --- 1313,1321 ---- } else match->mark[j+2] = match->mark[j+3] = -1; /* undefined */ + + match->lastindex = state->lastindex; ! match->pos = ((char*) state->start - base) / n; ! match->endpos = ((char*) state->end - base) / n; return (PyObject*) match; *************** *** 1330,1339 **** /* create match object (with room for extra group marks) */ self = PyObject_NEW(ScannerObject, &Scanner_Type); ! if (self == NULL) return NULL; string = state_init(&self->state, pattern, args); if (!string) { ! PyObject_DEL(self); return NULL; } --- 1345,1354 ---- /* create match object (with room for extra group marks) */ self = PyObject_NEW(ScannerObject, &Scanner_Type); ! if (!self) return NULL; string = state_init(&self->state, pattern, args); if (!string) { ! PyObject_Del(self); return NULL; } *************** *** 1351,1358 **** pattern_dealloc(PatternObject* self) { - Py_XDECREF(self->code); Py_XDECREF(self->pattern); Py_XDECREF(self->groupindex); ! PyMem_DEL(self); } --- 1366,1372 ---- pattern_dealloc(PatternObject* self) { Py_XDECREF(self->pattern); Py_XDECREF(self->groupindex); ! PyObject_DEL(self); } *************** *** 1615,1622 **** statichere PyTypeObject Pattern_Type = { PyObject_HEAD_INIT(NULL) ! 0, "SRE_Pattern", sizeof(PatternObject), 0, (destructor)pattern_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ ! (getattrfunc)pattern_getattr, /*tp_getattr*/ }; --- 1629,1637 ---- statichere PyTypeObject Pattern_Type = { PyObject_HEAD_INIT(NULL) ! 0, "SRE_Pattern", ! sizeof(PatternObject), sizeof(SRE_CODE), (destructor)pattern_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ ! (getattrfunc)pattern_getattr /*tp_getattr*/ }; *************** *** 1629,1633 **** Py_XDECREF(self->string); Py_DECREF(self->pattern); ! PyMem_DEL(self); } --- 1644,1648 ---- Py_XDECREF(self->string); Py_DECREF(self->pattern); ! PyObject_DEL(self); } *************** *** 1644,1648 **** } ! if (self->string == Py_None || self->mark[index+index] < 0) { /* return default value if the string or group is undefined */ Py_INCREF(def); --- 1659,1665 ---- } ! index *= 2; ! ! if (self->string == Py_None || self->mark[index] < 0) { /* return default value if the string or group is undefined */ Py_INCREF(def); *************** *** 1651,1655 **** return PySequence_GetSlice( ! self->string, self->mark[index+index], self->mark[index+index+1] ); } --- 1668,1672 ---- return PySequence_GetSlice( ! self->string, self->mark[index], self->mark[index+1] ); } *************** *** 1658,1672 **** match_getindex(MatchObject* self, PyObject* index) { ! if (!PyInt_Check(index) && self->pattern->groupindex != NULL) { ! /* FIXME: resource leak? */ ! index = PyObject_GetItem(self->pattern->groupindex, index); ! if (!index) ! return -1; ! } if (PyInt_Check(index)) return (int) PyInt_AS_LONG(index); ! return -1; } --- 1675,1696 ---- match_getindex(MatchObject* self, PyObject* index) { ! int i; if (PyInt_Check(index)) return (int) PyInt_AS_LONG(index); + + i = -1; + + if (self->pattern->groupindex) { + index = PyObject_GetItem(self->pattern->groupindex, index); + if (index) { + if (PyInt_Check(index)) + i = (int) PyInt_AS_LONG(index); + Py_DECREF(index); + } else + PyErr_Clear(); + } ! return i; } *************** *** 1890,1895 **** if (!strcmp(name, "lastindex")) { /* experimental */ ! if (self->index >= 0) ! return Py_BuildValue("i", self->index); Py_INCREF(Py_None); return Py_None; --- 1914,1919 ---- if (!strcmp(name, "lastindex")) { /* experimental */ ! if (self->lastindex >= 0) ! return Py_BuildValue("i", self->lastindex); Py_INCREF(Py_None); return Py_None; *************** *** 1898,1904 **** if (!strcmp(name, "lastgroup")) { /* experimental */ ! if (self->pattern->indexgroup) { PyObject* result = PySequence_GetItem( ! self->pattern->indexgroup, self->index ); if (result) --- 1922,1928 ---- if (!strcmp(name, "lastgroup")) { /* experimental */ ! if (self->pattern->indexgroup && self->lastindex >= 0) { PyObject* result = PySequence_GetItem( ! self->pattern->indexgroup, self->lastindex ); if (result) *************** *** 1921,1928 **** if (!strcmp(name, "pos")) ! return Py_BuildValue("i", 0); /* FIXME */ if (!strcmp(name, "endpos")) ! return Py_BuildValue("i", 0); /* FIXME */ PyErr_SetString(PyExc_AttributeError, name); --- 1945,1952 ---- if (!strcmp(name, "pos")) ! return Py_BuildValue("i", self->pos); if (!strcmp(name, "endpos")) ! return Py_BuildValue("i", self->endpos); PyErr_SetString(PyExc_AttributeError, name); *************** *** 1936,1944 **** PyObject_HEAD_INIT(NULL) 0, "SRE_Match", ! sizeof(MatchObject), /* size of basic object */ ! sizeof(int), /* space for group item */ (destructor)match_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ ! (getattrfunc)match_getattr, /*tp_getattr*/ }; --- 1960,1967 ---- PyObject_HEAD_INIT(NULL) 0, "SRE_Match", ! sizeof(MatchObject), sizeof(int), (destructor)match_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ ! (getattrfunc)match_getattr /*tp_getattr*/ }; *************** *** 1952,1956 **** Py_DECREF(self->string); Py_DECREF(self->pattern); ! PyMem_DEL(self); } --- 1975,1979 ---- Py_DECREF(self->string); Py_DECREF(self->pattern); ! PyObject_DEL(self); } *************** *** 2042,2047 **** PyObject_HEAD_INIT(NULL) 0, "SRE_Scanner", ! sizeof(ScannerObject), /* size of basic object */ ! 0, (destructor)scanner_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ --- 2065,2069 ---- PyObject_HEAD_INIT(NULL) 0, "SRE_Scanner", ! sizeof(ScannerObject), 0, (destructor)scanner_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ Index: sre.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sre.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** sre.h 2000/07/02 22:25:39 2.12 --- sre.h 2000/07/03 18:44:21 2.13 *************** *** 18,23 **** typedef struct { ! PyObject_HEAD ! PyObject* code; /* link to the code string object */ int groups; PyObject* groupindex; --- 18,22 ---- typedef struct { ! PyObject_VAR_HEAD int groups; PyObject* groupindex; *************** *** 26,41 **** PyObject* pattern; /* pattern source (or None) */ int flags; /* flags used when compiling pattern source */ } PatternObject; ! #define PatternObject_GetCode(o)\ ! ((void*) PyString_AS_STRING(((PatternObject*)(o))->code)) typedef struct { ! PyObject_HEAD PyObject* string; /* link to the target string */ PatternObject* pattern; /* link to the regex (pattern) object */ ! int index; /* last index marker seen by the engine (-1 if none) */ int groups; /* number of groups (start/end marks) */ ! int mark[2]; } MatchObject; --- 25,42 ---- PyObject* pattern; /* pattern source (or None) */ int flags; /* flags used when compiling pattern source */ + /* pattern code */ + SRE_CODE code[1]; } PatternObject; ! #define PatternObject_GetCode(o) (((PatternObject*)(o))->code) typedef struct { ! PyObject_VAR_HEAD PyObject* string; /* link to the target string */ PatternObject* pattern; /* link to the regex (pattern) object */ ! int pos, endpos; /* current target slice */ ! int lastindex; /* last index marker seen by the engine (-1 if none) */ int groups; /* number of groups (start/end marks) */ ! int mark[1]; } MatchObject; *************** *** 60,64 **** int charsize; /* registers */ ! int index; int lastmark; void* mark[SRE_MARK_SIZE]; --- 61,65 ---- int charsize; /* registers */ ! int lastindex; int lastmark; void* mark[SRE_MARK_SIZE]; From python-dev@python.org Mon Jul 3 19:53:21 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 3 Jul 2000 20:53:21 +0200 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_sre.py,1.2,1.3 References: <200007031844.LAA30938@slayer.i.sourceforge.net> Message-ID: <00f301bfe51f$f84e6f60$f2a6b5d4@hagrid> > - cleaned up a various of potential leaks, api abuses, > and other minors in the engine module. hmm. I wonder what that was supposed to mean... guess it's time for a break. From python-dev@python.org Mon Jul 3 22:31:51 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 3 Jul 2000 14:31:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre_compile.py,1.23,1.24 sre_constants.py,1.15,1.16 sre_parse.py,1.24,1.25 Message-ID: <200007032131.OAA28633@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv28299/Lib Modified Files: sre_compile.py sre_constants.py sre_parse.py Log Message: - fixed grouping error bug - changed "group" operator to "groupref" Index: sre_compile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** sre_compile.py 2000/07/03 18:44:21 1.23 --- sre_compile.py 2000/07/03 21:31:48 1.24 *************** *** 149,164 **** emit(av[0]) emit(av[1]) _compile(code, av[2], flags) emit(OPCODES[SUCCESS]) code[skip] = len(code) - skip elif op is SUBPATTERN: ! group = av[0] ! if group: emit(OPCODES[MARK]) ! emit((group-1)*2) _compile(code, av[1], flags) ! if group: emit(OPCODES[MARK]) ! emit((group-1)*2+1) elif op in (SUCCESS, FAILURE): emit(OPCODES[op]) --- 149,171 ---- emit(av[0]) emit(av[1]) + mark = MAXCODE + if av[2][0][0] == SUBPATTERN: + # repeated subpattern + gid, foo = av[2][0][1] + if gid: + mark = (gid-1)*2 + emit(mark) _compile(code, av[2], flags) emit(OPCODES[SUCCESS]) code[skip] = len(code) - skip elif op is SUBPATTERN: ! gid = av[0] ! if gid: emit(OPCODES[MARK]) ! emit((gid-1)*2) _compile(code, av[1], flags) ! if gid: emit(OPCODES[MARK]) ! emit((gid-1)*2+1) elif op in (SUCCESS, FAILURE): emit(OPCODES[op]) *************** *** 208,212 **** else: emit(CHCODES[av]) ! elif op is GROUP: if flags & SRE_FLAG_IGNORECASE: emit(OPCODES[OP_IGNORE[op]]) --- 215,219 ---- else: emit(CHCODES[av]) ! elif op is GROUPREF: if flags & SRE_FLAG_IGNORECASE: emit(OPCODES[OP_IGNORE[op]]) Index: sre_constants.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_constants.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** sre_constants.py 2000/07/02 17:33:27 1.15 --- sre_constants.py 2000/07/03 21:31:48 1.16 *************** *** 30,35 **** CATEGORY = "category" CHARSET = "charset" ! GROUP = "group" ! GROUP_IGNORE = "group_ignore" IN = "in" IN_IGNORE = "in_ignore" --- 30,35 ---- CATEGORY = "category" CHARSET = "charset" ! GROUPREF = "groupref" ! GROUPREF_IGNORE = "groupref_ignore" IN = "in" IN_IGNORE = "in_ignore" *************** *** 91,95 **** CATEGORY, CHARSET, ! GROUP, GROUP_IGNORE, INDEX, IN, IN_IGNORE, --- 91,95 ---- CATEGORY, CHARSET, ! GROUPREF, GROUPREF_IGNORE, INDEX, IN, IN_IGNORE, *************** *** 137,141 **** # replacement operations for "ignore case" mode OP_IGNORE = { ! GROUP: GROUP_IGNORE, IN: IN_IGNORE, LITERAL: LITERAL_IGNORE, --- 137,141 ---- # replacement operations for "ignore case" mode OP_IGNORE = { ! GROUPREF: GROUPREF_IGNORE, IN: IN_IGNORE, LITERAL: LITERAL_IGNORE, Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** sre_parse.py 2000/07/03 18:44:21 1.24 --- sre_parse.py 2000/07/03 21:31:48 1.25 *************** *** 242,246 **** if (not source.next or not _group(escape + source.next, state.groups)): ! return GROUP, group escape = escape + source.get() elif source.next in OCTDIGITS: --- 242,246 ---- if (not source.next or not _group(escape + source.next, state.groups)): ! return GROUPREF, group escape = escape + source.get() elif source.next in OCTDIGITS: *************** *** 451,455 **** if gid is None: raise error, "unknown group name" ! subpattern.append((GROUP, gid)) elif source.match("#"): index = "" --- 451,455 ---- if gid is None: raise error, "unknown group name" ! subpattern.append((GROUPREF, gid)) elif source.match("#"): index = "" From python-dev@python.org Mon Jul 3 22:31:51 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 3 Jul 2000 14:31:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_sre,1.5,1.6 Message-ID: <200007032131.OAA28638@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv28299/Lib/test/output Modified Files: test_sre Log Message: - fixed grouping error bug - changed "group" operator to "groupref" Index: test_sre =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_sre,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_sre 2000/06/30 18:39:20 1.5 --- test_sre 2000/07/03 21:31:48 1.6 *************** *** 2,7 **** === Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A') === Failed incorrectly ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a') - === grouping error ('([^/]*/)*sub1/', 'd:msgs/tdir/sub1/trial/away.cpp', 0, 'found+"-"+g1', 'd:msgs/tdir/sub1/-tdir/') 'd:msgs/tdir/sub1/-trial/' should be 'd:msgs/tdir/sub1/-tdir/' - === grouping error ('([abc])*bcd', 'abcd', 0, 'found+"-"+g1', 'abcd-a') 'abcd-c' should be 'abcd-a' - === grouping error ('(?i)([abc])*bcd', 'ABCD', 0, 'found+"-"+g1', 'ABCD-A') 'ABCD-C' should be 'ABCD-A' === Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A') --- 2,4 ---- From python-dev@python.org Mon Jul 3 22:31:51 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 3 Jul 2000 14:31:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.23,2.24 sre.h,2.13,2.14 Message-ID: <200007032131.OAA28639@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv28299/Modules Modified Files: _sre.c sre.h Log Message: - fixed grouping error bug - changed "group" operator to "groupref" Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** _sre.c 2000/07/03 18:44:21 2.23 --- _sre.c 2000/07/03 21:31:48 2.24 *************** *** 407,410 **** --- 407,411 ---- int lastmark; int i, count; + SRE_STACK* sp; /* FIXME: this is a hack! */ *************** *** 572,577 **** /* args: */ TRACE(("%8d: set mark %d\n", PTR(ptr), pattern[0])); ! if (state->lastmark < pattern[0]) ! state->lastmark = pattern[0]; if (!mark) { mark = mark_copy; --- 573,578 ---- /* args: */ TRACE(("%8d: set mark %d\n", PTR(ptr), pattern[0])); ! if (state->lastmark < pattern[0]+1) ! state->lastmark = pattern[0]+1; if (!mark) { mark = mark_copy; *************** *** 781,788 **** case SRE_OP_MAX_REPEAT: ! /* match repeated sequence (maximizing regexp). repeated ! group should end with a MAX_UNTIL code */ ! ! /* args: */ TRACE(("%8d: max repeat (%d %d)\n", PTR(ptr), --- 782,787 ---- case SRE_OP_MAX_REPEAT: ! /* match repeated sequence (maximizing regexp) */ ! /* args: <1=min> <2=max> <3=save> <4=item> */ TRACE(("%8d: max repeat (%d %d)\n", PTR(ptr), *************** *** 794,798 **** /* match minimum number of items */ while (count < (int) pattern[1]) { ! i = SRE_MATCH(state, pattern + 3); if (i < 0) return i; --- 793,797 ---- /* match minimum number of items */ while (count < (int) pattern[1]) { ! i = SRE_MATCH(state, pattern + 4); if (i < 0) return i; *************** *** 818,823 **** while (pattern[2] == 65535 || count < (int) pattern[2]) { state->stackbase = stack; ! i = SRE_MATCH(state, pattern + 3); state->stackbase = stackbase; /* rewind */ if (i < 0) --- 817,827 ---- while (pattern[2] == 65535 || count < (int) pattern[2]) { + void *mark0, *mark1; + if (pattern[3] != 65535) { + mark0 = state->mark[pattern[3]]; + mark1 = state->mark[pattern[3]+1]; + } state->stackbase = stack; ! i = SRE_MATCH(state, pattern + 4); state->stackbase = stackbase; /* rewind */ if (i < 0) *************** *** 838,843 **** } TRACE(("%8d: stack[%d] = %d\n", PTR(ptr), stack, PTR(ptr))); ! state->stack[stack].ptr = ptr; ! state->stack[stack].pattern = pattern + pattern[0]; stack++; /* move forward */ --- 842,853 ---- } TRACE(("%8d: stack[%d] = %d\n", PTR(ptr), stack, PTR(ptr))); ! sp = state->stack + stack; ! sp->ptr = ptr; ! sp->pattern = pattern + pattern[0]; ! sp->mark = pattern[3]; ! if (pattern[3] != 65535) { ! sp->mark0 = mark0; ! sp->mark1 = mark1; ! } stack++; /* move forward */ *************** *** 856,859 **** --- 866,871 ---- case SRE_OP_MIN_REPEAT: /* match repeated sequence (minimizing regexp) */ + /* args: <1=min> <2=max> <3=save> <4=item> */ + TRACE(("%8d: min repeat %d %d\n", PTR(ptr), pattern[1], pattern[2])); *************** *** 862,866 **** /* match minimum number of items */ while (count < (int) pattern[1]) { ! i = SRE_MATCH(state, pattern + 3); if (i < 0) return i; --- 874,878 ---- /* match minimum number of items */ while (count < (int) pattern[1]) { ! i = SRE_MATCH(state, pattern + 4); if (i < 0) return i; *************** *** 878,882 **** } state->ptr = ptr; /* backtrack */ ! i = SRE_MATCH(state, pattern + 3); if (i < 0) return i; --- 890,894 ---- } state->ptr = ptr; /* backtrack */ ! i = SRE_MATCH(state, pattern + 4); if (i < 0) return i; *************** *** 941,953 **** failure: if (stack-- > stackbase) { ! ptr = state->stack[stack].ptr; ! pattern = state->stack[stack].pattern; TRACE(("%8d: retry (%d)\n", PTR(ptr), stack)); goto retry; } - TRACE(("%8d: leave (failure)\n", PTR(ptr))); - state->stackbase = stackbase; state->lastmark = lastmark; if (mark) memcpy(state->mark, mark, state->lastmark*sizeof(void*)); --- 953,970 ---- failure: + TRACE(("%8d: leave (failure)\n", PTR(ptr))); if (stack-- > stackbase) { ! sp = state->stack + stack; ! ptr = sp->ptr; ! pattern = sp->pattern; ! if (sp->mark != 65535) { ! state->mark[sp->mark] = sp->mark0; ! state->mark[sp->mark+1] = sp->mark1; ! } TRACE(("%8d: retry (%d)\n", PTR(ptr), stack)); goto retry; } state->lastmark = lastmark; + state->stackbase = stackbase; if (mark) memcpy(state->mark, mark, state->lastmark*sizeof(void*)); Index: sre.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sre.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** sre.h 2000/07/03 18:44:21 2.13 --- sre.h 2000/07/03 21:31:48 2.14 *************** *** 47,50 **** --- 47,53 ---- SRE_CODE* pattern; void* ptr; + int mark; + void* mark0; + void* mark1; } SRE_STACK; From python-dev@python.org Mon Jul 3 22:37:29 2000 From: python-dev@python.org (Jack Jansen) Date: Mon, 3 Jul 2000 14:37:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules timemodule.c,2.88,2.89 Message-ID: <200007032137.OAA29077@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv28917 Modified Files: timemodule.c Log Message: Mac only: two epoch problem workarounds are no longer needed for GUSI >= 2.0.5. One still is:-( Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.88 retrieving revision 2.89 diff -C2 -r2.88 -r2.89 *** timemodule.c 2000/06/30 23:58:05 2.88 --- timemodule.c 2000/07/03 21:37:27 2.89 *************** *** 260,264 **** struct tm *p; errno = 0; ! #if defined(macintosh) && defined(USE_GUSI2) when = when + GUSI_TO_MSL_EPOCH; #endif --- 260,264 ---- struct tm *p; errno = 0; ! #if defined(macintosh) && defined(USE_GUSI204) when = when + GUSI_TO_MSL_EPOCH; #endif *************** *** 475,479 **** return NULL; tt = (time_t)dt; ! #if defined(macintosh) && defined(USE_GUSI2) tt = tt + GUSI_TO_MSL_EPOCH; #endif --- 475,479 ---- return NULL; tt = (time_t)dt; ! #if defined(macintosh) && defined(USE_GUSI204) tt = tt + GUSI_TO_MSL_EPOCH; #endif From python-dev@python.org Mon Jul 3 22:39:49 2000 From: python-dev@python.org (Jack Jansen) Date: Mon, 3 Jul 2000 14:39:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser myreadline.c,2.20,2.21 Message-ID: <200007032139.OAA29267@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv29235/Parser Modified Files: myreadline.c Log Message: Include limits.h if we have it. Index: myreadline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/myreadline.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** myreadline.c 2000/06/30 23:58:05 2.20 --- myreadline.c 2000/07/03 21:39:47 2.21 *************** *** 20,23 **** --- 20,26 ---- #include "Python.h" + #ifdef HAVE_LIMITS_H + #include + #endif int (*PyOS_InputHook)() = NULL; From python-dev@python.org Mon Jul 3 22:39:49 2000 From: python-dev@python.org (Jack Jansen) Date: Mon, 3 Jul 2000 14:39:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.165,2.166 codecs.c,2.8,2.9 compile.c,2.112,2.113 modsupport.c,2.45,2.46 Message-ID: <200007032139.OAA29276@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv29235/Python Modified Files: bltinmodule.c codecs.c compile.c modsupport.c Log Message: Include limits.h if we have it. Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.165 retrieving revision 2.166 diff -C2 -r2.165 -r2.166 *** bltinmodule.c 2000/06/30 23:58:05 2.165 --- bltinmodule.c 2000/07/03 21:39:47 2.166 *************** *** 24,27 **** --- 24,30 ---- #include #endif + #ifdef HAVE_LIMITS_H + #include + #endif /* Forward */ Index: codecs.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/codecs.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** codecs.c 2000/06/29 14:50:15 2.8 --- codecs.c 2000/07/03 21:39:47 2.9 *************** *** 11,14 **** --- 11,17 ---- #include "Python.h" #include + #ifdef HAVE_LIMITS_H + #include + #endif /* --- Globals ------------------------------------------------------------ */ Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.112 retrieving revision 2.113 diff -C2 -r2.112 -r2.113 *** compile.c 2000/06/30 23:58:06 2.112 --- compile.c 2000/07/03 21:39:47 2.113 *************** *** 34,37 **** --- 34,40 ---- #include + #ifdef HAVE_LIMITS_H + #include + #endif /* Three symbols from graminit.h are also defined in Python.h, with Index: modsupport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/modsupport.c,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** modsupport.c 2000/06/30 23:58:06 2.45 --- modsupport.c 2000/07/03 21:39:47 2.46 *************** *** 12,15 **** --- 12,18 ---- #include "Python.h" + #ifdef HAVE_LIMITS_H + #include + #endif #ifdef MPW /* MPW pushes 'extended' for float and double types with varargs */ From python-dev@python.org Mon Jul 3 23:41:40 2000 From: python-dev@python.org (Tim Peters) Date: Mon, 3 Jul 2000 15:41:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mathmodule.c,2.49,2.50 Message-ID: <200007032241.PAA06739@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6711/python/dist/src/modules Modified Files: mathmodule.c Log Message: Typo repair in docstring -- my fault. Index: mathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v retrieving revision 2.49 retrieving revision 2.50 diff -C2 -r2.49 -r2.50 *** mathmodule.c 2000/07/03 18:11:56 2.49 --- mathmodule.c 2000/07/03 22:41:34 2.50 *************** *** 166,170 **** "frexp(x)\n\ \n\ ! Return the matissa and exponent of x, as pair (m, e).\n\ m is a float and e is an int, such that x = m * 2.**e.\n\ If x is 0, m and e are both 0. Else 0.5 <= abs(m) < 1.0."; --- 166,170 ---- "frexp(x)\n\ \n\ ! Return the mantissa and exponent of x, as pair (m, e).\n\ m is a float and e is an int, such that x = m * 2.**e.\n\ If x is 0, m and e are both 0. Else 0.5 <= abs(m) < 1.0."; From python-dev@python.org Tue Jul 4 00:51:19 2000 From: python-dev@python.org (Tim Peters) Date: Mon, 3 Jul 2000 16:51:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC import_nt.c,1.12,1.13 Message-ID: <200007032351.QAA16724@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv16659/python/dist/src/PC Modified Files: import_nt.c Log Message: Squash signed-vs-unsigned warning. Also edits to bring into line with Python coding stds (max line length, C-style comments). Index: import_nt.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/import_nt.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** import_nt.c 2000/06/28 22:20:06 1.12 --- import_nt.c 2000/07/03 23:51:17 1.13 *************** *** 9,19 **** #include "Python.h" #include "osdefs.h" #include #include "importdl.h" ! #include "malloc.h" // for alloca ! extern const char *PyWin_DLLVersionString; // a string loaded from the DLL at startup. ! FILE *PyWin_FindRegisteredModule( const char *moduleName, struct filedescr **ppFileDesc, char *pathBuf, int pathLen) { char *moduleKey; --- 9,24 ---- #include "Python.h" #include "osdefs.h" + #include #include #include "importdl.h" ! #include "malloc.h" /* for alloca */ ! /* a string loaded from the DLL at startup */ ! extern const char *PyWin_DLLVersionString; ! FILE *PyWin_FindRegisteredModule(const char *moduleName, ! struct filedescr **ppFileDesc, ! char *pathBuf, ! int pathLen) { char *moduleKey; *************** *** 21,25 **** const char keySuffix[] = "\\Modules\\"; #ifdef _DEBUG ! // In debugging builds, we _must_ have the debug version registered. const char debugString[] = "\\Debug"; #else --- 26,32 ---- const char keySuffix[] = "\\Modules\\"; #ifdef _DEBUG ! /* In debugging builds, we _must_ have the debug version ! * registered. ! */ const char debugString[] = "\\Debug"; #else *************** *** 32,53 **** long regStat; ! // Calculate the size for the sprintf buffer. ! // Get the size of the chars only, plus 1 NULL. ! size_t bufSize = sizeof(keyPrefix)-1 + strlen(PyWin_DLLVersionString) + sizeof(keySuffix) + strlen(moduleName) + sizeof(debugString) - 1; ! // alloca == no free required, but memory only local to fn, also no heap fragmentation! moduleKey = alloca(bufSize); ! sprintf(moduleKey, "Software\\Python\\PythonCore\\%s\\Modules\\%s%s", PyWin_DLLVersionString, moduleName, debugString); modNameSize = pathLen; regStat = RegQueryValue(keyBase, moduleKey, pathBuf, &modNameSize); ! if (regStat!=ERROR_SUCCESS) return NULL; ! // use the file extension to locate the type entry. for (fdp = _PyImport_Filetab; fdp->suffix != NULL; fdp++) { size_t extLen = strlen(fdp->suffix); ! if (modNameSize>extLen && strnicmp(pathBuf+(modNameSize-extLen-1),fdp->suffix,extLen)==0) break; } ! if (fdp->suffix==NULL) return NULL; fp = fopen(pathBuf, fdp->mode); --- 39,73 ---- long regStat; ! /* Calculate the size for the sprintf buffer. ! * Get the size of the chars only, plus 1 NULL. ! */ ! size_t bufSize = sizeof(keyPrefix)-1 + ! strlen(PyWin_DLLVersionString) + ! sizeof(keySuffix) + ! strlen(moduleName) + ! sizeof(debugString) - 1; ! /* alloca == no free required, but memory only local to fn, ! * also no heap fragmentation! ! */ moduleKey = alloca(bufSize); ! sprintf(moduleKey, ! "Software\\Python\\PythonCore\\%s\\Modules\\%s%s", ! PyWin_DLLVersionString, moduleName, debugString); modNameSize = pathLen; regStat = RegQueryValue(keyBase, moduleKey, pathBuf, &modNameSize); ! if (regStat != ERROR_SUCCESS) return NULL; ! /* use the file extension to locate the type entry. */ for (fdp = _PyImport_Filetab; fdp->suffix != NULL; fdp++) { size_t extLen = strlen(fdp->suffix); ! assert(modNameSize >= 0); /* else cast to size_t is wrong */ ! if ((size_t)modNameSize > extLen && ! strnicmp(pathBuf + ((size_t)modNameSize-extLen-1), ! fdp->suffix, ! extLen) == 0) break; } ! if (fdp->suffix == NULL) return NULL; fp = fopen(pathBuf, fdp->mode); *************** *** 56,58 **** return fp; } - --- 76,77 ---- From python-dev@python.org Tue Jul 4 04:38:13 2000 From: python-dev@python.org (Paul Prescod) Date: Mon, 3 Jul 2000 20:38:13 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_winreg.py,1.4,1.5 Message-ID: <200007040338.UAA21090@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv20965 Modified Files: test_winreg.py Log Message: Removed some tabs. Index: test_winreg.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_winreg.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_winreg.py 2000/06/29 19:42:00 1.4 --- test_winreg.py 2000/07/04 03:38:10 1.5 *************** *** 43,58 **** CloseKey(sub_key) try: ! QueryInfoKey(int_sub_key) ! raise RuntimeError, "It appears the CloseKey() function does not close the actual key!" except EnvironmentError: ! pass # ... and close that key that way :-) int_key = int(key) key.Close() try: ! QueryInfoKey(int_key) ! raise RuntimeError, "It appears the key.Close() function does not close the actual key!" except EnvironmentError: ! pass def ReadTestData(root_key): --- 43,58 ---- CloseKey(sub_key) try: ! QueryInfoKey(int_sub_key) ! raise RuntimeError, "It appears the CloseKey() function does not close the actual key!" except EnvironmentError: ! pass # ... and close that key that way :-) int_key = int(key) key.Close() try: ! QueryInfoKey(int_key) ! raise RuntimeError, "It appears the key.Close() function does not close the actual key!" except EnvironmentError: ! pass def ReadTestData(root_key): From python-dev@python.org Tue Jul 4 04:39:35 2000 From: python-dev@python.org (Paul Prescod) Date: Mon, 3 Jul 2000 20:39:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/dom minidom.py,1.3,1.4 pulldom.py,1.2,1.3 Message-ID: <200007040339.UAA21167@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv21106/dom Modified Files: minidom.py pulldom.py Log Message: Used original SAX handling form. Index: minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/minidom.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** minidom.py 2000/07/01 19:21:47 1.3 --- minidom.py 2000/07/04 03:39:33 1.4 *************** *** 42,46 **** if Node.debug==None: Node.debug=StringIO() ! #open( "debug4.out", "w" ) Node.debug.write( "create %s\n"%index ) --- 42,46 ---- if Node.debug==None: Node.debug=StringIO() ! #open( "debug4.out", "w" ) Node.debug.write( "create %s\n"%index ) *************** *** 231,235 **** assert isinstance( value, Attr ) or type( value )==types.StringType node=value ! old=self._attrs.get( attname, None) if old: old.unlink() --- 231,235 ---- assert isinstance( value, Attr ) or type( value )==types.StringType node=value ! old=self._attrs.get( attname, None) if old: old.unlink() Index: pulldom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/pulldom.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pulldom.py 2000/07/01 04:58:47 1.2 --- pulldom.py 2000/07/04 03:39:33 1.3 *************** *** 23,27 **** def setDocumentLocator( self, locator ): pass ! def startElement( self, tagName , attrs ): if not hasattr( self, "curNode" ): # FIXME: hack! --- 23,27 ---- def setDocumentLocator( self, locator ): pass ! def startElement( self, name, tagName , attrs ): if not hasattr( self, "curNode" ): # FIXME: hack! *************** *** 43,47 **** #self.events.append( (START_ELEMENT, node) ) ! def endElement( self, name ): node = self.curNode self.lastEvent[1]=[(END_ELEMENT, node), None ] --- 43,47 ---- #self.events.append( (START_ELEMENT, node) ) ! def endElement( self, name, tagName ): node = self.curNode self.lastEvent[1]=[(END_ELEMENT, node), None ] From python-dev@python.org Tue Jul 4 04:39:35 2000 From: python-dev@python.org (Paul Prescod) Date: Mon, 3 Jul 2000 20:39:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax expatreader.py,1.1,1.2 Message-ID: <200007040339.UAA21171@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv21106/sax Modified Files: expatreader.py Log Message: Used original SAX handling form. Index: expatreader.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/expatreader.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** expatreader.py 2000/06/29 19:34:54 1.1 --- expatreader.py 2000/07/04 03:39:33 1.2 *************** *** 102,107 **** else: self._parser = pyexpat.ParserCreate() ! self._parser.StartElementHandler = self._cont_handler.startElement ! self._parser.EndElementHandler = self._cont_handler.endElement self._parser.ProcessingInstructionHandler = \ --- 102,107 ---- else: self._parser = pyexpat.ParserCreate() ! self._parser.StartElementHandler = self.start_element ! self._parser.EndElementHandler = self.end_element self._parser.ProcessingInstructionHandler = \ *************** *** 134,156 **** return self._parser.GetBase() - # internal methods - # event handlers - def start_element(self, name, attrs): ! self._cont_handler.startElement(name, xmlreader.AttributesImpl(attrs, attrs)) def end_element(self, name): ! self._cont_handler.endElement(name) def start_element_ns(self, name, attrs): pair = split(name) if len(pair) == 1: ! tup = (None, name, None) else: ! tup = pair+[None] # prefix is not implemented yet! ! self._cont_handler.startElement(tup, xmlreader.AttributesImpl(attrs, None)) --- 134,153 ---- return self._parser.GetBase() # event handlers def start_element(self, name, attrs): ! self._cont_handler.startElement(name, name, xmlreader.AttributesImpl(attrs, attrs)) def end_element(self, name): ! self._cont_handler.endElement( name, name ) def start_element_ns(self, name, attrs): pair = split(name) if len(pair) == 1: ! tup = (None, name ) else: ! tup = pair ! self._cont_handler.startElement(tup, None, xmlreader.AttributesImpl(attrs, None)) *************** *** 162,170 **** name = pair+[None] # prefix is not implemented yet! ! self._cont_handler.endElement(name) def processing_instruction(self, target, data): self._cont_handler.processingInstruction(target, data) def character_data(self, data): self._cont_handler.characters(data) --- 159,169 ---- name = pair+[None] # prefix is not implemented yet! ! self._cont_handler.endElement(name, None) + # this is not used def processing_instruction(self, target, data): self._cont_handler.processingInstruction(target, data) + # this is not used def character_data(self, data): self._cont_handler.characters(data) From python-dev@python.org Tue Jul 4 05:15:55 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 21:15:55 -0700 Subject: [Python-checkins] CVS: python/dist/src Makefile.in,1.90,1.91 Message-ID: <200007040415.VAA29247@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv29240 Modified Files: Makefile.in Log Message: libinstall: For the first bytecode compilation pass, use -tt instead of -t. This ensures that each installation from source is checked for compliance. This is needed to make sure .py files in the various Lib/plat-foo/ directories are tested even if the core developers do not have access to the corresponding platforms. Index: Makefile.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Makefile.in,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -r1.90 -r1.91 *** Makefile.in 2000/07/01 00:13:10 1.90 --- Makefile.in 2000/07/04 04:15:53 1.91 *************** *** 329,333 **** done PYTHONPATH=$(LIBDEST) \ ! ./python$(EXE) -t $(LIBDEST)/compileall.py $(LIBDEST) PYTHONPATH=$(LIBDEST) \ ./python$(EXE) -O $(LIBDEST)/compileall.py $(LIBDEST) --- 329,333 ---- done PYTHONPATH=$(LIBDEST) \ ! ./python$(EXE) -tt $(LIBDEST)/compileall.py $(LIBDEST) PYTHONPATH=$(LIBDEST) \ ./python$(EXE) -O $(LIBDEST)/compileall.py $(LIBDEST) From python-dev@python.org Tue Jul 4 08:10:08 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Tue, 4 Jul 2000 09:10:08 +0200 (CEST) Subject: [Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.165,2.166 codecs.c,2.8,2.9 compile.c,2.112,2.113 modsupport.c,2.45 In-Reply-To: <200007032139.OAA29276@slayer.i.sourceforge.net> from "Jack Jansen" at Jul 03, 2000 02:39:49 PM Message-ID: <200007040710.JAA16635@python.inrialpes.fr> This HAVE_LIMITS_H define spans over several files already. Why not putting it in Python.h and cleanup the rest? Jack Jansen wrote: > > Update of /cvsroot/python/python/dist/src/Python > In directory slayer.i.sourceforge.net:/tmp/cvs-serv29235/Python > > Modified Files: > bltinmodule.c codecs.c compile.c modsupport.c > Log Message: > Include limits.h if we have it. > > > Index: bltinmodule.c > =================================================================== > RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v > retrieving revision 2.165 > retrieving revision 2.166 > diff -C2 -r2.165 -r2.166 > *** bltinmodule.c 2000/06/30 23:58:05 2.165 > --- bltinmodule.c 2000/07/03 21:39:47 2.166 > *************** > *** 24,27 **** > --- 24,30 ---- > #include > #endif > + #ifdef HAVE_LIMITS_H > + #include > + #endif > > /* Forward */ > > Index: codecs.c > =================================================================== > RCS file: /cvsroot/python/python/dist/src/Python/codecs.c,v > retrieving revision 2.8 > retrieving revision 2.9 > diff -C2 -r2.8 -r2.9 > *** codecs.c 2000/06/29 14:50:15 2.8 > --- codecs.c 2000/07/03 21:39:47 2.9 > *************** > *** 11,14 **** > --- 11,17 ---- > #include "Python.h" > #include > + #ifdef HAVE_LIMITS_H > + #include > + #endif > > /* --- Globals ------------------------------------------------------------ */ > > Index: compile.c > =================================================================== > RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v > retrieving revision 2.112 > retrieving revision 2.113 > diff -C2 -r2.112 -r2.113 > *** compile.c 2000/06/30 23:58:06 2.112 > --- compile.c 2000/07/03 21:39:47 2.113 > *************** > *** 34,37 **** > --- 34,40 ---- > > #include > + #ifdef HAVE_LIMITS_H > + #include > + #endif > > /* Three symbols from graminit.h are also defined in Python.h, with > > Index: modsupport.c > =================================================================== > RCS file: /cvsroot/python/python/dist/src/Python/modsupport.c,v > retrieving revision 2.45 > retrieving revision 2.46 > diff -C2 -r2.45 -r2.46 > *** modsupport.c 2000/06/30 23:58:06 2.45 > --- modsupport.c 2000/07/03 21:39:47 2.46 > *************** > *** 12,15 **** > --- 12,18 ---- > > #include "Python.h" > + #ifdef HAVE_LIMITS_H > + #include > + #endif > > #ifdef MPW /* MPW pushes 'extended' for float and double types with varargs */ > > > _______________________________________________ > Python-checkins mailing list > Python-checkins@python.org > http://www.python.org/mailman/listinfo/python-checkins > -- Vladimir MARANGOZOV | Vladimir.Marangozov@inrialpes.fr http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252 From python-dev@python.org Tue Jul 4 10:51:10 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Tue, 4 Jul 2000 02:51:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.33,2.34 Message-ID: <200007040951.CAA16669@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv16660/Objects Modified Files: unicodeobject.c Log Message: Bill Tutt: Make unicode_compare a true UTF-16 compare function (includes support for surrogates). Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -r2.33 -r2.34 *** unicodeobject.c 2000/06/30 14:58:20 2.33 --- unicodeobject.c 2000/07/04 09:51:07 2.34 *************** *** 3046,3053 **** --- 3046,3066 ---- } + /* speedy UTF-16 code point order comparison */ + /* gleaned from: */ + /* http://www-4.ibm.com/software/developer/library/utf16.html?dwzone=unicode */ + + static unsigned short utf16Fixup[32] = + { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0x2000, 0xf800, 0xf800, 0xf800, 0xf800 + }; + static int unicode_compare(PyUnicodeObject *str1, PyUnicodeObject *str2) { int len1, len2; + Py_UNICODE *s1 = str1->str; Py_UNICODE *s2 = str2->str; *************** *** 3055,3065 **** len1 = str1->length; len2 = str2->length; ! while (len1 > 0 && len2 > 0) { ! int cmp = (*s1++) - (*s2++); ! if (cmp) ! /* This should make Christian happy! */ ! return (cmp < 0) ? -1 : (cmp != 0); ! len1--, len2--; } --- 3068,3088 ---- len1 = str1->length; len2 = str2->length; ! while (len1 > 0 && len2 > 0) { ! unsigned short c1, c2; /* 16 bits */ ! int diff; /* 32 bits */ ! ! c1 = *s1++; ! c2 = *s2++; ! if (c1 > (1<<11) * 26) ! c1 += utf16Fixup[c1>>11]; ! if (c2 > (1<<11) * 26) ! c2 += utf16Fixup[c2>>11]; ! ! /* now c1 and c2 are in UTF-32-compatible order */ ! diff = (int)c1 - (int)c2; ! if (diff) ! return (diff < 0) ? -1 : (diff != 0); ! len1--; len2--; } From python-dev@python.org Tue Jul 4 15:17:36 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Tue, 4 Jul 2000 07:17:36 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules signalmodule.c,2.43,2.44 Message-ID: <200007041417.HAA12986@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv12979/Modules Modified Files: signalmodule.c Log Message: Fixed symbol search for defining NSIG. It now also checks _NSIG which some C libs define (e.g. glibc). Added a fallback default value for NSIG which hopefully provides enough room for signal slots. Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.43 retrieving revision 2.44 diff -C2 -r2.43 -r2.44 *** signalmodule.c 2000/06/30 23:58:05 2.43 --- signalmodule.c 2000/07/04 14:17:33 2.44 *************** *** 36,44 **** #ifndef NSIG ! #ifdef _SIGMAX ! #define NSIG (_SIGMAX + 1) /* For QNX */ ! #else ! #define NSIG (SIGMAX + 1) /* for djgpp */ ! #endif #endif --- 36,48 ---- #ifndef NSIG ! # if defined(_NSIG) ! # define NSIG _NSIG /* For BSD/SysV */ ! # elif defined(_SIGMAX) ! # define NSIG (_SIGMAX + 1) /* For QNX */ ! # elif defined(SIGMAX) ! # define NSIG (SIGMAX + 1) /* For djgpp */ ! # else ! # define NSIG 64 /* Use a reasonable default value */ ! # endif #endif From python-dev@python.org Tue Jul 4 15:53:14 2000 From: python-dev@python.org (Sjoerd Mullender) Date: Tue, 4 Jul 2000 07:53:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib xmllib.py,1.19,1.20 Message-ID: <200007041453.HAA15566@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv15231 Modified Files: xmllib.py Log Message: 2 fixes plus one extension: - Actually count the linefeeds in a the CDATA content. - Don't call the endtag handler for an unmatched endtag (this makes the base class simpler since it doesn't have to deal with unopened endtags). - If the __init__ method is called with keyword argument translate_attribute_references=0, don't attempt to translate character and entity references in attribute values. Index: xmllib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xmllib.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** xmllib.py 2000/06/28 14:48:01 1.19 --- xmllib.py 2000/07/04 14:53:12 1.20 *************** *** 91,94 **** --- 91,95 ---- __map_case = 0 __accept_utf8 = 0 + __translate_attribute_references = 1 # Interface -- initialize and reset this instance *************** *** 103,106 **** --- 104,109 ---- if kw.has_key('accept_utf8'): self.__accept_utf8 = kw['accept_utf8'] + if kw.has_key('translate_attribute_references'): + self.__translate_attribute_references = kw['translate_attribute_references'] self.reset() *************** *** 172,175 **** --- 175,180 ---- # Interface -- translate references def translate_references(self, data, all = 1): + if not self.__translate_attribute_references: + return data i = 0 while 1: *************** *** 278,282 **** k = self.parse_cdata(i) if k < 0: break ! self.lineno = self.lineno + string.count(rawdata[i:i], '\n') i = k continue --- 283,287 ---- k = self.parse_cdata(i) if k < 0: break ! self.lineno = self.lineno + string.count(rawdata[i:k], '\n') i = k continue *************** *** 692,700 **** if found == -1: self.syntax_error('unopened end tag') - method = self.elements.get(tag, (None, None))[1] - if method is not None: - self.handle_endtag(tag, method) - else: - self.unknown_endtag(tag) return while len(self.stack) > found: --- 697,700 ---- From python-dev@python.org Tue Jul 4 15:53:45 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 4 Jul 2000 07:53:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules pyexpat.c,2.6,2.7 Message-ID: <200007041453.HAA15606@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv15552 Modified Files: pyexpat.c Log Message: Fixes for compilation problems on Tru64 reported by Mark Favas Index: pyexpat.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pyexpat.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** pyexpat.c 2000/06/30 23:50:38 2.6 --- pyexpat.c 2000/07/04 14:53:43 2.7 *************** *** 67,71 **** }; ! staticforward struct HandlerInfo handler_info[]; /* Convert an array of attributes and their values into a Python dict */ --- 67,71 ---- }; ! staticforward struct HandlerInfo handler_info[64]; /* Convert an array of attributes and their values into a Python dict */ *************** *** 985,1031 **** {{"StartElementHandler", pyxml_SetStartElementHandler, ! my_StartElementHandler}, {"EndElementHandler", pyxml_SetEndElementHandler, ! my_EndElementHandler}, {"ProcessingInstructionHandler", (xmlhandlersetter)XML_SetProcessingInstructionHandler, ! my_ProcessingInstructionHandler}, {"CharacterDataHandler", (xmlhandlersetter)XML_SetCharacterDataHandler, ! my_CharacterDataHandler}, {"UnparsedEntityDeclHandler", (xmlhandlersetter)XML_SetUnparsedEntityDeclHandler, ! my_UnparsedEntityDeclHandler }, {"NotationDeclHandler", (xmlhandlersetter)XML_SetNotationDeclHandler, ! my_NotationDeclHandler }, {"StartNamespaceDeclHandler", pyxml_SetStartNamespaceDeclHandler, ! my_StartNamespaceDeclHandler }, {"EndNamespaceDeclHandler", pyxml_SetEndNamespaceDeclHandler, ! my_EndNamespaceDeclHandler }, {"CommentHandler", (xmlhandlersetter)XML_SetCommentHandler, ! my_CommentHandler}, {"StartCdataSectionHandler", pyxml_SetStartCdataSection, ! my_StartCdataSectionHandler}, {"EndCdataSectionHandler", pyxml_SetEndCdataSection, ! my_EndCdataSectionHandler}, {"DefaultHandler", (xmlhandlersetter)XML_SetDefaultHandler, ! my_DefaultHandler}, {"DefaultHandlerExpand", (xmlhandlersetter)XML_SetDefaultHandlerExpand, ! my_DefaultHandlerExpandHandler}, {"NotStandaloneHandler", (xmlhandlersetter)XML_SetNotStandaloneHandler, ! my_NotStandaloneHandler}, {"ExternalEntityRefHandler", (xmlhandlersetter)XML_SetExternalEntityRefHandler, ! my_ExternalEntityRefHandler }, {NULL, NULL, NULL } /* sentinel */ --- 985,1031 ---- {{"StartElementHandler", pyxml_SetStartElementHandler, ! (xmlhandler)my_StartElementHandler}, {"EndElementHandler", pyxml_SetEndElementHandler, ! (xmlhandler)my_EndElementHandler}, {"ProcessingInstructionHandler", (xmlhandlersetter)XML_SetProcessingInstructionHandler, ! (xmlhandler)my_ProcessingInstructionHandler}, {"CharacterDataHandler", (xmlhandlersetter)XML_SetCharacterDataHandler, ! (xmlhandler)my_CharacterDataHandler}, {"UnparsedEntityDeclHandler", (xmlhandlersetter)XML_SetUnparsedEntityDeclHandler, ! (xmlhandler)my_UnparsedEntityDeclHandler }, {"NotationDeclHandler", (xmlhandlersetter)XML_SetNotationDeclHandler, ! (xmlhandler)my_NotationDeclHandler }, {"StartNamespaceDeclHandler", pyxml_SetStartNamespaceDeclHandler, ! (xmlhandler)my_StartNamespaceDeclHandler }, {"EndNamespaceDeclHandler", pyxml_SetEndNamespaceDeclHandler, ! (xmlhandler)my_EndNamespaceDeclHandler }, {"CommentHandler", (xmlhandlersetter)XML_SetCommentHandler, ! (xmlhandler)my_CommentHandler}, {"StartCdataSectionHandler", pyxml_SetStartCdataSection, ! (xmlhandler)my_StartCdataSectionHandler}, {"EndCdataSectionHandler", pyxml_SetEndCdataSection, ! (xmlhandler)my_EndCdataSectionHandler}, {"DefaultHandler", (xmlhandlersetter)XML_SetDefaultHandler, ! (xmlhandler)my_DefaultHandler}, {"DefaultHandlerExpand", (xmlhandlersetter)XML_SetDefaultHandlerExpand, ! (xmlhandler)my_DefaultHandlerExpandHandler}, {"NotStandaloneHandler", (xmlhandlersetter)XML_SetNotStandaloneHandler, ! (xmlhandler)my_NotStandaloneHandler}, {"ExternalEntityRefHandler", (xmlhandlersetter)XML_SetExternalEntityRefHandler, ! (xmlhandler)my_ExternalEntityRefHandler }, {NULL, NULL, NULL } /* sentinel */ From python-dev@python.org Tue Jul 4 18:44:50 2000 From: python-dev@python.org (Tim Peters) Date: Tue, 4 Jul 2000 10:44:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include dictobject.h,2.18,2.19 Message-ID: <200007041744.KAA12843@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv12647/python/dist/src/Include Modified Files: dictobject.h Log Message: Removed Py_PROTO and switched to ANSI C declarations in the dict implementation. This was really to test whether my new CVS+SSH setup is more usable than the old one -- and turns out it is (for whatever reason, it was impossible to do a commit before that involved more than one directory). Index: dictobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/dictobject.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** dictobject.h 2000/06/30 23:58:04 2.18 --- dictobject.h 2000/07/04 17:44:48 2.19 *************** *** 21,41 **** #define PyDict_Check(op) ((op)->ob_type == &PyDict_Type) ! extern DL_IMPORT(PyObject *) PyDict_New Py_PROTO((void)); ! extern DL_IMPORT(PyObject *) PyDict_GetItem Py_PROTO((PyObject *mp, PyObject *key)); ! extern DL_IMPORT(int) PyDict_SetItem Py_PROTO((PyObject *mp, PyObject *key, PyObject *item)); ! extern DL_IMPORT(int) PyDict_DelItem Py_PROTO((PyObject *mp, PyObject *key)); ! extern DL_IMPORT(void) PyDict_Clear Py_PROTO((PyObject *mp)); extern DL_IMPORT(int) PyDict_Next ! Py_PROTO((PyObject *mp, int *pos, PyObject **key, PyObject **value)); ! extern DL_IMPORT(PyObject *) PyDict_Keys Py_PROTO((PyObject *mp)); ! extern DL_IMPORT(PyObject *) PyDict_Values Py_PROTO((PyObject *mp)); ! extern DL_IMPORT(PyObject *) PyDict_Items Py_PROTO((PyObject *mp)); ! extern DL_IMPORT(int) PyDict_Size Py_PROTO((PyObject *mp)); ! extern DL_IMPORT(PyObject *) PyDict_Copy Py_PROTO((PyObject *mp)); ! extern DL_IMPORT(PyObject *) PyDict_GetItemString Py_PROTO((PyObject *dp, char *key)); ! extern DL_IMPORT(int) PyDict_SetItemString Py_PROTO((PyObject *dp, char *key, PyObject *item)); ! extern DL_IMPORT(int) PyDict_DelItemString Py_PROTO((PyObject *dp, char *key)); #ifdef __cplusplus --- 21,41 ---- #define PyDict_Check(op) ((op)->ob_type == &PyDict_Type) ! extern DL_IMPORT(PyObject *) PyDict_New(void); ! extern DL_IMPORT(PyObject *) PyDict_GetItem(PyObject *mp, PyObject *key); ! extern DL_IMPORT(int) PyDict_SetItem(PyObject *mp, PyObject *key, PyObject *item); ! extern DL_IMPORT(int) PyDict_DelItem(PyObject *mp, PyObject *key); ! extern DL_IMPORT(void) PyDict_Clear(PyObject *mp); extern DL_IMPORT(int) PyDict_Next ! (PyObject *mp, int *pos, PyObject **key, PyObject **value); ! extern DL_IMPORT(PyObject *) PyDict_Keys(PyObject *mp); ! extern DL_IMPORT(PyObject *) PyDict_Values(PyObject *mp); ! extern DL_IMPORT(PyObject *) PyDict_Items(PyObject *mp); ! extern DL_IMPORT(int) PyDict_Size(PyObject *mp); ! extern DL_IMPORT(PyObject *) PyDict_Copy(PyObject *mp); ! extern DL_IMPORT(PyObject *) PyDict_GetItemString(PyObject *dp, char *key); ! extern DL_IMPORT(int) PyDict_SetItemString(PyObject *dp, char *key, PyObject *item); ! extern DL_IMPORT(int) PyDict_DelItemString(PyObject *dp, char *key); #ifdef __cplusplus From python-dev@python.org Tue Jul 4 18:44:50 2000 From: python-dev@python.org (Tim Peters) Date: Tue, 4 Jul 2000 10:44:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects dictobject.c,2.58,2.59 Message-ID: <200007041744.KAA12847@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv12647/python/dist/src/Objects Modified Files: dictobject.c Log Message: Removed Py_PROTO and switched to ANSI C declarations in the dict implementation. This was really to test whether my new CVS+SSH setup is more usable than the old one -- and turns out it is (for whatever reason, it was impossible to do a commit before that involved more than one directory). Index: dictobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/dictobject.c,v retrieving revision 2.58 retrieving revision 2.59 diff -C2 -r2.58 -r2.59 *** dictobject.c 2000/07/01 01:00:38 2.58 --- dictobject.c 2000/07/04 17:44:48 2.59 *************** *** 131,140 **** Jyrki Alakuijala and Vladimir Marangozov.) */ - static dictentry *lookdict Py_PROTO((dictobject *, PyObject *, long)); static dictentry * ! lookdict(mp, key, hash) ! dictobject *mp; ! PyObject *key; ! register long hash; { register int i; --- 131,136 ---- Jyrki Alakuijala and Vladimir Marangozov.) */ static dictentry * ! lookdict(dictobject *mp, PyObject *key, register long hash) { register int i; *************** *** 200,211 **** Eats a reference to key and one to value. */ - static void insertdict - Py_PROTO((dictobject *, PyObject *, long, PyObject *)); static void ! insertdict(mp, key, hash, value) ! register dictobject *mp; ! PyObject *key; ! long hash; ! PyObject *value; { PyObject *old_value; --- 196,201 ---- Eats a reference to key and one to value. */ static void ! insertdict(register dictobject *mp, PyObject *key, long hash, PyObject *value) { PyObject *old_value; *************** *** 235,243 **** actually be smaller than the old one. */ - static int dictresize Py_PROTO((dictobject *, int)); static int ! dictresize(mp, minused) ! dictobject *mp; ! int minused; { register int oldsize = mp->ma_size; --- 225,230 ---- actually be smaller than the old one. */ static int ! dictresize(dictobject *mp, int minused) { register int oldsize = mp->ma_size; *************** *** 288,294 **** PyObject * ! PyDict_GetItem(op, key) ! PyObject *op; ! PyObject *key; { long hash; --- 275,279 ---- PyObject * ! PyDict_GetItem(PyObject *op, PyObject *key) { long hash; *************** *** 313,320 **** int ! PyDict_SetItem(op, key, value) ! register PyObject *op; ! PyObject *key; ! PyObject *value; { register dictobject *mp; --- 298,302 ---- int ! PyDict_SetItem(register PyObject *op, PyObject *key, PyObject *value) { register dictobject *mp; *************** *** 361,367 **** int ! PyDict_DelItem(op, key) ! PyObject *op; ! PyObject *key; { register dictobject *mp; --- 343,347 ---- int ! PyDict_DelItem(PyObject *op, PyObject *key) { register dictobject *mp; *************** *** 404,409 **** void ! PyDict_Clear(op) ! PyObject *op; { int i, n; --- 384,388 ---- void ! PyDict_Clear(PyObject *op) { int i, n; *************** *** 427,435 **** int ! PyDict_Next(op, ppos, pkey, pvalue) ! PyObject *op; ! int *ppos; ! PyObject **pkey; ! PyObject **pvalue; { int i; --- 406,410 ---- int ! PyDict_Next(PyObject *op, int *ppos, PyObject **pkey, PyObject **pvalue) { int i; *************** *** 456,461 **** static void ! dict_dealloc(mp) ! register dictobject *mp; { register int i; --- 431,435 ---- static void ! dict_dealloc(register dictobject *mp) { register int i; *************** *** 479,486 **** static int ! dict_print(mp, fp, flags) ! register dictobject *mp; ! register FILE *fp; ! register int flags; { register int i; --- 453,457 ---- static int ! dict_print(register dictobject *mp, register FILE *fp, register int flags) { register int i; *************** *** 519,524 **** static PyObject * ! dict_repr(mp) ! dictobject *mp; { auto PyObject *v; --- 490,494 ---- static PyObject * ! dict_repr(dictobject *mp) { auto PyObject *v; *************** *** 556,561 **** static int ! dict_length(mp) ! dictobject *mp; { return mp->ma_used; --- 526,530 ---- static int ! dict_length(dictobject *mp) { return mp->ma_used; *************** *** 563,569 **** static PyObject * ! dict_subscript(mp, key) ! dictobject *mp; ! register PyObject *key; { PyObject *v; --- 532,536 ---- static PyObject * ! dict_subscript(dictobject *mp, register PyObject *key) { PyObject *v; *************** *** 591,597 **** static int ! dict_ass_sub(mp, v, w) ! dictobject *mp; ! PyObject *v, *w; { if (w == NULL) --- 558,562 ---- static int ! dict_ass_sub(dictobject *mp, PyObject *v, PyObject *w) { if (w == NULL) *************** *** 608,614 **** static PyObject * ! dict_keys(mp, args) ! register dictobject *mp; ! PyObject *args; { register PyObject *v; --- 573,577 ---- static PyObject * ! dict_keys(register dictobject *mp, PyObject *args) { register PyObject *v; *************** *** 631,637 **** static PyObject * ! dict_values(mp, args) ! register dictobject *mp; ! PyObject *args; { register PyObject *v; --- 594,598 ---- static PyObject * ! dict_values(register dictobject *mp, PyObject *args) { register PyObject *v; *************** *** 654,660 **** static PyObject * ! dict_items(mp, args) ! register dictobject *mp; ! PyObject *args; { register PyObject *v; --- 615,619 ---- static PyObject * ! dict_items(register dictobject *mp, PyObject *args) { register PyObject *v; *************** *** 686,692 **** static PyObject * ! dict_update(mp, args) ! register dictobject *mp; ! PyObject *args; { register int i; --- 645,649 ---- static PyObject * ! dict_update(register dictobject *mp, PyObject *args) { register int i; *************** *** 719,725 **** static PyObject * ! dict_copy(mp, args) ! register dictobject *mp; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 676,680 ---- static PyObject * ! dict_copy(register dictobject *mp, PyObject *args) { if (!PyArg_Parse(args, "")) *************** *** 729,734 **** PyObject * ! PyDict_Copy(o) ! PyObject *o; { register dictobject *mp; --- 684,688 ---- PyObject * ! PyDict_Copy(PyObject *o) { register dictobject *mp; *************** *** 762,767 **** int ! PyDict_Size(mp) ! PyObject *mp; { if (mp == NULL || !PyDict_Check(mp)) { --- 716,720 ---- int ! PyDict_Size(PyObject *mp) { if (mp == NULL || !PyDict_Check(mp)) { *************** *** 773,778 **** PyObject * ! PyDict_Keys(mp) ! PyObject *mp; { if (mp == NULL || !PyDict_Check(mp)) { --- 726,730 ---- PyObject * ! PyDict_Keys(PyObject *mp) { if (mp == NULL || !PyDict_Check(mp)) { *************** *** 784,789 **** PyObject * ! PyDict_Values(mp) ! PyObject *mp; { if (mp == NULL || !PyDict_Check(mp)) { --- 736,740 ---- PyObject * ! PyDict_Values(PyObject *mp) { if (mp == NULL || !PyDict_Check(mp)) { *************** *** 795,800 **** PyObject * ! PyDict_Items(mp) ! PyObject *mp; { if (mp == NULL || !PyDict_Check(mp)) { --- 746,750 ---- PyObject * ! PyDict_Items(PyObject *mp) { if (mp == NULL || !PyDict_Check(mp)) { *************** *** 814,821 **** static PyObject * ! characterize(a, b, pval) ! dictobject *a; ! dictobject *b; ! PyObject **pval; { PyObject *diff = NULL; --- 764,768 ---- static PyObject * ! characterize(dictobject *a, dictobject *b, PyObject **pval) { PyObject *diff = NULL; *************** *** 844,849 **** static int ! dict_compare(a, b) ! dictobject *a, *b; { PyObject *adiff, *bdiff, *aval, *bval; --- 791,795 ---- static int ! dict_compare(dictobject *a, dictobject *b) { PyObject *adiff, *bdiff, *aval, *bval; *************** *** 874,879 **** static int ! dict_compare(a, b) ! dictobject *a, *b; { PyObject *akeys, *bkeys; --- 820,824 ---- static int ! dict_compare(dictobject *a, dictobject *b) { PyObject *akeys, *bkeys; *************** *** 953,959 **** static PyObject * ! dict_has_key(mp, args) ! register dictobject *mp; ! PyObject *args; { PyObject *key; --- 898,902 ---- static PyObject * ! dict_has_key(register dictobject *mp, PyObject *args) { PyObject *key; *************** *** 976,982 **** static PyObject * ! dict_get(mp, args) ! register dictobject *mp; ! PyObject *args; { PyObject *key; --- 919,923 ---- static PyObject * ! dict_get(register dictobject *mp, PyObject *args) { PyObject *key; *************** *** 1010,1016 **** static PyObject * ! dict_clear(mp, args) ! register dictobject *mp; ! PyObject *args; { if (!PyArg_NoArgs(args)) --- 951,955 ---- static PyObject * ! dict_clear(register dictobject *mp, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 1059,1065 **** static PyObject * ! dict_getattr(mp, name) ! dictobject *mp; ! char *name; { return Py_FindMethod(mapp_methods, (PyObject *)mp, name); --- 998,1002 ---- static PyObject * ! dict_getattr(dictobject *mp, char *name) { return Py_FindMethod(mapp_methods, (PyObject *)mp, name); *************** *** 1096,1102 **** PyObject * ! PyDict_GetItemString(v, key) ! PyObject *v; ! char *key; { PyObject *kv, *rv; --- 1033,1037 ---- PyObject * ! PyDict_GetItemString(PyObject *v, char *key) { PyObject *kv, *rv; *************** *** 1110,1117 **** int ! PyDict_SetItemString(v, key, item) ! PyObject *v; ! char *key; ! PyObject *item; { PyObject *kv; --- 1045,1049 ---- int ! PyDict_SetItemString(PyObject *v, char *key, PyObject *item) { PyObject *kv; *************** *** 1127,1133 **** int ! PyDict_DelItemString(v, key) ! PyObject *v; ! char *key; { PyObject *kv; --- 1059,1063 ---- int ! PyDict_DelItemString(PyObject *v, char *key) { PyObject *kv; From python-dev@python.org Tue Jul 4 19:48:49 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 4 Jul 2000 11:48:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules parsermodule.c,2.42,2.43 Message-ID: <200007041848.LAA23784@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv23771 Modified Files: parsermodule.c Log Message: Remove warning about local variable possibly being using uninitialized; noted by Marc-Andre Lemburg . Index: parsermodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v retrieving revision 2.42 retrieving revision 2.43 diff -C2 -r2.42 -r2.43 *** parsermodule.c 2000/07/03 18:07:43 2.42 --- parsermodule.c 2000/07/04 18:48:46 2.43 *************** *** 2087,2091 **** { int nch = NCH(tree); ! int i, ok; node *last; --- 2087,2091 ---- { int nch = NCH(tree); ! int i, ok = 1; node *last; From python-dev@python.org Wed Jul 5 00:51:33 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 4 Jul 2000 16:51:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules pyexpat.c,2.7,2.8 Message-ID: <200007042351.QAA13057@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv13050 Modified Files: pyexpat.c Log Message: pyexpat.errors is a *strange* module! It gets initialized when pyexpat is imported, and is only accessible as an attribute of pyexpat; it cannot be imported itself. This allows it to at least be importable after pyexpat itself has been imported by adding it to sys.modules, so it is not quite as strange. This arrangement needs to be better thought out. Index: pyexpat.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pyexpat.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** pyexpat.c 2000/07/04 14:53:43 2.7 --- pyexpat.c 2000/07/04 23:51:31 2.8 *************** *** 841,853 **** initpyexpat(){ PyObject *m, *d; ! char *rev="$Revision$"; PyObject *errors_module, *errors_dict; ! Xmlparsetype.ob_type = &PyType_Type; /* Create the module and add the functions */ m = Py_InitModule4("pyexpat", pyexpat_methods, ! pyexpat_module_documentation, ! (PyObject*)NULL,PYTHON_API_VERSION); /* Add some symbolic constants to the module */ --- 841,854 ---- initpyexpat(){ PyObject *m, *d; ! char *rev = "$Revision$"; PyObject *errors_module, *errors_dict; + PyObject *sys_modules; ! Xmlparsetype.ob_type = &PyType_Type; /* Create the module and add the functions */ m = Py_InitModule4("pyexpat", pyexpat_methods, ! pyexpat_module_documentation, ! (PyObject*)NULL, PYTHON_API_VERSION); /* Add some symbolic constants to the module */ *************** *** 856,865 **** PyDict_SetItemString(d, "error", ErrorObject); ! PyDict_SetItemString(d,"__version__", PyString_FromStringAndSize(rev+11, strlen(rev+11)-2)); ! errors_module=PyModule_New( "errors" ); ! PyDict_SetItemString(d,"errors", errors_module ); /* XXX When Expat supports some way of figuring out how it was --- 857,868 ---- PyDict_SetItemString(d, "error", ErrorObject); ! PyDict_SetItemString(d, "__version__", PyString_FromStringAndSize(rev+11, strlen(rev+11)-2)); ! sys_modules = PySys_GetObject("modules"); ! errors_module = PyModule_New("pyexpat.errors"); ! PyDict_SetItemString(d, "errors", errors_module); ! PyDict_SetItemString(sys_modules, "pyexpat.errors", errors_module); /* XXX When Expat supports some way of figuring out how it was *************** *** 868,879 **** */ PyDict_SetItemString(d, "native_encoding", ! PyString_FromString("UTF-8") ); ! ! errors_dict=PyModule_GetDict( errors_module ); #define MYCONST(name) \ PyDict_SetItemString(errors_dict, #name, \ ! PyString_FromString( XML_ErrorString(name))) ! MYCONST(XML_ERROR_NO_MEMORY); MYCONST(XML_ERROR_SYNTAX); --- 871,881 ---- */ PyDict_SetItemString(d, "native_encoding", ! PyString_FromString("UTF-8")); ! errors_dict = PyModule_GetDict(errors_module); #define MYCONST(name) \ PyDict_SetItemString(errors_dict, #name, \ ! PyString_FromString(XML_ErrorString(name))) ! MYCONST(XML_ERROR_NO_MEMORY); MYCONST(XML_ERROR_SYNTAX); *************** *** 895,899 **** MYCONST(XML_ERROR_UNKNOWN_ENCODING); MYCONST(XML_ERROR_INCORRECT_ENCODING); ! /* Check for errors */ if (PyErr_Occurred()) --- 897,901 ---- MYCONST(XML_ERROR_UNKNOWN_ENCODING); MYCONST(XML_ERROR_INCORRECT_ENCODING); ! /* Check for errors */ if (PyErr_Occurred()) *************** *** 1031,1033 **** {NULL, NULL, NULL } /* sentinel */ }; - --- 1033,1034 ---- From python-dev@python.org Wed Jul 5 03:03:37 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 4 Jul 2000 19:03:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libpyexpat.tex,1.1,1.2 Message-ID: <200007050203.TAA06866@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv6859 Modified Files: libpyexpat.tex Log Message: Wrapped some long lines. Cleaned up the table of error constants defined in pyexpat.errors; an extra pair of braces had pretty much destroyed the table! (Not sure why.) Moved the pyexpat.errors module documentation into a \section with the proper headers for a module. Index: libpyexpat.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpyexpat.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** libpyexpat.tex 2000/06/11 02:42:07 1.1 --- libpyexpat.tex 2000/07/05 02:03:34 1.2 *************** *** 69,73 **** Parses the contents of the string \var{data}, calling the appropriate handler functions to process the parsed data. \var{isfinal} must be ! true on the final call to this method. \var{data} can be the empty string at any time. \end{methoddesc} --- 69,74 ---- Parses the contents of the string \var{data}, calling the appropriate handler functions to process the parsed data. \var{isfinal} must be ! true on the final call to this method. \var{data} can be the empty ! string at any time. \end{methoddesc} *************** *** 117,121 **** Here is the list of handlers that can be set. To set a handler on an ! \class{xmlparser} object \var{o}, use \code{\var{o}.\var{handlername} = \var{func}}. \var{handlername} must be taken from the following list, and \var{func} must be a callable object accepting the correct number of arguments. The arguments are all strings, unless otherwise stated. \begin{methoddesc}{StartElementHandler}{name, attributes} --- 118,126 ---- Here is the list of handlers that can be set. To set a handler on an ! \class{xmlparser} object \var{o}, use ! \code{\var{o}.\var{handlername} = \var{func}}. \var{handlername} must ! be taken from the following list, and \var{func} must be a callable ! object accepting the correct number of arguments. The arguments are ! all strings, unless otherwise stated. \begin{methoddesc}{StartElementHandler}{name, attributes} *************** *** 188,224 **** ! ! ! \subsection{\module{pyexpat.errors} -- Error constants} ! ! The following table lists the error constants in the ! \module{pyexpat.errors} submodule, available once the \module{pyexpat} module has been imported. ! ! \begin{tableii}{l|l}{code}{Constants}{}{} ! \lineii {XML_ERROR_ASYNC_ENTITY} ! {XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF} ! \lineii {XML_ERROR_BAD_CHAR_REF} ! {XML_ERROR_BINARY_ENTITY_REF} ! \lineii {XML_ERROR_DUPLICATE_ATTRIBUTE} ! {XML_ERROR_INCORRECT_ENCODING} ! \lineii {XML_ERROR_INVALID_TOKEN} ! {XML_ERROR_JUNK_AFTER_DOC_ELEMENT} ! \lineii {XML_ERROR_MISPLACED_XML_PI} ! {XML_ERROR_NO_ELEMENTS} ! \lineii {XML_ERROR_NO_MEMORY} ! {XML_ERROR_PARAM_ENTITY_REF} ! \lineii {XML_ERROR_PARTIAL_CHAR} ! {XML_ERROR_RECURSIVE_ENTITY_REF} ! \lineii {XML_ERROR_SYNTAX} ! {XML_ERROR_TAG_MISMATCH} ! \lineii {XML_ERROR_UNCLOSED_TOKEN} ! {XML_ERROR_UNDEFINED_ENTITY} ! \lineii {XML_ERROR_UNKNOWN_ENCODING}{} ! \end{tableii} ! ! \subsection{Example} ! ! The following program defines 3 handlers that just print out their arguments. --- 193,199 ---- + \subsection{Example \label{pyexpat-example}} ! The following program defines three handlers that just print out their arguments. *************** *** 261,262 **** --- 236,276 ---- End element: parent \end{verbatim} + + + \section{\module{pyexpat.errors} --- Error constants} + + \declaremodule{builtin}{pyexpat.errors} + \modulesynopsis{Error constants defined for the Expat parser} + \moduleauthor{Paul Prescod}{paul@prescod.net} + \sectionauthor{A.M. Kuchling}{amk1@bigfoot.com} + + The following table lists the error constants in the + \module{pyexpat.errors} submodule, available once the + \refmodule{pyexpat} module has been imported. + + Note that this module cannot be imported directly until + \refmodule{pyexpat} has been imported. + + The following constants are defined: + + \begin{tableii}{l|l}{code}{Constants}{} + \lineii{XML_ERROR_ASYNC_ENTITY} + {XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF} + \lineii{XML_ERROR_BAD_CHAR_REF} + {XML_ERROR_BINARY_ENTITY_REF} + \lineii{XML_ERROR_DUPLICATE_ATTRIBUTE} + {XML_ERROR_INCORRECT_ENCODING} + \lineii{XML_ERROR_INVALID_TOKEN} + {XML_ERROR_JUNK_AFTER_DOC_ELEMENT} + \lineii{XML_ERROR_MISPLACED_XML_PI} + {XML_ERROR_NO_ELEMENTS} + \lineii{XML_ERROR_NO_MEMORY} + {XML_ERROR_PARAM_ENTITY_REF} + \lineii{XML_ERROR_PARTIAL_CHAR} + {XML_ERROR_RECURSIVE_ENTITY_REF} + \lineii{XML_ERROR_SYNTAX} + {XML_ERROR_TAG_MISMATCH} + \lineii{XML_ERROR_UNCLOSED_TOKEN} + {XML_ERROR_UNDEFINED_ENTITY} + \lineii{XML_ERROR_UNKNOWN_ENCODING}{} + \end{tableii} From python-dev@python.org Wed Jul 5 03:24:41 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 4 Jul 2000 19:24:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib markup.tex,NONE,1.1 lib.tex,1.154,1.155 Message-ID: <200007050224.TAA08029@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv8017/lib Modified Files: lib.tex Added Files: markup.tex Log Message: Created a new chapter on structured markup processing, including the existing SGML, HTML, & XML support, and providing a home for the new XML support as it becomes documented. --- NEW FILE --- \chapter{Structured Markup Processing Tools \label{markup}} Python supports a variety of modules to work with various forms of structured data markup. This includes modules to work with the Standard Generalized Markup Language (SGML) and the Hypertext Markup Language (HTML), and several interfaces for working with the Extensible Markup Language (XML). \localmoduletable Index: lib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/lib.tex,v retrieving revision 1.154 retrieving revision 1.155 diff -C2 -r1.154 -r1.155 *** lib.tex 2000/06/28 22:05:44 1.154 --- lib.tex 2000/07/05 02:24:38 1.155 *************** *** 216,222 **** \input{netdata} % Internet Data Handling - \input{libsgmllib} - \input{libhtmllib} - \input{libxmllib} \input{libformatter} \input{librfc822} --- 216,219 ---- *************** *** 237,242 **** \input{libnetrc} \input{librobotparser} ! \input{librestricted} \input{librexec} \input{libbastion} --- 234,245 ---- \input{libnetrc} \input{librobotparser} + + \input{markup} % Structured Markup Processing Tools + \input{libsgmllib} + \input{libhtmllib} + \input{libxmllib} + \input{libpyexpat} ! \input{librestricted} % Restricted Execution \input{librexec} \input{libbastion} From python-dev@python.org Wed Jul 5 03:24:41 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 4 Jul 2000 19:24:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile.deps,1.34,1.35 Message-ID: <200007050224.TAA08030@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv8017 Modified Files: Makefile.deps Log Message: Created a new chapter on structured markup processing, including the existing SGML, HTML, & XML support, and providing a home for the new XML support as it becomes documented. Index: Makefile.deps =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile.deps,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** Makefile.deps 2000/06/28 22:03:28 1.34 --- Makefile.deps 2000/07/05 02:24:39 1.35 *************** *** 167,170 **** --- 167,171 ---- ../lib/libdis.tex \ ../lib/libxmllib.tex \ + ../lib/libpyexpat.tex \ ../lib/libqueue.tex \ ../lib/liblocale.tex \ *************** *** 188,191 **** --- 189,193 ---- ../lib/internet.tex \ ../lib/netdata.tex \ + ../lib/markup.tex \ ../lib/libpycompile.tex \ ../lib/libcompileall.tex \ From python-dev@python.org Wed Jul 5 04:06:49 2000 From: python-dev@python.org (Greg Ward) Date: Tue, 4 Jul 2000 20:06:49 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command sdist.py,1.36,1.37 Message-ID: <200007050306.UAA16884@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv16872 Modified Files: sdist.py Log Message: Added the --dist-dir option to control where the archive(s) are put; defaults to 'dist' (ie. no longer in the distribution root). Index: sdist.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/sdist.py,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** sdist.py 2000/06/29 02:06:29 1.36 --- sdist.py 2000/07/05 03:06:46 1.37 *************** *** 65,68 **** --- 65,71 ---- "keep the distribution tree around after creating " + "archive file(s)"), + ('dist-dir=', 'd', + "directory to put the source distribution archive(s) in " + "[default: dist]"), ] *************** *** 95,98 **** --- 98,102 ---- self.formats = None self.keep_tree = 0 + self.dist_dir = None self.archive_files = None *************** *** 119,123 **** --- 123,130 ---- "unknown archive format '%s'" % bad_format + if self.dist_dir is None: + self.dist_dir = "dist" + def run (self): *************** *** 668,676 **** # done elsewhere. base_dir = self.distribution.get_fullname() self.make_release_tree (base_dir, self.files) archive_files = [] # remember names of files we create for fmt in self.formats: ! file = self.make_archive (base_dir, fmt, base_dir=base_dir) archive_files.append(file) --- 675,686 ---- # done elsewhere. base_dir = self.distribution.get_fullname() + base_name = os.path.join(self.dist_dir, base_dir) self.make_release_tree (base_dir, self.files) archive_files = [] # remember names of files we create + if self.dist_dir: + self.mkpath(self.dist_dir) for fmt in self.formats: ! file = self.make_archive (base_name, fmt, base_dir=base_dir) archive_files.append(file) From python-dev@python.org Wed Jul 5 04:07:21 2000 From: python-dev@python.org (Greg Ward) Date: Tue, 4 Jul 2000 20:07:21 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command bdist.py,1.14,1.15 Message-ID: <200007050307.UAA16921@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv16913/command Modified Files: bdist.py Log Message: Added the --dist-dir option that the "bdist_*" will use to control where they place their output files. Index: bdist.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/bdist.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** bdist.py 2000/06/27 01:24:07 1.14 --- bdist.py 2000/07/05 03:07:18 1.15 *************** *** 35,38 **** --- 35,41 ---- ('formats=', None, "formats for distribution (comma-separated list)"), + ('dist-dir=', 'd', + "directory to put final built distributions in " + "[default: dist]"), ] *************** *** 66,69 **** --- 69,73 ---- self.bdist_base = None self.formats = None + self.dist_dir = None # initialize_options() *************** *** 87,90 **** --- 91,97 ---- "don't know how to create built distributions " + \ "on platform %s" % os.name + + if self.dist_dir is None: + self.dist_dir = "dist" # finalize_options() From python-dev@python.org Wed Jul 5 04:07:39 2000 From: python-dev@python.org (Greg Ward) Date: Tue, 4 Jul 2000 20:07:39 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command bdist_dumb.py,1.8,1.9 Message-ID: <200007050307.UAA16948@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv16940 Modified Files: bdist_dumb.py Log Message: Added --dist-dir option to control where output archive(s) go. Index: bdist_dumb.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/bdist_dumb.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** bdist_dumb.py 2000/06/28 00:36:40 1.8 --- bdist_dumb.py 2000/07/05 03:07:37 1.9 *************** *** 25,28 **** --- 25,30 ---- "keep the pseudo-installation tree around after " + "creating the distribution archive"), + ('dist-dir=', 'd', + "directory to put final built distributions in"), ] *************** *** 35,38 **** --- 37,41 ---- self.format = None self.keep_tree = 0 + self.dist_dir = None # initialize_options() *************** *** 52,55 **** --- 55,60 ---- "on platform %s") % os.name + self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) + # finalize_options() *************** *** 72,76 **** print "self.bdist_dir = %s" % self.bdist_dir print "self.format = %s" % self.format ! self.make_archive (archive_basename, self.format, root_dir=self.bdist_dir) --- 77,82 ---- print "self.bdist_dir = %s" % self.bdist_dir print "self.format = %s" % self.format ! self.make_archive (os.path.join(self.dist_dir, archive_basename), ! self.format, root_dir=self.bdist_dir) From python-dev@python.org Wed Jul 5 04:08:57 2000 From: python-dev@python.org (Greg Ward) Date: Tue, 4 Jul 2000 20:08:57 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command bdist_wininst.py,1.3,1.4 Message-ID: <200007050308.UAA17012@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv16999/command Modified Files: bdist_wininst.py Log Message: Fixed so the ZIP file (which is bundled into an executable) goes in the temporary directory ('bdist_base'). Added --dist-dir option to control where the executable is put. Index: bdist_wininst.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/bdist_wininst.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** bdist_wininst.py 2000/06/29 23:50:19 1.3 --- bdist_wininst.py 2000/07/05 03:08:55 1.4 *************** *** 29,32 **** --- 29,34 ---- "require a specific python version" + " on the target system (1.5 or 1.6/2.0)"), + ('dist-dir=', 'd', + "directory to put final built distributions in"), ] *************** *** 37,40 **** --- 39,43 ---- self.target_optimize = 0 self.target_version = None + self.dist_dir = None # initialize_options() *************** *** 58,61 **** --- 61,66 ---- self.target_version = short_version + self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) + # finalize_options() *************** *** 93,97 **** # And make an archive relative to the root of the # pseudo-installation tree. ! archive_basename = "%s.win32" % self.distribution.get_fullname() # XXX hack! Our archive MUST be relative to sys.prefix # XXX What about .install_data, .install_scripts, ...? --- 98,105 ---- # And make an archive relative to the root of the # pseudo-installation tree. ! fullname = self.distribution.get_fullname() ! archive_basename = os.path.join(self.bdist_dir, ! "%s.win32" % fullname) ! # XXX hack! Our archive MUST be relative to sys.prefix # XXX What about .install_data, .install_scripts, ...? *************** *** 104,108 **** arcname = self.make_archive (archive_basename, "zip", root_dir=root_dir) ! self.create_exe (arcname) if not self.keep_tree: --- 112,116 ---- arcname = self.make_archive (archive_basename, "zip", root_dir=root_dir) ! self.create_exe (arcname, fullname) if not self.keep_tree: *************** *** 157,161 **** # create_inifile() ! def create_exe (self, arcname): import struct, zlib --- 165,169 ---- # create_inifile() ! def create_exe (self, arcname, fullname): import struct, zlib *************** *** 166,170 **** zcfgdata = co.compress (cfgdata) + co.flush() ! installer_name = "%s.win32.exe" % self.distribution.get_fullname() self.announce ("creating %s" % installer_name) --- 174,179 ---- zcfgdata = co.compress (cfgdata) + co.flush() ! installer_name = os.path.join(self.dist_dir, ! "%s.win32.exe" % fullname) self.announce ("creating %s" % installer_name) From python-dev@python.org Wed Jul 5 04:10:23 2000 From: python-dev@python.org (Greg Ward) Date: Tue, 4 Jul 2000 20:10:23 -0700 Subject: [Python-checkins] CVS: distutils TODO,1.6,1.7 Message-ID: <200007050310.UAA17180@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv17171 Modified Files: TODO Log Message: Various post-0.9 updates. Index: TODO =================================================================== RCS file: /cvsroot/python/distutils/TODO,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** TODO 2000/06/30 03:45:08 1.6 --- TODO 2000/07/05 03:10:20 1.7 *************** *** 129,134 **** --- 129,137 ---- strip the quotes (and, ideally, put them back on again when spawn() prints out the command run!) + [fixed!] + * support for building a new, static Python binary + INSTALLATION ------------ *************** *** 183,186 **** --- 186,191 ---- * should certainly put tarballs and zip files (sdist, bdist_dumb) in "dist" directory -- maybe RPMs, Windows installers too + + * bug! bdist --format=gztar,zip doesn't work: premature cleanup From python-dev@python.org Wed Jul 5 09:53:21 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Wed, 5 Jul 2000 01:53:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include Python.h,2.19,2.20 Message-ID: <200007050853.BAA06026@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv6017/Include Modified Files: Python.h Log Message: Added #defines to enable SUSv2 compatibility where available and to switch on support for BSD and SysV on platforms which use glibc such as Linux. These #defines are documented in e.g. the file /usr/include/features.h on Linux platforms and the SUSv2 docs. Index: Python.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** Python.h 2000/06/30 23:58:04 2.19 --- Python.h 2000/07/05 08:53:18 2.20 *************** *** 13,16 **** --- 13,26 ---- ******************************************************************/ + /* Enable compiler features including SUSv2 compatibility; switching + on C lib defines doesn't work here, because the symbols haven't + necessarily been defined yet. */ + #ifndef _GNU_SOURCE + # define _GNU_SOURCE 1 + #endif + #ifndef _XOPEN_SOURCE + # define _XOPEN_SOURCE 500 + #endif + /* Include nearly all Python header files */ From python-dev@python.org Wed Jul 5 10:46:02 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Wed, 5 Jul 2000 02:46:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include unicodeobject.h,2.11,2.12 Message-ID: <200007050946.CAA17699@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv17679/Include Modified Files: unicodeobject.h Log Message: Modified the ISALPHA and ISALNUM macros to use the new lookup APIs from unicodectype.c Index: unicodeobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/unicodeobject.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** unicodeobject.h 2000/07/03 10:52:13 2.11 --- unicodeobject.h 2000/07/05 09:45:59 2.12 *************** *** 138,141 **** --- 138,143 ---- #define Py_UNICODE_TONUMERIC(ch) _PyUnicode_ToNumeric(ch) + #define Py_UNICODE_ISALPHA(ch) iswalpha(ch) + #else *************** *** 159,168 **** #define Py_UNICODE_TONUMERIC(ch) _PyUnicode_ToNumeric(ch) ! #endif ! #define Py_UNICODE_ISALPHA(ch) \ ! (Py_UNICODE_ISLOWER(ch) || \ ! Py_UNICODE_ISUPPER(ch) || \ ! Py_UNICODE_ISTITLE(ch)) #define Py_UNICODE_ISALNUM(ch) \ --- 161,167 ---- #define Py_UNICODE_TONUMERIC(ch) _PyUnicode_ToNumeric(ch) ! #define Py_UNICODE_ISALPHA(ch) _PyUnicode_IsAlpha(ch) ! #endif #define Py_UNICODE_ISALNUM(ch) \ *************** *** 869,872 **** --- 868,875 ---- extern DL_IMPORT(int) _PyUnicode_IsNumeric( + register const Py_UNICODE ch /* Unicode character */ + ); + + extern DL_IMPORT(int) _PyUnicode_IsAlpha( register const Py_UNICODE ch /* Unicode character */ ); From python-dev@python.org Wed Jul 5 10:46:28 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Wed, 5 Jul 2000 02:46:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_string.py,1.8,1.9 Message-ID: <200007050946.CAA17831@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv17815/Lib/test Modified Files: test_string.py Log Message: Added tests for the new .isalpha() and .isalnum() methods. Index: test_string.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_string.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** test_string.py 2000/04/11 15:37:24 1.8 --- test_string.py 2000/07/05 09:46:26 1.9 *************** *** 85,88 **** --- 85,103 ---- test('istitle', 'Not--a Titlecase String', 0) + test('isalpha', 'a', 1) + test('isalpha', 'A', 1) + test('isalpha', '\n', 0) + test('isalpha', 'abc', 1) + test('isalpha', 'aBc123', 0) + test('isalpha', 'abc\n', 0) + + test('isalnum', 'a', 1) + test('isalnum', 'A', 1) + test('isalnum', '\n', 0) + test('isalnum', '123abc456', 1) + test('isalnum', 'a1b3c', 1) + test('isalnum', 'aBc000 ', 0) + test('isalnum', 'abc\n', 0) + test('splitlines', "abc\ndef\n\rghi", ['abc', 'def', '', 'ghi']) test('splitlines', "abc\ndef\n\r\nghi", ['abc', 'def', '', 'ghi']) From python-dev@python.org Wed Jul 5 10:46:42 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Wed, 5 Jul 2000 02:46:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_unicode.py,1.16,1.17 Message-ID: <200007050946.CAA17861@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv17854/Lib/test Modified Files: test_unicode.py Log Message: Added tests for the new .isalpha() and .isalnum() methods. Index: test_unicode.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** test_unicode.py 2000/06/30 09:13:35 1.16 --- test_unicode.py 2000/07/05 09:46:40 1.17 *************** *** 207,210 **** --- 207,226 ---- test('istitle', u'Not--a Titlecase String', 0) + test('isalpha', u'a', 1) + test('isalpha', u'A', 1) + test('isalpha', u'\n', 0) + test('isalpha', u'\u1FFc', 1) + test('isalpha', u'abc', 1) + test('isalpha', u'aBc123', 0) + test('isalpha', u'abc\n', 0) + + test('isalnum', u'a', 1) + test('isalnum', u'A', 1) + test('isalnum', u'\n', 0) + test('isalnum', u'123abc456', 1) + test('isalnum', u'a1b3c', 1) + test('isalnum', u'aBc000 ', 0) + test('isalnum', u'abc\n', 0) + test('splitlines', u"abc\ndef\n\rghi", [u'abc', u'def', u'', u'ghi']) test('splitlines', u"abc\ndef\n\r\nghi", [u'abc', u'def', u'', u'ghi']) From python-dev@python.org Wed Jul 5 10:47:50 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Wed, 5 Jul 2000 02:47:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.72,2.73 Message-ID: <200007050947.CAA17949@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv17901/Objects Modified Files: stringobject.c Log Message: Added new .isalpha() and .isalnum() methods to match the same ones on the Unicode objects. Note that the string versions use the (locale aware) C lib APIs isalpha() and isalnum(). Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.72 retrieving revision 2.73 diff -C2 -r2.72 -r2.73 *** stringobject.c 2000/06/30 23:58:05 2.72 --- stringobject.c 2000/07/05 09:47:46 2.73 *************** *** 1925,1928 **** --- 1925,1994 ---- + static char isalpha__doc__[] = + "S.isalpha() -> int\n\ + \n\ + Return 1 if all characters in S are alphabetic\n\ + and there is at least one character in S, 0 otherwise."; + + static PyObject* + string_isalpha(PyUnicodeObject *self, PyObject *args) + { + register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); + register const unsigned char *e; + + if (!PyArg_NoArgs(args)) + return NULL; + + /* Shortcut for single character strings */ + if (PyString_GET_SIZE(self) == 1 && + isalpha(*p)) + return PyInt_FromLong(1); + + /* Special case for empty strings */ + if (PyString_GET_SIZE(self) == 0) + return PyInt_FromLong(0); + + e = p + PyString_GET_SIZE(self); + for (; p < e; p++) { + if (!isalpha(*p)) + return PyInt_FromLong(0); + } + return PyInt_FromLong(1); + } + + + static char isalnum__doc__[] = + "S.isalnum() -> int\n\ + \n\ + Return 1 if all characters in S are alphanumeric\n\ + and there is at least one character in S, 0 otherwise."; + + static PyObject* + string_isalnum(PyUnicodeObject *self, PyObject *args) + { + register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); + register const unsigned char *e; + + if (!PyArg_NoArgs(args)) + return NULL; + + /* Shortcut for single character strings */ + if (PyString_GET_SIZE(self) == 1 && + isalnum(*p)) + return PyInt_FromLong(1); + + /* Special case for empty strings */ + if (PyString_GET_SIZE(self) == 0) + return PyInt_FromLong(0); + + e = p + PyString_GET_SIZE(self); + for (; p < e; p++) { + if (!isalnum(*p)) + return PyInt_FromLong(0); + } + return PyInt_FromLong(1); + } + + static char isdigit__doc__[] = "S.isdigit() -> int\n\ *************** *** 2167,2170 **** --- 2233,2238 ---- {"isdigit", (PyCFunction)string_isdigit, 0, isdigit__doc__}, {"istitle", (PyCFunction)string_istitle, 0, istitle__doc__}, + {"isalpha", (PyCFunction)string_isalpha, 0, isalpha__doc__}, + {"isalnum", (PyCFunction)string_isalnum, 0, isalnum__doc__}, {"capitalize", (PyCFunction)string_capitalize, 1, capitalize__doc__}, {"count", (PyCFunction)string_count, 1, count__doc__}, From python-dev@python.org Wed Jul 5 10:49:02 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Wed, 5 Jul 2000 02:49:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodectype.c,2.2,2.3 Message-ID: <200007050949.CAA18107@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv18055/Objects Modified Files: unicodectype.c Log Message: Added new lookup API which matches all alphabetic Unicode characters, i.e the ones with category 'Ll','Lu','Lt','Lo','Lm'. Index: unicodectype.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodectype.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** unicodectype.c 2000/04/11 15:39:02 2.2 --- unicodectype.c 2000/07/05 09:48:59 2.3 *************** *** 5015,5018 **** --- 5015,10308 ---- } + /* Returns 1 for Unicode characters having the category 'Ll', 'Lu', 'Lt', + 'Lo' or 'Lm', 0 otherwise. */ + + int _PyUnicode_IsAlpha(register const Py_UNICODE ch) + { + if (_PyUnicode_IsLowercase(ch) || + _PyUnicode_IsUppercase(ch) || [...5277 lines suppressed...] + return 1; + default: + return 0; + } + } + #else *************** *** 5043,5046 **** --- 10333,10341 ---- { return towupper(ch); + } + + int _PyUnicode_IsAlpha(register const Py_UNICODE ch) + { + return iswalpha(ch); } From python-dev@python.org Wed Jul 5 10:49:46 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Wed, 5 Jul 2000 02:49:46 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.34,2.35 Message-ID: <200007050949.CAA18149@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv18137/Objects Modified Files: unicodeobject.c Log Message: Added new .isalpha() and .isalnum() methods which provide interfaces to the new alphabetic lookup APIs in unicodectype.c. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.34 retrieving revision 2.35 diff -C2 -r2.34 -r2.35 *** unicodeobject.c 2000/07/04 09:51:07 2.34 --- unicodeobject.c 2000/07/05 09:49:44 2.35 *************** *** 3589,3592 **** --- 3589,3656 ---- } + static char isalpha__doc__[] = + "S.isalpha() -> int\n\ + \n\ + Return 1 if all characters in S are alphabetic\n\ + and there is at least one character in S, 0 otherwise."; + + static PyObject* + unicode_isalpha(PyUnicodeObject *self, PyObject *args) + { + register const Py_UNICODE *p = PyUnicode_AS_UNICODE(self); + register const Py_UNICODE *e; + + if (!PyArg_NoArgs(args)) + return NULL; + + /* Shortcut for single character strings */ + if (PyUnicode_GET_SIZE(self) == 1 && + Py_UNICODE_ISALPHA(*p)) + return PyInt_FromLong(1); + + /* Special case for empty strings */ + if (PyString_GET_SIZE(self) == 0) + return PyInt_FromLong(0); + + e = p + PyUnicode_GET_SIZE(self); + for (; p < e; p++) { + if (!Py_UNICODE_ISALPHA(*p)) + return PyInt_FromLong(0); + } + return PyInt_FromLong(1); + } + + static char isalnum__doc__[] = + "S.isalnum() -> int\n\ + \n\ + Return 1 if all characters in S are alphanumeric\n\ + and there is at least one character in S, 0 otherwise."; + + static PyObject* + unicode_isalnum(PyUnicodeObject *self, PyObject *args) + { + register const Py_UNICODE *p = PyUnicode_AS_UNICODE(self); + register const Py_UNICODE *e; + + if (!PyArg_NoArgs(args)) + return NULL; + + /* Shortcut for single character strings */ + if (PyUnicode_GET_SIZE(self) == 1 && + Py_UNICODE_ISALNUM(*p)) + return PyInt_FromLong(1); + + /* Special case for empty strings */ + if (PyString_GET_SIZE(self) == 0) + return PyInt_FromLong(0); + + e = p + PyUnicode_GET_SIZE(self); + for (; p < e; p++) { + if (!Py_UNICODE_ISALNUM(*p)) + return PyInt_FromLong(0); + } + return PyInt_FromLong(1); + } + static char isdecimal__doc__[] = "S.isdecimal() -> int\n\ *************** *** 4254,4257 **** --- 4318,4323 ---- {"isdigit", (PyCFunction) unicode_isdigit, 0, isdigit__doc__}, {"isnumeric", (PyCFunction) unicode_isnumeric, 0, isnumeric__doc__}, + {"isalpha", (PyCFunction) unicode_isalpha, 0, isalpha__doc__}, + {"isalnum", (PyCFunction) unicode_isalnum, 0, isalnum__doc__}, #if 0 {"zfill", (PyCFunction) unicode_zfill, 1, zfill__doc__}, From python-dev@python.org Wed Jul 5 11:38:12 2000 From: python-dev@python.org (Greg Stein) Date: Wed, 5 Jul 2000 03:38:12 -0700 Subject: [Python-checkins] CVS: python/dist/src configure.in,1.132,1.133 configure,1.123,1.124 Message-ID: <200007051038.DAA31054@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv30979 Modified Files: configure.in configure Log Message: check for Pth *after* the standard system threading libraries. Pth should not override those. Submitted by: flight@users.sourceforge.net Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.132 retrieving revision 1.133 diff -C2 -r1.132 -r1.133 *** configure.in 2000/06/30 16:39:35 1.132 --- configure.in 2000/07/05 10:38:09 1.133 *************** *** 685,692 **** AC_DEFINE(C_THREADS) LIBOBJS="$LIBOBJS thread.o"],[ - AC_CHECK_LIB(pth, pth_init, [AC_DEFINE(WITH_THREAD) - AC_DEFINE(_GNU_PTH) - LIBS="-lpth $LIBS" - LIBOBJS="$LIBOBJS thread.o"],[ AC_CHECK_LIB(pthread, pthread_create, [AC_DEFINE(WITH_THREAD) AC_DEFINE(_POSIX_THREADS) --- 685,688 ---- *************** *** 711,714 **** --- 707,714 ---- LIBS="$LIBS -lthread" LIBOBJS="$LIBOBJS thread.o"], [ + AC_CHECK_LIB(pth, pth_init, [AC_DEFINE(WITH_THREAD) + AC_DEFINE(_GNU_PTH) + LIBS="-lpth $LIBS" + LIBOBJS="$LIBOBJS thread.o"],[ AC_CHECK_LIB(cma, pthread_create, [AC_DEFINE(WITH_THREAD) AC_DEFINE(_POSIX_THREADS) Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.123 retrieving revision 1.124 diff -C2 -r1.123 -r1.124 *** configure 2000/06/30 16:39:35 1.123 --- configure 2000/07/05 10:38:09 1.124 *************** *** 1,5 **** #! /bin/sh ! # From configure.in Revision: 1.131 # Guess values for system-dependent variables and create Makefiles. --- 1,5 ---- #! /bin/sh ! # From configure.in Revision: 1.132 # Guess values for system-dependent variables and create Makefiles. *************** *** 2990,3043 **** echo "$ac_t""no" 1>&6 - echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6 - echo "configure:2994: checking for pth_init in -lpth" >&5 - ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_save_LIBS="$LIBS" - LIBS="-lpth $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - LIBS="$ac_save_LIBS" - - fi - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF - #define WITH_THREAD 1 - EOF - - cat >> confdefs.h <<\EOF - #define _GNU_PTH 1 - EOF - - LIBS="-lpth $LIBS" - LIBOBJS="$LIBOBJS thread.o" - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 ! echo "configure:3042: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 2990,2995 ---- echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 ! echo "configure:2994: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 3047,3051 **** LIBS="-lpthread $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 3010,3014 ---- ; return 0; } EOF ! if { (eval echo configure:3013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 3087,3096 **** echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 ! echo "configure:3090: checking for pthread_detach" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3042: checking for pthread_detach" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_pthread_detach=yes" --- 3067,3071 ---- ; return 0; } EOF ! if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_pthread_detach=yes" *************** *** 3143,3157 **** ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 ! echo "configure:3146: checking for kernel/OS.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 3095,3109 ---- ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 ! echo "configure:3098: checking for kernel/OS.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 3182,3186 **** echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 ! echo "configure:3185: checking for pthread_create in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 3134,3138 ---- echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 ! echo "configure:3137: checking for pthread_create in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 3190,3194 **** LIBS="-lpthreads $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 3153,3157 ---- ; return 0; } EOF ! if { (eval echo configure:3156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 3230,3234 **** echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 ! echo "configure:3233: checking for pthread_create in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 3182,3186 ---- echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 ! echo "configure:3185: checking for pthread_create in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 3238,3242 **** LIBS="-lc_r $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 3201,3205 ---- ; return 0; } EOF ! if { (eval echo configure:3204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 3278,3282 **** echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 ! echo "configure:3281: checking for __d6_pthread_create in -lthread" >&5 ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 3230,3234 ---- echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 ! echo "configure:3233: checking for __d6_pthread_create in -lthread" >&5 ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 3286,3290 **** LIBS="-lthread $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 3249,3253 ---- ; return 0; } EOF ! if { (eval echo configure:3252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 3321,3324 **** --- 3273,3324 ---- LIBS="$LIBS -lthread" + LIBOBJS="$LIBOBJS thread.o" + else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6 + echo "configure:3281: checking for pth_init in -lpth" >&5 + ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-lpth $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF + #define WITH_THREAD 1 + EOF + + cat >> confdefs.h <<\EOF + #define _GNU_PTH 1 + EOF + + LIBS="-lpth $LIBS" LIBOBJS="$LIBOBJS thread.o" else From python-dev@python.org Wed Jul 5 12:24:15 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Wed, 5 Jul 2000 04:24:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _codecsmodule.c,2.2,2.3 Message-ID: <200007051124.EAA14972@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv14965/Modules Modified Files: _codecsmodule.c Log Message: Modified the encode interfaces of all builtin codecs to accept any object which can be converted to Unicode by means of PyUnicode_FromObject(). Index: _codecsmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_codecsmodule.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** _codecsmodule.c 2000/03/28 20:29:58 2.2 --- _codecsmodule.c 2000/07/05 11:24:13 2.3 *************** *** 21,26 **** (Unicode object, bytes consumed) These s are available: utf_8, unicode_escape, ! raw_unicode_escape, unicode_internal, latin_1, ascii (7-bit) Written by Marc-Andre Lemburg (mal@lemburg.com). --- 21,32 ---- (Unicode object, bytes consumed) + _encode() interfaces also accept non-Unicode object as + input. The objects are then converted to Unicode using + PyUnicode_FromObject() prior to applying the conversion. + These s are available: utf_8, unicode_escape, ! raw_unicode_escape, unicode_internal, latin_1, ascii (7-bit), ! mbcs (on win32). ! Written by Marc-Andre Lemburg (mal@lemburg.com). *************** *** 345,359 **** PyObject *args) { ! PyObject *str; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "U|z:utf_8_encode", &str, &errors)) return NULL; ! return codec_tuple(PyUnicode_EncodeUTF8(PyUnicode_AS_UNICODE(str), ! PyUnicode_GET_SIZE(str), ! errors), ! PyUnicode_GET_SIZE(str)); } --- 351,370 ---- PyObject *args) { ! PyObject *str, *v; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "O|z:utf_8_encode", &str, &errors)) return NULL; ! str = PyUnicode_FromObject(str); ! if (str == NULL) ! return NULL; ! v = codec_tuple(PyUnicode_EncodeUTF8(PyUnicode_AS_UNICODE(str), ! PyUnicode_GET_SIZE(str), ! errors), ! PyUnicode_GET_SIZE(str)); ! Py_DECREF(str); ! return v; } *************** *** 369,385 **** PyObject *args) { ! PyObject *str; const char *errors = NULL; int byteorder = 0; ! if (!PyArg_ParseTuple(args, "U|zi:utf_16_encode", &str, &errors, &byteorder)) return NULL; ! return codec_tuple(PyUnicode_EncodeUTF16(PyUnicode_AS_UNICODE(str), ! PyUnicode_GET_SIZE(str), ! errors, ! byteorder), ! PyUnicode_GET_SIZE(str)); } --- 380,401 ---- PyObject *args) { ! PyObject *str, *v; const char *errors = NULL; int byteorder = 0; ! if (!PyArg_ParseTuple(args, "O|zi:utf_16_encode", &str, &errors, &byteorder)) return NULL; ! str = PyUnicode_FromObject(str); ! if (str == NULL) ! return NULL; ! v = codec_tuple(PyUnicode_EncodeUTF16(PyUnicode_AS_UNICODE(str), ! PyUnicode_GET_SIZE(str), ! errors, ! byteorder), ! PyUnicode_GET_SIZE(str)); ! Py_DECREF(str); ! return v; } *************** *** 388,403 **** PyObject *args) { ! PyObject *str; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "U|zi:utf_16_le_encode", &str, &errors)) return NULL; ! return codec_tuple(PyUnicode_EncodeUTF16(PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str), errors, -1), PyUnicode_GET_SIZE(str)); } --- 404,424 ---- PyObject *args) { ! PyObject *str, *v; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "O|zi:utf_16_le_encode", &str, &errors)) return NULL; ! str = PyUnicode_FromObject(str); ! if (str == NULL) ! return NULL; ! v = codec_tuple(PyUnicode_EncodeUTF16(PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str), errors, -1), PyUnicode_GET_SIZE(str)); + Py_DECREF(str); + return v; } *************** *** 406,421 **** PyObject *args) { ! PyObject *str; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "U|zi:utf_16_be_encode", &str, &errors)) return NULL; ! return codec_tuple(PyUnicode_EncodeUTF16(PyUnicode_AS_UNICODE(str), ! PyUnicode_GET_SIZE(str), ! errors, ! +1), ! PyUnicode_GET_SIZE(str)); } --- 427,447 ---- PyObject *args) { ! PyObject *str, *v; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "O|zi:utf_16_be_encode", &str, &errors)) return NULL; ! str = PyUnicode_FromObject(str); ! if (str == NULL) ! return NULL; ! v = codec_tuple(PyUnicode_EncodeUTF16(PyUnicode_AS_UNICODE(str), ! PyUnicode_GET_SIZE(str), ! errors, ! +1), ! PyUnicode_GET_SIZE(str)); ! Py_DECREF(str); ! return v; } *************** *** 424,438 **** PyObject *args) { ! PyObject *str; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "U|z:unicode_escape_encode", &str, &errors)) return NULL; ! return codec_tuple(PyUnicode_EncodeUnicodeEscape( ! PyUnicode_AS_UNICODE(str), ! PyUnicode_GET_SIZE(str)), ! PyUnicode_GET_SIZE(str)); } --- 450,468 ---- PyObject *args) { ! PyObject *str, *v; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "O|z:unicode_escape_encode", &str, &errors)) return NULL; ! str = PyUnicode_FromObject(str); ! if (str == NULL) ! return NULL; ! v = codec_tuple(PyUnicode_EncodeUnicodeEscape(PyUnicode_AS_UNICODE(str), ! PyUnicode_GET_SIZE(str)), ! PyUnicode_GET_SIZE(str)); ! Py_DECREF(str); ! return v; } *************** *** 441,455 **** PyObject *args) { ! PyObject *str; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "U|z:raw_unicode_escape_encode", &str, &errors)) return NULL; ! return codec_tuple(PyUnicode_EncodeRawUnicodeEscape( PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str)), ! PyUnicode_GET_SIZE(str)); } --- 471,490 ---- PyObject *args) { ! PyObject *str, *v; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "O|z:raw_unicode_escape_encode", &str, &errors)) return NULL; ! str = PyUnicode_FromObject(str); ! if (str == NULL) ! return NULL; ! v = codec_tuple(PyUnicode_EncodeRawUnicodeEscape( PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str)), ! PyUnicode_GET_SIZE(str)); ! Py_DECREF(str); ! return v; } *************** *** 458,473 **** PyObject *args) { ! PyObject *str; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "U|z:latin_1_encode", &str, &errors)) return NULL; ! return codec_tuple(PyUnicode_EncodeLatin1( PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str), errors), ! PyUnicode_GET_SIZE(str)); } --- 493,513 ---- PyObject *args) { ! PyObject *str, *v; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "O|z:latin_1_encode", &str, &errors)) return NULL; ! str = PyUnicode_FromObject(str); ! if (str == NULL) ! return NULL; ! v = codec_tuple(PyUnicode_EncodeLatin1( PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str), errors), ! PyUnicode_GET_SIZE(str)); ! Py_DECREF(str); ! return v; } *************** *** 476,491 **** PyObject *args) { ! PyObject *str; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "U|z:ascii_encode", &str, &errors)) return NULL; ! return codec_tuple(PyUnicode_EncodeASCII( PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str), errors), ! PyUnicode_GET_SIZE(str)); } --- 516,536 ---- PyObject *args) { ! PyObject *str, *v; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "O|z:ascii_encode", &str, &errors)) return NULL; ! str = PyUnicode_FromObject(str); ! if (str == NULL) ! return NULL; ! v = codec_tuple(PyUnicode_EncodeASCII( PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str), errors), ! PyUnicode_GET_SIZE(str)); ! Py_DECREF(str); ! return v; } *************** *** 494,502 **** PyObject *args) { ! PyObject *str; const char *errors = NULL; PyObject *mapping = NULL; ! if (!PyArg_ParseTuple(args, "U|zO:charmap_encode", &str, &errors, &mapping)) return NULL; --- 539,547 ---- PyObject *args) { ! PyObject *str, *v; const char *errors = NULL; PyObject *mapping = NULL; ! if (!PyArg_ParseTuple(args, "O|zO:charmap_encode", &str, &errors, &mapping)) return NULL; *************** *** 504,513 **** mapping = NULL; ! return codec_tuple(PyUnicode_EncodeCharmap( PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str), mapping, errors), ! PyUnicode_GET_SIZE(str)); } --- 549,563 ---- mapping = NULL; ! str = PyUnicode_FromObject(str); ! if (str == NULL) ! return NULL; ! v = codec_tuple(PyUnicode_EncodeCharmap( PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str), mapping, errors), ! PyUnicode_GET_SIZE(str)); ! Py_DECREF(str); ! return v; } *************** *** 518,533 **** PyObject *args) { ! PyObject *str; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "U|z:mbcs_encode", &str, &errors)) return NULL; ! return codec_tuple(PyUnicode_EncodeMBCS( PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str), errors), ! PyUnicode_GET_SIZE(str)); } --- 568,588 ---- PyObject *args) { ! PyObject *str, *v; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "O|z:mbcs_encode", &str, &errors)) return NULL; ! str = PyUnicode_FromObject(str); ! if (str == NULL) ! return NULL; ! v = codec_tuple(PyUnicode_EncodeMBCS( PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str), errors), ! PyUnicode_GET_SIZE(str)); ! Py_DECREF(str); ! return v; } From python-dev@python.org Wed Jul 5 13:22:17 2000 From: python-dev@python.org (A.M. Kuchling) Date: Wed, 5 Jul 2000 05:22:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.16,2.17 Message-ID: <200007051222.FAA31310@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv31179 Modified Files: mmapmodule.c Log Message: Remove definition of _GNU_SOURCE, since Python.h now does it for us Index: mmapmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** mmapmodule.c 2000/07/01 00:51:51 2.16 --- mmapmodule.c 2000/07/05 12:22:14 2.17 *************** *** 17,25 **** */ - #ifdef __linux__ - #define _GNU_SOURCE /* So we can get MREMAP_MAYMOVE defined when - sys/mman.h is included */ - #endif - #include --- 17,20 ---- From python-dev@python.org Wed Jul 5 16:32:43 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Wed, 5 Jul 2000 08:32:43 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects fileobject.c,2.77,2.78 Message-ID: <200007051532.IAA32293@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv32275/Objects Modified Files: fileobject.c Log Message: Fix to bug #389: Full_Name: Bastian Kleineidam Version: 2.0b1 CVS 5.7.2000 OS: Debian Linux 2.2 Submission from: earth.cs.uni-sb.de (134.96.252.92) Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.77 retrieving revision 2.78 diff -C2 -r2.77 -r2.78 *** fileobject.c 2000/06/30 23:58:05 2.77 --- fileobject.c 2000/07/05 15:32:40 2.78 *************** *** 584,588 **** static PyObject * ! getline(f, n) PyFileObject *f; int n; --- 584,588 ---- static PyObject * ! get_line(f, n) PyFileObject *f; int n; *************** *** 706,710 **** if (((PyFileObject*)f)->f_fp == NULL) return err_closed(); ! return getline((PyFileObject *)f, n); } --- 706,710 ---- if (((PyFileObject*)f)->f_fp == NULL) return err_closed(); ! return get_line((PyFileObject *)f, n); } *************** *** 726,730 **** if (n < 0) n = 0; ! return getline(f, n); } --- 726,730 ---- if (n < 0) n = 0; ! return get_line(f, n); } *************** *** 820,824 **** if (sizehint > 0) { /* Need to complete the last line */ ! PyObject *rest = getline(f, 0); if (rest == NULL) { Py_DECREF(line); --- 820,824 ---- if (sizehint > 0) { /* Need to complete the last line */ ! PyObject *rest = get_line(f, 0); if (rest == NULL) { Py_DECREF(line); From python-dev@python.org Wed Jul 5 22:14:18 2000 From: python-dev@python.org (Fredrik Lundh) Date: Wed, 5 Jul 2000 14:14:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.24,2.25 Message-ID: <200007052114.OAA30370@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv29972/Modules Modified Files: _sre.c Log Message: maintenance release: - reorganized some code to get rid of -Wall and -W4 warnings - fixed default argument handling for sub/subn/split methods (reported by Peter Schneider-Kamp). Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -r2.24 -r2.25 *** _sre.c 2000/07/03 21:31:48 2.24 --- _sre.c 2000/07/05 21:14:16 2.25 *************** *** 64,67 **** --- 64,68 ---- #if defined(_MSC_VER) #pragma optimize("agtw", on) /* doesn't seem to make much difference... */ + #pragma warning(disable: 4710) /* who cares if functions are not inlined ;-) */ /* fastest possible local call under MSVC */ #define LOCAL(type) static __inline type __fastcall *************** *** 241,246 **** while (stacksize < lo) stacksize = 2 * stacksize; ! /* FIXME: could trim size if it's larger than lo, and ! much larger than hi */ TRACE(("grow stack to %d\n", stacksize)); stack = realloc(state->stack, sizeof(SRE_STACK) * stacksize); --- 242,247 ---- while (stacksize < lo) stacksize = 2 * stacksize; ! /* FIXME: could trim size if it's much larger than hi, ! as long it's larger than lo */ TRACE(("grow stack to %d\n", stacksize)); stack = realloc(state->stack, sizeof(SRE_STACK) * stacksize); *************** *** 817,836 **** while (pattern[2] == 65535 || count < (int) pattern[2]) { - void *mark0, *mark1; - if (pattern[3] != 65535) { - mark0 = state->mark[pattern[3]]; - mark1 = state->mark[pattern[3]+1]; - } - state->stackbase = stack; - i = SRE_MATCH(state, pattern + 4); - state->stackbase = stackbase; /* rewind */ - if (i < 0) - return i; - if (!i) - break; - if (state->ptr == ptr) { - count = (int) pattern[2]; - break; - } /* this position was valid; add it to the retry stack */ --- 818,821 ---- *************** *** 841,845 **** return i; /* out of memory */ } ! TRACE(("%8d: stack[%d] = %d\n", PTR(ptr), stack, PTR(ptr))); sp = state->stack + stack; sp->ptr = ptr; --- 826,832 ---- return i; /* out of memory */ } ! TRACE(("%8d: stack[%d]\n", PTR(ptr), stack)); ! TRACE((" ptr %d mark %d %d %d\n", ! PTR(ptr), pattern[3], PTR(mark0), PTR(mark1))); sp = state->stack + stack; sp->ptr = ptr; *************** *** 847,854 **** sp->mark = pattern[3]; if (pattern[3] != 65535) { ! sp->mark0 = mark0; ! sp->mark1 = mark1; } stack++; /* move forward */ ptr = state->ptr; --- 834,852 ---- sp->mark = pattern[3]; if (pattern[3] != 65535) { ! sp->mark0 = state->mark[pattern[3]]; ! sp->mark1 = state->mark[pattern[3]+1]; } stack++; + state->stackbase = stack; + i = SRE_MATCH(state, pattern + 4); + state->stackbase = stackbase; + if (i < 0) + return i; + if (!i) + break; + if (state->ptr == ptr) { + count = (int) pattern[2]; + break; + } /* move forward */ ptr = state->ptr; *************** *** 955,958 **** --- 953,957 ---- TRACE(("%8d: leave (failure)\n", PTR(ptr))); if (stack-- > stackbase) { + TRACE(("%8d: pop stack[%d]\n", stack)); sp = state->stack + stack; ptr = sp->ptr; *************** *** 983,987 **** SRE_CHAR* end = state->end; int status = 0; ! int prefix_len; SRE_CODE* prefix = NULL; SRE_CODE* charset = NULL; --- 982,986 ---- SRE_CHAR* end = state->end; int status = 0; ! int prefix_len = 0; SRE_CODE* prefix = NULL; SRE_CODE* charset = NULL; *************** *** 1016,1020 **** #if defined(USE_FAST_SEARCH) ! if (prefix && overlap && prefix_len > 1) { /* pattern starts with a known prefix. use the overlap table to skip forward as fast as we possibly can */ --- 1015,1019 ---- #if defined(USE_FAST_SEARCH) ! if (prefix_len > 1) { /* pattern starts with a known prefix. use the overlap table to skip forward as fast as we possibly can */ *************** *** 1468,1473 **** PyObject* template; PyObject* string; ! PyObject* count; ! if (!PyArg_ParseTuple(args, "OOO", &template, &string, &count)) return NULL; --- 1467,1472 ---- PyObject* template; PyObject* string; ! PyObject* count = Py_False; /* zero */ ! if (!PyArg_ParseTuple(args, "OO|O", &template, &string, &count)) return NULL; *************** *** 1481,1486 **** PyObject* template; PyObject* string; ! PyObject* count; ! if (!PyArg_ParseTuple(args, "OOO", &template, &string, &count)) return NULL; --- 1480,1485 ---- PyObject* template; PyObject* string; ! PyObject* count = Py_False; /* zero */ ! if (!PyArg_ParseTuple(args, "OO|O", &template, &string, &count)) return NULL; *************** *** 1493,1498 **** { PyObject* string; ! PyObject* maxsplit; ! if (!PyArg_ParseTuple(args, "OO", &string, &maxsplit)) return NULL; --- 1492,1497 ---- { PyObject* string; ! PyObject* maxsplit = Py_False; /* zero */ ! if (!PyArg_ParseTuple(args, "O|O", &string, &maxsplit)) return NULL; *************** *** 1831,1835 **** int index; ! PyObject* index_ = Py_False; if (!PyArg_ParseTuple(args, "|O", &index_)) return NULL; --- 1830,1834 ---- int index; ! PyObject* index_ = Py_False; /* zero */ if (!PyArg_ParseTuple(args, "|O", &index_)) return NULL; *************** *** 1858,1862 **** int index; ! PyObject* index_ = Py_False; if (!PyArg_ParseTuple(args, "|O", &index_)) return NULL; --- 1857,1861 ---- int index; ! PyObject* index_ = Py_False; /* zero */ if (!PyArg_ParseTuple(args, "|O", &index_)) return NULL; *************** *** 1885,1889 **** int index; ! PyObject* index_ = Py_False; if (!PyArg_ParseTuple(args, "|O", &index_)) return NULL; --- 1884,1888 ---- int index; ! PyObject* index_ = Py_False; /* zero */ if (!PyArg_ParseTuple(args, "|O", &index_)) return NULL; From python-dev@python.org Wed Jul 5 22:14:18 2000 From: python-dev@python.org (Fredrik Lundh) Date: Wed, 5 Jul 2000 14:14:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre_compile.py,1.24,1.25 Message-ID: <200007052114.OAA30366@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv29972/Lib Modified Files: sre_compile.py Log Message: maintenance release: - reorganized some code to get rid of -Wall and -W4 warnings - fixed default argument handling for sub/subn/split methods (reported by Peter Schneider-Kamp). Index: sre_compile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** sre_compile.py 2000/07/03 21:31:48 1.24 --- sre_compile.py 2000/07/05 21:14:15 1.25 *************** *** 17,22 **** MAXCODE = 65535 ! def _charset(charset, fixup): # internal: optimize character set out = [] charmap = [0]*256 --- 17,24 ---- MAXCODE = 65535 ! def _charset(charset, fixup=None): # internal: optimize character set + if not fixup: + fixup = lambda x: x out = [] charmap = [0]*256 From python-dev@python.org Wed Jul 5 23:56:55 2000 From: python-dev@python.org (Tim Peters) Date: Wed, 5 Jul 2000 15:56:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules pypcre.c,2.18,2.19 Message-ID: <200007052256.PAA12103@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv11692 Modified Files: pypcre.c Log Message: Add more "volatile" decls to stop gcc -Wall warnings. Somebody w/ gcc please check that the wngs are gone! There are cheaper (at runtime) ways to prevent the wngs, but they're obscure and delicate. I'm going for the easy Big Hammer here under the theory that PCRE will be replaced by SRE anyway. Index: pypcre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pypcre.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** pypcre.c 2000/06/01 03:02:48 2.18 --- pypcre.c 2000/07/05 22:56:52 2.19 *************** *** 4521,4527 **** volatile int resetcount, ocount; volatile int first_char = -1; match_data match_block; - const uschar *start_bits = NULL; - const uschar *start_match = (const uschar *)subject + start_pos; const uschar *end_subject; const real_pcre *re = (const real_pcre *)external_re; --- 4521,4527 ---- volatile int resetcount, ocount; volatile int first_char = -1; + const uschar * volatile start_bits = NULL; + const uschar * volatile start_match = (const uschar *)subject + start_pos; match_data match_block; const uschar *end_subject; const real_pcre *re = (const real_pcre *)external_re; From python-dev@python.org Thu Jul 6 00:11:28 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 5 Jul 2000 16:11:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libatexit.tex,1.3,1.4 Message-ID: <200007052311.QAA19481@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv19385 Modified Files: libatexit.tex Log Message: added warning about incompatibility with other codes' use of sys.exitfunc. Index: libatexit.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libatexit.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** libatexit.tex 2000/06/30 16:06:19 1.3 --- libatexit.tex 2000/07/05 23:11:26 1.4 *************** *** 21,24 **** --- 21,32 ---- \withsubitem{(in sys)}{\ttindex{exitfunc}} + Note: This module is unlikely to work correctly when used with other code + that sets \code{sys.exitfunc}. In particular, other core Python modules are + free to use \module{atexit} without the programmer's knowledge. Authors who + use \code{sys.exitfunc} should convert their code to use + \module{atexit} instead. The simplest way to convert code that sets + \code{sys.exitfunc} is to import \module{atexit} and register the function + that had been bound to \code{sys.exitfunc}. + \begin{funcdesc}{register}{func\optional{, *args\optional{, **kargs}}} Register \var{func} as a function to be executed at termination. Any From python-dev@python.org Thu Jul 6 01:50:45 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 5 Jul 2000 17:50:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/ref ref6.tex,1.25,1.26 Message-ID: <200007060050.RAA31816@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ref In directory slayer.i.sourceforge.net:/tmp/cvs-serv31800/ref Modified Files: ref6.tex Log Message: Typo: "This table table" -> "This table is" Noted by Nicholas Spies . Index: ref6.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref6.tex,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** ref6.tex 2000/04/27 18:32:02 1.25 --- ref6.tex 2000/07/06 00:50:42 1.26 *************** *** 462,466 **** The system maintains a table of modules that have been initialized, ! indexed by module name. This table table accessible as \code{sys.modules}. When a module name is found in this table, step (1) is finished. If not, a search for a module --- 462,466 ---- The system maintains a table of modules that have been initialized, ! indexed by module name. This table is accessible as \code{sys.modules}. When a module name is found in this table, step (1) is finished. If not, a search for a module From python-dev@python.org Thu Jul 6 03:55:44 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 5 Jul 2000 19:55:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax handler.py,1.1,1.2 Message-ID: <200007060255.TAA19687@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv19677 Modified Files: handler.py Log Message: fix indentation in three docstrings Index: handler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/handler.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** handler.py 2000/06/29 19:34:54 1.1 --- handler.py 2000/07/06 02:55:41 1.2 *************** *** 27,39 **** def error(self, exception): ! "Handle a recoverable error." raise exception def fatalError(self, exception): ! "Handle a non-recoverable error." raise exception def warning(self, exception): ! "Handle a warning." print exception --- 27,39 ---- def error(self, exception): ! "Handle a recoverable error." raise exception def fatalError(self, exception): ! "Handle a non-recoverable error." raise exception def warning(self, exception): ! "Handle a warning." print exception From python-dev@python.org Thu Jul 6 03:56:38 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 5 Jul 2000 19:56:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax expatreader.py,1.2,1.3 Message-ID: <200007060256.TAA19720@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv19712 Modified Files: expatreader.py Log Message: fix indentation in one docstring Index: expatreader.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/expatreader.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** expatreader.py 2000/07/04 03:39:33 1.2 --- expatreader.py 2000/07/06 02:56:36 1.3 *************** *** 40,44 **** def parse(self, stream_or_string ): ! "Parse an XML document from a URL." if type( stream_or_string ) == type( "" ): stream=open( stream_or_string ) --- 40,44 ---- def parse(self, stream_or_string ): ! "Parse an XML document from a URL." if type( stream_or_string ) == type( "" ): stream=open( stream_or_string ) From python-dev@python.org Thu Jul 6 04:01:42 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 5 Jul 2000 20:01:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax xmlreader.py,1.1,1.2 Message-ID: <200007060301.UAA21867@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv21770 Modified Files: xmlreader.py Log Message: fixed indentation in several places Index: xmlreader.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/xmlreader.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** xmlreader.py 2000/06/29 19:34:54 1.1 --- xmlreader.py 2000/07/06 03:01:40 1.2 *************** *** 7,17 **** class XMLReader: def __init__(self): ! self._cont_handler = handler.ContentHandler() ! #self._dtd_handler = handler.DTDHandler() ! #self._ent_handler = handler.EntityResolver() ! self._err_handler = handler.ErrorHandler() def parse(self, source): ! "Parse an XML document from a system identifier or an InputSource." raise NotImplementedError("This method must be implemented!") --- 7,17 ---- class XMLReader: def __init__(self): ! self._cont_handler = handler.ContentHandler() ! #self._dtd_handler = handler.DTDHandler() ! #self._ent_handler = handler.EntityResolver() ! self._err_handler = handler.ErrorHandler() def parse(self, source): ! "Parse an XML document from a system identifier or an InputSource." raise NotImplementedError("This method must be implemented!") *************** *** 29,34 **** def setDTDHandler(self, handler): ! "Register an object to receive basic DTD-related events." ! self._dtd_handler = handler def getEntityResolver(self): --- 29,34 ---- def setDTDHandler(self, handler): ! "Register an object to receive basic DTD-related events." ! self._dtd_handler = handler def getEntityResolver(self): *************** *** 37,42 **** def setEntityResolver(self, resolver): ! "Register an object to resolve external entities." ! self._ent_handler = resolver def getErrorHandler(self): --- 37,42 ---- def setEntityResolver(self, resolver): ! "Register an object to resolve external entities." ! self._ent_handler = resolver def getErrorHandler(self): *************** *** 45,50 **** def setErrorHandler(self, handler): ! "Register an object to receive error-message events." ! self._err_handler = handler def setLocale(self, locale): --- 45,50 ---- def setErrorHandler(self, handler): ! "Register an object to receive error-message events." ! self._err_handler = handler def setLocale(self, locale): *************** *** 150,167 **** def getColumnNumber(self): ! "Return the column number where the current event ends." ! return -1 def getLineNumber(self): ! "Return the line number where the current event ends." ! return -1 def getPublicId(self): ! "Return the public identifier for the current event." ! return None def getSystemId(self): ! "Return the system identifier for the current event." ! return None # --- AttributesImpl --- 150,167 ---- def getColumnNumber(self): ! "Return the column number where the current event ends." ! return -1 def getLineNumber(self): ! "Return the line number where the current event ends." ! return -1 def getPublicId(self): ! "Return the public identifier for the current event." ! return None def getSystemId(self): ! "Return the system identifier for the current event." ! return None # --- AttributesImpl From python-dev@python.org Thu Jul 6 04:25:29 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 5 Jul 2000 20:25:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libreadline.tex,NONE,1.1 Message-ID: <200007060325.UAA27775@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv27764 Added Files: libreadline.tex Log Message: simple-minded readline section doc based upon module's doc strings. --- NEW FILE --- \section{\module{readline} --- Expose GNU readline functionality to Python} \declaremodule{builtin}{readline} \sectionauthor{Skip Montanaro}{skip@mojam.com} \modulesynopsis{GNU Readline in Python.} \platform{UNIX} The \module{readline} module defines a number of functions used either directly or from the \module{rlcompleter} module to facilitate completion and history file read and write from the Python interpreter. The \module{readline} module defines the following functions: \begin{funcdesc}{parse_and_bind}{string} Parse and execute single line of a readline init file. \end{funcdesc} \begin{funcdesc}{get_line_buffer}{} Return the current contents of the line buffer. \end{funcdesc} \begin{funcdesc}{insert_text}{string} Insert text into the command line. \end{funcdesc} \begin{funcdesc}{read_init_file}{\optional{filename}} Parse a readline initialization file. The default filename is the last filename used. \end{funcdesc} \begin{funcdesc}{read_history_file}{\optional{filename}} Load a readline history file. The default filename is ~/.history. \end{funcdesc} \begin{funcdesc}{write_history_file}{\optional{filename}} Save a readline history file. The default filename is ~/.history. \end{funcdesc} \begin{funcdesc}{set_completer}{\optional{function}} Set or remove the completer function. The function is called as function(text, state), \code{for i in [0, 1, 2, ...]} until it returns a non-string. It should return the next possible completion starting with 'text'. \end{funcdesc} \begin{funcdesc}{get_begidx}{} Get the beginning index of the readline tab-completion scope. \end{funcdesc} \begin{funcdesc}{get_endidx}{} Get the ending index of the readline tab-completion scope. \end{funcdesc} \begin{funcdesc}{set_completer_delims}{string} Set the readline word delimiters for tab-completion. \end{funcdesc} \begin{funcdesc}{get_completer_delims}{} Get the readline word delimiters for tab-completion. \end{funcdesc} \subsection{Example} \nodename{Readline Example} The following example demonstrates how to use the \module{readline} module's history reading and writing functions to automatically load and save a history file named \code{.pyhist} from the user's home directory. The code below would normally be executed automatically during interactive sessions from the user's PYTHONSTARTUP file. \begin{verbatim} >>> import os >>> histfile = os.path.join(os.environ["HOME"], ".pyhist") >>> try: >>> readline.read_history_file(histfile) >>> except IOError: >>> pass >>> import atexit >>> atexit.register(readline.write_history_file, histfile) >>> del os, histfile \end{verbatim} \begin{seealso} \seemodule{rlcompleter}{completion of Python identifiers} \end{seealso} From python-dev@python.org Thu Jul 6 04:26:41 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 5 Jul 2000 20:26:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libatexit.tex,1.4,1.5 Message-ID: <200007060326.UAA27835@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv27824 Modified Files: libatexit.tex Log Message: added seealso pointing reader at readline example which uses atexit. Index: libatexit.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libatexit.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** libatexit.tex 2000/07/05 23:11:26 1.4 --- libatexit.tex 2000/07/06 03:26:39 1.5 *************** *** 68,69 **** --- 68,73 ---- \end{verbatim} + \begin{seealso} + \seemodule{readline}{useful example of atexit to read and write readline + history files} + \end{seealso} From python-dev@python.org Thu Jul 6 05:38:40 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 5 Jul 2000 21:38:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libwinreg.tex,1.3,1.4 Message-ID: <200007060438.VAA05633@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv5626/lib Modified Files: libwinreg.tex Log Message: Correct typo in description of the machine name parameter to the ConnectRegistry() function; there is no trailing period! Index: libwinreg.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libwinreg.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** libwinreg.tex 2000/06/30 03:50:06 1.3 --- libwinreg.tex 2000/07/06 04:38:37 1.4 *************** *** 9,15 **** \versionadded{2.0} ! These functions exposes the Windows registry API to Python. Instead of ! using an integer as the registry handle, a handle object is used to ensure ! that the handles are closed correctly, even if the programmer neglects to explicitly close them. --- 9,15 ---- \versionadded{2.0} ! These functions expose the Windows registry API to Python. Instead of ! using an integer as the registry handle, a handle object is used to ! ensure that the handles are closed correctly, even if the programmer neglects to explicitly close them. *************** *** 18,23 **** \module{winreg} module. - \subsection{Registry Operations \label{registry-operations}} \begin{funcdesc}{CloseKey}{hkey} --- 18,23 ---- \module{winreg} module. + This module offers the following functions: \begin{funcdesc}{CloseKey}{hkey} *************** *** 36,41 **** \var{computer_name} is the name of the remote computer, of the ! form \code{'\\\\computername.'}. If \code{None}, the local computer is ! used. \var{key} is the predefined handle to connect to. --- 36,41 ---- \var{computer_name} is the name of the remote computer, of the ! form \samp{\e\e computername}. If \code{None}, the local computer ! is used. \var{key} is the predefined handle to connect to. *************** *** 67,71 **** \end{funcdesc} - \begin{funcdesc}{DeleteKey}{key, sub_key} Deletes the specified key. --- 67,70 ---- *************** *** 373,377 **** the \method{Close()} method on the object, or the \function{CloseKey()} function. ! All registry functions in this module return one of these objects. --- 372,376 ---- the \method{Close()} method on the object, or the \function{CloseKey()} function. ! All registry functions in this module return one of these objects. *************** *** 380,391 **** encouraged. ! Handle objects provide semantics for __nonzero__ - thus ! \begin{verbatim} ! if handle: ! print "Yes" ! \end{verbatim} ! will print \code{Yes} if the handle is currently valid (ie, has not been closed or detached). ! The object also support comparison semantics, so handle objects will compare true if they both reference the same --- 379,390 ---- encouraged. ! Handle objects provide semantics for \method{__nonzero__()} - thus ! \begin{verbatim} ! if handle: ! print "Yes" ! \end{verbatim} ! will print \code{Yes} if the handle is currently valid (i.e., has not been closed or detached). ! The object also support comparison semantics, so handle objects will compare true if they both reference the same *************** *** 398,402 **** also disconnect the Windows handle from the handle object. ! \begin{methoddesc}{Close} Closes the underlying Windows handle. --- 397,401 ---- also disconnect the Windows handle from the handle object. ! \begin{methoddesc}{Close}{} Closes the underlying Windows handle. *************** *** 405,409 **** ! \begin{methoddesc}{Detach} Detaches the Windows handle from the handle object. --- 404,408 ---- ! \begin{methoddesc}{Detach}{} Detaches the Windows handle from the handle object. From python-dev@python.org Thu Jul 6 05:45:17 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 5 Jul 2000 21:45:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libxmllib.tex,1.22,1.23 Message-ID: <200007060445.VAA05874@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv5865/lib Modified Files: libxmllib.tex Log Message: Sjoerd Mullender : Updates for recent changes in xmllib. Index: libxmllib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libxmllib.tex,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** libxmllib.tex 2000/04/03 20:13:54 1.22 --- libxmllib.tex 2000/07/06 04:45:14 1.23 *************** *** 21,25 **** recognized which influence the parser to accept certain non-standard constructs. The following keyword arguments are currently ! recognized. The defaults for all of these is \code{0} (false). \var{accept_unquoted_attributes} (accept certain attribute values without requiring quotes), \var{accept_missing_endtag_name} (accept --- 21,26 ---- recognized which influence the parser to accept certain non-standard constructs. The following keyword arguments are currently ! recognized. The defaults for all of these is \code{0} (false) except ! for the last one for which the default is \code{1} (true). \var{accept_unquoted_attributes} (accept certain attribute values without requiring quotes), \var{accept_missing_endtag_name} (accept *************** *** 28,32 **** characters in input; this is required according to the XML standard, but Python does not as yet deal properly with these characters, so ! this is not the default).} \end{classdesc} --- 29,34 ---- characters in input; this is required according to the XML standard, but Python does not as yet deal properly with these characters, so ! this is not the default), \var{translate_attribute_references} (don't ! attempt to translate character and entity references in attribute values).} \end{classdesc} From python-dev@python.org Thu Jul 6 05:47:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 5 Jul 2000 21:47:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile.deps,1.35,1.36 Message-ID: <200007060447.VAA05949@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv5940 Modified Files: Makefile.deps Log Message: Add entry for readline documentation. Index: Makefile.deps =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile.deps,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** Makefile.deps 2000/07/05 02:24:39 1.35 --- Makefile.deps 2000/07/06 04:47:25 1.36 *************** *** 227,230 **** --- 227,231 ---- ../lib/libpipes.tex \ ../lib/libpty.tex \ + ../lib/libreadline.tex \ ../lib/librlcompleter.tex \ ../lib/libsched.tex \ From python-dev@python.org Thu Jul 6 05:47:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 5 Jul 2000 21:47:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib lib.tex,1.155,1.156 Message-ID: <200007060447.VAA05953@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv5940/lib Modified Files: lib.tex Log Message: Add entry for readline documentation. Index: lib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/lib.tex,v retrieving revision 1.155 retrieving revision 1.156 diff -C2 -r1.155 -r1.156 *** lib.tex 2000/07/05 02:24:38 1.155 --- lib.tex 2000/07/06 04:47:25 1.156 *************** *** 171,174 **** --- 171,175 ---- \input{libgzip} \input{libzipfile} + \input{libreadline} \input{librlcompleter} From python-dev@python.org Thu Jul 6 05:51:06 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 5 Jul 2000 21:51:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libatexit.tex,1.5,1.6 libreadline.tex,1.1,1.2 librlcompleter.tex,1.2,1.3 Message-ID: <200007060451.VAA06130@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv6118 Modified Files: libatexit.tex libreadline.tex librlcompleter.tex Log Message: Several small changes, mostly to the markup, to improve consistency and internal hyperlinking. Move some things around, also for consistency with other modules ("See also" stuff tends to live at the \section level, before sub-sections, etc.). Index: libatexit.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libatexit.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** libatexit.tex 2000/07/06 03:26:39 1.5 --- libatexit.tex 2000/07/06 04:51:04 1.6 *************** *** 1,4 **** \section{\module{atexit} --- ! exit handlers} \declaremodule{standard}{atexit} --- 1,4 ---- \section{\module{atexit} --- ! Exit handlers} \declaremodule{standard}{atexit} *************** *** 15,19 **** Note: the functions registered via this module are not called when the program is killed by a signal, when a Python fatal internal error is detected, or when ! \code{os._exit()} is called. This is an alternate interface to the functionality provided by the --- 15,19 ---- Note: the functions registered via this module are not called when the program is killed by a signal, when a Python fatal internal error is detected, or when ! \function{os._exit()} is called. This is an alternate interface to the functionality provided by the *************** *** 68,73 **** \end{verbatim} \begin{seealso} ! \seemodule{readline}{useful example of atexit to read and write readline ! history files} \end{seealso} --- 68,74 ---- \end{verbatim} + \begin{seealso} ! \seemodule{readline}{Useful example of atexit to read and write ! \refmodule{readline} history files.} \end{seealso} Index: libreadline.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libreadline.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** libreadline.tex 2000/07/06 03:25:26 1.1 --- libreadline.tex 2000/07/06 04:51:04 1.2 *************** *** 1,18 **** \section{\module{readline} --- ! Expose GNU readline functionality to Python} \declaremodule{builtin}{readline} \sectionauthor{Skip Montanaro}{skip@mojam.com} - \modulesynopsis{GNU Readline in Python.} - \platform{UNIX} The \module{readline} module defines a number of functions used either ! directly or from the \module{rlcompleter} module to facilitate completion ! and history file read and write from the Python interpreter. The \module{readline} module defines the following functions: \begin{funcdesc}{parse_and_bind}{string} Parse and execute single line of a readline init file. --- 1,19 ---- \section{\module{readline} --- ! GNU readline interface} \declaremodule{builtin}{readline} + \platform{Unix} \sectionauthor{Skip Montanaro}{skip@mojam.com} \modulesynopsis{GNU Readline in Python.} The \module{readline} module defines a number of functions used either ! directly or from the \refmodule{rlcompleter} module to facilitate ! completion and history file read and write from the Python ! interpreter. The \module{readline} module defines the following functions: + \begin{funcdesc}{parse_and_bind}{string} Parse and execute single line of a readline init file. *************** *** 34,50 **** \begin{funcdesc}{read_history_file}{\optional{filename}} Load a readline history file. ! The default filename is ~/.history. \end{funcdesc} \begin{funcdesc}{write_history_file}{\optional{filename}} Save a readline history file. ! The default filename is ~/.history. \end{funcdesc} \begin{funcdesc}{set_completer}{\optional{function}} ! Set or remove the completer function. ! The function is called as function(text, state), \code{for i in [0, 1, 2, ...]} until it returns a non-string. ! It should return the next possible completion starting with 'text'. \end{funcdesc} --- 35,51 ---- \begin{funcdesc}{read_history_file}{\optional{filename}} Load a readline history file. ! The default filename is \file{\~{}/.history}. \end{funcdesc} \begin{funcdesc}{write_history_file}{\optional{filename}} Save a readline history file. ! The default filename is \file{\~{}/.history}. \end{funcdesc} \begin{funcdesc}{set_completer}{\optional{function}} ! Set or remove the completer function. The completer function is ! called as \code{\var{function}(\var{text}, \var{state})}, \code{for i in [0, 1, 2, ...]} until it returns a non-string. ! It should return the next possible completion starting with \var{text}. \end{funcdesc} *************** *** 64,90 **** Get the readline word delimiters for tab-completion. \end{funcdesc} ! \subsection{Example} ! \nodename{Readline Example} ! The following example demonstrates how to use the \module{readline} module's ! history reading and writing functions to automatically load and save a ! history file named \code{.pyhist} from the user's home directory. The code ! below would normally be executed automatically during interactive sessions ! from the user's PYTHONSTARTUP file. \begin{verbatim} ! >>> import os ! >>> histfile = os.path.join(os.environ["HOME"], ".pyhist") ! >>> try: ! >>> readline.read_history_file(histfile) ! >>> except IOError: ! >>> pass ! >>> import atexit ! >>> atexit.register(readline.write_history_file, histfile) ! >>> del os, histfile \end{verbatim} - - \begin{seealso} - \seemodule{rlcompleter}{completion of Python identifiers} - \end{seealso} --- 65,94 ---- Get the readline word delimiters for tab-completion. \end{funcdesc} + + + \begin{seealso} + \seemodule{rlcompleter}{Completion of Python identifiers at the + interactive prompt.} + \end{seealso} + ! \subsection{Example \label{readline-example}} ! The following example demonstrates how to use the ! \module{readline} module's history reading and writing functions to ! automatically load and save a history file named \file{.pyhist} from ! the user's home directory. The code below would normally be executed ! automatically during interactive sessions from the user's ! \envvar{PYTHONSTARTUP} file. \begin{verbatim} ! import os ! histfile = os.path.join(os.environ["HOME"], ".pyhist") ! try: ! readline.read_history_file(histfile) ! except IOError: ! pass ! import atexit ! atexit.register(readline.write_history_file, histfile) ! del os, histfile \end{verbatim} Index: librlcompleter.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/librlcompleter.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** librlcompleter.tex 1999/08/02 14:13:09 1.2 --- librlcompleter.tex 2000/07/06 04:51:04 1.3 *************** *** 3,13 **** \declaremodule{standard}{rlcompleter} \sectionauthor{Moshe Zadka}{mzadka@geocities.com} \modulesynopsis{Python identifier completion in the readline library.} The \module{rlcompleter} module defines a completion function for ! the \module{readline} module by completing valid Python identifiers and ! keyword. The \module{rlcompleter} module defines the \class{Completer} class. --- 3,17 ---- \declaremodule{standard}{rlcompleter} + \platform{Unix} \sectionauthor{Moshe Zadka}{mzadka@geocities.com} \modulesynopsis{Python identifier completion in the readline library.} The \module{rlcompleter} module defines a completion function for ! the \refmodule{readline} module by completing valid Python identifiers ! and keywords. + This module is \UNIX-specific due to it's dependence on the + \refmodule{readline} module. + The \module{rlcompleter} module defines the \class{Completer} class. *************** *** 48,52 **** Return the \var{state}th completion for \var{text}. ! If called for \var{text} that doesn't includea period character (\character{.}), it will complete from names currently defined in \refmodule[main]{__main__}, \refmodule[builtin]{__builtin__} and --- 52,56 ---- Return the \var{state}th completion for \var{text}. ! If called for \var{text} that doesn't include a period character (\character{.}), it will complete from names currently defined in \refmodule[main]{__main__}, \refmodule[builtin]{__builtin__} and From python-dev@python.org Thu Jul 6 06:24:44 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 5 Jul 2000 22:24:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/doc doc.tex,1.21,1.22 Message-ID: <200007060524.WAA14336@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv14329/doc Modified Files: doc.tex Log Message: Added some further description to the usage of the seealso environment. Documented the \seerfc and \seeurl macros used in that environment as well. Index: doc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/doc/doc.tex,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** doc.tex 2000/06/30 15:54:18 1.21 --- doc.tex 2000/07/06 05:24:41 1.22 *************** *** 752,755 **** --- 752,760 ---- reasonable manner. + The \env{seealso} environment is typically placed in a section + just before any sub-sections. This is done to ensure that + reference links related to the section are not hidden in a + subsection in the hypertext renditions of the documentation. + \begin{envdesc}{seealso}{} This environment creates a ``See also:'' heading and defines the *************** *** 757,760 **** --- 762,770 ---- \end{envdesc} + For each of the following macros, \var{why} should be a complete + sentence, start with a capital letter (unless it starts with an + identifier, which should not be modified), and end with the + apropriate punctuation. + \begin{macrodesc}{seemodule}{\op{key}\p{name}\p{why}} Refer to another module. \var{why} should be a brief *************** *** 767,774 **** \end{macrodesc} \begin{macrodesc}{seetext}{\p{text}} Add arbitrary text \var{text} to the ``See also:'' list. This can be used to refer to off-line materials or on-line materials ! using the \macro{url} macro. \end{macrodesc} --- 777,803 ---- \end{macrodesc} + \begin{macrodesc}{seerfc}{\p{number}\p{title}\p{why}} + Refer to an IETF Request for Comments (RFC). \var{number} + should be the official number assigned by the RFC Editor, + \var{title} should be the human-readable title of the RFC as + found in the official copy of the document, and \var{why} should + explain what's interesting about the RFC. This should be used + to refer the reader to RFCs which specify protocols or data + formats relevant to the material in the annotated section of the + documentation. + \end{macrodesc} + \begin{macrodesc}{seetext}{\p{text}} Add arbitrary text \var{text} to the ``See also:'' list. This can be used to refer to off-line materials or on-line materials ! using the \macro{url} macro. This should consist of one or more ! complete sentences. ! \end{macrodesc} ! ! \begin{macrodesc}{seeurl}{\p{url}\p{why}} ! References to specific on-line resources should be given using ! the \macro{seeurl} macro. No title is associated with the ! reference, but the \var{why} text may include a title marked ! using the \macro{citetitle} macro. \end{macrodesc} From python-dev@python.org Thu Jul 6 06:34:17 2000 From: python-dev@python.org (Guido van Rossum) Date: Wed, 5 Jul 2000 22:34:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/lib-tk Tkinter.py,1.139,1.140 Message-ID: <200007060534.WAA14782@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/lib-tk In directory slayer.i.sourceforge.net:/tmp/cvs-serv14775 Modified Files: Tkinter.py Log Message: Change whitespace in two places to silence tabnanny. Also fix spelling tupel -> tuple. Index: Tkinter.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/Tkinter.py,v retrieving revision 1.139 retrieving revision 1.140 diff -C2 -r1.139 -r1.140 *** Tkinter.py 2000/06/29 16:30:50 1.139 --- Tkinter.py 2000/07/06 05:34:14 1.140 *************** *** 92,96 **** class Event: ! """Container for the properties of an event. Instances of this type are generated if one of the following events occurs: --- 92,96 ---- class Event: ! """Container for the properties of an event. Instances of this type are generated if one of the following events occurs: *************** *** 678,687 **** self.tk.call('winfo', 'pointerx', self._w)) def winfo_pointerxy(self): ! """Return a tupel of x and y coordinates of the pointer on the root window.""" return self._getints( self.tk.call('winfo', 'pointerxy', self._w)) def winfo_pointery(self): """Return the y coordinate of the pointer on the root window.""" ! return getint( self.tk.call('winfo', 'pointery', self._w)) def winfo_reqheight(self): --- 678,687 ---- self.tk.call('winfo', 'pointerx', self._w)) def winfo_pointerxy(self): ! """Return a tuple of x and y coordinates of the pointer on the root window.""" return self._getints( self.tk.call('winfo', 'pointerxy', self._w)) def winfo_pointery(self): """Return the y coordinate of the pointer on the root window.""" ! return getint( self.tk.call('winfo', 'pointery', self._w)) def winfo_reqheight(self): *************** *** 694,698 **** self.tk.call('winfo', 'reqwidth', self._w)) def winfo_rgb(self, color): ! """Return tupel of decimal values for red, green, blue for COLOR in this widget.""" return self._getints( --- 694,698 ---- self.tk.call('winfo', 'reqwidth', self._w)) def winfo_rgb(self, color): ! """Return tuple of decimal values for red, green, blue for COLOR in this widget.""" return self._getints( From python-dev@python.org Thu Jul 6 12:25:43 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Thu, 6 Jul 2000 04:25:43 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include stringobject.h,2.19,2.20 Message-ID: <200007061125.EAA22783@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv22776/Include Modified Files: stringobject.h Log Message: Added prototypes for the new codec APIs for strings. These APIs match the ones in the Unicode implementation, but were extended to be able to reuse the existing Unicode codecs for string purposes too. Conversion from string to Unicode and back are done using the default encoding. Index: stringobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/stringobject.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** stringobject.h 2000/06/30 23:58:04 2.19 --- stringobject.h 2000/07/06 11:25:40 2.20 *************** *** 82,85 **** --- 82,116 ---- #define PyString_GET_SIZE(op) (((PyStringObject *)(op))->ob_size) + /* --- Generic Codecs ----------------------------------------------------- */ + + /* Create a string object by decoding the encoded string s of the + given size. */ + + extern DL_IMPORT(PyObject*) PyString_Decode( + const char *s, /* encoded string */ + int size, /* size of buffer */ + const char *encoding, /* encoding */ + const char *errors /* error handling */ + ); + + /* Encodes a char buffer of the given size and returns a + Python string object. */ + + extern DL_IMPORT(PyObject*) PyString_Encode( + const char *s, /* string char buffer */ + int size, /* number of chars to encode */ + const char *encoding, /* encoding */ + const char *errors /* error handling */ + ); + + /* Encodes a string object and returns the result as Python string + object. */ + + extern DL_IMPORT(PyObject*) PyString_AsEncodedString( + PyObject *str, /* string object */ + const char *encoding, /* encoding */ + const char *errors /* error handling */ + ); + #ifdef __cplusplus } From python-dev@python.org Thu Jul 6 12:29:04 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Thu, 6 Jul 2000 04:29:04 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.73,2.74 Message-ID: <200007061129.EAA23033@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv23018/Objects Modified Files: stringobject.c Log Message: Added new codec APIs and a new interface method .encode() which works just like the Unicode one. The C APIs match the ones in the Unicode implementation, but were extended to be able to reuse the existing Unicode codecs for string purposes too. Conversions from string to Unicode and back are done using the default encoding. Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.73 retrieving revision 2.74 diff -C2 -r2.73 -r2.74 *** stringobject.c 2000/07/05 09:47:46 2.73 --- stringobject.c 2000/07/06 11:29:01 2.74 *************** *** 153,156 **** --- 153,250 ---- } + PyObject *PyString_Decode(const char *s, + int size, + const char *encoding, + const char *errors) + { + PyObject *buffer = NULL, *str; + + if (encoding == NULL) + encoding = PyUnicode_GetDefaultEncoding(); + + /* Decode via the codec registry */ + buffer = PyBuffer_FromMemory((void *)s, size); + if (buffer == NULL) + goto onError; + str = PyCodec_Decode(buffer, encoding, errors); + if (str == NULL) + goto onError; + /* Convert Unicode to a string using the default encoding */ + if (PyUnicode_Check(str)) { + PyObject *temp = str; + str = PyUnicode_AsEncodedString(str, NULL, NULL); + Py_DECREF(temp); + if (str == NULL) + goto onError; + } + if (!PyString_Check(str)) { + PyErr_Format(PyExc_TypeError, + "decoder did not return an string object (type=%.400s)", + str->ob_type->tp_name); + Py_DECREF(str); + goto onError; + } + Py_DECREF(buffer); + return str; + + onError: + Py_XDECREF(buffer); + return NULL; + } + + PyObject *PyString_Encode(const char *s, + int size, + const char *encoding, + const char *errors) + { + PyObject *v, *str; + + str = PyString_FromStringAndSize(s, size); + if (str == NULL) + return NULL; + v = PyString_AsEncodedString(str, encoding, errors); + Py_DECREF(str); + return v; + } + + PyObject *PyString_AsEncodedString(PyObject *str, + const char *encoding, + const char *errors) + { + PyObject *v; + + if (!PyString_Check(str)) { + PyErr_BadArgument(); + goto onError; + } + + if (encoding == NULL) + encoding = PyUnicode_GetDefaultEncoding(); + + /* Encode via the codec registry */ + v = PyCodec_Encode(str, encoding, errors); + if (v == NULL) + goto onError; + /* Convert Unicode to a string using the default encoding */ + if (PyUnicode_Check(v)) { + PyObject *temp = v; + v = PyUnicode_AsEncodedString(v, NULL, NULL); + Py_DECREF(temp); + if (v == NULL) + goto onError; + } + if (!PyString_Check(v)) { + PyErr_Format(PyExc_TypeError, + "encoder did not return a string object (type=%.400s)", + v->ob_type->tp_name); + Py_DECREF(v); + goto onError; + } + return v; + + onError: + return NULL; + } + static void string_dealloc(op) *************** *** 1687,1690 **** --- 1781,1803 ---- + static char encode__doc__[] = + "S.encode([encoding[,errors]]) -> string\n\ + \n\ + Return an encoded string version of S. Default encoding is the current\n\ + default string encoding. errors may be given to set a different error\n\ + handling scheme. Default is 'strict' meaning that encoding errors raise\n\ + a ValueError. Other possible values are 'ignore' and 'replace'."; + + static PyObject * + string_encode(PyStringObject *self, PyObject *args) + { + char *encoding = NULL; + char *errors = NULL; + if (!PyArg_ParseTuple(args, "|ss:encode", &encoding, &errors)) + return NULL; + return PyString_AsEncodedString((PyObject *)self, encoding, errors); + } + + static char expandtabs__doc__[] = "S.expandtabs([tabsize]) -> string\n\ *************** *** 2253,2256 **** --- 2366,2370 ---- {"rjust", (PyCFunction)string_rjust, 1, rjust__doc__}, {"center", (PyCFunction)string_center, 1, center__doc__}, + {"encode", (PyCFunction)string_encode, 1, encode__doc__}, {"expandtabs", (PyCFunction)string_expandtabs, 1, expandtabs__doc__}, {"splitlines", (PyCFunction)string_splitlines, 1, splitlines__doc__}, From python-dev@python.org Thu Jul 6 13:22:03 2000 From: python-dev@python.org (Jack Jansen) Date: Thu, 6 Jul 2000 05:22:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python getargs.c,2.37,2.38 modsupport.c,2.46,2.47 Message-ID: <200007061222.FAA05035@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv5003 Modified Files: getargs.c modsupport.c Log Message: Added support for H (unsigned short) specifier in PyArg_ParseTuple and Py_BuildValue. Index: getargs.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v retrieving revision 2.37 retrieving revision 2.38 diff -C2 -r2.37 -r2.38 *** getargs.c 2000/07/01 01:07:38 2.37 --- getargs.c 2000/07/06 12:22:00 2.38 *************** *** 490,493 **** --- 490,514 ---- } + case 'H': /* unsigned short int */ + { + unsigned short *p = va_arg(*p_va, unsigned short *); + long ival = PyInt_AsLong(arg); + if (ival == -1 && PyErr_Occurred()) + return "integer"; + else if (ival < 0) { + PyErr_SetString(PyExc_OverflowError, + "unsigned short integer is less than minimum"); + return "integer"; + } + else if (ival > USHRT_MAX) { + PyErr_SetString(PyExc_OverflowError, + "unsigned short integer is greater than maximum"); + return "integer"; + } + else + *p = (unsigned short) ival; + break; + } + case 'i': /* signed int */ { *************** *** 510,514 **** break; } - case 'l': /* long int */ { --- 531,534 ---- *************** *** 1205,1208 **** --- 1225,1234 ---- { (void) va_arg(*p_va, short *); + break; + } + + case 'H': /* unsigned short int */ + { + (void) va_arg(*p_va, unsigned short *); break; } Index: modsupport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/modsupport.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** modsupport.c 2000/07/03 21:39:47 2.46 --- modsupport.c 2000/07/06 12:22:00 2.47 *************** *** 279,282 **** --- 279,285 ---- case 'i': return PyInt_FromLong((long)va_arg(*p_va, int)); + + case 'H': + return PyInt_FromLong((long)va_arg(*p_va, unsigned int)); case 'l': From python-dev@python.org Thu Jul 6 14:43:40 2000 From: python-dev@python.org (Skip Montanaro) Date: Thu, 6 Jul 2000 06:43:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/templates module.tex,1.19,1.20 Message-ID: <200007061343.GAA16722@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/templates In directory slayer.i.sourceforge.net:/tmp/cvs-serv16714 Modified Files: module.tex Log Message: modified template to demonstrate subsection for examples. Index: module.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/templates/module.tex,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** module.tex 1999/03/02 16:24:22 1.19 --- module.tex 2000/07/06 13:43:37 1.20 *************** *** 130,134 **** % detailed list of functions.) ! Example: \begin{verbatim} --- 130,138 ---- % detailed list of functions.) ! \subsection{Example} ! \nodename{Spam Example} ! ! The following example demonstrates how to open a can of spam using the ! \module{spam} module. \begin{verbatim} From python-dev@python.org Thu Jul 6 14:57:42 2000 From: python-dev@python.org (Jack Jansen) Date: Thu, 6 Jul 2000 06:57:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodectype.c,2.3,2.4 Message-ID: <200007061357.GAA17565@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv17257 Modified Files: unicodectype.c Log Message: Conditionally (currently on ifdef macintosh) break the large switch up into 1000-case smaller ones. Index: unicodectype.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodectype.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** unicodectype.c 2000/07/05 09:48:59 2.3 --- unicodectype.c 2000/07/06 13:57:38 2.4 *************** *** 15,18 **** --- 15,28 ---- #include "unicodeobject.h" + #ifdef macintosh + /* This probably needs to be defined for some other compilers too. It breaks the + ** 5000-label switch statement up into switches with around 1000 cases each. + */ + #define BREAK_SWITCH_UP return 1; } switch (ch) { + #else + #define BREAK_SWITCH_UP /* nothing */ + #endif + + /* Returns 1 for Unicode characters having the category 'Zl' or type 'B', 0 otherwise. */ *************** *** 5992,5995 **** --- 6002,6006 ---- case 0x1023: /* MYANMAR LETTER I */ case 0x1024: /* MYANMAR LETTER II */ + BREAK_SWITCH_UP case 0x1025: /* MYANMAR LETTER U */ case 0x1026: /* MYANMAR LETTER UU */ *************** *** 6991,6994 **** --- 7002,7006 ---- case 0x1532: /* CANADIAN SYLLABICS WEST-CREE YWI */ case 0x1533: /* CANADIAN SYLLABICS YWII */ + BREAK_SWITCH_UP case 0x1534: /* CANADIAN SYLLABICS WEST-CREE YWII */ case 0x1535: /* CANADIAN SYLLABICS YWO */ *************** *** 7990,7993 **** --- 8002,8006 ---- case 0xA02A: /* YI SYLLABLE BE */ case 0xA02B: /* YI SYLLABLE BEP */ + BREAK_SWITCH_UP case 0xA02C: /* YI SYLLABLE BUT */ case 0xA02D: /* YI SYLLABLE BUX */ *************** *** 8989,8992 **** --- 9002,9006 ---- case 0xA411: /* YI SYLLABLE QUR */ case 0xA412: /* YI SYLLABLE QYT */ + BREAK_SWITCH_UP case 0xA413: /* YI SYLLABLE QYX */ case 0xA414: /* YI SYLLABLE QY */ *************** *** 9988,9991 **** --- 10002,10006 ---- case 0xFD94: /* ARABIC LIGATURE HEH WITH MEEM WITH MEEM INITIAL FORM */ case 0xFD95: /* ARABIC LIGATURE NOON WITH HAH WITH MEEM INITIAL FORM */ + BREAK_SWITCH_UP case 0xFD96: /* ARABIC LIGATURE NOON WITH HAH WITH ALEF MAKSURA FINAL FORM */ case 0xFD97: /* ARABIC LIGATURE NOON WITH JEEM WITH MEEM FINAL FORM */ From python-dev@python.org Thu Jul 6 16:17:55 2000 From: python-dev@python.org (Jack Jansen) Date: Thu, 6 Jul 2000 08:17:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/bgen/bgen bgenType.py,1.5,1.6 macsupport.py,1.17,1.18 Message-ID: <200007061517.IAA04050@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/bgen/bgen In directory slayer.i.sourceforge.net:/tmp/cvs-serv4000 Modified Files: bgenType.py macsupport.py Log Message: Make a distinction between shorts and unsigned shorts. Index: bgenType.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/bgen/bgen/bgenType.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** bgenType.py 1998/04/28 16:04:12 1.5 --- bgenType.py 2000/07/06 15:17:52 1.6 *************** *** 138,141 **** --- 138,142 ---- char = Type("char", "c") short = Type("short", "h") + unsigned_short = Type("unsigned short", "H") int = Type("int", "i") long = Type("long", "l") Index: macsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/bgen/bgen/macsupport.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** macsupport.py 2000/04/24 14:56:00 1.17 --- macsupport.py 2000/07/06 15:17:52 1.18 *************** *** 22,26 **** UInt8 = Type("UInt8", "b") SInt8 = Type("SInt8", "b") ! UInt16 = Type("UInt16", "h") SInt16 = Type("SInt16", "h") UInt32 = Type("UInt32", "l") --- 22,26 ---- UInt8 = Type("UInt8", "b") SInt8 = Type("SInt8", "b") ! UInt16 = Type("UInt16", "H") SInt16 = Type("SInt16", "h") UInt32 = Type("UInt32", "l") From python-dev@python.org Thu Jul 6 17:12:51 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 6 Jul 2000 09:12:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/templates module.tex,1.20,1.21 Message-ID: <200007061612.JAA11764@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/templates In directory slayer.i.sourceforge.net:/tmp/cvs-serv11738 Modified Files: module.tex Log Message: Minor changes. Explain that for class exceptions, use excdesc but do not document the constructor parameters. Need a better way, but this will do for now. Index: module.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/templates/module.tex,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** module.tex 2000/07/06 13:43:37 1.20 --- module.tex 2000/07/06 16:12:47 1.21 *************** *** 85,89 **** \begin{funcdesc}{open}{filename\optional{, mode\optional{, buffersize}}} Open the file \var{filename} as a can of Spam. The optional ! \var{mode} and \var{buffersize} arguments specify the read-write mode (\code{'r'} (default) or \code{'w'}) and the buffer size (default: system dependent). --- 85,89 ---- \begin{funcdesc}{open}{filename\optional{, mode\optional{, buffersize}}} Open the file \var{filename} as a can of Spam. The optional ! \var{mode} and \var{buffersize} arguments specify the read/write mode (\code{'r'} (default) or \code{'w'}) and the buffer size (default: system dependent). *************** *** 102,106 **** % --- 3.3. --- % Exceptions are described using a ``excdesc'' block. This has only ! % one parameter: the exception name. \begin{excdesc}{error} --- 102,108 ---- % --- 3.3. --- % Exceptions are described using a ``excdesc'' block. This has only ! % one parameter: the exception name. Exceptions defined as classes in ! % the source code should be documented using this environment, but ! % constructor parameters must be ommitted. \begin{excdesc}{error} *************** *** 130,135 **** % detailed list of functions.) ! \subsection{Example} ! \nodename{Spam Example} The following example demonstrates how to open a can of spam using the --- 132,136 ---- % detailed list of functions.) ! \subsection{Example \label{spam-example}} The following example demonstrates how to open a can of spam using the From python-dev@python.org Thu Jul 6 18:58:09 2000 From: python-dev@python.org (Skip Montanaro) Date: Thu, 6 Jul 2000 10:58:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules makesetup,1.23,1.24 Message-ID: <200007061758.KAA27595@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv27574 Modified Files: makesetup Log Message: don't prepend "$(srcdir)/" to paths beginning with "$" since they are likely to be absolute. Index: makesetup =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/makesetup,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** makesetup 1999/05/21 19:18:49 1.23 --- makesetup 2000/07/06 17:58:06 1.24 *************** *** 190,193 **** --- 190,194 ---- glmodule.c) ;; /*) ;; + \$*) ;; *) src='$(srcdir)/'$src;; esac From python-dev@python.org Thu Jul 6 19:09:04 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 6 Jul 2000 11:09:04 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libtime.tex,1.31,1.32 Message-ID: <200007061809.LAA01187@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv1155 Modified Files: libtime.tex Log Message: Correct a markup nit that caused a space to be dropped from the HTML version (actually a LaTeX2HTML bug), and clarified a sentence in the mktime() description based entirely on comments from Grant Griffin . Index: libtime.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtime.tex,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** libtime.tex 2000/06/30 04:24:52 1.31 --- libtime.tex 2000/07/06 18:09:02 1.32 *************** *** 155,160 **** \begin{funcdesc}{mktime}{tuple} This is the inverse function of \function{localtime()}. Its argument ! is the full 9-tuple (since the dst flag is needed --- pass \code{-1} ! as the dst flag if it is unknown) which expresses the time in \emph{local} time, not UTC. It returns a floating point number, for compatibility with \function{time()}. If the input value cannot be --- 155,160 ---- \begin{funcdesc}{mktime}{tuple} This is the inverse function of \function{localtime()}. Its argument ! is the full 9-tuple (since the dst flag is needed; use \code{-1} as ! the dst flag if it is unknown) which expresses the time in \emph{local} time, not UTC. It returns a floating point number, for compatibility with \function{time()}. If the input value cannot be From python-dev@python.org Thu Jul 6 19:14:09 2000 From: python-dev@python.org (A.M. Kuchling) Date: Thu, 6 Jul 2000 11:14:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.28,2.29 Message-ID: <200007061814.LAA02516@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2452 Modified Files: _cursesmodule.c Log Message: Removed unused variables. Added two functions that were left out of the method definition table. Index: _cursesmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v retrieving revision 2.28 retrieving revision 2.29 diff -C2 -r2.28 -r2.29 *** _cursesmodule.c 2000/06/27 21:49:47 2.28 --- _cursesmodule.c 2000/07/06 18:14:03 2.29 *************** *** 1644,1648 **** PyObject *args; { - int rtn; MEVENT event; --- 1644,1647 ---- *************** *** 1948,1952 **** PyObject * arg; { ! int newmask, rtn; mmask_t oldmask, availmask; --- 1947,1951 ---- PyObject * arg; { ! int newmask; mmask_t oldmask, availmask; *************** *** 2160,2164 **** PyObject * arg; { ! int fd, err; PyCursesInitialised --- 2159,2163 ---- PyObject * arg; { ! int fd; PyCursesInitialised *************** *** 2303,2306 **** --- 2302,2307 ---- {"reset_prog_mode", (PyCFunction)PyCurses_reset_prog_mode}, {"reset_shell_mode", (PyCFunction)PyCurses_reset_shell_mode}, + {"resetty", (PyCFunction)PyCurses_resetty}, + {"savetty", (PyCFunction)PyCurses_savetty}, {"setsyx", (PyCFunction)PyCurses_setsyx}, {"start_color", (PyCFunction)PyCurses_Start_Color}, From python-dev@python.org Thu Jul 6 19:37:10 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 6 Jul 2000 11:37:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libsocket.tex,1.45,1.46 Message-ID: <200007061837.LAA03920@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv3911/lib Modified Files: libsocket.tex Log Message: Clean up markup to be more like recommended practice; only small changes needed. Index: libsocket.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsocket.tex,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -r1.45 -r1.46 *** libsocket.tex 2000/06/30 04:21:41 1.45 --- libsocket.tex 2000/07/06 18:37:08 1.46 *************** *** 231,234 **** --- 231,240 ---- \end{datadesc} + + \begin{seealso} + \seemodule{SocketServer}{Classes that simplify writing network servers.} + \end{seealso} + + \subsection{Socket Objects \label{socket-objects}} *************** *** 394,400 **** instead. - \subsection{Example} - \nodename{Socket Example} Here are two minimal example programs using the TCP/IP protocol:\ a server that echoes all data that it receives back (servicing only one --- 400,406 ---- instead. + \subsection{Example \label{socket-example}} + Here are two minimal example programs using the TCP/IP protocol:\ a server that echoes all data that it receives back (servicing only one *************** *** 437,442 **** print 'Received', `data` \end{verbatim} - - \begin{seealso} - \seemodule{SocketServer}{classes that simplify writing network servers} - \end{seealso} --- 443,444 ---- From python-dev@python.org Thu Jul 6 19:55:14 2000 From: python-dev@python.org (Skip Montanaro) Date: Thu, 6 Jul 2000 11:55:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules readline.c,2.18,2.19 Message-ID: <200007061855.LAA05178@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv5168 Modified Files: readline.c Log Message: added read_history_file and write_history_file XXX should perhaps support history truncation as well Index: readline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** readline.c 2000/06/28 21:30:31 2.18 --- readline.c 2000/07/06 18:55:12 2.19 *************** *** 95,98 **** --- 95,146 ---- + /* Exported function to load a readline history file */ + + static PyObject * + read_history_file(self, args) + PyObject *self; + PyObject *args; + { + char *s = NULL; + if (!PyArg_ParseTuple(args, "|z:read_history_file", &s)) + return NULL; + errno = read_history(s); + if (errno) + return PyErr_SetFromErrno(PyExc_IOError); + Py_INCREF(Py_None); + return Py_None; + } + + static char doc_read_history_file[] = "\ + read_history_file([filename]) -> None\n\ + Load a readline history file.\n\ + The default filename is ~/.history.\ + "; + + + /* Exported function to save a readline history file */ + + static PyObject * + write_history_file(self, args) + PyObject *self; + PyObject *args; + { + char *s = NULL; + if (!PyArg_ParseTuple(args, "|z:write_history_file", &s)) + return NULL; + errno = write_history(s); + if (errno) + return PyErr_SetFromErrno(PyExc_IOError); + Py_INCREF(Py_None); + return Py_None; + } + + static char doc_write_history_file[] = "\ + write_history_file([filename]) -> None\n\ + Save a readline history file.\n\ + The default filename is ~/.history.\ + "; + + /* Exported function to specify a word completer in Python */ *************** *** 262,265 **** --- 310,315 ---- {"insert_text", insert_text, 1, doc_insert_text}, {"read_init_file", read_init_file, 1, doc_read_init_file}, + {"read_history_file", read_history_file, 1, doc_read_history_file}, + {"write_history_file", write_history_file, 1, doc_write_history_file}, {"set_completer", set_completer, 1, doc_set_completer}, {"get_begidx", get_begidx, 0, doc_get_begidx}, From python-dev@python.org Thu Jul 6 20:38:54 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 6 Jul 2000 12:38:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.29,2.30 almodule.c,1.26,1.27 pcremodule.c,2.20,2.21 Message-ID: <200007061938.MAA14650@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv14639 Modified Files: _cursesmodule.c almodule.c pcremodule.c Log Message: Python 2.0 is not supposed to use string exceptions in the standard library & extensions, so create exceptions in extension modules using the PyErr_NewException() API. Index: _cursesmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v retrieving revision 2.29 retrieving revision 2.30 diff -C2 -r2.29 -r2.30 *** _cursesmodule.c 2000/07/06 18:14:03 2.29 --- _cursesmodule.c 2000/07/06 19:38:49 2.30 *************** *** 2330,2334 **** /* For exception curses.error */ ! PyCursesError = PyString_FromString("_curses.error"); PyDict_SetItemString(d, "error", PyCursesError); --- 2330,2334 ---- /* For exception curses.error */ ! PyCursesError = PyErr_NewException("_curses.error", NULL, NULL); PyDict_SetItemString(d, "error", PyCursesError); Index: almodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/almodule.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** almodule.c 2000/06/30 23:58:05 1.26 --- almodule.c 2000/07/06 19:38:49 1.27 *************** *** 2196,2200 **** /* Add some symbolic constants to the module */ d = PyModule_GetDict(m); ! ErrorObject = PyString_FromString("al.error"); PyDict_SetItemString(d, "error", ErrorObject); --- 2196,2200 ---- /* Add some symbolic constants to the module */ d = PyModule_GetDict(m); ! ErrorObject = PyErr_NewException("al.error", NULL, NULL); PyDict_SetItemString(d, "error", ErrorObject); Index: pcremodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pcremodule.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** pcremodule.c 2000/06/30 23:50:38 2.20 --- pcremodule.c 2000/07/06 19:38:49 2.21 *************** *** 655,659 **** /* Add some symbolic constants to the module */ d = PyModule_GetDict(m); ! ErrorObject = PyString_FromString("pcre.error"); PyDict_SetItemString(d, "error", ErrorObject); --- 655,659 ---- /* Add some symbolic constants to the module */ d = PyModule_GetDict(m); ! ErrorObject = PyErr_NewException("pcre.error", NULL, NULL); PyDict_SetItemString(d, "error", ErrorObject); From python-dev@python.org Thu Jul 6 20:42:21 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 6 Jul 2000 12:42:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.141,2.142 Message-ID: <200007061942.MAA14903@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv14895/Modules Modified Files: posixmodule.c Log Message: Fix bug #392, reported by Jonathan Giddy : In posixmodule.c:posix_fork, the function PyOS_AfterFork is called for both the parent and the child, despite the docs stating that it should be called in the new (child) process. This causes problems in the parent since the forking thread becomes the main thread according to the signal module. Calling PyOS_AfterFork() only in the child fixes this. Changed for both fork() and forkpty(). Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.141 retrieving revision 2.142 diff -C2 -r2.141 -r2.142 *** posixmodule.c 2000/06/30 23:58:05 2.141 --- posixmodule.c 2000/07/06 19:42:19 2.142 *************** *** 1756,1760 **** if (pid == -1) return posix_error(); ! PyOS_AfterFork(); return PyInt_FromLong((long)pid); } --- 1756,1761 ---- if (pid == -1) return posix_error(); ! if (pid == 0) ! PyOS_AfterFork(); return PyInt_FromLong((long)pid); } *************** *** 1815,1819 **** if (pid == -1) return posix_error(); ! PyOS_AfterFork(); return Py_BuildValue("(ii)", pid, master_fd); } --- 1816,1821 ---- if (pid == -1) return posix_error(); ! if (pid == 0) ! PyOS_AfterFork(); return Py_BuildValue("(ii)", pid, master_fd); } From python-dev@python.org Thu Jul 6 20:43:34 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Thu, 6 Jul 2000 12:43:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.35,2.36 Message-ID: <200007061943.MAA14997@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv14982/Objects Modified Files: unicodeobject.c Log Message: Fixed a couple of places where 'int' was used where 'long' should have been used. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** unicodeobject.c 2000/07/05 09:49:44 2.35 --- unicodeobject.c 2000/07/06 19:43:31 2.36 *************** *** 771,775 **** PyObject *_PyUnicode_AsUTF8String(PyObject *unicode, ! const char *errors) { PyObject *v = ((PyUnicodeObject *)unicode)->utf8str; --- 771,775 ---- PyObject *_PyUnicode_AsUTF8String(PyObject *unicode, ! const char *errors) { PyObject *v = ((PyUnicodeObject *)unicode)->utf8str; *************** *** 1064,1068 **** while (s < end) { unsigned char c; ! unsigned int x; int i; --- 1064,1068 ---- while (s < end) { unsigned char c; ! unsigned long x; int i; *************** *** 1373,1377 **** while (s < end) { unsigned char c; ! unsigned int x; int i; --- 1373,1377 ---- while (s < end) { unsigned char c; ! unsigned long x; int i; *************** *** 1853,1857 **** /* Apply mapping */ if (PyInt_Check(x)) { ! int value = PyInt_AS_LONG(x); if (value < 0 || value > 65535) { PyErr_SetString(PyExc_TypeError, --- 1853,1857 ---- /* Apply mapping */ if (PyInt_Check(x)) { ! long value = PyInt_AS_LONG(x); if (value < 0 || value > 65535) { PyErr_SetString(PyExc_TypeError, *************** *** 1972,1976 **** /* Apply mapping */ if (PyInt_Check(x)) { ! int value = PyInt_AS_LONG(x); if (value < 0 || value > 255) { PyErr_SetString(PyExc_TypeError, --- 1972,1976 ---- /* Apply mapping */ if (PyInt_Check(x)) { ! long value = PyInt_AS_LONG(x); if (value < 0 || value > 255) { PyErr_SetString(PyExc_TypeError, *************** *** 3071,3075 **** while (len1 > 0 && len2 > 0) { unsigned short c1, c2; /* 16 bits */ ! int diff; /* 32 bits */ c1 = *s1++; --- 3071,3075 ---- while (len1 > 0 && len2 > 0) { unsigned short c1, c2; /* 16 bits */ ! long diff; /* >=32 bits */ c1 = *s1++; *************** *** 3081,3085 **** /* now c1 and c2 are in UTF-32-compatible order */ ! diff = (int)c1 - (int)c2; if (diff) return (diff < 0) ? -1 : (diff != 0); --- 3081,3085 ---- /* now c1 and c2 are in UTF-32-compatible order */ ! diff = (long)c1 - (long)c2; if (diff) return (diff < 0) ? -1 : (diff != 0); From python-dev@python.org Thu Jul 6 21:13:26 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Thu, 6 Jul 2000 13:13:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.36,2.37 Message-ID: <200007062013.NAA23575@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv23563/Objects Modified Files: unicodeobject.c Log Message: Fixed some code that used 'short' to use 'long' instead. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.36 retrieving revision 2.37 diff -C2 -r2.36 -r2.37 *** unicodeobject.c 2000/07/06 19:43:31 2.36 --- unicodeobject.c 2000/07/06 20:13:23 2.37 *************** *** 3050,3054 **** /* http://www-4.ibm.com/software/developer/library/utf16.html?dwzone=unicode */ ! static unsigned short utf16Fixup[32] = { 0, 0, 0, 0, 0, 0, 0, 0, --- 3050,3054 ---- /* http://www-4.ibm.com/software/developer/library/utf16.html?dwzone=unicode */ ! static unsigned long utf16Fixup[32] = { 0, 0, 0, 0, 0, 0, 0, 0, *************** *** 3070,3075 **** while (len1 > 0 && len2 > 0) { ! unsigned short c1, c2; /* 16 bits */ ! long diff; /* >=32 bits */ c1 = *s1++; --- 3070,3075 ---- while (len1 > 0 && len2 > 0) { ! unsigned long c1, c2; ! long diff; c1 = *s1++; From python-dev@python.org Fri Jul 7 04:36:14 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 6 Jul 2000 20:36:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libwebbrowser.tex,NONE,1.1 lib.tex,1.156,1.157 Message-ID: <200007070336.UAA30963@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv30950/Doc/lib Modified Files: lib.tex Added Files: libwebbrowser.tex Log Message: New module webbrowser. Easy-to-use controller objects to make using a Web browser as a help/information browser easy across platforms. --- NEW FILE --- \section{\module{webbrowser} --- Convenient Web-browser controller} \declaremodule{standard}{webbrowser} \modulesynopsis{Easy-to-use controller for Web browsers.} \moduleauthor{Fred L. Drake, Jr.}{fdrake@acm.org} \sectionauthor{Fred L. Drake, Jr.}{fdrake@acm.org} The \module{webbrowser} module provides a very high-level interface to allow displaying Web-based documents to users. The controller objects are easy to use and are platform independent. Under \UNIX, graphical browsers are preferred under X11, but text-mode browser will be used if graphical browsers are not available or an X11 display isn't available. If text-mode browsers are used, the calling process will block until the user exits the browser. For non-\UNIX{} platforms, or when X11 browsers are available on \UNIX, the controlling process will not wait for the user to finish with the browser, but allow the browser to maintain its own window on the display. The following exception is defined: \begin{excdesc}{Error} Exception raised when a browser control error occurs. \end{excdesc} The following functions are defined: \begin{funcdesc}{open}{url\optional{, new}} Display \var{url} using the default browser. If \var{new} is true, a new browser window is opened if possible. \end{funcdesc} \begin{funcdesc}{open_new}{url} Open \var{url} in a new window of the default browser, if possible, otherwise, open \var{url} in the only browser window. \end{funcdesc} \begin{funcdesc}{get}{\optional{name}} Return a controller object for the browser type \var{name}. \end{funcdesc} \begin{funcdesc}{register}{name, constructor\optional{, controller}} Register the browser type \var{name}. Once a browser type is registered, the \function{get()} function can return a controller for that browser type. If \var{instance} is not provided, or is \code{None}, \var{constructor} will be called without parameters to create an instance when needed. If \var{instance} is provided, \var{constructor} will never be called, and may be \code{None}. \end{funcdesc} Several browser types are defined. This table gives the type names that may be passed to the \function{get()} function and the names of the implementation classes, all defined in this module. \begin{tableiii}{l|l|c}{code}{Type Name}{Class Name}{Notes} \lineiii{'netscape'}{\class{Netscape}}{} \lineiii{'grail'}{\class{Grail}}{} \lineiii{'windows-default'}{\class{WindowsDefault}}{(1)} \lineiii{'internet-config'}{\class{InternetConfig}}{(2)} \lineiii{'command-line'}{\class{CommandLineBrowser}}{} \end{tableiii} \noindent Notes: \begin{description} \item[(1)] Only on Windows platforms; requires the common extension modules \module{win32api} and \module{win32con}. \item[(2)] Only on MacOS platforms; requires the standard MacPython \module{ic} module, described in the \citetitle[../mac/module-ic.html]{Macintosh Library Modules} manual. \end{description} \subsection{Browser Controller Objects \label{browser-controllers}} Browser controllers provide two methods which parallel two of the module-level convenience functions: \begin{funcdesc}{open}{url\optional{, new}} Display \var{url} using the browser handled by this controller. If \var{new} is true, a new browser window is opened if possible. \end{funcdesc} \begin{funcdesc}{open_new}{url} Open \var{url} in a new window of the browser handled by this controller, if possible, otherwise, open \var{url} in the only browser window. \end{funcdesc} Index: lib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/lib.tex,v retrieving revision 1.156 retrieving revision 1.157 diff -C2 -r1.156 -r1.157 *** lib.tex 2000/07/06 04:47:25 1.156 --- lib.tex 2000/07/07 03:36:12 1.157 *************** *** 199,202 **** --- 199,203 ---- \input{internet} % Internet Protocols + \input{libwebbrowser} \input{libcgi} \input{liburllib} From python-dev@python.org Fri Jul 7 04:36:14 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 6 Jul 2000 20:36:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile.deps,1.36,1.37 Message-ID: <200007070336.UAA30959@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv30950/Doc Modified Files: Makefile.deps Log Message: New module webbrowser. Easy-to-use controller objects to make using a Web browser as a help/information browser easy across platforms. Index: Makefile.deps =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile.deps,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** Makefile.deps 2000/07/06 04:47:25 1.36 --- Makefile.deps 2000/07/07 03:36:11 1.37 *************** *** 187,190 **** --- 187,191 ---- ../lib/libmultifile.tex \ ../lib/libthreading.tex \ + ../lib/libwebbrowser.tex \ ../lib/internet.tex \ ../lib/netdata.tex \ From python-dev@python.org Fri Jul 7 10:01:44 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 02:01:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include unicodeobject.h,2.12,2.13 Message-ID: <200007070901.CAA16518@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv16506/Include Modified Files: unicodeobject.h Log Message: Bill Tutt: Added Py_UCS4 typedef to hold UCS4 values (these need at least 32 bits as opposed to Py_UNICODE which rely on having 16 bits). Index: unicodeobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/unicodeobject.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** unicodeobject.h 2000/07/05 09:45:59 2.12 --- unicodeobject.h 2000/07/07 09:01:41 2.13 *************** *** 108,111 **** --- 108,122 ---- #endif + /* + * Use this typedef when you need to represent a UTF-16 surrogate pair + * as single unsigned integer. + */ + #if SIZEOF_INT >= 4 + typedef unsigned int Py_UCS4; + #elif SIZEOF_LONG >= 4 + typedef unsigned long Py_UCS4; + #endif + + /* --- Internal Unicode Operations ---------------------------------------- */ From python-dev@python.org Fri Jul 7 10:47:27 2000 From: python-dev@python.org (Sjoerd Mullender) Date: Fri, 7 Jul 2000 02:47:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.37,2.38 Message-ID: <200007070947.CAA27026@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv26903 Modified Files: unicodeobject.c Log Message: Two more places where long should be used instead of int. Especially true after revision 2.36 was checked in... Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.37 retrieving revision 2.38 diff -C2 -r2.37 -r2.38 *** unicodeobject.c 2000/07/06 20:13:23 2.37 --- unicodeobject.c 2000/07/07 09:47:24 2.38 *************** *** 995,999 **** static int unicodeescape_decoding_error(const char **source, ! unsigned int *x, const char *errors, const char *details) --- 995,999 ---- static int unicodeescape_decoding_error(const char **source, ! unsigned long *x, const char *errors, const char *details) *************** *** 1010,1014 **** } else if (strcmp(errors,"replace") == 0) { ! *x = (unsigned int)Py_UNICODE_REPLACEMENT_CHARACTER; return 0; } --- 1010,1014 ---- } else if (strcmp(errors,"replace") == 0) { ! *x = (unsigned long)Py_UNICODE_REPLACEMENT_CHARACTER; return 0; } From python-dev@python.org Fri Jul 7 12:24:51 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 04:24:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include Python.h,2.20,2.21 Message-ID: <200007071124.EAA22832@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv22812/Include Modified Files: Python.h Log Message: Defunct the _XOPEN_SOURCE define for now. Suggested by Fredrik Lundh as response to bug reports on True64 and IRIX. Index: Python.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** Python.h 2000/07/05 08:53:18 2.20 --- Python.h 2000/07/07 11:24:49 2.21 *************** *** 13,24 **** ******************************************************************/ ! /* Enable compiler features including SUSv2 compatibility; switching ! on C lib defines doesn't work here, because the symbols haven't ! necessarily been defined yet. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifndef _XOPEN_SOURCE # define _XOPEN_SOURCE 500 #endif --- 13,29 ---- ******************************************************************/ ! /* Enable compiler features; switching on C lib defines doesn't work ! here, because the symbols haven't necessarily been defined yet. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif + + /* Forcing SUSv2 compatibility still produces problems on some + platforms, True64 and SGI IRIX begin two of them, so for now the + define is switched off. */ + #if 0 #ifndef _XOPEN_SOURCE # define _XOPEN_SOURCE 500 + #endif #endif From python-dev@python.org Fri Jul 7 12:27:48 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 04:27:48 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.38,2.39 Message-ID: <200007071127.EAA23332@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv23307/Objects Modified Files: unicodeobject.c Log Message: Fix to bug #393 (UTF16 codec didn't like empty strings) and corrected some usage of 'unsigned long' where Py_UNICODE should have been used. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.38 retrieving revision 2.39 diff -C2 -r2.38 -r2.39 *** unicodeobject.c 2000/07/07 09:47:24 2.38 --- unicodeobject.c 2000/07/07 11:27:45 2.39 *************** *** 954,965 **** if (v == NULL) return NULL; - if (size == 0) - goto done; q = PyString_AS_STRING(v); p = (Py_UNICODE *)q; - if (byteorder == 0) *p++ = 0xFEFF; if (byteorder == 0 || #ifdef BYTEORDER_IS_LITTLE_ENDIAN --- 954,964 ---- if (v == NULL) return NULL; q = PyString_AS_STRING(v); p = (Py_UNICODE *)q; if (byteorder == 0) *p++ = 0xFEFF; + if (size == 0) + goto done; if (byteorder == 0 || #ifdef BYTEORDER_IS_LITTLE_ENDIAN *************** *** 995,999 **** static int unicodeescape_decoding_error(const char **source, ! unsigned long *x, const char *errors, const char *details) --- 994,998 ---- static int unicodeescape_decoding_error(const char **source, ! Py_UNICODE *x, const char *errors, const char *details) *************** *** 1010,1014 **** } else if (strcmp(errors,"replace") == 0) { ! *x = (unsigned long)Py_UNICODE_REPLACEMENT_CHARACTER; return 0; } --- 1009,1013 ---- } else if (strcmp(errors,"replace") == 0) { ! *x = Py_UNICODE_REPLACEMENT_CHARACTER; return 0; } *************** *** 1064,1068 **** while (s < end) { unsigned char c; ! unsigned long x; int i; --- 1063,1067 ---- while (s < end) { unsigned char c; ! Py_UNICODE x; int i; *************** *** 1373,1377 **** while (s < end) { unsigned char c; ! unsigned long x; int i; --- 1372,1376 ---- while (s < end) { unsigned char c; ! Py_UNICODE x; int i; From python-dev@python.org Fri Jul 7 14:45:47 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 06:45:47 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include unicodeobject.h,2.13,2.14 Message-ID: <200007071345.GAA16822@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv16811/Include Modified Files: unicodeobject.h Log Message: Added new API PyUnicode_FromEncodedObject() which supports decoding objects including instance objects. The old API PyUnicode_FromObject() is still available as shortcut. Index: unicodeobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/unicodeobject.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** unicodeobject.h 2000/07/07 09:01:41 2.13 --- unicodeobject.h 2000/07/07 13:45:44 2.14 *************** *** 298,301 **** --- 298,319 ---- */ + extern DL_IMPORT(PyObject*) PyUnicode_FromEncodedObject( + register PyObject *obj, /* Object */ + const char *encoding, /* encoding */ + const char *errors /* error handling */ + ); + + /* Shortcut for PyUnicode_FromEncodedObject(obj, NULL, "strict"); + which results in using the default encoding as basis for + decoding the object. + + Coerces obj to an Unicode object and return a reference with + *incremented* refcount. + + The API returns NULL in case of an error. The caller is responsible + for decref'ing the returned objects. + + */ + extern DL_IMPORT(PyObject*) PyUnicode_FromObject( register PyObject *obj /* Object */ From python-dev@python.org Fri Jul 7 14:46:22 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 06:46:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_unicode.py,1.17,1.18 Message-ID: <200007071346.GAA16854@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv16847/Lib/test Modified Files: test_unicode.py Log Message: Tests for new instance support in unicode(). Index: test_unicode.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** test_unicode.py 2000/07/05 09:46:40 1.17 --- test_unicode.py 2000/07/07 13:46:19 1.18 *************** *** 299,302 **** --- 299,317 ---- assert unicode('hello','latin-1') == u'hello' + class String: + x = '' + def __str__(self): + return self.x + + o = String() + + o.x = 'abc' + assert unicode(o) == u'abc' + assert str(o) == 'abc' + + o.x = u'abc' + assert unicode(o) == u'abc' + assert str(o) == 'abc' + try: u'Andr\202 x'.encode('ascii') From python-dev@python.org Fri Jul 7 14:46:44 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 06:46:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.39,2.40 Message-ID: <200007071346.GAA16879@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv16868/Objects Modified Files: unicodeobject.c Log Message: Added new API PyUnicode_FromEncodedObject() which supports decoding objects including instance objects. The old API PyUnicode_FromObject() is still available as shortcut. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.39 retrieving revision 2.40 diff -C2 -r2.39 -r2.40 *** unicodeobject.c 2000/07/07 11:27:45 2.39 --- unicodeobject.c 2000/07/07 13:46:42 2.40 *************** *** 357,362 **** --- 357,371 ---- PyObject *PyUnicode_FromObject(register PyObject *obj) { + return PyUnicode_FromEncodedObject(obj, NULL, "strict"); + } + + PyObject *PyUnicode_FromEncodedObject(register PyObject *obj, + const char *encoding, + const char *errors) + { const char *s; int len; + int owned = 0; + PyObject *v; if (obj == NULL) { *************** *** 364,370 **** return NULL; } ! else if (PyUnicode_Check(obj)) { Py_INCREF(obj); ! return obj; } else if (PyString_Check(obj)) { --- 373,401 ---- return NULL; } ! ! /* Coerce object */ ! if (PyInstance_Check(obj)) { ! PyObject *func; ! func = PyObject_GetAttrString(obj, "__str__"); ! if (func == NULL) { ! PyErr_SetString(PyExc_TypeError, ! "coercing to Unicode: instance doesn't define __str__"); ! return NULL; ! } ! obj = PyEval_CallObject(func, NULL); ! Py_DECREF(func); ! if (obj == NULL) ! return NULL; ! owned = 1; ! } ! if (PyUnicode_Check(obj)) { Py_INCREF(obj); ! v = obj; ! if (encoding) { ! PyErr_SetString(PyExc_TypeError, ! "decoding Unicode is not supported"); ! return NULL; ! } ! goto done; } else if (PyString_Check(obj)) { *************** *** 377,388 **** if (PyErr_ExceptionMatches(PyExc_TypeError)) PyErr_SetString(PyExc_TypeError, ! "coercing to Unicode: need string or charbuffer"); ! return NULL; } if (len == 0) { Py_INCREF(unicode_empty); ! return (PyObject *)unicode_empty; } ! return PyUnicode_Decode(s, len, NULL, "strict"); } --- 408,431 ---- if (PyErr_ExceptionMatches(PyExc_TypeError)) PyErr_SetString(PyExc_TypeError, ! "coercing to Unicode: need string or buffer"); ! goto onError; } + + /* Convert to Unicode */ if (len == 0) { Py_INCREF(unicode_empty); ! v = (PyObject *)unicode_empty; } ! else ! v = PyUnicode_Decode(s, len, encoding, errors); ! done: ! if (owned) ! Py_DECREF(obj); ! return v; ! ! onError: ! if (owned) ! Py_DECREF(obj); ! return NULL; } From python-dev@python.org Fri Jul 7 14:48:27 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 06:48:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.166,2.167 Message-ID: <200007071348.GAA17060@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv17051/Python Modified Files: bltinmodule.c Log Message: Fixed unicode() to use the new API PyUnicode_FromEncodedObject(). This adds support for instance to the constructor (instances have to define __str__ and can return Unicode objects via that hook; string return values are decoded into Unicode using the current default encoding). Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.166 retrieving revision 2.167 diff -C2 -r2.166 -r2.167 *** bltinmodule.c 2000/07/03 21:39:47 2.166 --- bltinmodule.c 2000/07/07 13:48:25 2.167 *************** *** 156,173 **** if ( !PyArg_ParseTuple(args, "O|ss:unicode", &v, &encoding, &errors) ) return NULL; ! /* Special case: Unicode will stay Unicode */ ! if (PyUnicode_Check(v)) { ! if (encoding) { ! PyErr_SetString(PyExc_TypeError, ! "unicode() does not support decoding of Unicode objects"); ! return NULL; ! } ! Py_INCREF(v); ! return v; ! } ! /* Read raw data and decode it */ ! if (PyObject_AsReadBuffer(v, &buffer, &len)) ! return NULL; ! return PyUnicode_Decode((const char *)buffer, len, encoding, errors); } --- 156,160 ---- if ( !PyArg_ParseTuple(args, "O|ss:unicode", &v, &encoding, &errors) ) return NULL; ! return PyUnicode_FromEncodedObject(v, encoding, errors); } From python-dev@python.org Fri Jul 7 15:13:32 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 07:13:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.112,1.113 Message-ID: <200007071413.HAA25429@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv25420 Modified Files: socketmodule.c Log Message: Removed a prototype which is not used in socketmodule.c Patch by T. Wouters. Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -r1.112 -r1.113 *** socketmodule.c 2000/07/01 03:40:12 1.112 --- socketmodule.c 2000/07/07 14:13:29 1.113 *************** *** 356,360 **** staticforward PyTypeObject SSL_Type; - staticforward int SSL_setattr(SSLObject *self, char *name, PyObject *v); staticforward PyObject *SSL_SSLwrite(SSLObject *self, PyObject *args); staticforward PyObject *SSL_SSLread(SSLObject *self, PyObject *args); --- 356,359 ---- From python-dev@python.org Fri Jul 7 16:47:09 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 08:47:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/api api.tex,1.72,1.73 Message-ID: <200007071547.IAA06081@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/api In directory slayer.i.sourceforge.net:/tmp/cvs-serv5372/Doc/api Modified Files: api.tex Log Message: Added docs for the new Unicode and string APIs. Index: api.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/api.tex,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -r1.72 -r1.73 *** api.tex 2000/07/03 13:38:10 1.72 --- api.tex 2000/07/07 15:47:06 1.73 *************** *** 1924,1927 **** --- 1924,1961 ---- \end{cfuncdesc} + \begin{cfuncdesc}{PyObject*}{PyString_Decode}{const char *s, + int size, + const char *encoding, + const char *errors} + Create a string object by decoding \var{size} bytes of the encoded + buffer \var{s}. \var{encoding} and \var{errors} have the same meaning + as the parameters of the same name in the unicode() builtin + function. The codec to be used is looked up using the Python codec + registry. Returns \NULL{} in case an exception was raised by the + codec. + \end{cfuncdesc} + + \begin{cfuncdesc}{PyObject*}{PyString_Encode}{const Py_UNICODE *s, + int size, + const char *encoding, + const char *errors} + Encodes the \ctype{Py_UNICODE} buffer of the given size and returns a + Python string object. \var{encoding} and \var{errors} have the same + meaning as the parameters of the same name in the string .encode() + method. The codec to be used is looked up using the Python codec + registry. Returns \NULL{} in case an exception was raised by the + codec. + \end{cfuncdesc} + + \begin{cfuncdesc}{PyObject*}{PyString_AsEncodedString}{PyObject *unicode, + const char *encoding, + const char *errors} + Encodes a string object and returns the result as Python string + object. \var{encoding} and \var{errors} have the same meaning as the + parameters of the same name in the string .encode() method. The codec + to be used is looked up using the Python codec registry. Returns + \NULL{} in case an exception was raised by the codec. + \end{cfuncdesc} + \subsection{Unicode Objects \label{unicodeObjects}} *************** *** 2077,2098 **** \end{cfuncdesc} ! \begin{cfuncdesc}{PyObject*}{PyUnicode_FromObject}{PyObject *obj} ! Coerce obj to an Unicode object and return a reference with ! incremented refcount. Coercion is done in the following way: \begin{enumerate} \item Unicode objects are passed back as-is with incremented ! refcount. \item String and other char buffer compatible objects are decoded ! under the assumptions that they contain UTF-8 data. Decoding ! is done in "strict" mode. ! \item All other objects raise an exception. \end{enumerate} The API returns NULL in case of an error. The caller is responsible for decref'ing the returned objects. \end{cfuncdesc} --- 2111,2143 ---- \end{cfuncdesc} ! \begin{cfuncdesc}{PyObject*}{PyUnicode_FromEncodedObject}{PyObject *obj, ! const char *encoding, ! const char *errors} ! Coerce an encoded object obj to an Unicode object and return a ! reference with incremented refcount. Coercion is done in the following way: \begin{enumerate} \item Unicode objects are passed back as-is with incremented ! refcount. Note: these cannot be decoded; passing a non-NULL ! value for encoding will result in a TypeError. \item String and other char buffer compatible objects are decoded ! according to the given encoding and using the error handling ! defined by errors. Both can be NULL to have the interface use ! the default values (see the next section for details). ! \item All other objects cause an exception. \end{enumerate} The API returns NULL in case of an error. The caller is responsible for decref'ing the returned objects. + \end{cfuncdesc} + + \begin{cfuncdesc}{PyObject*}{PyUnicode_FromObject}{PyObject *obj} + + Shortcut for PyUnicode_FromEncodedObject(obj, NULL, ``strict'') + which is used throughout the interpreter whenever coercion to + Unicode is needed. \end{cfuncdesc} From python-dev@python.org Fri Jul 7 16:48:56 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 08:48:56 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/api refcounts.dat,1.10,1.11 Message-ID: <200007071548.IAA06236@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/api In directory slayer.i.sourceforge.net:/tmp/cvs-serv6228/Doc/api Modified Files: refcounts.dat Log Message: Added new APIs and fixed some other Unicode ones (missing * or extra ' '). Index: refcounts.dat =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/refcounts.dat,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** refcounts.dat 2000/06/16 21:04:15 1.10 --- refcounts.dat 2000/07/07 15:48:54 1.11 *************** *** 773,776 **** --- 773,793 ---- PyString_Size:PyObject*:string:0: + PyString_Decode:PyObject*::+1: + PyString_Decode:const char*:s:: + PyString_Decode:int:size:: + PyString_Decode:const char*:encoding:: + PyString_Decode:const char*:errors:: + + PyString_Encode:PyObject*::+1: + PyString_Encode:const char*:s:: + PyString_Encode:int:size:: + PyString_Encode:const char*:encoding:: + PyString_Encode:const char*:errors:: + + PyString_AsEncodedString:PyObject*::+1: + PyString_AsEncodedString:PyObject*:str:: + PyString_AsEncodedString:const char*:encoding:: + PyString_AsEncodedString:const char*:errors:: + PySys_SetArgv:int::: PySys_SetArgv:int:argc:: *************** *** 881,885 **** PyUnicode_FromUnicode:PyObject*::+1: ! PyUnicode_FromUnicode:const Py_UNICODE *:u:: PyUnicode_FromUnicode:int:size:: --- 898,902 ---- PyUnicode_FromUnicode:PyObject*::+1: ! PyUnicode_FromUnicode:const Py_UNICODE*:u:: PyUnicode_FromUnicode:int:size:: *************** *** 891,1013 **** PyUnicode_FromObject:PyObject*::+1: ! PyUnicode_FromObject:PyObject :*obj:0: PyUnicode_FromWideChar:PyObject*::+1: ! PyUnicode_FromWideChar:const wchar_t *:w:: PyUnicode_FromWideChar:int:size:: PyUnicode_AsWideChar:int::: ! PyUnicode_AsWideChar:PyObject :*unicode:0: ! PyUnicode_AsWideChar:wchar_t *:w:: PyUnicode_AsWideChar:int:size:: PyUnicode_Decode:PyObject*::+1: ! PyUnicode_Decode:const char *:s:: PyUnicode_Decode:int:size:: ! PyUnicode_Decode:const char *:encoding:: ! PyUnicode_Decode:const char *:errors:: PyUnicode_Encode:PyObject*::+1: ! PyUnicode_Encode:const Py_UNICODE *:s:: PyUnicode_Encode:int:size:: ! PyUnicode_Encode:const char *:encoding:: ! PyUnicode_Encode:const char *:errors:: PyUnicode_AsEncodedString:PyObject*::+1: ! PyUnicode_AsEncodedString:PyObject *:unicode:: ! PyUnicode_AsEncodedString:const char *:encoding:: ! PyUnicode_AsEncodedString:const char *:errors:: PyUnicode_DecodeUTF8:PyObject*::+1: ! PyUnicode_DecodeUTF8:const char *:s:: PyUnicode_DecodeUTF8:int:size:: ! PyUnicode_DecodeUTF8:const char *:errors:: PyUnicode_EncodeUTF8:PyObject*::+1: ! PyUnicode_EncodeUTF8:const Py_UNICODE *:s:: PyUnicode_EncodeUTF8:int:size:: ! PyUnicode_EncodeUTF8:const char *:errors:: PyUnicode_AsUTF8String:PyObject*::+1: ! PyUnicode_AsUTF8String:PyObject *:unicode:: PyUnicode_DecodeUTF16:PyObject*::+1: ! PyUnicode_DecodeUTF16:const char *:s:: PyUnicode_DecodeUTF16:int:size:: ! PyUnicode_DecodeUTF16:const char *:errors:: PyUnicode_DecodeUTF16:int*:byteorder:: PyUnicode_EncodeUTF16:PyObject*::+1: ! PyUnicode_EncodeUTF16:const Py_UNICODE *:s:: PyUnicode_EncodeUTF16:int:size:: ! PyUnicode_EncodeUTF16:const char *:errors:: PyUnicode_EncodeUTF16:int:byteorder:: PyUnicode_AsUTF16String:PyObject*::+1: ! PyUnicode_AsUTF16String:PyObject *:unicode:: PyUnicode_DecodeUnicodeEscape:PyObject*::+1: ! PyUnicode_DecodeUnicodeEscape:const char *:s:: PyUnicode_DecodeUnicodeEscape:int:size:: ! PyUnicode_DecodeUnicodeEscape:const char *:errors:: PyUnicode_EncodeUnicodeEscape:PyObject*::+1: ! PyUnicode_EncodeUnicodeEscape:const Py_UNICODE *:s:: PyUnicode_EncodeUnicodeEscape:int:size:: ! PyUnicode_EncodeUnicodeEscape:const char *:errors:: PyUnicode_AsUnicodeEscapeString:PyObject*::+1: ! PyUnicode_AsUnicodeEscapeString:PyObject *:unicode:: PyUnicode_DecodeRawUnicodeEscape:PyObject*::+1: ! PyUnicode_DecodeRawUnicodeEscape:const char *:s:: PyUnicode_DecodeRawUnicodeEscape:int:size:: ! PyUnicode_DecodeRawUnicodeEscape:const char *:errors:: PyUnicode_EncodeRawUnicodeEscape:PyObject*::+1: ! PyUnicode_EncodeRawUnicodeEscape:const Py_UNICODE *:s:: PyUnicode_EncodeRawUnicodeEscape:int:size:: ! PyUnicode_EncodeRawUnicodeEscape:const char *:errors:: PyUnicode_AsRawUnicodeEscapeString:PyObject*::+1: ! PyUnicode_AsRawUnicodeEscapeString:PyObject *:unicode:: PyUnicode_DecodeLatin1:PyObject*::+1: ! PyUnicode_DecodeLatin1:const char *:s:: PyUnicode_DecodeLatin1:int:size:: ! PyUnicode_DecodeLatin1:const char *:errors:: PyUnicode_EncodeLatin1:PyObject*::+1: ! PyUnicode_EncodeLatin1:const Py_UNICODE *:s:: PyUnicode_EncodeLatin1:int:size:: ! PyUnicode_EncodeLatin1:const char *:errors:: PyUnicode_AsLatin1String:PyObject*::+1: ! PyUnicode_AsLatin1String:PyObject *:unicode:: PyUnicode_DecodeASCII:PyObject*::+1: ! PyUnicode_DecodeASCII:const char *:s:: PyUnicode_DecodeASCII:int:size:: ! PyUnicode_DecodeASCII:const char *:errors:: PyUnicode_EncodeASCII:PyObject*::+1: ! PyUnicode_EncodeASCII:const Py_UNICODE *:s:: PyUnicode_EncodeASCII:int:size:: ! PyUnicode_EncodeASCII:const char *:errors:: PyUnicode_AsASCIIString:PyObject*::+1: ! PyUnicode_AsASCIIString:PyObject *:unicode:: PyUnicode_DecodeCharmap:PyObject*::+1: ! PyUnicode_DecodeCharmap:const char *:s:: PyUnicode_DecodeCharmap:int:size:: PyUnicode_DecodeCharmap:PyObject*:mapping:0: ! PyUnicode_DecodeCharmap:const char *:errors:: PyUnicode_EncodeCharmap:PyObject*::+1: ! PyUnicode_EncodeCharmap:const Py_UNICODE *:s:: PyUnicode_EncodeCharmap:int:size:: PyUnicode_EncodeCharmap:PyObject*:mapping:0: ! PyUnicode_EncodeCharmap:const char *:errors:: PyUnicode_AsCharmapString:PyObject*::+1: --- 908,1035 ---- PyUnicode_FromObject:PyObject*::+1: ! PyUnicode_FromObject:PyObject*:*obj:0: ! ! PyUnicode_FromEncodedObject:PyObject*::+1: ! PyUnicode_FromEncodedObject:PyObject*:*obj:0: ! PyUnicode_FromEncodedObject:const char*:encoding:: ! PyUnicode_FromEncodedObject:const char*:errors:: PyUnicode_FromWideChar:PyObject*::+1: ! PyUnicode_FromWideChar:const wchar_t*:w:: PyUnicode_FromWideChar:int:size:: PyUnicode_AsWideChar:int::: ! PyUnicode_AsWideChar:PyObject*:*unicode:0: ! PyUnicode_AsWideChar:wchar_t*:w:: PyUnicode_AsWideChar:int:size:: PyUnicode_Decode:PyObject*::+1: ! PyUnicode_Decode:const char*:s:: PyUnicode_Decode:int:size:: ! PyUnicode_Decode:const char*:encoding:: ! PyUnicode_Decode:const char*:errors:: PyUnicode_Encode:PyObject*::+1: ! PyUnicode_Encode:const Py_UNICODE*:s:: PyUnicode_Encode:int:size:: ! PyUnicode_Encode:const char*:encoding:: ! PyUnicode_Encode:const char*:errors:: PyUnicode_AsEncodedString:PyObject*::+1: ! PyUnicode_AsEncodedString:PyObject*:unicode:: ! PyUnicode_AsEncodedString:const char*:encoding:: ! PyUnicode_AsEncodedString:const char*:errors:: PyUnicode_DecodeUTF8:PyObject*::+1: ! PyUnicode_DecodeUTF8:const char*:s:: PyUnicode_DecodeUTF8:int:size:: ! PyUnicode_DecodeUTF8:const char*:errors:: PyUnicode_EncodeUTF8:PyObject*::+1: ! PyUnicode_EncodeUTF8:const Py_UNICODE*:s:: PyUnicode_EncodeUTF8:int:size:: ! PyUnicode_EncodeUTF8:const char*:errors:: PyUnicode_AsUTF8String:PyObject*::+1: ! PyUnicode_AsUTF8String:PyObject*:unicode:: PyUnicode_DecodeUTF16:PyObject*::+1: ! PyUnicode_DecodeUTF16:const char*:s:: PyUnicode_DecodeUTF16:int:size:: ! PyUnicode_DecodeUTF16:const char*:errors:: PyUnicode_DecodeUTF16:int*:byteorder:: PyUnicode_EncodeUTF16:PyObject*::+1: ! PyUnicode_EncodeUTF16:const Py_UNICODE*:s:: PyUnicode_EncodeUTF16:int:size:: ! PyUnicode_EncodeUTF16:const char*:errors:: PyUnicode_EncodeUTF16:int:byteorder:: PyUnicode_AsUTF16String:PyObject*::+1: ! PyUnicode_AsUTF16String:PyObject*:unicode:: PyUnicode_DecodeUnicodeEscape:PyObject*::+1: ! PyUnicode_DecodeUnicodeEscape:const char*:s:: PyUnicode_DecodeUnicodeEscape:int:size:: ! PyUnicode_DecodeUnicodeEscape:const char*:errors:: PyUnicode_EncodeUnicodeEscape:PyObject*::+1: ! PyUnicode_EncodeUnicodeEscape:const Py_UNICODE*:s:: PyUnicode_EncodeUnicodeEscape:int:size:: ! PyUnicode_EncodeUnicodeEscape:const char*:errors:: PyUnicode_AsUnicodeEscapeString:PyObject*::+1: ! PyUnicode_AsUnicodeEscapeString:PyObject*:unicode:: PyUnicode_DecodeRawUnicodeEscape:PyObject*::+1: ! PyUnicode_DecodeRawUnicodeEscape:const char*:s:: PyUnicode_DecodeRawUnicodeEscape:int:size:: ! PyUnicode_DecodeRawUnicodeEscape:const char*:errors:: PyUnicode_EncodeRawUnicodeEscape:PyObject*::+1: ! PyUnicode_EncodeRawUnicodeEscape:const Py_UNICODE*:s:: PyUnicode_EncodeRawUnicodeEscape:int:size:: ! PyUnicode_EncodeRawUnicodeEscape:const char*:errors:: PyUnicode_AsRawUnicodeEscapeString:PyObject*::+1: ! PyUnicode_AsRawUnicodeEscapeString:PyObject*:unicode:: PyUnicode_DecodeLatin1:PyObject*::+1: ! PyUnicode_DecodeLatin1:const char*:s:: PyUnicode_DecodeLatin1:int:size:: ! PyUnicode_DecodeLatin1:const char*:errors:: PyUnicode_EncodeLatin1:PyObject*::+1: ! PyUnicode_EncodeLatin1:const Py_UNICODE*:s:: PyUnicode_EncodeLatin1:int:size:: ! PyUnicode_EncodeLatin1:const char*:errors:: PyUnicode_AsLatin1String:PyObject*::+1: ! PyUnicode_AsLatin1String:PyObject*:unicode:: PyUnicode_DecodeASCII:PyObject*::+1: ! PyUnicode_DecodeASCII:const char*:s:: PyUnicode_DecodeASCII:int:size:: ! PyUnicode_DecodeASCII:const char*:errors:: PyUnicode_EncodeASCII:PyObject*::+1: ! PyUnicode_EncodeASCII:const Py_UNICODE*:s:: PyUnicode_EncodeASCII:int:size:: ! PyUnicode_EncodeASCII:const char*:errors:: PyUnicode_AsASCIIString:PyObject*::+1: ! PyUnicode_AsASCIIString:PyObject*:unicode:: PyUnicode_DecodeCharmap:PyObject*::+1: ! PyUnicode_DecodeCharmap:const char*:s:: PyUnicode_DecodeCharmap:int:size:: PyUnicode_DecodeCharmap:PyObject*:mapping:0: ! PyUnicode_DecodeCharmap:const char*:errors:: PyUnicode_EncodeCharmap:PyObject*::+1: ! PyUnicode_EncodeCharmap:const Py_UNICODE*:s:: PyUnicode_EncodeCharmap:int:size:: PyUnicode_EncodeCharmap:PyObject*:mapping:0: ! PyUnicode_EncodeCharmap:const char*:errors:: PyUnicode_AsCharmapString:PyObject*::+1: *************** *** 1016,1036 **** PyUnicode_TranslateCharmap:PyObject*::+1: ! PyUnicode_TranslateCharmap:const Py_UNICODE *:s:: PyUnicode_TranslateCharmap:int:size:: PyUnicode_TranslateCharmap:PyObject*:table:0: ! PyUnicode_TranslateCharmap:const char *:errors:: PyUnicode_DecodeMBCS:PyObject*::+1: ! PyUnicode_DecodeMBCS:const char *:s:: PyUnicode_DecodeMBCS:int:size:: ! PyUnicode_DecodeMBCS:const char *:errors:: PyUnicode_EncodeMBCS:PyObject*::+1: ! PyUnicode_EncodeMBCS:const Py_UNICODE *:s:: PyUnicode_EncodeMBCS:int:size:: ! PyUnicode_EncodeMBCS:const char *:errors:: PyUnicode_AsMBCSString:PyObject*::+1: ! PyUnicode_AsMBCSString:PyObject *:unicode:: PyUnicode_Concat:PyObject*::+1: --- 1038,1058 ---- PyUnicode_TranslateCharmap:PyObject*::+1: ! PyUnicode_TranslateCharmap:const Py_UNICODE*:s:: PyUnicode_TranslateCharmap:int:size:: PyUnicode_TranslateCharmap:PyObject*:table:0: ! PyUnicode_TranslateCharmap:const char*:errors:: PyUnicode_DecodeMBCS:PyObject*::+1: ! PyUnicode_DecodeMBCS:const char*:s:: PyUnicode_DecodeMBCS:int:size:: ! PyUnicode_DecodeMBCS:const char*:errors:: PyUnicode_EncodeMBCS:PyObject*::+1: ! PyUnicode_EncodeMBCS:const Py_UNICODE*:s:: PyUnicode_EncodeMBCS:int:size:: ! PyUnicode_EncodeMBCS:const char*:errors:: PyUnicode_AsMBCSString:PyObject*::+1: ! PyUnicode_AsMBCSString:PyObject*:unicode:: PyUnicode_Concat:PyObject*::+1: *************** *** 1050,1054 **** PyUnicode_Translate:PyObject*:str:0: PyUnicode_Translate:PyObject*:table:0: ! PyUnicode_Translate:const char *:errors:: PyUnicode_Join:PyObject*::+1: --- 1072,1076 ---- PyUnicode_Translate:PyObject*:str:0: PyUnicode_Translate:PyObject*:table:0: ! PyUnicode_Translate:const char*:errors:: PyUnicode_Join:PyObject*::+1: From python-dev@python.org Fri Jul 7 16:53:31 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 7 Jul 2000 08:53:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include longintrepr.h,2.7,2.8 longobject.h,2.15,2.16 Message-ID: <200007071553.IAA06681@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv6414/src/Include Modified Files: longintrepr.h longobject.h Log Message: Some cleanup of longs in prepartion for Cray J90 fixes: got rid of Py_PROTO, switched to ANSI function decls, and did some minor fiddling. Index: longintrepr.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/longintrepr.h,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** longintrepr.h 2000/06/30 23:58:04 2.7 --- longintrepr.h 2000/07/07 15:53:28 2.8 *************** *** 53,57 **** }; ! DL_IMPORT(PyLongObject *) _PyLong_New Py_PROTO((int)); #ifdef __cplusplus --- 53,57 ---- }; ! DL_IMPORT(PyLongObject *) _PyLong_New(int); #ifdef __cplusplus Index: longobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/longobject.h,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** longobject.h 2000/06/30 23:58:04 2.15 --- longobject.h 2000/07/07 15:53:28 2.16 *************** *** 23,34 **** #define PyLong_Check(op) ((op)->ob_type == &PyLong_Type) ! extern DL_IMPORT(PyObject *) PyLong_FromLong Py_PROTO((long)); ! extern DL_IMPORT(PyObject *) PyLong_FromUnsignedLong Py_PROTO((unsigned long)); ! extern DL_IMPORT(PyObject *) PyLong_FromDouble Py_PROTO((double)); ! extern DL_IMPORT(long) PyLong_AsLong Py_PROTO((PyObject *)); ! extern DL_IMPORT(unsigned long) PyLong_AsUnsignedLong Py_PROTO((PyObject *)); ! extern DL_IMPORT(double) PyLong_AsDouble Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyLong_FromVoidPtr Py_PROTO((void *)); ! extern DL_IMPORT(void *) PyLong_AsVoidPtr Py_PROTO((PyObject *)); #ifdef HAVE_LONG_LONG --- 23,34 ---- #define PyLong_Check(op) ((op)->ob_type == &PyLong_Type) ! extern DL_IMPORT(PyObject *) PyLong_FromLong(long); ! extern DL_IMPORT(PyObject *) PyLong_FromUnsignedLong(unsigned long); ! extern DL_IMPORT(PyObject *) PyLong_FromDouble(double); ! extern DL_IMPORT(long) PyLong_AsLong(PyObject *); ! extern DL_IMPORT(unsigned long) PyLong_AsUnsignedLong(PyObject *); ! extern DL_IMPORT(double) PyLong_AsDouble(PyObject *); ! extern DL_IMPORT(PyObject *) PyLong_FromVoidPtr(void *); ! extern DL_IMPORT(void *) PyLong_AsVoidPtr(PyObject *); #ifdef HAVE_LONG_LONG *************** *** 55,66 **** #endif ! extern DL_IMPORT(PyObject *) PyLong_FromLongLong Py_PROTO((LONG_LONG)); ! extern DL_IMPORT(PyObject *) PyLong_FromUnsignedLongLong Py_PROTO((unsigned LONG_LONG)); ! extern DL_IMPORT(LONG_LONG) PyLong_AsLongLong Py_PROTO((PyObject *)); ! extern DL_IMPORT(unsigned LONG_LONG) PyLong_AsUnsignedLongLong Py_PROTO((PyObject *)); #endif /* HAVE_LONG_LONG */ ! DL_IMPORT(PyObject *) PyLong_FromString Py_PROTO((char *, char **, int)); ! DL_IMPORT(PyObject *) PyLong_FromUnicode Py_PROTO((Py_UNICODE*, int, int)); #ifdef __cplusplus --- 55,66 ---- #endif ! extern DL_IMPORT(PyObject *) PyLong_FromLongLong(LONG_LONG); ! extern DL_IMPORT(PyObject *) PyLong_FromUnsignedLongLong(unsigned LONG_LONG); ! extern DL_IMPORT(LONG_LONG) PyLong_AsLongLong(PyObject *); ! extern DL_IMPORT(unsigned LONG_LONG) PyLong_AsUnsignedLongLong(PyObject *); #endif /* HAVE_LONG_LONG */ ! DL_IMPORT(PyObject *) PyLong_FromString(char *, char **, int); ! DL_IMPORT(PyObject *) PyLong_FromUnicode(Py_UNICODE*, int, int); #ifdef __cplusplus From python-dev@python.org Fri Jul 7 16:53:31 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 7 Jul 2000 08:53:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects longobject.c,1.60,1.61 Message-ID: <200007071553.IAA06685@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv6414/src/Objects Modified Files: longobject.c Log Message: Some cleanup of longs in prepartion for Cray J90 fixes: got rid of Py_PROTO, switched to ANSI function decls, and did some minor fiddling. Index: longobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -r1.60 -r1.61 *** longobject.c 2000/06/30 23:58:05 1.60 --- longobject.c 2000/07/07 15:53:28 1.61 *************** *** 23,31 **** /* Forward */ ! static PyLongObject *long_normalize Py_PROTO((PyLongObject *)); ! static PyLongObject *mul1 Py_PROTO((PyLongObject *, wdigit)); ! static PyLongObject *muladd1 Py_PROTO((PyLongObject *, wdigit, wdigit)); ! static PyLongObject *divrem1 Py_PROTO((PyLongObject *, wdigit, digit *)); ! static PyObject *long_format Py_PROTO((PyObject *aa, int base, int addL)); static int ticker; /* XXX Could be shared with ceval? */ --- 23,31 ---- /* Forward */ ! static PyLongObject *long_normalize(PyLongObject *); ! static PyLongObject *mul1(PyLongObject *, wdigit); ! static PyLongObject *muladd1(PyLongObject *, wdigit, wdigit); ! static PyLongObject *divrem1(PyLongObject *, wdigit, digit *); ! static PyObject *long_format(PyObject *aa, int base, int addL); static int ticker; /* XXX Could be shared with ceval? */ *************** *** 42,47 **** static PyLongObject * ! long_normalize(v) ! register PyLongObject *v; { int j = ABS(v->ob_size); --- 42,46 ---- static PyLongObject * ! long_normalize(register PyLongObject *v) { int j = ABS(v->ob_size); *************** *** 59,64 **** PyLongObject * ! _PyLong_New(size) ! int size; { return PyObject_NEW_VAR(PyLongObject, &PyLong_Type, size); --- 58,62 ---- PyLongObject * ! _PyLong_New(int size) { return PyObject_NEW_VAR(PyLongObject, &PyLong_Type, size); *************** *** 68,73 **** PyObject * ! PyLong_FromLong(ival) ! long ival; { /* Assume a C long fits in at most 5 'digits' */ --- 66,70 ---- PyObject * ! PyLong_FromLong(long ival) { /* Assume a C long fits in at most 5 'digits' */ *************** *** 93,98 **** PyObject * ! PyLong_FromUnsignedLong(ival) ! unsigned long ival; { /* Assume a C long fits in at most 5 'digits' */ --- 90,94 ---- PyObject * ! PyLong_FromUnsignedLong(unsigned long ival) { /* Assume a C long fits in at most 5 'digits' */ *************** *** 114,123 **** PyObject * - #ifdef MPW PyLong_FromDouble(double dval) - #else - PyLong_FromDouble(dval) - double dval; - #endif /* MPW */ { PyLongObject *v; --- 110,114 ---- *************** *** 157,162 **** long ! PyLong_AsLong(vv) ! PyObject *vv; { /* This version by Tim Peters */ --- 148,152 ---- long ! PyLong_AsLong(PyObject *vv) { /* This version by Tim Peters */ *************** *** 202,207 **** unsigned long ! PyLong_AsUnsignedLong(vv) ! PyObject *vv; { register PyLongObject *v; --- 192,196 ---- unsigned long ! PyLong_AsUnsignedLong(PyObject *vv) { register PyLongObject *v; *************** *** 236,241 **** double ! PyLong_AsDouble(vv) ! PyObject *vv; { register PyLongObject *v; --- 225,229 ---- double ! PyLong_AsDouble(PyObject *vv) { register PyLongObject *v; *************** *** 265,270 **** PyObject * ! PyLong_FromVoidPtr(p) ! void *p; { #if SIZEOF_VOID_P == SIZEOF_LONG --- 253,257 ---- PyObject * ! PyLong_FromVoidPtr(void *p) { #if SIZEOF_VOID_P == SIZEOF_LONG *************** *** 285,290 **** void * ! PyLong_AsVoidPtr(vv) ! PyObject *vv; { /* This function will allow int or long objects. If vv is neither, --- 272,276 ---- void * ! PyLong_AsVoidPtr(PyObject *vv) { /* This function will allow int or long objects. If vv is neither, *************** *** 328,333 **** PyObject * ! PyLong_FromLongLong(ival) ! LONG_LONG ival; { #if SIZEOF_LONG_LONG == SIZEOF_LONG --- 314,318 ---- PyObject * ! PyLong_FromLongLong(LONG_LONG ival) { #if SIZEOF_LONG_LONG == SIZEOF_LONG *************** *** 370,375 **** /* Create a new long int object from a C unsigned LONG_LONG int */ PyObject * ! PyLong_FromUnsignedLongLong(ival) ! unsigned LONG_LONG ival; { #if SIZEOF_LONG_LONG == SIZEOF_LONG --- 355,359 ---- /* Create a new long int object from a C unsigned LONG_LONG int */ PyObject * ! PyLong_FromUnsignedLongLong(unsigned LONG_LONG ival) { #if SIZEOF_LONG_LONG == SIZEOF_LONG *************** *** 404,409 **** LONG_LONG ! PyLong_AsLongLong(vv) ! PyObject *vv; { #if SIZEOF_LONG_LONG == SIZEOF_LONG --- 388,392 ---- LONG_LONG ! PyLong_AsLongLong(PyObject *vv) { #if SIZEOF_LONG_LONG == SIZEOF_LONG *************** *** 445,450 **** unsigned LONG_LONG ! PyLong_AsUnsignedLongLong(vv) ! PyObject *vv; { #if SIZEOF_LONG_LONG == 4 --- 428,432 ---- unsigned LONG_LONG ! PyLong_AsUnsignedLongLong(PyObject *vv) { #if SIZEOF_LONG_LONG == 4 *************** *** 489,495 **** static PyLongObject * ! mul1(a, n) ! PyLongObject *a; ! wdigit n; { return muladd1(a, n, (digit)0); --- 471,475 ---- static PyLongObject * ! mul1(PyLongObject *a, wdigit n) { return muladd1(a, n, (digit)0); *************** *** 499,506 **** static PyLongObject * ! muladd1(a, n, extra) ! PyLongObject *a; ! wdigit n; ! wdigit extra; { int size_a = ABS(a->ob_size); --- 479,483 ---- static PyLongObject * ! muladd1(PyLongObject *a, wdigit n, wdigit extra) { int size_a = ABS(a->ob_size); *************** *** 525,532 **** static PyLongObject * ! divrem1(a, n, prem) ! PyLongObject *a; ! wdigit n; ! digit *prem; { int size = ABS(a->ob_size); --- 502,506 ---- static PyLongObject * ! divrem1(PyLongObject *a, wdigit n, digit *prem) { int size = ABS(a->ob_size); *************** *** 553,560 **** static PyObject * ! long_format(aa, base, addL) ! PyObject *aa; ! int base; ! int addL; { register PyLongObject *a = (PyLongObject *)aa; --- 527,531 ---- static PyObject * ! long_format(PyObject *aa, int base, int addL) { register PyLongObject *a = (PyLongObject *)aa; *************** *** 683,705 **** } - #if 0 - /* Convert a string to a long int object, in a given base. - Base zero implies a default depending on the number. - External linkage: used in compile.c and stropmodule.c. */ - - PyObject * - long_scan(str, base) - char *str; - int base; - { - return PyLong_FromString(str, (char **)NULL, base); - } - #endif - PyObject * ! PyLong_FromString(str, pend, base) ! char *str; ! char **pend; ! int base; { int sign = 1; --- 654,659 ---- } PyObject * ! PyLong_FromString(char *str, char **pend, int base) { int sign = 1; *************** *** 774,781 **** PyObject * ! PyLong_FromUnicode(u, length, base) ! Py_UNICODE *u; ! int length; ! int base; { char buffer[256]; --- 728,732 ---- PyObject * ! PyLong_FromUnicode(Py_UNICODE *u, int length, int base) { char buffer[256]; *************** *** 792,808 **** } static PyLongObject *x_divrem ! Py_PROTO((PyLongObject *, PyLongObject *, PyLongObject **)); ! static PyObject *long_pos Py_PROTO((PyLongObject *)); ! static int long_divrem Py_PROTO((PyLongObject *, PyLongObject *, ! PyLongObject **, PyLongObject **)); /* Long division with remainder, top-level routine */ static int ! long_divrem(a, b, pdiv, prem) ! PyLongObject *a, *b; ! PyLongObject **pdiv; ! PyLongObject **prem; { int size_a = ABS(a->ob_size), size_b = ABS(b->ob_size); --- 743,758 ---- } + /* forward */ static PyLongObject *x_divrem ! (PyLongObject *, PyLongObject *, PyLongObject **); ! static PyObject *long_pos(PyLongObject *); ! static int long_divrem(PyLongObject *, PyLongObject *, ! PyLongObject **, PyLongObject **); /* Long division with remainder, top-level routine */ static int ! long_divrem(PyLongObject *a, PyLongObject *b, ! PyLongObject **pdiv, PyLongObject **prem) { int size_a = ABS(a->ob_size), size_b = ABS(b->ob_size); *************** *** 850,856 **** static PyLongObject * ! x_divrem(v1, w1, prem) ! PyLongObject *v1, *w1; ! PyLongObject **prem; { int size_v = ABS(v1->ob_size), size_w = ABS(w1->ob_size); --- 800,804 ---- static PyLongObject * ! x_divrem(PyLongObject *v1, PyLongObject *w1, PyLongObject **prem) { int size_v = ABS(v1->ob_size), size_w = ABS(w1->ob_size); *************** *** 946,977 **** /* Methods */ - /* Forward */ - static void long_dealloc Py_PROTO((PyObject *)); - static PyObject *long_repr Py_PROTO((PyObject *)); - static int long_compare Py_PROTO((PyLongObject *, PyLongObject *)); - static long long_hash Py_PROTO((PyLongObject *)); - - static PyObject *long_add Py_PROTO((PyLongObject *, PyLongObject *)); - static PyObject *long_sub Py_PROTO((PyLongObject *, PyLongObject *)); - static PyObject *long_mul Py_PROTO((PyLongObject *, PyLongObject *)); - static PyObject *long_div Py_PROTO((PyLongObject *, PyLongObject *)); - static PyObject *long_mod Py_PROTO((PyLongObject *, PyLongObject *)); - static PyObject *long_divmod Py_PROTO((PyLongObject *, PyLongObject *)); - static PyObject *long_pow - Py_PROTO((PyLongObject *, PyLongObject *, PyLongObject *)); - static PyObject *long_neg Py_PROTO((PyLongObject *)); - static PyObject *long_pos Py_PROTO((PyLongObject *)); - static PyObject *long_abs Py_PROTO((PyLongObject *)); - static int long_nonzero Py_PROTO((PyLongObject *)); - static PyObject *long_invert Py_PROTO((PyLongObject *)); - static PyObject *long_lshift Py_PROTO((PyLongObject *, PyLongObject *)); - static PyObject *long_rshift Py_PROTO((PyLongObject *, PyLongObject *)); - static PyObject *long_and Py_PROTO((PyLongObject *, PyLongObject *)); - static PyObject *long_xor Py_PROTO((PyLongObject *, PyLongObject *)); - static PyObject *long_or Py_PROTO((PyLongObject *, PyLongObject *)); - static void ! long_dealloc(v) ! PyObject *v; { PyObject_DEL(v); --- 894,899 ---- /* Methods */ static void ! long_dealloc(PyObject *v) { PyObject_DEL(v); *************** *** 979,984 **** static PyObject * ! long_repr(v) ! PyObject *v; { return long_format(v, 10, 1); --- 901,905 ---- static PyObject * ! long_repr(PyObject *v) { return long_format(v, 10, 1); *************** *** 986,991 **** static PyObject * ! long_str(v) ! PyObject *v; { return long_format(v, 10, 0); --- 907,911 ---- static PyObject * ! long_str(PyObject *v) { return long_format(v, 10, 0); *************** *** 993,998 **** static int ! long_compare(a, b) ! PyLongObject *a, *b; { int sign; --- 913,917 ---- static int ! long_compare(PyLongObject *a, PyLongObject *b) { int sign; *************** *** 1020,1025 **** static long ! long_hash(v) ! PyLongObject *v; { long x; --- 939,943 ---- static long ! long_hash(PyLongObject *v) { long x; *************** *** 1050,1057 **** /* Add the absolute values of two long integers. */ - static PyLongObject *x_add Py_PROTO((PyLongObject *, PyLongObject *)); static PyLongObject * ! x_add(a, b) ! PyLongObject *a, *b; { int size_a = ABS(a->ob_size), size_b = ABS(b->ob_size); --- 968,973 ---- /* Add the absolute values of two long integers. */ static PyLongObject * ! x_add(PyLongObject *a, PyLongObject *b) { int size_a = ABS(a->ob_size), size_b = ABS(b->ob_size); *************** *** 1088,1095 **** /* Subtract the absolute values of two integers. */ - static PyLongObject *x_sub Py_PROTO((PyLongObject *, PyLongObject *)); static PyLongObject * ! x_sub(a, b) ! PyLongObject *a, *b; { int size_a = ABS(a->ob_size), size_b = ABS(b->ob_size); --- 1004,1009 ---- /* Subtract the absolute values of two integers. */ static PyLongObject * ! x_sub(PyLongObject *a, PyLongObject *b) { int size_a = ABS(a->ob_size), size_b = ABS(b->ob_size); *************** *** 1143,1149 **** static PyObject * ! long_add(a, b) ! PyLongObject *a; ! PyLongObject *b; { PyLongObject *z; --- 1057,1061 ---- static PyObject * ! long_add(PyLongObject *a, PyLongObject *b) { PyLongObject *z; *************** *** 1168,1174 **** static PyObject * ! long_sub(a, b) ! PyLongObject *a; ! PyLongObject *b; { PyLongObject *z; --- 1080,1084 ---- static PyObject * ! long_sub(PyLongObject *a, PyLongObject *b) { PyLongObject *z; *************** *** 1192,1198 **** static PyObject * ! long_mul(a, b) ! PyLongObject *a; ! PyLongObject *b; { int size_a; --- 1102,1106 ---- static PyObject * ! long_mul(PyLongObject *a, PyLongObject *b) { int size_a; *************** *** 1260,1271 **** part of the outcome to keep the invariant intact. */ - static int l_divmod Py_PROTO((PyLongObject *, PyLongObject *, - PyLongObject **, PyLongObject **)); static int ! l_divmod(v, w, pdiv, pmod) ! PyLongObject *v; ! PyLongObject *w; ! PyLongObject **pdiv; ! PyLongObject **pmod; { PyLongObject *div, *mod; --- 1168,1174 ---- part of the outcome to keep the invariant intact. */ static int ! l_divmod(PyLongObject *v, PyLongObject *w, ! PyLongObject **pdiv, PyLongObject **pmod) { PyLongObject *div, *mod; *************** *** 1302,1308 **** static PyObject * ! long_div(v, w) ! PyLongObject *v; ! PyLongObject *w; { PyLongObject *div, *mod; --- 1205,1209 ---- static PyObject * ! long_div(PyLongObject *v, PyLongObject *w) { PyLongObject *div, *mod; *************** *** 1314,1320 **** static PyObject * ! long_mod(v, w) ! PyLongObject *v; ! PyLongObject *w; { PyLongObject *div, *mod; --- 1215,1219 ---- static PyObject * ! long_mod(PyLongObject *v, PyLongObject *w) { PyLongObject *div, *mod; *************** *** 1326,1332 **** static PyObject * ! long_divmod(v, w) ! PyLongObject *v; ! PyLongObject *w; { PyObject *z; --- 1225,1229 ---- static PyObject * ! long_divmod(PyLongObject *v, PyLongObject *w) { PyObject *z; *************** *** 1347,1354 **** static PyObject * ! long_pow(a, b, c) ! PyLongObject *a; ! PyLongObject *b; ! PyLongObject *c; { PyLongObject *z, *div, *mod; --- 1244,1248 ---- static PyObject * ! long_pow(PyLongObject *a, PyLongObject *b, PyLongObject *c) { PyLongObject *z, *div, *mod; *************** *** 1429,1434 **** static PyObject * ! long_invert(v) ! PyLongObject *v; { /* Implement ~x as -(x+1) */ --- 1323,1327 ---- static PyObject * ! long_invert(PyLongObject *v) { /* Implement ~x as -(x+1) */ *************** *** 1448,1453 **** static PyObject * ! long_pos(v) ! PyLongObject *v; { Py_INCREF(v); --- 1341,1345 ---- static PyObject * ! long_pos(PyLongObject *v) { Py_INCREF(v); *************** *** 1456,1461 **** static PyObject * ! long_neg(v) ! PyLongObject *v; { PyLongObject *z; --- 1348,1352 ---- static PyObject * ! long_neg(PyLongObject *v) { PyLongObject *z; *************** *** 1477,1482 **** static PyObject * ! long_abs(v) ! PyLongObject *v; { if (v->ob_size < 0) --- 1368,1372 ---- static PyObject * ! long_abs(PyLongObject *v) { if (v->ob_size < 0) *************** *** 1489,1494 **** static int ! long_nonzero(v) ! PyLongObject *v; { return ABS(v->ob_size) != 0; --- 1379,1383 ---- static int ! long_nonzero(PyLongObject *v) { return ABS(v->ob_size) != 0; *************** *** 1496,1502 **** static PyObject * ! long_rshift(a, b) ! PyLongObject *a; ! PyLongObject *b; { PyLongObject *z; --- 1385,1389 ---- static PyObject * ! long_rshift(PyLongObject *a, PyLongObject *b) { PyLongObject *z; *************** *** 1550,1556 **** static PyObject * ! long_lshift(a, b) ! PyLongObject *a; ! PyLongObject *b; { /* This version due to Tim Peters */ --- 1437,1441 ---- static PyObject * ! long_lshift(PyLongObject *a, PyLongObject *b) { /* This version due to Tim Peters */ *************** *** 1606,1615 **** #define MIN(x, y) ((x) > (y) ? (y) : (x)) - static PyObject *long_bitwise Py_PROTO((PyLongObject *, int, PyLongObject *)); static PyObject * ! long_bitwise(a, op, b) ! PyLongObject *a; ! int op; /* '&', '|', '^' */ ! PyLongObject *b; { digit maska, maskb; /* 0 or MASK */ --- 1491,1498 ---- #define MIN(x, y) ((x) > (y) ? (y) : (x)) static PyObject * ! long_bitwise(PyLongObject *a, ! int op, /* '&', '|', '^' */ ! PyLongObject *b) { digit maska, maskb; /* 0 or MASK */ *************** *** 1710,1716 **** static PyObject * ! long_and(a, b) ! PyLongObject *a; ! PyLongObject *b; { return long_bitwise(a, '&', b); --- 1593,1597 ---- static PyObject * ! long_and(PyLongObject *a, PyLongObject *b) { return long_bitwise(a, '&', b); *************** *** 1718,1724 **** static PyObject * ! long_xor(a, b) ! PyLongObject *a; ! PyLongObject *b; { return long_bitwise(a, '^', b); --- 1599,1603 ---- static PyObject * ! long_xor(PyLongObject *a, PyLongObject *b) { return long_bitwise(a, '^', b); *************** *** 1726,1732 **** static PyObject * ! long_or(a, b) ! PyLongObject *a; ! PyLongObject *b; { return long_bitwise(a, '|', b); --- 1605,1609 ---- static PyObject * ! long_or(PyLongObject *a, PyLongObject *b) { return long_bitwise(a, '|', b); *************** *** 1734,1740 **** static int ! long_coerce(pv, pw) ! PyObject **pv; ! PyObject **pw; { if (PyInt_Check(*pw)) { --- 1611,1615 ---- static int ! long_coerce(PyObject **pv, PyObject **pw) { if (PyInt_Check(*pw)) { *************** *** 1747,1752 **** static PyObject * ! long_int(v) ! PyObject *v; { long x; --- 1622,1626 ---- static PyObject * ! long_int(PyObject *v) { long x; *************** *** 1758,1763 **** static PyObject * ! long_long(v) ! PyObject *v; { Py_INCREF(v); --- 1632,1636 ---- static PyObject * ! long_long(PyObject *v) { Py_INCREF(v); *************** *** 1766,1771 **** static PyObject * ! long_float(v) ! PyObject *v; { double result; --- 1639,1643 ---- static PyObject * ! long_float(PyObject *v) { double result; *************** *** 1777,1782 **** static PyObject * ! long_oct(v) ! PyObject *v; { return long_format(v, 8, 1); --- 1649,1653 ---- static PyObject * ! long_oct(PyObject *v) { return long_format(v, 8, 1); *************** *** 1784,1824 **** static PyObject * ! long_hex(v) ! PyObject *v; { return long_format(v, 16, 1); } - - #define UF (unaryfunc) - #define BF (binaryfunc) - #define TF (ternaryfunc) - #define IF (inquiry) - static PyNumberMethods long_as_number = { ! BF long_add, /*nb_add*/ ! BF long_sub, /*nb_subtract*/ ! BF long_mul, /*nb_multiply*/ ! BF long_div, /*nb_divide*/ ! BF long_mod, /*nb_remainder*/ ! BF long_divmod, /*nb_divmod*/ ! TF long_pow, /*nb_power*/ ! UF long_neg, /*nb_negative*/ ! UF long_pos, /*tp_positive*/ ! UF long_abs, /*tp_absolute*/ ! IF long_nonzero,/*tp_nonzero*/ ! UF long_invert, /*nb_invert*/ ! BF long_lshift, /*nb_lshift*/ ! BF long_rshift, /*nb_rshift*/ ! BF long_and, /*nb_and*/ ! BF long_xor, /*nb_xor*/ ! BF long_or, /*nb_or*/ ! (int (*) Py_FPROTO((PyObject **, PyObject **))) ! (coercion)long_coerce, /*nb_coerce*/ ! UF long_int, /*nb_int*/ ! UF long_long, /*nb_long*/ ! UF long_float, /*nb_float*/ ! UF long_oct, /*nb_oct*/ ! UF long_hex, /*nb_hex*/ }; --- 1655,1688 ---- static PyObject * ! long_hex(PyObject *v) { return long_format(v, 16, 1); } static PyNumberMethods long_as_number = { ! (binaryfunc) long_add, /*nb_add*/ ! (binaryfunc) long_sub, /*nb_subtract*/ ! (binaryfunc) long_mul, /*nb_multiply*/ ! (binaryfunc) long_div, /*nb_divide*/ ! (binaryfunc) long_mod, /*nb_remainder*/ ! (binaryfunc) long_divmod, /*nb_divmod*/ ! (ternaryfunc) long_pow, /*nb_power*/ ! (unaryfunc) long_neg, /*nb_negative*/ ! (unaryfunc) long_pos, /*tp_positive*/ ! (unaryfunc) long_abs, /*tp_absolute*/ ! (inquiry) long_nonzero, /*tp_nonzero*/ ! (unaryfunc) long_invert, /*nb_invert*/ ! (binaryfunc) long_lshift, /*nb_lshift*/ ! (binaryfunc) long_rshift, /*nb_rshift*/ ! (binaryfunc) long_and, /*nb_and*/ ! (binaryfunc) long_xor, /*nb_xor*/ ! (binaryfunc) long_or, /*nb_or*/ ! (int (*) (PyObject **, PyObject **)) ! (coercion)long_coerce, /*nb_coerce*/ ! (unaryfunc) long_int, /*nb_int*/ ! (unaryfunc) long_long, /*nb_long*/ ! (unaryfunc) long_float, /*nb_float*/ ! (unaryfunc) long_oct, /*nb_oct*/ ! (unaryfunc) long_hex, /*nb_hex*/ }; *************** *** 1829,1845 **** sizeof(PyLongObject) - sizeof(digit), sizeof(digit), ! (destructor)long_dealloc, /*tp_dealloc*/ ! 0, /*tp_print*/ ! 0, /*tp_getattr*/ ! 0, /*tp_setattr*/ ! (int (*) Py_FPROTO((PyObject *, PyObject *))) ! (cmpfunc)long_compare, /*tp_compare*/ ! (reprfunc)long_repr, /*tp_repr*/ ! &long_as_number,/*tp_as_number*/ ! 0, /*tp_as_sequence*/ ! 0, /*tp_as_mapping*/ ! (long (*) Py_FPROTO((PyObject *))) ! (hashfunc)long_hash, /*tp_hash*/ ! 0, /*tp_call*/ ! (reprfunc)long_str, /*tp_str*/ }; --- 1693,1709 ---- sizeof(PyLongObject) - sizeof(digit), sizeof(digit), ! (destructor)long_dealloc, /*tp_dealloc*/ ! 0, /*tp_print*/ ! 0, /*tp_getattr*/ ! 0, /*tp_setattr*/ ! (int (*) (PyObject *, PyObject *)) ! (cmpfunc)long_compare, /*tp_compare*/ ! (reprfunc)long_repr, /*tp_repr*/ ! &long_as_number, /*tp_as_number*/ ! 0, /*tp_as_sequence*/ ! 0, /*tp_as_mapping*/ ! (long (*) (PyObject *)) ! (hashfunc)long_hash, /*tp_hash*/ ! 0, /*tp_call*/ ! (reprfunc)long_str, /*tp_str*/ }; From python-dev@python.org Fri Jul 7 17:21:34 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 7 Jul 2000 09:21:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules makesetup,1.24,1.25 Message-ID: <200007071621.JAA15058@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv15045/Modules Modified Files: makesetup Log Message: Thomas Wouters : Allow -f* parameters to be passed to the compiler from Setup files. Index: makesetup =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/makesetup,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** makesetup 2000/07/06 17:58:06 1.24 --- makesetup 2000/07/07 16:21:31 1.25 *************** *** 141,145 **** esac case $arg in ! -[IDUC]*) cpps="$cpps $arg";; -Xlinker) libs="$libs $arg"; skip=libs;; -rpath) libs="$libs $arg"; skip=libs;; --- 141,145 ---- esac case $arg in ! -[IDUCf]*) cpps="$cpps $arg";; -Xlinker) libs="$libs $arg"; skip=libs;; -rpath) libs="$libs $arg"; skip=libs;; From python-dev@python.org Fri Jul 7 18:08:42 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 7 Jul 2000 10:08:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libwebbrowser.tex,1.1,1.2 Message-ID: <200007071708.KAA24821@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv24814 Modified Files: libwebbrowser.tex Log Message: Add an entry for the KDE File Manager support from Peter Funk. Index: libwebbrowser.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libwebbrowser.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** libwebbrowser.tex 2000/07/07 03:36:12 1.1 --- libwebbrowser.tex 2000/07/07 17:08:40 1.2 *************** *** 58,64 **** \begin{tableiii}{l|l|c}{code}{Type Name}{Class Name}{Notes} \lineiii{'netscape'}{\class{Netscape}}{} \lineiii{'grail'}{\class{Grail}}{} ! \lineiii{'windows-default'}{\class{WindowsDefault}}{(1)} ! \lineiii{'internet-config'}{\class{InternetConfig}}{(2)} \lineiii{'command-line'}{\class{CommandLineBrowser}}{} \end{tableiii} --- 58,65 ---- \begin{tableiii}{l|l|c}{code}{Type Name}{Class Name}{Notes} \lineiii{'netscape'}{\class{Netscape}}{} + \lineiii{'kfm'}{\class{Konquerer}}{(1)} \lineiii{'grail'}{\class{Grail}}{} ! \lineiii{'windows-default'}{\class{WindowsDefault}}{(2)} ! \lineiii{'internet-config'}{\class{InternetConfig}}{(3)} \lineiii{'command-line'}{\class{CommandLineBrowser}}{} \end{tableiii} *************** *** 69,76 **** \begin{description} \item[(1)] Only on Windows platforms; requires the common extension modules \module{win32api} and \module{win32con}. ! \item[(2)] Only on MacOS platforms; requires the standard MacPython \module{ic} module, described in the \citetitle[../mac/module-ic.html]{Macintosh --- 70,81 ---- \begin{description} \item[(1)] + ``Konquerer'' is the file manager for the KDE desktop environment, and + only makes sense to use if KDE is running. + + \item[(2)] Only on Windows platforms; requires the common extension modules \module{win32api} and \module{win32con}. ! \item[(3)] Only on MacOS platforms; requires the standard MacPython \module{ic} module, described in the \citetitle[../mac/module-ic.html]{Macintosh From python-dev@python.org Fri Jul 7 18:45:39 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 10:45:39 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include ucnhash.h,1.2,1.3 Message-ID: <200007071745.KAA27159@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv27135/Include Modified Files: ucnhash.h Log Message: Fix to use Py_UCS4 Index: ucnhash.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/ucnhash.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ucnhash.h 2000/06/29 00:06:39 1.2 --- ucnhash.h 2000/07/07 17:45:37 1.3 *************** *** 16,20 **** { const char *pszUCN; ! unsigned int uiValue; } _Py_UnicodeCharacterName; --- 16,20 ---- { const char *pszUCN; ! Py_UCS4 value; } _Py_UnicodeCharacterName; From python-dev@python.org Fri Jul 7 18:48:54 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 10:48:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_unicode.py,1.18,1.19 Message-ID: <200007071748.KAA27423@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv27299/Lib/test Modified Files: test_unicode.py Log Message: Tests for new surrogate support in the UTF-8 codec. By Bill Tutt. Index: test_unicode.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** test_unicode.py 2000/07/07 13:46:19 1.18 --- test_unicode.py 2000/07/07 17:48:52 1.19 *************** *** 169,172 **** --- 169,223 ---- print 'done.' + print 'Testing UTF-16 code point order comparisons...', + #No surrogates, no fixup required. + assert u'\u0061' < u'\u20ac' + # Non surrogate below surrogate value, no fixup required + assert u'\u0061' < u'\ud800\udc02' + + # Non surrogate above surrogate value, fixup required + def test_lecmp(s, s2): + assert s < s2 , "comparison failed on %s < %s" % (s, s2) + + def test_fixup(s): + s2 = u'\ud800\udc01' + test_lecmp(s, s2) + s2 = u'\ud900\udc01' + test_lecmp(s, s2) + s2 = u'\uda00\udc01' + test_lecmp(s, s2) + s2 = u'\udb00\udc01' + test_lecmp(s, s2) + s2 = u'\ud800\udd01' + test_lecmp(s, s2) + s2 = u'\ud900\udd01' + test_lecmp(s, s2) + s2 = u'\uda00\udd01' + test_lecmp(s, s2) + s2 = u'\udb00\udd01' + test_lecmp(s, s2) + s2 = u'\ud800\ude01' + test_lecmp(s, s2) + s2 = u'\ud900\ude01' + test_lecmp(s, s2) + s2 = u'\uda00\ude01' + test_lecmp(s, s2) + s2 = u'\udb00\ude01' + test_lecmp(s, s2) + s2 = u'\ud800\udfff' + test_lecmp(s, s2) + s2 = u'\ud900\udfff' + test_lecmp(s, s2) + s2 = u'\uda00\udfff' + test_lecmp(s, s2) + s2 = u'\udb00\udfff' + test_lecmp(s, s2) + + test_fixup(u'\ue000') + test_fixup(u'\uff61') + + # Surrogates on both sides, no fixup required + assert u'\ud800\udc02' < u'\ud84d\udc56' + print 'done.' + test('ljust', u'abc', u'abc ', 10) test('rjust', u'abc', u' abc', 10) *************** *** 293,296 **** --- 344,368 ---- # Test builtin codecs print 'Testing builtin codecs...', + + # UTF-8 specific encoding tests: + assert u'\u20ac'.encode('utf-8') == \ + ''.join((chr(0xe2), chr(0x82), chr(0xac))) + assert u'\ud800\udc02'.encode('utf-8') == \ + ''.join((chr(0xf0), chr(0x90), chr(0x80), chr(0x82))) + assert u'\ud84d\udc56'.encode('utf-8') == \ + ''.join((chr(0xf0), chr(0xa3), chr(0x91), chr(0x96))) + # UTF-8 specific decoding tests + assert unicode(''.join((chr(0xf0), chr(0xa3), chr(0x91), chr(0x96))), + 'utf-8') == u'\ud84d\udc56' + assert unicode(''.join((chr(0xf0), chr(0x90), chr(0x80), chr(0x82))), + 'utf-8') == u'\ud800\udc02' + assert unicode(''.join((chr(0xe2), chr(0x82), chr(0xac))), + 'utf-8') == u'\u20ac' + + # Other possible utf-8 test cases: + # * strict decoding testing for all of the + # UTF8_ERROR cases in PyUnicode_DecodeUTF8 + + assert unicode('hello','ascii') == u'hello' From python-dev@python.org Fri Jul 7 18:51:10 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 10:51:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.40,2.41 Message-ID: <200007071751.KAA27570@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv27530/Objects Modified Files: unicodeobject.c Log Message: New surrogate support in the UTF-8 codec. By Bill Tutt. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.40 retrieving revision 2.41 diff -C2 -r2.40 -r2.41 *** unicodeobject.c 2000/07/07 13:46:42 2.40 --- unicodeobject.c 2000/07/07 17:51:08 2.41 *************** *** 658,665 **** while (s < e) { ! register Py_UNICODE ch = (unsigned char)*s; if (ch < 0x80) { ! *p++ = ch; s++; continue; --- 658,665 ---- while (s < e) { ! Py_UCS4 ch = (unsigned char)*s; if (ch < 0x80) { ! *p++ = (Py_UNICODE)ch; s++; continue; *************** *** 688,692 **** UTF8_ERROR("illegal encoding"); else ! *p++ = ch; break; --- 688,692 ---- UTF8_ERROR("illegal encoding"); else ! *p++ = (Py_UNICODE)ch; break; *************** *** 699,703 **** UTF8_ERROR("illegal encoding"); else ! *p++ = ch; break; --- 699,726 ---- UTF8_ERROR("illegal encoding"); else ! *p++ = (Py_UNICODE)ch; ! break; ! ! case 4: ! if ((s[1] & 0xc0) != 0x80 || ! (s[2] & 0xc0) != 0x80 || ! (s[3] & 0xc0) != 0x80) ! UTF8_ERROR("invalid data"); ! ch = ((s[0] & 0x7) << 18) + ((s[1] & 0x3f) << 12) + ! ((s[2] & 0x3f) << 6) + (s[3] & 0x3f); ! /* validate and convert to UTF-16 */ ! if ((ch < 0x10000) || /* minimum value allowed for 4 byte encoding */ ! (ch > 0x10ffff)) /* maximum value allowed for UTF-16 */ ! UTF8_ERROR("illegal encoding"); ! /* compute and append the two surrogates: */ ! ! /* translate from 10000..10FFFF to 0..FFFF */ ! ch -= 0x10000; ! ! /* high surrogate = top 10 bits added to D800 */ ! *p++ = (Py_UNICODE)(0xD800 + (ch >> 10)); ! ! /* low surrogate = bottom 10 bits added to DC00 */ ! *p++ = (Py_UNICODE)(0xDC00 + (ch & ~0xFC00)); break; *************** *** 759,764 **** char *p; char *q; ! v = PyString_FromStringAndSize(NULL, 3 * size); if (v == NULL) return NULL; --- 782,791 ---- char *p; char *q; + Py_UCS4 ch2; + unsigned int cbAllocated = 3 * size; + unsigned int cbWritten = 0; + int i = 0; ! v = PyString_FromStringAndSize(NULL, cbAllocated); if (v == NULL) return NULL; *************** *** 767,788 **** p = q = PyString_AS_STRING(v); ! while (size-- > 0) { ! Py_UNICODE ch = *s++; ! if (ch < 0x80) *p++ = (char) ch; else if (ch < 0x0800) { *p++ = 0xc0 | (ch >> 6); *p++ = 0x80 | (ch & 0x3f); ! } else if (0xD800 <= ch && ch <= 0xDFFF) { ! /* These byte ranges are reserved for UTF-16 surrogate ! bytes which the Python implementation currently does ! not support. */ ! if (utf8_encoding_error(&s, &p, errors, ! "unsupported code range")) goto onError; ! } else { ! *p++ = 0xe0 | (ch >> 12); ! *p++ = 0x80 | ((ch >> 6) & 0x3f); ! *p++ = 0x80 | (ch & 0x3f); } } --- 794,839 ---- p = q = PyString_AS_STRING(v); ! while (i < size) { ! Py_UCS4 ch = s[i++]; ! if (ch < 0x80) { *p++ = (char) ch; + cbWritten++; + } else if (ch < 0x0800) { *p++ = 0xc0 | (ch >> 6); *p++ = 0x80 | (ch & 0x3f); ! cbWritten += 2; ! } ! else { ! /* Check for high surrogate */ ! if (0xD800 <= ch && ch <= 0xDBFF) { ! if (i != size) { ! ch2 = s[i]; ! if (0xDC00 <= ch2 && ch2 <= 0xDFFF) { ! ! if (cbWritten >= (cbAllocated - 4)) { ! /* Provide enough room for some more ! surrogates */ ! cbAllocated += 4*10; ! if (_PyString_Resize(&v, cbAllocated)) goto onError; ! } ! ! /* combine the two values */ ! ch = ((ch - 0xD800)<<10 | (ch2-0xDC00))+0x10000; ! ! *p++ = (char)((ch >> 18) | 0xf0); ! *p++ = (char)(0x80 | (ch >> 12) & 0x3f); ! i++; ! cbWritten += 4; ! } ! } ! } ! else { ! *p++ = (char)(0xe0 | (ch >> 12)); ! cbWritten += 3; ! } ! *p++ = (char)(0x80 | ((ch >> 6) & 0x3f)); ! *p++ = (char)(0x80 | (ch & 0x3f)); } } *************** *** 1218,1222 **** const char *start = s + 1; const char *endBrace = start; ! unsigned int uiValue; unsigned long j; --- 1269,1273 ---- const char *start = s + 1; const char *endBrace = start; ! Py_UCS4 value; unsigned long j; *************** *** 1249,1258 **** goto ucnFallthrough; } ! uiValue = ((_Py_UnicodeCharacterName *) ! (pucnHash->getValue(j)))->uiValue; ! if (uiValue < 1<<16) { /* In UCS-2 range, easy solution.. */ ! *p++ = uiValue; } else --- 1300,1309 ---- goto ucnFallthrough; } ! value = ((_Py_UnicodeCharacterName *) ! (pucnHash->getValue(j)))->value; ! if (value < 1<<16) { /* In UCS-2 range, easy solution.. */ ! *p++ = value; } else *************** *** 1261,1271 **** /* compute and append the two surrogates: */ /* translate from 10000..10FFFF to 0..FFFFF */ ! uiValue -= 0x10000; /* high surrogate = top 10 bits added to D800 */ ! *p++ = 0xD800 + (uiValue >> 10); /* low surrogate = bottom 10 bits added to DC00 */ ! *p++ = 0xDC00 + (uiValue & ~0xFC00); } s = endBrace + 1; --- 1312,1322 ---- /* compute and append the two surrogates: */ /* translate from 10000..10FFFF to 0..FFFFF */ ! value -= 0x10000; /* high surrogate = top 10 bits added to D800 */ ! *p++ = 0xD800 + (value >> 10); /* low surrogate = bottom 10 bits added to DC00 */ ! *p++ = 0xDC00 + (value & ~0xFC00); } s = endBrace + 1; *************** *** 3092,3101 **** /* http://www-4.ibm.com/software/developer/library/utf16.html?dwzone=unicode */ ! static unsigned long utf16Fixup[32] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0x2000, 0xf800, 0xf800, 0xf800, 0xf800 }; --- 3143,3152 ---- /* http://www-4.ibm.com/software/developer/library/utf16.html?dwzone=unicode */ ! static short utf16Fixup[32] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0x2000, -0x800, -0x800, -0x800, -0x800 }; *************** *** 3112,3116 **** while (len1 > 0 && len2 > 0) { ! unsigned long c1, c2; long diff; --- 3163,3167 ---- while (len1 > 0 && len2 > 0) { ! Py_UNICODE c1, c2; long diff; From python-dev@python.org Fri Jul 7 18:54:06 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 10:54:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/perfecthash GenUCNHash.py,1.3,1.4 Message-ID: <200007071754.KAA27823@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/perfecthash In directory slayer.i.sourceforge.net:/tmp/cvs-serv27816/Tools/perfecthash Modified Files: GenUCNHash.py Log Message: Fix to use Py_UCS4. By Bill Tutt. Index: GenUCNHash.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/perfecthash/GenUCNHash.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** GenUCNHash.py 2000/06/30 10:30:35 1.3 --- GenUCNHash.py 2000/07/07 17:53:54 1.4 *************** *** 39,43 **** { const char *pszUCN; ! unsigned int uiValue; } _Py_UnicodeCharacterName; --- 39,43 ---- { const char *pszUCN; ! Py_UCS4 value; } _Py_UnicodeCharacterName; From python-dev@python.org Fri Jul 7 21:41:23 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 7 Jul 2000 13:41:23 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/distutils ccompiler.py,1.28,1.29 Message-ID: <200007072041.NAA26210@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv26175 Modified Files: ccompiler.py Log Message: fix inconsistent use of tabs and spaces Index: ccompiler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/ccompiler.py,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** ccompiler.py 2000/06/28 01:29:09 1.28 --- ccompiler.py 2000/07/07 20:41:20 1.29 *************** *** 829,833 **** compilers = [] for compiler in compiler_class.keys(): ! compilers.append(("compiler="+compiler, None, compiler_class[compiler][2])) compilers.sort() --- 829,833 ---- compilers = [] for compiler in compiler_class.keys(): ! compilers.append(("compiler="+compiler, None, compiler_class[compiler][2])) compilers.sort() From python-dev@python.org Fri Jul 7 21:41:23 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 7 Jul 2000 13:41:23 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/distutils/command build_ext.py,1.54,1.55 install_headers.py,1.3,1.4 Message-ID: <200007072041.NAA26216@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv26175/command Modified Files: build_ext.py install_headers.py Log Message: fix inconsistent use of tabs and spaces Index: build_ext.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/build_ext.py,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -r1.54 -r1.55 *** build_ext.py 2000/06/29 23:09:20 1.54 --- build_ext.py 2000/07/07 20:41:21 1.55 *************** *** 371,380 **** self.get_ext_filename(fullname)) ! if not (self.force or newer_group(sources, ext_filename, 'newer')): ! self.announce ("skipping '%s' extension (up-to-date)" % ext.name) ! continue # 'for' loop over all extensions ! else: ! self.announce ("building '%s' extension" % ext.name) # First, scan the sources for SWIG definition files (.i), run --- 371,380 ---- self.get_ext_filename(fullname)) ! if not (self.force or newer_group(sources, ext_filename, 'newer')): ! self.announce ("skipping '%s' extension (up-to-date)" % ext.name) ! continue # 'for' loop over all extensions ! else: ! self.announce ("building '%s' extension" % ext.name) # First, scan the sources for SWIG definition files (.i), run Index: install_headers.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/install_headers.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** install_headers.py 2000/06/21 03:14:27 1.3 --- install_headers.py 2000/07/07 20:41:21 1.4 *************** *** 23,27 **** def initialize_options (self): self.install_dir = None ! self.outfiles = [] def finalize_options (self): --- 23,27 ---- def initialize_options (self): self.install_dir = None ! self.outfiles = [] def finalize_options (self): From python-dev@python.org Fri Jul 7 21:45:24 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 7 Jul 2000 13:45:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/distutils dist.py,1.31,1.32 Message-ID: <200007072045.NAA26729@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv26614 Modified Files: dist.py Log Message: fix inconsistent use of tabs and spaces Index: dist.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/dist.py,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** dist.py 2000/06/28 01:25:27 1.31 --- dist.py 2000/07/07 20:45:21 1.32 *************** *** 276,286 **** # What to call the per-user config file if os.name == 'posix': ! user_filename = ".pydistutils.cfg" ! else: ! user_filename = "pydistutils.cfg" # And look for the user config file ! if os.environ.has_key('HOME'): ! user_file = os.path.join(os.environ.get('HOME'), user_filename) if os.path.isfile(user_file): files.append(user_file) --- 276,286 ---- # What to call the per-user config file if os.name == 'posix': ! user_filename = ".pydistutils.cfg" ! else: ! user_filename = "pydistutils.cfg" # And look for the user config file ! if os.environ.has_key('HOME'): ! user_file = os.path.join(os.environ.get('HOME'), user_filename) if os.path.isfile(user_file): files.append(user_file) *************** *** 440,444 **** # Check for help_options in command class. They have a different # format (tuple of four) so we need to preprocess them here. ! if (hasattr(cmd_class, 'help_options') and type (cmd_class.help_options) is ListType): help_options = fix_help_options(cmd_class.help_options) --- 440,444 ---- # Check for help_options in command class. They have a different # format (tuple of four) so we need to preprocess them here. ! if (hasattr(cmd_class, 'help_options') and type (cmd_class.help_options) is ListType): help_options = fix_help_options(cmd_class.help_options) *************** *** 458,472 **** return ! if (hasattr(cmd_class, 'help_options') and type (cmd_class.help_options) is ListType): ! help_option_found=0 ! for (help_option, short, desc, func) in cmd_class.help_options: ! if hasattr(opts, parser.get_attr_name(help_option)): ! help_option_found=1 #print "showing help for option %s of command %s" % \ # (help_option[0],cmd_class) if callable(func): ! func() else: raise DistutilsClassError, \ --- 458,472 ---- return ! if (hasattr(cmd_class, 'help_options') and type (cmd_class.help_options) is ListType): ! help_option_found=0 ! for (help_option, short, desc, func) in cmd_class.help_options: ! if hasattr(opts, parser.get_attr_name(help_option)): ! help_option_found=1 #print "showing help for option %s of command %s" % \ # (help_option[0],cmd_class) if callable(func): ! func() else: raise DistutilsClassError, \ *************** *** 476,480 **** if help_option_found: ! return # Put the options from the command-line into their official --- 476,480 ---- if help_option_found: ! return # Put the options from the command-line into their official *************** *** 527,536 **** else: klass = self.get_command_class (command) ! if (hasattr(klass, 'help_options') and type (klass.help_options) is ListType): ! parser.set_option_table (klass.user_options + fix_help_options(klass.help_options)) ! else: ! parser.set_option_table (klass.user_options) parser.print_help ("Options for '%s' command:" % klass.__name__) print --- 527,536 ---- else: klass = self.get_command_class (command) ! if (hasattr(klass, 'help_options') and type (klass.help_options) is ListType): ! parser.set_option_table (klass.user_options + fix_help_options(klass.help_options)) ! else: ! parser.set_option_table (klass.user_options) parser.print_help ("Options for '%s' command:" % klass.__name__) print From python-dev@python.org Fri Jul 7 21:57:44 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 7 Jul 2000 13:57:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax _exceptions.py,1.1,1.2 Message-ID: <200007072057.NAA27663@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv27642 Modified Files: _exceptions.py Log Message: fix inconsistent use of tabs and spaces Index: _exceptions.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/_exceptions.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** _exceptions.py 2000/06/29 19:34:54 1.1 --- _exceptions.py 2000/07/07 20:57:42 1.2 *************** *** 23,28 **** def getMessage(self): ! "Return a message for this exception." ! return self._msg def getException(self): --- 23,28 ---- def getMessage(self): ! "Return a message for this exception." ! return self._msg def getException(self): *************** *** 61,79 **** def getColumnNumber(self): ! """The column number of the end of the text where the exception occurred.""" ! return self._locator.getColumnNumber() def getLineNumber(self): ! "The line number of the end of the text where the exception occurred." ! return self._locator.getLineNumber() def getPublicId(self): ! "Get the public identifier of the entity where the exception occurred." ! return self._locator.getPublicId() def getSystemId(self): ! "Get the system identifier of the entity where the exception occurred." ! return self._locator.getSystemId() def __str__(self): --- 61,79 ---- def getColumnNumber(self): ! """The column number of the end of the text where the exception occurred.""" ! return self._locator.getColumnNumber() def getLineNumber(self): ! "The line number of the end of the text where the exception occurred." ! return self._locator.getLineNumber() def getPublicId(self): ! "Get the public identifier of the entity where the exception occurred." ! return self._locator.getPublicId() def getSystemId(self): ! "Get the system identifier of the entity where the exception occurred." ! return self._locator.getSystemId() def __str__(self): From python-dev@python.org Fri Jul 7 22:02:02 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 7 Jul 2000 14:02:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/dos-8x3 rfc822-n.py,1.1,1.2 Message-ID: <200007072102.OAA31771@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/dos-8x3 In directory slayer.i.sourceforge.net:/tmp/cvs-serv31709/dos-8x3 Modified Files: rfc822-n.py Log Message: fix inconsistent use of tabs and spaces Index: rfc822-n.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/rfc822-n.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** rfc822-n.py 2000/05/08 17:31:00 1.1 --- rfc822-n.py 2000/07/07 21:02:00 1.2 *************** *** 328,336 **** raw = [] for h in self.getallmatchingheaders(name): ! if h[0] in ' \t': ! raw.append(h) ! else: ! if raw: ! raw.append(', ') i = string.find(h, ':') if i > 0: --- 328,336 ---- raw = [] for h in self.getallmatchingheaders(name): ! if h[0] in ' \t': ! raw.append(h) ! else: ! if raw: ! raw.append(', ') i = string.find(h, ':') if i > 0: *************** *** 833,846 **** if mm > 12: mm = mm - 12 if dd[-1] == ',': ! dd = dd[:-1] i = string.find(yy, ':') if i > 0: ! yy, tm = tm, yy if yy[-1] == ',': ! yy = yy[:-1] if yy[0] not in string.digits: ! yy, tz = tz, yy if tm[-1] == ',': ! tm = tm[:-1] tm = string.splitfields(tm, ':') if len(tm) == 2: --- 833,846 ---- if mm > 12: mm = mm - 12 if dd[-1] == ',': ! dd = dd[:-1] i = string.find(yy, ':') if i > 0: ! yy, tm = tm, yy if yy[-1] == ',': ! yy = yy[:-1] if yy[0] not in string.digits: ! yy, tz = tz, yy if tm[-1] == ',': ! tm = tm[:-1] tm = string.splitfields(tm, ':') if len(tm) == 2: From python-dev@python.org Fri Jul 7 22:02:24 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 7 Jul 2000 14:02:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/curses wrapper.py,1.3,1.4 Message-ID: <200007072102.OAA31835@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/curses In directory slayer.i.sourceforge.net:/tmp/cvs-serv31811/curses Modified Files: wrapper.py Log Message: fix inconsistent use of tabs and spaces convert semicolons to newlines Index: wrapper.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/curses/wrapper.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** wrapper.py 2000/06/27 00:50:40 1.3 --- wrapper.py 2000/07/07 21:02:22 1.4 *************** *** 21,29 **** try: # Initialize curses ! stdscr=curses.initscr() # Turn off echoing of keys, and enter cbreak mode, # where no buffering is performed on keyboard input ! curses.noecho() ; curses.cbreak() # In keypad mode, escape sequences for special keys --- 21,30 ---- try: # Initialize curses ! stdscr=curses.initscr() # Turn off echoing of keys, and enter cbreak mode, # where no buffering is performed on keyboard input ! curses.noecho() ! curses.cbreak() # In keypad mode, escape sequences for special keys *************** *** 36,42 **** # In the event of an error, restore the terminal # to a sane state. ! stdscr.keypad(0) ! curses.echo() ; curses.nocbreak() ! curses.endwin() # Pass the exception upwards --- 37,44 ---- # In the event of an error, restore the terminal # to a sane state. ! stdscr.keypad(0) ! curses.echo() ! curses.nocbreak() ! curses.endwin() # Pass the exception upwards *************** *** 45,51 **** else: # Set everything back to normal ! stdscr.keypad(0) ! curses.echo() ; curses.nocbreak() ! curses.endwin() # Terminate curses return res --- 47,54 ---- else: # Set everything back to normal ! stdscr.keypad(0) ! curses.echo() ! curses.nocbreak() ! curses.endwin() # Terminate curses return res From python-dev@python.org Fri Jul 7 22:35:06 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 7 Jul 2000 14:35:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/dos-8x3 rfc822-n.py,1.2,NONE Message-ID: <200007072135.OAA04727@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/dos-8x3 In directory slayer.i.sourceforge.net:/tmp/cvs-serv4719 Removed Files: rfc822-n.py Log Message: Deleted bogus file. From python-dev@python.org Fri Jul 7 22:57:27 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 7 Jul 2000 14:57:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/dos-8x3 mimepars.py,1.1,NONE Message-ID: <200007072157.OAA06401@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/dos-8x3 In directory slayer.i.sourceforge.net:/tmp/cvs-serv6383 Removed Files: mimepars.py Log Message: delete bogus file From python-dev@python.org Sat Jul 8 01:32:07 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 7 Jul 2000 17:32:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include object.h,2.59,2.60 Message-ID: <200007080032.RAA02254@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv2086/src/Include Modified Files: object.h Log Message: Got RID of redundant coercions in longobject.c (as spotted by Greg Stein -- thanks!). Incidentally removed all the Py_PROTO macros from object.h, as they prevented my editor from magically finding the definitions of the "coercion", "cmpfunc" and "reprfunc" typedefs that were being redundantly applied in longobject.c. Index: object.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/object.h,v retrieving revision 2.59 retrieving revision 2.60 diff -C2 -r2.59 -r2.60 *** object.h 2000/06/30 23:58:04 2.59 --- object.h 2000/07/08 00:32:04 2.60 *************** *** 110,130 **** */ ! typedef PyObject * (*unaryfunc) Py_PROTO((PyObject *)); ! typedef PyObject * (*binaryfunc) Py_PROTO((PyObject *, PyObject *)); ! typedef PyObject * (*ternaryfunc) Py_PROTO((PyObject *, PyObject *, PyObject *)); ! typedef int (*inquiry) Py_PROTO((PyObject *)); ! typedef int (*coercion) Py_PROTO((PyObject **, PyObject **)); ! typedef PyObject *(*intargfunc) Py_PROTO((PyObject *, int)); ! typedef PyObject *(*intintargfunc) Py_PROTO((PyObject *, int, int)); ! typedef int(*intobjargproc) Py_PROTO((PyObject *, int, PyObject *)); ! typedef int(*intintobjargproc) Py_PROTO((PyObject *, int, int, PyObject *)); ! typedef int(*objobjargproc) Py_PROTO((PyObject *, PyObject *, PyObject *)); ! typedef int (*getreadbufferproc) Py_PROTO((PyObject *, int, void **)); ! typedef int (*getwritebufferproc) Py_PROTO((PyObject *, int, void **)); ! typedef int (*getsegcountproc) Py_PROTO((PyObject *, int *)); ! typedef int (*getcharbufferproc) Py_PROTO((PyObject *, int, const char **)); ! typedef int (*objobjproc) Py_PROTO((PyObject *, PyObject *)); ! typedef int (*visitproc) Py_PROTO((PyObject *, void *)); ! typedef int (*traverseproc) Py_PROTO((PyObject *, visitproc, void *)); typedef struct { --- 110,130 ---- */ ! typedef PyObject * (*unaryfunc)(PyObject *); ! typedef PyObject * (*binaryfunc)(PyObject *, PyObject *); ! typedef PyObject * (*ternaryfunc)(PyObject *, PyObject *, PyObject *); ! typedef int (*inquiry)(PyObject *); ! typedef int (*coercion)(PyObject **, PyObject **); ! typedef PyObject *(*intargfunc)(PyObject *, int); ! typedef PyObject *(*intintargfunc)(PyObject *, int, int); ! typedef int(*intobjargproc)(PyObject *, int, PyObject *); ! typedef int(*intintobjargproc)(PyObject *, int, int, PyObject *); ! typedef int(*objobjargproc)(PyObject *, PyObject *, PyObject *); ! typedef int (*getreadbufferproc)(PyObject *, int, void **); ! typedef int (*getwritebufferproc)(PyObject *, int, void **); ! typedef int (*getsegcountproc)(PyObject *, int *); ! typedef int (*getcharbufferproc)(PyObject *, int, const char **); ! typedef int (*objobjproc)(PyObject *, PyObject *); ! typedef int (*visitproc)(PyObject *, void *); ! typedef int (*traverseproc)(PyObject *, visitproc, void *); typedef struct { *************** *** 179,191 **** ! typedef void (*destructor) Py_PROTO((PyObject *)); ! typedef int (*printfunc) Py_PROTO((PyObject *, FILE *, int)); ! typedef PyObject *(*getattrfunc) Py_PROTO((PyObject *, char *)); ! typedef PyObject *(*getattrofunc) Py_PROTO((PyObject *, PyObject *)); ! typedef int (*setattrfunc) Py_PROTO((PyObject *, char *, PyObject *)); ! typedef int (*setattrofunc) Py_PROTO((PyObject *, PyObject *, PyObject *)); ! typedef int (*cmpfunc) Py_PROTO((PyObject *, PyObject *)); ! typedef PyObject *(*reprfunc) Py_PROTO((PyObject *)); ! typedef long (*hashfunc) Py_PROTO((PyObject *)); typedef struct _typeobject { --- 179,191 ---- ! typedef void (*destructor)(PyObject *); ! typedef int (*printfunc)(PyObject *, FILE *, int); ! typedef PyObject *(*getattrfunc)(PyObject *, char *); ! typedef PyObject *(*getattrofunc)(PyObject *, PyObject *); ! typedef int (*setattrfunc)(PyObject *, char *, PyObject *); ! typedef int (*setattrofunc)(PyObject *, PyObject *, PyObject *); ! typedef int (*cmpfunc)(PyObject *, PyObject *); ! typedef PyObject *(*reprfunc)(PyObject *); ! typedef long (*hashfunc)(PyObject *); typedef struct _typeobject { *************** *** 249,272 **** /* Generic operations on objects */ ! extern DL_IMPORT(int) PyObject_Print Py_PROTO((PyObject *, FILE *, int)); ! extern DL_IMPORT(PyObject *) PyObject_Repr Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyObject_Str Py_PROTO((PyObject *)); ! extern DL_IMPORT(int) PyObject_Compare Py_PROTO((PyObject *, PyObject *)); ! extern DL_IMPORT(PyObject *) PyObject_GetAttrString Py_PROTO((PyObject *, char *)); ! extern DL_IMPORT(int) PyObject_SetAttrString Py_PROTO((PyObject *, char *, PyObject *)); ! extern DL_IMPORT(int) PyObject_HasAttrString Py_PROTO((PyObject *, char *)); ! extern DL_IMPORT(PyObject *) PyObject_GetAttr Py_PROTO((PyObject *, PyObject *)); ! extern DL_IMPORT(int) PyObject_SetAttr Py_PROTO((PyObject *, PyObject *, PyObject *)); ! extern DL_IMPORT(int) PyObject_HasAttr Py_PROTO((PyObject *, PyObject *)); ! extern DL_IMPORT(long) PyObject_Hash Py_PROTO((PyObject *)); ! extern DL_IMPORT(int) PyObject_IsTrue Py_PROTO((PyObject *)); ! extern DL_IMPORT(int) PyObject_Not Py_PROTO((PyObject *)); ! extern DL_IMPORT(int) PyCallable_Check Py_PROTO((PyObject *)); ! extern DL_IMPORT(int) PyNumber_Coerce Py_PROTO((PyObject **, PyObject **)); ! extern DL_IMPORT(int) PyNumber_CoerceEx Py_PROTO((PyObject **, PyObject **)); /* Helpers for printing recursive container types */ ! extern DL_IMPORT(int) Py_ReprEnter Py_PROTO((PyObject *)); ! extern DL_IMPORT(void) Py_ReprLeave Py_PROTO((PyObject *)); /* tstate dict key for PyObject_Compare helper */ --- 249,272 ---- /* Generic operations on objects */ ! extern DL_IMPORT(int) PyObject_Print(PyObject *, FILE *, int); ! extern DL_IMPORT(PyObject *) PyObject_Repr(PyObject *); ! extern DL_IMPORT(PyObject *) PyObject_Str(PyObject *); ! extern DL_IMPORT(int) PyObject_Compare(PyObject *, PyObject *); ! extern DL_IMPORT(PyObject *) PyObject_GetAttrString(PyObject *, char *); ! extern DL_IMPORT(int) PyObject_SetAttrString(PyObject *, char *, PyObject *); ! extern DL_IMPORT(int) PyObject_HasAttrString(PyObject *, char *); ! extern DL_IMPORT(PyObject *) PyObject_GetAttr(PyObject *, PyObject *); ! extern DL_IMPORT(int) PyObject_SetAttr(PyObject *, PyObject *, PyObject *); ! extern DL_IMPORT(int) PyObject_HasAttr(PyObject *, PyObject *); ! extern DL_IMPORT(long) PyObject_Hash(PyObject *); ! extern DL_IMPORT(int) PyObject_IsTrue(PyObject *); ! extern DL_IMPORT(int) PyObject_Not(PyObject *); ! extern DL_IMPORT(int) PyCallable_Check(PyObject *); ! extern DL_IMPORT(int) PyNumber_Coerce(PyObject **, PyObject **); ! extern DL_IMPORT(int) PyNumber_CoerceEx(PyObject **, PyObject **); /* Helpers for printing recursive container types */ ! extern DL_IMPORT(int) Py_ReprEnter(PyObject *); ! extern DL_IMPORT(void) Py_ReprLeave(PyObject *); /* tstate dict key for PyObject_Compare helper */ *************** *** 274,279 **** /* Helpers for hash functions */ ! extern DL_IMPORT(long) _Py_HashDouble Py_PROTO((double)); ! extern DL_IMPORT(long) _Py_HashPointer Py_PROTO((void*)); /* Flag bits for printing: */ --- 274,279 ---- /* Helpers for hash functions */ ! extern DL_IMPORT(long) _Py_HashDouble(double); ! extern DL_IMPORT(long) _Py_HashPointer(void*); /* Flag bits for printing: */ *************** *** 356,364 **** #ifdef Py_TRACE_REFS ! extern DL_IMPORT(void) _Py_Dealloc Py_PROTO((PyObject *)); ! extern DL_IMPORT(void) _Py_NewReference Py_PROTO((PyObject *)); ! extern DL_IMPORT(void) _Py_ForgetReference Py_PROTO((PyObject *)); ! extern DL_IMPORT(void) _Py_PrintReferences Py_PROTO((FILE *)); ! extern DL_IMPORT(void) _Py_ResetReferences Py_PROTO((void)); #endif --- 356,364 ---- #ifdef Py_TRACE_REFS ! extern DL_IMPORT(void) _Py_Dealloc(PyObject *); ! extern DL_IMPORT(void) _Py_NewReference(PyObject *); ! extern DL_IMPORT(void) _Py_ForgetReference(PyObject *); ! extern DL_IMPORT(void) _Py_PrintReferences(FILE *); ! extern DL_IMPORT(void) _Py_ResetReferences(void); #endif *************** *** 374,378 **** #ifdef COUNT_ALLOCS ! extern DL_IMPORT(void) inc_count Py_PROTO((PyTypeObject *)); #endif --- 374,378 ---- #ifdef COUNT_ALLOCS ! extern DL_IMPORT(void) inc_count(PyTypeObject *); #endif *************** *** 556,561 **** } \ ! extern DL_IMPORT(void) _PyTrash_deposit_object Py_PROTO((PyObject*)); ! extern DL_IMPORT(void) _PyTrash_destroy_chain Py_PROTO(()); extern DL_IMPORT(int) _PyTrash_delete_nesting; --- 556,561 ---- } \ ! extern DL_IMPORT(void) _PyTrash_deposit_object(PyObject*); ! extern DL_IMPORT(void) _PyTrash_destroy_chain(); extern DL_IMPORT(int) _PyTrash_delete_nesting; From python-dev@python.org Sat Jul 8 01:32:07 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 7 Jul 2000 17:32:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects longobject.c,1.61,1.62 Message-ID: <200007080032.RAA02258@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv2086/src/Objects Modified Files: longobject.c Log Message: Got RID of redundant coercions in longobject.c (as spotted by Greg Stein -- thanks!). Incidentally removed all the Py_PROTO macros from object.h, as they prevented my editor from magically finding the definitions of the "coercion", "cmpfunc" and "reprfunc" typedefs that were being redundantly applied in longobject.c. Index: longobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -r1.61 -r1.62 *** longobject.c 2000/07/07 15:53:28 1.61 --- longobject.c 2000/07/08 00:32:04 1.62 *************** *** 1678,1683 **** (binaryfunc) long_xor, /*nb_xor*/ (binaryfunc) long_or, /*nb_or*/ ! (int (*) (PyObject **, PyObject **)) ! (coercion)long_coerce, /*nb_coerce*/ (unaryfunc) long_int, /*nb_int*/ (unaryfunc) long_long, /*nb_long*/ --- 1678,1682 ---- (binaryfunc) long_xor, /*nb_xor*/ (binaryfunc) long_or, /*nb_or*/ ! (coercion) long_coerce, /*nb_coerce*/ (unaryfunc) long_int, /*nb_int*/ (unaryfunc) long_long, /*nb_long*/ *************** *** 1697,1708 **** 0, /*tp_getattr*/ 0, /*tp_setattr*/ ! (int (*) (PyObject *, PyObject *)) ! (cmpfunc)long_compare, /*tp_compare*/ (reprfunc)long_repr, /*tp_repr*/ &long_as_number, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ ! (long (*) (PyObject *)) ! (hashfunc)long_hash, /*tp_hash*/ 0, /*tp_call*/ (reprfunc)long_str, /*tp_str*/ --- 1696,1705 ---- 0, /*tp_getattr*/ 0, /*tp_setattr*/ ! (cmpfunc)long_compare, /*tp_compare*/ (reprfunc)long_repr, /*tp_repr*/ &long_as_number, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ ! (hashfunc)long_hash, /*tp_hash*/ 0, /*tp_call*/ (reprfunc)long_str, /*tp_str*/ From python-dev@python.org Sat Jul 8 01:46:22 2000 From: python-dev@python.org (Greg Stein) Date: Fri, 7 Jul 2000 17:46:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include object.h,2.60,2.61 Message-ID: <200007080046.RAA02905@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv2891 Modified Files: object.h Log Message: One of the new prototypes was missing the "void" args. Index: object.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/object.h,v retrieving revision 2.60 retrieving revision 2.61 diff -C2 -r2.60 -r2.61 *** object.h 2000/07/08 00:32:04 2.60 --- object.h 2000/07/08 00:46:19 2.61 *************** *** 557,561 **** extern DL_IMPORT(void) _PyTrash_deposit_object(PyObject*); ! extern DL_IMPORT(void) _PyTrash_destroy_chain(); extern DL_IMPORT(int) _PyTrash_delete_nesting; --- 557,561 ---- extern DL_IMPORT(void) _PyTrash_deposit_object(PyObject*); ! extern DL_IMPORT(void) _PyTrash_destroy_chain(void); extern DL_IMPORT(int) _PyTrash_delete_nesting; From python-dev@python.org Sat Jul 8 03:26:50 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 7 Jul 2000 19:26:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects longobject.c,1.62,1.63 Message-ID: <200007080226.TAA20331@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv20303/python/dist/src/Objects Modified Files: longobject.c Log Message: The tail end of x_sub implicitly assumed that an unsigned short contains 16 bits. Not true on Cray J90. Index: longobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -r1.62 -r1.63 *** longobject.c 2000/07/08 00:32:04 1.62 --- longobject.c 2000/07/08 02:26:47 1.63 *************** *** 1049,1052 **** --- 1049,1053 ---- z->ob_digit[i] = borrow & MASK; borrow >>= SHIFT; + borrow &= 1; /* Keep only one sign bit */ } assert(borrow == 0); From python-dev@python.org Sat Jul 8 05:04:41 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 7 Jul 2000 21:04:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _tkinter.c,1.103,1.104 Message-ID: <200007080404.VAA05166@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv5156 Modified Files: _tkinter.c Log Message: Removed Py_PROTO, ANSI-fied sources. Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -r1.103 -r1.104 *** _tkinter.c 2000/06/30 23:50:38 1.103 --- _tkinter.c 2000/07/08 04:04:38 1.104 *************** *** 192,200 **** #include /* For EventRecord */ ! typedef int (*TclMacConvertEventPtr) Py_PROTO((EventRecord *eventPtr)); ! void Tcl_MacSetEventProc Py_PROTO((TclMacConvertEventPtr procPtr)); ! int TkMacConvertEvent Py_PROTO((EventRecord *eventPtr)); ! staticforward int PyMacConvertEvent Py_PROTO((EventRecord *eventPtr)); #if defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__) --- 192,200 ---- #include /* For EventRecord */ ! typedef int (*TclMacConvertEventPtr) (EventRecord *eventPtr); ! void Tcl_MacSetEventProc (TclMacConvertEventPtr procPtr); ! int TkMacConvertEvent (EventRecord *eventPtr); ! staticforward int PyMacConvertEvent (EventRecord *eventPtr); #if defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__) *************** *** 244,249 **** static PyObject * ! Tkinter_Error(v) ! PyObject *v; { PyErr_SetString(Tkinter_TclError, Tkapp_Result(v)); --- 244,248 ---- static PyObject * ! Tkinter_Error(PyObject *v) { PyErr_SetString(Tkinter_TclError, Tkapp_Result(v)); *************** *** 263,268 **** static void ! Sleep(milli) ! int milli; { /* XXX Too bad if you don't have select(). */ --- 262,266 ---- static void ! Sleep(int milli) { /* XXX Too bad if you don't have select(). */ *************** *** 278,284 **** static char * ! AsString(value, tmp) ! PyObject *value; ! PyObject *tmp; { if (PyString_Check(value)) --- 276,280 ---- static char * ! AsString(PyObject *value, PyObject *tmp) { if (PyString_Check(value)) *************** *** 297,302 **** static char * ! Merge(args) ! PyObject *args; { PyObject *tmp = NULL; --- 293,297 ---- static char * ! Merge(PyObject *args) { PyObject *tmp = NULL; *************** *** 370,375 **** static PyObject * ! Split(list) ! char *list; { int argc; --- 365,369 ---- static PyObject * ! Split(char *list) { int argc; *************** *** 417,422 **** #ifndef WITH_APPINIT int ! Tcl_AppInit(interp) ! Tcl_Interp *interp; { Tk_Window main; --- 411,415 ---- #ifndef WITH_APPINIT int ! Tcl_AppInit(Tcl_Interp *interp) { Tk_Window main; *************** *** 446,454 **** static TkappObject * ! Tkapp_New(screenName, baseName, className, interactive) ! char *screenName; ! char *baseName; ! char *className; ! int interactive; { TkappObject *v; --- 439,443 ---- static TkappObject * ! Tkapp_New(char *screenName, char *baseName, char *className, int interactive) { TkappObject *v; *************** *** 511,516 **** static Tcl_Obj* ! AsObj(value) ! PyObject *value; { Tcl_Obj *result; --- 500,504 ---- static Tcl_Obj* ! AsObj(PyObject *value) { Tcl_Obj *result; *************** *** 568,574 **** static PyObject * ! Tkapp_Call(self, args) ! PyObject *self; ! PyObject *args; { Tcl_Obj *objStore[ARGSZ]; --- 556,560 ---- static PyObject * ! Tkapp_Call(PyObject *self, PyObject *args) { Tcl_Obj *objStore[ARGSZ]; *************** *** 661,667 **** static PyObject * ! Tkapp_Call(self, args) ! PyObject *self; ! PyObject *args; { /* This is copied from Merge() */ --- 647,651 ---- static PyObject * ! Tkapp_Call(PyObject *self, PyObject *args) { /* This is copied from Merge() */ *************** *** 776,782 **** static PyObject * ! Tkapp_GlobalCall(self, args) ! PyObject *self; ! PyObject *args; { /* Could do the same here as for Tkapp_Call(), but this is not used --- 760,764 ---- static PyObject * ! Tkapp_GlobalCall(PyObject *self, PyObject *args) { /* Could do the same here as for Tkapp_Call(), but this is not used *************** *** 812,818 **** static PyObject * ! Tkapp_Eval(self, args) ! PyObject *self; ! PyObject *args; { char *script; --- 794,798 ---- static PyObject * ! Tkapp_Eval(PyObject *self, PyObject *args) { char *script; *************** *** 835,841 **** static PyObject * ! Tkapp_GlobalEval(self, args) ! PyObject *self; ! PyObject *args; { char *script; --- 815,819 ---- static PyObject * ! Tkapp_GlobalEval(PyObject *self, PyObject *args) { char *script; *************** *** 858,864 **** static PyObject * ! Tkapp_EvalFile(self, args) ! PyObject *self; ! PyObject *args; { char *fileName; --- 836,840 ---- static PyObject * ! Tkapp_EvalFile(PyObject *self, PyObject *args) { char *fileName; *************** *** 882,888 **** static PyObject * ! Tkapp_Record(self, args) ! PyObject *self; ! PyObject *args; { char *script; --- 858,862 ---- static PyObject * ! Tkapp_Record(PyObject *self, PyObject *args) { char *script; *************** *** 905,911 **** static PyObject * ! Tkapp_AddErrorInfo(self, args) ! PyObject *self; ! PyObject *args; { char *msg; --- 879,883 ---- static PyObject * ! Tkapp_AddErrorInfo(PyObject *self, PyObject *args) { char *msg; *************** *** 926,933 **** static PyObject * ! SetVar(self, args, flags) ! PyObject *self; ! PyObject *args; ! int flags; { char *name1, *name2, *ok, *s; --- 898,902 ---- static PyObject * ! SetVar(PyObject *self, PyObject *args, int flags) { char *name1, *name2, *ok, *s; *************** *** 970,976 **** static PyObject * ! Tkapp_SetVar(self, args) ! PyObject *self; ! PyObject *args; { return SetVar(self, args, TCL_LEAVE_ERR_MSG); --- 939,943 ---- static PyObject * ! Tkapp_SetVar(PyObject *self, PyObject *args) { return SetVar(self, args, TCL_LEAVE_ERR_MSG); *************** *** 978,984 **** static PyObject * ! Tkapp_GlobalSetVar(self, args) ! PyObject *self; ! PyObject *args; { return SetVar(self, args, TCL_LEAVE_ERR_MSG | TCL_GLOBAL_ONLY); --- 945,949 ---- static PyObject * ! Tkapp_GlobalSetVar(PyObject *self, PyObject *args) { return SetVar(self, args, TCL_LEAVE_ERR_MSG | TCL_GLOBAL_ONLY); *************** *** 988,995 **** static PyObject * ! GetVar(self, args, flags) ! PyObject *self; ! PyObject *args; ! int flags; { char *name1, *name2=NULL, *s; --- 953,957 ---- static PyObject * ! GetVar(PyObject *self, PyObject *args, int flags) { char *name1, *name2=NULL, *s; *************** *** 1015,1021 **** static PyObject * ! Tkapp_GetVar(self, args) ! PyObject *self; ! PyObject *args; { return GetVar(self, args, TCL_LEAVE_ERR_MSG); --- 977,981 ---- static PyObject * ! Tkapp_GetVar(PyObject *self, PyObject *args) { return GetVar(self, args, TCL_LEAVE_ERR_MSG); *************** *** 1023,1029 **** static PyObject * ! Tkapp_GlobalGetVar(self, args) ! PyObject *self; ! PyObject *args; { return GetVar(self, args, TCL_LEAVE_ERR_MSG | TCL_GLOBAL_ONLY); --- 983,987 ---- static PyObject * ! Tkapp_GlobalGetVar(PyObject *self, PyObject *args) { return GetVar(self, args, TCL_LEAVE_ERR_MSG | TCL_GLOBAL_ONLY); *************** *** 1033,1040 **** static PyObject * ! UnsetVar(self, args, flags) ! PyObject *self; ! PyObject *args; ! int flags; { char *name1, *name2=NULL; --- 991,995 ---- static PyObject * ! UnsetVar(PyObject *self, PyObject *args, int flags) { char *name1, *name2=NULL; *************** *** 1063,1069 **** static PyObject * ! Tkapp_UnsetVar(self, args) ! PyObject *self; ! PyObject *args; { return UnsetVar(self, args, TCL_LEAVE_ERR_MSG); --- 1018,1022 ---- static PyObject * ! Tkapp_UnsetVar(PyObject *self, PyObject *args) { return UnsetVar(self, args, TCL_LEAVE_ERR_MSG); *************** *** 1071,1077 **** static PyObject * ! Tkapp_GlobalUnsetVar(self, args) ! PyObject *self; ! PyObject *args; { return UnsetVar(self, args, TCL_LEAVE_ERR_MSG | TCL_GLOBAL_ONLY); --- 1024,1028 ---- static PyObject * ! Tkapp_GlobalUnsetVar(PyObject *self, PyObject *args) { return UnsetVar(self, args, TCL_LEAVE_ERR_MSG | TCL_GLOBAL_ONLY); *************** *** 1083,1089 **** static PyObject * ! Tkapp_GetInt(self, args) ! PyObject *self; ! PyObject *args; { char *s; --- 1034,1038 ---- static PyObject * ! Tkapp_GetInt(PyObject *self, PyObject *args) { char *s; *************** *** 1098,1104 **** static PyObject * ! Tkapp_GetDouble(self, args) ! PyObject *self; ! PyObject *args; { char *s; --- 1047,1051 ---- static PyObject * ! Tkapp_GetDouble(PyObject *self, PyObject *args) { char *s; *************** *** 1113,1119 **** static PyObject * ! Tkapp_GetBoolean(self, args) ! PyObject *self; ! PyObject *args; { char *s; --- 1060,1064 ---- static PyObject * ! Tkapp_GetBoolean(PyObject *self, PyObject *args) { char *s; *************** *** 1128,1134 **** static PyObject * ! Tkapp_ExprString(self, args) ! PyObject *self; ! PyObject *args; { char *s; --- 1073,1077 ---- static PyObject * ! Tkapp_ExprString(PyObject *self, PyObject *args) { char *s; *************** *** 1150,1156 **** static PyObject * ! Tkapp_ExprLong(self, args) ! PyObject *self; ! PyObject *args; { char *s; --- 1093,1097 ---- static PyObject * ! Tkapp_ExprLong(PyObject *self, PyObject *args) { char *s; *************** *** 1173,1179 **** static PyObject * ! Tkapp_ExprDouble(self, args) ! PyObject *self; ! PyObject *args; { char *s; --- 1114,1118 ---- static PyObject * ! Tkapp_ExprDouble(PyObject *self, PyObject *args) { char *s; *************** *** 1198,1204 **** static PyObject * ! Tkapp_ExprBoolean(self, args) ! PyObject *self; ! PyObject *args; { char *s; --- 1137,1141 ---- static PyObject * ! Tkapp_ExprBoolean(PyObject *self, PyObject *args) { char *s; *************** *** 1223,1229 **** static PyObject * ! Tkapp_SplitList(self, args) ! PyObject *self; ! PyObject *args; { char *list; --- 1160,1164 ---- static PyObject * ! Tkapp_SplitList(PyObject *self, PyObject *args) { char *list; *************** *** 1257,1263 **** static PyObject * ! Tkapp_Split(self, args) ! PyObject *self; ! PyObject *args; { char *list; --- 1192,1196 ---- static PyObject * ! Tkapp_Split(PyObject *self, PyObject *args) { char *list; *************** *** 1269,1275 **** static PyObject * ! Tkapp_Merge(self, args) ! PyObject *self; ! PyObject *args; { char *s = Merge(args); --- 1202,1206 ---- static PyObject * ! Tkapp_Merge(PyObject *self, PyObject *args) { char *s = Merge(args); *************** *** 1297,1302 **** static int ! PythonCmd_Error(interp) ! Tcl_Interp *interp; { errorInCmd = 1; --- 1228,1232 ---- static int ! PythonCmd_Error(Tcl_Interp *interp) { errorInCmd = 1; *************** *** 1310,1318 **** */ static int ! PythonCmd(clientData, interp, argc, argv) ! ClientData clientData; ! Tcl_Interp *interp; ! int argc; ! char *argv[]; { PythonCmd_ClientData *data = (PythonCmd_ClientData *)clientData; --- 1240,1244 ---- */ static int ! PythonCmd(ClientData clientData, Tcl_Interp *interp, int argc, char *argv[]) { PythonCmd_ClientData *data = (PythonCmd_ClientData *)clientData; *************** *** 1360,1365 **** static void ! PythonCmdDelete(clientData) ! ClientData clientData; { PythonCmd_ClientData *data = (PythonCmd_ClientData *)clientData; --- 1286,1290 ---- static void ! PythonCmdDelete(ClientData clientData) { PythonCmd_ClientData *data = (PythonCmd_ClientData *)clientData; *************** *** 1375,1381 **** static PyObject * ! Tkapp_CreateCommand(self, args) ! PyObject *self; ! PyObject *args; { PythonCmd_ClientData *data; --- 1300,1304 ---- static PyObject * ! Tkapp_CreateCommand(PyObject *self, PyObject *args) { PythonCmd_ClientData *data; *************** *** 1416,1422 **** static PyObject * ! Tkapp_DeleteCommand(self, args) ! PyObject *self; ! PyObject *args; { char *cmdName; --- 1339,1343 ---- static PyObject * ! Tkapp_DeleteCommand(PyObject *self, PyObject *args) { char *cmdName; *************** *** 1451,1458 **** static FileHandler_ClientData * ! NewFHCD(func, file, id) ! PyObject *func; ! PyObject *file; ! int id; { FileHandler_ClientData *p; --- 1372,1376 ---- static FileHandler_ClientData * ! NewFHCD(PyObject *func, PyObject *file, int id) { FileHandler_ClientData *p; *************** *** 1471,1476 **** static void ! DeleteFHCD(id) ! int id; { FileHandler_ClientData *p, **pp; --- 1389,1393 ---- static void ! DeleteFHCD(int id) { FileHandler_ClientData *p, **pp; *************** *** 1490,1496 **** static void ! FileHandler(clientData, mask) ! ClientData clientData; ! int mask; { FileHandler_ClientData *data = (FileHandler_ClientData *)clientData; --- 1407,1411 ---- static void ! FileHandler(ClientData clientData, int mask) { FileHandler_ClientData *data = (FileHandler_ClientData *)clientData; *************** *** 1514,1522 **** static int ! GetFileNo(file) /* Either an int >= 0 or an object with a *.fileno() method that returns an int >= 0 */ - PyObject *file; { PyObject *meth, *args, *res; --- 1429,1436 ---- static int ! GetFileNo(PyObject *file) /* Either an int >= 0 or an object with a *.fileno() method that returns an int >= 0 */ { PyObject *meth, *args, *res; *************** *** 1557,1563 **** static PyObject * ! Tkapp_CreateFileHandler(self, args) ! PyObject *self; ! PyObject *args; /* Is (file, mask, func) */ { FileHandler_ClientData *data; --- 1471,1476 ---- static PyObject * ! Tkapp_CreateFileHandler(PyObject *self, PyObject *args) ! /* args is (file, mask, func) */ { FileHandler_ClientData *data; *************** *** 1588,1594 **** static PyObject * ! Tkapp_DeleteFileHandler(self, args) ! PyObject *self; ! PyObject *args; /* Args: file */ { PyObject *file; --- 1501,1505 ---- static PyObject * ! Tkapp_DeleteFileHandler(PyObject *self, PyObject *args) { PyObject *file; *************** *** 1625,1631 **** static PyObject * ! Tktt_DeleteTimerHandler(self, args) ! PyObject *self; ! PyObject *args; { TkttObject *v = (TkttObject *)self; --- 1536,1540 ---- static PyObject * ! Tktt_DeleteTimerHandler(PyObject *self, PyObject *args) { TkttObject *v = (TkttObject *)self; *************** *** 1654,1659 **** static TkttObject * ! Tktt_New(func) ! PyObject *func; { TkttObject *v; --- 1563,1567 ---- static TkttObject * ! Tktt_New(PyObject *func) { TkttObject *v; *************** *** 1673,1678 **** static void ! Tktt_Dealloc(self) ! PyObject *self; { TkttObject *v = (TkttObject *)self; --- 1581,1585 ---- static void ! Tktt_Dealloc(PyObject *self) { TkttObject *v = (TkttObject *)self; *************** *** 1685,1690 **** static PyObject * ! Tktt_Repr(self) ! PyObject *self; { TkttObject *v = (TkttObject *)self; --- 1592,1596 ---- static PyObject * ! Tktt_Repr(PyObject *self) { TkttObject *v = (TkttObject *)self; *************** *** 1697,1703 **** static PyObject * ! Tktt_GetAttr(self, name) ! PyObject *self; ! char *name; { return Py_FindMethod(Tktt_methods, self, name); --- 1603,1607 ---- static PyObject * ! Tktt_GetAttr(PyObject *self, char *name) { return Py_FindMethod(Tktt_methods, self, name); *************** *** 1728,1733 **** static void ! TimerHandler(clientData) ! ClientData clientData; { TkttObject *v = (TkttObject *)clientData; --- 1632,1636 ---- static void ! TimerHandler(ClientData clientData) { TkttObject *v = (TkttObject *)clientData; *************** *** 1757,1763 **** static PyObject * ! Tkapp_CreateTimerHandler(self, args) ! PyObject *self; ! PyObject *args; /* Is (milliseconds, func) */ { int milliseconds; --- 1660,1664 ---- static PyObject * ! Tkapp_CreateTimerHandler(PyObject *self, PyObject *args) { int milliseconds; *************** *** 1782,1788 **** static PyObject * ! Tkapp_MainLoop(self, args) ! PyObject *self; ! PyObject *args; { int threshold = 0; --- 1683,1687 ---- static PyObject * ! Tkapp_MainLoop(PyObject *self, PyObject *args) { int threshold = 0; *************** *** 1833,1839 **** static PyObject * ! Tkapp_DoOneEvent(self, args) ! PyObject *self; ! PyObject *args; { int flags = 0; --- 1732,1736 ---- static PyObject * ! Tkapp_DoOneEvent(PyObject *self, PyObject *args) { int flags = 0; *************** *** 1850,1856 **** static PyObject * ! Tkapp_Quit(self, args) ! PyObject *self; ! PyObject *args; { --- 1747,1751 ---- static PyObject * ! Tkapp_Quit(PyObject *self, PyObject *args) { *************** *** 1864,1870 **** static PyObject * ! Tkapp_InterpAddr(self, args) ! PyObject *self; ! PyObject *args; { --- 1759,1763 ---- static PyObject * ! Tkapp_InterpAddr(PyObject *self, PyObject *args) { *************** *** 1923,1928 **** static void ! Tkapp_Dealloc(self) ! PyObject *self; { ENTER_TCL --- 1816,1820 ---- static void ! Tkapp_Dealloc(PyObject *self) { ENTER_TCL *************** *** 1934,1940 **** static PyObject * ! Tkapp_GetAttr(self, name) ! PyObject *self; ! char *name; { return Py_FindMethod(Tkapp_methods, self, name); --- 1826,1830 ---- static PyObject * ! Tkapp_GetAttr(PyObject *self, char *name) { return Py_FindMethod(Tkapp_methods, self, name); *************** *** 2113,2119 **** #ifndef MS_WINDOWS static void ! MyFileProc(clientData, mask) ! void *clientData; ! int mask; { stdin_ready = 1; --- 2003,2007 ---- #ifndef MS_WINDOWS static void ! MyFileProc(void *clientData, int mask) { stdin_ready = 1; *************** *** 2208,2215 **** /* all errors will be checked in one fell swoop in init_tkinter() */ static void ! ins_long(d, name, val) ! PyObject *d; ! char *name; ! long val; { PyObject *v = PyInt_FromLong(val); --- 2096,2100 ---- /* all errors will be checked in one fell swoop in init_tkinter() */ static void ! ins_long(PyObject *d, char *name, long val) { PyObject *v = PyInt_FromLong(val); *************** *** 2220,2227 **** } static void ! ins_string(d, name, val) ! PyObject *d; ! char *name; ! char *val; { PyObject *v = PyString_FromString(val); --- 2105,2109 ---- } static void ! ins_string(PyObject *d, char *name, char *val) { PyObject *v = PyString_FromString(val); *************** *** 2324,2329 **** static int ! PyMacConvertEvent(eventPtr) ! EventRecord *eventPtr; { WindowPtr frontwin; --- 2206,2210 ---- static int ! PyMacConvertEvent(EventRecord *eventPtr) { WindowPtr frontwin; From python-dev@python.org Sat Jul 8 05:12:11 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 7 Jul 2000 21:12:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules operator.c,2.13,2.14 Message-ID: <200007080412.VAA05563@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv5553 Modified Files: operator.c Log Message: ANSI-fy the sources. Index: operator.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/operator.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** operator.c 1998/12/04 18:49:56 2.13 --- operator.c 2000/07/08 04:12:08 2.14 *************** *** 70,89 **** #include "Python.h" ! #define spam1(OP,AOP) static PyObject *OP(s,a) PyObject *s, *a; { \ PyObject *a1; \ if(! PyArg_ParseTuple(a,"O",&a1)) return NULL; \ return AOP(a1); } ! #define spam2(OP,AOP) static PyObject *OP(s,a) PyObject *s, *a; { \ PyObject *a1, *a2; \ if(! PyArg_ParseTuple(a,"OO",&a1,&a2)) return NULL; \ return AOP(a1,a2); } ! #define spamoi(OP,AOP) static PyObject *OP(s,a) PyObject *s, *a; { \ PyObject *a1; int a2; \ if(! PyArg_ParseTuple(a,"Oi",&a1,&a2)) return NULL; \ return AOP(a1,a2); } ! #define spam2n(OP,AOP) static PyObject *OP(s,a) PyObject *s, *a; { \ PyObject *a1, *a2; \ if(! PyArg_ParseTuple(a,"OO",&a1,&a2)) return NULL; \ --- 70,89 ---- #include "Python.h" ! #define spam1(OP,AOP) static PyObject *OP(PyObject *s, PyObject *a) { \ PyObject *a1; \ if(! PyArg_ParseTuple(a,"O",&a1)) return NULL; \ return AOP(a1); } ! #define spam2(OP,AOP) static PyObject *OP(PyObject *s, PyObject *a) { \ PyObject *a1, *a2; \ if(! PyArg_ParseTuple(a,"OO",&a1,&a2)) return NULL; \ return AOP(a1,a2); } ! #define spamoi(OP,AOP) static PyObject *OP(PyObject *s, PyObject *a) { \ PyObject *a1; int a2; \ if(! PyArg_ParseTuple(a,"Oi",&a1,&a2)) return NULL; \ return AOP(a1,a2); } ! #define spam2n(OP,AOP) static PyObject *OP(PyObject *s, PyObject *a) { \ PyObject *a1, *a2; \ if(! PyArg_ParseTuple(a,"OO",&a1,&a2)) return NULL; \ *************** *** 92,96 **** return Py_None; } ! #define spam3n(OP,AOP) static PyObject *OP(s,a) PyObject *s, *a; { \ PyObject *a1, *a2, *a3; \ if(! PyArg_ParseTuple(a,"OOO",&a1,&a2,&a3)) return NULL; \ --- 92,96 ---- return Py_None; } ! #define spam3n(OP,AOP) static PyObject *OP(PyObject *s, PyObject *a) { \ PyObject *a1, *a2, *a3; \ if(! PyArg_ParseTuple(a,"OOO",&a1,&a2,&a3)) return NULL; \ *************** *** 99,103 **** return Py_None; } ! #define spami(OP,AOP) static PyObject *OP(s,a) PyObject *s, *a; { \ PyObject *a1; long r; \ if(! PyArg_ParseTuple(a,"O",&a1)) return NULL; \ --- 99,103 ---- return Py_None; } ! #define spami(OP,AOP) static PyObject *OP(PyObject *s, PyObject *a) { \ PyObject *a1; long r; \ if(! PyArg_ParseTuple(a,"O",&a1)) return NULL; \ *************** *** 105,109 **** return PyInt_FromLong(r); } ! #define spami2(OP,AOP) static PyObject *OP(s,a) PyObject *s, *a; { \ PyObject *a1, *a2; long r; \ if(! PyArg_ParseTuple(a,"OO",&a1,&a2)) return NULL; \ --- 105,109 ---- return PyInt_FromLong(r); } ! #define spami2(OP,AOP) static PyObject *OP(PyObject *s, PyObject *a) { \ PyObject *a1, *a2; long r; \ if(! PyArg_ParseTuple(a,"OO",&a1,&a2)) return NULL; \ *************** *** 141,146 **** static PyObject* ! op_getslice(s,a) ! PyObject *s, *a; { PyObject *a1; --- 141,145 ---- static PyObject* ! op_getslice(PyObject *s, PyObject *a) { PyObject *a1; *************** *** 153,158 **** static PyObject* ! op_setslice(s,a) ! PyObject *s, *a; { PyObject *a1, *a4; --- 152,156 ---- static PyObject* ! op_setslice(PyObject *s, PyObject *a) { PyObject *a1, *a4; *************** *** 170,175 **** static PyObject* ! op_delslice(s,a) ! PyObject *s, *a; { PyObject *a1; --- 168,172 ---- static PyObject* ! op_delslice(PyObject *s, PyObject *a) { PyObject *a1; *************** *** 189,199 **** #undef spam2 #ifdef HAVE_OLD_CPP ! #define spam1(OP,DOC) {"OP", OP, 1, DOC}, ! #define spam2(OP,ALTOP,DOC) {"OP", op_/**/OP, 1, DOC}, \ ! {"ALTOP", op_/**/OP, 1, DOC}, #else ! #define spam1(OP,DOC) {#OP, OP, 1, DOC}, ! #define spam2(OP,ALTOP,DOC) {#OP, op_##OP, 1, DOC}, \ ! {#ALTOP, op_##OP, 1, DOC}, #endif --- 186,196 ---- #undef spam2 #ifdef HAVE_OLD_CPP ! #define spam1(OP,DOC) {"OP", OP, METH_VARARGS, DOC}, ! #define spam2(OP,ALTOP,DOC) {"OP", op_/**/OP, METH_VARARGS, DOC}, \ ! {"ALTOP", op_/**/OP, METH_VARARGS, DOC}, #else ! #define spam1(OP,DOC) {#OP, OP, METH_VARARGS, DOC}, ! #define spam2(OP,ALTOP,DOC) {#OP, op_##OP, METH_VARARGS, DOC}, \ ! {#ALTOP, op_##OP, METH_VARARGS, DOC}, #endif From python-dev@python.org Sat Jul 8 05:17:24 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 7 Jul 2000 21:17:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include pyport.h,NONE,2.1 Python.h,2.21,2.22 longintrepr.h,2.8,2.9 Message-ID: <200007080417.VAA05755@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv5529/src/Include Modified Files: Python.h longintrepr.h Added Files: pyport.h Log Message: Cray J90 fixes for long ints. This was a convenient excuse to create the pyport.h file recently discussed! Please use new Py_ARITHMETIC_RIGHT_SHIFT when right-shifting a signed int and you *need* sign-extension. This is #define'd in pyport.h, keying off new config symbol SIGNED_RIGHT_SHIFT_ZERO_FILLS. If you're running on a platform that needs that symbol #define'd, the std tests never would have worked for you (in particular, at least test_long would have failed). The autoconfig stuff got added to Python after my Unix days, so I don't know how that works. Would someone please look into doing & testing an auto-config of the SIGNED_RIGHT_SHIFT_ZERO_FILLS symbol? It needs to be defined if & only if, e.g., (-1) >> 3 is not -1. --- NEW FILE --- /*********************************************************** Copyright (c) 2000, BeOpen.com. All rights reserved. See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ #ifndef Py_PYPORT_H #define Py_PYPORT_H 1 /************************************************************************** Symbols and macros to supply platform-independent interfaces to basic C-language operations whose spellings vary across platforms. Please try to make documentation here as clear as possible: by definition, the stuff here is trying to illuminate C's darkest corners. Config #defines referenced here: SIGNED_RIGHT_SHIFT_ZERO_FILLS Meaning: To be defined iff i>>j does not extend the sign bit when i is a signed integral type and i < 0. Used in: Py_ARITHMETIC_RIGHT_SHIFT **************************************************************************/ #ifdef __cplusplus extern "C" { #endif /* Py_ARITHMETIC_RIGHT_SHIFT * C doesn't define whether a right-shift of a signed integer sign-extends * or zero-fills. Here a macro to force sign extension: * Py_ARITHMETIC_RIGHT_SHIFT(TYPE, I, J) * Return I >> J, forcing sign extension. * Requirements: * I is of basic signed type TYPE (char, short, int, long, or long long). * TYPE is one of char, short, int, long, or long long, although long long * must not be used except on platforms that support it. * J is an integer >= 0 and strictly less than the number of bits in TYPE * (because C doesn't define what happens for J outside that range either). * Caution: * I may be evaluated more than once. */ #ifdef SIGNED_RIGHT_SHIFT_ZERO_FILLS #define Py_ARITHMETIC_RIGHT_SHIFT(TYPE, I, J) \ ((I) < 0 ? ~((~(unsigned TYPE)(I)) >> (J)) : (I) >> (J)) #else #define Py_ARITHMETIC_RIGHT_SHIFT(TYPE, I, J) ((I) >> (J)) #endif #ifdef __cplusplus } #endif #endif /* Py_PYPORT_H */ Index: Python.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** Python.h 2000/07/07 11:24:49 2.21 --- Python.h 2000/07/08 04:17:21 2.22 *************** *** 32,35 **** --- 32,36 ---- #include "patchlevel.h" #include "config.h" + #include "pyport.h" /* config.h may or may not define DL_IMPORT */ Index: longintrepr.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/longintrepr.h,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** longintrepr.h 2000/07/07 15:53:28 2.8 --- longintrepr.h 2000/07/08 04:17:21 2.9 *************** *** 19,23 **** /* Parameters of the long integer representation. These shouldn't have to be changed as C should guarantee that a short ! contains at least 16 bits, but it's made changeable any way. Note: 'digit' should be able to hold 2*MASK+1, and 'twodigits' should be able to hold the intermediate results in 'mul' --- 19,23 ---- /* Parameters of the long integer representation. These shouldn't have to be changed as C should guarantee that a short ! contains at least 16 bits, but it's made changeable anyway. Note: 'digit' should be able to hold 2*MASK+1, and 'twodigits' should be able to hold the intermediate results in 'mul' *************** *** 29,34 **** typedef unsigned short digit; typedef unsigned int wdigit; /* digit widened to parameter size */ ! typedef unsigned long twodigits; ! typedef long stwodigits; /* signed variant of twodigits */ #define SHIFT 15 --- 29,35 ---- typedef unsigned short digit; typedef unsigned int wdigit; /* digit widened to parameter size */ ! #define BASE_TWODIGITS_TYPE long ! typedef unsigned BASE_TWODIGITS_TYPE twodigits; ! typedef BASE_TWODIGITS_TYPE stwodigits; /* signed variant of twodigits */ #define SHIFT 15 From python-dev@python.org Sat Jul 8 05:17:24 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 7 Jul 2000 21:17:24 -0700 Subject: [Python-checkins] CVS: python/dist/src acconfig.h,1.31,1.32 Message-ID: <200007080417.VAA05746@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv5529/src Modified Files: acconfig.h Log Message: Cray J90 fixes for long ints. This was a convenient excuse to create the pyport.h file recently discussed! Please use new Py_ARITHMETIC_RIGHT_SHIFT when right-shifting a signed int and you *need* sign-extension. This is #define'd in pyport.h, keying off new config symbol SIGNED_RIGHT_SHIFT_ZERO_FILLS. If you're running on a platform that needs that symbol #define'd, the std tests never would have worked for you (in particular, at least test_long would have failed). The autoconfig stuff got added to Python after my Unix days, so I don't know how that works. Would someone please look into doing & testing an auto-config of the SIGNED_RIGHT_SHIFT_ZERO_FILLS symbol? It needs to be defined if & only if, e.g., (-1) >> 3 is not -1. Index: acconfig.h =================================================================== RCS file: /cvsroot/python/python/dist/src/acconfig.h,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** acconfig.h 2000/06/30 16:02:24 1.31 --- acconfig.h 2000/07/08 04:17:21 1.32 *************** *** 170,173 **** --- 170,178 ---- #undef HAVE_DYNAMIC_LOADING + /* Define if i>>j for signed int i does not extend the sign bit + when i < 0 + */ + #undef SIGNED_RIGHT_SHIFT_ZERO_FILLS + /* Leave that blank line there-- autoheader needs it! */ From python-dev@python.org Sat Jul 8 05:17:24 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 7 Jul 2000 21:17:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects intobject.c,2.45,2.46 longobject.c,1.63,1.64 Message-ID: <200007080417.VAA05756@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv5529/src/Objects Modified Files: intobject.c longobject.c Log Message: Cray J90 fixes for long ints. This was a convenient excuse to create the pyport.h file recently discussed! Please use new Py_ARITHMETIC_RIGHT_SHIFT when right-shifting a signed int and you *need* sign-extension. This is #define'd in pyport.h, keying off new config symbol SIGNED_RIGHT_SHIFT_ZERO_FILLS. If you're running on a platform that needs that symbol #define'd, the std tests never would have worked for you (in particular, at least test_long would have failed). The autoconfig stuff got added to Python after my Unix days, so I don't know how that works. Would someone please look into doing & testing an auto-config of the SIGNED_RIGHT_SHIFT_ZERO_FILLS symbol? It needs to be defined if & only if, e.g., (-1) >> 3 is not -1. Index: intobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/intobject.c,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** intobject.c 2000/06/30 23:58:05 2.45 --- intobject.c 2000/07/08 04:17:21 2.46 *************** *** 722,729 **** } else { ! if (a < 0) ! a = ~( ~(unsigned long)a >> b ); ! else ! a = (unsigned long)a >> b; } return PyInt_FromLong(a); --- 722,726 ---- } else { ! a = Py_ARITHMETIC_RIGHT_SHIFT(long, a, b); } return PyInt_FromLong(a); Index: longobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -r1.63 -r1.64 *** longobject.c 2000/07/08 02:26:47 1.63 --- longobject.c 2000/07/08 04:17:21 1.64 *************** *** 572,576 **** int basebits = 1; i = base; ! while ((i >>= 1) > 1) ++basebits; i = 0; --- 572,577 ---- int basebits = 1; i = base; ! while ((i >>= 1) > 1) ! ++basebits; i = 0; *************** *** 854,858 **** + ((twodigits)zz << SHIFT); v->ob_digit[i+k] = carry & MASK; ! carry = (carry >> SHIFT) - zz; } --- 855,861 ---- + ((twodigits)zz << SHIFT); v->ob_digit[i+k] = carry & MASK; ! carry = Py_ARITHMETIC_RIGHT_SHIFT(BASE_TWODIGITS_TYPE, ! carry, SHIFT); ! carry -= zz; } *************** *** 871,875 **** carry += v->ob_digit[i+k] + w->ob_digit[i]; v->ob_digit[i+k] = carry & MASK; ! carry >>= SHIFT; } } --- 874,880 ---- carry += v->ob_digit[i+k] + w->ob_digit[i]; v->ob_digit[i+k] = carry & MASK; ! carry = Py_ARITHMETIC_RIGHT_SHIFT( ! BASE_TWODIGITS_TYPE, ! carry, SHIFT); } } *************** *** 989,994 **** carry += a->ob_digit[i] + b->ob_digit[i]; z->ob_digit[i] = carry & MASK; - /* The following assumes unsigned shifts don't - propagate the sign bit. */ carry >>= SHIFT; } --- 994,997 ---- From python-dev@python.org Sat Jul 8 05:53:50 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 7 Jul 2000 21:53:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules operator.c,2.14,2.15 Message-ID: <200007080453.VAA06971@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6964 Modified Files: operator.c Log Message: Pretensions of the 20th century... remove old-style preprocessor hackery (/**/), leaving only new-style preprocessor hackery (##). Index: operator.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/operator.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** operator.c 2000/07/08 04:12:08 2.14 --- operator.c 2000/07/08 04:53:48 2.15 *************** *** 185,197 **** #undef spam1 #undef spam2 - #ifdef HAVE_OLD_CPP - #define spam1(OP,DOC) {"OP", OP, METH_VARARGS, DOC}, - #define spam2(OP,ALTOP,DOC) {"OP", op_/**/OP, METH_VARARGS, DOC}, \ - {"ALTOP", op_/**/OP, METH_VARARGS, DOC}, - #else #define spam1(OP,DOC) {#OP, OP, METH_VARARGS, DOC}, #define spam2(OP,ALTOP,DOC) {#OP, op_##OP, METH_VARARGS, DOC}, \ {#ALTOP, op_##OP, METH_VARARGS, DOC}, - #endif static struct PyMethodDef operator_methods[] = { --- 185,191 ---- From python-dev@python.org Sat Jul 8 06:00:10 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 7 Jul 2000 22:00:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules gdbmmodule.c,2.24,2.25 Message-ID: <200007080500.WAA07620@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv7465 Modified Files: gdbmmodule.c Log Message: ANSI-fy the sources. Convert to using PyArg_ParseTuple() as appropriate to allow method names in error messages. Re-indent to four-space indentation. Index: gdbmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gdbmmodule.c,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -r2.24 -r2.25 *** gdbmmodule.c 2000/06/30 23:58:05 2.24 --- gdbmmodule.c 2000/07/08 05:00:07 2.25 *************** *** 39,45 **** typedef struct { ! PyObject_HEAD ! int di_size; /* -1 means recompute */ ! GDBM_FILE di_dbm; } dbmobject; --- 39,45 ---- typedef struct { ! PyObject_HEAD ! int di_size; /* -1 means recompute */ ! GDBM_FILE di_dbm; } dbmobject; *************** *** 48,53 **** #define is_dbmobject(v) ((v)->ob_type == &Dbmtype) #define check_dbmobject_open(v) if ((v)->di_dbm == NULL) \ ! { PyErr_SetString(DbmError, "GDBM object has already been closed"); \ ! return NULL; } --- 48,53 ---- #define is_dbmobject(v) ((v)->ob_type == &Dbmtype) #define check_dbmobject_open(v) if ((v)->di_dbm == NULL) \ ! { PyErr_SetString(DbmError, "GDBM object has already been closed"); \ ! return NULL; } *************** *** 66,90 **** static PyObject * ! newdbmobject(file, flags, mode) ! char *file; ! int flags; ! int mode; ! { ! dbmobject *dp; ! ! dp = PyObject_New(dbmobject, &Dbmtype); ! if (dp == NULL) ! return NULL; ! dp->di_size = -1; ! errno = 0; ! if ( (dp->di_dbm = gdbm_open(file, 0, flags, mode, NULL)) == 0 ) { ! if (errno != 0) ! PyErr_SetFromErrno(DbmError); ! else ! PyErr_SetString(DbmError, gdbm_strerror(gdbm_errno)); ! Py_DECREF(dp); ! return NULL; ! } ! return (PyObject *)dp; } --- 66,87 ---- static PyObject * ! newdbmobject(char *file, int flags, int mode) ! { ! dbmobject *dp; ! ! dp = PyObject_New(dbmobject, &Dbmtype); ! if (dp == NULL) ! return NULL; ! dp->di_size = -1; ! errno = 0; ! if ((dp->di_dbm = gdbm_open(file, 0, flags, mode, NULL)) == 0) { ! if (errno != 0) ! PyErr_SetFromErrno(DbmError); ! else ! PyErr_SetString(DbmError, gdbm_strerror(gdbm_errno)); ! Py_DECREF(dp); ! return NULL; ! } ! return (PyObject *)dp; } *************** *** 92,202 **** static void ! dbm_dealloc(dp) ! register dbmobject *dp; { ! if ( dp->di_dbm ) ! gdbm_close(dp->di_dbm); ! PyObject_Del(dp); } static int ! dbm_length(dp) ! dbmobject *dp; { ! if (dp->di_dbm == NULL) { ! PyErr_SetString(DbmError, "GDBM object has already been closed"); ! return -1; } ! if ( dp->di_size < 0 ) { ! datum key,okey; ! int size; ! okey.dsize=0; ! ! size = 0; ! for ( key=gdbm_firstkey(dp->di_dbm); key.dptr; ! key = gdbm_nextkey(dp->di_dbm,okey)) { ! size++; ! if(okey.dsize) free(okey.dptr); ! okey=key; ! } ! dp->di_size = size; ! } ! return dp->di_size; } static PyObject * ! dbm_subscript(dp, key) ! dbmobject *dp; ! register PyObject *key; ! { ! PyObject *v; ! datum drec, krec; ! ! if (!PyArg_Parse(key, "s#", &krec.dptr, &krec.dsize) ) ! return NULL; ! ! if (dp->di_dbm == NULL) { ! PyErr_SetString(DbmError, ! "GDBM object has already been closed"); ! return NULL; ! } ! drec = gdbm_fetch(dp->di_dbm, krec); ! if ( drec.dptr == 0 ) { ! PyErr_SetString(PyExc_KeyError, ! PyString_AS_STRING((PyStringObject *)key)); ! return NULL; ! } ! v = PyString_FromStringAndSize(drec.dptr, drec.dsize); ! free(drec.dptr); ! return v; } static int ! dbm_ass_sub(dp, v, w) ! dbmobject *dp; ! PyObject *v, *w; ! { ! datum krec, drec; ! ! if ( !PyArg_Parse(v, "s#", &krec.dptr, &krec.dsize) ) { ! PyErr_SetString(PyExc_TypeError, ! "gdbm mappings have string indices only"); ! return -1; ! } ! if (dp->di_dbm == NULL) { ! PyErr_SetString(DbmError, ! "GDBM object has already been closed"); ! return -1; } ! dp->di_size = -1; ! if (w == NULL) { ! if ( gdbm_delete(dp->di_dbm, krec) < 0 ) { ! PyErr_SetString(PyExc_KeyError, ! PyString_AS_STRING((PyStringObject *)v)); ! return -1; ! } ! } else { ! if ( !PyArg_Parse(w, "s#", &drec.dptr, &drec.dsize) ) { ! PyErr_SetString(PyExc_TypeError, ! "gdbm mappings have string elements only"); ! return -1; ! } ! errno = 0; ! if ( gdbm_store(dp->di_dbm, krec, drec, GDBM_REPLACE) < 0 ) { ! if (errno != 0) ! PyErr_SetFromErrno(DbmError); ! else ! PyErr_SetString(DbmError, ! gdbm_strerror(gdbm_errno)); ! return -1; ! } ! } ! return 0; } static PyMappingMethods dbm_as_mapping = { ! (inquiry)dbm_length, /*mp_length*/ ! (binaryfunc)dbm_subscript, /*mp_subscript*/ ! (objobjargproc)dbm_ass_sub, /*mp_ass_subscript*/ }; --- 89,194 ---- static void ! dbm_dealloc(register dbmobject *dp) { ! if (dp->di_dbm) ! gdbm_close(dp->di_dbm); ! PyObject_Del(dp); } static int ! dbm_length(dbmobject *dp) { ! if (dp->di_dbm == NULL) { ! PyErr_SetString(DbmError, "GDBM object has already been closed"); ! return -1; ! } ! if (dp->di_size < 0) { ! datum key,okey; ! int size; ! okey.dsize=0; ! ! size = 0; ! for (key=gdbm_firstkey(dp->di_dbm); key.dptr; ! key = gdbm_nextkey(dp->di_dbm,okey)) { ! size++; ! if(okey.dsize) free(okey.dptr); ! okey=key; } ! dp->di_size = size; ! } ! return dp->di_size; } static PyObject * ! dbm_subscript(dbmobject *dp, register PyObject *key) ! { ! PyObject *v; ! datum drec, krec; ! ! if (!PyArg_Parse(key, "s#", &krec.dptr, &krec.dsize) ) ! return NULL; ! ! if (dp->di_dbm == NULL) { ! PyErr_SetString(DbmError, ! "GDBM object has already been closed"); ! return NULL; ! } ! drec = gdbm_fetch(dp->di_dbm, krec); ! if (drec.dptr == 0) { ! PyErr_SetString(PyExc_KeyError, ! PyString_AS_STRING((PyStringObject *)key)); ! return NULL; ! } ! v = PyString_FromStringAndSize(drec.dptr, drec.dsize); ! free(drec.dptr); ! return v; } static int ! dbm_ass_sub(dbmobject *dp, PyObject *v, PyObject *w) ! { ! datum krec, drec; ! ! if (!PyArg_Parse(v, "s#", &krec.dptr, &krec.dsize) ) { ! PyErr_SetString(PyExc_TypeError, ! "gdbm mappings have string indices only"); ! return -1; ! } ! if (dp->di_dbm == NULL) { ! PyErr_SetString(DbmError, ! "GDBM object has already been closed"); ! return -1; ! } ! dp->di_size = -1; ! if (w == NULL) { ! if (gdbm_delete(dp->di_dbm, krec) < 0) { ! PyErr_SetString(PyExc_KeyError, ! PyString_AS_STRING((PyStringObject *)v)); ! return -1; ! } ! } ! else { ! if (!PyArg_Parse(w, "s#", &drec.dptr, &drec.dsize)) { ! PyErr_SetString(PyExc_TypeError, ! "gdbm mappings have string elements only"); ! return -1; } ! errno = 0; ! if (gdbm_store(dp->di_dbm, krec, drec, GDBM_REPLACE) < 0) { ! if (errno != 0) ! PyErr_SetFromErrno(DbmError); ! else ! PyErr_SetString(DbmError, ! gdbm_strerror(gdbm_errno)); ! return -1; ! } ! } ! return 0; } static PyMappingMethods dbm_as_mapping = { ! (inquiry)dbm_length, /*mp_length*/ ! (binaryfunc)dbm_subscript, /*mp_subscript*/ ! (objobjargproc)dbm_ass_sub, /*mp_ass_subscript*/ }; *************** *** 206,220 **** static PyObject * ! dbm_close(dp, args) ! register dbmobject *dp; ! PyObject *args; ! { ! if ( !PyArg_NoArgs(args) ) ! return NULL; ! if ( dp->di_dbm ) ! gdbm_close(dp->di_dbm); ! dp->di_dbm = NULL; ! Py_INCREF(Py_None); ! return Py_None; } --- 198,210 ---- static PyObject * ! dbm_close(register dbmobject *dp, PyObject *args) ! { ! if (!PyArg_ParseTuple(args, ":close")) ! return NULL; ! if (dp->di_dbm) ! gdbm_close(dp->di_dbm); ! dp->di_dbm = NULL; ! Py_INCREF(Py_None); ! return Py_None; } *************** *** 224,270 **** static PyObject * ! dbm_keys(dp, args) ! register dbmobject *dp; ! PyObject *args; ! { ! register PyObject *v, *item; ! datum key, nextkey; ! int err; ! ! if (dp == NULL || !is_dbmobject(dp)) { ! PyErr_BadInternalCall(); ! return NULL; ! } ! ! if (!PyArg_NoArgs(args)) ! return NULL; ! ! check_dbmobject_open(dp); ! ! v = PyList_New(0); ! if (v == NULL) ! return NULL; ! ! key = gdbm_firstkey(dp->di_dbm); ! while (key.dptr) { ! item = PyString_FromStringAndSize(key.dptr, key.dsize); ! if (item == NULL) { ! free(key.dptr); ! Py_DECREF(v); ! return NULL; ! } ! err = PyList_Append(v, item); ! Py_DECREF(item); ! if (err != 0) { ! free(key.dptr); ! Py_DECREF(v); ! return NULL; ! } ! nextkey = gdbm_nextkey(dp->di_dbm, key); ! free(key.dptr); ! key = nextkey; ! } ! ! return v; } --- 214,256 ---- static PyObject * ! dbm_keys(register dbmobject *dp, PyObject *args) ! { ! register PyObject *v, *item; ! datum key, nextkey; ! int err; ! ! if (dp == NULL || !is_dbmobject(dp)) { ! PyErr_BadInternalCall(); ! return NULL; ! } ! if (!PyArg_ParseTuple(args, ":keys")) ! return NULL; ! ! check_dbmobject_open(dp); ! ! v = PyList_New(0); ! if (v == NULL) ! return NULL; ! ! key = gdbm_firstkey(dp->di_dbm); ! while (key.dptr) { ! item = PyString_FromStringAndSize(key.dptr, key.dsize); ! if (item == NULL) { ! free(key.dptr); ! Py_DECREF(v); ! return NULL; ! } ! err = PyList_Append(v, item); ! Py_DECREF(item); ! if (err != 0) { ! free(key.dptr); ! Py_DECREF(v); ! return NULL; ! } ! nextkey = gdbm_nextkey(dp->di_dbm, key); ! free(key.dptr); ! key = nextkey; ! } ! return v; } *************** *** 274,287 **** static PyObject * ! dbm_has_key(dp, args) ! register dbmobject *dp; ! PyObject *args; ! { ! datum key; ! ! if (!PyArg_Parse(args, "s#", &key.dptr, &key.dsize)) ! return NULL; ! check_dbmobject_open(dp); ! return PyInt_FromLong((long) gdbm_exists(dp->di_dbm, key)); } --- 260,271 ---- static PyObject * ! dbm_has_key(register dbmobject *dp, PyObject *args) ! { ! datum key; ! ! if (!PyArg_ParseTuple(args, "s#:has_key", &key.dptr, &key.dsize)) ! return NULL; ! check_dbmobject_open(dp); ! return PyInt_FromLong((long) gdbm_exists(dp->di_dbm, key)); } *************** *** 294,316 **** static PyObject * ! dbm_firstkey(dp, args) ! register dbmobject *dp; ! PyObject *args; ! { ! register PyObject *v; ! datum key; ! ! if (!PyArg_NoArgs(args)) ! return NULL; ! check_dbmobject_open(dp); ! key = gdbm_firstkey(dp->di_dbm); ! if (key.dptr) { ! v = PyString_FromStringAndSize(key.dptr, key.dsize); ! free(key.dptr); ! return v; ! } else { ! Py_INCREF(Py_None); ! return Py_None; ! } } --- 278,299 ---- static PyObject * ! dbm_firstkey(register dbmobject *dp, PyObject *args) ! { ! register PyObject *v; ! datum key; ! ! if (!PyArg_ParseTuple(args, ":firstkey")) ! return NULL; ! check_dbmobject_open(dp); ! key = gdbm_firstkey(dp->di_dbm); ! if (key.dptr) { ! v = PyString_FromStringAndSize(key.dptr, key.dsize); ! free(key.dptr); ! return v; ! } ! else { ! Py_INCREF(Py_None); ! return Py_None; ! } } *************** *** 327,349 **** static PyObject * ! dbm_nextkey(dp, args) ! register dbmobject *dp; ! PyObject *args; ! { ! register PyObject *v; ! datum key, nextkey; ! ! if (!PyArg_Parse(args, "s#", &key.dptr, &key.dsize)) ! return NULL; ! check_dbmobject_open(dp); ! nextkey = gdbm_nextkey(dp->di_dbm, key); ! if (nextkey.dptr) { ! v = PyString_FromStringAndSize(nextkey.dptr, nextkey.dsize); ! free(nextkey.dptr); ! return v; ! } else { ! Py_INCREF(Py_None); ! return Py_None; ! } } --- 310,331 ---- static PyObject * ! dbm_nextkey(register dbmobject *dp, PyObject *args) ! { ! register PyObject *v; ! datum key, nextkey; ! ! if (!PyArg_ParseTuple(args, "s#:nextkey", &key.dptr, &key.dsize)) ! return NULL; ! check_dbmobject_open(dp); ! nextkey = gdbm_nextkey(dp->di_dbm, key); ! if (nextkey.dptr) { ! v = PyString_FromStringAndSize(nextkey.dptr, nextkey.dsize); ! free(nextkey.dptr); ! return v; ! } ! else { ! Py_INCREF(Py_None); ! return Py_None; ! } } *************** *** 357,377 **** static PyObject * ! dbm_reorganize(dp, args) ! register dbmobject *dp; ! PyObject *args; ! { ! if (!PyArg_NoArgs(args)) ! return NULL; ! check_dbmobject_open(dp); ! errno = 0; ! if (gdbm_reorganize(dp->di_dbm) < 0) { ! if (errno != 0) ! PyErr_SetFromErrno(DbmError); ! else ! PyErr_SetString(DbmError, gdbm_strerror(gdbm_errno)); ! return NULL; ! } ! Py_INCREF(Py_None); ! return Py_None; } --- 339,357 ---- static PyObject * ! dbm_reorganize(register dbmobject *dp, PyObject *args) ! { ! if (!PyArg_ParseTuple(args, ":reorganize")) ! return NULL; ! check_dbmobject_open(dp); ! errno = 0; ! if (gdbm_reorganize(dp->di_dbm) < 0) { ! if (errno != 0) ! PyErr_SetFromErrno(DbmError); ! else ! PyErr_SetString(DbmError, gdbm_strerror(gdbm_errno)); ! return NULL; ! } ! Py_INCREF(Py_None); ! return Py_None; } *************** *** 382,439 **** static PyObject * ! dbm_sync(dp, args) ! register dbmobject *dp; ! PyObject *args; ! { ! if (!PyArg_NoArgs(args)) ! return NULL; ! check_dbmobject_open(dp); ! gdbm_sync(dp->di_dbm); ! Py_INCREF(Py_None); ! return Py_None; } static PyMethodDef dbm_methods[] = { ! {"close", (PyCFunction)dbm_close, 0, dbm_close__doc__}, ! {"keys", (PyCFunction)dbm_keys, 0, dbm_keys__doc__}, ! {"has_key", (PyCFunction)dbm_has_key, 0, dbm_has_key__doc__}, ! {"firstkey", (PyCFunction)dbm_firstkey, 0, dbm_firstkey__doc__}, ! {"nextkey", (PyCFunction)dbm_nextkey, 0, dbm_nextkey__doc__}, ! {"reorganize", (PyCFunction)dbm_reorganize, 0, dbm_reorganize__doc__}, ! {"sync", (PyCFunction)dbm_sync, 0, dbm_sync__doc__}, ! {NULL, NULL} /* sentinel */ }; static PyObject * ! dbm_getattr(dp, name) ! dbmobject *dp; ! char *name; { ! return Py_FindMethod(dbm_methods, (PyObject *)dp, name); } static PyTypeObject Dbmtype = { ! PyObject_HEAD_INIT(0) ! 0, ! "gdbm", ! sizeof(dbmobject), ! 0, ! (destructor)dbm_dealloc, /*tp_dealloc*/ ! 0, /*tp_print*/ ! (getattrfunc)dbm_getattr, /*tp_getattr*/ ! 0, /*tp_setattr*/ ! 0, /*tp_compare*/ ! 0, /*tp_repr*/ ! 0, /*tp_as_number*/ ! 0, /*tp_as_sequence*/ ! &dbm_as_mapping, /*tp_as_mapping*/ ! 0, /*tp_hash*/ ! 0, /*tp_call*/ ! 0, /*tp_str*/ ! 0, /*tp_getattro*/ ! 0, /*tp_setattro*/ ! 0, /*tp_as_buffer*/ ! 0, /*tp_xxx4*/ ! gdbm_object__doc__, /*tp_doc*/ }; --- 362,415 ---- static PyObject * ! dbm_sync(register dbmobject *dp, PyObject *args) ! { ! if (!PyArg_ParseTuple(args, ":sync")) ! return NULL; ! check_dbmobject_open(dp); ! gdbm_sync(dp->di_dbm); ! Py_INCREF(Py_None); ! return Py_None; } static PyMethodDef dbm_methods[] = { ! {"close", (PyCFunction)dbm_close, METH_VARARGS, dbm_close__doc__}, ! {"keys", (PyCFunction)dbm_keys, METH_VARARGS, dbm_keys__doc__}, ! {"has_key", (PyCFunction)dbm_has_key, METH_VARARGS, dbm_has_key__doc__}, ! {"firstkey", (PyCFunction)dbm_firstkey,METH_VARARGS, dbm_firstkey__doc__}, ! {"nextkey", (PyCFunction)dbm_nextkey, METH_VARARGS, dbm_nextkey__doc__}, ! {"reorganize",(PyCFunction)dbm_reorganize,METH_VARARGS, dbm_reorganize__doc__}, ! {"sync", (PyCFunction)dbm_sync, METH_VARARGS, dbm_sync__doc__}, ! {NULL, NULL} /* sentinel */ }; static PyObject * ! dbm_getattr(dbmobject *dp, char *name) { ! return Py_FindMethod(dbm_methods, (PyObject *)dp, name); } static PyTypeObject Dbmtype = { ! PyObject_HEAD_INIT(0) ! 0, ! "gdbm", ! sizeof(dbmobject), ! 0, ! (destructor)dbm_dealloc, /*tp_dealloc*/ ! 0, /*tp_print*/ ! (getattrfunc)dbm_getattr, /*tp_getattr*/ ! 0, /*tp_setattr*/ ! 0, /*tp_compare*/ ! 0, /*tp_repr*/ ! 0, /*tp_as_number*/ ! 0, /*tp_as_sequence*/ ! &dbm_as_mapping, /*tp_as_mapping*/ ! 0, /*tp_hash*/ ! 0, /*tp_call*/ ! 0, /*tp_str*/ ! 0, /*tp_getattro*/ ! 0, /*tp_setattro*/ ! 0, /*tp_as_buffer*/ ! 0, /*tp_xxx4*/ ! gdbm_object__doc__, /*tp_doc*/ }; *************** *** 461,514 **** static PyObject * ! dbmopen(self, args) ! PyObject *self; ! PyObject *args; ! { ! char *name; ! char *flags = "r "; ! int iflags; ! int mode = 0666; ! ! if ( !PyArg_ParseTuple(args, "s|si:open", &name, &flags, &mode) ) ! return NULL; ! switch (flags[0]) { ! case 'r': ! iflags = GDBM_READER; ! break; ! case 'w': ! iflags = GDBM_WRITER; ! break; ! case 'c': ! iflags = GDBM_WRCREAT; ! break; ! case 'n': ! iflags = GDBM_NEWDB; ! break; ! default: ! PyErr_SetString(DbmError, ! "Flags should be one of 'r', 'w', 'c' or 'n'"); ! return NULL; ! } ! if (flags[1] == 'f') ! iflags |= GDBM_FAST; ! return newdbmobject(name, iflags, mode); } static PyMethodDef dbmmodule_methods[] = { ! { "open", (PyCFunction)dbmopen, 1, dbmopen__doc__}, ! { 0, 0 }, }; DL_EXPORT(void) initgdbm() { ! PyObject *m, *d; ! Dbmtype.ob_type = &PyType_Type; ! m = Py_InitModule4("gdbm", dbmmodule_methods, ! gdbmmodule__doc__, (PyObject *)NULL, ! PYTHON_API_VERSION); ! d = PyModule_GetDict(m); ! DbmError = PyErr_NewException("gdbm.error", NULL, NULL); ! if (DbmError != NULL) ! PyDict_SetItemString(d, "error", DbmError); } --- 437,488 ---- static PyObject * ! dbmopen(PyObject *self, PyObject *args) ! { ! char *name; ! char *flags = "r "; ! int iflags; ! int mode = 0666; ! ! if (!PyArg_ParseTuple(args, "s|si:open", &name, &flags, &mode)) ! return NULL; ! switch (flags[0]) { ! case 'r': ! iflags = GDBM_READER; ! break; ! case 'w': ! iflags = GDBM_WRITER; ! break; ! case 'c': ! iflags = GDBM_WRCREAT; ! break; ! case 'n': ! iflags = GDBM_NEWDB; ! break; ! default: ! PyErr_SetString(DbmError, ! "Flags should be one of 'r', 'w', 'c' or 'n'"); ! return NULL; ! } ! if (flags[1] == 'f') ! iflags |= GDBM_FAST; ! return newdbmobject(name, iflags, mode); } static PyMethodDef dbmmodule_methods[] = { ! { "open", (PyCFunction)dbmopen, METH_VARARGS, dbmopen__doc__}, ! { 0, 0 }, }; DL_EXPORT(void) initgdbm() { ! PyObject *m, *d; ! Dbmtype.ob_type = &PyType_Type; ! m = Py_InitModule4("gdbm", dbmmodule_methods, ! gdbmmodule__doc__, (PyObject *)NULL, ! PYTHON_API_VERSION); ! d = PyModule_GetDict(m); ! DbmError = PyErr_NewException("gdbm.error", NULL, NULL); ! if (DbmError != NULL) ! PyDict_SetItemString(d, "error", DbmError); } From python-dev@python.org Sat Jul 8 06:18:57 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 7 Jul 2000 22:18:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tut tut.tex,1.108,1.109 Message-ID: <200007080518.WAA14610@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tut In directory slayer.i.sourceforge.net:/tmp/cvs-serv14603/tut Modified Files: tut.tex Log Message: Markup improvements in sections relating to interactive behavior. Clarify some of the details of readline-related configuration. Index: tut.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -r1.108 -r1.109 *** tut.tex 2000/06/30 16:06:19 1.108 --- tut.tex 2000/07/08 05:18:54 1.109 *************** *** 175,183 **** \file{/usr/local/python} is a popular alternative location.) ! Typing an EOF character (Control-D on \UNIX{}, Control-Z on DOS ! or Windows) at the primary prompt causes the interpreter to exit with ! a zero exit status. If that doesn't work, you can exit the ! interpreter by typing the following commands: \samp{import sys; ! sys.exit()}. The interpreter's line-editing features usually aren't very --- 175,183 ---- \file{/usr/local/python} is a popular alternative location.) ! Typing an \EOF{} character (\kbd{Control-D} on \UNIX, ! \kbd{Control-Z} on DOS or Windows) at the primary prompt causes the ! interpreter to exit with a zero exit status. If that doesn't work, ! you can exit the interpreter by typing the following commands: ! \samp{import sys; sys.exit()}. The interpreter's line-editing features usually aren't very *************** *** 187,194 **** quickest check to see whether command line editing is supported is typing Control-P to the first Python prompt you get. If it beeps, you ! have command line editing; see Appendix A for an introduction to the ! keys. If nothing appears to happen, or if \code{\^P} is echoed, ! command line editing isn't available; you'll only be able to use ! backspace to remove characters from the current line. The interpreter operates somewhat like the \UNIX{} shell: when called --- 187,195 ---- quickest check to see whether command line editing is supported is typing Control-P to the first Python prompt you get. If it beeps, you ! have command line editing; see Appendix \ref{interacting} for an ! introduction to the keys. If nothing appears to happen, or if ! \code{\^P} is echoed, command line editing isn't available; you'll ! only be able to use backspace to remove characters from the current ! line. The interpreter operates somewhat like the \UNIX{} shell: when called *************** *** 325,337 **** If you want to read an additional start-up file from the current directory, you can program this in the global start-up file, ! e.g.\ \samp{execfile('.pythonrc.py')}\indexii{.pythonrc.py}{file}. If ! you want to use the startup file in a script, you must do this ! explicitly in the script: \begin{verbatim} import os ! if os.environ.get('PYTHONSTARTUP') \ ! and os.path.isfile(os.environ['PYTHONSTARTUP']): ! execfile(os.environ['PYTHONSTARTUP']) \end{verbatim} --- 326,338 ---- If you want to read an additional start-up file from the current directory, you can program this in the global start-up file, ! e.g.\ \samp{if os.path.isfile('.pythonrc.py'): ! execfile('.pythonrc.py')}. If you want to use the startup file in a ! script, you must do this explicitly in the script: \begin{verbatim} import os ! filename = os.environ.get('PYTHONSTARTUP') ! if filename and os.path.isfile(filename): ! execfile(filename) \end{verbatim} *************** *** 3923,3933 **** prints a primary or secondary prompt. The current line can be edited using the conventional Emacs control characters. The most important ! of these are: C-A (Control-A) moves the cursor to the beginning of the ! line, C-E to the end, C-B moves it one position to the left, C-F to ! the right. Backspace erases the character to the left of the cursor, ! C-D the character to its right. C-K kills (erases) the rest of the ! line to the right of the cursor, C-Y yanks back the last killed ! string. C-underscore undoes the last change you made; it can be ! repeated for cumulative effect. \section{History Substitution \label{history}} --- 3924,3935 ---- prints a primary or secondary prompt. The current line can be edited using the conventional Emacs control characters. The most important ! of these are: \kbd{C-A} (Control-A) moves the cursor to the beginning ! of the line, \kbd{C-E} to the end, \kbd{C-B} moves it one position to ! the left, \kbd{C-F} to the right. Backspace erases the character to ! the left of the cursor, \kbd{C-D} the character to its right. ! \kbd{C-K} kills (erases) the rest of the line to the right of the ! cursor, \kbd{C-Y} yanks back the last killed string. ! \kbd{C-underscore} undoes the last change you made; it can be repeated ! for cumulative effect. \section{History Substitution \label{history}} *************** *** 3935,3944 **** History substitution works as follows. All non-empty input lines issued are saved in a history buffer, and when a new prompt is given ! you are positioned on a new line at the bottom of this buffer. C-P ! moves one line up (back) in the history buffer, C-N moves one down. ! Any line in the history buffer can be edited; an asterisk appears in ! front of the prompt to mark a line as modified. Pressing the Return ! key passes the current line to the interpreter. C-R starts an ! incremental reverse search; C-S starts a forward search. \section{Key Bindings \label{keyBindings}} --- 3937,3947 ---- History substitution works as follows. All non-empty input lines issued are saved in a history buffer, and when a new prompt is given ! you are positioned on a new line at the bottom of this buffer. ! \kbd{C-P} moves one line up (back) in the history buffer, ! \kbd{C-N} moves one down. Any line in the history buffer can be ! edited; an asterisk appears in front of the prompt to mark a line as ! modified. Pressing the \kbd{Return} key passes the current line to ! the interpreter. \kbd{C-R} starts an incremental reverse search; ! \kbd{C-S} starts a forward search. \section{Key Bindings \label{keyBindings}} *************** *** 3946,3950 **** The key bindings and some other parameters of the Readline library can be customized by placing commands in an initialization file called ! \file{\$HOME/.inputrc}. Key bindings have the form \begin{verbatim} --- 3949,3953 ---- The key bindings and some other parameters of the Readline library can be customized by placing commands in an initialization file called ! \file{\~{}/.inputrc}. Key bindings have the form \begin{verbatim} *************** *** 3969,3974 **** --- 3972,3979 ---- # I prefer vi-style editing: set editing-mode vi + # Edit using a single line: set horizontal-scroll-mode On + # Rebind some keys: Meta-h: backward-kill-word *************** *** 3977,3995 **** \end{verbatim} ! Note that the default binding for TAB in Python is to insert a TAB ! instead of Readline's default filename completion function. If you ! insist, you can override this by putting \begin{verbatim} ! TAB: complete \end{verbatim} ! in your \file{\$HOME/.inputrc}. (Of course, this makes it hard to type ! indented continuation lines...) Automatic completion of variable and module names is optionally available. To enable it in the interpreter's interactive mode, add ! the following to your \file{\$HOME/.pythonrc.py} file:% ! \indexii{.pythonrc.py}{file} \refstmodindex{rlcompleter}\refbimodindex{readline} --- 3982,4002 ---- \end{verbatim} ! Note that the default binding for \kbd{Tab} in Python is to insert a ! \kbd{Tab} character instead of Readline's default filename completion ! function. If you insist, you can override this by putting \begin{verbatim} ! Tab: complete \end{verbatim} ! in your \file{\~{}/.inputrc}. (Of course, this makes it harder to ! type indented continuation lines.) Automatic completion of variable and module names is optionally available. To enable it in the interpreter's interactive mode, add ! the following to your startup file:\footnote{ ! Python will execute the contents of a file identified by the ! \envvar{PYTHONSTARTUP} environment variable when you start an ! interactive interpreter.} \refstmodindex{rlcompleter}\refbimodindex{readline} *************** *** 4011,4023 **** \section{Commentary \label{commentary}} ! This facility is an enormous step forward compared to previous ! versions of the interpreter; however, some wishes are left: It would ! be nice if the proper indentation were suggested on continuation lines ! (the parser knows if an indent token is required next). The ! completion mechanism might use the interpreter's symbol table. A ! command to check (or even suggest) matching parentheses, quotes etc. ! would also be useful. - % XXX Lele Gaifax's readline module, which adds name completion... \end{document} --- 4018,4029 ---- \section{Commentary \label{commentary}} ! This facility is an enormous step forward compared to earlier versions ! of the interpreter; however, some wishes are left: It would be nice if ! the proper indentation were suggested on continuation lines (the ! parser knows if an indent token is required next). The completion ! mechanism might use the interpreter's symbol table. A command to ! check (or even suggest) matching parentheses, quotes, etc., would also ! be useful. \end{document} From python-dev@python.org Sat Jul 8 07:06:01 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 7 Jul 2000 23:06:01 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules linuxaudiodev.c,2.2,2.3 Message-ID: <200007080606.XAA22987@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv22913 Modified Files: linuxaudiodev.c Log Message: Add method names to PyArg_ParseTuple() calls for better error messages. Convert to four-space indents. Index: linuxaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/linuxaudiodev.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** linuxaudiodev.c 2000/05/03 23:44:32 2.2 --- linuxaudiodev.c 2000/07/08 06:05:58 2.3 *************** *** 33,54 **** typedef struct { ! PyObject_HEAD; ! int x_fd; /* The open file */ ! int x_icount; /* Input count */ ! int x_ocount; /* Output count */ ! uint32_t x_afmts; /* Supported audio formats */ } lad_t; static struct { ! int a_bps; ! uint32_t a_fmt; } audio_types[] = { ! { 8, AFMT_MU_LAW }, ! { 8, AFMT_U8 }, ! { 8, AFMT_S8 }, ! { 16, AFMT_U16_BE }, ! { 16, AFMT_U16_LE }, ! { 16, AFMT_S16_BE }, ! { 16, AFMT_S16_LE }, }; --- 33,54 ---- typedef struct { ! PyObject_HEAD; ! int x_fd; /* The open file */ ! int x_icount; /* Input count */ ! int x_ocount; /* Output count */ ! uint32_t x_afmts; /* Supported audio formats */ } lad_t; static struct { ! int a_bps; ! uint32_t a_fmt; } audio_types[] = { ! { 8, AFMT_MU_LAW }, ! { 8, AFMT_U8 }, ! { 8, AFMT_S8 }, ! { 16, AFMT_U16_BE }, ! { 16, AFMT_U16_LE }, ! { 16, AFMT_S16_BE }, ! { 16, AFMT_S16_LE }, }; *************** *** 61,116 **** newladobject(PyObject *arg) { ! lad_t *xp; ! int fd, afmts, imode; ! char *mode; ! char *basedev; ! char *ctldev; ! char *opendev; ! ! /* Check arg for r/w/rw */ ! if (!PyArg_ParseTuple(arg, "s", &mode)) return NULL; ! if (strcmp(mode, "r") == 0) ! imode = 0; ! else if (strcmp(mode, "w") == 0) ! imode = 1; ! else { ! PyErr_SetString(LinuxAudioError, "Mode should be one of 'r', or 'w'"); ! return NULL; ! } ! ! /* Open the correct device. The base device name comes from the ! * AUDIODEV environment variable first, then /dev/audio. The ! * control device tacks "ctl" onto the base device name. ! */ ! basedev = getenv("AUDIODEV"); ! if (!basedev) ! basedev = "/dev/dsp"; ! ! if ((fd = open(basedev, imode)) < 0) { ! PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); ! return NULL; ! } ! ! if (imode) { ! if (ioctl(fd, SNDCTL_DSP_NONBLOCK, NULL) < 0) { ! PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); ! return NULL; ! } ! } ! ! if (ioctl(fd, SNDCTL_DSP_GETFMTS, &afmts) < 0) { ! PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); ! return NULL; ! } ! ! /* Create and initialize the object */ ! if ((xp = PyObject_New(lad_t, &Ladtype)) == NULL) { ! close(fd); ! return NULL; ! } ! xp->x_fd = fd; ! xp->x_icount = xp->x_ocount = 0; ! xp->x_afmts = afmts; ! return xp; } --- 61,111 ---- newladobject(PyObject *arg) { ! lad_t *xp; ! int fd, afmts, imode; ! char *mode; ! char *basedev; ! char *ctldev; ! char *opendev; ! ! /* Check arg for r/w/rw */ ! if (!PyArg_ParseTuple(arg, "s:open", &mode)) return NULL; ! if (strcmp(mode, "r") == 0) ! imode = 0; ! else if (strcmp(mode, "w") == 0) ! imode = 1; ! else { ! PyErr_SetString(LinuxAudioError, "Mode should be one of 'r', or 'w'"); ! return NULL; ! } ! ! /* Open the correct device. The base device name comes from the ! * AUDIODEV environment variable first, then /dev/audio. The ! * control device tacks "ctl" onto the base device name. ! */ ! basedev = getenv("AUDIODEV"); ! if (!basedev) ! basedev = "/dev/dsp"; ! ! if ((fd = open(basedev, imode)) < 0) { ! PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); ! return NULL; ! } ! if (imode && ioctl(fd, SNDCTL_DSP_NONBLOCK, NULL) < 0) { ! PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); ! return NULL; ! } ! if (ioctl(fd, SNDCTL_DSP_GETFMTS, &afmts) < 0) { ! PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); ! return NULL; ! } ! /* Create and initialize the object */ ! if ((xp = PyObject_New(lad_t, &Ladtype)) == NULL) { ! close(fd); ! return NULL; ! } ! xp->x_fd = fd; ! xp->x_icount = xp->x_ocount = 0; ! xp->x_afmts = afmts; ! return xp; } *************** *** 118,123 **** lad_dealloc(lad_t *xp) { ! close(xp->x_fd); ! PyObject_Del(xp); } --- 113,118 ---- lad_dealloc(lad_t *xp) { ! close(xp->x_fd); ! PyObject_Del(xp); } *************** *** 125,149 **** lad_read(lad_t *self, PyObject *args) { ! int size, count; ! char *cp; ! PyObject *rv; ! if (!PyArg_ParseTuple(args, "i", &size)) return NULL; ! rv = PyString_FromStringAndSize(NULL, size); ! if (rv == NULL) return NULL; ! ! if (!(cp = PyString_AsString(rv))) { ! Py_DECREF(rv); ! return NULL; ! } ! ! if ((count = read(self->x_fd, cp, size)) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! Py_DECREF(rv); ! return NULL; ! } ! ! self->x_icount += count; ! return rv; } --- 120,144 ---- lad_read(lad_t *self, PyObject *args) { ! int size, count; ! char *cp; ! PyObject *rv; ! if (!PyArg_ParseTuple(args, "i:read", &size)) ! return NULL; ! rv = PyString_FromStringAndSize(NULL, size); ! if (rv == NULL) ! return NULL; ! ! if (!(cp = PyString_AsString(rv))) { ! Py_DECREF(rv); ! return NULL; ! } ! if ((count = read(self->x_fd, cp, size)) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! Py_DECREF(rv); ! return NULL; ! } ! self->x_icount += count; ! return rv; } *************** *** 151,170 **** lad_write(lad_t *self, PyObject *args) { ! char *cp; ! int rv, size; ! if (!PyArg_ParseTuple(args, "s#", &cp, &size)) return NULL; ! while (size > 0) { ! if ((rv = write(self->x_fd, cp, size)) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! self->x_ocount += rv; ! size -= rv; ! cp += rv; ! } ! Py_INCREF(Py_None); ! return Py_None; } --- 146,165 ---- lad_write(lad_t *self, PyObject *args) { ! char *cp; ! int rv, size; ! if (!PyArg_ParseTuple(args, "s#:write", &cp, &size)) return NULL; ! while (size > 0) { ! if ((rv = write(self->x_fd, cp, size)) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! self->x_ocount += rv; ! size -= rv; ! cp += rv; ! } ! Py_INCREF(Py_None); ! return Py_None; } *************** *** 172,182 **** lad_close(lad_t *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, "")) return NULL; ! if (self->x_fd >= 0) { ! close(self->x_fd); ! self->x_fd = -1; ! } ! Py_INCREF(Py_None); ! return Py_None; } --- 167,177 ---- lad_close(lad_t *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":close")) return NULL; ! if (self->x_fd >= 0) { ! close(self->x_fd); ! self->x_fd = -1; ! } ! Py_INCREF(Py_None); ! return Py_None; } *************** *** 184,189 **** lad_fileno(lad_t *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, "")) return NULL; ! return PyInt_FromLong(self->x_fd); } --- 179,184 ---- lad_fileno(lad_t *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":fileno")) return NULL; ! return PyInt_FromLong(self->x_fd); } *************** *** 191,238 **** lad_setparameters(lad_t *self, PyObject *args) { ! int rate, ssize, nchannels, stereo, n, fmt; ! if (!PyArg_ParseTuple(args, "iiii", &rate, &ssize, &nchannels, &fmt)) ! return NULL; ! ! if (rate < 0 || ssize < 0 || (nchannels != 1 && nchannels != 2)) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! ! if (ioctl(self->x_fd, SOUND_PCM_WRITE_RATE, &rate) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! ! if (ioctl(self->x_fd, SNDCTL_DSP_SAMPLESIZE, &ssize) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! ! stereo = (nchannels == 1)? 0: (nchannels == 2)? 1: -1; ! if (ioctl(self->x_fd, SNDCTL_DSP_STEREO, &stereo) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! ! for (n = 0; n != sizeof(audio_types) / sizeof(audio_types[0]); n++) ! if (fmt == audio_types[n].a_fmt) ! break; ! ! if (n == sizeof(audio_types) / sizeof(audio_types[0]) || ! audio_types[n].a_bps != ssize || ! (self->x_afmts & audio_types[n].a_fmt) == 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! ! if (ioctl(self->x_fd, SNDCTL_DSP_SETFMT, &audio_types[n].a_fmt) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! Py_INCREF(Py_None); ! return Py_None; } --- 186,228 ---- lad_setparameters(lad_t *self, PyObject *args) { ! int rate, ssize, nchannels, stereo, n, fmt; ! if (!PyArg_ParseTuple(args, "iiii:setparameters", ! &rate, &ssize, &nchannels, &fmt)) ! return NULL; ! if (rate < 0 || ssize < 0 || (nchannels != 1 && nchannels != 2)) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! if (ioctl(self->x_fd, SOUND_PCM_WRITE_RATE, &rate) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! if (ioctl(self->x_fd, SNDCTL_DSP_SAMPLESIZE, &ssize) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! stereo = (nchannels == 1)? 0: (nchannels == 2)? 1: -1; ! if (ioctl(self->x_fd, SNDCTL_DSP_STEREO, &stereo) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! for (n = 0; n != sizeof(audio_types) / sizeof(audio_types[0]); n++) ! if (fmt == audio_types[n].a_fmt) ! break; ! ! if (n == sizeof(audio_types) / sizeof(audio_types[0]) || ! audio_types[n].a_bps != ssize || ! (self->x_afmts & audio_types[n].a_fmt) == 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! if (ioctl(self->x_fd, SNDCTL_DSP_SETFMT, &audio_types[n].a_fmt) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! Py_INCREF(Py_None); ! return Py_None; } *************** *** 240,296 **** _ssize(lad_t *self, int *nchannels, int *ssize) { ! int fmt; ! fmt = 0; ! if (ioctl(self->x_fd, SNDCTL_DSP_SETFMT, &fmt) < 0) ! return -errno; ! ! switch (fmt) { ! case AFMT_MU_LAW: ! case AFMT_A_LAW: ! case AFMT_U8: ! case AFMT_S8: ! *ssize = sizeof(char); ! break; ! case AFMT_S16_LE: ! case AFMT_S16_BE: ! case AFMT_U16_LE: ! case AFMT_U16_BE: ! *ssize = sizeof(short); ! break; ! case AFMT_MPEG: ! case AFMT_IMA_ADPCM: ! default: ! return -EOPNOTSUPP; ! } ! ! *nchannels = 0; ! if (ioctl(self->x_fd, SNDCTL_DSP_CHANNELS, nchannels) < 0) ! return -errno; ! return 0; } /* bufsize returns the size of the hardware audio buffer in number ! of samples */ static PyObject * lad_bufsize(lad_t *self, PyObject *args) { ! audio_buf_info ai; ! int nchannels, ssize; ! ! if (!PyArg_ParseTuple(args, "")) return NULL; ! if (_ssize(self, &nchannels, &ssize) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! ! if (ioctl(self->x_fd, SNDCTL_DSP_GETOSPACE, &ai) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! return PyInt_FromLong((ai.fragstotal * ai.fragsize) / (nchannels * ssize)); } --- 230,283 ---- _ssize(lad_t *self, int *nchannels, int *ssize) { ! int fmt; ! fmt = 0; ! if (ioctl(self->x_fd, SNDCTL_DSP_SETFMT, &fmt) < 0) ! return -errno; ! ! switch (fmt) { ! case AFMT_MU_LAW: ! case AFMT_A_LAW: ! case AFMT_U8: ! case AFMT_S8: ! *ssize = sizeof(char); ! break; ! case AFMT_S16_LE: ! case AFMT_S16_BE: ! case AFMT_U16_LE: ! case AFMT_U16_BE: ! *ssize = sizeof(short); ! break; ! case AFMT_MPEG: ! case AFMT_IMA_ADPCM: ! default: ! return -EOPNOTSUPP; ! } ! *nchannels = 0; ! if (ioctl(self->x_fd, SNDCTL_DSP_CHANNELS, nchannels) < 0) ! return -errno; ! return 0; } /* bufsize returns the size of the hardware audio buffer in number ! of samples */ static PyObject * lad_bufsize(lad_t *self, PyObject *args) { ! audio_buf_info ai; ! int nchannels, ssize; ! if (!PyArg_ParseTuple(args, ":bufsize")) return NULL; ! if (_ssize(self, &nchannels, &ssize) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! if (ioctl(self->x_fd, SNDCTL_DSP_GETOSPACE, &ai) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! return PyInt_FromLong((ai.fragstotal * ai.fragsize) / (nchannels * ssize)); } *************** *** 300,343 **** lad_obufcount(lad_t *self, PyObject *args) { ! audio_buf_info ai; ! int nchannels, ssize; ! if (!PyArg_ParseTuple(args, "")) return NULL; ! if (_ssize(self, &nchannels, &ssize) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! ! if (ioctl(self->x_fd, SNDCTL_DSP_GETOSPACE, &ai) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! ! return PyInt_FromLong((ai.fragstotal * ai.fragsize - ai.bytes) / ! (ssize * nchannels)); } /* obufcount returns the number of samples that can be played without ! blocking */ static PyObject * lad_obuffree(lad_t *self, PyObject *args) { ! audio_buf_info ai; ! int nchannels, ssize; ! ! if (!PyArg_ParseTuple(args, "")) return NULL; ! if (_ssize(self, &nchannels, &ssize) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! ! if (ioctl(self->x_fd, SNDCTL_DSP_GETOSPACE, &ai) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! return PyInt_FromLong(ai.bytes / (ssize * nchannels)); } --- 287,328 ---- lad_obufcount(lad_t *self, PyObject *args) { ! audio_buf_info ai; ! int nchannels, ssize; ! if (!PyArg_ParseTuple(args, ":obufcount")) ! return NULL; ! if (_ssize(self, &nchannels, &ssize) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! if (ioctl(self->x_fd, SNDCTL_DSP_GETOSPACE, &ai) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! return PyInt_FromLong((ai.fragstotal * ai.fragsize - ai.bytes) / ! (ssize * nchannels)); } /* obufcount returns the number of samples that can be played without ! blocking */ static PyObject * lad_obuffree(lad_t *self, PyObject *args) { ! audio_buf_info ai; ! int nchannels, ssize; ! if (!PyArg_ParseTuple(args, ":obuffree")) ! return NULL; ! if (_ssize(self, &nchannels, &ssize) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! if (ioctl(self->x_fd, SNDCTL_DSP_GETOSPACE, &ai) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! return PyInt_FromLong(ai.bytes / (ssize * nchannels)); } *************** *** 346,371 **** lad_flush(lad_t *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, "")) return NULL; ! if (ioctl(self->x_fd, SNDCTL_DSP_SYNC, NULL) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! ! Py_INCREF(Py_None); ! return Py_None; } static PyMethodDef lad_methods[] = { ! { "read", (PyCFunction)lad_read, 1 }, ! { "write", (PyCFunction)lad_write, 1 }, ! { "setparameters", (PyCFunction)lad_setparameters, 1 }, ! { "bufsize", (PyCFunction)lad_bufsize, 1 }, ! { "obufcount", (PyCFunction)lad_obufcount, 1 }, ! { "obuffree", (PyCFunction)lad_obuffree, 1 }, ! { "flush", (PyCFunction)lad_flush, 1 }, ! { "close", (PyCFunction)lad_close, 1 }, ! { "fileno", (PyCFunction)lad_fileno, 1 }, ! { NULL, NULL} /* sentinel */ }; --- 331,355 ---- lad_flush(lad_t *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":flush")) return NULL; ! if (ioctl(self->x_fd, SNDCTL_DSP_SYNC, NULL) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! Py_INCREF(Py_None); ! return Py_None; } static PyMethodDef lad_methods[] = { ! { "read", (PyCFunction)lad_read, METH_VARARGS }, ! { "write", (PyCFunction)lad_write, METH_VARARGS }, ! { "setparameters", (PyCFunction)lad_setparameters, METH_VARARGS }, ! { "bufsize", (PyCFunction)lad_bufsize, METH_VARARGS }, ! { "obufcount", (PyCFunction)lad_obufcount, METH_VARARGS }, ! { "obuffree", (PyCFunction)lad_obuffree, METH_VARARGS }, ! { "flush", (PyCFunction)lad_flush, METH_VARARGS }, ! { "close", (PyCFunction)lad_close, METH_VARARGS }, ! { "fileno", (PyCFunction)lad_fileno, METH_VARARGS }, ! { NULL, NULL} /* sentinel */ }; *************** *** 373,392 **** lad_getattr(lad_t *xp, char *name) { ! return Py_FindMethod(lad_methods, (PyObject *)xp, name); } static PyTypeObject Ladtype = { ! PyObject_HEAD_INIT(&PyType_Type) ! 0, /*ob_size*/ ! "linux_audio_device", /*tp_name*/ ! sizeof(lad_t), /*tp_size*/ ! 0, /*tp_itemsize*/ ! /* methods */ ! (destructor)lad_dealloc, /*tp_dealloc*/ ! 0, /*tp_print*/ ! (getattrfunc)lad_getattr, /*tp_getattr*/ ! 0, /*tp_setattr*/ ! 0, /*tp_compare*/ ! 0, /*tp_repr*/ }; --- 357,376 ---- lad_getattr(lad_t *xp, char *name) { ! return Py_FindMethod(lad_methods, (PyObject *)xp, name); } static PyTypeObject Ladtype = { ! PyObject_HEAD_INIT(&PyType_Type) ! 0, /*ob_size*/ ! "linux_audio_device", /*tp_name*/ ! sizeof(lad_t), /*tp_size*/ ! 0, /*tp_itemsize*/ ! /* methods */ ! (destructor)lad_dealloc, /*tp_dealloc*/ ! 0, /*tp_print*/ ! (getattrfunc)lad_getattr, /*tp_getattr*/ ! 0, /*tp_setattr*/ ! 0, /*tp_compare*/ ! 0, /*tp_repr*/ }; *************** *** 394,403 **** ladopen(PyObject *self, PyObject *args) { ! return (PyObject *)newladobject(args); } static PyMethodDef linuxaudiodev_methods[] = { ! { "open", ladopen, 1 }, ! { 0, 0 }, }; --- 378,387 ---- ladopen(PyObject *self, PyObject *args) { ! return (PyObject *)newladobject(args); } static PyMethodDef linuxaudiodev_methods[] = { ! { "open", ladopen, METH_VARARGS }, ! { 0, 0 }, }; *************** *** 405,466 **** ins(PyObject *d, char *symbol, long value) { ! PyObject* v = PyInt_FromLong(value); ! if (!v || PyDict_SetItemString(d, symbol, v) < 0) ! return -1; /* triggers fatal error */ ! Py_DECREF(v); ! return 0; } void initlinuxaudiodev() { ! PyObject *m, *d, *x; ! m = Py_InitModule("linuxaudiodev", linuxaudiodev_methods); ! d = PyModule_GetDict(m); ! LinuxAudioError = PyErr_NewException("linuxaudiodev.error", NULL, NULL); ! if (LinuxAudioError) ! PyDict_SetItemString(d, "error", LinuxAudioError); ! ! x = PyInt_FromLong((long) AFMT_MU_LAW); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_MU_LAW", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_U8); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_U8", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_S8); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_S8", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_U16_BE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_U16_BE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_U16_LE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_U16_LE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_S16_BE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_S16_BE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_S16_LE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_S16_LE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! /* Check for errors */ ! if (PyErr_Occurred()) { ! error: ! Py_FatalError("can't initialize module linuxaudiodev"); ! } } --- 389,451 ---- ins(PyObject *d, char *symbol, long value) { ! PyObject* v = PyInt_FromLong(value); ! if (!v || PyDict_SetItemString(d, symbol, v) < 0) ! return -1; /* triggers fatal error */ ! Py_DECREF(v); ! return 0; } + void initlinuxaudiodev() { ! PyObject *m, *d, *x; ! m = Py_InitModule("linuxaudiodev", linuxaudiodev_methods); ! d = PyModule_GetDict(m); ! LinuxAudioError = PyErr_NewException("linuxaudiodev.error", NULL, NULL); ! if (LinuxAudioError) ! PyDict_SetItemString(d, "error", LinuxAudioError); ! ! x = PyInt_FromLong((long) AFMT_MU_LAW); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_MU_LAW", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_U8); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_U8", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_S8); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_S8", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_U16_BE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_U16_BE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_U16_LE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_U16_LE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_S16_BE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_S16_BE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_S16_LE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_S16_LE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! /* Check for errors */ ! if (PyErr_Occurred()) { ! error: ! Py_FatalError("can't initialize module linuxaudiodev"); ! } } From python-dev@python.org Sat Jul 8 07:16:40 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 7 Jul 2000 23:16:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules getpath.c,1.25,1.26 Message-ID: <200007080616.XAA23651@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv23644 Modified Files: getpath.c Log Message: ANSI-fied sources, converted to four-space indentation. Index: getpath.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/getpath.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** getpath.c 2000/06/30 23:58:05 1.25 --- getpath.c 2000/07/08 06:16:37 1.26 *************** *** 140,150 **** static void ! reduce(dir) ! char *dir; { ! size_t i = strlen(dir); ! while (i > 0 && dir[i] != SEP) ! --i; ! dir[i] = '\0'; } --- 140,149 ---- static void ! reduce(char *dir) { ! size_t i = strlen(dir); ! while (i > 0 && dir[i] != SEP) ! --i; ! dir[i] = '\0'; } *************** *** 159,358 **** static int ! isfile(filename) /* Is file, not directory */ ! char *filename; { ! struct stat buf; ! if (stat(filename, &buf) != 0) ! return 0; ! if (!S_ISREG(buf.st_mode)) ! return 0; ! return 1; } static int ! ismodule(filename) /* Is module -- check for .pyc/.pyo too */ ! char *filename; { ! if (isfile(filename)) ! return 1; ! /* Check for the compiled version of prefix. */ ! if (strlen(filename) < MAXPATHLEN) { ! strcat(filename, Py_OptimizeFlag ? "o" : "c"); ! if (isfile(filename)) ! return 1; ! } ! return 0; } static int ! isxfile(filename) /* Is executable file */ ! char *filename; { ! struct stat buf; ! if (stat(filename, &buf) != 0) ! return 0; ! if (!S_ISREG(buf.st_mode)) ! return 0; ! if ((buf.st_mode & 0111) == 0) ! return 0; ! return 1; } static int ! isdir(filename) /* Is directory */ ! char *filename; { ! struct stat buf; ! if (stat(filename, &buf) != 0) ! return 0; ! if (!S_ISDIR(buf.st_mode)) ! return 0; ! return 1; } static void ! joinpath(buffer, stuff) ! char *buffer; ! char *stuff; ! { ! size_t n, k; ! if (stuff[0] == SEP) ! n = 0; ! else { ! n = strlen(buffer); ! if (n > 0 && buffer[n-1] != SEP && n < MAXPATHLEN) ! buffer[n++] = SEP; ! } ! k = strlen(stuff); ! if (n + k > MAXPATHLEN) ! k = MAXPATHLEN - n; ! strncpy(buffer+n, stuff, k); ! buffer[n+k] = '\0'; } static int ! search_for_prefix(argv0_path, home) ! char *argv0_path; ! char *home; ! { ! size_t n; ! char *vpath; ! ! /* If PYTHONHOME is set, we believe it unconditionally */ ! if (home) { ! char *delim; ! strcpy(prefix, home); ! delim = strchr(prefix, DELIM); ! if (delim) ! *delim = '\0'; ! joinpath(prefix, lib_python); ! joinpath(prefix, LANDMARK); ! return 1; ! } ! ! /* Check to see if argv[0] is in the build directory */ ! strcpy(prefix, argv0_path); ! joinpath(prefix, "Modules/Setup"); ! if (isfile(prefix)) { ! /* Check VPATH to see if argv0_path is in the build directory. ! * Complication: the VPATH passed in is relative to the ! * Modules build directory and points to the Modules source ! * directory; we need it relative to the build tree and ! * pointing to the source tree. Solution: chop off a leading ! * ".." (but only if it's there -- it could be an absolute ! * path) and chop off the final component (assuming it's ! * "Modules"). ! */ ! vpath = VPATH; ! if (vpath[0] == '.' && vpath[1] == '.' && vpath[2] == '/') ! vpath += 3; ! strcpy(prefix, argv0_path); ! joinpath(prefix, vpath); ! reduce(prefix); ! joinpath(prefix, "Lib"); ! joinpath(prefix, LANDMARK); ! if (ismodule(prefix)) ! return -1; ! } ! /* Search from argv0_path, until root is found */ ! strcpy(prefix, argv0_path); ! do { ! n = strlen(prefix); ! joinpath(prefix, lib_python); ! joinpath(prefix, LANDMARK); ! if (ismodule(prefix)) ! return 1; ! prefix[n] = '\0'; ! reduce(prefix); ! } while (prefix[0]); ! ! /* Look at configure's PREFIX */ ! strcpy(prefix, PREFIX); ! joinpath(prefix, lib_python); ! joinpath(prefix, LANDMARK); ! if (ismodule(prefix)) ! return 1; ! /* Fail */ ! return 0; } static int ! search_for_exec_prefix(argv0_path, home) ! char *argv0_path; ! char *home; ! { ! size_t n; ! ! /* If PYTHONHOME is set, we believe it unconditionally */ ! if (home) { ! char *delim; ! delim = strchr(home, DELIM); ! if (delim) ! strcpy(exec_prefix, delim+1); ! else ! strcpy(exec_prefix, home); ! joinpath(exec_prefix, lib_python); ! joinpath(exec_prefix, "lib-dynload"); ! return 1; ! } ! ! /* Check to see if argv[0] is in the build directory */ ! strcpy(exec_prefix, argv0_path); ! joinpath(exec_prefix, "Modules/Setup"); ! if (isfile(exec_prefix)) { ! reduce(exec_prefix); ! return -1; ! } ! /* Search from argv0_path, until root is found */ ! strcpy(exec_prefix, argv0_path); ! do { ! n = strlen(exec_prefix); ! joinpath(exec_prefix, lib_python); ! joinpath(exec_prefix, "lib-dynload"); ! if (isdir(exec_prefix)) ! return 1; ! exec_prefix[n] = '\0'; ! reduce(exec_prefix); ! } while (exec_prefix[0]); ! ! /* Look at configure's EXEC_PREFIX */ ! strcpy(exec_prefix, EXEC_PREFIX); ! joinpath(exec_prefix, lib_python); ! joinpath(exec_prefix, "lib-dynload"); ! if (isdir(exec_prefix)) ! return 1; ! /* Fail */ ! return 0; } --- 158,347 ---- static int ! isfile(char *filename) /* Is file, not directory */ { ! struct stat buf; ! if (stat(filename, &buf) != 0) ! return 0; ! if (!S_ISREG(buf.st_mode)) ! return 0; ! return 1; } static int ! ismodule(char *filename) /* Is module -- check for .pyc/.pyo too */ { ! if (isfile(filename)) ! return 1; ! /* Check for the compiled version of prefix. */ ! if (strlen(filename) < MAXPATHLEN) { ! strcat(filename, Py_OptimizeFlag ? "o" : "c"); ! if (isfile(filename)) ! return 1; ! } ! return 0; } static int ! isxfile(char *filename) /* Is executable file */ { ! struct stat buf; ! if (stat(filename, &buf) != 0) ! return 0; ! if (!S_ISREG(buf.st_mode)) ! return 0; ! if ((buf.st_mode & 0111) == 0) ! return 0; ! return 1; } static int ! isdir(char *filename) /* Is directory */ { ! struct stat buf; ! if (stat(filename, &buf) != 0) ! return 0; ! if (!S_ISDIR(buf.st_mode)) ! return 0; ! return 1; } static void ! joinpath(char *buffer, char *stuff) ! { ! size_t n, k; ! if (stuff[0] == SEP) ! n = 0; ! else { ! n = strlen(buffer); ! if (n > 0 && buffer[n-1] != SEP && n < MAXPATHLEN) ! buffer[n++] = SEP; ! } ! k = strlen(stuff); ! if (n + k > MAXPATHLEN) ! k = MAXPATHLEN - n; ! strncpy(buffer+n, stuff, k); ! buffer[n+k] = '\0'; } static int ! search_for_prefix(char *argv0_path, char *home) ! { ! size_t n; ! char *vpath; ! /* If PYTHONHOME is set, we believe it unconditionally */ ! if (home) { ! char *delim; ! strcpy(prefix, home); ! delim = strchr(prefix, DELIM); ! if (delim) ! *delim = '\0'; ! joinpath(prefix, lib_python); ! joinpath(prefix, LANDMARK); ! return 1; ! } ! ! /* Check to see if argv[0] is in the build directory */ ! strcpy(prefix, argv0_path); ! joinpath(prefix, "Modules/Setup"); ! if (isfile(prefix)) { ! /* Check VPATH to see if argv0_path is in the build directory. ! * Complication: the VPATH passed in is relative to the ! * Modules build directory and points to the Modules source ! * directory; we need it relative to the build tree and ! * pointing to the source tree. Solution: chop off a leading ! * ".." (but only if it's there -- it could be an absolute ! * path) and chop off the final component (assuming it's ! * "Modules"). ! */ ! vpath = VPATH; ! if (vpath[0] == '.' && vpath[1] == '.' && vpath[2] == '/') ! vpath += 3; ! strcpy(prefix, argv0_path); ! joinpath(prefix, vpath); ! reduce(prefix); ! joinpath(prefix, "Lib"); ! joinpath(prefix, LANDMARK); ! if (ismodule(prefix)) ! return -1; ! } ! ! /* Search from argv0_path, until root is found */ ! strcpy(prefix, argv0_path); ! do { ! n = strlen(prefix); ! joinpath(prefix, lib_python); ! joinpath(prefix, LANDMARK); ! if (ismodule(prefix)) ! return 1; ! prefix[n] = '\0'; ! reduce(prefix); ! } while (prefix[0]); ! ! /* Look at configure's PREFIX */ ! strcpy(prefix, PREFIX); ! joinpath(prefix, lib_python); ! joinpath(prefix, LANDMARK); ! if (ismodule(prefix)) ! return 1; ! /* Fail */ ! return 0; } static int ! search_for_exec_prefix(char *argv0_path, char *home) ! { ! size_t n; ! /* If PYTHONHOME is set, we believe it unconditionally */ ! if (home) { ! char *delim; ! delim = strchr(home, DELIM); ! if (delim) ! strcpy(exec_prefix, delim+1); ! else ! strcpy(exec_prefix, home); ! joinpath(exec_prefix, lib_python); ! joinpath(exec_prefix, "lib-dynload"); ! return 1; ! } ! ! /* Check to see if argv[0] is in the build directory */ ! strcpy(exec_prefix, argv0_path); ! joinpath(exec_prefix, "Modules/Setup"); ! if (isfile(exec_prefix)) { ! reduce(exec_prefix); ! return -1; ! } ! ! /* Search from argv0_path, until root is found */ ! strcpy(exec_prefix, argv0_path); ! do { ! n = strlen(exec_prefix); ! joinpath(exec_prefix, lib_python); ! joinpath(exec_prefix, "lib-dynload"); ! if (isdir(exec_prefix)) ! return 1; ! exec_prefix[n] = '\0'; ! reduce(exec_prefix); ! } while (exec_prefix[0]); ! ! /* Look at configure's EXEC_PREFIX */ ! strcpy(exec_prefix, EXEC_PREFIX); ! joinpath(exec_prefix, lib_python); ! joinpath(exec_prefix, "lib-dynload"); ! if (isdir(exec_prefix)) ! return 1; ! /* Fail */ ! return 0; } *************** *** 361,395 **** calculate_path() { ! extern char *Py_GetProgramName(); ! static char delimiter[2] = {DELIM, '\0'}; ! static char separator[2] = {SEP, '\0'}; ! char *pythonpath = PYTHONPATH; ! char *rtpypath = getenv("PYTHONPATH"); ! char *home = Py_GetPythonHome(); ! char *path = getenv("PATH"); ! char *prog = Py_GetProgramName(); ! char argv0_path[MAXPATHLEN+1]; ! int pfound, efound; /* 1 if found; -1 if found build directory */ ! char *buf; ! size_t bufsz; ! size_t prefixsz; ! char *defpath = pythonpath; #ifdef WITH_NEXT_FRAMEWORK ! NSModule pythonModule; #endif #ifdef WITH_NEXT_FRAMEWORK ! pythonModule = NSModuleForSymbol(NSLookupAndBindSymbol("_Py_Initialize")); ! /* Use dylib functions to find out where the framework was loaded from */ ! buf = NSLibraryNameForModule(pythonModule); ! if (buf != NULL) { ! /* We're in a framework. */ ! strcpy(progpath, buf); ! ! /* Frameworks have support for versioning */ ! strcpy(lib_python, "lib"); ! } else { ! /* If we're not in a framework, fall back to the old way (even though NSNameOfModule() probably does the same thing.) */ #endif --- 350,386 ---- calculate_path() { ! extern char *Py_GetProgramName(); ! static char delimiter[2] = {DELIM, '\0'}; ! static char separator[2] = {SEP, '\0'}; ! char *pythonpath = PYTHONPATH; ! char *rtpypath = getenv("PYTHONPATH"); ! char *home = Py_GetPythonHome(); ! char *path = getenv("PATH"); ! char *prog = Py_GetProgramName(); ! char argv0_path[MAXPATHLEN+1]; ! int pfound, efound; /* 1 if found; -1 if found build directory */ ! char *buf; ! size_t bufsz; ! size_t prefixsz; ! char *defpath = pythonpath; #ifdef WITH_NEXT_FRAMEWORK ! NSModule pythonModule; #endif #ifdef WITH_NEXT_FRAMEWORK ! pythonModule = NSModuleForSymbol(NSLookupAndBindSymbol("_Py_Initialize")); ! /* Use dylib functions to find out where the framework was loaded from */ ! buf = NSLibraryNameForModule(pythonModule); ! if (buf != NULL) { ! /* We're in a framework. */ ! strcpy(progpath, buf); ! ! /* Frameworks have support for versioning */ ! strcpy(lib_python, "lib"); ! } ! else { ! /* If we're not in a framework, fall back to the old way ! (even though NSNameOfModule() probably does the same thing.) */ #endif *************** *** 403,579 **** */ if (strchr(prog, SEP)) ! strcpy(progpath, prog); else if (path) { ! while (1) { ! char *delim = strchr(path, DELIM); ! if (delim) { ! size_t len = delim - path; ! strncpy(progpath, path, len); ! *(progpath + len) = '\0'; ! } ! else ! strcpy(progpath, path); ! ! joinpath(progpath, prog); ! if (isxfile(progpath)) ! break; ! ! if (!delim) { ! progpath[0] = '\0'; ! break; ! } ! path = delim + 1; ! } } else ! progpath[0] = '\0'; #ifdef WITH_NEXT_FRAMEWORK ! } #endif ! strcpy(argv0_path, progpath); #if HAVE_READLINK ! { ! char tmpbuffer[MAXPATHLEN+1]; ! int linklen = readlink(progpath, tmpbuffer, MAXPATHLEN); ! while (linklen != -1) { ! /* It's not null terminated! */ ! tmpbuffer[linklen] = '\0'; ! if (tmpbuffer[0] == SEP) ! strcpy(argv0_path, tmpbuffer); ! else { ! /* Interpret relative to progpath */ ! reduce(argv0_path); ! joinpath(argv0_path, tmpbuffer); ! } ! linklen = readlink(argv0_path, tmpbuffer, MAXPATHLEN); ! } ! } #endif /* HAVE_READLINK */ ! reduce(argv0_path); ! if (!(pfound = search_for_prefix(argv0_path, home))) { ! if (!Py_FrozenFlag) ! fprintf(stderr, ! "Could not find platform independent libraries \n"); ! strcpy(prefix, PREFIX); ! joinpath(prefix, lib_python); ! } ! else ! reduce(prefix); ! if (!(efound = search_for_exec_prefix(argv0_path, home))) { ! if (!Py_FrozenFlag) ! fprintf(stderr, ! "Could not find platform dependent libraries \n"); ! strcpy(exec_prefix, EXEC_PREFIX); ! joinpath(exec_prefix, "lib/lib-dynload"); ! } ! /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */ ! ! if ((!pfound || !efound) && !Py_FrozenFlag) ! fprintf(stderr, ! "Consider setting $PYTHONHOME to [:]\n"); ! ! /* Calculate size of return buffer. ! */ ! bufsz = 0; ! ! if (rtpypath) ! bufsz += strlen(rtpypath) + 1; ! ! prefixsz = strlen(prefix) + 1; ! ! while (1) { ! char *delim = strchr(defpath, DELIM); ! ! if (defpath[0] != SEP) ! /* Paths are relative to prefix */ ! bufsz += prefixsz; ! ! if (delim) ! bufsz += delim - defpath + 1; ! else { ! bufsz += strlen(defpath) + 1; ! break; ! } ! defpath = delim + 1; ! } ! ! bufsz += strlen(exec_prefix) + 1; ! /* This is the only malloc call in this file */ ! buf = PyMem_Malloc(bufsz); ! if (buf == NULL) { ! /* We can't exit, so print a warning and limp along */ ! fprintf(stderr, "Not enough memory for dynamic PYTHONPATH.\n"); ! fprintf(stderr, "Using default static PYTHONPATH.\n"); ! module_search_path = PYTHONPATH; ! } ! else { ! /* Run-time value of $PYTHONPATH goes first */ ! if (rtpypath) { ! strcpy(buf, rtpypath); ! strcat(buf, delimiter); ! } ! else ! buf[0] = '\0'; ! ! /* Next goes merge of compile-time $PYTHONPATH with ! * dynamically located prefix. ! */ ! defpath = pythonpath; ! while (1) { ! char *delim = strchr(defpath, DELIM); ! ! if (defpath[0] != SEP) { ! strcat(buf, prefix); ! strcat(buf, separator); ! } ! ! if (delim) { ! size_t len = delim - defpath + 1; ! size_t end = strlen(buf) + len; ! strncat(buf, defpath, len); ! *(buf + end) = '\0'; ! } ! else { ! strcat(buf, defpath); ! break; ! } ! defpath = delim + 1; ! } ! strcat(buf, delimiter); ! /* Finally, on goes the directory for dynamic-load modules */ ! strcat(buf, exec_prefix); ! /* And publish the results */ ! module_search_path = buf; ! } ! /* Reduce prefix and exec_prefix to their essence, ! * e.g. /usr/local/lib/python1.5 is reduced to /usr/local. ! * If we're loading relative to the build directory, ! * return the compiled-in defaults instead. ! */ ! if (pfound > 0) { ! reduce(prefix); ! reduce(prefix); ! } ! else ! strcpy(prefix, PREFIX); ! if (efound > 0) { ! reduce(exec_prefix); ! reduce(exec_prefix); ! reduce(exec_prefix); ! } ! else ! strcpy(exec_prefix, EXEC_PREFIX); } --- 394,570 ---- */ if (strchr(prog, SEP)) ! strcpy(progpath, prog); else if (path) { ! while (1) { ! char *delim = strchr(path, DELIM); ! if (delim) { ! size_t len = delim - path; ! strncpy(progpath, path, len); ! *(progpath + len) = '\0'; ! } ! else ! strcpy(progpath, path); ! ! joinpath(progpath, prog); ! if (isxfile(progpath)) ! break; ! ! if (!delim) { ! progpath[0] = '\0'; ! break; ! } ! path = delim + 1; ! } } else ! progpath[0] = '\0'; #ifdef WITH_NEXT_FRAMEWORK ! } #endif ! strcpy(argv0_path, progpath); #if HAVE_READLINK ! { ! char tmpbuffer[MAXPATHLEN+1]; ! int linklen = readlink(progpath, tmpbuffer, MAXPATHLEN); ! while (linklen != -1) { ! /* It's not null terminated! */ ! tmpbuffer[linklen] = '\0'; ! if (tmpbuffer[0] == SEP) ! strcpy(argv0_path, tmpbuffer); ! else { ! /* Interpret relative to progpath */ ! reduce(argv0_path); ! joinpath(argv0_path, tmpbuffer); ! } ! linklen = readlink(argv0_path, tmpbuffer, MAXPATHLEN); ! } ! } #endif /* HAVE_READLINK */ ! reduce(argv0_path); ! if (!(pfound = search_for_prefix(argv0_path, home))) { ! if (!Py_FrozenFlag) ! fprintf(stderr, ! "Could not find platform independent libraries \n"); ! strcpy(prefix, PREFIX); ! joinpath(prefix, lib_python); ! } ! else ! reduce(prefix); ! if (!(efound = search_for_exec_prefix(argv0_path, home))) { ! if (!Py_FrozenFlag) ! fprintf(stderr, ! "Could not find platform dependent libraries \n"); ! strcpy(exec_prefix, EXEC_PREFIX); ! joinpath(exec_prefix, "lib/lib-dynload"); ! } ! /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */ ! ! if ((!pfound || !efound) && !Py_FrozenFlag) ! fprintf(stderr, ! "Consider setting $PYTHONHOME to [:]\n"); ! ! /* Calculate size of return buffer. ! */ ! bufsz = 0; ! ! if (rtpypath) ! bufsz += strlen(rtpypath) + 1; ! ! prefixsz = strlen(prefix) + 1; ! ! while (1) { ! char *delim = strchr(defpath, DELIM); ! ! if (defpath[0] != SEP) ! /* Paths are relative to prefix */ ! bufsz += prefixsz; ! ! if (delim) ! bufsz += delim - defpath + 1; ! else { ! bufsz += strlen(defpath) + 1; ! break; ! } ! defpath = delim + 1; ! } ! bufsz += strlen(exec_prefix) + 1; ! /* This is the only malloc call in this file */ ! buf = PyMem_Malloc(bufsz); ! if (buf == NULL) { ! /* We can't exit, so print a warning and limp along */ ! fprintf(stderr, "Not enough memory for dynamic PYTHONPATH.\n"); ! fprintf(stderr, "Using default static PYTHONPATH.\n"); ! module_search_path = PYTHONPATH; ! } ! else { ! /* Run-time value of $PYTHONPATH goes first */ ! if (rtpypath) { ! strcpy(buf, rtpypath); ! strcat(buf, delimiter); ! } ! else ! buf[0] = '\0'; ! /* Next goes merge of compile-time $PYTHONPATH with ! * dynamically located prefix. ! */ ! defpath = pythonpath; ! while (1) { ! char *delim = strchr(defpath, DELIM); ! ! if (defpath[0] != SEP) { ! strcat(buf, prefix); ! strcat(buf, separator); ! } ! ! if (delim) { ! size_t len = delim - defpath + 1; ! size_t end = strlen(buf) + len; ! strncat(buf, defpath, len); ! *(buf + end) = '\0'; ! } ! else { ! strcat(buf, defpath); ! break; ! } ! defpath = delim + 1; ! } ! strcat(buf, delimiter); ! /* Finally, on goes the directory for dynamic-load modules */ ! strcat(buf, exec_prefix); ! /* And publish the results */ ! module_search_path = buf; ! } ! ! /* Reduce prefix and exec_prefix to their essence, ! * e.g. /usr/local/lib/python1.5 is reduced to /usr/local. ! * If we're loading relative to the build directory, ! * return the compiled-in defaults instead. ! */ ! if (pfound > 0) { ! reduce(prefix); ! reduce(prefix); ! } ! else ! strcpy(prefix, PREFIX); ! ! if (efound > 0) { ! reduce(exec_prefix); ! reduce(exec_prefix); ! reduce(exec_prefix); ! } ! else ! strcpy(exec_prefix, EXEC_PREFIX); } *************** *** 584,590 **** Py_GetPath() { ! if (!module_search_path) ! calculate_path(); ! return module_search_path; } --- 575,581 ---- Py_GetPath() { ! if (!module_search_path) ! calculate_path(); ! return module_search_path; } *************** *** 592,598 **** Py_GetPrefix() { ! if (!module_search_path) ! calculate_path(); ! return prefix; } --- 583,589 ---- Py_GetPrefix() { ! if (!module_search_path) ! calculate_path(); ! return prefix; } *************** *** 600,606 **** Py_GetExecPrefix() { ! if (!module_search_path) ! calculate_path(); ! return exec_prefix; } --- 591,597 ---- Py_GetExecPrefix() { ! if (!module_search_path) ! calculate_path(); ! return exec_prefix; } *************** *** 608,613 **** Py_GetProgramFullPath() { ! if (!module_search_path) ! calculate_path(); ! return progpath; } --- 599,604 ---- Py_GetProgramFullPath() { ! if (!module_search_path) ! calculate_path(); ! return progpath; } From python-dev@python.org Sat Jul 8 07:41:05 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 7 Jul 2000 23:41:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules shamodule.c,2.6,2.7 Message-ID: <200007080641.XAA24616@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv24609 Modified Files: shamodule.c Log Message: ANSI-fied sources, converted to four-space indentation. Converted to PyArg_ParseTuple() with method names to get better error messages. Index: shamodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/shamodule.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** shamodule.c 2000/06/30 23:50:38 2.6 --- shamodule.c 2000/07/08 06:41:03 2.7 *************** *** 56,65 **** typedef struct { ! PyObject_HEAD ! SHA_INT32 digest[5]; /* Message digest */ ! SHA_INT32 count_lo, count_hi; /* 64-bit bit count */ ! SHA_BYTE data[SHA_BLOCKSIZE]; /* SHA data buffer */ ! int Endianness; ! int local; /* unprocessed amount in data */ } SHAobject; --- 56,65 ---- typedef struct { ! PyObject_HEAD ! SHA_INT32 digest[5]; /* Message digest */ ! SHA_INT32 count_lo, count_hi; /* 64-bit bit count */ ! SHA_BYTE data[SHA_BLOCKSIZE]; /* SHA data buffer */ ! int Endianness; ! int local; /* unprocessed amount in data */ } SHAobject; *************** *** 67,73 **** array of longwords. */ ! static void longReverse(buffer, byteCount, Endianness) ! SHA_INT32 *buffer; ! int byteCount, Endianness; { SHA_INT32 value; --- 67,71 ---- array of longwords. */ ! static void longReverse(SHA_INT32 *buffer, int byteCount, int Endianness) { SHA_INT32 value; *************** *** 77,82 **** byteCount /= sizeof(*buffer); ! while( byteCount-- ) ! { value = *buffer; value = ( ( value & 0xFF00FF00L ) >> 8 ) | \ --- 75,79 ---- byteCount /= sizeof(*buffer); ! while (byteCount--) { value = *buffer; value = ( ( value & 0xFF00FF00L ) >> 8 ) | \ *************** *** 86,98 **** } ! static void SHAcopy(src, dest) ! SHAobject *src, *dest; { ! dest->Endianness = src->Endianness; ! dest->local = src->local; ! dest->count_lo = src->count_lo; ! dest->count_hi = src->count_hi; ! memcpy(dest->digest, src->digest, sizeof(src->digest)); ! memcpy(dest->data, src->data, sizeof(src->data)); } --- 83,94 ---- } ! static void SHAcopy(SHAobject *src, SHAobject *dest) { ! dest->Endianness = src->Endianness; ! dest->local = src->local; ! dest->count_lo = src->count_lo; ! dest->count_hi = src->count_hi; ! memcpy(dest->digest, src->digest, sizeof(src->digest)); ! memcpy(dest->data, src->data, sizeof(src->data)); } *************** *** 174,179 **** static void ! sha_transform(sha_info) ! SHAobject *sha_info; { int i; --- 170,174 ---- static void ! sha_transform(SHAobject *sha_info) { int i; *************** *** 236,241 **** static void ! sha_init(sha_info) ! SHAobject *sha_info; { TestEndianness(sha_info->Endianness) --- 231,235 ---- static void ! sha_init(SHAobject *sha_info) { TestEndianness(sha_info->Endianness) *************** *** 254,261 **** static void ! sha_update(sha_info, buffer, count) ! SHAobject *sha_info; ! SHA_BYTE *buffer; ! int count; { int i; --- 248,252 ---- static void ! sha_update(SHAobject *sha_info, SHA_BYTE *buffer, int count) { int i; *************** *** 264,292 **** clo = sha_info->count_lo + ((SHA_INT32) count << 3); if (clo < sha_info->count_lo) { ! ++sha_info->count_hi; } sha_info->count_lo = clo; sha_info->count_hi += (SHA_INT32) count >> 29; if (sha_info->local) { ! i = SHA_BLOCKSIZE - sha_info->local; ! if (i > count) { ! i = count; ! } ! memcpy(((SHA_BYTE *) sha_info->data) + sha_info->local, ! buffer, i); ! count -= i; ! buffer += i; ! sha_info->local += i; ! if (sha_info->local == SHA_BLOCKSIZE) { ! sha_transform(sha_info); ! } else { ! return; ! } } while (count >= SHA_BLOCKSIZE) { ! memcpy(sha_info->data, buffer, SHA_BLOCKSIZE); ! buffer += SHA_BLOCKSIZE; ! count -= SHA_BLOCKSIZE; ! sha_transform(sha_info); } memcpy(sha_info->data, buffer, count); --- 255,283 ---- clo = sha_info->count_lo + ((SHA_INT32) count << 3); if (clo < sha_info->count_lo) { ! ++sha_info->count_hi; } sha_info->count_lo = clo; sha_info->count_hi += (SHA_INT32) count >> 29; if (sha_info->local) { ! i = SHA_BLOCKSIZE - sha_info->local; ! if (i > count) { ! i = count; ! } ! memcpy(((SHA_BYTE *) sha_info->data) + sha_info->local, buffer, i); ! count -= i; ! buffer += i; ! sha_info->local += i; ! if (sha_info->local == SHA_BLOCKSIZE) { ! sha_transform(sha_info); ! } ! else { ! return; ! } } while (count >= SHA_BLOCKSIZE) { ! memcpy(sha_info->data, buffer, SHA_BLOCKSIZE); ! buffer += SHA_BLOCKSIZE; ! count -= SHA_BLOCKSIZE; ! sha_transform(sha_info); } memcpy(sha_info->data, buffer, count); *************** *** 297,303 **** static void ! sha_final(digest, sha_info) ! unsigned char digest[20]; ! SHAobject *sha_info; { int count; --- 288,292 ---- static void ! sha_final(unsigned char digest[20], SHAobject *sha_info) { int count; *************** *** 308,313 **** count = (int) ((lo_bit_count >> 3) & 0x3f); ((SHA_BYTE *) sha_info->data)[count++] = 0x80; ! if (count > SHA_BLOCKSIZE - 8) ! { memset(((SHA_BYTE *) sha_info->data) + count, 0, SHA_BLOCKSIZE - count); --- 297,301 ---- count = (int) ((lo_bit_count >> 3) & 0x3f); ((SHA_BYTE *) sha_info->data)[count++] = 0x80; ! if (count > SHA_BLOCKSIZE - 8) { memset(((SHA_BYTE *) sha_info->data) + count, 0, SHA_BLOCKSIZE - count); *************** *** 315,320 **** memset((SHA_BYTE *) sha_info->data, 0, SHA_BLOCKSIZE - 8); } ! else ! { memset(((SHA_BYTE *) sha_info->data) + count, 0, SHA_BLOCKSIZE - 8 - count); --- 303,307 ---- memset((SHA_BYTE *) sha_info->data, 0, SHA_BLOCKSIZE - 8); } ! else { memset(((SHA_BYTE *) sha_info->data) + count, 0, SHA_BLOCKSIZE - 8 - count); *************** *** 366,370 **** newSHAobject() { ! return (SHAobject *)PyObject_New(SHAobject, &SHAtype); } --- 353,357 ---- newSHAobject() { ! return (SHAobject *)PyObject_New(SHAobject, &SHAtype); } *************** *** 372,379 **** static void ! SHA_dealloc(ptr) ! PyObject *ptr; { ! PyObject_Del(ptr); } --- 359,365 ---- static void ! SHA_dealloc(PyObject *ptr) { ! PyObject_Del(ptr); } *************** *** 385,403 **** static PyObject * ! SHA_copy(self, args) ! SHAobject *self; ! PyObject *args; ! { ! SHAobject *newobj; ! ! if (!PyArg_NoArgs(args)) { ! return NULL; ! } ! if ( (newobj = newSHAobject())==NULL) ! return NULL; ! ! SHAcopy(self, newobj); ! return (PyObject *)newobj; } --- 371,386 ---- static PyObject * ! SHA_copy(SHAobject *self, PyObject *args) ! { ! SHAobject *newobj; ! if (!PyArg_ParseTuple(args, ":copy")) { ! return NULL; ! } ! if ( (newobj = newSHAobject())==NULL) ! return NULL; ! ! SHAcopy(self, newobj); ! return (PyObject *)newobj; } *************** *** 406,422 **** static PyObject * ! SHA_digest(self, args) ! SHAobject *self; ! PyObject *args; ! { ! unsigned char digest[SHA_DIGESTSIZE]; ! SHAobject temp; ! ! if (!PyArg_NoArgs(args)) ! return NULL; ! ! SHAcopy(self, &temp); ! sha_final(digest, &temp); ! return PyString_FromStringAndSize((const char *)digest, sizeof(digest)); } --- 389,403 ---- static PyObject * ! SHA_digest(SHAobject *self, PyObject *args) ! { ! unsigned char digest[SHA_DIGESTSIZE]; ! SHAobject temp; ! ! if (!PyArg_ParseTuple(args, ":digest")) ! return NULL; ! ! SHAcopy(self, &temp); ! sha_final(digest, &temp); ! return PyString_FromStringAndSize((const char *)digest, sizeof(digest)); } *************** *** 425,460 **** static PyObject * ! SHA_hexdigest(self, args) ! SHAobject *self; ! PyObject *args; ! { ! unsigned char digest[SHA_DIGESTSIZE]; ! SHAobject temp; ! PyObject *retval; ! char *hex_digest; ! int i, j; ! ! if (!PyArg_NoArgs(args)) ! return NULL; ! ! /* Get the raw (binary) digest value */ ! SHAcopy(self, &temp); ! sha_final(digest, &temp); ! ! /* Create a new string */ ! retval = PyString_FromStringAndSize(NULL, sizeof(digest) * 2); ! hex_digest = PyString_AsString(retval); ! ! /* Make hex version of the digest */ ! for(i=j=0; i9) ? c+'a'-10 : c + '0'; ! hex_digest[j++] = c; ! c = digest[i] % 16; c = (c>9) ? c+'a'-10 : c + '0'; ! hex_digest[j++] = c; ! } ! ! return retval; } --- 406,437 ---- static PyObject * ! SHA_hexdigest(SHAobject *self, PyObject *args) ! { ! unsigned char digest[SHA_DIGESTSIZE]; ! SHAobject temp; ! PyObject *retval; ! char *hex_digest; ! int i, j; ! ! if (!PyArg_ParseTuple(args, ":hexdigest")) ! return NULL; ! ! /* Get the raw (binary) digest value */ ! SHAcopy(self, &temp); ! sha_final(digest, &temp); ! ! /* Create a new string */ ! retval = PyString_FromStringAndSize(NULL, sizeof(digest) * 2); ! hex_digest = PyString_AsString(retval); ! ! /* Make hex version of the digest */ ! for(i=j=0; i9) ? c+'a'-10 : c + '0'; ! hex_digest[j++] = c; ! c = digest[i] % 16; c = (c>9) ? c+'a'-10 : c + '0'; ! hex_digest[j++] = c; ! } ! return retval; } *************** *** 463,513 **** static PyObject * ! SHA_update(self, args) ! SHAobject *self; ! PyObject *args; { ! unsigned char *cp; ! int len; ! if (!PyArg_Parse(args, "s#", &cp, &len)) ! return NULL; ! sha_update(self, cp, len); ! Py_INCREF(Py_None); ! return Py_None; } static PyMethodDef SHA_methods[] = { ! {"copy", (PyCFunction)SHA_copy, 0, SHA_copy__doc__}, ! {"digest", (PyCFunction)SHA_digest, 0, SHA_digest__doc__}, ! {"hexdigest", (PyCFunction)SHA_hexdigest, 0, SHA_hexdigest__doc__}, ! {"update", (PyCFunction)SHA_update, 0, SHA_update__doc__}, ! {NULL, NULL} /* sentinel */ }; static PyObject * ! SHA_getattr(self, name) ! PyObject *self; ! char *name; ! { ! if (strcmp(name, "blocksize")==0) ! return PyInt_FromLong(1); ! if (strcmp(name, "digestsize")==0) ! return PyInt_FromLong(20); ! ! return Py_FindMethod(SHA_methods, self, name); } static PyTypeObject SHAtype = { ! PyObject_HEAD_INIT(NULL) ! 0, /*ob_size*/ ! "SHA", /*tp_name*/ ! sizeof(SHAobject), /*tp_size*/ ! 0, /*tp_itemsize*/ ! /* methods */ ! SHA_dealloc, /*tp_dealloc*/ ! 0, /*tp_print*/ ! SHA_getattr, /*tp_getattr*/ }; --- 440,486 ---- static PyObject * ! SHA_update(SHAobject *self, PyObject *args) { ! unsigned char *cp; ! int len; ! if (!PyArg_ParseTuple(args, "s#:update", &cp, &len)) ! return NULL; ! sha_update(self, cp, len); ! Py_INCREF(Py_None); ! return Py_None; } static PyMethodDef SHA_methods[] = { ! {"copy", (PyCFunction)SHA_copy, METH_VARARGS, SHA_copy__doc__}, ! {"digest", (PyCFunction)SHA_digest, METH_VARARGS, SHA_digest__doc__}, ! {"hexdigest", (PyCFunction)SHA_hexdigest, METH_VARARGS, SHA_hexdigest__doc__}, ! {"update", (PyCFunction)SHA_update, METH_VARARGS, SHA_update__doc__}, ! {NULL, NULL} /* sentinel */ }; static PyObject * ! SHA_getattr(PyObject *self, char *name) ! { ! if (strcmp(name, "blocksize")==0) ! return PyInt_FromLong(1); ! if (strcmp(name, "digestsize")==0) ! return PyInt_FromLong(20); ! ! return Py_FindMethod(SHA_methods, self, name); } static PyTypeObject SHAtype = { ! PyObject_HEAD_INIT(NULL) ! 0, /*ob_size*/ ! "SHA", /*tp_name*/ ! sizeof(SHAobject), /*tp_size*/ ! 0, /*tp_itemsize*/ ! /* methods */ ! SHA_dealloc, /*tp_dealloc*/ ! 0, /*tp_print*/ ! SHA_getattr, /*tp_getattr*/ }; *************** *** 521,553 **** static PyObject * ! SHA_new(self, args, kwdict) ! PyObject *self; ! PyObject *args; ! PyObject *kwdict; ! { ! static char *kwlist[] = {"string", NULL}; ! SHAobject *new; ! unsigned char *cp = NULL; ! int len; ! if ((new = newSHAobject()) == NULL) ! return NULL; ! if (!PyArg_ParseTupleAndKeywords(args, kwdict, "|s#:new", kwlist, ! &cp, &len)) { ! Py_DECREF(new); ! return NULL; ! } ! ! sha_init(new); ! ! if (PyErr_Occurred()) { ! Py_DECREF(new); ! return NULL; ! } ! if (cp) ! sha_update(new, cp, len); ! return (PyObject *)new; } --- 494,523 ---- static PyObject * ! SHA_new(PyObject *self, PyObject *args, PyObject *kwdict) ! { ! static char *kwlist[] = {"string", NULL}; ! SHAobject *new; ! unsigned char *cp = NULL; ! int len; ! if ((new = newSHAobject()) == NULL) ! return NULL; ! if (!PyArg_ParseTupleAndKeywords(args, kwdict, "|s#:new", kwlist, ! &cp, &len)) { ! Py_DECREF(new); ! return NULL; ! } ! ! sha_init(new); ! if (PyErr_Occurred()) { ! Py_DECREF(new); ! return NULL; ! } ! if (cp) ! sha_update(new, cp, len); ! ! return (PyObject *)new; } *************** *** 556,562 **** static struct PyMethodDef SHA_functions[] = { ! {"new", (PyCFunction)SHA_new, METH_VARARGS|METH_KEYWORDS, SHA_new__doc__}, ! {"sha", (PyCFunction)SHA_new, METH_VARARGS|METH_KEYWORDS, SHA_new__doc__}, ! {NULL, NULL} /* Sentinel */ }; --- 526,532 ---- static struct PyMethodDef SHA_functions[] = { ! {"new", (PyCFunction)SHA_new, METH_VARARGS|METH_KEYWORDS, SHA_new__doc__}, ! {"sha", (PyCFunction)SHA_new, METH_VARARGS|METH_KEYWORDS, SHA_new__doc__}, ! {NULL, NULL} /* Sentinel */ }; *************** *** 571,589 **** initsha() { ! PyObject *d, *m; ! SHAtype.ob_type = &PyType_Type; ! m = Py_InitModule("sha", SHA_functions); ! /* Add some symbolic constants to the module */ ! d = PyModule_GetDict(m); ! insint("blocksize", 1); /* For future use, in case some hash ! functions require an integral number of ! blocks */ ! insint("digestsize", 20); ! ! /* Check for errors */ ! if (PyErr_Occurred()) ! Py_FatalError("can't initialize module SHA"); } - --- 541,558 ---- initsha() { ! PyObject *d, *m; ! SHAtype.ob_type = &PyType_Type; ! m = Py_InitModule("sha", SHA_functions); ! /* Add some symbolic constants to the module */ ! d = PyModule_GetDict(m); ! insint("blocksize", 1); /* For future use, in case some hash ! functions require an integral number of ! blocks */ ! insint("digestsize", 20); ! ! /* Check for errors */ ! if (PyErr_Occurred()) ! Py_FatalError("can't initialize module SHA"); } From python-dev@python.org Sat Jul 8 13:04:59 2000 From: python-dev@python.org (Skip Montanaro) Date: Sat, 8 Jul 2000 05:04:59 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects classobject.c,2.97,2.98 Message-ID: <200007081204.FAA28621@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv28607 Modified Files: classobject.c Log Message: _Py_RefTotal should only be declared here when Py_TRACE_REFS are #define'd Index: classobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/classobject.c,v retrieving revision 2.97 retrieving revision 2.98 diff -C2 -r2.97 -r2.98 *** classobject.c 2000/07/01 01:00:38 2.97 --- classobject.c 2000/07/08 12:04:57 2.98 *************** *** 524,528 **** --- 524,530 ---- PyObject *del; static PyObject *delstr; + #ifdef Py_TRACE_REFS extern long _Py_RefTotal; + #endif PyObject_GC_Fini(inst); /* Call the __del__ method if it exists. First temporarily From python-dev@python.org Sat Jul 8 13:06:38 2000 From: python-dev@python.org (Skip Montanaro) Date: Sat, 8 Jul 2000 05:06:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects object.c,2.81,2.82 Message-ID: <200007081206.FAA29188@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv29144 Modified Files: object.c Log Message: delete unused local variable from _PyTrash_deposit_object Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.81 retrieving revision 2.82 diff -C2 -r2.81 -r2.82 *** object.c 2000/07/03 09:57:53 2.81 --- object.c 2000/07/08 12:06:36 2.82 *************** *** 1170,1174 **** { int typecode; - PyObject *hold = _PyTrash_delete_later; if (PyTuple_Check(op)) --- 1170,1173 ---- From python-dev@python.org Sat Jul 8 17:56:29 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 09:56:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules grpmodule.c,2.11,2.12 Message-ID: <200007081656.JAA06016@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6006 Modified Files: grpmodule.c Log Message: ANSI-fication of the sources, convert to 4-space indents. Use PyArg_ParseTuple() to get better error messages. Add docstrings all around. Index: grpmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/grpmodule.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** grpmodule.c 2000/06/30 23:58:05 2.11 --- grpmodule.c 2000/07/08 16:56:26 2.12 *************** *** 16,111 **** #include ! static PyObject *mkgrent(p) ! struct group *p; { ! PyObject *v, *w; ! char **member; ! if ((w = PyList_New(0)) == NULL) { ! return NULL; ! } ! for (member = p->gr_mem; *member != NULL; member++) { ! PyObject *x = PyString_FromString(*member); ! if (x == NULL || PyList_Append(w, x) != 0) { ! Py_XDECREF(x); ! Py_DECREF(w); ! return NULL; ! } ! Py_DECREF(x); ! } ! v = Py_BuildValue("(sslO)", ! p->gr_name, ! p->gr_passwd, #if defined(NeXT) && defined(_POSIX_SOURCE) && defined(__LITTLE_ENDIAN__) /* Correct a bug present on Intel machines in NextStep 3.2 and 3.3; for later versions you may have to remove this */ ! (long)p->gr_short_pad, /* ugh-NeXT broke the padding */ #else ! (long)p->gr_gid, #endif ! w); ! Py_DECREF(w); ! return v; } ! static PyObject *grp_getgrgid(self, args) ! PyObject *self, *args; { ! int gid; ! struct group *p; ! if (!PyArg_Parse((args),"i",(&gid))) ! return NULL; ! if ((p = getgrgid(gid)) == NULL) { ! PyErr_SetString(PyExc_KeyError, "getgrgid(): gid not found"); ! return NULL; ! } ! return mkgrent(p); } ! static PyObject *grp_getgrnam(self, args) ! PyObject *self, *args; { ! char *name; ! struct group *p; ! if (!PyArg_Parse((args),"s",(&name))) ! return NULL; ! if ((p = getgrnam(name)) == NULL) { ! PyErr_SetString(PyExc_KeyError, "getgrnam(): name not found"); ! return NULL; ! } ! return mkgrent(p); } ! static PyObject *grp_getgrall(self, args) ! PyObject *self, *args; { ! PyObject *d; ! struct group *p; ! if (!PyArg_NoArgs(args)) ! return NULL; ! if ((d = PyList_New(0)) == NULL) ! return NULL; ! setgrent(); ! while ((p = getgrent()) != NULL) { ! PyObject *v = mkgrent(p); ! if (v == NULL || PyList_Append(d, v) != 0) { ! Py_XDECREF(v); ! Py_DECREF(d); ! return NULL; ! } ! Py_DECREF(v); ! } ! return d; } static PyMethodDef grp_methods[] = { ! {"getgrgid", grp_getgrgid}, ! {"getgrnam", grp_getgrnam}, ! {"getgrall", grp_getgrall}, ! {NULL, NULL} /* sentinel */ }; DL_EXPORT(void) initgrp() { ! Py_InitModule("grp", grp_methods); } --- 16,138 ---- #include ! ! static PyObject * ! mkgrent(struct group *p) { ! PyObject *v, *w; ! char **member; ! if ((w = PyList_New(0)) == NULL) { ! return NULL; ! } ! for (member = p->gr_mem; *member != NULL; member++) { ! PyObject *x = PyString_FromString(*member); ! if (x == NULL || PyList_Append(w, x) != 0) { ! Py_XDECREF(x); ! Py_DECREF(w); ! return NULL; ! } ! Py_DECREF(x); ! } ! v = Py_BuildValue("(sslO)", ! p->gr_name, ! p->gr_passwd, #if defined(NeXT) && defined(_POSIX_SOURCE) && defined(__LITTLE_ENDIAN__) /* Correct a bug present on Intel machines in NextStep 3.2 and 3.3; for later versions you may have to remove this */ ! (long)p->gr_short_pad, /* ugh-NeXT broke the padding */ #else ! (long)p->gr_gid, #endif ! w); ! Py_DECREF(w); ! return v; } ! static PyObject * ! grp_getgrgid(PyObject *self, PyObject *args) { ! int gid; ! struct group *p; ! if (!PyArg_ParseTuple(args, "i:getgrgid", &gid)) ! return NULL; ! if ((p = getgrgid(gid)) == NULL) { ! PyErr_SetString(PyExc_KeyError, "getgrgid(): gid not found"); ! return NULL; ! } ! return mkgrent(p); } ! static PyObject * ! grp_getgrnam(PyObject *self, PyObject *args) { ! char *name; ! struct group *p; ! if (!PyArg_ParseTuple(args, "s:getgrnam", &name)) ! return NULL; ! if ((p = getgrnam(name)) == NULL) { ! PyErr_SetString(PyExc_KeyError, "getgrnam(): name not found"); ! return NULL; ! } ! return mkgrent(p); } ! static PyObject * ! grp_getgrall(PyObject *self, PyObject *args) { ! PyObject *d; ! struct group *p; ! ! if (!PyArg_ParseTuple(args, ":getgrall")) ! return NULL; ! if ((d = PyList_New(0)) == NULL) ! return NULL; ! setgrent(); ! while ((p = getgrent()) != NULL) { ! PyObject *v = mkgrent(p); ! if (v == NULL || PyList_Append(d, v) != 0) { ! Py_XDECREF(v); ! Py_DECREF(d); ! return NULL; ! } ! Py_DECREF(v); ! } ! return d; } static PyMethodDef grp_methods[] = { ! {"getgrgid", grp_getgrgid, METH_VARARGS, ! "getgrgid(id) -> tuple\n\ ! Return the group database entry for the given numeric group ID. If\n\ ! id is not valid, raise KeyError."}, ! {"getgrnam", grp_getgrnam, METH_VARARGS, ! "getgrnam(name) -> tuple\n\ ! Return the group database entry for the given group name. If\n\ ! name is not valid, raise KeyError."}, ! {"getgrall", grp_getgrall, METH_VARARGS, ! "getgrall() -> list of tuples\n\ ! Return a list of all available group entries, in arbitrary order."}, ! {NULL, NULL} /* sentinel */ }; + static char grp__doc__[] = + "Access to the Unix group database.\n\ + \n\ + Group entries are reported as 4-tuples containing the following fields\n\ + from the group database, in order:\n\ + \n\ + name - name of the group\n\ + passwd - group password (encrypted); often empty\n\ + gid - numeric ID of the group\n\ + mem - list of members\n\ + \n\ + The gid is an integer, name and password are strings. (Note that most\n\ + users are not explicitly listed as members of the groups they are in\n\ + according to the password database. Check both databases to get\n\ + complete membership information.)"; + + DL_EXPORT(void) initgrp() { ! Py_InitModule3("grp", grp_methods, grp__doc__); } From python-dev@python.org Sat Jul 8 17:59:05 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 09:59:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libgrp.tex,1.14,1.15 Message-ID: <200007081659.JAA06087@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv6080/lib Modified Files: libgrp.tex Log Message: Minor revisions similar to some information in the new docstrings. Index: libgrp.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libgrp.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** libgrp.tex 2000/04/03 20:13:53 1.14 --- libgrp.tex 2000/07/08 16:59:03 1.15 *************** *** 23,28 **** list is a list of strings. (Note that most users are not explicitly listed as members of the ! group they are in according to the password database.) ! \exception{KeyError} is raised if the entry asked for cannot be found. It defines the following items: --- 23,28 ---- list is a list of strings. (Note that most users are not explicitly listed as members of the ! group they are in according to the password database. Check both ! databases to get complete membership information.) It defines the following items: *************** *** 30,37 **** --- 30,39 ---- \begin{funcdesc}{getgrgid}{gid} Return the group database entry for the given numeric group ID. + \exception{KeyError} is raised if the entry asked for cannot be found. \end{funcdesc} \begin{funcdesc}{getgrnam}{name} Return the group database entry for the given group name. + \exception{KeyError} is raised if the entry asked for cannot be found. \end{funcdesc} From python-dev@python.org Sat Jul 8 18:25:57 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 10:25:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include modsupport.h,2.30,2.31 pyerrors.h,2.37,2.38 Message-ID: <200007081725.KAA13990@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv13980 Modified Files: modsupport.h pyerrors.h Log Message: ANSI-fication of the sources -- remove Py_PROTO! Index: modsupport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/modsupport.h,v retrieving revision 2.30 retrieving revision 2.31 diff -C2 -r2.30 -r2.31 *** modsupport.h 2000/06/30 23:58:04 2.30 --- modsupport.h 2000/07/08 17:25:54 2.31 *************** *** 1,8 **** - #ifndef Py_MODSUPPORT_H - #define Py_MODSUPPORT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 15,18 **** --- 9,18 ---- ******************************************************************/ + #ifndef Py_MODSUPPORT_H + #define Py_MODSUPPORT_H + #ifdef __cplusplus + extern "C" { + #endif + /* Module support interface */ *************** *** 21,29 **** #include ! extern DL_IMPORT(int) PyArg_Parse Py_PROTO((PyObject *, char *, ...)); ! extern DL_IMPORT(int) PyArg_ParseTuple Py_PROTO((PyObject *, char *, ...)); ! extern DL_IMPORT(int) PyArg_ParseTupleAndKeywords Py_PROTO((PyObject *, PyObject *, ! char *, char **, ...)); ! extern DL_IMPORT(PyObject *) Py_BuildValue Py_PROTO((char *, ...)); #else --- 21,29 ---- #include ! extern DL_IMPORT(int) PyArg_Parse(PyObject *, char *, ...); ! extern DL_IMPORT(int) PyArg_ParseTuple(PyObject *, char *, ...); ! extern DL_IMPORT(int) PyArg_ParseTupleAndKeywords(PyObject *, PyObject *, ! char *, char **, ...); ! extern DL_IMPORT(PyObject *) Py_BuildValue(char *, ...); #else *************** *** 38,43 **** #endif ! extern DL_IMPORT(int) PyArg_VaParse Py_PROTO((PyObject *, char *, va_list)); ! extern DL_IMPORT(PyObject *) Py_VaBuildValue Py_PROTO((char *, va_list)); #define PYTHON_API_VERSION 1009 --- 38,43 ---- #endif ! extern DL_IMPORT(int) PyArg_VaParse(PyObject *, char *, va_list); ! extern DL_IMPORT(PyObject *) Py_VaBuildValue(char *, va_list); #define PYTHON_API_VERSION 1009 *************** *** 90,96 **** #define Py_InitModule4 Py_InitModule4TraceRefs #endif - extern DL_IMPORT(PyObject *) Py_InitModule4 Py_PROTO((char *, PyMethodDef *, - char *, PyObject *, int)); #define Py_InitModule(name, methods) \ Py_InitModule4(name, methods, (char *)NULL, (PyObject *)NULL, \ --- 90,98 ---- #define Py_InitModule4 Py_InitModule4TraceRefs #endif + + extern DL_IMPORT(PyObject *) Py_InitModule4(char *name, PyMethodDef *methods, + char *doc, PyObject *self, + int apiver); #define Py_InitModule(name, methods) \ Py_InitModule4(name, methods, (char *)NULL, (PyObject *)NULL, \ Index: pyerrors.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyerrors.h,v retrieving revision 2.37 retrieving revision 2.38 diff -C2 -r2.37 -r2.38 *** pyerrors.h 2000/06/30 23:58:04 2.37 --- pyerrors.h 2000/07/08 17:25:55 2.38 *************** *** 17,32 **** /* Error handling definitions */ ! DL_IMPORT(void) PyErr_SetNone Py_PROTO((PyObject *)); ! DL_IMPORT(void) PyErr_SetObject Py_PROTO((PyObject *, PyObject *)); ! DL_IMPORT(void) PyErr_SetString Py_PROTO((PyObject *, const char *)); ! DL_IMPORT(PyObject *) PyErr_Occurred Py_PROTO((void)); ! DL_IMPORT(void) PyErr_Clear Py_PROTO((void)); ! DL_IMPORT(void) PyErr_Fetch Py_PROTO((PyObject **, PyObject **, PyObject **)); ! DL_IMPORT(void) PyErr_Restore Py_PROTO((PyObject *, PyObject *, PyObject *)); /* Error testing and normalization */ ! DL_IMPORT(int) PyErr_GivenExceptionMatches Py_PROTO((PyObject *, PyObject *)); ! DL_IMPORT(int) PyErr_ExceptionMatches Py_PROTO((PyObject *)); ! DL_IMPORT(void) PyErr_NormalizeException Py_PROTO((PyObject**, PyObject**, PyObject**)); --- 17,32 ---- /* Error handling definitions */ ! DL_IMPORT(void) PyErr_SetNone(PyObject *); ! DL_IMPORT(void) PyErr_SetObject(PyObject *, PyObject *); ! DL_IMPORT(void) PyErr_SetString(PyObject *, const char *); ! DL_IMPORT(PyObject *) PyErr_Occurred(void); ! DL_IMPORT(void) PyErr_Clear(void); ! DL_IMPORT(void) PyErr_Fetch(PyObject **, PyObject **, PyObject **); ! DL_IMPORT(void) PyErr_Restore(PyObject *, PyObject *, PyObject *); /* Error testing and normalization */ ! DL_IMPORT(int) PyErr_GivenExceptionMatches(PyObject *, PyObject *); ! DL_IMPORT(int) PyErr_ExceptionMatches(PyObject *); ! DL_IMPORT(void) PyErr_NormalizeException(PyObject**, PyObject**, PyObject**); *************** *** 55,58 **** --- 55,60 ---- extern DL_IMPORT(PyObject *) PyExc_NotImplementedError; extern DL_IMPORT(PyObject *) PyExc_SyntaxError; + extern DL_IMPORT(PyObject *) PyExc_IndentationError; + extern DL_IMPORT(PyObject *) PyExc_TabError; extern DL_IMPORT(PyObject *) PyExc_SystemError; extern DL_IMPORT(PyObject *) PyExc_SystemExit; *************** *** 71,79 **** /* Convenience functions */ ! extern DL_IMPORT(int) PyErr_BadArgument Py_PROTO((void)); ! extern DL_IMPORT(PyObject *) PyErr_NoMemory Py_PROTO((void)); ! extern DL_IMPORT(PyObject *) PyErr_SetFromErrno Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyErr_SetFromErrnoWithFilename Py_PROTO((PyObject *, char *)); ! extern DL_IMPORT(PyObject *) PyErr_Format Py_PROTO((PyObject *, const char *, ...)); #ifdef MS_WINDOWS extern DL_IMPORT(PyObject *) PyErr_SetFromWindowsErrWithFilename(int, const char *); --- 73,81 ---- /* Convenience functions */ ! extern DL_IMPORT(int) PyErr_BadArgument(void); ! extern DL_IMPORT(PyObject *) PyErr_NoMemory(void); ! extern DL_IMPORT(PyObject *) PyErr_SetFromErrno(PyObject *); ! extern DL_IMPORT(PyObject *) PyErr_SetFromErrnoWithFilename(PyObject *, char *); ! extern DL_IMPORT(PyObject *) PyErr_Format(PyObject *, const char *, ...); #ifdef MS_WINDOWS extern DL_IMPORT(PyObject *) PyErr_SetFromWindowsErrWithFilename(int, const char *); *************** *** 81,93 **** #endif ! extern DL_IMPORT(void) PyErr_BadInternalCall Py_PROTO((void)); /* Function to create a new exception */ ! DL_IMPORT(PyObject *) PyErr_NewException Py_PROTO((char *name, PyObject *base, ! PyObject *dict)); /* In sigcheck.c or signalmodule.c */ ! extern DL_IMPORT(int) PyErr_CheckSignals Py_PROTO((void)); ! extern DL_IMPORT(void) PyErr_SetInterrupt Py_PROTO((void)); --- 83,95 ---- #endif ! extern DL_IMPORT(void) PyErr_BadInternalCall(void); /* Function to create a new exception */ ! DL_IMPORT(PyObject *) PyErr_NewException(char *name, PyObject *base, ! PyObject *dict); /* In sigcheck.c or signalmodule.c */ ! extern DL_IMPORT(int) PyErr_CheckSignals(void); ! extern DL_IMPORT(void) PyErr_SetInterrupt(void); From python-dev@python.org Sat Jul 8 18:43:35 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 8 Jul 2000 10:43:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects object.c,2.82,2.83 Message-ID: <200007081743.KAA14976@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv14846/Objects Modified Files: object.c Log Message: - changed __repr__ to use "unicode escape" encoding for unicode strings, instead of the default encoding. (see "minidom" thread for discussion, and also patch #100706) Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.82 retrieving revision 2.83 diff -C2 -r2.82 -r2.83 *** object.c 2000/07/08 12:06:36 2.82 --- object.c 2000/07/08 17:43:32 2.83 *************** *** 268,272 **** if (PyUnicode_Check(res)) { PyObject* str; ! str = PyUnicode_AsEncodedString(res, NULL, NULL); Py_DECREF(res); if (str) --- 268,272 ---- if (PyUnicode_Check(res)) { PyObject* str; ! str = PyUnicode_AsUnicodeEscapeString(res); Py_DECREF(res); if (str) From python-dev@python.org Sat Jul 8 19:06:44 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 8 Jul 2000 11:06:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC WinMain.c,1.3,1.4 Message-ID: <200007081806.LAA23038@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv20032/PC Modified Files: WinMain.c Log Message: - this is a tentative checkin of the #100764 patch (by Barry Scott). it appears to solve the problem on NT and 2000, but not on Windows 95. in other words, it's better than before, but not per- fect. I'll leave the patch open for now. Index: WinMain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/WinMain.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** WinMain.c 1998/08/08 20:00:49 1.3 --- WinMain.c 2000/07/08 18:06:41 1.4 *************** *** 1,5 **** --- 1,9 ---- /* Minimal main program -- everything is loaded from the library. */ + #define WINDOWS_LEAN_AND_MEAN #include + #include + #include + #include "Python.h" *************** *** 7,16 **** int WINAPI WinMain( ! HINSTANCE hInstance, // handle to current instance ! HINSTANCE hPrevInstance, // handle to previous instance ! LPSTR lpCmdLine, // pointer to command line ! int nCmdShow // show state of window ) { ! return Py_Main(__argc, __argv); } --- 11,48 ---- int WINAPI WinMain( ! HINSTANCE hInstance, /* handle to current instance */ ! HINSTANCE hPrevInstance, /* handle to previous instance */ ! LPSTR lpCmdLine, /* pointer to command line */ ! int nCmdShow /* show state of window */ ) { ! int null_file; ! ! /* ! * make sure that the C RTL has valid file descriptors for ! * stdin, stdout, stderr. Use the NUL device if necessary. ! * This allows popen to work under pythonw. ! * ! * When pythonw.exe starts the C RTL function _ioinit is called ! * first. WinMain is called later hence the need to check for ! * invalid handles. ! * ! * Note: FILE stdin, stdout, stderr do not use the file descriptors ! * setup here. They are already initialised before WinMain was called. ! */ ! ! null_file = open("NUL", _O_RDWR); ! ! if (_get_osfhandle(0) == -1) ! dup2(null_file, 0); ! ! if (_get_osfhandle(1) == -1) ! dup2(null_file, 1); ! ! if (_get_osfhandle(2) == -1) ! dup2(null_file, 2); ! ! close(null_file); ! ! return Py_Main(__argc, __argv); } From python-dev@python.org Sat Jul 8 20:57:41 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 8 Jul 2000 12:57:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _localemodule.c,2.9,2.10 Message-ID: <200007081957.MAA02398@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2292/Modules Modified Files: _localemodule.c Log Message: - added _getdefaultlocale implementation for WIN32 - ansified, reindentified, spacified, nullified Index: _localemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_localemodule.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** _localemodule.c 2000/06/28 21:23:33 2.9 --- _localemodule.c 2000/07/08 19:57:37 2.10 *************** *** 7,10 **** --- 7,11 ---- This software comes with no warranty. Use at your own risk. + ******************************************************************/ *************** *** 15,24 **** #include #include #include "Python.h" #ifdef macintosh ! char *strdup Py_PROTO((char *)); #endif ! static char locale__doc__[]="Support for POSIX locales."; static PyObject *Error; --- 16,32 ---- #include #include + #include "Python.h" + + #if defined(MS_WIN32) + #define WINDOWS_LEAN_AND_MEAN + #include + #endif + #ifdef macintosh ! char *strdup(char *); #endif ! static char locale__doc__[] = "Support for POSIX locales."; static PyObject *Error; *************** *** 26,310 **** /* support functions for formatting floating point numbers */ ! static char setlocale__doc__[]= "(integer,string=None) -> string. Activates/queries locale processing." ; /* to record the LC_NUMERIC settings */ ! static PyObject* grouping=0; ! static PyObject* thousands_sep=0; ! static PyObject* decimal_point=0; /* if non-null, indicates that LC_NUMERIC is different from "C" */ ! static char* saved_numeric=0; /* the grouping is terminated by either 0 or CHAR_MAX */ static PyObject* ! copy_grouping(s) ! char* s; { ! int i; ! PyObject *result,*val=0; ! if(s[0]=='\0') ! /* empty string: no grouping at all */ ! return PyList_New(0); ! for(i=0;s[i]!='\0' && s[i]!=CHAR_MAX;i++) ! /* nothing */; ! result = PyList_New(i+1); ! if(!result)return NULL; ! i=-1; ! do{ ! i++; ! val=PyInt_FromLong(s[i]); ! if(!val)break; ! if(PyList_SetItem(result,i,val)){ ! Py_DECREF(val); ! val=0; ! break; } ! }while(s[i]!='\0' && s[i]!=CHAR_MAX); ! if(!val){ ! Py_DECREF(result); ! return NULL; ! } ! return result; } static void ! fixup_ulcase() { ! PyObject *mods,*strop,*string,*ulo; ! unsigned char ul[256]; ! int n,c; ! ! /* finding sys.modules */ ! mods=PyImport_GetModuleDict(); ! if(!mods)return; ! /* finding the module */ ! string=PyDict_GetItemString(mods,"string"); ! if(string) ! string=PyModule_GetDict(string); ! strop=PyDict_GetItemString(mods,"strop"); ! if(strop) ! strop=PyModule_GetDict(strop); ! if(!string && !strop)return; ! /* create uppercase */ ! n = 0; ! for (c = 0; c < 256; c++) { ! if (isupper(c)) ! ul[n++] = c; ! } ! ulo=PyString_FromStringAndSize((const char *)ul,n); ! if(!ulo)return; ! if(string) ! PyDict_SetItemString(string,"uppercase",ulo); ! if(strop) ! PyDict_SetItemString(strop,"uppercase",ulo); ! Py_DECREF(ulo); ! /* create lowercase */ ! n = 0; ! for (c = 0; c < 256; c++) { ! if (islower(c)) ! ul[n++] = c; ! } ! ulo=PyString_FromStringAndSize((const char *)ul,n); ! if(!ulo)return; ! if(string) ! PyDict_SetItemString(string,"lowercase",ulo); ! if(strop) ! PyDict_SetItemString(strop,"lowercase",ulo); ! Py_DECREF(ulo); ! /* create letters */ ! n = 0; ! for (c = 0; c < 256; c++) { ! if (isalpha(c)) ! ul[n++] = c; ! } ! ulo=PyString_FromStringAndSize((const char *)ul,n); ! if(!ulo)return; ! if(string) ! PyDict_SetItemString(string,"letters",ulo); ! Py_DECREF(ulo); } static PyObject* ! PyLocale_setlocale(self,args) ! PyObject *self; ! PyObject *args; { ! int category; ! char *locale=0,*result; ! PyObject *result_object; ! struct lconv *lc; ! if(!PyArg_ParseTuple(args,"i|z:setlocale",&category,&locale))return 0; ! if(locale){ ! /* set locale */ ! result=setlocale(category,locale); ! if(!result){ ! /* operation failed, no setting was changed */ ! PyErr_SetString(Error,"locale setting not supported"); ! return NULL; ! } ! result_object=PyString_FromString(result); ! if(!result)return NULL; ! /* record changes to LC_NUMERIC */ ! if(category==LC_NUMERIC || category==LC_ALL){ ! if(strcmp(locale,"C")==0 || strcmp(locale,"POSIX")==0){ ! /* user just asked for default numeric locale */ ! if(saved_numeric)free(saved_numeric); ! saved_numeric=0; ! }else{ ! /* remember values */ ! lc=localeconv(); ! Py_XDECREF(grouping); ! grouping=copy_grouping(lc->grouping); ! Py_XDECREF(thousands_sep); ! thousands_sep=PyString_FromString(lc->thousands_sep); ! Py_XDECREF(decimal_point); ! decimal_point=PyString_FromString(lc->decimal_point); ! saved_numeric = strdup(locale); ! ! /* restore to "C" */ ! setlocale(LC_NUMERIC,"C"); ! } ! } ! /* record changes to LC_CTYPE */ ! if(category==LC_CTYPE || category==LC_ALL) ! fixup_ulcase(); ! /* things that got wrong up to here are ignored */ ! PyErr_Clear(); ! }else{ ! /* get locale */ ! /* restore LC_NUMERIC first, if appropriate */ ! if(saved_numeric) ! setlocale(LC_NUMERIC,saved_numeric); ! result=setlocale(category,NULL); ! if(!result){ ! PyErr_SetString(Error,"locale query failed"); ! return NULL; } ! result_object=PyString_FromString(result); ! /* restore back to "C" */ ! if(saved_numeric) ! setlocale(LC_NUMERIC,"C"); ! } ! return result_object; } ! static char localeconv__doc__[]= "() -> dict. Returns numeric and monetary locale-specific parameters." ; static PyObject* ! PyLocale_localeconv(self,args) ! PyObject *self; ! PyObject *args; { ! PyObject* result; ! struct lconv *l; ! PyObject *x; ! if(!PyArg_NoArgs(args))return 0; ! result = PyDict_New(); ! if(!result)return 0; ! /* if LC_NUMERIC is different in the C library, use saved value */ ! l = localeconv(); ! /* hopefully, the localeconv result survives the C library calls ! involved herein */ ! #define RESULT_STRING(s) \ ! x=PyString_FromString(l->s);if(!x)goto failed;PyDict_SetItemString(result,#s,x);Py_XDECREF(x) ! #define RESULT_INT(i) \ ! x=PyInt_FromLong(l->i);if(!x)goto failed;PyDict_SetItemString(result,#i,x);Py_XDECREF(x) /* Numeric information */ ! if(saved_numeric){ ! /* cannot use localeconv results */ ! PyDict_SetItemString(result,"decimal_point",decimal_point); ! PyDict_SetItemString(result,"grouping",grouping); ! PyDict_SetItemString(result,"thousands_sep",thousands_sep); ! }else{ ! RESULT_STRING(decimal_point); ! RESULT_STRING(thousands_sep); ! x=copy_grouping(l->grouping); ! if(!x)goto failed; ! PyDict_SetItemString(result,"grouping",x); ! Py_XDECREF(x); ! } ! ! /* Monetary information */ ! RESULT_STRING(int_curr_symbol); ! RESULT_STRING(currency_symbol); ! RESULT_STRING(mon_decimal_point); ! RESULT_STRING(mon_thousands_sep); ! x=copy_grouping(l->mon_grouping); ! if(!x)goto failed; ! PyDict_SetItemString(result,"mon_grouping",x); ! Py_XDECREF(x); ! RESULT_STRING(positive_sign); ! RESULT_STRING(negative_sign); ! RESULT_INT(int_frac_digits); ! RESULT_INT(frac_digits); ! RESULT_INT(p_cs_precedes); ! RESULT_INT(p_sep_by_space); ! RESULT_INT(n_cs_precedes); ! RESULT_INT(n_sep_by_space); ! RESULT_INT(p_sign_posn); ! RESULT_INT(n_sign_posn); ! ! return result; ! failed: ! Py_XDECREF(result); ! Py_XDECREF(x); ! return NULL; } ! static char strcoll__doc__[]= "string,string -> int. Compares two strings according to the locale." ; static PyObject* ! PyLocale_strcoll(self,args) ! PyObject *self; ! PyObject *args; { char *s1,*s2; ! if(!PyArg_ParseTuple(args,"ss:strcoll",&s1,&s2)) ! return NULL; ! return PyInt_FromLong(strcoll(s1,s2)); } ! static char strxfrm__doc__[]= "string -> string. Returns a string that behaves for cmp locale-aware." ; static PyObject* ! PyLocale_strxfrm(self,args) ! PyObject* self; ! PyObject* args; { ! char *s,*buf; ! size_t n1,n2; ! PyObject *result; ! if(!PyArg_ParseTuple(args,"s:strxfrm",&s)) ! return NULL; ! /* assume no change in size, first */ ! n1=strlen(s)+1; ! buf=PyMem_Malloc(n1); ! if(!buf)return PyErr_NoMemory(); ! n2=strxfrm(buf,s,n1); ! if(n2>n1){ ! /* more space needed */ ! buf=PyMem_Realloc(buf,n2); ! if(!buf)return PyErr_NoMemory(); ! strxfrm(buf,s,n2); ! } ! result=PyString_FromString(buf); ! PyMem_Free(buf); ! return result; } static struct PyMethodDef PyLocale_Methods[] = { ! {"setlocale",(PyCFunction)PyLocale_setlocale,1,setlocale__doc__}, ! {"localeconv",(PyCFunction)PyLocale_localeconv,0,localeconv__doc__}, ! {"strcoll",(PyCFunction)PyLocale_strcoll,1,strcoll__doc__}, ! {"strxfrm",(PyCFunction)PyLocale_strxfrm,1,strxfrm__doc__}, {NULL, NULL} }; --- 34,389 ---- /* support functions for formatting floating point numbers */ ! static char setlocale__doc__[] = "(integer,string=None) -> string. Activates/queries locale processing." ; /* to record the LC_NUMERIC settings */ ! static PyObject* grouping = NULL; ! static PyObject* thousands_sep = NULL; ! static PyObject* decimal_point = NULL; /* if non-null, indicates that LC_NUMERIC is different from "C" */ ! static char* saved_numeric = NULL; /* the grouping is terminated by either 0 or CHAR_MAX */ static PyObject* ! copy_grouping(char* s) { ! int i; ! PyObject *result, *val = NULL; ! ! if (s[0] == '\0') ! /* empty string: no grouping at all */ ! return PyList_New(0); ! ! for (i = 0; s[i] != '\0' && s[i] != CHAR_MAX; i++) ! ; /* nothing */ ! ! result = PyList_New(i+1); ! if (!result) ! return NULL; ! ! i = -1; ! do { ! i++; ! val = PyInt_FromLong(s[i]); ! if (!val) ! break; ! if (PyList_SetItem(result, i, val)) { ! Py_DECREF(val); ! val = 0; ! break; ! } ! } while (s[i] != '\0' && s[i] != CHAR_MAX); ! ! if (!val) { ! Py_DECREF(result); ! return NULL; } ! ! return result; } static void ! fixup_ulcase(void) { ! PyObject *mods, *strop, *string, *ulo; ! unsigned char ul[256]; ! int n, c; ! ! /* find the string and strop modules */ ! mods = PyImport_GetModuleDict(); ! if (!mods) ! return; ! string = PyDict_GetItemString(mods, "string"); ! if (string) ! string = PyModule_GetDict(string); ! strop=PyDict_GetItemString(mods, "strop"); ! if (strop) ! strop = PyModule_GetDict(strop); ! if (!string && !strop) ! return; ! ! /* create uppercase map string */ ! n = 0; ! for (c = 0; c < 256; c++) { ! if (isupper(c)) ! ul[n++] = c; ! } ! ulo = PyString_FromStringAndSize((const char *)ul, n); ! if(!ulo) ! return; ! if (string) ! PyDict_SetItemString(string, "uppercase", ulo); ! if (strop) ! PyDict_SetItemString(strop, "uppercase", ulo); ! Py_DECREF(ulo); ! ! /* create lowercase string */ ! n = 0; ! for (c = 0; c < 256; c++) { ! if (islower(c)) ! ul[n++] = c; ! } ! ulo = PyString_FromStringAndSize((const char *)ul, n); ! if (!ulo) ! return; ! if (string) ! PyDict_SetItemString(string, "lowercase", ulo); ! if (strop) ! PyDict_SetItemString(strop, "lowercase", ulo); ! Py_DECREF(ulo); ! ! /* create letters string */ ! n = 0; ! for (c = 0; c < 256; c++) { ! if (isalpha(c)) ! ul[n++] = c; ! } ! ulo = PyString_FromStringAndSize((const char *)ul, n); ! if (!ulo) ! return; ! if (string) ! PyDict_SetItemString(string, "letters", ulo); ! Py_DECREF(ulo); } static PyObject* ! PyLocale_setlocale(PyObject* self, PyObject* args) { ! int category; ! char *locale = NULL, *result; ! PyObject *result_object; ! struct lconv *lc; ! ! if (!PyArg_ParseTuple(args, "i|z:setlocale", &category, &locale)) ! return 0; ! ! if (locale) { ! /* set locale */ ! result = setlocale(category, locale); ! if (!result) { ! /* operation failed, no setting was changed */ ! PyErr_SetString(Error, "locale setting not supported"); ! return NULL; ! } ! result_object = PyString_FromString(result); ! if (!result) ! return NULL; ! /* record changes to LC_NUMERIC */ ! if (category == LC_NUMERIC || category == LC_ALL) { ! if (strcmp(locale, "C") == 0 || strcmp(locale, "POSIX") == 0) { ! /* user just asked for default numeric locale */ ! if (saved_numeric) ! free(saved_numeric); ! saved_numeric = NULL; ! } else { ! /* remember values */ ! lc = localeconv(); ! Py_XDECREF(grouping); ! grouping = copy_grouping(lc->grouping); ! Py_XDECREF(thousands_sep); ! thousands_sep = PyString_FromString(lc->thousands_sep); ! Py_XDECREF(decimal_point); ! decimal_point = PyString_FromString(lc->decimal_point); ! saved_numeric = strdup(locale); ! /* restore to "C" */ ! setlocale(LC_NUMERIC, "C"); ! } ! } ! /* record changes to LC_CTYPE */ ! if (category == LC_CTYPE || category == LC_ALL) ! fixup_ulcase(); ! /* things that got wrong up to here are ignored */ ! PyErr_Clear(); ! } else { ! /* get locale */ ! /* restore LC_NUMERIC first, if appropriate */ ! if (saved_numeric) ! setlocale(LC_NUMERIC, saved_numeric); ! result = setlocale(category, NULL); ! if (!result) { ! PyErr_SetString(Error, "locale query failed"); ! return NULL; ! } ! result_object = PyString_FromString(result); ! /* restore back to "C" */ ! if (saved_numeric) ! setlocale(LC_NUMERIC, "C"); } ! return result_object; } ! static char localeconv__doc__[] = "() -> dict. Returns numeric and monetary locale-specific parameters." ; static PyObject* ! PyLocale_localeconv(PyObject* self, PyObject* args) { ! PyObject* result; ! struct lconv *l; ! PyObject *x; ! ! if (!PyArg_NoArgs(args)) ! return 0; ! ! result = PyDict_New(); ! if(!result) ! return 0; ! ! /* if LC_NUMERIC is different in the C library, use saved value */ ! l = localeconv(); ! ! /* hopefully, the localeconv result survives the C library calls ! involved herein */ ! ! #define RESULT_STRING(s)\ ! x = PyString_FromString(l->s);\ ! if (!x) goto failed;\ ! PyDict_SetItemString(result, #s, x);\ ! Py_XDECREF(x) ! ! #define RESULT_INT(i)\ ! x = PyInt_FromLong(l->i);\ ! if (!x) goto failed;\ ! PyDict_SetItemString(result, #i, x);\ ! Py_XDECREF(x) /* Numeric information */ ! if (saved_numeric){ ! /* cannot use localeconv results */ ! PyDict_SetItemString(result, "decimal_point", decimal_point); ! PyDict_SetItemString(result, "grouping", grouping); ! PyDict_SetItemString(result, "thousands_sep", thousands_sep); ! } else { ! RESULT_STRING(decimal_point); ! RESULT_STRING(thousands_sep); ! x = copy_grouping(l->grouping); ! if (!x) ! goto failed; ! PyDict_SetItemString(result, "grouping", x); ! Py_XDECREF(x); ! } ! ! /* Monetary information */ ! RESULT_STRING(int_curr_symbol); ! RESULT_STRING(currency_symbol); ! RESULT_STRING(mon_decimal_point); ! RESULT_STRING(mon_thousands_sep); ! x = copy_grouping(l->mon_grouping); ! if (!x) ! goto failed; ! PyDict_SetItemString(result, "mon_grouping", x); ! Py_XDECREF(x); ! RESULT_STRING(positive_sign); ! RESULT_STRING(negative_sign); ! RESULT_INT(int_frac_digits); ! RESULT_INT(frac_digits); ! RESULT_INT(p_cs_precedes); ! RESULT_INT(p_sep_by_space); ! RESULT_INT(n_cs_precedes); ! RESULT_INT(n_sep_by_space); ! RESULT_INT(p_sign_posn); ! RESULT_INT(n_sign_posn); ! return result; ! ! failed: ! Py_XDECREF(result); ! Py_XDECREF(x); ! return NULL; } ! static char strcoll__doc__[] = "string,string -> int. Compares two strings according to the locale." ; static PyObject* ! PyLocale_strcoll(PyObject* self, PyObject* args) { char *s1,*s2; ! ! if (!PyArg_ParseTuple(args, "ss:strcoll", &s1, &s2)) ! return NULL; ! return PyInt_FromLong(strcoll(s1, s2)); } ! static char strxfrm__doc__[] = "string -> string. Returns a string that behaves for cmp locale-aware." ; static PyObject* ! PyLocale_strxfrm(PyObject* self, PyObject* args) { ! char *s, *buf; ! size_t n1, n2; ! PyObject *result; ! ! if(!PyArg_ParseTuple(args, "s:strxfrm", &s)) ! return NULL; ! ! /* assume no change in size, first */ ! n1 = strlen(s) + 1; ! buf = PyMem_Malloc(n1); ! if (!buf) ! return PyErr_NoMemory(); ! n2 = strxfrm(buf, s, n1); ! if (n2 > n1) { ! /* more space needed */ ! buf = PyMem_Realloc(buf, n2); ! if (!buf) ! return PyErr_NoMemory(); ! strxfrm(buf, s, n2); ! } ! result = PyString_FromString(buf); ! PyMem_Free(buf); ! return result; } + #if defined(MS_WIN32) + static PyObject* + PyLocale_getdefaultlocale(PyObject* self, PyObject* args) + { + char encoding[100]; + char locale[100]; + + sprintf(encoding, "cp%d", GetACP()); + + if (GetLocaleInfo(LOCALE_USER_DEFAULT, + LOCALE_SISO639LANGNAME, + locale, sizeof(locale))) { + int i = strlen(locale); + locale[i++] = '_'; + if (GetLocaleInfo(LOCALE_USER_DEFAULT, + LOCALE_SISO3166CTRYNAME, + locale+i, sizeof(locale)-i)) + return Py_BuildValue("ss", locale, encoding); + } + + /* If we end up here, this windows version didn't know about + ISO639/ISO3166 names (it's probably Windows 95). Return the + Windows language identifier instead (a hexadecimal number) */ + + locale[0] = '0'; + locale[1] = 'x'; + if (GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_IDEFAULTLANGUAGE, + locale+2, sizeof(locale)-2)) { + return Py_BuildValue("ss", locale, encoding); + } + + /* cannot determine the language code (very unlikely) */ + Py_INCREF(Py_None); + return Py_BuildValue("Os", Py_None, encoding); + } + #endif + static struct PyMethodDef PyLocale_Methods[] = { ! {"setlocale", (PyCFunction) PyLocale_setlocale, 1, setlocale__doc__}, ! {"localeconv", (PyCFunction) PyLocale_localeconv, 0, localeconv__doc__}, ! {"strcoll", (PyCFunction) PyLocale_strcoll, 1, strcoll__doc__}, ! {"strxfrm", (PyCFunction) PyLocale_strxfrm, 1, strxfrm__doc__}, ! #if defined(MS_WIN32) ! {"_getdefaultlocale", (PyCFunction) PyLocale_getdefaultlocale, 1}, ! #endif {NULL, NULL} }; *************** *** 313,361 **** init_locale() { ! PyObject *m,*d,*x; ! m=Py_InitModule("_locale",PyLocale_Methods); ! d = PyModule_GetDict(m); ! x=PyInt_FromLong(LC_CTYPE); ! PyDict_SetItemString(d,"LC_CTYPE",x); ! Py_XDECREF(x); ! ! x=PyInt_FromLong(LC_TIME); ! PyDict_SetItemString(d,"LC_TIME",x); ! Py_XDECREF(x); ! ! x=PyInt_FromLong(LC_COLLATE); ! PyDict_SetItemString(d,"LC_COLLATE",x); ! Py_XDECREF(x); ! ! x=PyInt_FromLong(LC_MONETARY); ! PyDict_SetItemString(d,"LC_MONETARY",x); ! Py_XDECREF(x); #ifdef LC_MESSAGES ! x=PyInt_FromLong(LC_MESSAGES); ! PyDict_SetItemString(d,"LC_MESSAGES",x); ! Py_XDECREF(x); #endif /* LC_MESSAGES */ ! x=PyInt_FromLong(LC_NUMERIC); ! PyDict_SetItemString(d,"LC_NUMERIC",x); ! Py_XDECREF(x); ! ! x=PyInt_FromLong(LC_ALL); ! PyDict_SetItemString(d,"LC_ALL",x); ! Py_XDECREF(x); ! ! x=PyInt_FromLong(CHAR_MAX); ! PyDict_SetItemString(d,"CHAR_MAX",x); ! Py_XDECREF(x); ! ! Error = PyErr_NewException("locale.Error", NULL, NULL); ! PyDict_SetItemString(d, "Error", Error); ! ! x=PyString_FromString(locale__doc__); ! PyDict_SetItemString(d,"__doc__",x); ! Py_XDECREF(x); ! if(PyErr_Occurred()) ! Py_FatalError("Can't initialize module locale"); } --- 392,443 ---- init_locale() { ! PyObject *m, *d, *x; ! ! m = Py_InitModule("_locale", PyLocale_Methods); ! ! d = PyModule_GetDict(m); ! ! x = PyInt_FromLong(LC_CTYPE); ! PyDict_SetItemString(d, "LC_CTYPE", x); ! Py_XDECREF(x); ! ! x = PyInt_FromLong(LC_TIME); ! PyDict_SetItemString(d, "LC_TIME", x); ! Py_XDECREF(x); + x = PyInt_FromLong(LC_COLLATE); + PyDict_SetItemString(d, "LC_COLLATE", x); + Py_XDECREF(x); + + x = PyInt_FromLong(LC_MONETARY); + PyDict_SetItemString(d, "LC_MONETARY", x); + Py_XDECREF(x); + #ifdef LC_MESSAGES ! x = PyInt_FromLong(LC_MESSAGES); ! PyDict_SetItemString(d, "LC_MESSAGES", x); ! Py_XDECREF(x); #endif /* LC_MESSAGES */ + + x = PyInt_FromLong(LC_NUMERIC); + PyDict_SetItemString(d, "LC_NUMERIC", x); + Py_XDECREF(x); ! x = PyInt_FromLong(LC_ALL); ! PyDict_SetItemString(d, "LC_ALL", x); ! Py_XDECREF(x); ! ! x = PyInt_FromLong(CHAR_MAX); ! PyDict_SetItemString(d, "CHAR_MAX", x); ! Py_XDECREF(x); ! ! Error = PyErr_NewException("locale.Error", NULL, NULL); ! PyDict_SetItemString(d, "Error", Error); ! ! x = PyString_FromString(locale__doc__); ! PyDict_SetItemString(d, "__doc__", x); ! Py_XDECREF(x); ! if (PyErr_Occurred()) ! Py_FatalError("Can't initialize module locale"); } From python-dev@python.org Sat Jul 8 21:07:27 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 8 Jul 2000 13:07:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _localemodule.c,2.10,2.11 Message-ID: <200007082007.NAA09408@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv9392/Modules Modified Files: _localemodule.c Log Message: - _getdefaultlocale shouldn't accept arguments - some more spacification... Index: _localemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_localemodule.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** _localemodule.c 2000/07/08 19:57:37 2.10 --- _localemodule.c 2000/07/08 20:07:24 2.11 *************** *** 71,75 **** if (PyList_SetItem(result, i, val)) { Py_DECREF(val); ! val = 0; break; } --- 71,75 ---- if (PyList_SetItem(result, i, val)) { Py_DECREF(val); ! val = NULL; break; } *************** *** 111,115 **** } ulo = PyString_FromStringAndSize((const char *)ul, n); ! if(!ulo) return; if (string) --- 111,115 ---- } ulo = PyString_FromStringAndSize((const char *)ul, n); ! if (!ulo) return; if (string) *************** *** 158,162 **** if (!PyArg_ParseTuple(args, "i|z:setlocale", &category, &locale)) ! return 0; if (locale) { --- 158,162 ---- if (!PyArg_ParseTuple(args, "i|z:setlocale", &category, &locale)) ! return NULL; if (locale) { *************** *** 227,235 **** if (!PyArg_NoArgs(args)) ! return 0; result = PyDict_New(); ! if(!result) ! return 0; /* if LC_NUMERIC is different in the C library, use saved value */ --- 227,235 ---- if (!PyArg_NoArgs(args)) ! return NULL; result = PyDict_New(); ! if (!result) ! return NULL; /* if LC_NUMERIC is different in the C library, use saved value */ *************** *** 320,324 **** PyObject *result; ! if(!PyArg_ParseTuple(args, "s:strxfrm", &s)) return NULL; --- 320,324 ---- PyObject *result; ! if (!PyArg_ParseTuple(args, "s:strxfrm", &s)) return NULL; *************** *** 348,351 **** --- 348,354 ---- char locale[100]; + if (!PyArg_NoArgs(args)) + return NULL; + sprintf(encoding, "cp%d", GetACP()); *************** *** 384,388 **** {"strxfrm", (PyCFunction) PyLocale_strxfrm, 1, strxfrm__doc__}, #if defined(MS_WIN32) ! {"_getdefaultlocale", (PyCFunction) PyLocale_getdefaultlocale, 1}, #endif {NULL, NULL} --- 387,391 ---- {"strxfrm", (PyCFunction) PyLocale_strxfrm, 1, strxfrm__doc__}, #if defined(MS_WIN32) ! {"_getdefaultlocale", (PyCFunction) PyLocale_getdefaultlocale, 0}, #endif {NULL, NULL} From python-dev@python.org Sat Jul 8 21:50:01 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 8 Jul 2000 13:50:01 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC WinMain.c,1.4,1.5 Message-ID: <200007082050.NAA11818@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv11792/PC Modified Files: WinMain.c Log Message: - removed barry's workaround, to make room for bill's more complete solution. Index: WinMain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/WinMain.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** WinMain.c 2000/07/08 18:06:41 1.4 --- WinMain.c 2000/07/08 20:49:58 1.5 *************** *** 3,8 **** #define WINDOWS_LEAN_AND_MEAN #include - #include - #include #include "Python.h" --- 3,6 ---- *************** *** 17,48 **** ) { - int null_file; - - /* - * make sure that the C RTL has valid file descriptors for - * stdin, stdout, stderr. Use the NUL device if necessary. - * This allows popen to work under pythonw. - * - * When pythonw.exe starts the C RTL function _ioinit is called - * first. WinMain is called later hence the need to check for - * invalid handles. - * - * Note: FILE stdin, stdout, stderr do not use the file descriptors - * setup here. They are already initialised before WinMain was called. - */ - - null_file = open("NUL", _O_RDWR); - - if (_get_osfhandle(0) == -1) - dup2(null_file, 0); - - if (_get_osfhandle(1) == -1) - dup2(null_file, 1); - - if (_get_osfhandle(2) == -1) - dup2(null_file, 2); - - close(null_file); - return Py_Main(__argc, __argv); } --- 15,18 ---- From python-dev@python.org Sat Jul 8 23:05:04 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 8 Jul 2000 15:05:04 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.17,2.18 Message-ID: <200007082205.PAA28756@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv28682/Modules Modified Files: mmapmodule.c Log Message: -- ANSI-fying, names (patch #100762 by Peter Schneider-Kamp, minus the indentation changes) -- added INT_PTR workaround to make it build under VC 5.0 Index: mmapmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** mmapmodule.c 2000/07/05 12:22:14 2.17 --- mmapmodule.c 2000/07/08 22:05:01 2.18 *************** *** 25,29 **** --- 25,32 ---- #ifdef MS_WIN32 #include + #if _MSC_VER < 1200 + #define INT_PTR unsigned long #endif + #endif #ifdef UNIX *************** *** 56,60 **** static void ! mmap_object_dealloc(mmap_object * m_obj) { #ifdef MS_WIN32 --- 59,63 ---- static void ! mmap_object_dealloc(mmap_object *m_obj) { #ifdef MS_WIN32 *************** *** 75,79 **** static PyObject * ! mmap_close_method (mmap_object * self, PyObject * args) { if (!PyArg_ParseTuple(args, ":close")) --- 78,82 ---- static PyObject * ! mmap_close_method(mmap_object *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":close")) *************** *** 116,124 **** static PyObject * ! mmap_read_byte_method (mmap_object * self, ! PyObject * args) { char value; ! char * where; CHECK_VALID(NULL); if (!PyArg_ParseTuple(args, ":read_byte")) --- 119,127 ---- static PyObject * ! mmap_read_byte_method(mmap_object *self, ! PyObject *args) { char value; ! char *where; CHECK_VALID(NULL); if (!PyArg_ParseTuple(args, ":read_byte")) *************** *** 136,146 **** static PyObject * ! mmap_read_line_method (mmap_object * self, ! PyObject * args) { ! char * start = self->data+self->pos; ! char * eof = self->data+self->size; ! char * eol; ! PyObject * result; CHECK_VALID(NULL); --- 139,149 ---- static PyObject * ! mmap_read_line_method(mmap_object *self, ! PyObject *args) { ! char *start = self->data+self->pos; ! char *eof = self->data+self->size; ! char *eol; ! PyObject *result; CHECK_VALID(NULL); *************** *** 160,165 **** static PyObject * ! mmap_read_method (mmap_object * self, ! PyObject * args) { long num_bytes; --- 163,168 ---- static PyObject * ! mmap_read_method(mmap_object *self, ! PyObject *args) { long num_bytes; *************** *** 167,171 **** CHECK_VALID(NULL); ! if (!PyArg_ParseTuple (args, "l", &num_bytes)) return(NULL); --- 170,174 ---- CHECK_VALID(NULL); ! if (!PyArg_ParseTuple(args, "l:read", &num_bytes)) return(NULL); *************** *** 180,199 **** static PyObject * ! mmap_find_method (mmap_object *self, ! PyObject *args) { int start = self->pos; ! char * needle; int len; CHECK_VALID(NULL); ! if (!PyArg_ParseTuple (args, "s#|i", &needle, &len, &start)) { return NULL; } else { ! char * p = self->data+self->pos; ! char * e = self->data+self->size; while (p < e) { ! char * s = p; ! char * n = needle; while ((spos; ! char *needle; int len; CHECK_VALID(NULL); ! if (!PyArg_ParseTuple (args, "s#|i:find", &needle, &len, &start)) { return NULL; } else { ! char *p = self->data+self->pos; ! char *e = self->data+self->size; while (p < e) { ! char *s = p; ! char *n = needle; while ((ssize; CHECK_VALID(NULL); ! if (!PyArg_ParseTuple (args, "|ll", &offset, &size)) { return NULL; } else if ((offset + size) > self->size) { --- 376,385 ---- static PyObject * ! mmap_flush_method(mmap_object *self, PyObject *args) { size_t offset = 0; size_t size = self->size; CHECK_VALID(NULL); ! if (!PyArg_ParseTuple (args, "|ll:flush", &offset, &size)) { return NULL; } else if ((offset + size) > self->size) { *************** *** 404,413 **** static PyObject * ! mmap_seek_method (mmap_object * self, PyObject * args) { int dist; int how=0; CHECK_VALID(NULL); ! if (!PyArg_ParseTuple (args, "i|i", &dist, &how)) { return(NULL); } else { --- 407,416 ---- static PyObject * ! mmap_seek_method(mmap_object *self, PyObject *args) { int dist; int how=0; CHECK_VALID(NULL); ! if (!PyArg_ParseTuple (args, "i|i:seek", &dist, &how)) { return(NULL); } else { *************** *** 447,455 **** static PyObject * ! mmap_move_method (mmap_object * self, PyObject * args) { unsigned long dest, src, count; CHECK_VALID(NULL); ! if (!PyArg_ParseTuple (args, "iii", &dest, &src, &count)) { return NULL; } else { --- 450,458 ---- static PyObject * ! mmap_move_method(mmap_object *self, PyObject *args) { unsigned long dest, src, count; CHECK_VALID(NULL); ! if (!PyArg_ParseTuple (args, "iii:move", &dest, &src, &count)) { return NULL; } else { *************** *** 503,510 **** static int ! mmap_buffer_getwritebuf(self, index, ptr) ! mmap_object *self; ! int index; ! const void **ptr; { CHECK_VALID(-1); --- 506,510 ---- static int ! mmap_buffer_getwritebuf(mmap_object *self, int index, const void **ptr) { CHECK_VALID(-1); *************** *** 519,525 **** static int ! mmap_buffer_getsegcount(self, lenp) ! mmap_object *self; ! int *lenp; { CHECK_VALID(-1); --- 519,523 ---- static int ! mmap_buffer_getsegcount(mmap_object *self, int *lenp) { CHECK_VALID(-1); *************** *** 530,537 **** static int ! mmap_buffer_getcharbuffer(self, index, ptr) ! mmap_object *self; ! int index; ! const void **ptr; { if ( index != 0 ) { --- 528,532 ---- static int ! mmap_buffer_getcharbuffer(mmap_object *self, int index, const void **ptr) { if ( index != 0 ) { *************** *** 545,549 **** static PyObject * ! mmap_object_getattr(mmap_object * self, char * name) { return Py_FindMethod (mmap_object_methods, (PyObject *)self, name); --- 540,544 ---- static PyObject * ! mmap_object_getattr(mmap_object *self, char *name) { return Py_FindMethod (mmap_object_methods, (PyObject *)self, name); *************** *** 551,556 **** static int ! mmap_length(self) ! mmap_object *self; { CHECK_VALID(-1); --- 546,550 ---- static int ! mmap_length(mmap_object *self) { CHECK_VALID(-1); *************** *** 559,565 **** static PyObject * ! mmap_item(self, i) ! mmap_object *self; ! int i; { CHECK_VALID(NULL); --- 553,557 ---- static PyObject * ! mmap_item(mmap_object *self, int i) { CHECK_VALID(NULL); *************** *** 572,578 **** static PyObject * ! mmap_slice(self, ilow, ihigh) ! mmap_object *self; ! int ilow, ihigh; { CHECK_VALID(NULL); --- 564,568 ---- static PyObject * ! mmap_slice(mmap_object *self, int ilow, int ihigh) { CHECK_VALID(NULL); *************** *** 592,598 **** static PyObject * ! mmap_concat(self, bb) ! mmap_object *self; ! PyObject *bb; { CHECK_VALID(NULL); --- 582,586 ---- static PyObject * ! mmap_concat(mmap_object *self, PyObject *bb) { CHECK_VALID(NULL); *************** *** 603,609 **** static PyObject * ! mmap_repeat(self, n) ! mmap_object *self; ! int n; { CHECK_VALID(NULL); --- 591,595 ---- static PyObject * ! mmap_repeat(mmap_object *self, int n) { CHECK_VALID(NULL); *************** *** 614,621 **** static int ! mmap_ass_slice(self, ilow, ihigh, v) ! mmap_object *self; ! int ilow, ihigh; ! PyObject *v; { const char *buf; --- 600,604 ---- static int ! mmap_ass_slice(mmap_object *self, int ilow, int ihigh, PyObject *v) { const char *buf; *************** *** 649,656 **** static int ! mmap_ass_item(self, i, v) ! mmap_object *self; ! int i; ! PyObject *v; { const char *buf; --- 632,636 ---- static int ! mmap_ass_item(mmap_object *self, int i, PyObject *v) { const char *buf; *************** *** 725,730 **** success, the map size is returned. */ static int ! _GetMapSize(o) ! PyObject *o; { if (PyInt_Check(o)) { --- 705,709 ---- success, the map size is returned. */ static int ! _GetMapSize(PyObject *o) { if (PyInt_Check(o)) { *************** *** 773,779 **** #ifdef UNIX static PyObject * ! new_mmap_object (PyObject * self, PyObject * args, PyObject *kwdict) { ! mmap_object * m_obj; PyObject *map_size_obj = NULL; int map_size; --- 752,758 ---- #ifdef UNIX static PyObject * ! new_mmap_object(PyObject *self, PyObject *args, PyObject *kwdict) { ! mmap_object *m_obj; PyObject *map_size_obj = NULL; int map_size; *************** *** 810,819 **** #ifdef MS_WIN32 static PyObject * ! new_mmap_object (PyObject * self, PyObject * args) { ! mmap_object * m_obj; PyObject *map_size_obj = NULL; int map_size; ! char * tagname = ""; DWORD dwErr = 0; --- 789,798 ---- #ifdef MS_WIN32 static PyObject * ! new_mmap_object(PyObject *self, PyObject *args) { ! mmap_object *m_obj; PyObject *map_size_obj = NULL; int map_size; ! char *tagname = ""; DWORD dwErr = 0; From python-dev@python.org Sat Jul 8 23:48:56 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 8 Jul 2000 15:48:56 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.142,2.143 Message-ID: <200007082248.PAA31053@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv30977/Modules Modified Files: posixmodule.c Log Message: this one's a bit risky, but I've spent some considerable time staring at the diffs before checking this one in. let me know asap if it breaks things on your platform. -- ANSI-fying (patch #100763 by Peter Schneider-Kamp, minus the indentation changes and minus the changes the broke the windows build) Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.142 retrieving revision 2.143 diff -C2 -r2.142 -r2.143 *** posixmodule.c 2000/07/06 19:42:19 2.142 --- posixmodule.c 2000/07/08 22:48:53 2.143 *************** *** 138,170 **** #else /* !HAVE_UNISTD_H */ #if defined(PYCC_VACPP) ! extern int mkdir Py_PROTO((char *)); #else #if ( defined(__WATCOMC__) || defined(_MSC_VER) ) && !defined(__QNX__) ! extern int mkdir Py_PROTO((const char *)); #else ! extern int mkdir Py_PROTO((const char *, mode_t)); #endif #endif [...1650 lines suppressed...] static PyObject * ! posix_abort(PyObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":abort")) *************** *** 4740,4747 **** static int ! ins(d, symbol, value) ! PyObject* d; ! char* symbol; ! long value; { PyObject* v = PyInt_FromLong(value); --- 4535,4539 ---- static int ! ins(PyObject *d, char *symbol, long value) { PyObject* v = PyInt_FromLong(value); From python-dev@python.org Sun Jul 9 00:37:31 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 16:37:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include bitset.h,2.11,2.12 ceval.h,2.33,2.34 eval.h,2.12,2.13 import.h,2.24,2.25 intrcheck.h,2.7,2.8 marshal.h,2.8,2.9 node.h,2.15,2.16 parsetok.h,2.12,2.13 pydebug.h,2.13,2.14 pystate.h,2.11,2.12 structmember.h,2.14,2.15 traceback.h,2.16,2.17 Message-ID: <200007082337.QAA07411@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv7393 Modified Files: bitset.h ceval.h eval.h import.h intrcheck.h marshal.h node.h parsetok.h pydebug.h pystate.h structmember.h traceback.h Log Message: ANSI-fication and Py_PROTO extermination. Index: bitset.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/bitset.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** bitset.h 2000/06/30 23:58:04 2.11 --- bitset.h 2000/07/08 23:37:28 2.12 *************** *** 1,8 **** - #ifndef Py_BITSET_H - #define Py_BITSET_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 15,18 **** --- 9,18 ---- ******************************************************************/ + #ifndef Py_BITSET_H + #define Py_BITSET_H + #ifdef __cplusplus + extern "C" { + #endif + /* Bitset interface */ *************** *** 21,30 **** typedef BYTE *bitset; ! bitset newbitset Py_PROTO((int nbits)); ! void delbitset Py_PROTO((bitset bs)); #define testbit(ss, ibit) (((ss)[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0) ! int addbit Py_PROTO((bitset bs, int ibit)); /* Returns 0 if already set */ ! int samebitset Py_PROTO((bitset bs1, bitset bs2, int nbits)); ! void mergebitset Py_PROTO((bitset bs1, bitset bs2, int nbits)); #define BITSPERBYTE (8*sizeof(BYTE)) --- 21,30 ---- typedef BYTE *bitset; ! bitset newbitset(int nbits); ! void delbitset(bitset bs); #define testbit(ss, ibit) (((ss)[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0) ! int addbit(bitset bs, int ibit); /* Returns 0 if already set */ ! int samebitset(bitset bs1, bitset bs2, int nbits); ! void mergebitset(bitset bs1, bitset bs2, int nbits); #define BITSPERBYTE (8*sizeof(BYTE)) Index: ceval.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/ceval.h,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -r2.33 -r2.34 *** ceval.h 2000/06/30 23:58:04 2.33 --- ceval.h 2000/07/08 23:37:28 2.34 *************** *** 18,26 **** DL_IMPORT(PyObject *) PyEval_CallObjectWithKeywords ! Py_PROTO((PyObject *, PyObject *, PyObject *)); /* DLL-level Backwards compatibility: */ #undef PyEval_CallObject ! DL_IMPORT(PyObject *) PyEval_CallObject Py_PROTO((PyObject *, PyObject *)); /* Inline this */ --- 18,26 ---- DL_IMPORT(PyObject *) PyEval_CallObjectWithKeywords ! (PyObject *, PyObject *, PyObject *); /* DLL-level Backwards compatibility: */ #undef PyEval_CallObject ! DL_IMPORT(PyObject *) PyEval_CallObject(PyObject *, PyObject *); /* Inline this */ *************** *** 29,35 **** #ifdef HAVE_STDARG_PROTOTYPES ! DL_IMPORT(PyObject *) PyEval_CallFunction Py_PROTO((PyObject *obj, char *format, ...)); ! DL_IMPORT(PyObject *) PyEval_CallMethod Py_PROTO((PyObject *obj, ! char *methodname, char *format, ...)); #else /* Better to have no prototypes at all for varargs functions in this case */ --- 29,35 ---- #ifdef HAVE_STDARG_PROTOTYPES ! DL_IMPORT(PyObject *) PyEval_CallFunction(PyObject *obj, char *format, ...); ! DL_IMPORT(PyObject *) PyEval_CallMethod(PyObject *obj, ! char *methodname, char *format, ...); #else /* Better to have no prototypes at all for varargs functions in this case */ *************** *** 38,52 **** #endif ! DL_IMPORT(PyObject *) PyEval_GetBuiltins Py_PROTO((void)); ! DL_IMPORT(PyObject *) PyEval_GetGlobals Py_PROTO((void)); ! DL_IMPORT(PyObject *) PyEval_GetLocals Py_PROTO((void)); ! DL_IMPORT(PyObject *) PyEval_GetOwner Py_PROTO((void)); ! DL_IMPORT(PyObject *) PyEval_GetFrame Py_PROTO((void)); ! DL_IMPORT(int) PyEval_GetRestricted Py_PROTO((void)); ! DL_IMPORT(int) Py_FlushLine Py_PROTO((void)); ! DL_IMPORT(int) Py_AddPendingCall Py_PROTO((int (*func) Py_PROTO((ANY *)), ANY *arg)); ! DL_IMPORT(int) Py_MakePendingCalls Py_PROTO((void)); --- 38,52 ---- #endif ! DL_IMPORT(PyObject *) PyEval_GetBuiltins(void); ! DL_IMPORT(PyObject *) PyEval_GetGlobals(void); ! DL_IMPORT(PyObject *) PyEval_GetLocals(void); ! DL_IMPORT(PyObject *) PyEval_GetOwner(void); ! DL_IMPORT(PyObject *) PyEval_GetFrame(void); ! DL_IMPORT(int) PyEval_GetRestricted(void); ! DL_IMPORT(int) Py_FlushLine(void); ! DL_IMPORT(int) Py_AddPendingCall(int (*func)(ANY *), ANY *arg); ! DL_IMPORT(int) Py_MakePendingCalls(void); *************** *** 96,109 **** */ ! extern DL_IMPORT(PyThreadState *) PyEval_SaveThread Py_PROTO((void)); ! extern DL_IMPORT(void) PyEval_RestoreThread Py_PROTO((PyThreadState *)); #ifdef WITH_THREAD ! extern DL_IMPORT(void) PyEval_InitThreads Py_PROTO((void)); ! extern DL_IMPORT(void) PyEval_AcquireLock Py_PROTO((void)); ! extern DL_IMPORT(void) PyEval_ReleaseLock Py_PROTO((void)); ! extern DL_IMPORT(void) PyEval_AcquireThread Py_PROTO((PyThreadState *tstate)); ! extern DL_IMPORT(void) PyEval_ReleaseThread Py_PROTO((PyThreadState *tstate)); #define Py_BEGIN_ALLOW_THREADS { \ --- 96,109 ---- */ ! extern DL_IMPORT(PyThreadState *) PyEval_SaveThread(void); ! extern DL_IMPORT(void) PyEval_RestoreThread(PyThreadState *); #ifdef WITH_THREAD ! extern DL_IMPORT(void) PyEval_InitThreads(void); ! extern DL_IMPORT(void) PyEval_AcquireLock(void); ! extern DL_IMPORT(void) PyEval_ReleaseLock(void); ! extern DL_IMPORT(void) PyEval_AcquireThread(PyThreadState *tstate); ! extern DL_IMPORT(void) PyEval_ReleaseThread(PyThreadState *tstate); #define Py_BEGIN_ALLOW_THREADS { \ *************** *** 124,128 **** #endif /* !WITH_THREAD */ ! extern DL_IMPORT(int) _PyEval_SliceIndex Py_PROTO((PyObject *, int *)); --- 124,128 ---- #endif /* !WITH_THREAD */ ! extern DL_IMPORT(int) _PyEval_SliceIndex(PyObject *, int *); Index: eval.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/eval.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** eval.h 2000/06/30 23:58:04 2.12 --- eval.h 2000/07/08 23:37:28 2.13 *************** *** 1,8 **** - #ifndef Py_EVAL_H - #define Py_EVAL_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 16,21 **** /* Interface to execute compiled code */ ! DL_IMPORT(PyObject *) PyEval_EvalCode Py_PROTO((PyCodeObject *, PyObject *, PyObject *)); #ifdef __cplusplus --- 10,21 ---- /* Interface to execute compiled code */ + + #ifndef Py_EVAL_H + #define Py_EVAL_H + #ifdef __cplusplus + extern "C" { + #endif ! DL_IMPORT(PyObject *) PyEval_EvalCode(PyCodeObject *, PyObject *, PyObject *); #ifdef __cplusplus Index: import.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/import.h,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -r2.24 -r2.25 *** import.h 2000/06/30 23:58:04 2.24 --- import.h 2000/07/08 23:37:28 2.25 *************** *** 1,8 **** - #ifndef Py_IMPORT_H - #define Py_IMPORT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 16,51 **** /* Module definition and import interface */ ! DL_IMPORT(long) PyImport_GetMagicNumber Py_PROTO((void)); ! DL_IMPORT(PyObject *) PyImport_ExecCodeModule Py_PROTO((char *name, PyObject *co)); ! DL_IMPORT(PyObject *) PyImport_ExecCodeModuleEx Py_PROTO(( ! char *name, PyObject *co, char *pathname)); ! DL_IMPORT(PyObject *) PyImport_GetModuleDict Py_PROTO((void)); ! DL_IMPORT(PyObject *) PyImport_AddModule Py_PROTO((char *name)); ! DL_IMPORT(PyObject *) PyImport_ImportModule Py_PROTO((char *name)); ! DL_IMPORT(PyObject *) PyImport_ImportModuleEx Py_PROTO(( ! char *name, PyObject *globals, PyObject *locals, PyObject *fromlist)); ! DL_IMPORT(PyObject *) PyImport_Import Py_PROTO((PyObject *name)); ! DL_IMPORT(PyObject *) PyImport_ReloadModule Py_PROTO((PyObject *m)); ! DL_IMPORT(void) PyImport_Cleanup Py_PROTO((void)); ! DL_IMPORT(int) PyImport_ImportFrozenModule Py_PROTO((char *)); ! extern DL_IMPORT(PyObject *)_PyImport_FindExtension Py_PROTO((char *, char *)); ! extern DL_IMPORT(PyObject *)_PyImport_FixupExtension Py_PROTO((char *, char *)); struct _inittab { ! char *name; ! void (*initfunc)(); }; extern DL_IMPORT(struct _inittab *) PyImport_Inittab; ! extern DL_IMPORT(int) PyImport_AppendInittab Py_PROTO((char *name, void (*initfunc)())); ! extern DL_IMPORT(int) PyImport_ExtendInittab Py_PROTO((struct _inittab *newtab)); struct _frozen { ! char *name; ! unsigned char *code; ! int size; }; --- 10,51 ---- /* Module definition and import interface */ + + #ifndef Py_IMPORT_H + #define Py_IMPORT_H + #ifdef __cplusplus + extern "C" { + #endif ! DL_IMPORT(long) PyImport_GetMagicNumber(void); ! DL_IMPORT(PyObject *) PyImport_ExecCodeModule(char *name, PyObject *co); ! DL_IMPORT(PyObject *) PyImport_ExecCodeModuleEx( ! char *name, PyObject *co, char *pathname); ! DL_IMPORT(PyObject *) PyImport_GetModuleDict(void); ! DL_IMPORT(PyObject *) PyImport_AddModule(char *name); ! DL_IMPORT(PyObject *) PyImport_ImportModule(char *name); ! DL_IMPORT(PyObject *) PyImport_ImportModuleEx( ! char *name, PyObject *globals, PyObject *locals, PyObject *fromlist); ! DL_IMPORT(PyObject *) PyImport_Import(PyObject *name); ! DL_IMPORT(PyObject *) PyImport_ReloadModule(PyObject *m); ! DL_IMPORT(void) PyImport_Cleanup(void); ! DL_IMPORT(int) PyImport_ImportFrozenModule(char *); ! extern DL_IMPORT(PyObject *)_PyImport_FindExtension(char *, char *); ! extern DL_IMPORT(PyObject *)_PyImport_FixupExtension(char *, char *); struct _inittab { ! char *name; ! void (*initfunc)(); }; extern DL_IMPORT(struct _inittab *) PyImport_Inittab; ! extern DL_IMPORT(int) PyImport_AppendInittab(char *name, void (*initfunc)()); ! extern DL_IMPORT(int) PyImport_ExtendInittab(struct _inittab *newtab); struct _frozen { ! char *name; ! unsigned char *code; ! int size; }; Index: intrcheck.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/intrcheck.h,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** intrcheck.h 2000/06/30 23:58:04 2.7 --- intrcheck.h 2000/07/08 23:37:28 2.8 *************** *** 1,8 **** - #ifndef Py_INTRCHECK_H - #define Py_INTRCHECK_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 14,21 **** redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ ! extern DL_IMPORT(int) PyOS_InterruptOccurred Py_PROTO((void)); ! extern DL_IMPORT(void) PyOS_InitInterrupts Py_PROTO((void)); ! DL_IMPORT(void) PyOS_AfterFork Py_PROTO((void)); #ifdef __cplusplus --- 8,21 ---- redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ + + #ifndef Py_INTRCHECK_H + #define Py_INTRCHECK_H + #ifdef __cplusplus + extern "C" { + #endif ! extern DL_IMPORT(int) PyOS_InterruptOccurred(void); ! extern DL_IMPORT(void) PyOS_InitInterrupts(void); ! DL_IMPORT(void) PyOS_AfterFork(void); #ifdef __cplusplus Index: marshal.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/marshal.h,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** marshal.h 2000/06/30 23:58:04 2.8 --- marshal.h 2000/07/08 23:37:28 2.9 *************** *** 1,8 **** - #ifndef Py_MARSHAL_H - #define Py_MARSHAL_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 16,29 **** /* Interface for marshal.c */ ! DL_IMPORT(void) PyMarshal_WriteLongToFile Py_PROTO((long, FILE *)); ! DL_IMPORT(void) PyMarshal_WriteShortToFile Py_PROTO((int, FILE *)); ! DL_IMPORT(void) PyMarshal_WriteObjectToFile Py_PROTO((PyObject *, FILE *)); ! DL_IMPORT(PyObject *) PyMarshal_WriteObjectToString Py_PROTO((PyObject *)); ! DL_IMPORT(long) PyMarshal_ReadLongFromFile Py_PROTO((FILE *)); ! DL_IMPORT(int) PyMarshal_ReadShortFromFile Py_PROTO((FILE *)); ! DL_IMPORT(PyObject *) PyMarshal_ReadObjectFromFile Py_PROTO((FILE *)); ! DL_IMPORT(PyObject *) PyMarshal_ReadObjectFromString Py_PROTO((char *, int)); #ifdef __cplusplus --- 10,29 ---- /* Interface for marshal.c */ + + #ifndef Py_MARSHAL_H + #define Py_MARSHAL_H + #ifdef __cplusplus + extern "C" { + #endif ! DL_IMPORT(void) PyMarshal_WriteLongToFile(long, FILE *); ! DL_IMPORT(void) PyMarshal_WriteShortToFile(int, FILE *); ! DL_IMPORT(void) PyMarshal_WriteObjectToFile(PyObject *, FILE *); ! DL_IMPORT(PyObject *) PyMarshal_WriteObjectToString(PyObject *); ! DL_IMPORT(long) PyMarshal_ReadLongFromFile(FILE *); ! DL_IMPORT(int) PyMarshal_ReadShortFromFile(FILE *); ! DL_IMPORT(PyObject *) PyMarshal_ReadObjectFromFile(FILE *); ! DL_IMPORT(PyObject *) PyMarshal_ReadObjectFromString(char *, int); #ifdef __cplusplus Index: node.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/node.h,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** node.h 2000/06/30 23:58:04 2.15 --- node.h 2000/07/08 23:37:28 2.16 *************** *** 1,8 **** - #ifndef Py_NODE_H - #define Py_NODE_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,31 **** /* Parse tree node interface */ typedef struct _node { ! short n_type; ! char *n_str; ! short n_lineno; ! short n_nchildren; ! struct _node *n_child; } node; ! extern DL_IMPORT(node *) PyNode_New Py_PROTO((int type)); ! extern DL_IMPORT(int) PyNode_AddChild Py_PROTO((node *n, int type, char *str, int lineno)); ! extern DL_IMPORT(void) PyNode_Free Py_PROTO((node *n)); /* Node access functions */ --- 11,32 ---- /* Parse tree node interface */ + #ifndef Py_NODE_H + #define Py_NODE_H + #ifdef __cplusplus + extern "C" { + #endif + typedef struct _node { ! short n_type; ! char *n_str; ! short n_lineno; ! short n_nchildren; ! struct _node *n_child; } node; ! extern DL_IMPORT(node *) PyNode_New(int type); ! extern DL_IMPORT(int) PyNode_AddChild(node *n, int type, ! char *str, int lineno); ! extern DL_IMPORT(void) PyNode_Free(node *n); /* Node access functions */ *************** *** 41,51 **** #define REQ(n, type) \ { if (TYPE(n) != (type)) { \ ! fprintf(stderr, "FATAL: node type %d, required %d\n", \ ! TYPE(n), type); \ ! abort(); \ } } #endif ! extern DL_IMPORT(void) PyNode_ListTree Py_PROTO((node *)); #ifdef __cplusplus --- 42,52 ---- #define REQ(n, type) \ { if (TYPE(n) != (type)) { \ ! fprintf(stderr, "FATAL: node type %d, required %d\n", \ ! TYPE(n), type); \ ! abort(); \ } } #endif ! extern DL_IMPORT(void) PyNode_ListTree(node *); #ifdef __cplusplus Index: parsetok.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/parsetok.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** parsetok.h 2000/06/30 23:58:04 2.12 --- parsetok.h 2000/07/08 23:37:28 2.13 *************** *** 1,8 **** - #ifndef Py_PARSETOK_H - #define Py_PARSETOK_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,31 **** /* Parser-tokenizer link interface */ typedef struct { ! int error; ! char *filename; ! int lineno; ! int offset; ! char *text; } perrdetail; ! extern DL_IMPORT(node *) PyParser_ParseString Py_PROTO((char *, grammar *, int, perrdetail *)); ! extern DL_IMPORT(node *) PyParser_ParseFile Py_PROTO((FILE *, char *, grammar *, int, ! char *, char *, perrdetail *)); #ifdef __cplusplus --- 11,32 ---- /* Parser-tokenizer link interface */ + #ifndef Py_PARSETOK_H + #define Py_PARSETOK_H + #ifdef __cplusplus + extern "C" { + #endif + typedef struct { ! int error; ! char *filename; ! int lineno; ! int offset; ! char *text; } perrdetail; ! extern DL_IMPORT(node *) PyParser_ParseString(char *, grammar *, int, ! perrdetail *); ! extern DL_IMPORT(node *) PyParser_ParseFile (FILE *, char *, grammar *, int, ! char *, char *, perrdetail *); #ifdef __cplusplus Index: pydebug.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pydebug.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** pydebug.h 2000/06/30 23:58:04 2.13 --- pydebug.h 2000/07/08 23:37:28 2.14 *************** *** 25,29 **** extern DL_IMPORT(int) Py_UnicodeFlag; ! DL_IMPORT(void) Py_FatalError Py_PROTO((char *)); #ifdef __cplusplus --- 25,29 ---- extern DL_IMPORT(int) Py_UnicodeFlag; ! DL_IMPORT(void) Py_FatalError(char *message); #ifdef __cplusplus Index: pystate.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pystate.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** pystate.h 2000/06/30 23:58:04 2.11 --- pystate.h 2000/07/08 23:37:28 2.12 *************** *** 1,8 **** - #ifndef Py_PYSTATE_H - #define Py_PYSTATE_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 18,21 **** --- 12,21 ---- + #ifndef Py_PYSTATE_H + #define Py_PYSTATE_H + #ifdef __cplusplus + extern "C" { + #endif + /* State shared between threads */ *************** *** 25,36 **** typedef struct _is { ! struct _is *next; ! struct _ts *tstate_head; ! PyObject *modules; ! PyObject *sysdict; ! PyObject *builtins; ! int checkinterval; } PyInterpreterState; --- 25,36 ---- typedef struct _is { ! struct _is *next; ! struct _ts *tstate_head; ! PyObject *modules; ! PyObject *sysdict; ! PyObject *builtins; ! int checkinterval; } PyInterpreterState; *************** *** 43,83 **** typedef struct _ts { ! struct _ts *next; ! PyInterpreterState *interp; ! struct _frame *frame; ! int recursion_depth; ! int ticker; ! int tracing; ! PyObject *sys_profilefunc; ! PyObject *sys_tracefunc; ! PyObject *curexc_type; ! PyObject *curexc_value; ! PyObject *curexc_traceback; ! PyObject *exc_type; ! PyObject *exc_value; ! PyObject *exc_traceback; ! PyObject *dict; ! /* XXX signal handlers should also be here */ } PyThreadState; ! DL_IMPORT(PyInterpreterState *) PyInterpreterState_New Py_PROTO((void)); ! DL_IMPORT(void) PyInterpreterState_Clear Py_PROTO((PyInterpreterState *)); ! DL_IMPORT(void) PyInterpreterState_Delete Py_PROTO((PyInterpreterState *)); ! ! DL_IMPORT(PyThreadState *) PyThreadState_New Py_PROTO((PyInterpreterState *)); ! DL_IMPORT(void) PyThreadState_Clear Py_PROTO((PyThreadState *)); ! DL_IMPORT(void) PyThreadState_Delete Py_PROTO((PyThreadState *)); ! ! DL_IMPORT(PyThreadState *) PyThreadState_Get Py_PROTO((void)); ! DL_IMPORT(PyThreadState *) PyThreadState_Swap Py_PROTO((PyThreadState *)); ! DL_IMPORT(PyObject *) PyThreadState_GetDict Py_PROTO((void)); --- 43,83 ---- typedef struct _ts { ! struct _ts *next; ! PyInterpreterState *interp; ! struct _frame *frame; ! int recursion_depth; ! int ticker; ! int tracing; ! PyObject *sys_profilefunc; ! PyObject *sys_tracefunc; ! PyObject *curexc_type; ! PyObject *curexc_value; ! PyObject *curexc_traceback; ! PyObject *exc_type; ! PyObject *exc_value; ! PyObject *exc_traceback; ! PyObject *dict; ! /* XXX signal handlers should also be here */ } PyThreadState; ! DL_IMPORT(PyInterpreterState *) PyInterpreterState_New(void); ! DL_IMPORT(void) PyInterpreterState_Clear(PyInterpreterState *); ! DL_IMPORT(void) PyInterpreterState_Delete(PyInterpreterState *); ! ! DL_IMPORT(PyThreadState *) PyThreadState_New(PyInterpreterState *); ! DL_IMPORT(void) PyThreadState_Clear(PyThreadState *); ! DL_IMPORT(void) PyThreadState_Delete(PyThreadState *); ! ! DL_IMPORT(PyThreadState *) PyThreadState_Get(void); ! DL_IMPORT(PyThreadState *) PyThreadState_Swap(PyThreadState *); ! DL_IMPORT(PyObject *) PyThreadState_GetDict(void); Index: structmember.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/structmember.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** structmember.h 2000/06/30 23:58:04 2.14 --- structmember.h 2000/07/08 23:37:28 2.15 *************** *** 72,77 **** #define RO READONLY /* Shorthand */ ! DL_IMPORT(PyObject *) PyMember_Get Py_PROTO((char *, struct memberlist *, char *)); ! DL_IMPORT(int) PyMember_Set Py_PROTO((char *, struct memberlist *, char *, PyObject *)); #ifdef __cplusplus --- 72,77 ---- #define RO READONLY /* Shorthand */ ! DL_IMPORT(PyObject *) PyMember_Get(char *, struct memberlist *, char *); ! DL_IMPORT(int) PyMember_Set(char *, struct memberlist *, char *, PyObject *); #ifdef __cplusplus Index: traceback.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/traceback.h,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** traceback.h 2000/06/30 23:58:04 2.16 --- traceback.h 2000/07/08 23:37:28 2.17 *************** *** 1,8 **** - #ifndef Py_TRACEBACK_H - #define Py_TRACEBACK_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 15,26 **** ******************************************************************/ /* Traceback interface */ struct _frame; ! DL_IMPORT(int) PyTraceBack_Here Py_PROTO((struct _frame *)); ! DL_IMPORT(PyObject *) PyTraceBack_Fetch Py_PROTO((void)); ! DL_IMPORT(int) PyTraceBack_Store Py_PROTO((PyObject *)); ! DL_IMPORT(int) PyTraceBack_Print Py_PROTO((PyObject *, PyObject *)); /* Reveale traceback type so we can typecheck traceback objects */ --- 9,26 ---- ******************************************************************/ + #ifndef Py_TRACEBACK_H + #define Py_TRACEBACK_H + #ifdef __cplusplus + extern "C" { + #endif + /* Traceback interface */ struct _frame; ! DL_IMPORT(int) PyTraceBack_Here(struct _frame *); ! DL_IMPORT(PyObject *) PyTraceBack_Fetch(void); ! DL_IMPORT(int) PyTraceBack_Store(PyObject *); ! DL_IMPORT(int) PyTraceBack_Print(PyObject *, PyObject *); /* Reveale traceback type so we can typecheck traceback objects */ From python-dev@python.org Sun Jul 9 01:20:39 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 17:20:39 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include abstract.h,2.20,2.21 bufferobject.h,2.4,2.5 classobject.h,2.30,2.31 cobject.h,2.7,2.8 compile.h,2.21,2.22 complexobject.h,2.6,2.7 fileobject.h,2.19,2.20 floatobject.h,2.15,2.16 frameobject.h,2.26,2.27 funcobject.h,2.18,2.19 grammar.h,2.12,2.13 intobject.h,2.19,2.20 listobject.h,2.19,2.20 methodobject.h,2.18,2.19 Message-ID: <200007090020.RAA15740@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv15720 Modified Files: abstract.h bufferobject.h classobject.h cobject.h compile.h complexobject.h fileobject.h floatobject.h frameobject.h funcobject.h grammar.h intobject.h listobject.h methodobject.h Log Message: ANSI-fication and Py_PROTO extermination. Index: abstract.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/abstract.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** abstract.h 2000/06/30 23:58:04 2.20 --- abstract.h 2000/07/09 00:20:36 2.21 *************** *** 234,238 **** #define PyObject_DelAttr(O,A) PyObject_SetAttr((O),(A),NULL) ! DL_IMPORT(int) PyObject_Cmp Py_PROTO((PyObject *o1, PyObject *o2, int *result)); /* --- 234,238 ---- #define PyObject_DelAttr(O,A) PyObject_SetAttr((O),(A),NULL) ! DL_IMPORT(int) PyObject_Cmp(PyObject *o1, PyObject *o2, int *result); /* *************** *** 282,286 **** */ ! DL_IMPORT(int) PyCallable_Check Py_PROTO((PyObject *o)); /* --- 282,286 ---- */ ! DL_IMPORT(int) PyCallable_Check(PyObject *o); /* *************** *** 294,299 **** ! DL_IMPORT(PyObject *) PyObject_CallObject Py_PROTO((PyObject *callable_object, ! PyObject *args)); /* --- 294,299 ---- ! DL_IMPORT(PyObject *) PyObject_CallObject(PyObject *callable_object, ! PyObject *args); /* *************** *** 307,312 **** */ ! DL_IMPORT(PyObject *) PyObject_CallFunction Py_PROTO((PyObject *callable_object, ! char *format, ...)); /* --- 307,312 ---- */ ! DL_IMPORT(PyObject *) PyObject_CallFunction(PyObject *callable_object, ! char *format, ...); /* *************** *** 321,326 **** ! DL_IMPORT(PyObject *) PyObject_CallMethod Py_PROTO((PyObject *o, char *m, ! char *format, ...)); /* --- 321,326 ---- ! DL_IMPORT(PyObject *) PyObject_CallMethod(PyObject *o, char *m, ! char *format, ...); /* *************** *** 374,378 **** */ ! DL_IMPORT(PyObject *) PyObject_Type Py_PROTO((PyObject *o)); /* --- 374,378 ---- */ ! DL_IMPORT(PyObject *) PyObject_Type(PyObject *o); /* *************** *** 382,386 **** */ ! DL_IMPORT(int) PyObject_Length Py_PROTO((PyObject *o)); /* --- 382,386 ---- */ ! DL_IMPORT(int) PyObject_Length(PyObject *o); /* *************** *** 392,396 **** */ ! DL_IMPORT(PyObject *) PyObject_GetItem Py_PROTO((PyObject *o, PyObject *key)); /* --- 392,396 ---- */ ! DL_IMPORT(PyObject *) PyObject_GetItem(PyObject *o, PyObject *key); /* *************** *** 401,405 **** */ ! DL_IMPORT(int) PyObject_SetItem Py_PROTO((PyObject *o, PyObject *key, PyObject *v)); /* --- 401,405 ---- */ ! DL_IMPORT(int) PyObject_SetItem(PyObject *o, PyObject *key, PyObject *v); /* *************** *** 409,413 **** */ ! DL_IMPORT(int) PyObject_DelItem Py_PROTO((PyObject *o, PyObject *key)); /* --- 409,413 ---- */ ! DL_IMPORT(int) PyObject_DelItem(PyObject *o, PyObject *key); /* *************** *** 465,469 **** /* Number Protocol:*/ ! DL_IMPORT(int) PyNumber_Check Py_PROTO((PyObject *o)); /* --- 465,469 ---- /* Number Protocol:*/ ! DL_IMPORT(int) PyNumber_Check(PyObject *o); /* *************** *** 475,479 **** */ ! DL_IMPORT(PyObject *) PyNumber_Add Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 475,479 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Add(PyObject *o1, PyObject *o2); /* *************** *** 484,488 **** */ ! DL_IMPORT(PyObject *) PyNumber_Subtract Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 484,488 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Subtract(PyObject *o1, PyObject *o2); /* *************** *** 493,497 **** */ ! DL_IMPORT(PyObject *) PyNumber_Multiply Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 493,497 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Multiply(PyObject *o1, PyObject *o2); /* *************** *** 503,507 **** */ ! DL_IMPORT(PyObject *) PyNumber_Divide Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 503,507 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Divide(PyObject *o1, PyObject *o2); /* *************** *** 512,516 **** */ ! DL_IMPORT(PyObject *) PyNumber_Remainder Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 512,516 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Remainder(PyObject *o1, PyObject *o2); /* *************** *** 522,526 **** */ ! DL_IMPORT(PyObject *) PyNumber_Divmod Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 522,526 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Divmod(PyObject *o1, PyObject *o2); /* *************** *** 532,536 **** */ ! DL_IMPORT(PyObject *) PyNumber_Power Py_PROTO((PyObject *o1, PyObject *o2, PyObject *o3)); /* --- 532,537 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Power(PyObject *o1, PyObject *o2, ! PyObject *o3); /* *************** *** 541,545 **** */ ! DL_IMPORT(PyObject *) PyNumber_Negative Py_PROTO((PyObject *o)); /* --- 542,546 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Negative(PyObject *o); /* *************** *** 549,553 **** */ ! DL_IMPORT(PyObject *) PyNumber_Positive Py_PROTO((PyObject *o)); /* --- 550,554 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Positive(PyObject *o); /* *************** *** 557,561 **** */ ! DL_IMPORT(PyObject *) PyNumber_Absolute Py_PROTO((PyObject *o)); /* --- 558,562 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Absolute(PyObject *o); /* *************** *** 565,569 **** */ ! DL_IMPORT(PyObject *) PyNumber_Invert Py_PROTO((PyObject *o)); /* --- 566,570 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Invert(PyObject *o); /* *************** *** 575,579 **** */ ! DL_IMPORT(PyObject *) PyNumber_Lshift Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 576,580 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Lshift(PyObject *o1, PyObject *o2); /* *************** *** 585,589 **** */ ! DL_IMPORT(PyObject *) PyNumber_Rshift Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 586,590 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Rshift(PyObject *o1, PyObject *o2); /* *************** *** 594,598 **** */ ! DL_IMPORT(PyObject *) PyNumber_And Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 595,599 ---- */ ! DL_IMPORT(PyObject *) PyNumber_And(PyObject *o1, PyObject *o2); /* *************** *** 604,608 **** */ ! DL_IMPORT(PyObject *) PyNumber_Xor Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 605,609 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Xor(PyObject *o1, PyObject *o2); /* *************** *** 614,618 **** */ ! DL_IMPORT(PyObject *) PyNumber_Or Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 615,619 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Or(PyObject *o1, PyObject *o2); /* *************** *** 642,646 **** */ ! DL_IMPORT(PyObject *) PyNumber_Int Py_PROTO((PyObject *o)); /* --- 643,647 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Int(PyObject *o); /* *************** *** 651,655 **** */ ! DL_IMPORT(PyObject *) PyNumber_Long Py_PROTO((PyObject *o)); /* --- 652,656 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Long(PyObject *o); /* *************** *** 660,664 **** */ ! DL_IMPORT(PyObject *) PyNumber_Float Py_PROTO((PyObject *o)); /* --- 661,665 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Float(PyObject *o); /* *************** *** 671,675 **** /* Sequence protocol:*/ ! DL_IMPORT(int) PySequence_Check Py_PROTO((PyObject *o)); /* --- 672,676 ---- /* Sequence protocol:*/ ! DL_IMPORT(int) PySequence_Check(PyObject *o); /* *************** *** 681,685 **** */ ! DL_IMPORT(int) PySequence_Length Py_PROTO((PyObject *o)); /* --- 682,686 ---- */ ! DL_IMPORT(int) PySequence_Length(PyObject *o); /* *************** *** 688,692 **** */ ! DL_IMPORT(PyObject *) PySequence_Concat Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 689,693 ---- */ ! DL_IMPORT(PyObject *) PySequence_Concat(PyObject *o1, PyObject *o2); /* *************** *** 697,701 **** */ ! DL_IMPORT(PyObject *) PySequence_Repeat Py_PROTO((PyObject *o, int count)); /* --- 698,702 ---- */ ! DL_IMPORT(PyObject *) PySequence_Repeat(PyObject *o, int count); /* *************** *** 706,710 **** */ ! DL_IMPORT(PyObject *) PySequence_GetItem Py_PROTO((PyObject *o, int i)); /* --- 707,711 ---- */ ! DL_IMPORT(PyObject *) PySequence_GetItem(PyObject *o, int i); /* *************** *** 713,717 **** */ ! DL_IMPORT(PyObject *) PySequence_GetSlice Py_PROTO((PyObject *o, int i1, int i2)); /* --- 714,718 ---- */ ! DL_IMPORT(PyObject *) PySequence_GetSlice(PyObject *o, int i1, int i2); /* *************** *** 722,726 **** */ ! DL_IMPORT(int) PySequence_SetItem Py_PROTO((PyObject *o, int i, PyObject *v)); /* --- 723,727 ---- */ ! DL_IMPORT(int) PySequence_SetItem(PyObject *o, int i, PyObject *v); /* *************** *** 731,735 **** */ ! DL_IMPORT(int) PySequence_DelItem Py_PROTO((PyObject *o, int i)); /* --- 732,736 ---- */ ! DL_IMPORT(int) PySequence_DelItem(PyObject *o, int i); /* *************** *** 739,743 **** */ ! DL_IMPORT(int) PySequence_SetSlice Py_PROTO((PyObject *o, int i1, int i2, PyObject *v)); /* --- 740,745 ---- */ ! DL_IMPORT(int) PySequence_SetSlice(PyObject *o, int i1, int i2, ! PyObject *v); /* *************** *** 747,751 **** */ ! DL_IMPORT(int) PySequence_DelSlice Py_PROTO((PyObject *o, int i1, int i2)); /* --- 749,753 ---- */ ! DL_IMPORT(int) PySequence_DelSlice(PyObject *o, int i1, int i2); /* *************** *** 755,759 **** */ ! DL_IMPORT(PyObject *) PySequence_Tuple Py_PROTO((PyObject *o)); /* --- 757,761 ---- */ ! DL_IMPORT(PyObject *) PySequence_Tuple(PyObject *o); /* *************** *** 763,767 **** ! DL_IMPORT(PyObject *) PySequence_List Py_PROTO((PyObject *o)); /* --- 765,769 ---- ! DL_IMPORT(PyObject *) PySequence_List(PyObject *o); /* *************** *** 770,774 **** */ ! DL_IMPORT(PyObject *) PySequence_Fast Py_PROTO((PyObject *o, const char* m)); /* --- 772,776 ---- */ ! DL_IMPORT(PyObject *) PySequence_Fast(PyObject *o, const char* m); /* *************** *** 789,793 **** */ ! DL_IMPORT(int) PySequence_Count Py_PROTO((PyObject *o, PyObject *value)); /* --- 791,795 ---- */ ! DL_IMPORT(int) PySequence_Count(PyObject *o, PyObject *value); /* *************** *** 798,806 **** */ ! DL_IMPORT(int) PySequence_Contains Py_PROTO((PyObject *o, PyObject *value)); /* For DLL-level backwards compatibility */ #undef PySequence_In ! DL_IMPORT(int) PySequence_In Py_PROTO((PyObject *o, PyObject *value)); /* For source-level backwards compatibility */ --- 800,808 ---- */ ! DL_IMPORT(int) PySequence_Contains(PyObject *o, PyObject *value); /* For DLL-level backwards compatibility */ #undef PySequence_In ! DL_IMPORT(int) PySequence_In(PyObject *o, PyObject *value); /* For source-level backwards compatibility */ *************** *** 813,817 **** */ ! DL_IMPORT(int) PySequence_Index Py_PROTO((PyObject *o, PyObject *value)); /* --- 815,819 ---- */ ! DL_IMPORT(int) PySequence_Index(PyObject *o, PyObject *value); /* *************** *** 823,827 **** /* Mapping protocol:*/ ! DL_IMPORT(int) PyMapping_Check Py_PROTO((PyObject *o)); /* --- 825,829 ---- /* Mapping protocol:*/ ! DL_IMPORT(int) PyMapping_Check(PyObject *o); /* *************** *** 832,836 **** */ ! DL_IMPORT(int) PyMapping_Length Py_PROTO((PyObject *o)); /* --- 834,838 ---- */ ! DL_IMPORT(int) PyMapping_Length(PyObject *o); /* *************** *** 842,846 **** /* implemented as a macro: ! int PyMapping_DelItemString Py_PROTO((PyObject *o, char *key)); Remove the mapping for object, key, from the object *o. --- 844,848 ---- /* implemented as a macro: ! int PyMapping_DelItemString(PyObject *o, char *key); Remove the mapping for object, key, from the object *o. *************** *** 852,856 **** /* implemented as a macro: ! int PyMapping_DelItem Py_PROTO((PyObject *o, PyObject *key)); Remove the mapping for object, key, from the object *o. --- 854,858 ---- /* implemented as a macro: ! int PyMapping_DelItem(PyObject *o, PyObject *key); Remove the mapping for object, key, from the object *o. *************** *** 860,864 **** #define PyMapping_DelItem(O,K) PyDict_DelItem((O),(K)) ! DL_IMPORT(int) PyMapping_HasKeyString Py_PROTO((PyObject *o, char *key)); /* --- 862,866 ---- #define PyMapping_DelItem(O,K) PyDict_DelItem((O),(K)) ! DL_IMPORT(int) PyMapping_HasKeyString(PyObject *o, char *key); /* *************** *** 870,874 **** */ ! DL_IMPORT(int) PyMapping_HasKey Py_PROTO((PyObject *o, PyObject *key)); /* --- 872,876 ---- */ ! DL_IMPORT(int) PyMapping_HasKey(PyObject *o, PyObject *key); /* *************** *** 913,917 **** #define PyMapping_Items(O) PyObject_CallMethod(O,"items",NULL) ! DL_IMPORT(PyObject *) PyMapping_GetItemString Py_PROTO((PyObject *o, char *key)); /* --- 915,919 ---- #define PyMapping_Items(O) PyObject_CallMethod(O,"items",NULL) ! DL_IMPORT(PyObject *) PyMapping_GetItemString(PyObject *o, char *key); /* *************** *** 921,926 **** */ ! DL_IMPORT(int) PyMapping_SetItemString Py_PROTO((PyObject *o, char *key, ! PyObject *value)); /* --- 923,928 ---- */ ! DL_IMPORT(int) PyMapping_SetItemString(PyObject *o, char *key, ! PyObject *value); /* Index: bufferobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/bufferobject.h,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** bufferobject.h 2000/06/30 23:58:04 2.4 --- bufferobject.h 2000/07/09 00:20:36 2.5 *************** *** 1,8 **** - #ifndef Py_BUFFEROBJECT_H - #define Py_BUFFEROBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 19,22 **** --- 13,22 ---- /* Note: the object's structure is private */ + #ifndef Py_BUFFEROBJECT_H + #define Py_BUFFEROBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + extern DL_IMPORT(PyTypeObject) PyBuffer_Type; *************** *** 26,36 **** #define Py_END_OF_BUFFER (-1) ! extern DL_IMPORT(PyObject *) PyBuffer_FromObject Py_PROTO((PyObject *base, int offset, int size)); ! extern DL_IMPORT(PyObject *) PyBuffer_FromReadWriteObject Py_PROTO((PyObject *base, int offset, int size)); ! extern DL_IMPORT(PyObject *) PyBuffer_FromMemory Py_PROTO((void *ptr, int size)); ! extern DL_IMPORT(PyObject *) PyBuffer_FromReadWriteMemory Py_PROTO((void *ptr, int size)); ! extern DL_IMPORT(PyObject *) PyBuffer_New Py_PROTO((int size)); #ifdef __cplusplus --- 26,39 ---- #define Py_END_OF_BUFFER (-1) ! extern DL_IMPORT(PyObject *) PyBuffer_FromObject(PyObject *base, ! int offset, int size); ! extern DL_IMPORT(PyObject *) PyBuffer_FromReadWriteObject(PyObject *base, ! int offset, ! int size); ! extern DL_IMPORT(PyObject *) PyBuffer_FromMemory(void *ptr, int size); ! extern DL_IMPORT(PyObject *) PyBuffer_FromReadWriteMemory(void *ptr, int size); ! extern DL_IMPORT(PyObject *) PyBuffer_New(int size); #ifdef __cplusplus *************** *** 38,40 **** #endif #endif /* !Py_BUFFEROBJECT_H */ - --- 41,42 ---- Index: classobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/classobject.h,v retrieving revision 2.30 retrieving revision 2.31 diff -C2 -r2.30 -r2.31 *** classobject.h 2000/06/30 23:58:04 2.30 --- classobject.h 2000/07/09 00:20:36 2.31 *************** *** 1,8 **** - #ifndef Py_CLASSOBJECT_H - #define Py_CLASSOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 19,44 **** /* Revealing some structures (not for general use) */ typedef struct { ! PyObject_HEAD ! PyObject *cl_bases; /* A tuple of class objects */ ! PyObject *cl_dict; /* A dictionary */ ! PyObject *cl_name; /* A string */ ! /* The following three are functions or NULL */ ! PyObject *cl_getattr; ! PyObject *cl_setattr; ! PyObject *cl_delattr; } PyClassObject; typedef struct { ! PyObject_HEAD ! PyClassObject *in_class; /* The class object */ ! PyObject *in_dict; /* A dictionary */ } PyInstanceObject; typedef struct { ! PyObject_HEAD ! PyObject *im_func; /* The callable object implementing the method */ ! PyObject *im_self; /* The instance it is bound to, or NULL */ ! PyObject *im_class; /* The class that defined the method */ } PyMethodObject; --- 13,44 ---- /* Revealing some structures (not for general use) */ + #ifndef Py_CLASSOBJECT_H + #define Py_CLASSOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + typedef struct { ! PyObject_HEAD ! PyObject *cl_bases; /* A tuple of class objects */ ! PyObject *cl_dict; /* A dictionary */ ! PyObject *cl_name; /* A string */ ! /* The following three are functions or NULL */ ! PyObject *cl_getattr; ! PyObject *cl_setattr; ! PyObject *cl_delattr; } PyClassObject; typedef struct { ! PyObject_HEAD ! PyClassObject *in_class; /* The class object */ ! PyObject *in_dict; /* A dictionary */ } PyInstanceObject; typedef struct { ! PyObject_HEAD ! PyObject *im_func; /* The callable object implementing the method */ ! PyObject *im_self; /* The instance it is bound to, or NULL */ ! PyObject *im_class; /* The class that defined the method */ } PyMethodObject; *************** *** 49,59 **** #define PyMethod_Check(op) ((op)->ob_type == &PyMethod_Type) ! extern DL_IMPORT(PyObject *) PyClass_New Py_PROTO((PyObject *, PyObject *, PyObject *)); ! extern DL_IMPORT(PyObject *) PyInstance_New Py_PROTO((PyObject *, PyObject *, PyObject *)); ! extern DL_IMPORT(PyObject *) PyMethod_New Py_PROTO((PyObject *, PyObject *, PyObject *)); ! ! extern DL_IMPORT(PyObject *) PyMethod_Function Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyMethod_Self Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyMethod_Class Py_PROTO((PyObject *)); /* Macros for direct access to these values. Type checks are *not* --- 49,60 ---- #define PyMethod_Check(op) ((op)->ob_type == &PyMethod_Type) ! extern DL_IMPORT(PyObject *) PyClass_New(PyObject *, PyObject *, PyObject *); ! extern DL_IMPORT(PyObject *) PyInstance_New(PyObject *, PyObject *, ! PyObject *); ! extern DL_IMPORT(PyObject *) PyMethod_New(PyObject *, PyObject *, PyObject *); ! ! extern DL_IMPORT(PyObject *) PyMethod_Function(PyObject *); ! extern DL_IMPORT(PyObject *) PyMethod_Self(PyObject *); ! extern DL_IMPORT(PyObject *) PyMethod_Class(PyObject *); /* Macros for direct access to these values. Type checks are *not* *************** *** 66,75 **** (((PyMethodObject *)meth) -> im_class) ! extern DL_IMPORT(int) PyClass_IsSubclass Py_PROTO((PyObject *, PyObject *)); ! extern DL_IMPORT(PyObject *) PyInstance_DoBinOp ! Py_PROTO((PyObject *, PyObject *, ! char *, char *, ! PyObject * (*) Py_PROTO((PyObject *, PyObject *)) )); #ifdef __cplusplus --- 67,76 ---- (((PyMethodObject *)meth) -> im_class) ! extern DL_IMPORT(int) PyClass_IsSubclass(PyObject *, PyObject *); ! extern DL_IMPORT(PyObject *) PyInstance_DoBinOp(PyObject *, PyObject *, ! char *, char *, ! PyObject * (*)(PyObject *, ! PyObject *)); #ifdef __cplusplus Index: cobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/cobject.h,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** cobject.h 2000/06/30 23:58:04 2.7 --- cobject.h 2000/07/09 00:20:36 2.8 *************** *** 1,8 **** - #ifndef Py_COBJECT_H - #define Py_COBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 24,27 **** --- 18,27 ---- */ + #ifndef Py_COBJECT_H + #define Py_COBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + extern DL_IMPORT(PyTypeObject) PyCObject_Type; *************** *** 35,39 **** */ extern DL_IMPORT(PyObject *) ! PyCObject_FromVoidPtr Py_PROTO((void *cobj, void (*destruct)(void*))); --- 35,39 ---- */ extern DL_IMPORT(PyObject *) ! PyCObject_FromVoidPtr(void *cobj, void (*destruct)(void*)); *************** *** 44,61 **** */ extern DL_IMPORT(PyObject *) ! PyCObject_FromVoidPtrAndDesc Py_PROTO((void *cobj, void *desc, ! void (*destruct)(void*,void*))); /* Retrieve a pointer to a C object from a PyCObject. */ extern DL_IMPORT(void *) ! PyCObject_AsVoidPtr Py_PROTO((PyObject *)); /* Retrieve a pointer to a description object from a PyCObject. */ extern DL_IMPORT(void *) ! PyCObject_GetDesc Py_PROTO((PyObject *)); /* Import a pointer to a C object from a module using a PyCObject. */ extern DL_IMPORT(void *) ! PyCObject_Import Py_PROTO((char *module_name, char *cobject_name)); #ifdef __cplusplus --- 44,61 ---- */ extern DL_IMPORT(PyObject *) ! PyCObject_FromVoidPtrAndDesc(void *cobj, void *desc, ! void (*destruct)(void*,void*)); /* Retrieve a pointer to a C object from a PyCObject. */ extern DL_IMPORT(void *) ! PyCObject_AsVoidPtr(PyObject *); /* Retrieve a pointer to a description object from a PyCObject. */ extern DL_IMPORT(void *) ! PyCObject_GetDesc(PyObject *); /* Import a pointer to a C object from a module using a PyCObject. */ extern DL_IMPORT(void *) ! PyCObject_Import(char *module_name, char *cobject_name); #ifdef __cplusplus Index: compile.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/compile.h,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** compile.h 2000/06/30 23:58:04 2.21 --- compile.h 2000/07/09 00:20:36 2.22 *************** *** 1,8 **** - #ifndef Py_COMPILE_H - #define Py_COMPILE_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,36 **** /* Definitions for bytecode */ /* Bytecode object */ typedef struct { ! PyObject_HEAD ! int co_argcount; /* #arguments, except *args */ ! int co_nlocals; /* #local variables */ ! int co_stacksize; /* #entries needed for evaluation stack */ ! int co_flags; /* CO_..., see below */ ! PyObject *co_code; /* instruction opcodes */ ! PyObject *co_consts; /* list (constants used) */ ! PyObject *co_names; /* list of strings (names used) */ ! PyObject *co_varnames; /* tuple of strings (local variable names) */ ! /* The rest doesn't count for hash/cmp */ ! PyObject *co_filename; /* string (where it was loaded from) */ ! PyObject *co_name; /* string (name, for reference) */ ! int co_firstlineno; /* first source line number */ ! PyObject *co_lnotab; /* string (encoding addr<->lineno mapping) */ } PyCodeObject; --- 11,36 ---- /* Definitions for bytecode */ + #ifndef Py_COMPILE_H + #define Py_COMPILE_H + #ifdef __cplusplus + extern "C" { + #endif + /* Bytecode object */ typedef struct { ! PyObject_HEAD ! int co_argcount; /* #arguments, except *args */ ! int co_nlocals; /* #local variables */ ! int co_stacksize; /* #entries needed for evaluation stack */ ! int co_flags; /* CO_..., see below */ ! PyObject *co_code; /* instruction opcodes */ ! PyObject *co_consts; /* list (constants used) */ ! PyObject *co_names; /* list of strings (names used) */ ! PyObject *co_varnames; /* tuple of strings (local variable names) */ ! /* The rest doesn't count for hash/cmp */ ! PyObject *co_filename; /* string (where it was loaded from) */ ! PyObject *co_name; /* string (name, for reference) */ ! int co_firstlineno; /* first source line number */ ! PyObject *co_lnotab; /* string (encoding addr<->lineno mapping) */ } PyCodeObject; *************** *** 49,57 **** /* Public interface */ struct _node; /* Declare the existence of this type */ ! DL_IMPORT(PyCodeObject *) PyNode_Compile Py_PROTO((struct _node *, char *)); ! DL_IMPORT(PyCodeObject *) PyCode_New Py_PROTO(( int, int, int, int, PyObject *, PyObject *, PyObject *, PyObject *, ! PyObject *, PyObject *, int, PyObject *)); /* same as struct above */ ! DL_IMPORT(int) PyCode_Addr2Line Py_PROTO((PyCodeObject *, int)); /* for internal use only */ --- 49,57 ---- /* Public interface */ struct _node; /* Declare the existence of this type */ ! DL_IMPORT(PyCodeObject *) PyNode_Compile(struct _node *, char *); ! DL_IMPORT(PyCodeObject *) PyCode_New( int, int, int, int, PyObject *, PyObject *, PyObject *, PyObject *, ! PyObject *, PyObject *, int, PyObject *); /* same as struct above */ ! DL_IMPORT(int) PyCode_Addr2Line(PyCodeObject *, int); /* for internal use only */ Index: complexobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/complexobject.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** complexobject.h 1998/12/04 18:47:56 2.6 --- complexobject.h 2000/07/09 00:20:36 2.7 *************** *** 1,2 **** --- 1,4 ---- + /* Complex number structure */ + #ifndef COMPLEXOBJECT_H #define COMPLEXOBJECT_H *************** *** 5,13 **** #endif - /* Complex number structure */ - typedef struct { ! double real; ! double imag; } Py_complex; --- 7,13 ---- #endif typedef struct { ! double real; ! double imag; } Py_complex; *************** *** 21,30 **** #define c_pow _Py_c_pow ! extern DL_IMPORT(Py_complex) c_sum Py_PROTO((Py_complex, Py_complex)); ! extern DL_IMPORT(Py_complex) c_diff Py_PROTO((Py_complex, Py_complex)); ! extern DL_IMPORT(Py_complex) c_neg Py_PROTO((Py_complex)); ! extern DL_IMPORT(Py_complex) c_prod Py_PROTO((Py_complex, Py_complex)); ! extern DL_IMPORT(Py_complex) c_quot Py_PROTO((Py_complex, Py_complex)); ! extern DL_IMPORT(Py_complex) c_pow Py_PROTO((Py_complex, Py_complex)); --- 21,30 ---- #define c_pow _Py_c_pow ! extern DL_IMPORT(Py_complex) c_sum(Py_complex, Py_complex); ! extern DL_IMPORT(Py_complex) c_diff(Py_complex, Py_complex); ! extern DL_IMPORT(Py_complex) c_neg(Py_complex); ! extern DL_IMPORT(Py_complex) c_prod(Py_complex, Py_complex); ! extern DL_IMPORT(Py_complex) c_quot(Py_complex, Py_complex); ! extern DL_IMPORT(Py_complex) c_pow(Py_complex, Py_complex); *************** *** 37,42 **** typedef struct { ! PyObject_HEAD ! Py_complex cval; } PyComplexObject; --- 37,42 ---- typedef struct { ! PyObject_HEAD ! Py_complex cval; } PyComplexObject; *************** *** 45,54 **** #define PyComplex_Check(op) ((op)->ob_type == &PyComplex_Type) ! extern DL_IMPORT(PyObject *) PyComplex_FromCComplex Py_PROTO((Py_complex)); ! extern DL_IMPORT(PyObject *) PyComplex_FromDoubles Py_PROTO((double real, double imag)); ! extern DL_IMPORT(double) PyComplex_RealAsDouble Py_PROTO((PyObject *op)); ! extern DL_IMPORT(double) PyComplex_ImagAsDouble Py_PROTO((PyObject *op)); ! extern DL_IMPORT(Py_complex) PyComplex_AsCComplex Py_PROTO((PyObject *op)); #ifdef __cplusplus --- 45,54 ---- #define PyComplex_Check(op) ((op)->ob_type == &PyComplex_Type) ! extern DL_IMPORT(PyObject *) PyComplex_FromCComplex(Py_complex); ! extern DL_IMPORT(PyObject *) PyComplex_FromDoubles(double real, double imag); ! extern DL_IMPORT(double) PyComplex_RealAsDouble(PyObject *op); ! extern DL_IMPORT(double) PyComplex_ImagAsDouble(PyObject *op); ! extern DL_IMPORT(Py_complex) PyComplex_AsCComplex(PyObject *op); #ifdef __cplusplus Index: fileobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/fileobject.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** fileobject.h 2000/06/30 23:58:04 2.19 --- fileobject.h 2000/07/09 00:20:36 2.20 *************** *** 1,8 **** - #ifndef Py_FILEOBJECT_H - #define Py_FILEOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,34 **** /* File object interface */ extern DL_IMPORT(PyTypeObject) PyFile_Type; #define PyFile_Check(op) ((op)->ob_type == &PyFile_Type) ! extern DL_IMPORT(PyObject *) PyFile_FromString Py_PROTO((char *, char *)); ! extern DL_IMPORT(void) PyFile_SetBufSize Py_PROTO((PyObject *, int)); ! extern DL_IMPORT(PyObject *) PyFile_FromFile ! Py_PROTO((FILE *, char *, char *, int (*)Py_FPROTO((FILE *)))); ! extern DL_IMPORT(FILE *) PyFile_AsFile Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyFile_Name Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyFile_GetLine Py_PROTO((PyObject *, int)); ! extern DL_IMPORT(int) PyFile_WriteObject Py_PROTO((PyObject *, PyObject *, int)); ! extern DL_IMPORT(int) PyFile_SoftSpace Py_PROTO((PyObject *, int)); ! extern DL_IMPORT(int) PyFile_WriteString Py_PROTO((char *, PyObject *)); #ifdef __cplusplus --- 11,34 ---- /* File object interface */ + #ifndef Py_FILEOBJECT_H + #define Py_FILEOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + extern DL_IMPORT(PyTypeObject) PyFile_Type; #define PyFile_Check(op) ((op)->ob_type == &PyFile_Type) ! extern DL_IMPORT(PyObject *) PyFile_FromString(char *, char *); ! extern DL_IMPORT(void) PyFile_SetBufSize(PyObject *, int); ! extern DL_IMPORT(PyObject *) PyFile_FromFile(FILE *, char *, char *, ! int (*)(FILE *)); ! extern DL_IMPORT(FILE *) PyFile_AsFile(PyObject *); ! extern DL_IMPORT(PyObject *) PyFile_Name(PyObject *); ! extern DL_IMPORT(PyObject *) PyFile_GetLine(PyObject *, int); ! extern DL_IMPORT(int) PyFile_WriteObject(PyObject *, PyObject *, int); ! extern DL_IMPORT(int) PyFile_SoftSpace(PyObject *, int); ! extern DL_IMPORT(int) PyFile_WriteString(char *, PyObject *); #ifdef __cplusplus Index: floatobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/floatobject.h,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** floatobject.h 2000/06/30 23:58:04 2.15 --- floatobject.h 2000/07/09 00:20:36 2.16 *************** *** 1,8 **** - #ifndef Py_FLOATOBJECT_H - #define Py_FLOATOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 21,27 **** */ typedef struct { ! PyObject_HEAD ! double ob_fval; } PyFloatObject; --- 15,27 ---- */ + #ifndef Py_FLOATOBJECT_H + #define Py_FLOATOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + typedef struct { ! PyObject_HEAD ! double ob_fval; } PyFloatObject; *************** *** 30,36 **** #define PyFloat_Check(op) ((op)->ob_type == &PyFloat_Type) ! extern DL_IMPORT(PyObject *) PyFloat_FromString Py_PROTO((PyObject*, char**)); ! extern DL_IMPORT(PyObject *) PyFloat_FromDouble Py_PROTO((double)); ! extern DL_IMPORT(double) PyFloat_AsDouble Py_PROTO((PyObject *)); /* Macro, trading safety for speed */ --- 30,36 ---- #define PyFloat_Check(op) ((op)->ob_type == &PyFloat_Type) ! extern DL_IMPORT(PyObject *) PyFloat_FromString(PyObject*, char**); ! extern DL_IMPORT(PyObject *) PyFloat_FromDouble(double); ! extern DL_IMPORT(double) PyFloat_AsDouble(PyObject *); /* Macro, trading safety for speed */ Index: frameobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/frameobject.h,v retrieving revision 2.26 retrieving revision 2.27 diff -C2 -r2.26 -r2.27 *** frameobject.h 2000/06/30 23:58:04 2.26 --- frameobject.h 2000/07/09 00:20:36 2.27 *************** *** 1,8 **** - #ifndef Py_FRAMEOBJECT_H - #define Py_FRAMEOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,46 **** /* Frame object interface */ typedef struct { ! int b_type; /* what kind of block this is */ ! int b_handler; /* where to jump to find handler */ ! int b_level; /* value stack level to pop to */ } PyTryBlock; typedef struct _frame { ! PyObject_HEAD ! struct _frame *f_back; /* previous frame, or NULL */ ! PyCodeObject *f_code; /* code segment */ ! PyObject *f_builtins; /* builtin symbol table (PyDictObject) */ ! PyObject *f_globals; /* global symbol table (PyDictObject) */ ! PyObject *f_locals; /* local symbol table (PyDictObject) */ ! PyObject **f_valuestack; /* points after the last local */ ! PyObject *f_trace; /* Trace function */ ! PyObject *f_exc_type, *f_exc_value, *f_exc_traceback; ! PyThreadState *f_tstate; ! int f_lasti; /* Last instruction if called */ ! int f_lineno; /* Current line number */ ! int f_restricted; /* Flag set if restricted operations in this scope */ ! int f_iblock; /* index in f_blockstack */ ! PyTryBlock f_blockstack[CO_MAXBLOCKS]; /* for try and loop blocks */ ! int f_nlocals; /* number of locals */ ! int f_stacksize; /* size of value stack */ ! PyObject *f_localsplus[1]; /* locals+stack, dynamically sized */ } PyFrameObject; --- 11,46 ---- /* Frame object interface */ + #ifndef Py_FRAMEOBJECT_H + #define Py_FRAMEOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + typedef struct { ! int b_type; /* what kind of block this is */ ! int b_handler; /* where to jump to find handler */ ! int b_level; /* value stack level to pop to */ } PyTryBlock; typedef struct _frame { ! PyObject_HEAD ! struct _frame *f_back; /* previous frame, or NULL */ ! PyCodeObject *f_code; /* code segment */ ! PyObject *f_builtins; /* builtin symbol table (PyDictObject) */ ! PyObject *f_globals; /* global symbol table (PyDictObject) */ ! PyObject *f_locals; /* local symbol table (PyDictObject) */ ! PyObject **f_valuestack; /* points after the last local */ ! PyObject *f_trace; /* Trace function */ ! PyObject *f_exc_type, *f_exc_value, *f_exc_traceback; ! PyThreadState *f_tstate; ! int f_lasti; /* Last instruction if called */ ! int f_lineno; /* Current line number */ ! int f_restricted; /* Flag set if restricted operations in this scope */ ! int f_iblock; /* index in f_blockstack */ ! PyTryBlock f_blockstack[CO_MAXBLOCKS]; /* for try and loop blocks */ ! int f_nlocals; /* number of locals */ ! int f_stacksize; /* size of value stack */ ! PyObject *f_localsplus[1]; /* locals+stack, dynamically sized */ } PyFrameObject; *************** *** 52,58 **** #define PyFrame_Check(op) ((op)->ob_type == &PyFrame_Type) ! DL_IMPORT(PyFrameObject *) PyFrame_New ! Py_PROTO((PyThreadState *, PyCodeObject *, ! PyObject *, PyObject *)); --- 52,57 ---- #define PyFrame_Check(op) ((op)->ob_type == &PyFrame_Type) ! DL_IMPORT(PyFrameObject *) PyFrame_New(PyThreadState *, PyCodeObject *, ! PyObject *, PyObject *); *************** *** 81,95 **** /* Block management functions */ ! DL_IMPORT(void) PyFrame_BlockSetup Py_PROTO((PyFrameObject *, int, int, int)); ! DL_IMPORT(PyTryBlock *) PyFrame_BlockPop Py_PROTO((PyFrameObject *)); /* Extend the value stack */ ! DL_IMPORT(PyObject **) PyFrame_ExtendStack Py_PROTO((PyFrameObject *, int, int)); /* Conversions between "fast locals" and locals in dictionary */ ! DL_IMPORT(void) PyFrame_LocalsToFast Py_PROTO((PyFrameObject *, int)); ! DL_IMPORT(void) PyFrame_FastToLocals Py_PROTO((PyFrameObject *)); #ifdef __cplusplus --- 80,94 ---- /* Block management functions */ ! DL_IMPORT(void) PyFrame_BlockSetup(PyFrameObject *, int, int, int); ! DL_IMPORT(PyTryBlock *) PyFrame_BlockPop(PyFrameObject *); /* Extend the value stack */ ! DL_IMPORT(PyObject **) PyFrame_ExtendStack(PyFrameObject *, int, int); /* Conversions between "fast locals" and locals in dictionary */ ! DL_IMPORT(void) PyFrame_LocalsToFast(PyFrameObject *, int); ! DL_IMPORT(void) PyFrame_FastToLocals(PyFrameObject *); #ifdef __cplusplus Index: funcobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/funcobject.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** funcobject.h 2000/06/30 23:58:04 2.18 --- funcobject.h 2000/07/09 00:20:36 2.19 *************** *** 1,8 **** - #ifndef Py_FUNCOBJECT_H - #define Py_FUNCOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,27 **** /* Function object interface */ typedef struct { ! PyObject_HEAD ! PyObject *func_code; ! PyObject *func_globals; ! PyObject *func_defaults; ! PyObject *func_doc; ! PyObject *func_name; } PyFunctionObject; --- 11,27 ---- /* Function object interface */ + #ifndef Py_FUNCOBJECT_H + #define Py_FUNCOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + typedef struct { ! PyObject_HEAD ! PyObject *func_code; ! PyObject *func_globals; ! PyObject *func_defaults; ! PyObject *func_doc; ! PyObject *func_name; } PyFunctionObject; *************** *** 30,38 **** #define PyFunction_Check(op) ((op)->ob_type == &PyFunction_Type) ! extern DL_IMPORT(PyObject *) PyFunction_New Py_PROTO((PyObject *, PyObject *)); ! extern DL_IMPORT(PyObject *) PyFunction_GetCode Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyFunction_GetGlobals Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyFunction_GetDefaults Py_PROTO((PyObject *)); ! extern DL_IMPORT(int) PyFunction_SetDefaults Py_PROTO((PyObject *, PyObject *)); /* Macros for direct access to these values. Type checks are *not* --- 30,38 ---- #define PyFunction_Check(op) ((op)->ob_type == &PyFunction_Type) ! extern DL_IMPORT(PyObject *) PyFunction_New(PyObject *, PyObject *); ! extern DL_IMPORT(PyObject *) PyFunction_GetCode(PyObject *); ! extern DL_IMPORT(PyObject *) PyFunction_GetGlobals(PyObject *); ! extern DL_IMPORT(PyObject *) PyFunction_GetDefaults(PyObject *); ! extern DL_IMPORT(int) PyFunction_SetDefaults(PyObject *, PyObject *); /* Macros for direct access to these values. Type checks are *not* Index: grammar.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/grammar.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** grammar.h 2000/06/30 23:58:04 2.12 --- grammar.h 2000/07/09 00:20:36 2.13 *************** *** 1,8 **** - #ifndef Py_GRAMMAR_H - #define Py_GRAMMAR_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,20 **** --- 11,20 ---- /* Grammar interface */ + #ifndef Py_GRAMMAR_H + #define Py_GRAMMAR_H + #ifdef __cplusplus + extern "C" { + #endif + #include "bitset.h" /* Sigh... */ *************** *** 22,27 **** typedef struct { ! int lb_type; ! char *lb_str; } label; --- 22,27 ---- typedef struct { ! int lb_type; ! char *lb_str; } label; *************** *** 31,36 **** typedef struct { ! int ll_nlabels; ! label *ll_label; } labellist; --- 31,36 ---- typedef struct { ! int ll_nlabels; ! label *ll_label; } labellist; *************** *** 38,43 **** typedef struct { ! short a_lbl; /* Label of this arc */ ! short a_arrow; /* State where this arc goes to */ } arc; --- 38,43 ---- typedef struct { ! short a_lbl; /* Label of this arc */ ! short a_arrow; /* State where this arc goes to */ } arc; *************** *** 45,56 **** typedef struct { ! int s_narcs; ! arc *s_arc; /* Array of arcs */ ! /* Optional accelerators */ ! int s_lower; /* Lowest label index */ ! int s_upper; /* Highest label index */ ! int *s_accel; /* Accelerator */ ! int s_accept; /* Nonzero for accepting state */ } state; --- 45,56 ---- typedef struct { ! int s_narcs; ! arc *s_arc; /* Array of arcs */ ! /* Optional accelerators */ ! int s_lower; /* Lowest label index */ ! int s_upper; /* Highest label index */ ! int *s_accel; /* Accelerator */ ! int s_accept; /* Nonzero for accepting state */ } state; *************** *** 58,67 **** typedef struct { ! int d_type; /* Non-terminal this represents */ ! char *d_name; /* For printing */ ! int d_initial; /* Initial state */ ! int d_nstates; ! state *d_state; /* Array of states */ ! bitset d_first; } dfa; --- 58,67 ---- typedef struct { ! int d_type; /* Non-terminal this represents */ ! char *d_name; /* For printing */ ! int d_initial; /* Initial state */ ! int d_nstates; ! state *d_state; /* Array of states */ ! bitset d_first; } dfa; *************** *** 69,100 **** typedef struct { ! int g_ndfas; ! dfa *g_dfa; /* Array of DFAs */ ! labellist g_ll; ! int g_start; /* Start symbol of the grammar */ ! int g_accel; /* Set if accelerators present */ } grammar; /* FUNCTIONS */ ! grammar *newgrammar Py_PROTO((int start)); ! dfa *adddfa Py_PROTO((grammar *g, int type, char *name)); ! int addstate Py_PROTO((dfa *d)); ! void addarc Py_PROTO((dfa *d, int from, int to, int lbl)); ! dfa *PyGrammar_FindDFA Py_PROTO((grammar *g, int type)); ! char *typename Py_PROTO((grammar *g, int lbl)); ! ! int addlabel Py_PROTO((labellist *ll, int type, char *str)); ! int findlabel Py_PROTO((labellist *ll, int type, char *str)); ! char *PyGrammar_LabelRepr Py_PROTO((label *lb)); ! void translatelabels Py_PROTO((grammar *g)); ! void addfirstsets Py_PROTO((grammar *g)); ! void PyGrammar_AddAccelerators Py_PROTO((grammar *g)); ! void PyGrammar_RemoveAccelerators Py_PROTO((grammar *)); ! void printgrammar Py_PROTO((grammar *g, FILE *fp)); ! void printnonterminals Py_PROTO((grammar *g, FILE *fp)); #ifdef __cplusplus --- 69,100 ---- typedef struct { ! int g_ndfas; ! dfa *g_dfa; /* Array of DFAs */ ! labellist g_ll; ! int g_start; /* Start symbol of the grammar */ ! int g_accel; /* Set if accelerators present */ } grammar; /* FUNCTIONS */ ! grammar *newgrammar(int start); ! dfa *adddfa(grammar *g, int type, char *name); ! int addstate(dfa *d); ! void addarc(dfa *d, int from, int to, int lbl); ! dfa *PyGrammar_FindDFA(grammar *g, int type); ! char *typename(grammar *g, int lbl); ! ! int addlabel(labellist *ll, int type, char *str); ! int findlabel(labellist *ll, int type, char *str); ! char *PyGrammar_LabelRepr(label *lb); ! void translatelabels(grammar *g); ! void addfirstsets(grammar *g); ! void PyGrammar_AddAccelerators(grammar *g); ! void PyGrammar_RemoveAccelerators(grammar *); ! void printgrammar(grammar *g, FILE *fp); ! void printnonterminals(grammar *g, FILE *fp); #ifdef __cplusplus Index: intobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/intobject.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** intobject.h 2000/06/30 23:58:04 2.19 --- intobject.h 2000/07/09 00:20:36 2.20 *************** *** 1,8 **** - #ifndef Py_INTOBJECT_H - #define Py_INTOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 30,36 **** */ typedef struct { ! PyObject_HEAD ! long ob_ival; } PyIntObject; --- 24,36 ---- */ + #ifndef Py_INTOBJECT_H + #define Py_INTOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + typedef struct { ! PyObject_HEAD ! long ob_ival; } PyIntObject; *************** *** 39,47 **** #define PyInt_Check(op) ((op)->ob_type == &PyInt_Type) ! extern DL_IMPORT(PyObject *) PyInt_FromString Py_PROTO((char*, char**, int)); ! extern DL_IMPORT(PyObject *) PyInt_FromUnicode Py_PROTO((Py_UNICODE*, int, int)); ! extern DL_IMPORT(PyObject *) PyInt_FromLong Py_PROTO((long)); ! extern DL_IMPORT(long) PyInt_AsLong Py_PROTO((PyObject *)); ! extern DL_IMPORT(long) PyInt_GetMax Py_PROTO((void)); --- 39,47 ---- #define PyInt_Check(op) ((op)->ob_type == &PyInt_Type) ! extern DL_IMPORT(PyObject *) PyInt_FromString(char*, char**, int); ! extern DL_IMPORT(PyObject *) PyInt_FromUnicode(Py_UNICODE*, int, int); ! extern DL_IMPORT(PyObject *) PyInt_FromLong(long); ! extern DL_IMPORT(long) PyInt_AsLong(PyObject *); ! extern DL_IMPORT(long) PyInt_GetMax(void); *************** *** 69,74 **** * building it this way. :-) [cjh] */ ! extern DL_IMPORT(unsigned long) PyOS_strtoul Py_PROTO((char *, char **, int)); ! extern DL_IMPORT(long) PyOS_strtol Py_PROTO((char *, char **, int)); #ifdef __cplusplus --- 69,74 ---- * building it this way. :-) [cjh] */ ! extern DL_IMPORT(unsigned long) PyOS_strtoul(char *, char **, int); ! extern DL_IMPORT(long) PyOS_strtol(char *, char **, int); #ifdef __cplusplus Index: listobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/listobject.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** listobject.h 2000/06/30 23:58:04 2.19 --- listobject.h 2000/07/09 00:20:36 2.20 *************** *** 1,8 **** - #ifndef Py_LISTOBJECT_H - #define Py_LISTOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 29,35 **** */ typedef struct { ! PyObject_VAR_HEAD ! PyObject **ob_item; } PyListObject; --- 23,35 ---- */ + #ifndef Py_LISTOBJECT_H + #define Py_LISTOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + typedef struct { ! PyObject_VAR_HEAD ! PyObject **ob_item; } PyListObject; *************** *** 38,52 **** #define PyList_Check(op) ((op)->ob_type == &PyList_Type) ! extern DL_IMPORT(PyObject *) PyList_New Py_PROTO((int size)); ! extern DL_IMPORT(int) PyList_Size Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyList_GetItem Py_PROTO((PyObject *, int)); ! extern DL_IMPORT(int) PyList_SetItem Py_PROTO((PyObject *, int, PyObject *)); ! extern DL_IMPORT(int) PyList_Insert Py_PROTO((PyObject *, int, PyObject *)); ! extern DL_IMPORT(int) PyList_Append Py_PROTO((PyObject *, PyObject *)); ! extern DL_IMPORT(PyObject *) PyList_GetSlice Py_PROTO((PyObject *, int, int)); ! extern DL_IMPORT(int) PyList_SetSlice Py_PROTO((PyObject *, int, int, PyObject *)); ! extern DL_IMPORT(int) PyList_Sort Py_PROTO((PyObject *)); ! extern DL_IMPORT(int) PyList_Reverse Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyList_AsTuple Py_PROTO((PyObject *)); /* Macro, trading safety for speed */ --- 38,52 ---- #define PyList_Check(op) ((op)->ob_type == &PyList_Type) ! extern DL_IMPORT(PyObject *) PyList_New(int size); ! extern DL_IMPORT(int) PyList_Size(PyObject *); ! extern DL_IMPORT(PyObject *) PyList_GetItem(PyObject *, int); ! extern DL_IMPORT(int) PyList_SetItem(PyObject *, int, PyObject *); ! extern DL_IMPORT(int) PyList_Insert(PyObject *, int, PyObject *); ! extern DL_IMPORT(int) PyList_Append(PyObject *, PyObject *); ! extern DL_IMPORT(PyObject *) PyList_GetSlice(PyObject *, int, int); ! extern DL_IMPORT(int) PyList_SetSlice(PyObject *, int, int, PyObject *); ! extern DL_IMPORT(int) PyList_Sort(PyObject *); ! extern DL_IMPORT(int) PyList_Reverse(PyObject *); ! extern DL_IMPORT(PyObject *) PyList_AsTuple(PyObject *); /* Macro, trading safety for speed */ Index: methodobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/methodobject.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** methodobject.h 2000/06/30 23:58:04 2.18 --- methodobject.h 2000/07/09 00:20:36 2.19 *************** *** 1,8 **** - #ifndef Py_METHODOBJECT_H - #define Py_METHODOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,20 **** --- 11,20 ---- /* Method object interface */ + #ifndef Py_METHODOBJECT_H + #define Py_METHODOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + extern DL_IMPORT(PyTypeObject) PyCFunction_Type; *************** *** 25,31 **** Py_FPROTO((PyObject *, PyObject *, PyObject *)); ! extern DL_IMPORT(PyCFunction) PyCFunction_GetFunction Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyCFunction_GetSelf Py_PROTO((PyObject *)); ! extern DL_IMPORT(int) PyCFunction_GetFlags Py_PROTO((PyObject *)); /* Macros for direct access to these values. Type checks are *not* --- 25,31 ---- Py_FPROTO((PyObject *, PyObject *, PyObject *)); ! extern DL_IMPORT(PyCFunction) PyCFunction_GetFunction(PyObject *); ! extern DL_IMPORT(PyObject *) PyCFunction_GetSelf(PyObject *); ! extern DL_IMPORT(int) PyCFunction_GetFlags(PyObject *); /* Macros for direct access to these values. Type checks are *not* *************** *** 39,54 **** struct PyMethodDef { ! char *ml_name; ! PyCFunction ml_meth; ! int ml_flags; ! char *ml_doc; }; typedef struct PyMethodDef PyMethodDef; ! extern DL_IMPORT(PyObject *) Py_FindMethod ! Py_PROTO((PyMethodDef[], PyObject *, char *)); ! extern DL_IMPORT(PyObject *) PyCFunction_New ! Py_PROTO((PyMethodDef *, PyObject *)); /* Flag passed to newmethodobject */ --- 39,52 ---- struct PyMethodDef { ! char *ml_name; ! PyCFunction ml_meth; ! int ml_flags; ! char *ml_doc; }; typedef struct PyMethodDef PyMethodDef; ! extern DL_IMPORT(PyObject *) Py_FindMethod(PyMethodDef[], PyObject *, char *); ! extern DL_IMPORT(PyObject *) PyCFunction_New(PyMethodDef *, PyObject *); /* Flag passed to newmethodobject */ *************** *** 57,71 **** typedef struct PyMethodChain { ! PyMethodDef *methods; /* Methods of this type */ ! struct PyMethodChain *link; /* NULL or base type */ } PyMethodChain; ! extern DL_IMPORT(PyObject *) Py_FindMethodInChain ! Py_PROTO((PyMethodChain *, PyObject *, char *)); typedef struct { ! PyObject_HEAD ! PyMethodDef *m_ml; ! PyObject *m_self; } PyCFunctionObject; --- 55,69 ---- typedef struct PyMethodChain { ! PyMethodDef *methods; /* Methods of this type */ ! struct PyMethodChain *link; /* NULL or base type */ } PyMethodChain; ! extern DL_IMPORT(PyObject *) Py_FindMethodInChain(PyMethodChain *, PyObject *, ! char *); typedef struct { ! PyObject_HEAD ! PyMethodDef *m_ml; ! PyObject *m_self; } PyCFunctionObject; From python-dev@python.org Sun Jul 9 01:55:09 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 17:55:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include moduleobject.h,2.15,2.16 objimpl.h,2.20,2.21 pythonrun.h,2.30,2.31 pythread.h,2.15,2.16 rangeobject.h,2.13,2.14 sliceobject.h,2.4,2.5 stringobject.h,2.20,2.21 sysmodule.h,2.19,2.20 token.h,2.14,2.15 tupleobject.h,2.22,2.23 Message-ID: <200007090055.RAA17033@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv17017 Modified Files: moduleobject.h objimpl.h pythonrun.h pythread.h rangeobject.h sliceobject.h stringobject.h sysmodule.h token.h tupleobject.h Log Message: ANSI-fication and Py_PROTO extermination. Index: moduleobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/moduleobject.h,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** moduleobject.h 2000/06/30 23:58:04 2.15 --- moduleobject.h 2000/07/09 00:55:06 2.16 *************** *** 1,8 **** - #ifndef Py_MODULEOBJECT_H - #define Py_MODULEOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,29 **** /* Module object interface */ extern DL_IMPORT(PyTypeObject) PyModule_Type; #define PyModule_Check(op) ((op)->ob_type == &PyModule_Type) ! extern DL_IMPORT(PyObject *) PyModule_New Py_PROTO((char *)); ! extern DL_IMPORT(PyObject *) PyModule_GetDict Py_PROTO((PyObject *)); ! extern DL_IMPORT(char *) PyModule_GetName Py_PROTO((PyObject *)); ! extern DL_IMPORT(char *) PyModule_GetFilename Py_PROTO((PyObject *)); ! extern DL_IMPORT(void) _PyModule_Clear Py_PROTO((PyObject *)); #ifdef __cplusplus --- 11,29 ---- /* Module object interface */ + #ifndef Py_MODULEOBJECT_H + #define Py_MODULEOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + extern DL_IMPORT(PyTypeObject) PyModule_Type; #define PyModule_Check(op) ((op)->ob_type == &PyModule_Type) ! extern DL_IMPORT(PyObject *) PyModule_New(char *); ! extern DL_IMPORT(PyObject *) PyModule_GetDict(PyObject *); ! extern DL_IMPORT(char *) PyModule_GetName(PyObject *); ! extern DL_IMPORT(char *) PyModule_GetFilename(PyObject *); ! extern DL_IMPORT(void) _PyModule_Clear(PyObject *); #ifdef __cplusplus Index: objimpl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/objimpl.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** objimpl.h 2000/07/01 01:00:35 2.20 --- objimpl.h 2000/07/09 00:55:06 2.21 *************** *** 1,8 **** - #ifndef Py_OBJIMPL_H - #define Py_OBJIMPL_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 15,18 **** --- 9,18 ---- ******************************************************************/ + #ifndef Py_OBJIMPL_H + #define Py_OBJIMPL_H + #ifdef __cplusplus + extern "C" { + #endif + #include "mymalloc.h" *************** *** 138,144 **** bytes returns a non-NULL pointer. Returned pointers must be checked for NULL explicitly; no action is performed on failure. */ ! extern DL_IMPORT(ANY *) PyObject_Malloc Py_PROTO((size_t)); ! extern DL_IMPORT(ANY *) PyObject_Realloc Py_PROTO((ANY *, size_t)); ! extern DL_IMPORT(void) PyObject_Free Py_PROTO((ANY *)); /* Macros */ --- 138,144 ---- bytes returns a non-NULL pointer. Returned pointers must be checked for NULL explicitly; no action is performed on failure. */ ! extern DL_IMPORT(ANY *) PyObject_Malloc(size_t); ! extern DL_IMPORT(ANY *) PyObject_Realloc(ANY *, size_t); ! extern DL_IMPORT(void) PyObject_Free(ANY *); /* Macros */ *************** *** 153,161 **** /* Functions */ ! extern DL_IMPORT(PyObject *) PyObject_Init Py_PROTO((PyObject *, PyTypeObject *)); ! extern DL_IMPORT(PyVarObject *) PyObject_InitVar Py_PROTO((PyVarObject *, PyTypeObject *, int)); ! extern DL_IMPORT(PyObject *) _PyObject_New Py_PROTO((PyTypeObject *)); ! extern DL_IMPORT(PyVarObject *) _PyObject_NewVar Py_PROTO((PyTypeObject *, int)); ! extern DL_IMPORT(void) _PyObject_Del Py_PROTO((PyObject *)); #define PyObject_New(type, typeobj) \ --- 153,162 ---- /* Functions */ ! extern DL_IMPORT(PyObject *) PyObject_Init(PyObject *, PyTypeObject *); ! extern DL_IMPORT(PyVarObject *) PyObject_InitVar(PyVarObject *, ! PyTypeObject *, int); ! extern DL_IMPORT(PyObject *) _PyObject_New(PyTypeObject *); ! extern DL_IMPORT(PyVarObject *) _PyObject_NewVar(PyTypeObject *, int); ! extern DL_IMPORT(void) _PyObject_Del(PyObject *); #define PyObject_New(type, typeobj) \ *************** *** 241,248 **** /* Add the object into the container set */ ! extern DL_IMPORT(void) _PyGC_Insert Py_PROTO((PyObject *)); /* Remove the object from the container set */ ! extern DL_IMPORT(void) _PyGC_Remove Py_PROTO((PyObject *)); #define PyObject_GC_Init(op) _PyGC_Insert((PyObject *)op) --- 242,249 ---- /* Add the object into the container set */ ! extern DL_IMPORT(void) _PyGC_Insert(PyObject *); /* Remove the object from the container set */ ! extern DL_IMPORT(void) _PyGC_Remove(PyObject *); #define PyObject_GC_Init(op) _PyGC_Insert((PyObject *)op) Index: pythonrun.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pythonrun.h,v retrieving revision 2.30 retrieving revision 2.31 diff -C2 -r2.30 -r2.31 *** pythonrun.h 2000/06/30 23:58:04 2.30 --- pythonrun.h 2000/07/09 00:55:06 2.31 *************** *** 1,8 **** - #ifndef Py_PYTHONRUN_H - #define Py_PYTHONRUN_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 16,91 **** /* Interfaces to parse and execute pieces of python code */ ! DL_IMPORT(void) Py_SetProgramName Py_PROTO((char *)); ! DL_IMPORT(char *) Py_GetProgramName Py_PROTO((void)); ! DL_IMPORT(void) Py_SetPythonHome Py_PROTO((char *)); ! DL_IMPORT(char *) Py_GetPythonHome Py_PROTO((void)); ! DL_IMPORT(void) Py_Initialize Py_PROTO((void)); ! DL_IMPORT(void) Py_Finalize Py_PROTO((void)); ! DL_IMPORT(int) Py_IsInitialized Py_PROTO((void)); ! DL_IMPORT(PyThreadState *) Py_NewInterpreter Py_PROTO((void)); ! DL_IMPORT(void) Py_EndInterpreter Py_PROTO((PyThreadState *)); ! DL_IMPORT(int) PyRun_AnyFile Py_PROTO((FILE *, char *)); ! DL_IMPORT(int) PyRun_SimpleString Py_PROTO((char *)); ! DL_IMPORT(int) PyRun_SimpleFile Py_PROTO((FILE *, char *)); ! DL_IMPORT(int) PyRun_InteractiveOne Py_PROTO((FILE *, char *)); ! DL_IMPORT(int) PyRun_InteractiveLoop Py_PROTO((FILE *, char *)); ! DL_IMPORT(struct _node *) PyParser_SimpleParseString Py_PROTO((char *, int)); ! DL_IMPORT(struct _node *) PyParser_SimpleParseFile Py_PROTO((FILE *, char *, int)); ! DL_IMPORT(PyObject *) PyRun_String Py_PROTO((char *, int, PyObject *, PyObject *)); ! DL_IMPORT(PyObject *) PyRun_File Py_PROTO((FILE *, char *, int, PyObject *, PyObject *)); ! DL_IMPORT(PyObject *) Py_CompileString Py_PROTO((char *, char *, int)); ! DL_IMPORT(void) PyErr_Print Py_PROTO((void)); ! DL_IMPORT(void) PyErr_PrintEx Py_PROTO((int)); ! DL_IMPORT(int) Py_AtExit Py_PROTO((void (*func) Py_PROTO((void)))); ! DL_IMPORT(void) Py_Exit Py_PROTO((int)); ! DL_IMPORT(int) Py_FdIsInteractive Py_PROTO((FILE *, char *)); /* In getpath.c */ ! DL_IMPORT(char *) Py_GetProgramFullPath Py_PROTO((void)); ! DL_IMPORT(char *) Py_GetPrefix Py_PROTO((void)); ! DL_IMPORT(char *) Py_GetExecPrefix Py_PROTO((void)); ! DL_IMPORT(char *) Py_GetPath Py_PROTO((void)); /* In their own files */ ! DL_IMPORT(const char *) Py_GetVersion Py_PROTO((void)); ! DL_IMPORT(const char *) Py_GetPlatform Py_PROTO((void)); ! DL_IMPORT(const char *) Py_GetCopyright Py_PROTO((void)); ! DL_IMPORT(const char *) Py_GetCompiler Py_PROTO((void)); ! DL_IMPORT(const char *) Py_GetBuildInfo Py_PROTO((void)); /* Internal -- various one-time initializations */ ! DL_IMPORT(PyObject *) _PyBuiltin_Init Py_PROTO((void)); ! DL_IMPORT(PyObject *) _PySys_Init Py_PROTO((void)); ! DL_IMPORT(void) _PyImport_Init Py_PROTO((void)); ! DL_IMPORT(void) init_exceptions Py_PROTO((void)); /* Various internal finalizers */ ! DL_IMPORT(void) fini_exceptions Py_PROTO((void)); ! DL_IMPORT(void) _PyImport_Fini Py_PROTO((void)); ! DL_IMPORT(void) PyMethod_Fini Py_PROTO((void)); ! DL_IMPORT(void) PyFrame_Fini Py_PROTO((void)); ! DL_IMPORT(void) PyCFunction_Fini Py_PROTO((void)); ! DL_IMPORT(void) PyTuple_Fini Py_PROTO((void)); ! DL_IMPORT(void) PyString_Fini Py_PROTO((void)); ! DL_IMPORT(void) PyInt_Fini Py_PROTO((void)); ! DL_IMPORT(void) PyFloat_Fini Py_PROTO((void)); ! DL_IMPORT(void) PyOS_FiniInterrupts Py_PROTO((void)); /* Stuff with no proper home (yet) */ ! DL_IMPORT(char *) PyOS_Readline Py_PROTO((char *)); ! extern DL_IMPORT(int) (*PyOS_InputHook) Py_PROTO((void)); ! extern DL_IMPORT(char) *(*PyOS_ReadlineFunctionPointer) Py_PROTO((char *)); #ifdef __cplusplus --- 10,91 ---- /* Interfaces to parse and execute pieces of python code */ + + #ifndef Py_PYTHONRUN_H + #define Py_PYTHONRUN_H + #ifdef __cplusplus + extern "C" { + #endif ! DL_IMPORT(void) Py_SetProgramName(char *); ! DL_IMPORT(char *) Py_GetProgramName(void); ! DL_IMPORT(void) Py_SetPythonHome(char *); ! DL_IMPORT(char *) Py_GetPythonHome(void); ! DL_IMPORT(void) Py_Initialize(void); ! DL_IMPORT(void) Py_Finalize(void); ! DL_IMPORT(int) Py_IsInitialized(void); ! DL_IMPORT(PyThreadState *) Py_NewInterpreter(void); ! DL_IMPORT(void) Py_EndInterpreter(PyThreadState *); ! DL_IMPORT(int) PyRun_AnyFile(FILE *, char *); ! DL_IMPORT(int) PyRun_SimpleString(char *); ! DL_IMPORT(int) PyRun_SimpleFile(FILE *, char *); ! DL_IMPORT(int) PyRun_InteractiveOne(FILE *, char *); ! DL_IMPORT(int) PyRun_InteractiveLoop(FILE *, char *); ! DL_IMPORT(struct _node *) PyParser_SimpleParseString(char *, int); ! DL_IMPORT(struct _node *) PyParser_SimpleParseFile(FILE *, char *, int); ! DL_IMPORT(PyObject *) PyRun_String(char *, int, PyObject *, PyObject *); ! DL_IMPORT(PyObject *) PyRun_File(FILE *, char *, int, PyObject *, PyObject *); ! DL_IMPORT(PyObject *) Py_CompileString(char *, char *, int); ! DL_IMPORT(void) PyErr_Print(void); ! DL_IMPORT(void) PyErr_PrintEx(int); ! DL_IMPORT(int) Py_AtExit(void (*func)(void)); ! DL_IMPORT(void) Py_Exit(int); ! DL_IMPORT(int) Py_FdIsInteractive(FILE *, char *); /* In getpath.c */ ! DL_IMPORT(char *) Py_GetProgramFullPath(void); ! DL_IMPORT(char *) Py_GetPrefix(void); ! DL_IMPORT(char *) Py_GetExecPrefix(void); ! DL_IMPORT(char *) Py_GetPath(void); /* In their own files */ ! DL_IMPORT(const char *) Py_GetVersion(void); ! DL_IMPORT(const char *) Py_GetPlatform(void); ! DL_IMPORT(const char *) Py_GetCopyright(void); ! DL_IMPORT(const char *) Py_GetCompiler(void); ! DL_IMPORT(const char *) Py_GetBuildInfo(void); /* Internal -- various one-time initializations */ ! DL_IMPORT(PyObject *) _PyBuiltin_Init(void); ! DL_IMPORT(PyObject *) _PySys_Init(void); ! DL_IMPORT(void) _PyImport_Init(void); ! DL_IMPORT(void) init_exceptions(void); /* Various internal finalizers */ ! DL_IMPORT(void) fini_exceptions(void); ! DL_IMPORT(void) _PyImport_Fini(void); ! DL_IMPORT(void) PyMethod_Fini(void); ! DL_IMPORT(void) PyFrame_Fini(void); ! DL_IMPORT(void) PyCFunction_Fini(void); ! DL_IMPORT(void) PyTuple_Fini(void); ! DL_IMPORT(void) PyString_Fini(void); ! DL_IMPORT(void) PyInt_Fini(void); ! DL_IMPORT(void) PyFloat_Fini(void); ! DL_IMPORT(void) PyOS_FiniInterrupts(void); /* Stuff with no proper home (yet) */ ! DL_IMPORT(char *) PyOS_Readline(char *); ! extern DL_IMPORT(int) (*PyOS_InputHook)(void); ! extern DL_IMPORT(char) *(*PyOS_ReadlineFunctionPointer)(char *); #ifdef __cplusplus Index: pythread.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pythread.h,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** pythread.h 2000/06/30 23:58:04 2.15 --- pythread.h 2000/07/09 00:55:06 2.16 *************** *** 1,5 **** - #ifndef Py_PYTHREAD_H - #define Py_PYTHREAD_H - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 12,26 **** ******************************************************************/ #define NO_EXIT_PROG /* don't define PyThread_exit_prog() */ /* (the result is no use of signals on SGI) */ - #ifndef Py_PROTO - #if defined(__STDC__) || defined(__cplusplus) - #define Py_PROTO(args) args - #else - #define Py_PROTO(args) () - #endif - #endif - typedef void *PyThread_type_lock; typedef void *PyThread_type_sema; --- 9,18 ---- ******************************************************************/ + #ifndef Py_PYTHREAD_H + #define Py_PYTHREAD_H + #define NO_EXIT_PROG /* don't define PyThread_exit_prog() */ /* (the result is no use of signals on SGI) */ typedef void *PyThread_type_lock; typedef void *PyThread_type_sema; *************** *** 30,62 **** #endif ! DL_IMPORT(void) PyThread_init_thread Py_PROTO((void)); ! DL_IMPORT(int) PyThread_start_new_thread Py_PROTO((void (*)(void *), void *)); ! DL_IMPORT(void) PyThread_exit_thread Py_PROTO((void)); ! DL_IMPORT(void) PyThread__PyThread_exit_thread Py_PROTO((void)); ! DL_IMPORT(long) PyThread_get_thread_ident Py_PROTO((void)); ! ! DL_IMPORT(PyThread_type_lock) PyThread_allocate_lock Py_PROTO((void)); ! DL_IMPORT(void) PyThread_free_lock Py_PROTO((PyThread_type_lock)); ! DL_IMPORT(int) PyThread_acquire_lock Py_PROTO((PyThread_type_lock, int)); #define WAIT_LOCK 1 #define NOWAIT_LOCK 0 ! DL_IMPORT(void) PyThread_release_lock Py_PROTO((PyThread_type_lock)); ! DL_IMPORT(PyThread_type_sema) PyThread_allocate_sema Py_PROTO((int)); ! DL_IMPORT(void) PyThread_free_sema Py_PROTO((PyThread_type_sema)); ! DL_IMPORT(int) PyThread_down_sema Py_PROTO((PyThread_type_sema, int)); #define WAIT_SEMA 1 #define NOWAIT_SEMA 0 ! DL_IMPORT(void) PyThread_up_sema Py_PROTO((PyThread_type_sema)); #ifndef NO_EXIT_PROG ! DL_IMPORT(void) PyThread_exit_prog Py_PROTO((int)); ! DL_IMPORT(void) PyThread__PyThread_exit_prog Py_PROTO((int)); #endif ! DL_IMPORT(int) PyThread_create_key Py_PROTO((void)); ! DL_IMPORT(void) PyThread_delete_key Py_PROTO((int)); ! DL_IMPORT(int) PyThread_set_key_value Py_PROTO((int, void *)); ! DL_IMPORT(void *) PyThread_get_key_value Py_PROTO((int)); #ifdef __cplusplus --- 22,54 ---- #endif ! DL_IMPORT(void) PyThread_init_thread(void); ! DL_IMPORT(int) PyThread_start_new_thread(void (*)(void *), void *); ! DL_IMPORT(void) PyThread_exit_thread(void); ! DL_IMPORT(void) PyThread__PyThread_exit_thread(void); ! DL_IMPORT(long) PyThread_get_thread_ident(void); ! ! DL_IMPORT(PyThread_type_lock) PyThread_allocate_lock(void); ! DL_IMPORT(void) PyThread_free_lock(PyThread_type_lock); ! DL_IMPORT(int) PyThread_acquire_lock(PyThread_type_lock, int); #define WAIT_LOCK 1 #define NOWAIT_LOCK 0 ! DL_IMPORT(void) PyThread_release_lock(PyThread_type_lock); ! DL_IMPORT(PyThread_type_sema) PyThread_allocate_sema(int); ! DL_IMPORT(void) PyThread_free_sema(PyThread_type_sema); ! DL_IMPORT(int) PyThread_down_sema(PyThread_type_sema, int); #define WAIT_SEMA 1 #define NOWAIT_SEMA 0 ! DL_IMPORT(void) PyThread_up_sema(PyThread_type_sema); #ifndef NO_EXIT_PROG ! DL_IMPORT(void) PyThread_exit_prog(int); ! DL_IMPORT(void) PyThread__PyThread_exit_prog(int); #endif ! DL_IMPORT(int) PyThread_create_key(void); ! DL_IMPORT(void) PyThread_delete_key(int); ! DL_IMPORT(int) PyThread_set_key_value(int, void *); ! DL_IMPORT(void *) PyThread_get_key_value(int); #ifdef __cplusplus Index: rangeobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/rangeobject.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** rangeobject.h 2000/06/30 23:58:04 2.13 --- rangeobject.h 2000/07/09 00:55:06 2.14 *************** *** 23,25 **** #define PyRange_Check(op) ((op)->ob_type == &PyRange_Type) ! extern DL_IMPORT(PyObject *) PyRange_New Py_PROTO((long, long, long, int)); --- 23,25 ---- #define PyRange_Check(op) ((op)->ob_type == &PyRange_Type) ! extern DL_IMPORT(PyObject *) PyRange_New(long, long, long, int); Index: sliceobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/sliceobject.h,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** sliceobject.h 1998/12/04 18:48:20 2.4 --- sliceobject.h 2000/07/09 00:55:06 2.5 *************** *** 21,26 **** typedef struct { ! PyObject_HEAD ! PyObject *start, *stop, *step; } PySliceObject; --- 21,26 ---- typedef struct { ! PyObject_HEAD ! PyObject *start, *stop, *step; } PySliceObject; *************** *** 29,36 **** #define PySlice_Check(op) ((op)->ob_type == &PySlice_Type) ! DL_IMPORT(PyObject *) PySlice_New Py_PROTO(( ! PyObject* start, PyObject* stop, PyObject* step)); ! DL_IMPORT(int) PySlice_GetIndices Py_PROTO(( ! PySliceObject *r, int length, int *start, int *stop, int *step)); #ifdef __cplusplus --- 29,36 ---- #define PySlice_Check(op) ((op)->ob_type == &PySlice_Type) ! DL_IMPORT(PyObject *) PySlice_New(PyObject* start, PyObject* stop, ! PyObject* step); ! DL_IMPORT(int) PySlice_GetIndices(PySliceObject *r, int length, ! int *start, int *stop, int *step); #ifdef __cplusplus Index: stringobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/stringobject.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** stringobject.h 2000/07/06 11:25:40 2.20 --- stringobject.h 2000/07/09 00:55:06 2.21 *************** *** 1,8 **** - #ifndef Py_STRINGOBJECT_H - #define Py_STRINGOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,20 **** --- 11,20 ---- /* String object interface */ + #ifndef Py_STRINGOBJECT_H + #define Py_STRINGOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + /* Type PyStringObject represents a character string. An extra zero byte is *************** *** 47,58 **** typedef struct { ! PyObject_VAR_HEAD #ifdef CACHE_HASH ! long ob_shash; #endif #ifdef INTERN_STRINGS ! PyObject *ob_sinterned; #endif ! char ob_sval[1]; } PyStringObject; --- 47,58 ---- typedef struct { ! PyObject_VAR_HEAD #ifdef CACHE_HASH ! long ob_shash; #endif #ifdef INTERN_STRINGS ! PyObject *ob_sinterned; #endif ! char ob_sval[1]; } PyStringObject; *************** *** 61,76 **** #define PyString_Check(op) ((op)->ob_type == &PyString_Type) ! extern DL_IMPORT(PyObject *) PyString_FromStringAndSize Py_PROTO((const char *, int)); ! extern DL_IMPORT(PyObject *) PyString_FromString Py_PROTO((const char *)); ! extern DL_IMPORT(int) PyString_Size Py_PROTO((PyObject *)); ! extern DL_IMPORT(char *) PyString_AsString Py_PROTO((PyObject *)); ! extern DL_IMPORT(void) PyString_Concat Py_PROTO((PyObject **, PyObject *)); ! extern DL_IMPORT(void) PyString_ConcatAndDel Py_PROTO((PyObject **, PyObject *)); ! extern DL_IMPORT(int) _PyString_Resize Py_PROTO((PyObject **, int)); ! extern DL_IMPORT(PyObject *) PyString_Format Py_PROTO((PyObject *, PyObject *)); #ifdef INTERN_STRINGS ! extern DL_IMPORT(void) PyString_InternInPlace Py_PROTO((PyObject **)); ! extern DL_IMPORT(PyObject *) PyString_InternFromString Py_PROTO((const char *)); #else #define PyString_InternInPlace(p) --- 61,76 ---- #define PyString_Check(op) ((op)->ob_type == &PyString_Type) ! extern DL_IMPORT(PyObject *) PyString_FromStringAndSize(const char *, int); ! extern DL_IMPORT(PyObject *) PyString_FromString(const char *); ! extern DL_IMPORT(int) PyString_Size(PyObject *); ! extern DL_IMPORT(char *) PyString_AsString(PyObject *); ! extern DL_IMPORT(void) PyString_Concat(PyObject **, PyObject *); ! extern DL_IMPORT(void) PyString_ConcatAndDel(PyObject **, PyObject *); ! extern DL_IMPORT(int) _PyString_Resize(PyObject **, int); ! extern DL_IMPORT(PyObject *) PyString_Format(PyObject *, PyObject *); #ifdef INTERN_STRINGS ! extern DL_IMPORT(void) PyString_InternInPlace(PyObject **); ! extern DL_IMPORT(PyObject *) PyString_InternFromString(const char *); #else #define PyString_InternInPlace(p) Index: sysmodule.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/sysmodule.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** sysmodule.h 2000/06/30 23:58:04 2.19 --- sysmodule.h 2000/07/09 00:55:06 2.20 *************** *** 1,8 **** - #ifndef Py_SYSMODULE_H - #define Py_SYSMODULE_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 16,25 **** /* System module interface */ ! DL_IMPORT(PyObject *) PySys_GetObject Py_PROTO((char *)); ! DL_IMPORT(int) PySys_SetObject Py_PROTO((char *, PyObject *)); ! DL_IMPORT(FILE *) PySys_GetFile Py_PROTO((char *, FILE *)); ! DL_IMPORT(void) PySys_SetArgv Py_PROTO((int, char **)); ! DL_IMPORT(void) PySys_SetPath Py_PROTO((char *)); #ifdef HAVE_STDARG_PROTOTYPES --- 10,25 ---- /* System module interface */ + + #ifndef Py_SYSMODULE_H + #define Py_SYSMODULE_H + #ifdef __cplusplus + extern "C" { + #endif ! DL_IMPORT(PyObject *) PySys_GetObject(char *); ! DL_IMPORT(int) PySys_SetObject(char *, PyObject *); ! DL_IMPORT(FILE *) PySys_GetFile(char *, FILE *); ! DL_IMPORT(void) PySys_SetArgv(int, char **); ! DL_IMPORT(void) PySys_SetPath(char *); #ifdef HAVE_STDARG_PROTOTYPES Index: token.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/token.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** token.h 2000/06/30 23:58:04 2.14 --- token.h 2000/07/09 00:55:06 2.15 *************** *** 1,8 **** - #ifndef Py_TOKEN_H - #define Py_TOKEN_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,20 **** --- 11,20 ---- /* Token types */ + #ifndef Py_TOKEN_H + #define Py_TOKEN_H + #ifdef __cplusplus + extern "C" { + #endif + #define ENDMARKER 0 #define NAME 1 *************** *** 69,74 **** extern DL_IMPORT(char *) _PyParser_TokenNames[]; /* Token names */ ! extern DL_IMPORT(int) PyToken_OneChar Py_PROTO((int)); ! extern DL_IMPORT(int) PyToken_TwoChars Py_PROTO((int, int)); #ifdef __cplusplus --- 69,74 ---- extern DL_IMPORT(char *) _PyParser_TokenNames[]; /* Token names */ ! extern DL_IMPORT(int) PyToken_OneChar(int); ! extern DL_IMPORT(int) PyToken_TwoChars(int, int); #ifdef __cplusplus Index: tupleobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/tupleobject.h,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** tupleobject.h 2000/06/30 23:58:04 2.22 --- tupleobject.h 2000/07/09 00:55:06 2.23 *************** *** 1,8 **** - #ifndef Py_TUPLEOBJECT_H - #define Py_TUPLEOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,20 **** --- 11,20 ---- /* Tuple object interface */ + #ifndef Py_TUPLEOBJECT_H + #define Py_TUPLEOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + /* Another generally useful object type is an tuple of object pointers. *************** *** 30,35 **** typedef struct { ! PyObject_VAR_HEAD ! PyObject *ob_item[1]; } PyTupleObject; --- 30,35 ---- typedef struct { ! PyObject_VAR_HEAD ! PyObject *ob_item[1]; } PyTupleObject; *************** *** 38,47 **** #define PyTuple_Check(op) ((op)->ob_type == &PyTuple_Type) ! extern DL_IMPORT(PyObject *) PyTuple_New Py_PROTO((int size)); ! extern DL_IMPORT(int) PyTuple_Size Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyTuple_GetItem Py_PROTO((PyObject *, int)); ! extern DL_IMPORT(int) PyTuple_SetItem Py_PROTO((PyObject *, int, PyObject *)); ! extern DL_IMPORT(PyObject *) PyTuple_GetSlice Py_PROTO((PyObject *, int, int)); ! extern DL_IMPORT(int) _PyTuple_Resize Py_PROTO((PyObject **, int, int)); /* Macro, trading safety for speed */ --- 38,47 ---- #define PyTuple_Check(op) ((op)->ob_type == &PyTuple_Type) ! extern DL_IMPORT(PyObject *) PyTuple_New(int size); ! extern DL_IMPORT(int) PyTuple_Size(PyObject *); ! extern DL_IMPORT(PyObject *) PyTuple_GetItem(PyObject *, int); ! extern DL_IMPORT(int) PyTuple_SetItem(PyObject *, int, PyObject *); ! extern DL_IMPORT(PyObject *) PyTuple_GetSlice(PyObject *, int, int); ! extern DL_IMPORT(int) _PyTuple_Resize(PyObject **, int, int); /* Macro, trading safety for speed */ From python-dev@python.org Sun Jul 9 03:11:21 2000 From: python-dev@python.org (Tim Peters) Date: Sat, 8 Jul 2000 19:11:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.167,2.168 Message-ID: <200007090211.TAA00345@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv32685/python/dist/src/Python Modified Files: bltinmodule.c Log Message: Get rid of unused vars in builtin_unicode (they were causing legit warnings). Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.167 retrieving revision 2.168 diff -C2 -r2.167 -r2.168 *** bltinmodule.c 2000/07/07 13:48:25 2.167 --- bltinmodule.c 2000/07/09 02:11:18 2.168 *************** *** 149,154 **** { PyObject *v; - const void *buffer; - int len; char *encoding = NULL; char *errors = NULL; --- 149,152 ---- From python-dev@python.org Sun Jul 9 04:09:59 2000 From: python-dev@python.org (Tim Peters) Date: Sat, 8 Jul 2000 20:09:59 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/freeze makefreeze.py,1.10,1.11 Message-ID: <200007090309.UAA10478@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/freeze In directory slayer.i.sourceforge.net:/tmp/cvs-serv8264/python/dist/src/Tools/freeze Modified Files: makefreeze.py Log Message: Nuke all remaining occurrences of Py_PROTO and Py_FPROTO. Index: makefreeze.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/freeze/makefreeze.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** makefreeze.py 1999/11/02 15:44:40 1.10 --- makefreeze.py 2000/07/09 03:09:57 1.11 *************** *** 23,27 **** char **argv; { ! extern int Py_FrozenMain Py_PROTO((int, char **)); """ + ((not __debug__ and """ Py_OptimizeFlag++; --- 23,27 ---- char **argv; { ! extern int Py_FrozenMain(int, char **); """ + ((not __debug__ and """ Py_OptimizeFlag++; From python-dev@python.org Sun Jul 9 04:09:58 2000 From: python-dev@python.org (Tim Peters) Date: Sat, 8 Jul 2000 20:09:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include cStringIO.h,2.11,2.12 methodobject.h,2.19,2.20 mymalloc.h,2.21,2.22 mymath.h,2.9,2.10 myproto.h,2.8,2.9 Message-ID: <200007090309.UAA10425@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv8264/python/dist/src/Include Modified Files: cStringIO.h methodobject.h mymalloc.h mymath.h myproto.h Log Message: Nuke all remaining occurrences of Py_PROTO and Py_FPROTO. Index: cStringIO.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/cStringIO.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** cStringIO.h 1999/01/25 21:36:13 2.11 --- cStringIO.h 2000/07/09 03:09:55 2.12 *************** *** 77,96 **** /* Read a string. If the last argument is -1, the remainder will be read. */ ! int(*cread) Py_FPROTO((PyObject *, char **, int)); /* Read a line */ ! int(*creadline) Py_FPROTO((PyObject *, char **)); /* Write a string */ ! int(*cwrite) Py_FPROTO((PyObject *, char *, int)); /* Get the cStringIO object as a Python string */ ! PyObject *(*cgetvalue) Py_FPROTO((PyObject *)); /* Create a new output object */ ! PyObject *(*NewOutput) Py_FPROTO((int)); /* Create an input object from a Python string */ ! PyObject *(*NewInput) Py_FPROTO((PyObject *)); /* The Python types for cStringIO input and output objects. --- 77,96 ---- /* Read a string. If the last argument is -1, the remainder will be read. */ ! int(*cread)(PyObject *, char **, int); /* Read a line */ ! int(*creadline)(PyObject *, char **); /* Write a string */ ! int(*cwrite)(PyObject *, char *, int); /* Get the cStringIO object as a Python string */ ! PyObject *(*cgetvalue)(PyObject *); /* Create a new output object */ ! PyObject *(*NewOutput)(int); /* Create an input object from a Python string */ ! PyObject *(*NewInput)(PyObject *); /* The Python types for cStringIO input and output objects. Index: methodobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/methodobject.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** methodobject.h 2000/07/09 00:20:36 2.19 --- methodobject.h 2000/07/09 03:09:55 2.20 *************** *** 21,27 **** #define PyCFunction_Check(op) ((op)->ob_type == &PyCFunction_Type) ! typedef PyObject *(*PyCFunction) Py_FPROTO((PyObject *, PyObject *)); ! typedef PyObject *(*PyCFunctionWithKeywords) ! Py_FPROTO((PyObject *, PyObject *, PyObject *)); extern DL_IMPORT(PyCFunction) PyCFunction_GetFunction(PyObject *); --- 21,27 ---- #define PyCFunction_Check(op) ((op)->ob_type == &PyCFunction_Type) ! typedef PyObject *(*PyCFunction)(PyObject *, PyObject *); ! typedef PyObject *(*PyCFunctionWithKeywords)(PyObject *, PyObject *, ! PyObject *); extern DL_IMPORT(PyCFunction) PyCFunction_GetFunction(PyObject *); Index: mymalloc.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mymalloc.h,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** mymalloc.h 2000/06/30 23:58:04 2.21 --- mymalloc.h 2000/07/09 03:09:55 2.22 *************** *** 91,97 **** #undef PyCore_REALLOC_PROTO #undef PyCore_FREE_PROTO ! #define PyCore_MALLOC_PROTO Py_PROTO((size_t)) ! #define PyCore_REALLOC_PROTO Py_PROTO((ANY *, size_t)) ! #define PyCore_FREE_PROTO Py_PROTO((ANY *)) #endif --- 91,97 ---- #undef PyCore_REALLOC_PROTO #undef PyCore_FREE_PROTO ! #define PyCore_MALLOC_PROTO (size_t) ! #define PyCore_REALLOC_PROTO (ANY *, size_t) ! #define PyCore_FREE_PROTO (ANY *) #endif *************** *** 139,145 **** doesn't. Returned pointers must be checked for NULL explicitly. No action is performed on failure. */ ! extern DL_IMPORT(ANY *) PyMem_Malloc Py_PROTO((size_t)); ! extern DL_IMPORT(ANY *) PyMem_Realloc Py_PROTO((ANY *, size_t)); ! extern DL_IMPORT(void) PyMem_Free Py_PROTO((ANY *)); /* Starting from Python 1.6, the wrappers Py_{Malloc,Realloc,Free} are --- 139,145 ---- doesn't. Returned pointers must be checked for NULL explicitly. No action is performed on failure. */ ! extern DL_IMPORT(ANY *) PyMem_Malloc(size_t); ! extern DL_IMPORT(ANY *) PyMem_Realloc(ANY *, size_t); ! extern DL_IMPORT(void) PyMem_Free(ANY *); /* Starting from Python 1.6, the wrappers Py_{Malloc,Realloc,Free} are *************** *** 199,203 **** #define PyCore_MALLOC_FUNC d_malloc ... ! #define PyCore_MALLOC_PROTO Py_PROTO((size_t, char *, unsigned long)) ... #define NEED_TO_DECLARE_MALLOC_AND_FRIEND --- 199,203 ---- #define PyCore_MALLOC_FUNC d_malloc ... ! #define PyCore_MALLOC_PROTO (size_t, char *, unsigned long) ... #define NEED_TO_DECLARE_MALLOC_AND_FRIEND Index: mymath.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mymath.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** mymath.h 2000/05/11 18:19:41 2.9 --- mymath.h 2000/07/09 03:09:55 2.10 *************** *** 11,15 **** #ifndef HAVE_HYPOT ! extern double hypot Py_PROTO((double, double)); #ifdef MWERKS_BEFORE_PRO4 #define hypot we_dont_want_faulty_hypot_decl --- 11,15 ---- #ifndef HAVE_HYPOT ! extern double hypot(double, double); #ifdef MWERKS_BEFORE_PRO4 #define hypot we_dont_want_faulty_hypot_decl Index: myproto.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/myproto.h,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** myproto.h 2000/06/30 23:58:04 2.8 --- myproto.h 2000/07/09 03:09:55 2.9 *************** *** 15,18 **** --- 15,23 ---- ******************************************************************/ + /*************************************** + THIS FILE IS OBSOLETE + DON'T USE Py_PROTO or Py_FPROTO anymore. + ***************************************/ + #ifdef HAVE_PROTOTYPES #define Py_PROTO(x) x From python-dev@python.org Sun Jul 9 04:09:58 2000 From: python-dev@python.org (Tim Peters) Date: Sat, 8 Jul 2000 20:09:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.37,2.38 classobject.c,2.98,2.99 cobject.c,2.10,2.11 fileobject.c,2.78,2.79 floatobject.c,2.61,2.62 object.c,2.83,2.84 Message-ID: <200007090309.UAA10457@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv8264/python/dist/src/Objects Modified Files: abstract.c classobject.c cobject.c fileobject.c floatobject.c object.c Log Message: Nuke all remaining occurrences of Py_PROTO and Py_FPROTO. Index: abstract.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v retrieving revision 2.37 retrieving revision 2.38 diff -C2 -r2.37 -r2.38 *** abstract.c 2000/06/30 23:58:05 2.37 --- abstract.c 2000/07/09 03:09:56 2.38 *************** *** 311,315 **** if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyNumber_Coerce(&v, &w) != 0) return NULL; --- 311,315 ---- if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyNumber_Coerce(&v, &w) != 0) return NULL; *************** *** 333,337 **** if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyNumber_Coerce(&v, &w) != 0) return NULL; --- 333,337 ---- if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyNumber_Coerce(&v, &w) != 0) return NULL; *************** *** 353,357 **** if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyNumber_Coerce(&v, &w) != 0) return NULL; --- 353,357 ---- if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyNumber_Coerce(&v, &w) != 0) return NULL; *************** *** 373,377 **** if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyNumber_Coerce(&v, &w) != 0) return NULL; --- 373,377 ---- if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyNumber_Coerce(&v, &w) != 0) return NULL; *************** *** 393,397 **** if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyNumber_Coerce(&v, &w) != 0) return NULL; --- 393,397 ---- if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyNumber_Coerce(&v, &w) != 0) return NULL; *************** *** 418,422 **** else if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyNumber_Coerce(&v, &w) != 0) return NULL; --- 418,422 ---- else if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyNumber_Coerce(&v, &w) != 0) return NULL; *************** *** 438,442 **** if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyNumber_Coerce(&v, &w) != 0) return NULL; --- 438,442 ---- if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyNumber_Coerce(&v, &w) != 0) return NULL; *************** *** 470,474 **** if (tp->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyInstance_Check(v)) { /* Instances of user-defined classes get their --- 470,474 ---- if (tp->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyInstance_Check(v)) { /* Instances of user-defined classes get their *************** *** 516,520 **** if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyNumber_Coerce(&v, &w) != 0) return NULL; --- 516,520 ---- if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyNumber_Coerce(&v, &w) != 0) return NULL; *************** *** 540,544 **** if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyNumber_Coerce(&v, &w) != 0) return NULL; --- 540,544 ---- if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyNumber_Coerce(&v, &w) != 0) return NULL; *************** *** 560,564 **** if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyNumber_Coerce(&v, &w) != 0) return NULL; --- 560,564 ---- if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyNumber_Coerce(&v, &w) != 0) return NULL; *************** *** 580,584 **** { PyObject *res; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *, PyObject *)); BINOP(v, w, "__pow__", "__rpow__", do_pow); if (v->ob_type->tp_as_number == NULL || --- 580,584 ---- { PyObject *res; ! PyObject * (*f)(PyObject *, PyObject *, PyObject *); BINOP(v, w, "__pow__", "__rpow__", do_pow); if (v->ob_type->tp_as_number == NULL || *************** *** 605,609 **** PyObject *res; PyObject *v1, *z1, *w2, *z2; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *, PyObject *)); if (z == Py_None) --- 605,609 ---- PyObject *res; PyObject *v1, *z1, *w2, *z2; ! PyObject * (*f)(PyObject *, PyObject *, PyObject *); if (z == Py_None) Index: classobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/classobject.c,v retrieving revision 2.98 retrieving revision 2.99 diff -C2 -r2.98 -r2.99 *** classobject.c 2000/07/08 12:04:57 2.98 --- classobject.c 2000/07/09 03:09:56 2.99 *************** *** 15,22 **** /* Forward */ ! static PyObject *class_lookup ! Py_PROTO((PyClassObject *, PyObject *, PyClassObject **)); ! static PyObject *instance_getattr1 Py_PROTO((PyInstanceObject *, PyObject *)); ! static PyObject *instance_getattr2 Py_PROTO((PyInstanceObject *, PyObject *)); static PyObject *getattrstr, *setattrstr, *delattrstr; --- 15,22 ---- /* Forward */ ! static PyObject *class_lookup(PyClassObject *, PyObject *, ! PyClassObject **); ! static PyObject *instance_getattr1(PyInstanceObject *, PyObject *); ! static PyObject *instance_getattr2(PyInstanceObject *, PyObject *); static PyObject *getattrstr, *setattrstr, *delattrstr; *************** *** 1204,1209 **** /* Forward */ ! static int halfbinop Py_PROTO((PyObject *, PyObject *, char *, PyObject **, ! PyObject * (*) Py_PROTO((PyObject *, PyObject *)), int )); --- 1204,1209 ---- /* Forward */ ! static int halfbinop(PyObject *, PyObject *, char *, PyObject **, ! PyObject * (*)(PyObject *, PyObject *), int); *************** *** 1216,1220 **** char *opname; char *ropname; ! PyObject * (*thisfunc) Py_PROTO((PyObject *, PyObject *)); { char buf[256]; --- 1216,1220 ---- char *opname; char *ropname; ! PyObject * (*thisfunc)(PyObject *, PyObject *); { char buf[256]; *************** *** 1250,1254 **** char *opname; PyObject **r_result; ! PyObject * (*thisfunc) Py_PROTO((PyObject *, PyObject *)); int swapped; { --- 1250,1254 ---- char *opname; PyObject **r_result; ! PyObject * (*thisfunc)(PyObject *, PyObject *); int swapped; { Index: cobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/cobject.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** cobject.c 2000/06/30 23:58:05 2.10 --- cobject.c 2000/07/09 03:09:56 2.11 *************** *** 16,21 **** /* Declarations for objects of type PyCObject */ ! typedef void (*destructor1) Py_PROTO((void *)); ! typedef void (*destructor2) Py_PROTO((void *, void*)); typedef struct { --- 16,21 ---- /* Declarations for objects of type PyCObject */ ! typedef void (*destructor1)(void *); ! typedef void (*destructor2)(void *, void*); typedef struct { *************** *** 23,27 **** void *cobject; void *desc; ! void (*destructor) Py_PROTO((void *)); } PyCObject; --- 23,27 ---- void *cobject; void *desc; ! void (*destructor)(void *); } PyCObject; *************** *** 29,33 **** PyCObject_FromVoidPtr(cobj, destr) void *cobj; ! void (*destr) Py_PROTO((void *)); { PyCObject *self; --- 29,33 ---- PyCObject_FromVoidPtr(cobj, destr) void *cobj; ! void (*destr)(void *); { PyCObject *self; *************** *** 46,50 **** void *cobj; void *desc; ! void (*destr) Py_PROTO((void *, void *)); { PyCObject *self; --- 46,50 ---- void *cobj; void *desc; ! void (*destr)(void *, void *); { PyCObject *self; Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.78 retrieving revision 2.79 diff -C2 -r2.78 -r2.79 *** fileobject.c 2000/07/05 15:32:40 2.78 --- fileobject.c 2000/07/09 03:09:56 2.79 *************** *** 70,74 **** PyObject *f_name; PyObject *f_mode; ! int (*f_close) Py_PROTO((FILE *)); int f_softspace; /* Flag used by 'print' command */ int f_binary; /* Flag which indicates whether the file is open --- 70,74 ---- PyObject *f_name; PyObject *f_mode; ! int (*f_close)(FILE *); int f_softspace; /* Flag used by 'print' command */ int f_binary; /* Flag which indicates whether the file is open *************** *** 101,105 **** char *name; char *mode; ! int (*close) Py_FPROTO((FILE *)); { PyFileObject *f = PyObject_NEW(PyFileObject, &PyFile_Type); --- 101,105 ---- char *name; char *mode; ! int (*close)(FILE *); { PyFileObject *f = PyObject_NEW(PyFileObject, &PyFile_Type); *************** *** 127,131 **** char *name, *mode; { ! extern int fclose Py_PROTO((FILE *)); PyFileObject *f; f = (PyFileObject *) PyFile_FromFile((FILE *)NULL, name, mode, fclose); --- 127,131 ---- char *name, *mode; { ! extern int fclose(FILE *); PyFileObject *f; f = (PyFileObject *) PyFile_FromFile((FILE *)NULL, name, mode, fclose); Index: floatobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v retrieving revision 2.61 retrieving revision 2.62 diff -C2 -r2.61 -r2.62 *** floatobject.c 2000/06/30 23:58:05 2.61 --- floatobject.c 2000/07/09 03:09:56 2.62 *************** *** 65,70 **** #if !defined(__STDC__) && !defined(macintosh) ! extern double fmod Py_PROTO((double, double)); ! extern double pow Py_PROTO((double, double)); #endif --- 65,70 ---- #if !defined(__STDC__) && !defined(macintosh) ! extern double fmod(double, double); ! extern double pow(double, double); #endif *************** *** 138,142 **** char **pend; { ! extern double strtod Py_PROTO((const char *, char **)); const char *s, *last, *end; double x; --- 138,142 ---- char **pend; { ! extern double strtod(const char *, char **); const char *s, *last, *end; double x; Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.83 retrieving revision 2.84 diff -C2 -r2.83 -r2.84 *** object.c 2000/07/08 17:43:32 2.83 --- object.c 2000/07/09 03:09:56 2.84 *************** *** 1002,1006 **** /* Hack to force loading of abstract.o */ ! int (*_Py_abstract_hack) Py_FPROTO((PyObject *)) = &PyObject_Length; --- 1002,1006 ---- /* Hack to force loading of abstract.o */ ! int (*_Py_abstract_hack)(PyObject *) = &PyObject_Length; From python-dev@python.org Sun Jul 9 04:09:58 2000 From: python-dev@python.org (Tim Peters) Date: Sat, 8 Jul 2000 20:09:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules arraymodule.c,2.46,2.47 cgensupport.h,2.13,2.14 cmathmodule.c,2.13,2.14 glmodule.c,2.5,2.6 mpzmodule.c,2.27,2.28 nismodule.c,2.16,2.17 readline.c,2.19,2.20 rgbimgmodule.c,2.18,2.19 signalmodule.c,2.44,2.45 socketmodule.c,1.113,1.114 stropmodule.c,2.65,2.66 structmodule.c,2.33,2.34 svmodule.c,2.13,2.14 timemodule.c,2.89,2.90 Message-ID: <200007090309.UAA10460@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8264/python/dist/src/Modules Modified Files: arraymodule.c cgensupport.h cmathmodule.c glmodule.c mpzmodule.c nismodule.c readline.c rgbimgmodule.c signalmodule.c socketmodule.c stropmodule.c structmodule.c svmodule.c timemodule.c Log Message: Nuke all remaining occurrences of Py_PROTO and Py_FPROTO. Index: arraymodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** arraymodule.c 2000/07/01 01:09:43 2.46 --- arraymodule.c 2000/07/09 03:09:55 2.47 *************** *** 32,37 **** int typecode; int itemsize; ! PyObject * (*getitem) Py_FPROTO((struct arrayobject *, int)); ! int (*setitem) Py_FPROTO((struct arrayobject *, int, PyObject *)); }; --- 32,37 ---- int typecode; int itemsize; ! PyObject * (*getitem)(struct arrayobject *, int); ! int (*setitem)(struct arrayobject *, int, PyObject *); }; *************** *** 47,59 **** /* Forward */ ! static PyObject *newarrayobject Py_PROTO((int, struct arraydescr *)); #if 0 ! static int getarraysize Py_PROTO((PyObject *)); #endif ! static PyObject *getarrayitem Py_PROTO((PyObject *, int)); ! static int setarrayitem Py_PROTO((PyObject *, int, PyObject *)); #if 0 ! static int insarrayitem Py_PROTO((PyObject *, int, PyObject *)); ! static int addarrayitem Py_PROTO((PyObject *, PyObject *)); #endif --- 47,59 ---- /* Forward */ ! static PyObject *newarrayobject(int, struct arraydescr *); #if 0 ! static int getarraysize(PyObject *); #endif ! static PyObject *getarrayitem(PyObject *, int); ! static int setarrayitem(PyObject *, int, PyObject *); #if 0 ! static int insarrayitem(PyObject *, int, PyObject *); ! static int addarrayitem(PyObject *, PyObject *); #endif Index: cgensupport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cgensupport.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** cgensupport.h 2000/06/30 23:58:05 2.13 --- cgensupport.h 2000/07/09 03:09:55 2.14 *************** *** 39,70 **** #define getistringarg PyArg_GetString ! extern int PyArg_GetObject Py_PROTO((PyObject *args, int nargs, ! int i, PyObject **p_a)); ! extern int PyArg_GetLong Py_PROTO((PyObject *args, int nargs, ! int i, long *p_a)); ! extern int PyArg_GetShort Py_PROTO((PyObject *args, int nargs, ! int i, short *p_a)); ! extern int PyArg_GetFloat Py_PROTO((PyObject *args, int nargs, ! int i, float *p_a)); ! extern int PyArg_GetString Py_PROTO((PyObject *args, int nargs, ! int i, string *p_a)); ! extern int PyArg_GetChar Py_PROTO((PyObject *args, int nargs, ! int i, char *p_a)); ! extern int PyArg_GetLongArray Py_PROTO((PyObject *args, int nargs, ! int i, int n, long *p_a)); ! extern int PyArg_GetShortArray Py_PROTO((PyObject *args, int nargs, ! int i, int n, short *p_a)); ! extern int PyArg_GetDoubleArray Py_PROTO((PyObject *args, int nargs, ! int i, int n, double *p_a)); ! extern int PyArg_GetFloatArray Py_PROTO((PyObject *args, int nargs, ! int i, int n, float *p_a)); ! extern int PyArg_GetLongArraySize Py_PROTO((PyObject *args, int nargs, ! int i, long *p_a)); ! extern int PyArg_GetShortArraySize Py_PROTO((PyObject *args, int nargs, ! int i, short *p_a)); ! extern int PyArg_GetDoubleArraySize Py_PROTO((PyObject *args, int nargs, ! int i, double *p_a)); ! extern int PyArg_GetFloatArraySize Py_PROTO((PyObject *args, int nargs, ! int i, float *p_a)); #ifdef __cplusplus --- 39,70 ---- #define getistringarg PyArg_GetString ! extern int PyArg_GetObject(PyObject *args, int nargs, ! int i, PyObject **p_a); ! extern int PyArg_GetLong(PyObject *args, int nargs, ! int i, long *p_a); ! extern int PyArg_GetShort(PyObject *args, int nargs, ! int i, short *p_a); ! extern int PyArg_GetFloat(PyObject *args, int nargs, ! int i, float *p_a); ! extern int PyArg_GetString(PyObject *args, int nargs, ! int i, string *p_a); ! extern int PyArg_GetChar(PyObject *args, int nargs, ! int i, char *p_a); ! extern int PyArg_GetLongArray(PyObject *args, int nargs, ! int i, int n, long *p_a); ! extern int PyArg_GetShortArray(PyObject *args, int nargs, ! int i, int n, short *p_a); ! extern int PyArg_GetDoubleArray(PyObject *args, int nargs, ! int i, int n, double *p_a); ! extern int PyArg_GetFloatArray(PyObject *args, int nargs, ! int i, int n, float *p_a); ! extern int PyArg_GetLongArraySize(PyObject *args, int nargs, ! int i, long *p_a); ! extern int PyArg_GetShortArraySize(PyObject *args, int nargs, ! int i, short *p_a); ! extern int PyArg_GetDoubleArraySize(PyObject *args, int nargs, ! int i, double *p_a); ! extern int PyArg_GetFloatArraySize(PyObject *args, int nargs, ! int i, float *p_a); #ifdef __cplusplus Index: cmathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cmathmodule.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** cmathmodule.c 2000/06/30 02:29:22 2.13 --- cmathmodule.c 2000/07/09 03:09:55 2.14 *************** *** 348,352 **** math_1(args, func) PyObject *args; ! Py_complex (*func) Py_FPROTO((Py_complex)); { Py_complex x; --- 348,352 ---- math_1(args, func) PyObject *args; ! Py_complex (*func)(Py_complex); { Py_complex x; Index: glmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/glmodule.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** glmodule.c 2000/06/30 23:58:05 2.5 --- glmodule.c 2000/07/09 03:09:55 2.6 *************** *** 108,112 **** int i, n, width; double vec[3]; ! PyObject * (*getitem) Py_FPROTO((PyObject *, int)); if (!PyArg_GetObject(args, 1, 0, &v)) --- 108,112 ---- int i, n, width; double vec[3]; ! PyObject * (*getitem)(PyObject *, int); if (!PyArg_GetObject(args, 1, 0, &v)) *************** *** 209,213 **** int i, n; float norm[3], vec[3]; ! PyObject * (*getitem) Py_FPROTO((PyObject *, int)); if (!PyArg_GetObject(args, 1, 0, &v)) --- 209,213 ---- int i, n; float norm[3], vec[3]; ! PyObject * (*getitem)(PyObject *, int); if (!PyArg_GetObject(args, 1, 0, &v)) Index: mpzmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mpzmodule.c,v retrieving revision 2.27 retrieving revision 2.28 diff -C2 -r2.27 -r2.28 *** mpzmodule.c 2000/06/30 23:58:05 2.27 --- mpzmodule.c 2000/07/09 03:09:55 2.28 *************** *** 1013,1018 **** /* Forward */ ! static void mpz_divm Py_PROTO((MP_INT *res, const MP_INT *num, ! const MP_INT *den, const MP_INT *mod)); static PyObject * --- 1013,1018 ---- /* Forward */ ! static void mpz_divm(MP_INT *res, const MP_INT *num, ! const MP_INT *den, const MP_INT *mod); static PyObject * Index: nismodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/nismodule.c,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** nismodule.c 2000/05/03 23:44:32 2.16 --- nismodule.c 2000/07/09 03:09:55 2.17 *************** *** 72,76 **** } ! typedef int (*foreachfunc) Py_PROTO((int, char *, int, char *, int, char *)); struct ypcallback_data { --- 72,76 ---- } ! typedef int (*foreachfunc)(int, char *, int, char *, int, char *); struct ypcallback_data { Index: readline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** readline.c 2000/07/06 18:55:12 2.19 --- readline.c 2000/07/09 03:09:55 2.20 *************** *** 40,44 **** /* Pointers needed from outside (but not declared in a header file). */ extern int (*PyOS_InputHook)(); ! extern char *(*PyOS_ReadlineFunctionPointer) Py_PROTO((char *)); --- 40,44 ---- /* Pointers needed from outside (but not declared in a header file). */ extern int (*PyOS_InputHook)(); ! extern char *(*PyOS_ReadlineFunctionPointer)(char *); Index: rgbimgmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/rgbimgmodule.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** rgbimgmodule.c 1998/12/04 18:50:03 2.18 --- rgbimgmodule.c 2000/07/09 03:09:55 2.19 *************** *** 96,105 **** #define CHANOFFSET(z) (3-(z)) /* this is byte order dependent */ ! static void expandrow Py_PROTO((unsigned char *, unsigned char *, int)); ! static void setalpha Py_PROTO((unsigned char *, int)); ! static void copybw Py_PROTO((Py_Int32 *, int)); ! static void interleaverow Py_PROTO((unsigned char*, unsigned char*, int, int)); ! static int compressrow Py_PROTO((unsigned char *, unsigned char *, int, int)); ! static void lumrow Py_PROTO((unsigned char *, unsigned char *, int)); #ifdef ADD_TAGS --- 96,105 ---- #define CHANOFFSET(z) (3-(z)) /* this is byte order dependent */ ! static void expandrow(unsigned char *, unsigned char *, int); ! static void setalpha(unsigned char *, int); ! static void copybw(Py_Int32 *, int); ! static void interleaverow(unsigned char*, unsigned char*, int, int); ! static int compressrow(unsigned char *, unsigned char *, int, int); ! static void lumrow(unsigned char *, unsigned char *, int); #ifdef ADD_TAGS Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.44 retrieving revision 2.45 diff -C2 -r2.44 -r2.45 *** signalmodule.c 2000/07/04 14:17:33 2.44 --- signalmodule.c 2000/07/09 03:09:55 2.45 *************** *** 124,128 **** Handlers[sig_num].tripped = 1; Py_AddPendingCall( ! (int (*) Py_PROTO((ANY *)))PyErr_CheckSignals, NULL); #ifdef WITH_THREAD } --- 124,128 ---- Handlers[sig_num].tripped = 1; Py_AddPendingCall( ! (int (*)(ANY *))PyErr_CheckSignals, NULL); #ifdef WITH_THREAD } *************** *** 639,643 **** is_tripped++; Handlers[SIGINT].tripped = 1; ! Py_AddPendingCall((int (*) Py_PROTO((ANY *)))PyErr_CheckSignals, NULL); } --- 639,643 ---- is_tripped++; Handlers[SIGINT].tripped = 1; ! Py_AddPendingCall((int (*)(ANY *))PyErr_CheckSignals, NULL); } Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -r1.113 -r1.114 *** socketmodule.c 2000/07/07 14:13:29 1.113 --- socketmodule.c 2000/07/09 03:09:55 1.114 *************** *** 1113,1117 **** BUILD_FUNC_DEF_2(PySocketSock_makefile,PySocketSockObject *,s, PyObject *,args) { ! extern int fclose Py_PROTO((FILE *)); char *mode = "r"; int bufsize = -1; --- 1113,1117 ---- BUILD_FUNC_DEF_2(PySocketSock_makefile,PySocketSockObject *,s, PyObject *,args) { ! extern int fclose(FILE *); char *mode = "r"; int bufsize = -1; Index: stropmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/stropmodule.c,v retrieving revision 2.65 retrieving revision 2.66 diff -C2 -r2.65 -r2.66 *** stropmodule.c 2000/06/30 23:58:05 2.65 --- stropmodule.c 2000/07/09 03:09:55 2.66 *************** *** 879,883 **** PyObject *args; { ! extern double strtod Py_PROTO((const char *, char **)); char *s, *end; double x; --- 879,883 ---- PyObject *args; { ! extern double strtod(const char *, char **); char *s, *end; double x; Index: structmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/structmodule.c,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -r2.33 -r2.34 *** structmodule.c 2000/06/30 23:58:05 2.33 --- structmodule.c 2000/07/09 03:09:56 2.34 *************** *** 407,415 **** int size; int alignment; ! PyObject* (*unpack) Py_PROTO((const char *, ! const struct _formatdef *)); ! int (*pack) Py_PROTO((char *, ! PyObject *, ! const struct _formatdef *)); } formatdef; --- 407,414 ---- int size; int alignment; ! PyObject* (*unpack)(const char *, ! const struct _formatdef *); ! int (*pack)(char *, PyObject *, ! const struct _formatdef *); } formatdef; Index: svmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/svmodule.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** svmodule.c 2000/06/30 23:58:05 2.13 --- svmodule.c 2000/07/09 03:09:56 2.14 *************** *** 38,42 **** static PyObject *SvError; /* exception sv.error */ ! static PyObject *newcaptureobject Py_PROTO((svobject *, void *, int)); /* Set a SV-specific error from svideo_errno and return NULL */ --- 38,42 ---- static PyObject *SvError; /* exception sv.error */ ! static PyObject *newcaptureobject(svobject *, void *, int); /* Set a SV-specific error from svideo_errno and return NULL */ Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.89 retrieving revision 2.90 diff -C2 -r2.89 -r2.90 *** timemodule.c 2000/07/03 21:37:27 2.89 --- timemodule.c 2000/07/09 03:09:56 2.90 *************** *** 91,96 **** /* Forward declarations */ ! static int floatsleep Py_PROTO((double)); ! static double floattime Py_PROTO(()); /* For Y2K check */ --- 91,96 ---- /* Forward declarations */ ! static int floatsleep(double); ! static double floattime(); /* For Y2K check */ *************** *** 256,260 **** time_convert(when, function) time_t when; ! struct tm * (*function) Py_PROTO((const time_t *)); { struct tm *p; --- 256,260 ---- time_convert(when, function) time_t when; ! struct tm * (*function)(const time_t *); { struct tm *p; *************** *** 787,792 **** struct timeb t1, t2; double frac; ! extern double fmod Py_PROTO((double, double)); ! extern double floor Py_PROTO((double)); if (secs <= 0.0) return; --- 787,792 ---- struct timeb t1, t2; double frac; ! extern double fmod(double, double); ! extern double floor(double); if (secs <= 0.0) return; From python-dev@python.org Sun Jul 9 04:09:59 2000 From: python-dev@python.org (Tim Peters) Date: Sat, 8 Jul 2000 20:09:59 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser acceler.c,2.14,2.15 firstsets.c,2.9,2.10 grammar.c,2.15,2.16 intrcheck.c,2.32,2.33 listnode.c,2.11,2.12 myreadline.c,2.21,2.22 node.c,2.10,2.11 parser.c,2.13,2.14 parser.h,2.11,2.12 parsetok.c,2.20,2.21 pgen.c,2.14,2.15 pgen.h,2.11,2.12 pgenmain.c,2.19,2.20 printgrammar.c,2.10,2.11 tokenizer.c,2.44,2.45 tokenizer.h,2.14,2.15 Message-ID: <200007090309.UAA10488@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv8264/python/dist/src/Parser Modified Files: acceler.c firstsets.c grammar.c intrcheck.c listnode.c myreadline.c node.c parser.c parser.h parsetok.c pgen.c pgen.h pgenmain.c printgrammar.c tokenizer.c tokenizer.h Log Message: Nuke all remaining occurrences of Py_PROTO and Py_FPROTO. Index: acceler.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/acceler.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** acceler.c 2000/06/30 23:58:05 2.14 --- acceler.c 2000/07/09 03:09:56 2.15 *************** *** 27,32 **** /* Forward references */ ! static void fixdfa Py_PROTO((grammar *, dfa *)); ! static void fixstate Py_PROTO((grammar *, state *)); void --- 27,32 ---- /* Forward references */ ! static void fixdfa(grammar *, dfa *); ! static void fixstate(grammar *, state *); void Index: firstsets.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/firstsets.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** firstsets.c 2000/06/30 23:58:05 2.9 --- firstsets.c 2000/07/09 03:09:56 2.10 *************** *** 18,22 **** /* Forward */ ! static void calcfirstset Py_PROTO((grammar *, dfa *)); void --- 18,22 ---- /* Forward */ ! static void calcfirstset(grammar *, dfa *); void Index: grammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/grammar.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** grammar.c 2000/06/30 23:58:05 2.15 --- grammar.c 2000/07/09 03:09:56 2.16 *************** *** 143,147 **** /* Forward */ ! static void translabel Py_PROTO((grammar *, label *)); void --- 143,147 ---- /* Forward */ ! static void translabel(grammar *, label *); void Index: intrcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/intrcheck.c,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -r2.32 -r2.33 *** intrcheck.c 2000/06/30 23:58:05 2.32 --- intrcheck.c 2000/07/09 03:09:56 2.33 *************** *** 23,27 **** /* Copied here from ceval.h -- can't include that file. */ ! int Py_AddPendingCall Py_PROTO((int (*func) Py_PROTO((ANY *)), ANY *arg)); --- 23,27 ---- /* Copied here from ceval.h -- can't include that file. */ ! int Py_AddPendingCall(int (*func)(ANY *), ANY *arg); *************** *** 153,157 **** #endif /* _M_IX86 */ { ! extern void Py_Exit Py_PROTO((int)); static char message[] = "python: to interrupt a truly hanging Python program, interrupt once more.\n"; --- 153,157 ---- #endif /* _M_IX86 */ { ! extern void Py_Exit(int); static char message[] = "python: to interrupt a truly hanging Python program, interrupt once more.\n"; Index: listnode.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/listnode.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** listnode.c 2000/06/30 23:58:05 2.11 --- listnode.c 2000/07/09 03:09:56 2.12 *************** *** 16,21 **** /* Forward */ ! static void list1node Py_PROTO((FILE *, node *)); ! static void listnode Py_PROTO((FILE *, node *)); void --- 16,21 ---- /* Forward */ ! static void list1node(FILE *, node *); ! static void listnode(FILE *, node *); void Index: myreadline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/myreadline.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** myreadline.c 2000/07/03 21:39:47 2.21 --- myreadline.c 2000/07/09 03:09:56 2.22 *************** *** 119,123 **** Note: Python expects in return a buffer allocated with PyMem_Malloc. */ ! char *(*PyOS_ReadlineFunctionPointer) Py_PROTO((char *)); --- 119,123 ---- Note: Python expects in return a buffer allocated with PyMem_Malloc. */ ! char *(*PyOS_ReadlineFunctionPointer)(char *); Index: node.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/node.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** node.c 2000/06/30 23:58:05 2.10 --- node.c 2000/07/09 03:09:56 2.11 *************** *** 65,69 **** /* Forward */ ! static void freechildren Py_PROTO((node *)); --- 65,69 ---- /* Forward */ ! static void freechildren(node *); Index: parser.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parser.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** parser.c 2000/06/30 23:58:05 2.13 --- parser.c 2000/07/09 03:09:56 2.14 *************** *** 34,38 **** /* STACK DATA TYPE */ ! static void s_reset Py_PROTO((stack *)); static void --- 34,38 ---- /* STACK DATA TYPE */ ! static void s_reset(stack *); static void *************** *** 45,49 **** #define s_empty(s) ((s)->s_top == &(s)->s_base[MAXSTACK]) ! static int s_push Py_PROTO((stack *, dfa *, node *)); static int --- 45,49 ---- #define s_empty(s) ((s)->s_top == &(s)->s_base[MAXSTACK]) ! static int s_push(stack *, dfa *, node *); static int *************** *** 67,71 **** #ifdef Py_DEBUG ! static void s_pop Py_PROTO((stack *)); static void --- 67,71 ---- #ifdef Py_DEBUG ! static void s_pop(stack *); static void *************** *** 123,127 **** /* PARSER STACK OPERATIONS */ ! static int shift Py_PROTO((stack *, int, char *, int, int)); static int --- 123,127 ---- /* PARSER STACK OPERATIONS */ ! static int shift(stack *, int, char *, int, int); static int *************** *** 142,146 **** } ! static int push Py_PROTO((stack *, int, dfa *, int, int)); static int --- 142,146 ---- } ! static int push(stack *, int, dfa *, int, int); static int *************** *** 166,170 **** /* PARSER PROPER */ ! static int classify Py_PROTO((grammar *, int, char *)); static int --- 166,170 ---- /* PARSER PROPER */ ! static int classify(grammar *, int, char *); static int Index: parser.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parser.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** parser.h 2000/06/30 23:58:05 2.11 --- parser.h 2000/07/09 03:09:56 2.12 *************** *** 37,45 **** } parser_state; ! parser_state *PyParser_New Py_PROTO((grammar *g, int start)); ! void PyParser_Delete Py_PROTO((parser_state *ps)); ! int PyParser_AddToken ! Py_PROTO((parser_state *ps, int type, char *str, int lineno)); ! void PyGrammar_AddAccelerators Py_PROTO((grammar *g)); #ifdef __cplusplus --- 37,44 ---- } parser_state; ! parser_state *PyParser_New(grammar *g, int start); ! void PyParser_Delete(parser_state *ps); ! int PyParser_AddToken(parser_state *ps, int type, char *str, int lineno); ! void PyGrammar_AddAccelerators(grammar *g); #ifdef __cplusplus Index: parsetok.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parsetok.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** parsetok.c 2000/06/30 23:58:05 2.20 --- parsetok.c 2000/07/09 03:09:56 2.21 *************** *** 23,28 **** /* Forward */ ! static node *parsetok Py_PROTO((struct tok_state *, grammar *, int, ! perrdetail *)); /* Parse input coming from a string. Return error code, print some errors. */ --- 23,27 ---- /* Forward */ ! static node *parsetok(struct tok_state *, grammar *, int, perrdetail *); /* Parse input coming from a string. Return error code, print some errors. */ Index: pgen.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgen.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** pgen.c 2000/06/30 23:58:05 2.14 --- pgen.c 2000/07/09 03:09:56 2.15 *************** *** 46,57 **** /* Forward */ ! static void compile_rhs Py_PROTO((labellist *ll, ! nfa *nf, node *n, int *pa, int *pb)); ! static void compile_alt Py_PROTO((labellist *ll, ! nfa *nf, node *n, int *pa, int *pb)); ! static void compile_item Py_PROTO((labellist *ll, ! nfa *nf, node *n, int *pa, int *pb)); ! static void compile_atom Py_PROTO((labellist *ll, ! nfa *nf, node *n, int *pa, int *pb)); static int --- 46,57 ---- /* Forward */ ! static void compile_rhs(labellist *ll, ! nfa *nf, node *n, int *pa, int *pb); ! static void compile_alt(labellist *ll, ! nfa *nf, node *n, int *pa, int *pb); ! static void compile_item(labellist *ll, ! nfa *nf, node *n, int *pa, int *pb); ! static void compile_atom(labellist *ll, ! nfa *nf, node *n, int *pa, int *pb); static int *************** *** 112,116 **** /* Forward */ ! static void compile_rule Py_PROTO((nfagrammar *gr, node *n)); static nfagrammar * --- 112,116 ---- /* Forward */ ! static void compile_rule(nfagrammar *gr, node *n); static nfagrammar * *************** *** 421,428 **** /* Forward */ ! static void printssdfa Py_PROTO((int xx_nstates, ss_state *xx_state, int nbits, ! labellist *ll, char *msg)); ! static void simplify Py_PROTO((int xx_nstates, ss_state *xx_state)); ! static void convert Py_PROTO((dfa *d, int xx_nstates, ss_state *xx_state)); static void --- 421,428 ---- /* Forward */ ! static void printssdfa(int xx_nstates, ss_state *xx_state, int nbits, ! labellist *ll, char *msg); ! static void simplify(int xx_nstates, ss_state *xx_state); ! static void convert(dfa *d, int xx_nstates, ss_state *xx_state); static void Index: pgen.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgen.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** pgen.h 2000/06/30 23:58:05 2.11 --- pgen.h 2000/07/09 03:09:56 2.12 *************** *** 17,24 **** /* Parser generator interface */ ! extern grammar *meta_grammar Py_PROTO((void)); struct _node; ! extern grammar *pgen Py_PROTO((struct _node *)); #ifdef __cplusplus --- 17,24 ---- /* Parser generator interface */ ! extern grammar *meta_grammar(void); struct _node; ! extern grammar *pgen(struct _node *); #ifdef __cplusplus Index: pgenmain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgenmain.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** pgenmain.c 2000/06/30 23:58:05 2.19 --- pgenmain.c 2000/07/09 03:09:56 2.20 *************** *** 33,40 **** /* Forward */ ! grammar *getgrammar Py_PROTO((char *filename)); #ifdef THINK_C ! int main Py_PROTO((int, char **)); ! char *askfile Py_PROTO((void)); #endif --- 33,40 ---- /* Forward */ ! grammar *getgrammar(char *filename); #ifdef THINK_C ! int main(int, char **); ! char *askfile(void); #endif Index: printgrammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/printgrammar.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** printgrammar.c 2000/06/30 23:58:05 2.10 --- printgrammar.c 2000/07/09 03:09:56 2.11 *************** *** 15,22 **** /* Forward */ ! static void printarcs Py_PROTO((int, dfa *, FILE *)); ! static void printstates Py_PROTO((grammar *, FILE *)); ! static void printdfas Py_PROTO((grammar *, FILE *)); ! static void printlabels Py_PROTO((grammar *, FILE *)); void --- 15,22 ---- /* Forward */ ! static void printarcs(int, dfa *, FILE *); ! static void printstates(grammar *, FILE *); ! static void printdfas(grammar *, FILE *); ! static void printlabels(grammar *, FILE *); void Index: tokenizer.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/tokenizer.c,v retrieving revision 2.44 retrieving revision 2.45 diff -C2 -r2.44 -r2.45 *** tokenizer.c 2000/06/30 23:58:05 2.44 --- tokenizer.c 2000/07/09 03:09:56 2.45 *************** *** 18,22 **** #include "errcode.h" ! extern char *PyOS_Readline Py_PROTO((char *)); /* Return malloc'ed string including trailing \n; empty malloc'ed string for EOF; --- 18,22 ---- #include "errcode.h" ! extern char *PyOS_Readline(char *); /* Return malloc'ed string including trailing \n; empty malloc'ed string for EOF; *************** *** 35,41 **** /* Forward */ ! static struct tok_state *tok_new Py_PROTO((void)); ! static int tok_nextc Py_PROTO((struct tok_state *tok)); ! static void tok_backup Py_PROTO((struct tok_state *tok, int c)); /* Token names */ --- 35,41 ---- /* Forward */ ! static struct tok_state *tok_new(void); ! static int tok_nextc(struct tok_state *tok); ! static void tok_backup(struct tok_state *tok, int c); /* Token names */ Index: tokenizer.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/tokenizer.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** tokenizer.h 2000/06/30 23:58:05 2.14 --- tokenizer.h 2000/07/09 03:09:56 2.15 *************** *** 50,58 **** }; ! extern struct tok_state *PyTokenizer_FromString Py_PROTO((char *)); ! extern struct tok_state *PyTokenizer_FromFile ! Py_PROTO((FILE *, char *, char *)); ! extern void PyTokenizer_Free Py_PROTO((struct tok_state *)); ! extern int PyTokenizer_Get Py_PROTO((struct tok_state *, char **, char **)); #ifdef __cplusplus --- 50,57 ---- }; ! extern struct tok_state *PyTokenizer_FromString(char *); ! extern struct tok_state *PyTokenizer_FromFile(FILE *, char *, char *); ! extern void PyTokenizer_Free(struct tok_state *); ! extern int PyTokenizer_Get(struct tok_state *, char **, char **); #ifdef __cplusplus From python-dev@python.org Sun Jul 9 04:09:59 2000 From: python-dev@python.org (Tim Peters) Date: Sat, 8 Jul 2000 20:09:59 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.168,2.169 ceval.c,2.182,2.183 compile.c,2.113,2.114 errors.c,2.47,2.48 getargs.c,2.38,2.39 import.c,2.139,2.140 importdl.h,2.14,2.15 marshal.c,1.51,1.52 modsupport.c,2.47,2.48 pythonrun.c,2.100,2.101 sysmodule.c,2.68,2.69 Message-ID: <200007090309.UAA10498@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv8264/python/dist/src/Python Modified Files: bltinmodule.c ceval.c compile.c errors.c getargs.c import.c importdl.h marshal.c modsupport.c pythonrun.c sysmodule.c Log Message: Nuke all remaining occurrences of Py_PROTO and Py_FPROTO. Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.168 retrieving revision 2.169 diff -C2 -r2.168 -r2.169 *** bltinmodule.c 2000/07/09 02:11:18 2.168 --- bltinmodule.c 2000/07/09 03:09:56 2.169 *************** *** 29,34 **** /* Forward */ ! static PyObject *filterstring Py_PROTO((PyObject *, PyObject *)); ! static PyObject *filtertuple Py_PROTO((PyObject *, PyObject *)); static PyObject * --- 29,34 ---- /* Forward */ ! static PyObject *filterstring(PyObject *, PyObject *); ! static PyObject *filtertuple (PyObject *, PyObject *); static PyObject * *************** *** 429,433 **** PyObject *v; { ! extern double strtod Py_PROTO((const char *, char **)); const char *s, *start; char *end; --- 429,433 ---- PyObject *v; { ! extern double strtod(const char *, char **); const char *s, *start; char *end; *************** *** 1226,1230 **** ! static PyObject *builtin_raw_input Py_PROTO((PyObject *, PyObject *)); static PyObject * --- 1226,1230 ---- ! static PyObject *builtin_raw_input(PyObject *, PyObject *); static PyObject * Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.182 retrieving revision 2.183 diff -C2 -r2.182 -r2.183 *** ceval.c 2000/06/30 23:58:05 2.182 --- ceval.c 2000/07/09 03:09:56 2.183 *************** *** 44,75 **** /* Forward declarations */ ! static PyObject *eval_code2 Py_PROTO((PyCodeObject *, ! PyObject *, PyObject *, ! PyObject **, int, ! PyObject **, int, ! PyObject **, int, ! PyObject *)); #ifdef LLTRACE ! static int prtrace Py_PROTO((PyObject *, char *)); #endif ! static void call_exc_trace Py_PROTO((PyObject **, PyObject**, ! PyFrameObject *)); ! static int call_trace Py_PROTO((PyObject **, PyObject **, ! PyFrameObject *, char *, PyObject *)); ! static PyObject *call_builtin Py_PROTO((PyObject *, PyObject *, PyObject *)); ! static PyObject *call_function Py_PROTO((PyObject *, PyObject *, PyObject *)); ! static PyObject *loop_subscript Py_PROTO((PyObject *, PyObject *)); ! static PyObject *apply_slice Py_PROTO((PyObject *, PyObject *, PyObject *)); ! static int assign_slice Py_PROTO((PyObject *, PyObject *, ! PyObject *, PyObject *)); ! static PyObject *cmp_outcome Py_PROTO((int, PyObject *, PyObject *)); ! static int import_from Py_PROTO((PyObject *, PyObject *, PyObject *)); ! static PyObject *build_class Py_PROTO((PyObject *, PyObject *, PyObject *)); ! static int exec_statement Py_PROTO((PyFrameObject *, ! PyObject *, PyObject *, PyObject *)); ! static PyObject *find_from_args Py_PROTO((PyFrameObject *, int)); ! static void set_exc_info Py_PROTO((PyThreadState *, ! PyObject *, PyObject *, PyObject *)); ! static void reset_exc_info Py_PROTO((PyThreadState *)); --- 44,73 ---- /* Forward declarations */ ! static PyObject *eval_code2(PyCodeObject *, ! PyObject *, PyObject *, ! PyObject **, int, ! PyObject **, int, ! PyObject **, int, ! PyObject *); #ifdef LLTRACE ! static int prtrace(PyObject *, char *); #endif ! static void call_exc_trace(PyObject **, PyObject**, PyFrameObject *); ! static int call_trace(PyObject **, PyObject **, ! PyFrameObject *, char *, PyObject *); ! static PyObject *call_builtin(PyObject *, PyObject *, PyObject *); ! static PyObject *call_function(PyObject *, PyObject *, PyObject *); ! static PyObject *loop_subscript(PyObject *, PyObject *); ! static PyObject *apply_slice(PyObject *, PyObject *, PyObject *); ! static int assign_slice(PyObject *, PyObject *, ! PyObject *, PyObject *); ! static PyObject *cmp_outcome(int, PyObject *, PyObject *); ! static int import_from(PyObject *, PyObject *, PyObject *); ! static PyObject *build_class(PyObject *, PyObject *, PyObject *); ! static int exec_statement(PyFrameObject *, ! PyObject *, PyObject *, PyObject *); ! static PyObject *find_from_args(PyFrameObject *, int); ! static void set_exc_info(PyThreadState *, PyObject *, PyObject *, PyObject *); ! static void reset_exc_info(PyThreadState *); *************** *** 212,216 **** #define NPENDINGCALLS 32 static struct { ! int (*func) Py_PROTO((ANY *)); ANY *arg; } pendingcalls[NPENDINGCALLS]; --- 210,214 ---- #define NPENDINGCALLS 32 static struct { ! int (*func)(ANY *); ANY *arg; } pendingcalls[NPENDINGCALLS]; *************** *** 221,225 **** int Py_AddPendingCall(func, arg) ! int (*func) Py_PROTO((ANY *)); ANY *arg; { --- 219,223 ---- int Py_AddPendingCall(func, arg) ! int (*func)(ANY *); ANY *arg; { *************** *** 259,263 **** for (;;) { int i; ! int (*func) Py_PROTO((ANY *)); ANY *arg; i = pendingfirst; --- 257,261 ---- for (;;) { int i; ! int (*func)(ANY *); ANY *arg; i = pendingfirst; *************** *** 288,293 **** }; ! static enum why_code do_raise Py_PROTO((PyObject *, PyObject *, PyObject *)); ! static int unpack_sequence Py_PROTO((PyObject *, int, PyObject **)); --- 286,291 ---- }; ! static enum why_code do_raise(PyObject *, PyObject *, PyObject *); ! static int unpack_sequence(PyObject *, int, PyObject **); Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.113 retrieving revision 2.114 diff -C2 -r2.113 -r2.114 *** compile.c 2000/07/03 21:39:47 2.113 --- compile.c 2000/07/09 03:09:56 2.114 *************** *** 376,403 **** /* Prototype forward declarations */ ! static int com_init Py_PROTO((struct compiling *, char *)); ! static void com_free Py_PROTO((struct compiling *)); ! static void com_push Py_PROTO((struct compiling *, int)); ! static void com_pop Py_PROTO((struct compiling *, int)); ! static void com_done Py_PROTO((struct compiling *)); ! static void com_node Py_PROTO((struct compiling *, struct _node *)); ! static void com_factor Py_PROTO((struct compiling *, struct _node *)); ! static void com_addbyte Py_PROTO((struct compiling *, int)); ! static void com_addint Py_PROTO((struct compiling *, int)); ! static void com_addoparg Py_PROTO((struct compiling *, int, int)); ! static void com_addfwref Py_PROTO((struct compiling *, int, int *)); ! static void com_backpatch Py_PROTO((struct compiling *, int)); ! static int com_add Py_PROTO((struct compiling *, PyObject *, PyObject *, PyObject *)); ! static int com_addconst Py_PROTO((struct compiling *, PyObject *)); ! static int com_addname Py_PROTO((struct compiling *, PyObject *)); ! static void com_addopname Py_PROTO((struct compiling *, int, node *)); ! static void com_list Py_PROTO((struct compiling *, node *, int)); ! static int com_argdefs Py_PROTO((struct compiling *, node *)); ! static int com_newlocal Py_PROTO((struct compiling *, char *)); ! static PyCodeObject *icompile Py_PROTO((struct _node *, struct compiling *)); ! static PyCodeObject *jcompile Py_PROTO((struct _node *, char *, ! struct compiling *)); ! static PyObject *parsestrplus Py_PROTO((node *)); ! static PyObject *parsestr Py_PROTO((char *)); static int --- 376,403 ---- /* Prototype forward declarations */ ! static int com_init(struct compiling *, char *); ! static void com_free(struct compiling *); ! static void com_push(struct compiling *, int); ! static void com_pop(struct compiling *, int); ! static void com_done(struct compiling *); ! static void com_node(struct compiling *, struct _node *); ! static void com_factor(struct compiling *, struct _node *); ! static void com_addbyte(struct compiling *, int); ! static void com_addint(struct compiling *, int); ! static void com_addoparg(struct compiling *, int, int); ! static void com_addfwref(struct compiling *, int, int *); ! static void com_backpatch(struct compiling *, int); ! static int com_add(struct compiling *, PyObject *, PyObject *, PyObject *); ! static int com_addconst(struct compiling *, PyObject *); ! static int com_addname(struct compiling *, PyObject *); ! static void com_addopname(struct compiling *, int, node *); ! static void com_list(struct compiling *, node *, int); ! static int com_argdefs(struct compiling *, node *); ! static int com_newlocal(struct compiling *, char *); ! static PyCodeObject *icompile(struct _node *, struct compiling *); ! static PyCodeObject *jcompile(struct _node *, char *, ! struct compiling *); ! static PyObject *parsestrplus(node *); ! static PyObject *parsestr(char *); static int *************** *** 814,818 **** char *s; { ! extern double atof Py_PROTO((const char *)); char *end; long x; --- 814,818 ---- char *s; { ! extern double atof(const char *); char *end; long x; *************** *** 1824,1829 **** /* Begin of assignment compilation */ ! static void com_assign_name Py_PROTO((struct compiling *, node *, int)); ! static void com_assign Py_PROTO((struct compiling *, node *, int)); static void --- 1824,1829 ---- /* Begin of assignment compilation */ ! static void com_assign_name(struct compiling *, node *, int); ! static void com_assign(struct compiling *, node *, int); static void *************** *** 2014,2018 **** } ! /* Forward */ static node *get_rawdocstring Py_PROTO((node *)); static void --- 2014,2018 ---- } ! /* Forward */ static node *get_rawdocstring(node *); static void *************** *** 3042,3046 **** } ! static void com_fplist Py_PROTO((struct compiling *, node *)); static void --- 3042,3046 ---- } ! static void com_fplist(struct compiling *, node *); static void Index: errors.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/errors.c,v retrieving revision 2.47 retrieving revision 2.48 diff -C2 -r2.47 -r2.48 *** errors.c 2000/06/30 23:58:06 2.47 --- errors.c 2000/07/09 03:09:56 2.48 *************** *** 18,22 **** #ifdef macintosh ! extern char *PyMac_StrError Py_PROTO((int)); #undef strerror #define strerror PyMac_StrError --- 18,22 ---- #ifdef macintosh ! extern char *PyMac_StrError(int); #undef strerror #define strerror PyMac_StrError *************** *** 25,29 **** #ifndef __STDC__ #ifndef MS_WINDOWS ! extern char *strerror Py_PROTO((int)); #endif #endif --- 25,29 ---- #ifndef __STDC__ #ifndef MS_WINDOWS ! extern char *strerror(int); #endif #endif Index: getargs.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v retrieving revision 2.38 retrieving revision 2.39 diff -C2 -r2.38 -r2.39 *** getargs.c 2000/07/06 12:22:00 2.38 --- getargs.c 2000/07/09 03:09:56 2.39 *************** *** 24,47 **** ! int PyArg_Parse Py_PROTO((PyObject *, char *, ...)); ! int PyArg_ParseTuple Py_PROTO((PyObject *, char *, ...)); ! int PyArg_VaParse Py_PROTO((PyObject *, char *, va_list)); ! int PyArg_ParseTupleAndKeywords Py_PROTO((PyObject *, PyObject *, ! char *, char **, ...)); /* Forward */ ! static int vgetargs1 Py_PROTO((PyObject *, char *, va_list *, int)); ! static void seterror Py_PROTO((int, char *, int *, char *, char *)); ! static char *convertitem Py_PROTO((PyObject *, char **, va_list *, ! int *, char *)); ! static char *converttuple Py_PROTO((PyObject *, char **, va_list *, ! int *, char *, int)); ! static char *convertsimple Py_PROTO((PyObject *, char **, va_list *, char *)); ! static char *convertsimple1 Py_PROTO((PyObject *, char **, va_list *)); ! ! static int vgetargskeywords Py_PROTO((PyObject *, PyObject *, ! char *, char **, va_list *)); ! static char *skipitem Py_PROTO((char **, va_list *)); #ifdef HAVE_STDARG_PROTOTYPES --- 24,46 ---- ! int PyArg_Parse(PyObject *, char *, ...); ! int PyArg_ParseTuple(PyObject *, char *, ...); ! int PyArg_VaParse(PyObject *, char *, va_list); ! int PyArg_ParseTupleAndKeywords(PyObject *, PyObject *, ! char *, char **, ...); /* Forward */ ! static int vgetargs1(PyObject *, char *, va_list *, int); ! static void seterror(int, char *, int *, char *, char *); ! static char *convertitem(PyObject *, char **, va_list *, int *, char *); ! static char *converttuple(PyObject *, char **, va_list *, ! int *, char *, int); ! static char *convertsimple(PyObject *, char **, va_list *, char *); ! static char *convertsimple1(PyObject *, char **, va_list *); ! ! static int vgetargskeywords(PyObject *, PyObject *, ! char *, char **, va_list *); ! static char *skipitem(char **, va_list *); #ifdef HAVE_STDARG_PROTOTYPES *************** *** 887,892 **** } else if (*format == '&') { ! typedef int (*converter) ! Py_PROTO((PyObject *, void *)); converter convert = va_arg(*p_va, converter); void *addr = va_arg(*p_va, void *); --- 886,890 ---- } else if (*format == '&') { ! typedef int (*converter)(PyObject *, void *); converter convert = va_arg(*p_va, converter); void *addr = va_arg(*p_va, void *); *************** *** 1324,1329 **** #endif else if (*format == '&') { ! typedef int (*converter) ! Py_PROTO((PyObject *, void *)); (void) va_arg(*p_va, converter); (void) va_arg(*p_va, void *); --- 1322,1326 ---- #endif else if (*format == '&') { ! typedef int (*converter)(PyObject *, void *); (void) va_arg(*p_va, converter); (void) va_arg(*p_va, void *); Index: import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.139 retrieving revision 2.140 diff -C2 -r2.139 -r2.140 *** import.c 2000/07/01 01:06:56 2.139 --- import.c 2000/07/09 03:09:56 2.140 *************** *** 764,771 **** /* Forward */ ! static PyObject *load_module Py_PROTO((char *, FILE *, char *, int)); ! static struct filedescr *find_module Py_PROTO((char *, PyObject *, ! char *, size_t, FILE **)); ! static struct _frozen *find_frozen Py_PROTO((char *name)); /* Load a package and return its module object WITH INCREMENTED --- 764,771 ---- /* Forward */ ! static PyObject *load_module(char *, FILE *, char *, int); ! static struct filedescr *find_module(char *, PyObject *, ! char *, size_t, FILE **); ! static struct _frozen *find_frozen(char *name); /* Load a package and return its module object WITH INCREMENTED *************** *** 856,860 **** #endif ! static int find_init_module Py_PROTO((char *)); /* Forward */ static struct filedescr * --- 856,860 ---- #endif ! static int find_init_module(char *); /* Forward */ static struct filedescr * *************** *** 1207,1211 **** ! static int init_builtin Py_PROTO((char *)); /* Forward */ /* Load an external module using the default search path and return --- 1207,1211 ---- ! static int init_builtin(char *); /* Forward */ /* Load an external module using the default search path and return *************** *** 1456,1468 **** /* Forward declarations for helper routines */ ! static PyObject *get_parent Py_PROTO((PyObject *globals, ! char *buf, int *p_buflen)); ! static PyObject *load_next Py_PROTO((PyObject *mod, PyObject *altmod, ! char **p_name, char *buf, int *p_buflen)); ! static int mark_miss Py_PROTO((char *name)); ! static int ensure_fromlist Py_PROTO((PyObject *mod, PyObject *fromlist, ! char *buf, int buflen, int recursive)); ! static PyObject * import_submodule Py_PROTO((PyObject *mod, ! char *name, char *fullname)); /* The Magnum Opus of dotted-name import :-) */ --- 1456,1466 ---- /* Forward declarations for helper routines */ ! static PyObject *get_parent(PyObject *globals, char *buf, int *p_buflen); ! static PyObject *load_next(PyObject *mod, PyObject *altmod, ! char **p_name, char *buf, int *p_buflen); ! static int mark_miss(char *name); ! static int ensure_fromlist(PyObject *mod, PyObject *fromlist, ! char *buf, int buflen, int recursive); ! static PyObject * import_submodule(PyObject *mod, char *name, char *fullname); /* The Magnum Opus of dotted-name import :-) */ *************** *** 2007,2011 **** PyObject *path; /* list or None or NULL */ { ! extern int fclose Py_PROTO((FILE *)); PyObject *fob, *ret; struct filedescr *fdp; --- 2005,2009 ---- PyObject *path; /* list or None or NULL */ { ! extern int fclose(FILE *); PyObject *fob, *ret; struct filedescr *fdp; Index: importdl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/importdl.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** importdl.h 2000/06/30 23:58:06 2.14 --- importdl.h 2000/07/09 03:09:56 2.15 *************** *** 37,42 **** extern const struct filedescr _PyImport_DynLoadFiletab[]; ! extern PyObject *_PyImport_LoadDynamicModule ! Py_PROTO((char *name, char *pathname, FILE *)); /* Max length of module suffix searched for -- accommodates "module.slb" */ --- 37,42 ---- extern const struct filedescr _PyImport_DynLoadFiletab[]; ! extern PyObject *_PyImport_LoadDynamicModule(char *name, char *pathname, ! FILE *); /* Max length of module suffix searched for -- accommodates "module.slb" */ Index: marshal.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/marshal.c,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -r1.51 -r1.52 *** marshal.c 2000/06/30 23:58:06 1.51 --- marshal.c 2000/07/09 03:09:56 1.52 *************** *** 172,177 **** } else if (PyFloat_Check(v)) { ! extern void PyFloat_AsString ! Py_PROTO((char *, PyFloatObject *)); char buf[256]; /* Plenty to format any double */ PyFloat_AsString(buf, (PyFloatObject *)v); --- 172,176 ---- } else if (PyFloat_Check(v)) { ! extern void PyFloat_AsString(char *, PyFloatObject *); char buf[256]; /* Plenty to format any double */ PyFloat_AsString(buf, (PyFloatObject *)v); *************** *** 183,188 **** #ifndef WITHOUT_COMPLEX else if (PyComplex_Check(v)) { ! extern void PyFloat_AsString ! Py_PROTO((char *, PyFloatObject *)); char buf[256]; /* Plenty to format any double */ PyFloatObject *temp; --- 182,186 ---- #ifndef WITHOUT_COMPLEX else if (PyComplex_Check(v)) { ! extern void PyFloat_AsString(char *, PyFloatObject *); char buf[256]; /* Plenty to format any double */ PyFloatObject *temp; *************** *** 439,443 **** case TYPE_FLOAT: { ! extern double atof Py_PROTO((const char *)); char buf[256]; double dx; --- 437,441 ---- case TYPE_FLOAT: { ! extern double atof(const char *); char buf[256]; double dx; *************** *** 458,462 **** case TYPE_COMPLEX: { ! extern double atof Py_PROTO((const char *)); char buf[256]; Py_complex c; --- 456,460 ---- case TYPE_COMPLEX: { ! extern double atof(const char *); char buf[256]; Py_complex c; Index: modsupport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/modsupport.c,v retrieving revision 2.47 retrieving revision 2.48 diff -C2 -r2.47 -r2.48 *** modsupport.c 2000/07/06 12:22:00 2.47 --- modsupport.c 2000/07/09 03:09:56 2.48 *************** *** 85,89 **** /* Helper for mkvalue() to scan the length of a format */ ! static int countformat Py_PROTO((char *format, int endchar)); static int countformat(format, endchar) char *format; --- 85,89 ---- /* Helper for mkvalue() to scan the length of a format */ ! static int countformat(char *format, int endchar); static int countformat(format, endchar) char *format; *************** *** 131,138 **** /* After an original idea and first implementation by Steven Miale */ ! static PyObject *do_mktuple Py_PROTO((char**, va_list *, int, int)); ! static PyObject *do_mklist Py_PROTO((char**, va_list *, int, int)); ! static PyObject *do_mkdict Py_PROTO((char**, va_list *, int, int)); ! static PyObject *do_mkvalue Py_PROTO((char**, va_list *)); --- 131,138 ---- /* After an original idea and first implementation by Steven Miale */ ! static PyObject *do_mktuple(char**, va_list *, int, int); ! static PyObject *do_mklist(char**, va_list *, int, int); ! static PyObject *do_mkdict(char**, va_list *, int, int); ! static PyObject *do_mkvalue(char**, va_list *); *************** *** 359,363 **** case 'O': if (**p_format == '&') { ! typedef PyObject *(*converter) Py_PROTO((void *)); converter func = va_arg(*p_va, converter); void *arg = va_arg(*p_va, void *); --- 359,363 ---- case 'O': if (**p_format == '&') { ! typedef PyObject *(*converter)(void *); converter func = va_arg(*p_va, converter); void *arg = va_arg(*p_va, void *); Index: pythonrun.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v retrieving revision 2.100 retrieving revision 2.101 diff -C2 -r2.100 -r2.101 *** pythonrun.c 2000/06/30 23:58:06 2.100 --- pythonrun.c 2000/07/09 03:09:56 2.101 *************** *** 39,54 **** /* Forward */ ! static void initmain Py_PROTO((void)); ! static void initsite Py_PROTO((void)); ! static PyObject *run_err_node Py_PROTO((node *n, char *filename, ! PyObject *globals, PyObject *locals)); ! static PyObject *run_node Py_PROTO((node *n, char *filename, ! PyObject *globals, PyObject *locals)); ! static PyObject *run_pyc_file Py_PROTO((FILE *fp, char *filename, ! PyObject *globals, PyObject *locals)); ! static void err_input Py_PROTO((perrdetail *)); ! static void initsigs Py_PROTO((void)); ! static void call_sys_exitfunc Py_PROTO((void)); ! static void call_ll_exitfuncs Py_PROTO((void)); #ifdef Py_TRACE_REFS --- 39,54 ---- /* Forward */ ! static void initmain(void); ! static void initsite(void); ! static PyObject *run_err_node(node *n, char *filename, ! PyObject *globals, PyObject *locals); ! static PyObject *run_node(node *n, char *filename, ! PyObject *globals, PyObject *locals); ! static PyObject *run_pyc_file(FILE *fp, char *filename, ! PyObject *globals, PyObject *locals); ! static void err_input(perrdetail *); ! static void initsigs(void); ! static void call_sys_exitfunc(void); ! static void call_ll_exitfuncs(void); #ifdef Py_TRACE_REFS *************** *** 164,168 **** #ifdef COUNT_ALLOCS ! extern void dump_counts Py_PROTO((void)); #endif --- 164,168 ---- #ifdef COUNT_ALLOCS ! extern void dump_counts(void); #endif *************** *** 1060,1064 **** int Py_AtExit(func) ! void (*func) Py_PROTO((void)); { if (nexitfuncs >= NEXITFUNCS) --- 1060,1064 ---- int Py_AtExit(func) ! void (*func)(void); { if (nexitfuncs >= NEXITFUNCS) Index: sysmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v retrieving revision 2.68 retrieving revision 2.69 diff -C2 -r2.68 -r2.69 *** sysmodule.c 2000/06/30 23:58:06 2.68 --- sysmodule.c 2000/07/09 03:09:56 2.69 *************** *** 271,275 **** PyObject *self, *args; { ! extern PyObject *get_counts Py_PROTO((void)); if (!PyArg_ParseTuple(args, ":getcounts")) --- 271,275 ---- PyObject *self, *args; { ! extern PyObject *get_counts(void); if (!PyArg_ParseTuple(args, ":getcounts")) *************** *** 281,290 **** #ifdef Py_TRACE_REFS /* Defined in objects.c because it uses static globals if that file */ ! extern PyObject *_Py_GetObjects Py_PROTO((PyObject *, PyObject *)); #endif #ifdef DYNAMIC_EXECUTION_PROFILE /* Defined in ceval.c because it uses static globals if that file */ ! extern PyObject *_Py_GetDXProfile Py_PROTO((PyObject *, PyObject *)); #endif --- 281,290 ---- #ifdef Py_TRACE_REFS /* Defined in objects.c because it uses static globals if that file */ ! extern PyObject *_Py_GetObjects(PyObject *, PyObject *); #endif #ifdef DYNAMIC_EXECUTION_PROFILE /* Defined in ceval.c because it uses static globals if that file */ ! extern PyObject *_Py_GetDXProfile(PyObject *, PyObject *); #endif *************** *** 410,414 **** _PySys_Init() { ! extern int fclose Py_PROTO((FILE *)); PyObject *m, *v, *sysdict; PyObject *sysin, *sysout, *syserr; --- 410,414 ---- _PySys_Init() { ! extern int fclose(FILE *); PyObject *m, *v, *sysdict; PyObject *sysin, *sysout, *syserr; From python-dev@python.org Sun Jul 9 04:35:13 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 20:35:13 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/ext ext.tex,1.78,1.79 Message-ID: <200007090335.UAA11510@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ext In directory slayer.i.sourceforge.net:/tmp/cvs-serv11500 Modified Files: ext.tex Log Message: Remove the only Py_PROTO in the docs. Index: ext.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ext/ext.tex,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -r1.78 -r1.79 *** ext.tex 2000/06/30 17:58:34 1.78 --- ext.tex 2000/07/09 03:35:10 1.79 *************** *** 1604,1608 **** #define PySpam_System_NUM 0 #define PySpam_System_RETURN int ! #define PySpam_System_PROTO Py_PROTO((char *command)) /* Total number of C API pointers */ --- 1604,1608 ---- #define PySpam_System_NUM 0 #define PySpam_System_RETURN int ! #define PySpam_System_PROTO(char *command) /* Total number of C API pointers */ From python-dev@python.org Sun Jul 9 05:06:14 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 21:06:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.38,2.39 bufferobject.c,2.10,2.11 classobject.c,2.99,2.100 Message-ID: <200007090406.VAA19317@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv19308 Modified Files: abstract.c bufferobject.c classobject.c Log Message: ANSI-fication of the sources. Index: abstract.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v retrieving revision 2.38 retrieving revision 2.39 diff -C2 -r2.38 -r2.39 *** abstract.c 2000/07/09 03:09:56 2.38 --- abstract.c 2000/07/09 04:06:11 2.39 *************** *** 17,22 **** static PyObject * ! type_error(msg) ! char *msg; { PyErr_SetString(PyExc_TypeError, msg); --- 17,21 ---- static PyObject * ! type_error(char *msg) { PyErr_SetString(PyExc_TypeError, msg); *************** *** 25,29 **** static PyObject * ! null_error() { if (!PyErr_Occurred()) --- 24,28 ---- static PyObject * ! null_error(void) { if (!PyErr_Occurred()) *************** *** 36,43 **** int ! PyObject_Cmp(o1, o2, result) ! PyObject *o1; ! PyObject *o2; ! int *result; { int r; --- 35,39 ---- int ! PyObject_Cmp(PyObject *o1, PyObject *o2, int *result) { int r; *************** *** 55,60 **** PyObject * ! PyObject_Type(o) ! PyObject *o; { PyObject *v; --- 51,55 ---- PyObject * ! PyObject_Type(PyObject *o) { PyObject *v; *************** *** 68,73 **** int ! PyObject_Length(o) ! PyObject *o; { PySequenceMethods *m; --- 63,67 ---- int ! PyObject_Length(PyObject *o) { PySequenceMethods *m; *************** *** 86,92 **** PyObject * ! PyObject_GetItem(o, key) ! PyObject *o; ! PyObject *key; { PyMappingMethods *m; --- 80,84 ---- PyObject * ! PyObject_GetItem(PyObject *o, PyObject *key) { PyMappingMethods *m; *************** *** 115,122 **** int ! PyObject_SetItem(o, key, value) ! PyObject *o; ! PyObject *key; ! PyObject *value; { PyMappingMethods *m; --- 107,111 ---- int ! PyObject_SetItem(PyObject *o, PyObject *key, PyObject *value) { PyMappingMethods *m; *************** *** 148,154 **** int ! PyObject_DelItem(o, key) ! PyObject *o; ! PyObject *key; { PyMappingMethods *m; --- 137,141 ---- int ! PyObject_DelItem(PyObject *o, PyObject *key) { PyMappingMethods *m; *************** *** 290,295 **** int ! PyNumber_Check(o) ! PyObject *o; { return o && o->ob_type->tp_as_number; --- 277,281 ---- int ! PyNumber_Check(PyObject *o) { return o && o->ob_type->tp_as_number; *************** *** 303,308 **** PyObject * ! PyNumber_Or(v, w) ! PyObject *v, *w; { extern int PyNumber_Coerce(); --- 289,293 ---- PyObject * ! PyNumber_Or(PyObject *v, PyObject *w) { extern int PyNumber_Coerce(); *************** *** 325,330 **** PyObject * ! PyNumber_Xor(v, w) ! PyObject *v, *w; { extern int PyNumber_Coerce(); --- 310,314 ---- PyObject * ! PyNumber_Xor(PyObject *v, PyObject *w) { extern int PyNumber_Coerce(); *************** *** 347,352 **** PyObject * ! PyNumber_And(v, w) ! PyObject *v, *w; { BINOP(v, w, "__and__", "__rand__", PyNumber_And); --- 331,335 ---- PyObject * ! PyNumber_And(PyObject *v, PyObject *w) { BINOP(v, w, "__and__", "__rand__", PyNumber_And); *************** *** 367,372 **** PyObject * ! PyNumber_Lshift(v, w) ! PyObject *v, *w; { BINOP(v, w, "__lshift__", "__rlshift__", PyNumber_Lshift); --- 350,354 ---- PyObject * ! PyNumber_Lshift(PyObject *v, PyObject *w) { BINOP(v, w, "__lshift__", "__rlshift__", PyNumber_Lshift); *************** *** 387,392 **** PyObject * ! PyNumber_Rshift(v, w) ! PyObject *v, *w; { BINOP(v, w, "__rshift__", "__rrshift__", PyNumber_Rshift); --- 369,373 ---- PyObject * ! PyNumber_Rshift(PyObject *v, PyObject *w) { BINOP(v, w, "__rshift__", "__rrshift__", PyNumber_Rshift); *************** *** 407,412 **** PyObject * ! PyNumber_Add(v, w) ! PyObject *v, *w; { PySequenceMethods *m; --- 388,392 ---- PyObject * ! PyNumber_Add(PyObject *v, PyObject *w) { PySequenceMethods *m; *************** *** 432,437 **** PyObject * ! PyNumber_Subtract(v, w) ! PyObject *v, *w; { BINOP(v, w, "__sub__", "__rsub__", PyNumber_Subtract); --- 412,416 ---- PyObject * ! PyNumber_Subtract(PyObject *v, PyObject *w) { BINOP(v, w, "__sub__", "__rsub__", PyNumber_Subtract); *************** *** 452,457 **** PyObject * ! PyNumber_Multiply(v, w) ! PyObject *v, *w; { PyTypeObject *tp = v->ob_type; --- 431,435 ---- PyObject * ! PyNumber_Multiply(PyObject *v, PyObject *w) { PyTypeObject *tp = v->ob_type; *************** *** 510,515 **** PyObject * ! PyNumber_Divide(v, w) ! PyObject *v, *w; { BINOP(v, w, "__div__", "__rdiv__", PyNumber_Divide); --- 488,492 ---- PyObject * ! PyNumber_Divide(PyObject *v, PyObject *w) { BINOP(v, w, "__div__", "__rdiv__", PyNumber_Divide); *************** *** 530,535 **** PyObject * ! PyNumber_Remainder(v, w) ! PyObject *v, *w; { if (PyString_Check(v)) --- 507,511 ---- PyObject * ! PyNumber_Remainder(PyObject *v, PyObject *w) { if (PyString_Check(v)) *************** *** 554,559 **** PyObject * ! PyNumber_Divmod(v, w) ! PyObject *v, *w; { BINOP(v, w, "__divmod__", "__rdivmod__", PyNumber_Divmod); --- 530,534 ---- PyObject * ! PyNumber_Divmod(PyObject *v, PyObject *w) { BINOP(v, w, "__divmod__", "__rdivmod__", PyNumber_Divmod); *************** *** 576,581 **** static PyObject * ! do_pow(v, w) ! PyObject *v, *w; { PyObject *res; --- 551,555 ---- static PyObject * ! do_pow(PyObject *v, PyObject *w) { PyObject *res; *************** *** 600,605 **** PyObject * ! PyNumber_Power(v, w, z) ! PyObject *v, *w, *z; { PyObject *res; --- 574,578 ---- PyObject * ! PyNumber_Power(PyObject *v, PyObject *w, PyObject *z) { PyObject *res; *************** *** 647,652 **** PyObject * ! PyNumber_Negative(o) ! PyObject *o; { PyNumberMethods *m; --- 620,624 ---- PyObject * ! PyNumber_Negative(PyObject *o) { PyNumberMethods *m; *************** *** 662,667 **** PyObject * ! PyNumber_Positive(o) ! PyObject *o; { PyNumberMethods *m; --- 634,638 ---- PyObject * ! PyNumber_Positive(PyObject *o) { PyNumberMethods *m; *************** *** 677,682 **** PyObject * ! PyNumber_Invert(o) ! PyObject *o; { PyNumberMethods *m; --- 648,652 ---- PyObject * ! PyNumber_Invert(PyObject *o) { PyNumberMethods *m; *************** *** 692,697 **** PyObject * ! PyNumber_Absolute(o) ! PyObject *o; { PyNumberMethods *m; --- 662,666 ---- PyObject * ! PyNumber_Absolute(PyObject *o) { PyNumberMethods *m; *************** *** 708,714 **** /* Add a check for embedded NULL-bytes in the argument. */ static PyObject * ! int_from_string(s, len) ! const char *s; ! int len; { char *end; --- 677,681 ---- /* Add a check for embedded NULL-bytes in the argument. */ static PyObject * ! int_from_string(const char *s, int len) { char *end; *************** *** 728,733 **** PyObject * ! PyNumber_Int(o) ! PyObject *o; { PyNumberMethods *m; --- 695,699 ---- PyObject * ! PyNumber_Int(PyObject *o) { PyNumberMethods *m; *************** *** 759,765 **** /* Add a check for embedded NULL-bytes in the argument. */ static PyObject * ! long_from_string(s, len) ! const char *s; ! int len; { char *end; --- 725,729 ---- /* Add a check for embedded NULL-bytes in the argument. */ static PyObject * ! long_from_string(const char *s, int len) { char *end; *************** *** 779,784 **** PyObject * ! PyNumber_Long(o) ! PyObject *o; { PyNumberMethods *m; --- 743,747 ---- PyObject * ! PyNumber_Long(PyObject *o) { PyNumberMethods *m; *************** *** 814,819 **** PyObject * ! PyNumber_Float(o) ! PyObject *o; { PyNumberMethods *m; --- 777,781 ---- PyObject * ! PyNumber_Float(PyObject *o) { PyNumberMethods *m; *************** *** 836,841 **** int ! PySequence_Check(s) ! PyObject *s; { return s != NULL && s->ob_type->tp_as_sequence; --- 798,802 ---- int ! PySequence_Check(PyObject *s) { return s != NULL && s->ob_type->tp_as_sequence; *************** *** 843,848 **** int ! PySequence_Length(s) ! PyObject *s; { PySequenceMethods *m; --- 804,808 ---- int ! PySequence_Length(PyObject *s) { PySequenceMethods *m; *************** *** 862,868 **** PyObject * ! PySequence_Concat(s, o) ! PyObject *s; ! PyObject *o; { PySequenceMethods *m; --- 822,826 ---- PyObject * ! PySequence_Concat(PyObject *s, PyObject *o) { PySequenceMethods *m; *************** *** 879,885 **** PyObject * ! PySequence_Repeat(o, count) ! PyObject *o; ! int count; { PySequenceMethods *m; --- 837,841 ---- PyObject * ! PySequence_Repeat(PyObject *o, int count) { PySequenceMethods *m; *************** *** 896,902 **** PyObject * ! PySequence_GetItem(s, i) ! PyObject *s; ! int i; { PySequenceMethods *m; --- 852,856 ---- PyObject * ! PySequence_GetItem(PyObject *s, int i) { PySequenceMethods *m; *************** *** 922,929 **** PyObject * ! PySequence_GetSlice(s, i1, i2) ! PyObject *s; ! int i1; ! int i2; { PySequenceMethods *m; --- 876,880 ---- PyObject * ! PySequence_GetSlice(PyObject *s, int i1, int i2) { PySequenceMethods *m; *************** *** 951,958 **** int ! PySequence_SetItem(s, i, o) ! PyObject *s; ! int i; ! PyObject *o; { PySequenceMethods *m; --- 902,906 ---- int ! PySequence_SetItem(PyObject *s, int i, PyObject *o) { PySequenceMethods *m; *************** *** 981,987 **** int ! PySequence_DelItem(s, i) ! PyObject *s; ! int i; { PySequenceMethods *m; --- 929,933 ---- int ! PySequence_DelItem(PyObject *s, int i) { PySequenceMethods *m; *************** *** 1010,1018 **** int ! PySequence_SetSlice(s, i1, i2, o) ! PyObject *s; ! int i1; ! int i2; ! PyObject *o; { PySequenceMethods *m; --- 956,960 ---- int ! PySequence_SetSlice(PyObject *s, int i1, int i2, PyObject *o) { PySequenceMethods *m; *************** *** 1043,1050 **** int ! PySequence_DelSlice(s, i1, i2) ! PyObject *s; ! int i1; ! int i2; { PySequenceMethods *m; --- 985,989 ---- int ! PySequence_DelSlice(PyObject *s, int i1, int i2) { PySequenceMethods *m; *************** *** 1075,1080 **** PyObject * ! PySequence_Tuple(v) ! PyObject *v; { PySequenceMethods *m; --- 1014,1018 ---- PyObject * ! PySequence_Tuple(PyObject *v) { PySequenceMethods *m; *************** *** 1136,1141 **** PyObject * ! PySequence_List(v) ! PyObject *v; { PySequenceMethods *m; --- 1074,1078 ---- PyObject * ! PySequence_List(PyObject *v) { PySequenceMethods *m; *************** *** 1188,1194 **** PyObject * ! PySequence_Fast(v, m) ! PyObject *v; ! const char* m; { if (v == NULL) --- 1125,1129 ---- PyObject * ! PySequence_Fast(PyObject *v, const char *m) { if (v == NULL) *************** *** 1208,1214 **** int ! PySequence_Count(s, o) ! PyObject *s; ! PyObject *o; { int l, i, n, cmp, err; --- 1143,1147 ---- int ! PySequence_Count(PyObject *s, PyObject *o) { int l, i, n, cmp, err; *************** *** 1240,1246 **** int ! PySequence_Contains(w, v) /* v in w */ ! PyObject *w; ! PyObject *v; { int i, cmp; --- 1173,1177 ---- int ! PySequence_Contains(PyObject *w, PyObject *v) /* v in w */ { int i, cmp; *************** *** 1286,1292 **** #undef PySequence_In int ! PySequence_In(w, v) ! PyObject *w; ! PyObject *v; { return PySequence_Contains(w, v); --- 1217,1221 ---- #undef PySequence_In int ! PySequence_In(PyObject *w, PyObject *v) { return PySequence_Contains(w, v); *************** *** 1294,1300 **** int ! PySequence_Index(s, o) ! PyObject *s; ! PyObject *o; { int l, i, cmp, err; --- 1223,1227 ---- int ! PySequence_Index(PyObject *s, PyObject *o) { int l, i, cmp, err; *************** *** 1329,1334 **** int ! PyMapping_Check(o) ! PyObject *o; { return o && o->ob_type->tp_as_mapping; --- 1256,1260 ---- int ! PyMapping_Check(PyObject *o) { return o && o->ob_type->tp_as_mapping; *************** *** 1336,1341 **** int ! PyMapping_Length(o) ! PyObject *o; { PyMappingMethods *m; --- 1262,1266 ---- int ! PyMapping_Length(PyObject *o) { PyMappingMethods *m; *************** *** 1355,1361 **** PyObject * ! PyMapping_GetItemString(o, key) ! PyObject *o; ! char *key; { PyObject *okey, *r; --- 1280,1284 ---- PyObject * ! PyMapping_GetItemString(PyObject *o, char *key) { PyObject *okey, *r; *************** *** 1373,1380 **** int ! PyMapping_SetItemString(o, key, value) ! PyObject *o; ! char *key; ! PyObject *value; { PyObject *okey; --- 1296,1300 ---- int ! PyMapping_SetItemString(PyObject *o, char *key, PyObject *value) { PyObject *okey; *************** *** 1395,1401 **** int ! PyMapping_HasKeyString(o, key) ! PyObject *o; ! char *key; { PyObject *v; --- 1315,1319 ---- int ! PyMapping_HasKeyString(PyObject *o, char *key) { PyObject *v; *************** *** 1411,1417 **** int ! PyMapping_HasKey(o, key) ! PyObject *o; ! PyObject *key; { PyObject *v; --- 1329,1333 ---- int ! PyMapping_HasKey(PyObject *o, PyObject *key) { PyObject *v; *************** *** 1431,1436 **** PyObject * ! PyObject_CallObject(o, a) ! PyObject *o, *a; { PyObject *r; --- 1347,1351 ---- PyObject * ! PyObject_CallObject(PyObject *o, PyObject *a) { PyObject *r; Index: bufferobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/bufferobject.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** bufferobject.c 2000/06/30 23:58:05 2.10 --- bufferobject.c 2000/07/09 04:06:11 2.11 *************** *** 27,35 **** static PyObject * ! _PyBuffer_FromMemory(base, ptr, size, readonly) ! PyObject *base; ! void *ptr; ! int size; ! int readonly; { PyBufferObject * b; --- 27,31 ---- static PyObject * ! _PyBuffer_FromMemory(PyObject *base, void *ptr, int size, int readonly) { PyBufferObject * b; *************** *** 58,67 **** static PyObject * ! _PyBuffer_FromObject(base, offset, size, proc, readonly) ! PyObject *base; ! int offset; ! int size; ! getreadbufferproc proc; ! int readonly; { PyBufferProcs *pb = base->ob_type->tp_as_buffer; --- 54,59 ---- static PyObject * ! _PyBuffer_FromObject(PyObject *base, int offset, int size, ! getreadbufferproc proc, int readonly) { PyBufferProcs *pb = base->ob_type->tp_as_buffer; *************** *** 101,108 **** PyObject * ! PyBuffer_FromObject(base, offset, size) ! PyObject *base; ! int offset; ! int size; { PyBufferProcs *pb = base->ob_type->tp_as_buffer; --- 93,97 ---- PyObject * ! PyBuffer_FromObject(PyObject *base, int offset, int size) { PyBufferProcs *pb = base->ob_type->tp_as_buffer; *************** *** 121,128 **** PyObject * ! PyBuffer_FromReadWriteObject(base, offset, size) ! PyObject *base; ! int offset; ! int size; { PyBufferProcs *pb = base->ob_type->tp_as_buffer; --- 110,114 ---- PyObject * ! PyBuffer_FromReadWriteObject(PyObject *base, int offset, int size) { PyBufferProcs *pb = base->ob_type->tp_as_buffer; *************** *** 142,148 **** PyObject * ! PyBuffer_FromMemory(ptr, size) ! void *ptr; ! int size; { return _PyBuffer_FromMemory(NULL, ptr, size, 1); --- 128,132 ---- PyObject * ! PyBuffer_FromMemory(void *ptr, int size) { return _PyBuffer_FromMemory(NULL, ptr, size, 1); *************** *** 150,156 **** PyObject * ! PyBuffer_FromReadWriteMemory(ptr, size) ! void *ptr; ! int size; { return _PyBuffer_FromMemory(NULL, ptr, size, 0); --- 134,138 ---- PyObject * ! PyBuffer_FromReadWriteMemory(void *ptr, int size) { return _PyBuffer_FromMemory(NULL, ptr, size, 0); *************** *** 158,163 **** PyObject * ! PyBuffer_New(size) ! int size; { PyBufferObject * b; --- 140,144 ---- PyObject * ! PyBuffer_New(int size) { PyBufferObject * b; *************** *** 188,193 **** static void ! buffer_dealloc(self) ! PyBufferObject *self; { Py_XDECREF(self->b_base); --- 169,173 ---- static void ! buffer_dealloc(PyBufferObject *self) { Py_XDECREF(self->b_base); *************** *** 196,202 **** static int ! buffer_compare(self, other) ! PyBufferObject *self; ! PyBufferObject *other; { int len_self = self->b_size; --- 176,180 ---- static int ! buffer_compare(PyBufferObject *self, PyBufferObject *other) { int len_self = self->b_size; *************** *** 213,218 **** static PyObject * ! buffer_repr(self) ! PyBufferObject *self; { char buf[300]; --- 191,195 ---- static PyObject * ! buffer_repr(PyBufferObject *self) { char buf[300]; *************** *** 241,246 **** static long ! buffer_hash(self) ! PyBufferObject *self; { register int len; --- 218,222 ---- static long ! buffer_hash(PyBufferObject *self) { register int len; *************** *** 275,280 **** static PyObject * ! buffer_str(self) ! PyBufferObject *self; { return PyString_FromStringAndSize(self->b_ptr, self->b_size); --- 251,255 ---- static PyObject * ! buffer_str(PyBufferObject *self) { return PyString_FromStringAndSize(self->b_ptr, self->b_size); *************** *** 284,289 **** static int ! buffer_length(self) ! PyBufferObject *self; { return self->b_size; --- 259,263 ---- static int ! buffer_length(PyBufferObject *self) { return self->b_size; *************** *** 291,297 **** static PyObject * ! buffer_concat(self, other) ! PyBufferObject *self; ! PyObject *other; { PyBufferProcs *pb = other->ob_type->tp_as_buffer; --- 265,269 ---- static PyObject * ! buffer_concat(PyBufferObject *self, PyObject *other) { PyBufferProcs *pb = other->ob_type->tp_as_buffer; *************** *** 345,351 **** static PyObject * ! buffer_repeat(self, count) ! PyBufferObject *self; ! int count; { PyObject *ob; --- 317,321 ---- static PyObject * ! buffer_repeat(PyBufferObject *self, int count) { PyObject *ob; *************** *** 374,380 **** static PyObject * ! buffer_item(self, idx) ! PyBufferObject *self; ! int idx; { if ( idx < 0 || idx >= self->b_size ) --- 344,348 ---- static PyObject * ! buffer_item(PyBufferObject *self, int idx) { if ( idx < 0 || idx >= self->b_size ) *************** *** 387,394 **** static PyObject * ! buffer_slice(self, left, right) ! PyBufferObject *self; ! int left; ! int right; { if ( left < 0 ) --- 355,359 ---- static PyObject * ! buffer_slice(PyBufferObject *self, int left, int right) { if ( left < 0 ) *************** *** 411,418 **** static int ! buffer_ass_item(self, idx, other) ! PyBufferObject *self; ! int idx; ! PyObject *other; { PyBufferProcs *pb; --- 376,380 ---- static int ! buffer_ass_item(PyBufferObject *self, int idx, PyObject *other) { PyBufferProcs *pb; *************** *** 461,469 **** static int ! buffer_ass_slice(self, left, right, other) ! PyBufferObject *self; ! int left; ! int right; ! PyObject *other; { PyBufferProcs *pb; --- 423,427 ---- static int ! buffer_ass_slice(PyBufferObject *self, int left, int right, PyObject *other) { PyBufferProcs *pb; *************** *** 522,529 **** static int ! buffer_getreadbuf(self, idx, pp) ! PyBufferObject *self; ! int idx; ! void ** pp; { if ( idx != 0 ) { --- 480,484 ---- static int ! buffer_getreadbuf(PyBufferObject *self, int idx, void **pp) { if ( idx != 0 ) { *************** *** 537,544 **** static int ! buffer_getwritebuf(self, idx, pp) ! PyBufferObject *self; ! int idx; ! void ** pp; { if ( self->b_readonly ) --- 492,496 ---- static int ! buffer_getwritebuf(PyBufferObject *self, int idx, void **pp) { if ( self->b_readonly ) *************** *** 551,557 **** static int ! buffer_getsegcount(self, lenp) ! PyBufferObject *self; ! int *lenp; { if ( lenp ) --- 503,507 ---- static int ! buffer_getsegcount(PyBufferObject *self, int *lenp) { if ( lenp ) *************** *** 561,568 **** static int ! buffer_getcharbuf(self, idx, pp) ! PyBufferObject *self; ! int idx; ! const char ** pp; { if ( idx != 0 ) { --- 511,515 ---- static int ! buffer_getcharbuf(PyBufferObject *self, int idx, const char **pp) { if ( idx != 0 ) { *************** *** 617,619 **** 0, /*tp_doc*/ }; - --- 564,565 ---- Index: classobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/classobject.c,v retrieving revision 2.99 retrieving revision 2.100 diff -C2 -r2.99 -r2.100 *** classobject.c 2000/07/09 03:09:56 2.99 --- classobject.c 2000/07/09 04:06:11 2.100 *************** *** 22,30 **** static PyObject *getattrstr, *setattrstr, *delattrstr; PyObject * ! PyClass_New(bases, dict, name) ! PyObject *bases; /* NULL or tuple of classobjects! */ ! PyObject *dict; ! PyObject *name; { PyClassObject *op, *dummy; --- 22,29 ---- static PyObject *getattrstr, *setattrstr, *delattrstr; + PyObject * ! PyClass_New(PyObject *bases, PyObject *dict, PyObject *name) ! /* bases is NULL or tuple of classobjects! */ { PyClassObject *op, *dummy; *************** *** 119,124 **** static void ! class_dealloc(op) ! PyClassObject *op; { PyObject_GC_Fini(op); --- 118,122 ---- static void ! class_dealloc(PyClassObject *op) { PyObject_GC_Fini(op); *************** *** 134,141 **** static PyObject * ! class_lookup(cp, name, pclass) ! PyClassObject *cp; ! PyObject *name; ! PyClassObject **pclass; { int i, n; --- 132,136 ---- static PyObject * ! class_lookup(PyClassObject *cp, PyObject *name, PyClassObject **pclass) { int i, n; *************** *** 158,164 **** static PyObject * ! class_getattr(op, name) ! register PyClassObject *op; ! PyObject *name; { register PyObject *v; --- 153,157 ---- static PyObject * ! class_getattr(register PyClassObject *op, PyObject *name) { register PyObject *v; *************** *** 204,210 **** static void ! set_slot(slot, v) ! PyObject **slot; ! PyObject *v; { PyObject *temp = *slot; --- 197,201 ---- static void ! set_slot(PyObject **slot, PyObject *v) { PyObject *temp = *slot; *************** *** 215,220 **** static void ! set_attr_slots(c) ! PyClassObject *c; { PyClassObject *dummy; --- 206,210 ---- static void ! set_attr_slots(PyClassObject *c) { PyClassObject *dummy; *************** *** 226,232 **** static char * ! set_dict(c, v) ! PyClassObject *c; ! PyObject *v; { if (v == NULL || !PyDict_Check(v)) --- 216,220 ---- static char * ! set_dict(PyClassObject *c, PyObject *v) { if (v == NULL || !PyDict_Check(v)) *************** *** 238,244 **** static char * ! set_bases(c, v) ! PyClassObject *c; ! PyObject *v; { int i, n; --- 226,230 ---- static char * ! set_bases(PyClassObject *c, PyObject *v) { int i, n; *************** *** 260,266 **** static char * ! set_name(c, v) ! PyClassObject *c; ! PyObject *v; { if (v == NULL || !PyString_Check(v)) --- 246,250 ---- static char * ! set_name(PyClassObject *c, PyObject *v) { if (v == NULL || !PyString_Check(v)) *************** *** 273,280 **** static int ! class_setattr(op, name, v) ! PyClassObject *op; ! PyObject *name; ! PyObject *v; { char *sname; --- 257,261 ---- static int ! class_setattr(PyClassObject *op, PyObject *name, PyObject *v) { char *sname; *************** *** 323,328 **** static PyObject * ! class_repr(op) ! PyClassObject *op; { PyObject *mod = PyDict_GetItemString(op->cl_dict, "__module__"); --- 304,308 ---- static PyObject * ! class_repr(PyClassObject *op) { PyObject *mod = PyDict_GetItemString(op->cl_dict, "__module__"); *************** *** 343,348 **** static PyObject * ! class_str(op) ! PyClassObject *op; { PyObject *mod = PyDict_GetItemString(op->cl_dict, "__module__"); --- 323,327 ---- static PyObject * ! class_str(PyClassObject *op) { PyObject *mod = PyDict_GetItemString(op->cl_dict, "__module__"); *************** *** 434,440 **** int ! PyClass_IsSubclass(class, base) ! PyObject *class; ! PyObject *base; { int i, n; --- 413,417 ---- int ! PyClass_IsSubclass(PyObject *class, PyObject *base) { int i, n; *************** *** 457,464 **** PyObject * ! PyInstance_New(class, arg, kw) ! PyObject *class; ! PyObject *arg; ! PyObject *kw; { register PyInstanceObject *inst; --- 434,438 ---- PyObject * ! PyInstance_New(PyObject *class, PyObject *arg, PyObject *kw) { register PyInstanceObject *inst; *************** *** 518,523 **** static void ! instance_dealloc(inst) ! register PyInstanceObject *inst; { PyObject *error_type, *error_value, *error_traceback; --- 492,496 ---- static void ! instance_dealloc(register PyInstanceObject *inst) { PyObject *error_type, *error_value, *error_traceback; *************** *** 598,604 **** static PyObject * ! instance_getattr1(inst, name) ! register PyInstanceObject *inst; ! PyObject *name; { register PyObject *v; --- 571,575 ---- static PyObject * ! instance_getattr1(register PyInstanceObject *inst, PyObject *name) { register PyObject *v; *************** *** 628,634 **** static PyObject * ! instance_getattr2(inst, name) ! register PyInstanceObject *inst; ! PyObject *name; { register PyObject *v; --- 599,603 ---- static PyObject * ! instance_getattr2(register PyInstanceObject *inst, PyObject *name) { register PyObject *v; *************** *** 665,671 **** static PyObject * ! instance_getattr(inst, name) ! register PyInstanceObject *inst; ! PyObject *name; { register PyObject *func, *res; --- 634,638 ---- static PyObject * ! instance_getattr(register PyInstanceObject *inst, PyObject *name) { register PyObject *func, *res; *************** *** 684,691 **** static int ! instance_setattr1(inst, name, v) ! PyInstanceObject *inst; ! PyObject *name; ! PyObject *v; { if (v == NULL) { --- 651,655 ---- static int ! instance_setattr1(PyInstanceObject *inst, PyObject *name, PyObject *v) { if (v == NULL) { *************** *** 701,708 **** static int ! instance_setattr(inst, name, v) ! PyInstanceObject *inst; ! PyObject *name; ! PyObject *v; { PyObject *func, *args, *res, *tmp; --- 665,669 ---- static int ! instance_setattr(PyInstanceObject *inst, PyObject *name, PyObject *v) { PyObject *func, *args, *res, *tmp; *************** *** 768,773 **** static PyObject * ! instance_repr(inst) ! PyInstanceObject *inst; { PyObject *func; --- 729,733 ---- static PyObject * ! instance_repr(PyInstanceObject *inst) { PyObject *func; *************** *** 804,809 **** static PyObject * ! instance_compare1(inst, other) ! PyObject *inst, *other; { return PyInstance_DoBinOp(inst, other, "__cmp__", "__rcmp__", --- 764,768 ---- static PyObject * ! instance_compare1(PyObject *inst, PyObject *other) { return PyInstance_DoBinOp(inst, other, "__cmp__", "__rcmp__", *************** *** 812,817 **** static int ! instance_compare(inst, other) ! PyObject *inst, *other; { PyObject *result; --- 771,775 ---- static int ! instance_compare(PyObject *inst, PyObject *other) { PyObject *result; *************** *** 836,841 **** static long ! instance_hash(inst) ! PyInstanceObject *inst; { PyObject *func; --- 794,798 ---- static long ! instance_hash(PyInstanceObject *inst) { PyObject *func; *************** *** 899,904 **** static int ! instance_length(inst) ! PyInstanceObject *inst; { PyObject *func; --- 856,860 ---- static int ! instance_length(PyInstanceObject *inst) { PyObject *func; *************** *** 931,937 **** static PyObject * ! instance_subscript(inst, key) ! PyInstanceObject *inst; ! PyObject *key; { PyObject *func; --- 887,891 ---- static PyObject * ! instance_subscript(PyInstanceObject *inst, PyObject *key) { PyObject *func; *************** *** 956,963 **** static int ! instance_ass_subscript(inst, key, value) ! PyInstanceObject*inst; ! PyObject *key; ! PyObject *value; { PyObject *func; --- 910,914 ---- static int ! instance_ass_subscript(PyInstanceObject *inst, PyObject *key, PyObject *value) { PyObject *func; *************** *** 1001,1007 **** static PyObject * ! instance_item(inst, i) ! PyInstanceObject *inst; ! int i; { PyObject *func, *arg, *res; --- 952,956 ---- static PyObject * ! instance_item(PyInstanceObject *inst, int i) { PyObject *func, *arg, *res; *************** *** 1024,1030 **** static PyObject * ! instance_slice(inst, i, j) ! PyInstanceObject *inst; ! int i, j; { PyObject *func, *arg, *res; --- 973,977 ---- static PyObject * ! instance_slice(PyInstanceObject *inst, int i, int j) { PyObject *func, *arg, *res; *************** *** 1048,1055 **** static int ! instance_ass_item(inst, i, item) ! PyInstanceObject *inst; ! int i; ! PyObject *item; { PyObject *func, *arg, *res; --- 995,999 ---- static int ! instance_ass_item(PyInstanceObject *inst, int i, PyObject *item) { PyObject *func, *arg, *res; *************** *** 1085,1092 **** static int ! instance_ass_slice(inst, i, j, value) ! PyInstanceObject *inst; ! int i, j; ! PyObject *value; { PyObject *func, *arg, *res; --- 1029,1033 ---- static int ! instance_ass_slice(PyInstanceObject *inst, int i, int j, PyObject *value) { PyObject *func, *arg, *res; *************** *** 1177,1181 **** } ! static PySequenceMethods instance_as_sequence = { (inquiry)instance_length, /*sq_length*/ 0, /*sq_concat*/ --- 1118,1123 ---- } ! static PySequenceMethods ! instance_as_sequence = { (inquiry)instance_length, /*sq_length*/ 0, /*sq_concat*/ *************** *** 1189,1195 **** static PyObject * ! generic_unary_op(self, methodname) ! PyInstanceObject *self; ! PyObject *methodname; { PyObject *func, *res; --- 1131,1135 ---- static PyObject * ! generic_unary_op(PyInstanceObject *self, PyObject *methodname) { PyObject *func, *res; *************** *** 1204,1209 **** /* Forward */ ! static int halfbinop(PyObject *, PyObject *, char *, PyObject **, ! PyObject * (*)(PyObject *, PyObject *), int); --- 1144,1150 ---- /* Forward */ ! static int ! halfbinop(PyObject *, PyObject *, char *, PyObject **, ! PyObject * (*)(PyObject *, PyObject *), int); *************** *** 1211,1220 **** PyObject * ! PyInstance_DoBinOp(v, w, opname, ropname, thisfunc) ! PyObject *v; ! PyObject *w; ! char *opname; ! char *ropname; ! PyObject * (*thisfunc)(PyObject *, PyObject *); { char buf[256]; --- 1152,1157 ---- PyObject * ! PyInstance_DoBinOp(PyObject *v, PyObject *w, char *opname, char *ropname, ! PyObject * (*thisfunc)(PyObject *, PyObject *)) { char buf[256]; *************** *** 1245,1255 **** static int ! halfbinop(v, w, opname, r_result, thisfunc, swapped) ! PyObject *v; ! PyObject *w; ! char *opname; ! PyObject **r_result; ! PyObject * (*thisfunc)(PyObject *, PyObject *); ! int swapped; { PyObject *func; --- 1182,1187 ---- static int ! halfbinop(PyObject *v, PyObject *w, char *opname, PyObject **r_result, ! PyObject * (*thisfunc)(PyObject *, PyObject *), int swapped) { PyObject *func; *************** *** 1327,1333 **** static int ! instance_coerce(pv, pw) ! PyObject **pv; ! PyObject **pw; { PyObject *v = *pv; --- 1259,1263 ---- static int ! instance_coerce(PyObject **pv, PyObject **pw) { PyObject *v = *pv; *************** *** 1396,1401 **** static int ! instance_nonzero(self) ! PyInstanceObject *self; { PyObject *func, *res; --- 1326,1330 ---- static int ! instance_nonzero(PyInstanceObject *self) { PyObject *func, *res; *************** *** 1445,1452 **** /* This version is for ternary calls only (z != None) */ static PyObject * ! instance_pow(v, w, z) ! PyObject *v; ! PyObject *w; ! PyObject *z; { /* XXX Doesn't do coercions... */ --- 1374,1378 ---- /* This version is for ternary calls only (z != None) */ static PyObject * ! instance_pow(PyObject *v, PyObject *w, PyObject *z) { /* XXX Doesn't do coercions... */ *************** *** 1534,1541 **** PyObject * ! PyMethod_New(func, self, class) ! PyObject *func; ! PyObject *self; ! PyObject *class; { register PyMethodObject *im; --- 1460,1464 ---- PyObject * ! PyMethod_New(PyObject *func, PyObject *self, PyObject *class) { register PyMethodObject *im; *************** *** 1565,1570 **** PyObject * ! PyMethod_Function(im) ! register PyObject *im; { if (!PyMethod_Check(im)) { --- 1488,1492 ---- PyObject * ! PyMethod_Function(register PyObject *im) { if (!PyMethod_Check(im)) { *************** *** 1576,1581 **** PyObject * ! PyMethod_Self(im) ! register PyObject *im; { if (!PyMethod_Check(im)) { --- 1498,1502 ---- PyObject * ! PyMethod_Self(register PyObject *im) { if (!PyMethod_Check(im)) { *************** *** 1587,1592 **** PyObject * ! PyMethod_Class(im) ! register PyObject *im; { if (!PyMethod_Check(im)) { --- 1508,1512 ---- PyObject * ! PyMethod_Class(register PyObject *im) { if (!PyMethod_Check(im)) { *************** *** 1612,1618 **** static PyObject * ! instancemethod_getattr(im, name) ! register PyMethodObject *im; ! PyObject *name; { char *sname = PyString_AsString(name); --- 1532,1536 ---- static PyObject * ! instancemethod_getattr(register PyMethodObject *im, PyObject *name) { char *sname = PyString_AsString(name); *************** *** 1633,1638 **** static void ! instancemethod_dealloc(im) ! register PyMethodObject *im; { PyObject_GC_Fini(im); --- 1551,1555 ---- static void ! instancemethod_dealloc(register PyMethodObject *im) { PyObject_GC_Fini(im); *************** *** 1645,1650 **** static int ! instancemethod_compare(a, b) ! PyMethodObject *a, *b; { if (a->im_self != b->im_self) --- 1562,1566 ---- static int ! instancemethod_compare(PyMethodObject *a, PyMethodObject *b) { if (a->im_self != b->im_self) *************** *** 1654,1659 **** static PyObject * ! instancemethod_repr(a) ! PyMethodObject *a; { char buf[240]; --- 1570,1574 ---- static PyObject * ! instancemethod_repr(PyMethodObject *a) { char buf[240]; *************** *** 1697,1702 **** static long ! instancemethod_hash(a) ! PyMethodObject *a; { long x, y; --- 1612,1616 ---- static long ! instancemethod_hash(PyMethodObject *a) { long x, y; *************** *** 1764,1768 **** void ! PyMethod_Fini() { while (free_list) { --- 1678,1682 ---- void ! PyMethod_Fini(void) { while (free_list) { From python-dev@python.org Sun Jul 9 05:14:44 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 21:14:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects cobject.c,2.11,2.12 Message-ID: <200007090414.VAA19706@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv19698 Modified Files: cobject.c Log Message: ANSI-fication of the source. Make the indentation and brace placement internally consistent. Index: cobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/cobject.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** cobject.c 2000/07/09 03:09:56 2.11 --- cobject.c 2000/07/09 04:14:42 2.12 *************** *** 20,135 **** typedef struct { ! PyObject_HEAD ! void *cobject; ! void *desc; ! void (*destructor)(void *); } PyCObject; PyObject * ! PyCObject_FromVoidPtr(cobj, destr) ! void *cobj; ! void (*destr)(void *); ! { ! PyCObject *self; ! ! self = PyObject_NEW(PyCObject, &PyCObject_Type); ! if (self == NULL) ! return NULL; ! self->cobject=cobj; ! self->destructor=destr; ! self->desc=NULL; ! return (PyObject *)self; } PyObject * ! PyCObject_FromVoidPtrAndDesc(cobj, desc, destr) ! void *cobj; ! void *desc; ! void (*destr)(void *, void *); ! { ! PyCObject *self; ! ! if(!desc) { ! PyErr_SetString(PyExc_TypeError, ! "PyCObject_FromVoidPtrAndDesc called with null description"); ! return NULL; ! } ! ! self = PyObject_NEW(PyCObject, &PyCObject_Type); ! if (self == NULL) ! return NULL; ! self->cobject=cobj; ! self->destructor=(destructor1)destr; ! self->desc=desc; ! return (PyObject *)self; } void * ! PyCObject_AsVoidPtr(self) ! PyObject *self; { ! if(self) ! { ! if(self->ob_type == &PyCObject_Type) ! return ((PyCObject *)self)->cobject; ! PyErr_SetString(PyExc_TypeError, ! "PyCObject_AsVoidPtr with non-C-object"); ! } ! if(! PyErr_Occurred()) ! PyErr_SetString(PyExc_TypeError, ! "PyCObject_AsVoidPtr called with null pointer"); ! return NULL; } void * ! PyCObject_GetDesc(self) ! PyObject *self; { ! if(self) ! { ! if(self->ob_type == &PyCObject_Type) ! return ((PyCObject *)self)->desc; ! PyErr_SetString(PyExc_TypeError, ! "PyCObject_GetDesc with non-C-object"); ! } ! if(! PyErr_Occurred()) ! PyErr_SetString(PyExc_TypeError, ! "PyCObject_GetDesc called with null pointer"); ! return NULL; } void * ! PyCObject_Import(module_name, name) ! char *module_name; ! char *name; ! { ! PyObject *m, *c; ! void *r=NULL; ! ! if((m=PyImport_ImportModule(module_name))) ! { ! if((c=PyObject_GetAttrString(m,name))) ! { ! r=PyCObject_AsVoidPtr(c); ! Py_DECREF(c); } ! Py_DECREF(m); } ! ! return r; } static void ! PyCObject_dealloc(self) ! PyCObject *self; { ! if(self->destructor) ! { ! if(self->desc) ! ((destructor2)(self->destructor))(self->cobject, self->desc); ! else ! (self->destructor)(self->cobject); ! } ! PyObject_DEL(self); } --- 20,122 ---- typedef struct { ! PyObject_HEAD ! void *cobject; ! void *desc; ! void (*destructor)(void *); } PyCObject; PyObject * ! PyCObject_FromVoidPtr(void *cobj, void (*destr)(void *)) ! { ! PyCObject *self; ! ! self = PyObject_NEW(PyCObject, &PyCObject_Type); ! if (self == NULL) ! return NULL; ! self->cobject=cobj; ! self->destructor=destr; ! self->desc=NULL; ! ! return (PyObject *)self; } PyObject * ! PyCObject_FromVoidPtrAndDesc(void *cobj, void *desc, ! void (*destr)(void *, void *)) ! { ! PyCObject *self; ! ! if (!desc) { ! PyErr_SetString(PyExc_TypeError, ! "PyCObject_FromVoidPtrAndDesc called with null" ! " description"); ! return NULL; ! } ! self = PyObject_NEW(PyCObject, &PyCObject_Type); ! if (self == NULL) ! return NULL; ! self->cobject=cobj; ! self->destructor=(destructor1)destr; ! self->desc=desc; ! ! return (PyObject *)self; } void * ! PyCObject_AsVoidPtr(PyObject *self) { ! if (self) { ! if (self->ob_type == &PyCObject_Type) ! return ((PyCObject *)self)->cobject; ! PyErr_SetString(PyExc_TypeError, ! "PyCObject_AsVoidPtr with non-C-object"); ! } ! if (!PyErr_Occurred()) ! PyErr_SetString(PyExc_TypeError, ! "PyCObject_AsVoidPtr called with null pointer"); ! return NULL; } void * ! PyCObject_GetDesc(PyObject *self) { ! if (self) { ! if (self->ob_type == &PyCObject_Type) ! return ((PyCObject *)self)->desc; ! PyErr_SetString(PyExc_TypeError, ! "PyCObject_GetDesc with non-C-object"); ! } ! if (!PyErr_Occurred()) ! PyErr_SetString(PyExc_TypeError, ! "PyCObject_GetDesc called with null pointer"); ! return NULL; } void * ! PyCObject_Import(char *module_name, char *name) ! { ! PyObject *m, *c; ! void *r = NULL; ! ! if ((m = PyImport_ImportModule(module_name))) { ! if ((c = PyObject_GetAttrString(m,name))) { ! r = PyCObject_AsVoidPtr(c); ! Py_DECREF(c); } ! Py_DECREF(m); } ! return r; } static void ! PyCObject_dealloc(PyCObject *self) { ! if (self->destructor) { ! if(self->desc) ! ((destructor2)(self->destructor))(self->cobject, self->desc); ! else ! (self->destructor)(self->cobject); ! } ! PyObject_DEL(self); } *************** *** 141,169 **** provide a way for an extension module to export a C interface to other\n\ extension modules, so that extension modules can use the Python import\n\ ! mechanism to link to one another.\n" ! ; PyTypeObject PyCObject_Type = { ! PyObject_HEAD_INIT(&PyType_Type) ! 0, /*ob_size*/ ! "PyCObject", /*tp_name*/ ! sizeof(PyCObject), /*tp_basicsize*/ ! 0, /*tp_itemsize*/ ! /* methods */ ! (destructor)PyCObject_dealloc, /*tp_dealloc*/ ! (printfunc)0, /*tp_print*/ ! (getattrfunc)0, /*tp_getattr*/ ! (setattrfunc)0, /*tp_setattr*/ ! (cmpfunc)0, /*tp_compare*/ ! (reprfunc)0, /*tp_repr*/ ! 0, /*tp_as_number*/ ! 0, /*tp_as_sequence*/ ! 0, /*tp_as_mapping*/ ! (hashfunc)0, /*tp_hash*/ ! (ternaryfunc)0, /*tp_call*/ ! (reprfunc)0, /*tp_str*/ ! ! /* Space for future expansion */ ! 0L,0L,0L,0L, ! PyCObject_Type__doc__ /* Documentation string */ }; --- 128,155 ---- provide a way for an extension module to export a C interface to other\n\ extension modules, so that extension modules can use the Python import\n\ ! mechanism to link to one another."; PyTypeObject PyCObject_Type = { ! PyObject_HEAD_INIT(&PyType_Type) ! 0, /*ob_size*/ ! "PyCObject", /*tp_name*/ ! sizeof(PyCObject), /*tp_basicsize*/ ! 0, /*tp_itemsize*/ ! /* methods */ ! (destructor)PyCObject_dealloc, /*tp_dealloc*/ ! (printfunc)0, /*tp_print*/ ! (getattrfunc)0, /*tp_getattr*/ ! (setattrfunc)0, /*tp_setattr*/ ! (cmpfunc)0, /*tp_compare*/ ! (reprfunc)0, /*tp_repr*/ ! 0, /*tp_as_number*/ ! 0, /*tp_as_sequence*/ ! 0, /*tp_as_mapping*/ ! (hashfunc)0, /*tp_hash*/ ! (ternaryfunc)0, /*tp_call*/ ! (reprfunc)0, /*tp_str*/ ! ! /* Space for future expansion */ ! 0L,0L,0L,0L, ! PyCObject_Type__doc__ /* Documentation string */ }; From python-dev@python.org Sun Jul 9 05:34:15 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 21:34:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.39,2.40 Message-ID: <200007090434.VAA20481@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv20473 Modified Files: abstract.c Log Message: type_error(): Added "const" to signature to eliminate warning with -Wall. Index: abstract.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v retrieving revision 2.39 retrieving revision 2.40 diff -C2 -r2.39 -r2.40 *** abstract.c 2000/07/09 04:06:11 2.39 --- abstract.c 2000/07/09 04:34:13 2.40 *************** *** 17,21 **** static PyObject * ! type_error(char *msg) { PyErr_SetString(PyExc_TypeError, msg); --- 17,21 ---- static PyObject * ! type_error(const char *msg) { PyErr_SetString(PyExc_TypeError, msg); From python-dev@python.org Sun Jul 9 05:36:07 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 21:36:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects complexobject.c,2.27,2.28 Message-ID: <200007090436.VAA20540@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv20533 Modified Files: complexobject.c Log Message: ANSI-fication of the sources. Index: complexobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/complexobject.c,v retrieving revision 2.27 retrieving revision 2.28 diff -C2 -r2.27 -r2.28 *** complexobject.c 2000/06/30 23:58:05 2.27 --- complexobject.c 2000/07/09 04:36:04 2.28 *************** *** 29,34 **** static Py_complex c_1 = {1., 0.}; ! Py_complex c_sum(a,b) ! Py_complex a,b; { Py_complex r; --- 29,33 ---- static Py_complex c_1 = {1., 0.}; ! Py_complex c_sum(Py_complex a, Py_complex b) { Py_complex r; *************** *** 38,43 **** } ! Py_complex c_diff(a,b) ! Py_complex a,b; { Py_complex r; --- 37,41 ---- } ! Py_complex c_diff(Py_complex a, Py_complex b) { Py_complex r; *************** *** 47,52 **** } ! Py_complex c_neg(a) ! Py_complex a; { Py_complex r; --- 45,49 ---- } ! Py_complex c_neg(Py_complex a) { Py_complex r; *************** *** 56,61 **** } ! Py_complex c_prod(a,b) ! Py_complex a,b; { Py_complex r; --- 53,57 ---- } ! Py_complex c_prod(Py_complex a, Py_complex b) { Py_complex r; *************** *** 65,70 **** } ! Py_complex c_quot(a,b) ! Py_complex a,b; { Py_complex r; --- 61,65 ---- } ! Py_complex c_quot(Py_complex a, Py_complex b) { Py_complex r; *************** *** 77,82 **** } ! Py_complex c_pow(a,b) ! Py_complex a,b; { Py_complex r; --- 72,76 ---- } ! Py_complex c_pow(Py_complex a, Py_complex b) { Py_complex r; *************** *** 107,113 **** } ! static Py_complex c_powu(x, n) ! Py_complex x; ! long n; { Py_complex r, p; --- 101,105 ---- } ! static Py_complex c_powu(Py_complex x, long n) { Py_complex r, p; *************** *** 124,130 **** } ! static Py_complex c_powi(x, n) ! Py_complex x; ! long n; { Py_complex cn; --- 116,120 ---- } ! static Py_complex c_powi(Py_complex x, long n) { Py_complex cn; *************** *** 143,148 **** PyObject * ! PyComplex_FromCComplex(cval) ! Py_complex cval; { register PyComplexObject *op; --- 133,137 ---- PyObject * ! PyComplex_FromCComplex(Py_complex cval) { register PyComplexObject *op; *************** *** 158,163 **** PyObject * ! PyComplex_FromDoubles(real, imag) ! double real, imag; { Py_complex c; --- 147,151 ---- PyObject * ! PyComplex_FromDoubles(double real, double imag) { Py_complex c; *************** *** 168,177 **** double ! PyComplex_RealAsDouble(op) ! PyObject *op; { if (PyComplex_Check(op)) { return ((PyComplexObject *)op)->cval.real; ! } else { return PyFloat_AsDouble(op); } --- 156,165 ---- double ! PyComplex_RealAsDouble(PyObject *op) { if (PyComplex_Check(op)) { return ((PyComplexObject *)op)->cval.real; ! } ! else { return PyFloat_AsDouble(op); } *************** *** 179,188 **** double ! PyComplex_ImagAsDouble(op) ! PyObject *op; { if (PyComplex_Check(op)) { return ((PyComplexObject *)op)->cval.imag; ! } else { return 0.0; } --- 167,176 ---- double ! PyComplex_ImagAsDouble(PyObject *op) { if (PyComplex_Check(op)) { return ((PyComplexObject *)op)->cval.imag; ! } ! else { return 0.0; } *************** *** 190,200 **** Py_complex ! PyComplex_AsCComplex(op) ! PyObject *op; { Py_complex cv; if (PyComplex_Check(op)) { return ((PyComplexObject *)op)->cval; ! } else { cv.real = PyFloat_AsDouble(op); cv.imag = 0.; --- 178,188 ---- Py_complex ! PyComplex_AsCComplex(PyObject *op) { Py_complex cv; if (PyComplex_Check(op)) { return ((PyComplexObject *)op)->cval; ! } ! else { cv.real = PyFloat_AsDouble(op); cv.imag = 0.; *************** *** 204,209 **** static void ! complex_dealloc(op) ! PyObject *op; { PyObject_DEL(op); --- 192,196 ---- static void ! complex_dealloc(PyObject *op) { PyObject_DEL(op); *************** *** 212,218 **** static void ! complex_buf_repr(buf, v) ! char *buf; ! PyComplexObject *v; { if (v->cval.real == 0.) --- 199,203 ---- static void ! complex_buf_repr(char *buf, PyComplexObject *v) { if (v->cval.real == 0.) *************** *** 223,230 **** static int ! complex_print(v, fp, flags) ! PyComplexObject *v; ! FILE *fp; ! int flags; /* Not used but required by interface */ { char buf[100]; --- 208,213 ---- static int ! complex_print(PyComplexObject *v, FILE *fp, int flags) ! /* flags -- not used but required by interface */ { char buf[100]; *************** *** 235,240 **** static PyObject * ! complex_repr(v) ! PyComplexObject *v; { char buf[100]; --- 218,222 ---- static PyObject * ! complex_repr(PyComplexObject *v) { char buf[100]; *************** *** 244,266 **** static int ! complex_compare(v, w) ! PyComplexObject *v, *w; { ! /* Note: "greater" and "smaller" have no meaning for complex numbers, ! but Python requires that they be defined nevertheless. */ Py_complex i, j; i = v->cval; j = w->cval; if (i.real == j.real && i.imag == j.imag) ! return 0; else if (i.real != j.real) ! return (i.real < j.real) ? -1 : 1; else ! return (i.imag < j.imag) ? -1 : 1; } static long ! complex_hash(v) ! PyComplexObject *v; { double intpart, fractpart; --- 226,246 ---- static int ! complex_compare(PyComplexObject *v, PyComplexObject *w) { ! /* Note: "greater" and "smaller" have no meaning for complex numbers, ! but Python requires that they be defined nevertheless. */ Py_complex i, j; i = v->cval; j = w->cval; if (i.real == j.real && i.imag == j.imag) ! return 0; else if (i.real != j.real) ! return (i.real < j.real) ? -1 : 1; else ! return (i.imag < j.imag) ? -1 : 1; } static long ! complex_hash(PyComplexObject *v) { double intpart, fractpart; *************** *** 313,319 **** static PyObject * ! complex_add(v, w) ! PyComplexObject *v; ! PyComplexObject *w; { Py_complex result; --- 293,297 ---- static PyObject * ! complex_add(PyComplexObject *v, PyComplexObject *w) { Py_complex result; *************** *** 325,331 **** static PyObject * ! complex_sub(v, w) ! PyComplexObject *v; ! PyComplexObject *w; { Py_complex result; --- 303,307 ---- static PyObject * ! complex_sub(PyComplexObject *v, PyComplexObject *w) { Py_complex result; *************** *** 337,343 **** static PyObject * ! complex_mul(v, w) ! PyComplexObject *v; ! PyComplexObject *w; { Py_complex result; --- 313,317 ---- static PyObject * ! complex_mul(PyComplexObject *v, PyComplexObject *w) { Py_complex result; *************** *** 349,355 **** static PyObject * ! complex_div(v, w) ! PyComplexObject *v; ! PyComplexObject *w; { Py_complex quot; --- 323,327 ---- static PyObject * ! complex_div(PyComplexObject *v, PyComplexObject *w) { Py_complex quot; *************** *** 366,372 **** static PyObject * ! complex_remainder(v, w) ! PyComplexObject *v; ! PyComplexObject *w; { Py_complex div, mod; --- 338,342 ---- static PyObject * ! complex_remainder(PyComplexObject *v, PyComplexObject *w) { Py_complex div, mod; *************** *** 386,392 **** static PyObject * ! complex_divmod(v, w) ! PyComplexObject *v; ! PyComplexObject *w; { Py_complex div, mod; --- 356,360 ---- static PyObject * ! complex_divmod(PyComplexObject *v, PyComplexObject *w) { Py_complex div, mod; *************** *** 410,417 **** static PyObject * ! complex_pow(v, w, z) ! PyComplexObject *v; ! PyObject *w; ! PyComplexObject *z; { Py_complex p; --- 378,382 ---- static PyObject * ! complex_pow(PyComplexObject *v, PyObject *w, PyComplexObject *z) { Py_complex p; *************** *** 423,427 **** return NULL; } - PyFPE_START_PROTECT("complex_pow", return 0) errno = 0; --- 388,391 ---- *************** *** 439,449 **** return NULL; } - return PyComplex_FromCComplex(p); } static PyObject * ! complex_neg(v) ! PyComplexObject *v; { Py_complex neg; --- 403,411 ---- return NULL; } return PyComplex_FromCComplex(p); } static PyObject * ! complex_neg(PyComplexObject *v) { Py_complex neg; *************** *** 454,459 **** static PyObject * ! complex_pos(v) ! PyComplexObject *v; { Py_INCREF(v); --- 416,420 ---- static PyObject * ! complex_pos(PyComplexObject *v) { Py_INCREF(v); *************** *** 462,467 **** static PyObject * ! complex_abs(v) ! PyComplexObject *v; { double result; --- 423,427 ---- static PyObject * ! complex_abs(PyComplexObject *v) { double result; *************** *** 473,478 **** static int ! complex_nonzero(v) ! PyComplexObject *v; { return v->cval.real != 0.0 || v->cval.imag != 0.0; --- 433,437 ---- static int ! complex_nonzero(PyComplexObject *v) { return v->cval.real != 0.0 || v->cval.imag != 0.0; *************** *** 480,486 **** static int ! complex_coerce(pv, pw) ! PyObject **pv; ! PyObject **pw; { Py_complex cval; --- 439,443 ---- static int ! complex_coerce(PyObject **pv, PyObject **pw) { Py_complex cval; *************** *** 508,513 **** static PyObject * ! complex_int(v) ! PyObject *v; { PyErr_SetString(PyExc_TypeError, --- 465,469 ---- static PyObject * ! complex_int(PyObject *v) { PyErr_SetString(PyExc_TypeError, *************** *** 517,522 **** static PyObject * ! complex_long(v) ! PyObject *v; { PyErr_SetString(PyExc_TypeError, --- 473,477 ---- static PyObject * ! complex_long(PyObject *v) { PyErr_SetString(PyExc_TypeError, *************** *** 526,531 **** static PyObject * ! complex_float(v) ! PyObject *v; { PyErr_SetString(PyExc_TypeError, --- 481,485 ---- static PyObject * ! complex_float(PyObject *v) { PyErr_SetString(PyExc_TypeError, *************** *** 535,541 **** static PyObject * ! complex_conjugate(self, args) ! PyObject *self; ! PyObject *args; { Py_complex c; --- 489,493 ---- static PyObject * ! complex_conjugate(PyObject *self, PyObject *args) { Py_complex c; *************** *** 554,560 **** static PyObject * ! complex_getattr(self, name) ! PyComplexObject *self; ! char *name; { if (strcmp(name, "real") == 0) --- 506,510 ---- static PyObject * ! complex_getattr(PyComplexObject *self, char *name) { if (strcmp(name, "real") == 0) From python-dev@python.org Sun Jul 9 05:56:27 2000 From: python-dev@python.org (Barry Warsaw) Date: Sat, 8 Jul 2000 21:56:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python exceptions.c,1.4,1.5 Message-ID: <200007090456.VAA21329@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv21321 Modified Files: exceptions.c Log Message: EnvironmentError__init__(): The two case clauses were missing `break's. This first missing break caused a memory leak when case 3 fell through case 2 in the following example: import os os.chmod('/missing', 0600) Index: exceptions.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** exceptions.c 2000/07/01 04:45:52 1.4 --- exceptions.c 2000/07/09 04:56:25 1.5 *************** *** 441,446 **** switch (PySequence_Length(args)) { case 3: ! /* open() errors give third argument which is the filename. But so ! * common in-place unpacking doesn't break, e.g.: * * except IOError, (errno, strerror): --- 441,448 ---- switch (PySequence_Length(args)) { case 3: ! /* Where a function has a single filename, such as open() or some ! * of the os module functions, PyErr_SetFromErrnoWithFilename() is ! * called, giving a third argument which is the filename. But, so ! * that old code using in-place unpacking doesn't break, e.g.: * * except IOError, (errno, strerror): *************** *** 466,472 **** if (!subslice || PyObject_SetAttrString(self, "args", subslice)) goto finally; case 2: ! /* common case: PyErr_SetFromErrno() */ item0 = PySequence_GetItem(args, 0); item1 = PySequence_GetItem(args, 1); --- 468,477 ---- if (!subslice || PyObject_SetAttrString(self, "args", subslice)) goto finally; + break; case 2: ! /* Used when PyErr_SetFromErrno() is called and no filename ! * argument is given. ! */ item0 = PySequence_GetItem(args, 0); item1 = PySequence_GetItem(args, 1); *************** *** 479,482 **** --- 484,488 ---- goto finally; } + break; } From python-dev@python.org Sun Jul 9 06:02:21 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 22:02:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects fileobject.c,2.79,2.80 floatobject.c,2.62,2.63 Message-ID: <200007090502.WAA28233@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv28114 Modified Files: fileobject.c floatobject.c Log Message: ANSI-fication of the sources. Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.79 retrieving revision 2.80 diff -C2 -r2.79 -r2.80 *** fileobject.c 2000/07/09 03:09:56 2.79 --- fileobject.c 2000/07/09 05:02:18 2.80 *************** *** 77,82 **** FILE * ! PyFile_AsFile(f) ! PyObject *f; { if (f == NULL || !PyFile_Check(f)) --- 77,81 ---- FILE * ! PyFile_AsFile(PyObject *f) { if (f == NULL || !PyFile_Check(f)) *************** *** 87,92 **** PyObject * ! PyFile_Name(f) ! PyObject *f; { if (f == NULL || !PyFile_Check(f)) --- 86,90 ---- PyObject * ! PyFile_Name(PyObject *f) { if (f == NULL || !PyFile_Check(f)) *************** *** 97,105 **** PyObject * ! PyFile_FromFile(fp, name, mode, close) ! FILE *fp; ! char *name; ! char *mode; ! int (*close)(FILE *); { PyFileObject *f = PyObject_NEW(PyFileObject, &PyFile_Type); --- 95,99 ---- PyObject * ! PyFile_FromFile(FILE *fp, char *name, char *mode, int (*close)(FILE *)) { PyFileObject *f = PyObject_NEW(PyFileObject, &PyFile_Type); *************** *** 124,129 **** PyObject * ! PyFile_FromString(name, mode) ! char *name, *mode; { extern int fclose(FILE *); --- 118,122 ---- PyObject * ! PyFile_FromString(char *name, char *mode) { extern int fclose(FILE *); *************** *** 161,167 **** void ! PyFile_SetBufSize(f, bufsize) ! PyObject *f; ! int bufsize; { if (bufsize >= 0) { --- 154,158 ---- void ! PyFile_SetBufSize(PyObject *f, int bufsize) { if (bufsize >= 0) { *************** *** 189,193 **** static PyObject * ! err_closed() { PyErr_SetString(PyExc_ValueError, "I/O operation on closed file"); --- 180,184 ---- static PyObject * ! err_closed(void) { PyErr_SetString(PyExc_ValueError, "I/O operation on closed file"); *************** *** 198,203 **** static void ! file_dealloc(f) ! PyFileObject *f; { if (f->f_fp != NULL && f->f_close != NULL) { --- 189,193 ---- static void ! file_dealloc(PyFileObject *f) { if (f->f_fp != NULL && f->f_close != NULL) { *************** *** 216,221 **** static PyObject * ! file_repr(f) ! PyFileObject *f; { char buf[300]; --- 206,210 ---- static PyObject * ! file_repr(PyFileObject *f) { char buf[300]; *************** *** 229,235 **** static PyObject * ! file_close(f, args) ! PyFileObject *f; ! PyObject *args; { int sts = 0; --- 218,222 ---- static PyObject * ! file_close(PyFileObject *f, PyObject *args) { int sts = 0; *************** *** 254,260 **** static PyObject * ! file_seek(f, args) ! PyFileObject *f; ! PyObject *args; { int whence; --- 241,245 ---- static PyObject * ! file_seek(PyFileObject *f, PyObject *args) { int whence; *************** *** 297,303 **** #ifdef HAVE_FTRUNCATE static PyObject * ! file_truncate(f, args) ! PyFileObject *f; ! PyObject *args; { int ret; --- 282,286 ---- #ifdef HAVE_FTRUNCATE static PyObject * ! file_truncate(PyFileObject *f, PyObject *args) { int ret; *************** *** 359,365 **** static PyObject * ! file_tell(f, args) ! PyFileObject *f; ! PyObject *args; { off_t offset; --- 342,346 ---- static PyObject * ! file_tell(PyFileObject *f, PyObject *args) { off_t offset; *************** *** 391,397 **** static PyObject * ! file_fileno(f, args) ! PyFileObject *f; ! PyObject *args; { if (f->f_fp == NULL) --- 372,376 ---- static PyObject * ! file_fileno(PyFileObject *f, PyObject *args) { if (f->f_fp == NULL) *************** *** 403,409 **** static PyObject * ! file_flush(f, args) ! PyFileObject *f; ! PyObject *args; { int res; --- 382,386 ---- static PyObject * ! file_flush(PyFileObject *f, PyObject *args) { int res; *************** *** 427,433 **** static PyObject * ! file_isatty(f, args) ! PyFileObject *f; ! PyObject *args; { long res; --- 404,408 ---- static PyObject * ! file_isatty(PyFileObject *f, PyObject *args) { long res; *************** *** 456,462 **** static size_t ! new_buffersize(f, currentsize) ! PyFileObject *f; ! size_t currentsize; { #ifdef HAVE_FSTAT --- 431,435 ---- static size_t ! new_buffersize(PyFileObject *f, size_t currentsize) { #ifdef HAVE_FSTAT *************** *** 496,502 **** static PyObject * ! file_read(f, args) ! PyFileObject *f; ! PyObject *args; { long bytesrequested = -1; --- 469,473 ---- static PyObject * ! file_read(PyFileObject *f, PyObject *args) { long bytesrequested = -1; *************** *** 545,551 **** static PyObject * ! file_readinto(f, args) ! PyFileObject *f; ! PyObject *args; { char *ptr; --- 516,520 ---- static PyObject * ! file_readinto(PyFileObject *f, PyObject *args) { char *ptr; *************** *** 584,590 **** static PyObject * ! get_line(f, n) ! PyFileObject *f; ! int n; { register FILE *fp; --- 553,557 ---- static PyObject * ! get_line(PyFileObject *f, int n) { register FILE *fp; *************** *** 649,655 **** PyObject * ! PyFile_GetLine(f, n) ! PyObject *f; ! int n; { if (f == NULL) { --- 616,620 ---- PyObject * ! PyFile_GetLine(PyObject *f, int n) { if (f == NULL) { *************** *** 712,718 **** static PyObject * ! file_readline(f, args) ! PyFileObject *f; ! PyObject *args; { int n = -1; --- 677,681 ---- static PyObject * ! file_readline(PyFileObject *f, PyObject *args) { int n = -1; *************** *** 730,736 **** static PyObject * ! file_readlines(f, args) ! PyFileObject *f; ! PyObject *args; { long sizehint = 0; --- 693,697 ---- static PyObject * ! file_readlines(PyFileObject *f, PyObject *args) { long sizehint = 0; *************** *** 843,849 **** static PyObject * ! file_write(f, args) ! PyFileObject *f; ! PyObject *args; { char *s; --- 804,808 ---- static PyObject * ! file_write(PyFileObject *f, PyObject *args) { char *s; *************** *** 868,874 **** static PyObject * ! file_writelines(f, args) ! PyFileObject *f; ! PyObject *args; { #define CHUNKSIZE 1000 --- 827,831 ---- static PyObject * ! file_writelines(PyFileObject *f, PyObject *args) { #define CHUNKSIZE 1000 *************** *** 993,999 **** static PyObject * ! file_getattr(f, name) ! PyFileObject *f; ! char *name; { PyObject *res; --- 950,954 ---- static PyObject * ! file_getattr(PyFileObject *f, char *name) { PyObject *res; *************** *** 1009,1016 **** static int ! file_setattr(f, name, v) ! PyFileObject *f; ! char *name; ! PyObject *v; { if (v == NULL) { --- 964,968 ---- static int ! file_setattr(PyFileObject *f, char *name, PyObject *v) { if (v == NULL) { *************** *** 1039,1045 **** int ! PyFile_SoftSpace(f, newflag) ! PyObject *f; ! int newflag; { int oldflag = 0; --- 991,995 ---- int ! PyFile_SoftSpace(PyObject *f, int newflag) { int oldflag = 0; *************** *** 1076,1083 **** int ! PyFile_WriteObject(v, f, flags) ! PyObject *v; ! PyObject *f; ! int flags; { PyObject *writer, *value, *args, *result; --- 1026,1030 ---- int ! PyFile_WriteObject(PyObject *v, PyObject *f, int flags) { PyObject *writer, *value, *args, *result; *************** *** 1122,1132 **** int ! PyFile_WriteString(s, f) ! char *s; ! PyObject *f; { if (f == NULL) { /* Should be caused by a pre-existing error */ ! if(!PyErr_Occurred()) PyErr_SetString(PyExc_SystemError, "null file for PyFile_WriteString"); --- 1069,1077 ---- int ! PyFile_WriteString(char *s, PyObject *f) { if (f == NULL) { /* Should be caused by a pre-existing error */ ! if (!PyErr_Occurred()) PyErr_SetString(PyExc_SystemError, "null file for PyFile_WriteString"); Index: floatobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v retrieving revision 2.62 retrieving revision 2.63 diff -C2 -r2.62 -r2.63 *** floatobject.c 2000/07/09 03:09:56 2.62 --- floatobject.c 2000/07/09 05:02:18 2.63 *************** *** 95,99 **** static PyFloatObject * ! fill_free_list() { PyFloatObject *p, *q; --- 95,99 ---- static PyFloatObject * ! fill_free_list(void) { PyFloatObject *p, *q; *************** *** 134,140 **** PyObject * ! PyFloat_FromString(v, pend) ! PyObject *v; ! char **pend; { extern double strtod(const char *, char **); --- 134,138 ---- PyObject * ! PyFloat_FromString(PyObject *v, char **pend) { extern double strtod(const char *, char **); *************** *** 208,213 **** static void ! float_dealloc(op) ! PyFloatObject *op; { op->ob_type = (struct _typeobject *)free_list; --- 206,210 ---- static void ! float_dealloc(PyFloatObject *op) { op->ob_type = (struct _typeobject *)free_list; *************** *** 216,221 **** double ! PyFloat_AsDouble(op) ! PyObject *op; { PyNumberMethods *nb; --- 213,217 ---- double ! PyFloat_AsDouble(PyObject *op) { PyNumberMethods *nb; *************** *** 250,257 **** void ! PyFloat_AsStringEx(buf, v, precision) ! char *buf; ! PyFloatObject *v; ! int precision; { register char *cp; --- 246,250 ---- void ! PyFloat_AsStringEx(char *buf, PyFloatObject *v, int precision) { register char *cp; *************** *** 296,302 **** void ! PyFloat_AsString(buf, v) ! char *buf; ! PyFloatObject *v; { PyFloat_AsStringEx(buf, v, PREC_STR); --- 289,293 ---- void ! PyFloat_AsString(char *buf, PyFloatObject *v) { PyFloat_AsStringEx(buf, v, PREC_STR); *************** *** 305,312 **** /* ARGSUSED */ static int ! float_print(v, fp, flags) ! PyFloatObject *v; ! FILE *fp; ! int flags; /* Not used but required by interface */ { char buf[100]; --- 296,301 ---- /* ARGSUSED */ static int ! float_print(PyFloatObject *v, FILE *fp, int flags) ! /* flags -- not used but required by interface */ { char buf[100]; *************** *** 317,322 **** static PyObject * ! float_repr(v) ! PyFloatObject *v; { char buf[100]; --- 306,310 ---- static PyObject * ! float_repr(PyFloatObject *v) { char buf[100]; *************** *** 326,331 **** static PyObject * ! float_str(v) ! PyFloatObject *v; { char buf[100]; --- 314,318 ---- static PyObject * ! float_str(PyFloatObject *v) { char buf[100]; *************** *** 335,340 **** static int ! float_compare(v, w) ! PyFloatObject *v, *w; { double i = v->ob_fval; --- 322,326 ---- static int ! float_compare(PyFloatObject *v, PyFloatObject *w) { double i = v->ob_fval; *************** *** 345,350 **** static long ! float_hash(v) ! PyFloatObject *v; { double intpart, fractpart; --- 331,335 ---- static long ! float_hash(PyFloatObject *v) { double intpart, fractpart; *************** *** 389,395 **** static PyObject * ! float_add(v, w) ! PyFloatObject *v; ! PyFloatObject *w; { double result; --- 374,378 ---- static PyObject * ! float_add(PyFloatObject *v, PyFloatObject *w) { double result; *************** *** 401,407 **** static PyObject * ! float_sub(v, w) ! PyFloatObject *v; ! PyFloatObject *w; { double result; --- 384,388 ---- static PyObject * ! float_sub(PyFloatObject *v, PyFloatObject *w) { double result; *************** *** 413,419 **** static PyObject * ! float_mul(v, w) ! PyFloatObject *v; ! PyFloatObject *w; { double result; --- 394,398 ---- static PyObject * ! float_mul(PyFloatObject *v, PyFloatObject *w) { double result; *************** *** 426,432 **** static PyObject * ! float_div(v, w) ! PyFloatObject *v; ! PyFloatObject *w; { double result; --- 405,409 ---- static PyObject * ! float_div(PyFloatObject *v, PyFloatObject *w) { double result; *************** *** 442,448 **** static PyObject * ! float_rem(v, w) ! PyFloatObject *v; ! PyFloatObject *w; { double vx, wx; --- 419,423 ---- static PyObject * ! float_rem(PyFloatObject *v, PyFloatObject *w) { double vx, wx; *************** *** 466,472 **** static PyObject * ! float_divmod(v, w) ! PyFloatObject *v; ! PyFloatObject *w; { double vx, wx; --- 441,445 ---- static PyObject * ! float_divmod(PyFloatObject *v, PyFloatObject *w) { double vx, wx; *************** *** 501,507 **** } ! static double powu(x, n) ! double x; ! long n; { double r = 1.; --- 474,478 ---- } ! static double powu(double x, long n) { double r = 1.; *************** *** 518,525 **** static PyObject * ! float_pow(v, w, z) ! PyFloatObject *v; ! PyObject *w; ! PyFloatObject *z; { double iv, iw, ix; --- 489,493 ---- static PyObject * ! float_pow(PyFloatObject *v, PyObject *w, PyFloatObject *z) { double iv, iw, ix; *************** *** 592,597 **** static PyObject * ! float_neg(v) ! PyFloatObject *v; { return PyFloat_FromDouble(-v->ob_fval); --- 560,564 ---- static PyObject * ! float_neg(PyFloatObject *v) { return PyFloat_FromDouble(-v->ob_fval); *************** *** 599,604 **** static PyObject * ! float_pos(v) ! PyFloatObject *v; { Py_INCREF(v); --- 566,570 ---- static PyObject * ! float_pos(PyFloatObject *v) { Py_INCREF(v); *************** *** 607,612 **** static PyObject * ! float_abs(v) ! PyFloatObject *v; { if (v->ob_fval < 0) --- 573,577 ---- static PyObject * ! float_abs(PyFloatObject *v) { if (v->ob_fval < 0) *************** *** 617,622 **** static int ! float_nonzero(v) ! PyFloatObject *v; { return v->ob_fval != 0.0; --- 582,586 ---- static int ! float_nonzero(PyFloatObject *v) { return v->ob_fval != 0.0; *************** *** 624,630 **** static int ! float_coerce(pv, pw) ! PyObject **pv; ! PyObject **pw; { if (PyInt_Check(*pw)) { --- 588,592 ---- static int ! float_coerce(PyObject **pv, PyObject **pw) { if (PyInt_Check(*pw)) { *************** *** 643,648 **** static PyObject * ! float_int(v) ! PyObject *v; { double x = PyFloat_AsDouble(v); --- 605,609 ---- static PyObject * ! float_int(PyObject *v) { double x = PyFloat_AsDouble(v); *************** *** 657,662 **** static PyObject * ! float_long(v) ! PyObject *v; { double x = PyFloat_AsDouble(v); --- 618,622 ---- static PyObject * ! float_long(PyObject *v) { double x = PyFloat_AsDouble(v); *************** *** 665,670 **** static PyObject * ! float_float(v) ! PyObject *v; { Py_INCREF(v); --- 625,629 ---- static PyObject * ! float_float(PyObject *v) { Py_INCREF(v); *************** *** 720,724 **** void ! PyFloat_Fini() { PyFloatObject *p; --- 679,683 ---- void ! PyFloat_Fini(void) { PyFloatObject *p; From python-dev@python.org Sun Jul 9 06:31:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 22:31:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects floatobject.c,2.63,2.64 Message-ID: <200007090531.WAA29792@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv29782 Modified Files: floatobject.c Log Message: Remove legacy use of __SC__; no longer needed now that ANSI source is the standard for Python implementation. Index: floatobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v retrieving revision 2.63 retrieving revision 2.64 diff -C2 -r2.63 -r2.64 *** floatobject.c 2000/07/09 05:02:18 2.63 --- floatobject.c 2000/07/09 05:31:24 2.64 *************** *** 113,122 **** PyObject * - #ifdef __SC__ PyFloat_FromDouble(double fval) - #else - PyFloat_FromDouble(fval) - double fval; - #endif { register PyFloatObject *op; --- 113,117 ---- From python-dev@python.org Sun Jul 9 06:40:58 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 22:40:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects frameobject.c,2.41,2.42 Message-ID: <200007090540.WAA30134@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv30126 Modified Files: frameobject.c Log Message: ANSI-fication of the sources. Index: frameobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/frameobject.c,v retrieving revision 2.41 retrieving revision 2.42 diff -C2 -r2.41 -r2.42 *** frameobject.c 2000/06/30 23:58:05 2.41 --- frameobject.c 2000/07/09 05:40:56 2.42 *************** *** 37,43 **** static PyObject * ! frame_getattr(f, name) ! PyFrameObject *f; ! char *name; { if (strcmp(name, "f_locals") == 0) --- 37,41 ---- static PyObject * ! frame_getattr(PyFrameObject *f, char *name) { if (strcmp(name, "f_locals") == 0) *************** *** 47,54 **** static int ! frame_setattr(f, name, value) ! PyFrameObject *f; ! char *name; ! PyObject *value; { return PyMember_Set((char *)f, frame_memberlist, name, value); --- 45,49 ---- static int ! frame_setattr(PyFrameObject *f, char *name, PyObject *value) { return PyMember_Set((char *)f, frame_memberlist, name, value); *************** *** 77,82 **** static void ! frame_dealloc(f) ! PyFrameObject *f; { int i; --- 72,76 ---- static void ! frame_dealloc(PyFrameObject *f) { int i; *************** *** 122,130 **** PyFrameObject * ! PyFrame_New(tstate, code, globals, locals) ! PyThreadState *tstate; ! PyCodeObject *code; ! PyObject *globals; ! PyObject *locals; { PyFrameObject *back = tstate->frame; --- 116,121 ---- PyFrameObject * ! PyFrame_New(PyThreadState *tstate, PyCodeObject *code, ! PyObject *globals, PyObject *locals) { PyFrameObject *back = tstate->frame; *************** *** 239,247 **** void ! PyFrame_BlockSetup(f, type, handler, level) ! PyFrameObject *f; ! int type; ! int handler; ! int level; { PyTryBlock *b; --- 230,234 ---- void ! PyFrame_BlockSetup(PyFrameObject *f, int type, int handler, int level) { PyTryBlock *b; *************** *** 255,260 **** PyTryBlock * ! PyFrame_BlockPop(f) ! PyFrameObject *f; { PyTryBlock *b; --- 242,246 ---- PyTryBlock * ! PyFrame_BlockPop(PyFrameObject *f) { PyTryBlock *b; *************** *** 268,273 **** void ! PyFrame_FastToLocals(f) ! PyFrameObject *f; { /* Merge fast locals into f->f_locals */ --- 254,258 ---- void ! PyFrame_FastToLocals(PyFrameObject *f) { /* Merge fast locals into f->f_locals */ *************** *** 313,319 **** void ! PyFrame_LocalsToFast(f, clear) ! PyFrameObject *f; ! int clear; { /* Merge f->f_locals into fast locals */ --- 298,302 ---- void ! PyFrame_LocalsToFast(PyFrameObject *f, int clear) { /* Merge f->f_locals into fast locals */ *************** *** 350,354 **** void ! PyFrame_Fini() { while (free_list != NULL) { --- 333,337 ---- void ! PyFrame_Fini(void) { while (free_list != NULL) { From python-dev@python.org Sun Jul 9 07:03:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 23:03:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects funcobject.c,2.28,2.29 methodobject.c,2.31,2.32 moduleobject.c,2.27,2.28 Message-ID: <200007090603.XAA05112@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv5102 Modified Files: funcobject.c methodobject.c moduleobject.c Log Message: ANSI-fication of the sources. Index: funcobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/funcobject.c,v retrieving revision 2.28 retrieving revision 2.29 diff -C2 -r2.28 -r2.29 *** funcobject.c 2000/07/01 01:00:38 2.28 --- funcobject.c 2000/07/09 06:03:25 2.29 *************** *** 16,22 **** PyObject * ! PyFunction_New(code, globals) ! PyObject *code; ! PyObject *globals; { PyFunctionObject *op = PyObject_NEW(PyFunctionObject, --- 16,20 ---- PyObject * ! PyFunction_New(PyObject *code, PyObject *globals) { PyFunctionObject *op = PyObject_NEW(PyFunctionObject, *************** *** 48,53 **** PyObject * ! PyFunction_GetCode(op) ! PyObject *op; { if (!PyFunction_Check(op)) { --- 46,50 ---- PyObject * ! PyFunction_GetCode(PyObject *op) { if (!PyFunction_Check(op)) { *************** *** 59,64 **** PyObject * ! PyFunction_GetGlobals(op) ! PyObject *op; { if (!PyFunction_Check(op)) { --- 56,60 ---- PyObject * ! PyFunction_GetGlobals(PyObject *op) { if (!PyFunction_Check(op)) { *************** *** 70,75 **** PyObject * ! PyFunction_GetDefaults(op) ! PyObject *op; { if (!PyFunction_Check(op)) { --- 66,70 ---- PyObject * ! PyFunction_GetDefaults(PyObject *op) { if (!PyFunction_Check(op)) { *************** *** 81,87 **** int ! PyFunction_SetDefaults(op, defaults) ! PyObject *op; ! PyObject *defaults; { if (!PyFunction_Check(op)) { --- 76,80 ---- int ! PyFunction_SetDefaults(PyObject *op, PyObject *defaults) { if (!PyFunction_Check(op)) { *************** *** 119,125 **** static PyObject * ! func_getattr(op, name) ! PyFunctionObject *op; ! char *name; { if (name[0] != '_' && PyEval_GetRestricted()) { --- 112,116 ---- static PyObject * ! func_getattr(PyFunctionObject *op, char *name) { if (name[0] != '_' && PyEval_GetRestricted()) { *************** *** 132,139 **** static int ! func_setattr(op, name, value) ! PyFunctionObject *op; ! char *name; ! PyObject *value; { if (PyEval_GetRestricted()) { --- 123,127 ---- static int ! func_setattr(PyFunctionObject *op, char *name, PyObject *value) { if (PyEval_GetRestricted()) { *************** *** 164,169 **** static void ! func_dealloc(op) ! PyFunctionObject *op; { PyObject_GC_Fini(op); --- 152,156 ---- static void ! func_dealloc(PyFunctionObject *op) { PyObject_GC_Fini(op); *************** *** 178,183 **** static PyObject* ! func_repr(op) ! PyFunctionObject *op; { char buf[140]; --- 165,169 ---- static PyObject* ! func_repr(PyFunctionObject *op) { char buf[140]; *************** *** 192,197 **** static int ! func_compare(f, g) ! PyFunctionObject *f, *g; { int c; --- 178,182 ---- static int ! func_compare(PyFunctionObject *f, PyFunctionObject *g) { int c; *************** *** 211,216 **** static long ! func_hash(f) ! PyFunctionObject *f; { long h,x; --- 196,200 ---- static long ! func_hash(PyFunctionObject *f) { long h,x; Index: methodobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/methodobject.c,v retrieving revision 2.31 retrieving revision 2.32 diff -C2 -r2.31 -r2.32 *** methodobject.c 2000/06/30 23:58:05 2.31 --- methodobject.c 2000/07/09 06:03:25 2.32 *************** *** 18,24 **** PyObject * ! PyCFunction_New(ml, self) ! PyMethodDef *ml; ! PyObject *self; { PyCFunctionObject *op; --- 18,22 ---- PyObject * ! PyCFunction_New(PyMethodDef *ml, PyObject *self) { PyCFunctionObject *op; *************** *** 40,45 **** PyCFunction ! PyCFunction_GetFunction(op) ! PyObject *op; { if (!PyCFunction_Check(op)) { --- 38,42 ---- PyCFunction ! PyCFunction_GetFunction(PyObject *op) { if (!PyCFunction_Check(op)) { *************** *** 51,56 **** PyObject * ! PyCFunction_GetSelf(op) ! PyObject *op; { if (!PyCFunction_Check(op)) { --- 48,52 ---- PyObject * ! PyCFunction_GetSelf(PyObject *op) { if (!PyCFunction_Check(op)) { *************** *** 62,67 **** int ! PyCFunction_GetFlags(op) ! PyObject *op; { if (!PyCFunction_Check(op)) { --- 58,62 ---- int ! PyCFunction_GetFlags(PyObject *op) { if (!PyCFunction_Check(op)) { *************** *** 75,80 **** static void ! meth_dealloc(m) ! PyCFunctionObject *m; { Py_XDECREF(m->m_self); --- 70,74 ---- static void ! meth_dealloc(PyCFunctionObject *m) { Py_XDECREF(m->m_self); *************** *** 84,90 **** static PyObject * ! meth_getattr(m, name) ! PyCFunctionObject *m; ! char *name; { if (strcmp(name, "__name__") == 0) { --- 78,82 ---- static PyObject * ! meth_getattr(PyCFunctionObject *m, char *name) { if (strcmp(name, "__name__") == 0) { *************** *** 120,125 **** static PyObject * ! meth_repr(m) ! PyCFunctionObject *m; { char buf[200]; --- 112,116 ---- static PyObject * ! meth_repr(PyCFunctionObject *m) { char buf[200]; *************** *** 135,140 **** static int ! meth_compare(a, b) ! PyCFunctionObject *a, *b; { if (a->m_self != b->m_self) --- 126,130 ---- static int ! meth_compare(PyCFunctionObject *a, PyCFunctionObject *b) { if (a->m_self != b->m_self) *************** *** 149,154 **** static long ! meth_hash(a) ! PyCFunctionObject *a; { long x,y; --- 139,143 ---- static long ! meth_hash(PyCFunctionObject *a) { long x,y; *************** *** 190,195 **** static PyObject * ! listmethodchain(chain) ! PyMethodChain *chain; { PyMethodChain *c; --- 179,183 ---- static PyObject * ! listmethodchain(PyMethodChain *chain) { PyMethodChain *c; *************** *** 224,231 **** PyObject * ! Py_FindMethodInChain(chain, self, name) ! PyMethodChain *chain; ! PyObject *self; ! char *name; { if (name[0] == '_' && name[1] == '_') { --- 212,216 ---- PyObject * ! Py_FindMethodInChain(PyMethodChain *chain, PyObject *self, char *name) { if (name[0] == '_' && name[1] == '_') { *************** *** 254,261 **** PyObject * ! Py_FindMethod(methods, self, name) ! PyMethodDef *methods; ! PyObject *self; ! char *name; { PyMethodChain chain; --- 239,243 ---- PyObject * ! Py_FindMethod(PyMethodDef *methods, PyObject *self, char *name) { PyMethodChain chain; *************** *** 268,272 **** void ! PyCFunction_Fini() { while (free_list) { --- 250,254 ---- void ! PyCFunction_Fini(void) { while (free_list) { Index: moduleobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/moduleobject.c,v retrieving revision 2.27 retrieving revision 2.28 diff -C2 -r2.27 -r2.28 *** moduleobject.c 2000/06/30 23:58:05 2.27 --- moduleobject.c 2000/07/09 06:03:25 2.28 *************** *** 19,24 **** PyObject * ! PyModule_New(name) ! char *name; { PyModuleObject *m; --- 19,23 ---- PyObject * ! PyModule_New(char *name) { PyModuleObject *m; *************** *** 45,50 **** PyObject * ! PyModule_GetDict(m) ! PyObject *m; { if (!PyModule_Check(m)) { --- 44,48 ---- PyObject * ! PyModule_GetDict(PyObject *m) { if (!PyModule_Check(m)) { *************** *** 56,61 **** char * ! PyModule_GetName(m) ! PyObject *m; { PyObject *nameobj; --- 54,58 ---- char * ! PyModule_GetName(PyObject *m) { PyObject *nameobj; *************** *** 74,79 **** char * ! PyModule_GetFilename(m) ! PyObject *m; { PyObject *fileobj; --- 71,75 ---- char * ! PyModule_GetFilename(PyObject *m) { PyObject *fileobj; *************** *** 92,97 **** void ! _PyModule_Clear(m) ! PyObject *m; { /* To make the execution order of destructors for global --- 88,92 ---- void ! _PyModule_Clear(PyObject *m) { /* To make the execution order of destructors for global *************** *** 143,148 **** static void ! module_dealloc(m) ! PyModuleObject *m; { if (m->md_dict != NULL) { --- 138,142 ---- static void ! module_dealloc(PyModuleObject *m) { if (m->md_dict != NULL) { *************** *** 154,159 **** static PyObject * ! module_repr(m) ! PyModuleObject *m; { char buf[400]; --- 148,152 ---- static PyObject * ! module_repr(PyModuleObject *m) { char buf[400]; *************** *** 177,183 **** static PyObject * ! module_getattr(m, name) ! PyModuleObject *m; ! char *name; { PyObject *res; --- 170,174 ---- static PyObject * ! module_getattr(PyModuleObject *m, char *name) { PyObject *res; *************** *** 195,202 **** static int ! module_setattr(m, name, v) ! PyModuleObject *m; ! char *name; ! PyObject *v; { if (name[0] == '_' && strcmp(name, "__dict__") == 0) { --- 186,190 ---- static int ! module_setattr(PyModuleObject *m, char *name, PyObject *v) { if (name[0] == '_' && strcmp(name, "__dict__") == 0) { From python-dev@python.org Sun Jul 9 07:21:30 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 23:21:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects rangeobject.c,2.15,2.16 sliceobject.c,2.4,2.5 typeobject.c,2.14,2.15 Message-ID: <200007090621.XAA05940@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv5928 Modified Files: rangeobject.c sliceobject.c typeobject.c Log Message: ANSI-fication of the sources. Index: rangeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/rangeobject.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** rangeobject.c 2000/06/30 23:58:05 2.15 --- rangeobject.c 2000/07/09 06:21:27 2.16 *************** *** 23,29 **** PyObject * ! PyRange_New(start, len, step, reps) ! long start, len, step; ! int reps; { rangeobject *obj = PyObject_NEW(rangeobject, &PyRange_Type); --- 23,27 ---- PyObject * ! PyRange_New(long start, long len, long step, int reps) { rangeobject *obj = PyObject_NEW(rangeobject, &PyRange_Type); *************** *** 38,43 **** static void ! range_dealloc(r) ! rangeobject *r; { PyObject_DEL(r); --- 36,40 ---- static void ! range_dealloc(rangeobject *r) { PyObject_DEL(r); *************** *** 45,51 **** static PyObject * ! range_item(r, i) ! rangeobject *r; ! int i; { if (i < 0 || i >= r->len * r->reps) { --- 42,46 ---- static PyObject * ! range_item(rangeobject *r, int i) { if (i < 0 || i >= r->len * r->reps) { *************** *** 59,64 **** static int ! range_length(r) ! rangeobject *r; { return r->len * r->reps; --- 54,58 ---- static int ! range_length(rangeobject *r) { return r->len * r->reps; *************** *** 66,73 **** static int ! range_print(r, fp, flags) ! rangeobject *r; ! FILE *fp; ! int flags; { int i, j; --- 60,64 ---- static int ! range_print(rangeobject *r, FILE *fp, int flags) { int i, j; *************** *** 89,94 **** static PyObject * ! range_repr(r) ! rangeobject *r; { char buf[80]; --- 80,84 ---- static PyObject * ! range_repr(rangeobject *r) { char buf[80]; *************** *** 102,108 **** static PyObject * ! range_concat(r, obj) ! rangeobject *r; ! PyObject *obj; { PyErr_SetString(PyExc_TypeError, "cannot concatenate xrange objects"); --- 92,96 ---- static PyObject * ! range_concat(rangeobject *r, PyObject *obj) { PyErr_SetString(PyExc_TypeError, "cannot concatenate xrange objects"); *************** *** 111,117 **** static PyObject * ! range_repeat(r, n) ! rangeobject *r; ! int n; { if (n < 0) --- 99,103 ---- static PyObject * ! range_repeat(rangeobject *r, int n) { if (n < 0) *************** *** 132,137 **** static int ! range_compare(r1, r2) ! rangeobject *r1, *r2; { if (r1->start != r2->start) --- 118,122 ---- static int ! range_compare(rangeobject *r1, rangeobject *r2) { if (r1->start != r2->start) *************** *** 149,155 **** static PyObject * ! range_slice(r, low, high) ! rangeobject *r; ! int low, high; { if (r->reps != 1) { --- 134,138 ---- static PyObject * ! range_slice(rangeobject *r, int low, int high) { if (r->reps != 1) { *************** *** 182,188 **** static PyObject * ! range_tolist(self, args) ! rangeobject *self; ! PyObject *args; { PyObject *thelist; --- 165,169 ---- static PyObject * ! range_tolist(rangeobject *self, PyObject *args) { PyObject *thelist; *************** *** 205,211 **** static PyObject * ! range_getattr(r, name) ! rangeobject *r; ! char *name; { static PyMethodDef range_methods[] = { --- 186,190 ---- static PyObject * ! range_getattr(rangeobject *r, char *name) { static PyMethodDef range_methods[] = { *************** *** 218,224 **** static int ! range_contains(r, obj) ! rangeobject * r; ! PyObject * obj; { long num = PyInt_AsLong(obj); --- 197,201 ---- static int ! range_contains(rangeobject *r, PyObject *obj) { long num = PyInt_AsLong(obj); Index: sliceobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/sliceobject.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** sliceobject.c 2000/05/03 23:44:35 2.4 --- sliceobject.c 2000/07/09 06:21:27 2.5 *************** *** 17,22 **** static PyObject * ! ellipsis_repr(op) ! PyObject *op; { return PyString_FromString("Ellipsis"); --- 17,21 ---- static PyObject * ! ellipsis_repr(PyObject *op) { return PyString_FromString("Ellipsis"); *************** *** 53,60 **** PyObject * ! PySlice_New(start, stop, step) ! PyObject *start; ! PyObject *stop; ! PyObject *step; { PySliceObject *obj = PyObject_NEW(PySliceObject, &PySlice_Type); --- 52,56 ---- PyObject * ! PySlice_New(PyObject *start, PyObject *stop, PyObject *step) { PySliceObject *obj = PyObject_NEW(PySliceObject, &PySlice_Type); *************** *** 75,84 **** int ! PySlice_GetIndices(r, length, start, stop, step) ! PySliceObject *r; ! int length; ! int *start; ! int *stop; ! int *step; { if (r->step == Py_None) { --- 71,76 ---- int ! PySlice_GetIndices(PySliceObject *r, int length, ! int *start, int *stop, int *step) { if (r->step == Py_None) { *************** *** 109,114 **** static void ! slice_dealloc(r) ! PySliceObject *r; { Py_DECREF(r->step); --- 101,105 ---- static void ! slice_dealloc(PySliceObject *r) { Py_DECREF(r->step); *************** *** 119,124 **** static PyObject * ! slice_repr(r) ! PySliceObject *r; { PyObject *s, *comma; --- 110,114 ---- static PyObject * ! slice_repr(PySliceObject *r) { PyObject *s, *comma; *************** *** 137,143 **** ! static PyObject *slice_getattr(self, name) ! PySliceObject *self; ! char *name; { PyObject *ret; --- 127,131 ---- ! static PyObject *slice_getattr(PySliceObject *self, char *name) { PyObject *ret; Index: typeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** typeobject.c 2000/06/30 23:58:05 2.14 --- typeobject.c 2000/07/09 06:21:27 2.15 *************** *** 16,22 **** static PyObject * ! type_getattr(t, name) ! PyTypeObject *t; ! char *name; { if (strcmp(name, "__name__") == 0) --- 16,20 ---- static PyObject * ! type_getattr(PyTypeObject *t, char *name) { if (strcmp(name, "__name__") == 0) *************** *** 36,41 **** static PyObject * ! type_repr(v) ! PyTypeObject *v; { char buf[100]; --- 34,38 ---- static PyObject * ! type_repr(PyTypeObject *v) { char buf[100]; From python-dev@python.org Sun Jul 9 08:04:38 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 9 Jul 2000 00:04:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.74,2.75 tupleobject.c,2.42,2.43 xxobject.c,2.17,2.18 Message-ID: <200007090704.AAA14053@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv14044 Modified Files: stringobject.c tupleobject.c xxobject.c Log Message: ANSI-fication of the sources. Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.74 retrieving revision 2.75 diff -C2 -r2.74 -r2.75 *** stringobject.c 2000/07/06 11:29:01 2.74 --- stringobject.c 2000/07/09 07:04:36 2.75 *************** *** 49,55 **** */ PyObject * ! PyString_FromStringAndSize(str, size) ! const char *str; ! int size; { register PyStringObject *op; --- 49,53 ---- */ PyObject * ! PyString_FromStringAndSize(const char *str, int size) { register PyStringObject *op; *************** *** 101,106 **** PyObject * ! PyString_FromString(str) ! const char *str; { register size_t size = strlen(str); --- 99,103 ---- PyObject * ! PyString_FromString(const char *str) { register size_t size = strlen(str); *************** *** 248,253 **** static void ! string_dealloc(op) ! PyObject *op; { PyObject_DEL(op); --- 245,249 ---- static void ! string_dealloc(PyObject *op) { PyObject_DEL(op); *************** *** 255,260 **** int ! PyString_Size(op) ! register PyObject *op; { if (!PyString_Check(op)) { --- 251,255 ---- int ! PyString_Size(register PyObject *op) { if (!PyString_Check(op)) { *************** *** 266,271 **** /*const*/ char * ! PyString_AsString(op) ! register PyObject *op; { if (!PyString_Check(op)) { --- 261,265 ---- /*const*/ char * ! PyString_AsString(register PyObject *op) { if (!PyString_Check(op)) { *************** *** 279,286 **** static int ! string_print(op, fp, flags) ! PyStringObject *op; ! FILE *fp; ! int flags; { int i; --- 273,277 ---- static int ! string_print(PyStringObject *op, FILE *fp, int flags) { int i; *************** *** 313,318 **** static PyObject * ! string_repr(op) ! register PyStringObject *op; { size_t newsize = 2 + 4 * op->ob_size * sizeof(char); --- 304,308 ---- static PyObject * ! string_repr(register PyStringObject *op) { size_t newsize = 2 + 4 * op->ob_size * sizeof(char); *************** *** 360,365 **** static int ! string_length(a) ! PyStringObject *a; { return a->ob_size; --- 350,354 ---- static int ! string_length(PyStringObject *a) { return a->ob_size; *************** *** 367,373 **** static PyObject * ! string_concat(a, bb) ! register PyStringObject *a; ! register PyObject *bb; { register unsigned int size; --- 356,360 ---- static PyObject * ! string_concat(register PyStringObject *a, register PyObject *bb) { register unsigned int size; *************** *** 412,418 **** static PyObject * ! string_repeat(a, n) ! register PyStringObject *a; ! register int n; { register int i; --- 399,403 ---- static PyObject * ! string_repeat(register PyStringObject *a, register int n) { register int i; *************** *** 447,453 **** static PyObject * ! string_slice(a, i, j) ! register PyStringObject *a; ! register int i, j; /* May be negative! */ { if (i < 0) --- 432,437 ---- static PyObject * ! string_slice(register PyStringObject *a, register int i, register int j) ! /* j -- may be negative! */ { if (i < 0) *************** *** 467,472 **** static int ! string_contains(a, el) ! PyObject *a, *el; { register char *s, *end; --- 451,455 ---- static int ! string_contains(PyObject *a, PyObject *el) { register char *s, *end; *************** *** 490,496 **** static PyObject * ! string_item(a, i) ! PyStringObject *a; ! register int i; { int c; --- 473,477 ---- static PyObject * ! string_item(PyStringObject *a, register int i) { int c; *************** *** 518,523 **** static int ! string_compare(a, b) ! PyStringObject *a, *b; { int len_a = a->ob_size, len_b = b->ob_size; --- 499,503 ---- static int ! string_compare(PyStringObject *a, PyStringObject *b) { int len_a = a->ob_size, len_b = b->ob_size; *************** *** 535,540 **** static long ! string_hash(a) ! PyStringObject *a; { register int len; --- 515,519 ---- static long ! string_hash(PyStringObject *a) { register int len; *************** *** 566,573 **** static int ! string_buffer_getreadbuf(self, index, ptr) ! PyStringObject *self; ! int index; ! const void **ptr; { if ( index != 0 ) { --- 545,549 ---- static int ! string_buffer_getreadbuf(PyStringObject *self, int index, const void **ptr) { if ( index != 0 ) { *************** *** 581,588 **** static int ! string_buffer_getwritebuf(self, index, ptr) ! PyStringObject *self; ! int index; ! const void **ptr; { PyErr_SetString(PyExc_TypeError, --- 557,561 ---- static int ! string_buffer_getwritebuf(PyStringObject *self, int index, const void **ptr) { PyErr_SetString(PyExc_TypeError, *************** *** 592,598 **** static int ! string_buffer_getsegcount(self, lenp) ! PyStringObject *self; ! int *lenp; { if ( lenp ) --- 565,569 ---- static int ! string_buffer_getsegcount(PyStringObject *self, int *lenp) { if ( lenp ) *************** *** 602,609 **** static int ! string_buffer_getcharbuf(self, index, ptr) ! PyStringObject *self; ! int index; ! const char **ptr; { if ( index != 0 ) { --- 573,577 ---- static int ! string_buffer_getcharbuf(PyStringObject *self, int index, const char **ptr) { if ( index != 0 ) { *************** *** 642,649 **** static PyObject * ! split_whitespace(s, len, maxsplit) ! char *s; ! int len; ! int maxsplit; { int i, j, err; --- 610,614 ---- static PyObject * ! split_whitespace(char *s, int len, int maxsplit) { int i, j, err; *************** *** 700,706 **** static PyObject * ! string_split(self, args) ! PyStringObject *self; ! PyObject *args; { int len = PyString_GET_SIZE(self), n, i, j, err; --- 665,669 ---- static PyObject * ! string_split(PyStringObject *self, PyObject *args) { int len = PyString_GET_SIZE(self), n, i, j, err; *************** *** 772,778 **** static PyObject * ! string_join(self, args) ! PyStringObject *self; ! PyObject *args; { char *sep = PyString_AS_STRING(self); --- 735,739 ---- static PyObject * ! string_join(PyStringObject *self, PyObject *args) { char *sep = PyString_AS_STRING(self); *************** *** 897,904 **** static long ! string_find_internal(self, args, dir) ! PyStringObject *self; ! PyObject *args; ! int dir; { const char *s = PyString_AS_STRING(self), *sub; --- 858,862 ---- static long ! string_find_internal(PyStringObject *self, PyObject *args, int dir) { const char *s = PyString_AS_STRING(self), *sub; *************** *** 962,968 **** static PyObject * ! string_find(self, args) ! PyStringObject *self; ! PyObject *args; { long result = string_find_internal(self, args, +1); --- 920,924 ---- static PyObject * ! string_find(PyStringObject *self, PyObject *args) { long result = string_find_internal(self, args, +1); *************** *** 979,985 **** static PyObject * ! string_index(self, args) ! PyStringObject *self; ! PyObject *args; { long result = string_find_internal(self, args, +1); --- 935,939 ---- static PyObject * ! string_index(PyStringObject *self, PyObject *args) { long result = string_find_internal(self, args, +1); *************** *** 1005,1011 **** static PyObject * ! string_rfind(self, args) ! PyStringObject *self; ! PyObject *args; { long result = string_find_internal(self, args, -1); --- 959,963 ---- static PyObject * ! string_rfind(PyStringObject *self, PyObject *args) { long result = string_find_internal(self, args, -1); *************** *** 1022,1028 **** static PyObject * ! string_rindex(self, args) ! PyStringObject *self; ! PyObject *args; { long result = string_find_internal(self, args, -1); --- 974,978 ---- static PyObject * ! string_rindex(PyStringObject *self, PyObject *args) { long result = string_find_internal(self, args, -1); *************** *** 1039,1046 **** static PyObject * ! do_strip(self, args, striptype) ! PyStringObject *self; ! PyObject *args; ! int striptype; { char *s = PyString_AS_STRING(self); --- 989,993 ---- static PyObject * ! do_strip(PyStringObject *self, PyObject *args, int striptype) { char *s = PyString_AS_STRING(self); *************** *** 1081,1087 **** static PyObject * ! string_strip(self, args) ! PyStringObject *self; ! PyObject *args; { return do_strip(self, args, BOTHSTRIP); --- 1028,1032 ---- static PyObject * ! string_strip(PyStringObject *self, PyObject *args) { return do_strip(self, args, BOTHSTRIP); *************** *** 1095,1101 **** static PyObject * ! string_lstrip(self, args) ! PyStringObject *self; ! PyObject *args; { return do_strip(self, args, LEFTSTRIP); --- 1040,1044 ---- static PyObject * ! string_lstrip(PyStringObject *self, PyObject *args) { return do_strip(self, args, LEFTSTRIP); *************** *** 1109,1115 **** static PyObject * ! string_rstrip(self, args) ! PyStringObject *self; ! PyObject *args; { return do_strip(self, args, RIGHTSTRIP); --- 1052,1056 ---- static PyObject * ! string_rstrip(PyStringObject *self, PyObject *args) { return do_strip(self, args, RIGHTSTRIP); *************** *** 1123,1129 **** static PyObject * ! string_lower(self, args) ! PyStringObject *self; ! PyObject *args; { char *s = PyString_AS_STRING(self), *s_new; --- 1064,1068 ---- static PyObject * ! string_lower(PyStringObject *self, PyObject *args) { char *s = PyString_AS_STRING(self), *s_new; *************** *** 1155,1161 **** static PyObject * ! string_upper(self, args) ! PyStringObject *self; ! PyObject *args; { char *s = PyString_AS_STRING(self), *s_new; --- 1094,1098 ---- static PyObject * ! string_upper(PyStringObject *self, PyObject *args) { char *s = PyString_AS_STRING(self), *s_new; *************** *** 1225,1231 **** static PyObject * ! string_capitalize(self, args) ! PyStringObject *self; ! PyObject *args; { char *s = PyString_AS_STRING(self), *s_new; --- 1162,1166 ---- static PyObject * ! string_capitalize(PyStringObject *self, PyObject *args) { char *s = PyString_AS_STRING(self), *s_new; *************** *** 1267,1273 **** static PyObject * ! string_count(self, args) ! PyStringObject *self; ! PyObject *args; { const char *s = PyString_AS_STRING(self), *sub; --- 1202,1206 ---- static PyObject * ! string_count(PyStringObject *self, PyObject *args) { const char *s = PyString_AS_STRING(self), *sub; *************** *** 1325,1331 **** static PyObject * ! string_swapcase(self, args) ! PyStringObject *self; ! PyObject *args; { char *s = PyString_AS_STRING(self), *s_new; --- 1258,1262 ---- static PyObject * ! string_swapcase(PyStringObject *self, PyObject *args) { char *s = PyString_AS_STRING(self), *s_new; *************** *** 1364,1370 **** static PyObject * ! string_translate(self, args) ! PyStringObject *self; ! PyObject *args; { register char *input, *output; --- 1295,1299 ---- static PyObject * ! string_translate(PyStringObject *self, PyObject *args) { register char *input, *output; *************** *** 1484,1492 **** */ static int ! mymemfind(mem, len, pat, pat_len) ! char *mem; ! int len; ! char *pat; ! int pat_len; { register int ii; --- 1413,1417 ---- */ static int ! mymemfind(char *mem, int len, char *pat, int pat_len) { register int ii; *************** *** 1511,1519 **** */ static int ! mymemcnt(mem, len, pat, pat_len) ! char *mem; ! int len; ! char *pat; ! int pat_len; { register int offset = 0; --- 1436,1440 ---- */ static int ! mymemcnt(char *mem, int len, char *pat, int pat_len) { register int offset = 0; *************** *** 1551,1564 **** */ static char * ! mymemreplace(str, len, pat, pat_len, sub, sub_len, count, out_len) ! char *str; ! int len; /* input string */ ! char *pat; ! int pat_len; /* pattern string to find */ ! char *sub; ! int sub_len; /* substitution string */ ! int count; /* number of replacements */ ! int *out_len; ! { char *out_s; --- 1472,1480 ---- */ static char * ! mymemreplace(char *str, int len, /* input string */ ! char *pat, int pat_len, /* pattern string to find */ ! char *sub, int sub_len, /* substitution string */ ! int count, /* number of replacements */ ! int *out_len) { char *out_s; *************** *** 1623,1629 **** static PyObject * ! string_replace(self, args) ! PyStringObject *self; ! PyObject *args; { const char *str = PyString_AS_STRING(self), *sub, *repl; --- 1539,1543 ---- static PyObject * ! string_replace(PyStringObject *self, PyObject *args) { const char *str = PyString_AS_STRING(self), *sub, *repl; *************** *** 1688,1694 **** static PyObject * ! string_startswith(self, args) ! PyStringObject *self; ! PyObject *args; { const char* str = PyString_AS_STRING(self); --- 1602,1606 ---- static PyObject * ! string_startswith(PyStringObject *self, PyObject *args) { const char* str = PyString_AS_STRING(self); *************** *** 1742,1748 **** static PyObject * ! string_endswith(self, args) ! PyStringObject *self; ! PyObject *args; { const char* str = PyString_AS_STRING(self); --- 1654,1658 ---- static PyObject * ! string_endswith(PyStringObject *self, PyObject *args) { const char* str = PyString_AS_STRING(self); *************** *** 2014,2018 **** string_isspace(PyStringObject *self, PyObject *args) { ! register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; --- 1924,1929 ---- string_isspace(PyStringObject *self, PyObject *args) { ! register const unsigned char *p ! = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; *************** *** 2047,2051 **** string_isalpha(PyUnicodeObject *self, PyObject *args) { ! register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; --- 1958,1963 ---- string_isalpha(PyUnicodeObject *self, PyObject *args) { ! register const unsigned char *p ! = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; *************** *** 2080,2084 **** string_isalnum(PyUnicodeObject *self, PyObject *args) { ! register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; --- 1992,1997 ---- string_isalnum(PyUnicodeObject *self, PyObject *args) { ! register const unsigned char *p ! = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; *************** *** 2113,2117 **** string_isdigit(PyStringObject *self, PyObject *args) { ! register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; --- 2026,2031 ---- string_isdigit(PyStringObject *self, PyObject *args) { ! register const unsigned char *p ! = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; *************** *** 2146,2150 **** string_islower(PyStringObject *self, PyObject *args) { ! register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; int cased; --- 2060,2065 ---- string_islower(PyStringObject *self, PyObject *args) { ! register const unsigned char *p ! = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; int cased; *************** *** 2182,2186 **** string_isupper(PyStringObject *self, PyObject *args) { ! register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; int cased; --- 2097,2102 ---- string_isupper(PyStringObject *self, PyObject *args) { ! register const unsigned char *p ! = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; int cased; *************** *** 2219,2223 **** string_istitle(PyStringObject *self, PyObject *args) { ! register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; int cased, previous_is_cased; --- 2135,2140 ---- string_istitle(PyStringObject *self, PyObject *args) { ! register const unsigned char *p ! = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; int cased, previous_is_cased; *************** *** 2376,2382 **** static PyObject * ! string_getattr(s, name) ! PyStringObject *s; ! char *name; { return Py_FindMethod(string_methods, (PyObject*)s, name); --- 2293,2297 ---- static PyObject * ! string_getattr(PyStringObject *s, char *name) { return Py_FindMethod(string_methods, (PyObject*)s, name); *************** *** 2410,2416 **** void ! PyString_Concat(pv, w) ! register PyObject **pv; ! register PyObject *w; { register PyObject *v; --- 2325,2329 ---- void ! PyString_Concat(register PyObject **pv, register PyObject *w) { register PyObject *v; *************** *** 2428,2434 **** void ! PyString_ConcatAndDel(pv, w) ! register PyObject **pv; ! register PyObject *w; { PyString_Concat(pv, w); --- 2341,2345 ---- void ! PyString_ConcatAndDel(register PyObject **pv, register PyObject *w) { PyString_Concat(pv, w); *************** *** 2445,2451 **** int ! _PyString_Resize(pv, newsize) ! PyObject **pv; ! int newsize; { register PyObject *v; --- 2356,2360 ---- int ! _PyString_Resize(PyObject **pv, int newsize) { register PyObject *v; *************** *** 2481,2488 **** static PyObject * ! getnextarg(args, arglen, p_argidx) ! PyObject *args; ! int arglen; ! int *p_argidx; { int argidx = *p_argidx; --- 2390,2394 ---- static PyObject * ! getnextarg(PyObject *args, int arglen, int *p_argidx) { int argidx = *p_argidx; *************** *** 2506,2516 **** static int ! formatfloat(buf, buflen, flags, prec, type, v) ! char *buf; ! size_t buflen; ! int flags; ! int prec; ! int type; ! PyObject *v; { /* fmt = '%#.' + `prec` + `type` --- 2412,2417 ---- static int ! formatfloat(char *buf, size_t buflen, int flags, ! int prec, int type, PyObject *v) { /* fmt = '%#.' + `prec` + `type` *************** *** 2542,2552 **** static int ! formatint(buf, buflen, flags, prec, type, v) ! char *buf; ! size_t buflen; ! int flags; ! int prec; ! int type; ! PyObject *v; { /* fmt = '%#.' + `prec` + 'l' + `type` --- 2443,2448 ---- static int ! formatint(char *buf, size_t buflen, int flags, ! int prec, int type, PyObject *v) { /* fmt = '%#.' + `prec` + 'l' + `type` *************** *** 2571,2578 **** static int ! formatchar(buf, buflen, v) ! char *buf; ! size_t buflen; ! PyObject *v; { /* presume that the buffer is at least 2 characters long */ --- 2467,2471 ---- static int ! formatchar(char *buf, size_t buflen, PyObject *v) { /* presume that the buffer is at least 2 characters long */ *************** *** 2601,2607 **** PyObject * ! PyString_Format(format, args) ! PyObject *format; ! PyObject *args; { char *fmt, *res; --- 2494,2498 ---- PyObject * ! PyString_Format(PyObject *format, PyObject *args) { char *fmt, *res; *************** *** 3002,3007 **** void ! PyString_InternInPlace(p) ! PyObject **p; { register PyStringObject *s = (PyStringObject *)(*p); --- 2893,2897 ---- void ! PyString_InternInPlace(PyObject **p) { register PyStringObject *s = (PyStringObject *)(*p); *************** *** 3038,3043 **** PyObject * ! PyString_InternFromString(cp) ! const char *cp; { PyObject *s = PyString_FromString(cp); --- 2928,2932 ---- PyObject * ! PyString_InternFromString(const char *cp) { PyObject *s = PyString_FromString(cp); *************** *** 3051,3055 **** void ! PyString_Fini() { int i; --- 2940,2944 ---- void ! PyString_Fini(void) { int i; Index: tupleobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/tupleobject.c,v retrieving revision 2.42 retrieving revision 2.43 diff -C2 -r2.42 -r2.43 *** tupleobject.c 2000/07/01 01:00:38 2.42 --- tupleobject.c 2000/07/09 07:04:36 2.43 *************** *** 34,39 **** PyObject * ! PyTuple_New(size) ! register int size; { register int i; --- 34,38 ---- PyObject * ! PyTuple_New(register int size) { register int i; *************** *** 100,105 **** int ! PyTuple_Size(op) ! register PyObject *op; { if (!PyTuple_Check(op)) { --- 99,103 ---- int ! PyTuple_Size(register PyObject *op) { if (!PyTuple_Check(op)) { *************** *** 112,118 **** PyObject * ! PyTuple_GetItem(op, i) ! register PyObject *op; ! register int i; { if (!PyTuple_Check(op)) { --- 110,114 ---- PyObject * ! PyTuple_GetItem(register PyObject *op, register int i) { if (!PyTuple_Check(op)) { *************** *** 128,135 **** int ! PyTuple_SetItem(op, i, newitem) ! register PyObject *op; ! register int i; ! PyObject *newitem; { register PyObject *olditem; --- 124,128 ---- int ! PyTuple_SetItem(register PyObject *op, register int i, PyObject *newitem) { register PyObject *olditem; *************** *** 156,161 **** static void ! tupledealloc(op) ! register PyTupleObject *op; { register int i; --- 149,153 ---- static void ! tupledealloc(register PyTupleObject *op) { register int i; *************** *** 183,190 **** static int ! tupleprint(op, fp, flags) ! PyTupleObject *op; ! FILE *fp; ! int flags; { int i; --- 175,179 ---- static int ! tupleprint(PyTupleObject *op, FILE *fp, int flags) { int i; *************** *** 203,208 **** static PyObject * ! tuplerepr(v) ! PyTupleObject *v; { PyObject *s, *comma; --- 192,196 ---- static PyObject * ! tuplerepr(PyTupleObject *v) { PyObject *s, *comma; *************** *** 223,228 **** static int ! tuplecompare(v, w) ! register PyTupleObject *v, *w; { register int len = --- 211,215 ---- static int ! tuplecompare(register PyTupleObject *v, register PyTupleObject *w) { register int len = *************** *** 238,243 **** static long ! tuplehash(v) ! PyTupleObject *v; { register long x, y; --- 225,229 ---- static long ! tuplehash(PyTupleObject *v) { register long x, y; *************** *** 259,264 **** static int ! tuplelength(a) ! PyTupleObject *a; { return a->ob_size; --- 245,249 ---- static int ! tuplelength(PyTupleObject *a) { return a->ob_size; *************** *** 266,272 **** static int ! tuplecontains(a, el) ! PyTupleObject *a; ! PyObject *el; { int i, cmp; --- 251,255 ---- static int ! tuplecontains(PyTupleObject *a, PyObject *el) { int i, cmp; *************** *** 283,289 **** static PyObject * ! tupleitem(a, i) ! register PyTupleObject *a; ! register int i; { if (i < 0 || i >= a->ob_size) { --- 266,270 ---- static PyObject * ! tupleitem(register PyTupleObject *a, register int i) { if (i < 0 || i >= a->ob_size) { *************** *** 296,302 **** static PyObject * ! tupleslice(a, ilow, ihigh) ! register PyTupleObject *a; ! register int ilow, ihigh; { register PyTupleObject *np; --- 277,281 ---- static PyObject * ! tupleslice(register PyTupleObject *a, register int ilow, register int ihigh) { register PyTupleObject *np; *************** *** 325,331 **** PyObject * ! PyTuple_GetSlice(op, i, j) ! PyObject *op; ! int i, j; { if (op == NULL || !PyTuple_Check(op)) { --- 304,308 ---- PyObject * ! PyTuple_GetSlice(PyObject *op, int i, int j) { if (op == NULL || !PyTuple_Check(op)) { *************** *** 337,343 **** static PyObject * ! tupleconcat(a, bb) ! register PyTupleObject *a; ! register PyObject *bb; { register int size; --- 314,318 ---- static PyObject * ! tupleconcat(register PyTupleObject *a, register PyObject *bb) { register int size; *************** *** 371,377 **** static PyObject * ! tuplerepeat(a, n) ! PyTupleObject *a; ! int n; { int i, j; --- 346,350 ---- static PyObject * ! tuplerepeat(PyTupleObject *a, int n) { int i, j; *************** *** 468,475 **** int ! _PyTuple_Resize(pv, newsize, last_is_sticky) ! PyObject **pv; ! int newsize; ! int last_is_sticky; { register PyTupleObject *v; --- 441,445 ---- int ! _PyTuple_Resize(PyObject **pv, int newsize, int last_is_sticky) { register PyTupleObject *v; *************** *** 583,587 **** void ! PyTuple_Fini() { #if MAXSAVESIZE > 0 --- 553,557 ---- void ! PyTuple_Fini(void) { #if MAXSAVESIZE > 0 Index: xxobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/xxobject.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** xxobject.c 2000/06/30 23:58:05 2.17 --- xxobject.c 2000/07/09 07:04:36 2.18 *************** *** 33,38 **** static xxobject * ! newxxobject(arg) ! PyObject *arg; { xxobject *xp; --- 33,37 ---- static xxobject * ! newxxobject(PyObject *arg) { xxobject *xp; *************** *** 47,52 **** static void ! xx_dealloc(xp) ! xxobject *xp; { Py_XDECREF(xp->x_attr); --- 46,50 ---- static void ! xx_dealloc(xxobject *xp) { Py_XDECREF(xp->x_attr); *************** *** 55,63 **** static PyObject * ! xx_demo(self, args) ! xxobject *self; ! PyObject *args; { ! if (!PyArg_NoArgs(args)) return NULL; Py_INCREF(Py_None); --- 53,59 ---- static PyObject * ! xx_demo(xxobject *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":demo")) return NULL; Py_INCREF(Py_None); *************** *** 66,77 **** static PyMethodDef xx_methods[] = { ! {"demo", (PyCFunction)xx_demo}, {NULL, NULL} /* sentinel */ }; static PyObject * ! xx_getattr(xp, name) ! xxobject *xp; ! char *name; { if (xp->x_attr != NULL) { --- 62,71 ---- static PyMethodDef xx_methods[] = { ! {"demo", (PyCFunction)xx_demo, METH_VARARGS}, {NULL, NULL} /* sentinel */ }; static PyObject * ! xx_getattr(xxobject *xp, char *name) { if (xp->x_attr != NULL) { *************** *** 86,93 **** static int ! xx_setattr(xp, name, v) ! xxobject *xp; ! char *name; ! PyObject *v; { if (xp->x_attr == NULL) { --- 80,84 ---- static int ! xx_setattr(xxobject *xp, char *name, PyObject *v) { if (xp->x_attr == NULL) { *************** *** 100,104 **** if (rv < 0) PyErr_SetString(PyExc_AttributeError, ! "delete non-existing xx attribute"); return rv; } --- 91,95 ---- if (rv < 0) PyErr_SetString(PyExc_AttributeError, ! "delete non-existing xx attribute"); return rv; } From python-dev@python.org Sun Jul 9 09:02:24 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 9 Jul 2000 01:02:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.75,2.76 Message-ID: <200007090802.BAA23405@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv16442/python/dist/src/objects Modified Files: stringobject.c Log Message: Somebody started playing with const, so of course the outcome was cascades of warnings about mismatching const decls. Overall, I think const creates lots of headaches and solves almost nothing. Added enough consts to shut up the warnings, but this did require casting away const in one spot too (another usual outcome of starting down this path): the function mymemreplace can't return const char*, but sometimes wants to return its first argument as-is, which latter must be declared const char* in order to avoid const warnings at mymemreplace's call sites. So, in the case the function wants to return the first arg, that arg's declared constness must be subverted. Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.75 retrieving revision 2.76 diff -C2 -r2.75 -r2.76 *** stringobject.c 2000/07/09 07:04:36 2.75 --- stringobject.c 2000/07/09 08:02:21 2.76 *************** *** 610,614 **** static PyObject * ! split_whitespace(char *s, int len, int maxsplit) { int i, j, err; --- 610,614 ---- static PyObject * ! split_whitespace(const char *s, int len, int maxsplit) { int i, j, err; *************** *** 1413,1417 **** */ static int ! mymemfind(char *mem, int len, char *pat, int pat_len) { register int ii; --- 1413,1417 ---- */ static int ! mymemfind(const char *mem, int len, const char *pat, int pat_len) { register int ii; *************** *** 1436,1440 **** */ static int ! mymemcnt(char *mem, int len, char *pat, int pat_len) { register int offset = 0; --- 1436,1440 ---- */ static int ! mymemcnt(const char *mem, int len, const char *pat, int pat_len) { register int offset = 0; *************** *** 1472,1479 **** */ static char * ! mymemreplace(char *str, int len, /* input string */ ! char *pat, int pat_len, /* pattern string to find */ ! char *sub, int sub_len, /* substitution string */ ! int count, /* number of replacements */ int *out_len) { --- 1472,1479 ---- */ static char * ! mymemreplace(const char *str, int len, /* input string */ ! const char *pat, int pat_len, /* pattern string to find */ ! const char *sub, int sub_len, /* substitution string */ ! int count, /* number of replacements */ int *out_len) { *************** *** 1527,1531 **** return_same: *out_len = -1; ! return str; } --- 1527,1531 ---- return_same: *out_len = -1; ! return (char*)str; /* have to cast away constness here */ } From python-dev@python.org Sun Jul 9 12:35:39 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 04:35:39 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC w9xpopen.c,NONE,1.1 Message-ID: <200007091135.EAA05552@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv5434/PC Added Files: w9xpopen.c Log Message: - win95/98 helper for new os.popen code this should be built as a console application (link with USER32.LIB), and installed in the same directory as the Python DLL. --- NEW FILE --- /* * w9xpopen.c * * Serves as an intermediate stub Win32 console application to * avoid a hanging pipe when redirecting 16-bit console based * programs (including MS-DOS console based programs and batch * files) on Window 95 and Windows 98. * * This program is to be launched with redirected standard * handles. It will launch the command line specified 16-bit * console based application in the same console, forwarding * it's own redirected standard handles to the 16-bit child. * AKA solution to the problem described in KB: Q150956. */ #define WINDOWS_LEAN_AND_MEAN #include const char *usage = "This program is used by Python's os.pipe function to\n" "to work around a limitation in Windows 95/98. It is\n" "not designed to be used as stand-alone program."; int main(int argc, char *argv[]) { BOOL bRet; STARTUPINFO si; PROCESS_INFORMATION pi; if (argc != 2) { MessageBox(NULL, usage, argv[0], MB_OK); return 1; } /* Make child process use this app's standard files. */ ZeroMemory(&si, sizeof si); si.cb = sizeof si; si.dwFlags = STARTF_USESTDHANDLES; si.hStdInput = GetStdHandle(STD_INPUT_HANDLE); si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); si.hStdError = GetStdHandle(STD_ERROR_HANDLE); bRet = CreateProcess( NULL, argv[1], NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi ); if (bRet) { WaitForSingleObject(pi.hProcess, INFINITE); CloseHandle(pi.hProcess); CloseHandle(pi.hThread); return 0; } return 1; } From python-dev@python.org Sun Jul 9 14:10:48 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 06:10:48 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.143,2.144 Message-ID: <200007091310.GAA27888@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv27646/Modules Modified Files: posixmodule.c Log Message: - fixed pointer size test in spawn functions. also added cast to make sure Py_BuildValue gets the right thing. this change eliminates bogus return codes from successful spawn calls (e.g. 2167387144924954624 instead of 0). Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.143 retrieving revision 2.144 diff -C2 -r2.143 -r2.144 *** posixmodule.c 2000/07/08 22:48:53 2.143 --- posixmodule.c 2000/07/09 13:10:40 2.144 *************** *** 1541,1548 **** return posix_error(); else ! #if SIZEOF_LONG == SIZE_VOID_P ! return Py_BuildValue("l", spawnval); #else ! return Py_BuildValue("L", spawnval); #endif } --- 1541,1548 ---- return posix_error(); else ! #if SIZEOF_LONG == SIZEOF_VOID_P ! return Py_BuildValue("l", (long) spawnval); #else ! return Py_BuildValue("L", (LONG_LONG) spawnval); #endif } *************** *** 1649,1656 **** (void) posix_error(); else ! #if SIZEOF_LONG == SIZE_VOID_P ! res = Py_BuildValue("l", spawnval); #else ! res = Py_BuildValue("L", spawnval); #endif --- 1649,1656 ---- (void) posix_error(); else ! #if SIZEOF_LONG == SIZEOF_VOID_P ! res = Py_BuildValue("l", (long) spawnval); #else ! res = Py_BuildValue("L", (LONG_LONG) spawnval); #endif From python-dev@python.org Sun Jul 9 14:16:16 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 06:16:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.18,2.19 Message-ID: <200007091316.GAA28115@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv27974/Modules Modified Files: mmapmodule.c Log Message: - added (long) casts to a couple of Py_BuildValue calls, just for the sake of it. note that this only covers the unlikely case that size_t is smaller than a long; it's probably more likely that there are platforms out there where size_t is *larger* than a long, and mmapmodule cannot really deal with that today. Index: mmapmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** mmapmodule.c 2000/07/08 22:05:01 2.18 --- mmapmodule.c 2000/07/09 13:16:13 2.19 *************** *** 261,268 **** if (self->file_handle != (INT_PTR) -1) { return (Py_BuildValue ( ! "l", GetFileSize ((HANDLE)self->file_handle, NULL))); } else { ! return (Py_BuildValue ("l", self->size) ); } #endif /* MS_WIN32 */ --- 261,268 ---- if (self->file_handle != (INT_PTR) -1) { return (Py_BuildValue ( ! "l", (long) GetFileSize ((HANDLE)self->file_handle, NULL))); } else { ! return (Py_BuildValue ("l", (long) self->size) ); } #endif /* MS_WIN32 */ *************** *** 275,279 **** return NULL; } ! return (Py_BuildValue ("l", buf.st_size) ); } #endif /* UNIX */ --- 275,279 ---- return NULL; } ! return (Py_BuildValue ("l", (long) buf.st_size) ); } #endif /* UNIX */ *************** *** 372,376 **** if (!PyArg_ParseTuple(args, ":tell")) return NULL; ! return (Py_BuildValue ("l", self->pos) ); } --- 372,376 ---- if (!PyArg_ParseTuple(args, ":tell")) return NULL; ! return (Py_BuildValue ("l", (long) self->pos) ); } *************** *** 389,394 **** } else { #ifdef MS_WIN32 ! return (Py_BuildValue ( ! "l", FlushViewOfFile (self->data+offset, size))); #endif /* MS_WIN32 */ #ifdef UNIX --- 389,394 ---- } else { #ifdef MS_WIN32 ! return (Py_BuildValue("l", (long) ! FlushViewOfFile(self->data+offset, size))); #endif /* MS_WIN32 */ #ifdef UNIX *************** *** 401,405 **** return NULL; } ! return Py_BuildValue ("l", 0); #endif /* UNIX */ } --- 401,405 ---- return NULL; } ! return Py_BuildValue ("l", (long) 0); #endif /* UNIX */ } From python-dev@python.org Sun Jul 9 15:22:11 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 9 Jul 2000 07:22:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include object.h,2.61,2.62 Message-ID: <200007091422.HAA05320@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv5313 Modified Files: object.h Log Message: Remove legacy use of __SC__; no longer needed now that ANSI source is the standard for Python implementation. Index: object.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/object.h,v retrieving revision 2.61 retrieving revision 2.62 diff -C2 -r2.61 -r2.62 *** object.h 2000/07/08 00:46:19 2.61 --- object.h 2000/07/09 14:22:08 2.62 *************** *** 453,461 **** #ifdef BAD_STATIC_FORWARD #define staticforward extern - #ifdef __SC__ - #define statichere - #else #define statichere static - #endif /* __SC__ */ #else /* !BAD_STATIC_FORWARD */ #define staticforward static --- 453,457 ---- From python-dev@python.org Sun Jul 9 15:35:02 2000 From: python-dev@python.org (A.M. Kuchling) Date: Sun, 9 Jul 2000 07:35:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.30,2.31 Message-ID: <200007091435.HAA06025@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv5845 Modified Files: _cursesmodule.c Log Message: Patch from Peter Schneider-Kamp: convert curses module to ANSI prototypes, and substitute the conventional "args" instead of "arg". Index: _cursesmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v retrieving revision 2.30 retrieving revision 2.31 diff -C2 -r2.30 -r2.31 *** _cursesmodule.c 2000/07/06 19:38:49 2.30 --- _cursesmodule.c 2000/07/09 14:35:00 2.31 *************** *** 96,102 **** static PyObject * ! PyCursesCheckERR(code, fname) ! int code; ! char *fname; { if (code != ERR) { --- 96,100 ---- static PyObject * [...2407 lines suppressed...] ! PyCurses_Use_Env(PyObject *self, PyObject *args) { int flag; *************** *** 2227,2233 **** PyCursesInitialised ! switch(ARG_COUNT(arg)) { case 1: ! if (!PyArg_Parse(arg,"i;True(1), False(0)",&flag)) return NULL; break; --- 2071,2077 ---- PyCursesInitialised ! switch(ARG_COUNT(args)) { case 1: ! if (!PyArg_Parse(args,"i;True(1), False(0)",&flag)) return NULL; break; From python-dev@python.org Sun Jul 9 15:36:15 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 9 Jul 2000 07:36:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules parsermodule.c,2.43,2.44 Message-ID: <200007091436.HAA06088@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6079 Modified Files: parsermodule.c Log Message: Remove use of HAVE_OLD_CPP to support non-ANSI preprocessors. Index: parsermodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v retrieving revision 2.43 retrieving revision 2.44 diff -C2 -r2.43 -r2.44 *** parsermodule.c 2000/07/04 18:48:46 2.43 --- parsermodule.c 2000/07/09 14:36:13 2.44 *************** *** 859,867 **** - #ifdef HAVE_OLD_CPP - #define VALIDATER(n) static int validate_/**/n(node *tree) - #else #define VALIDATER(n) static int validate_##n(node *tree) - #endif --- 859,863 ---- From python-dev@python.org Sun Jul 9 15:39:31 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 9 Jul 2000 07:39:31 -0700 Subject: [Python-checkins] CVS: python/dist/src acconfig.h,1.32,1.33 config.h.in,2.61,2.62 configure,1.124,1.125 configure.in,1.133,1.134 Message-ID: <200007091439.HAA06369@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv6355 Modified Files: acconfig.h config.h.in configure configure.in Log Message: Remove setup of HAVE_OLD_CPP; it is no longer used in the Python sources. The actual test for it is only commented out in configure.in, so it can be re-enabled if we ever run across the need for it again. Index: acconfig.h =================================================================== RCS file: /cvsroot/python/python/dist/src/acconfig.h,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** acconfig.h 2000/07/08 04:17:21 1.32 --- acconfig.h 2000/07/09 14:39:28 1.33 *************** *** 60,66 **** #undef HAVE_LONG_LONG - /* Define this if you have a K&R style C preprocessor */ - #undef HAVE_OLD_CPP - /* Define if your compiler supports function prototypes */ #undef HAVE_PROTOTYPES --- 60,63 ---- Index: config.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/config.h.in,v retrieving revision 2.61 retrieving revision 2.62 diff -C2 -r2.61 -r2.62 *** config.h.in 2000/06/30 16:02:58 2.61 --- config.h.in 2000/07/09 14:39:28 2.62 *************** *** 128,134 **** #undef HAVE_LONG_LONG - /* Define this if you have a K&R style C preprocessor */ - #undef HAVE_OLD_CPP - /* Define if your compiler supports function prototypes */ #undef HAVE_PROTOTYPES --- 128,131 ---- *************** *** 231,234 **** --- 228,236 ---- /* Defined when any dynamic module loading is enabled */ #undef HAVE_DYNAMIC_LOADING + + /* Define if i>>j for signed int i does not extend the sign bit + when i < 0 + */ + #undef SIGNED_RIGHT_SHIFT_ZERO_FILLS /* The number of bytes in a char. */ Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.124 retrieving revision 1.125 diff -C2 -r1.124 -r1.125 *** configure 2000/07/05 10:38:09 1.124 --- configure 2000/07/09 14:39:28 1.125 *************** *** 1,8 **** #! /bin/sh ! # From configure.in Revision: 1.132 # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # --- 1,8 ---- #! /bin/sh [...4188 lines suppressed...] ! echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) --- 5759,5763 ---- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.14.1" exit 0 ;; -help | --help | --hel | --he | --h) *************** *** 6061,6064 **** chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 --- 6058,6061 ---- chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.133 retrieving revision 1.134 diff -C2 -r1.133 -r1.134 *** configure.in 2000/07/05 10:38:09 1.133 --- configure.in 2000/07/09 14:39:29 1.134 *************** *** 343,354 **** fi ! # check for ANSI or K&R ("traditional") preprocessor ! AC_MSG_CHECKING(for C preprocessor type) ! AC_TRY_COMPILE([ ! #define spam(name, doc) {#name, &name, #name "() -- " doc} ! int foo; ! struct {char *name; int *addr; char *doc;} desc = spam(foo, "something"); ! ], [;], cpp_type=ansi, AC_DEFINE(HAVE_OLD_CPP) cpp_type=traditional) ! AC_MSG_RESULT($cpp_type) # checks for header files --- 343,354 ---- fi ! dnl # check for ANSI or K&R ("traditional") preprocessor ! dnl AC_MSG_CHECKING(for C preprocessor type) ! dnl AC_TRY_COMPILE([ ! dnl #define spam(name, doc) {#name, &name, #name "() -- " doc} ! dnl int foo; ! dnl struct {char *name; int *addr; char *doc;} desc = spam(foo, "something"); ! dnl ], [;], cpp_type=ansi, AC_DEFINE(HAVE_OLD_CPP) cpp_type=traditional) ! dnl AC_MSG_RESULT($cpp_type) # checks for header files From python-dev@python.org Sun Jul 9 15:49:53 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 07:49:53 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.144,2.145 Message-ID: <200007091449.HAA07304@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv7152/Modules Modified Files: posixmodule.c Log Message: - improved os.popen support for windows, based on win32pipe by Bill Tutt. note: to run this on Windows 95/98, you need to have the w9xpopen.exe helper in the same directory as the python DLL. Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.144 retrieving revision 2.145 diff -C2 -r2.144 -r2.145 *** posixmodule.c 2000/07/09 13:10:40 2.144 --- posixmodule.c 2000/07/09 14:49:51 2.145 *************** *** 223,226 **** --- 223,227 ---- #include #include + #define WINDOWS_LEAN_AND_MEAN #include #ifdef MS_WIN32 *************** *** 354,357 **** --- 355,370 ---- } + #ifdef MS_WIN32 + static PyObject * + win32_error(char* function, char* filename) + { + /* XXX this could be improved */ + errno = GetLastError(); + if (filename) + return PyErr_SetFromErrnoWithFilename(PyExc_OSError, filename); + else + return PyErr_SetFromErrno(PyExc_OSError); + } + #endif #if defined(PYOS_OS2) *************** *** 846,850 **** if (errno == ERROR_FILE_NOT_FOUND) return PyList_New(0); ! return posix_error_with_filename(name); } do { --- 859,863 ---- if (errno == ERROR_FILE_NOT_FOUND) return PyList_New(0); ! return win32_error("FindFirstFile", name); } do { *************** *** 869,876 **** } while (FindNextFile(hFindFile, &FileData) == TRUE); ! if (FindClose(hFindFile) == FALSE) { ! errno = GetLastError(); ! return posix_error_with_filename(name); ! } return d; --- 882,887 ---- } while (FindNextFile(hFindFile, &FileData) == TRUE); ! if (FindClose(hFindFile) == FALSE) ! return win32_error("FindClose", name); return d; *************** *** 2109,2112 **** --- 2120,2563 ---- } + #elif defined(MS_WIN32) + + /* + * Portable 'popen' replacement for Win32. + * + * Written by Bill Tutt . Minor tweaks + * and 2.0 integration by Fredrik Lundh + */ + + #include + #include + #include + + /* These tell _PyPopen() wether to return 1, 2, or 3 file objects. */ + #define POPEN_1 1 + #define POPEN_2 2 + #define POPEN_3 3 + #define POPEN_4 4 + + static PyObject *_PyPopen(char *, int, int); + + /* popen that works from a GUI. + * + * The result of this function is a pipe (file) connected to the + * processes stdin or stdout, depending on the requested mode. + */ + + static PyObject * + posix_popen(PyObject *self, PyObject *args) + { + int bufsize = -1; + PyObject *f, *s; + int tm = 0; + + char *cmdstring; + char *mode = "r"; + if (!PyArg_ParseTuple(args, "s|s:popen", &cmdstring, &mode)) + return NULL; + + s = PyTuple_New(0); + + if (*mode == 'r') + tm = _O_RDONLY; + else if (*mode != 'w') { + PyErr_SetString(PyExc_ValueError, "mode must be 'r' or 'w'"); + return NULL; + } else + tm = _O_WRONLY; + + if (*(mode+1) == 't') + f = _PyPopen(cmdstring, tm | _O_TEXT , POPEN_1); + else if (*(mode+1) == 'b') + f = _PyPopen(cmdstring, tm | _O_BINARY , POPEN_1); + else + f = _PyPopen(cmdstring, tm | _O_TEXT, POPEN_1); + + return f; + } + + /* Variation on win32pipe.popen + * + * The result of this function is a pipe (file) connected to the + * process's stdin, and a pipe connected to the process's stdout. + */ + + static PyObject * + win32_popen2(PyObject *self, PyObject *args) + { + PyObject *f; + int tm=0; + + char *cmdstring; + char *mode = "t"; + if (!PyArg_ParseTuple(args, "s|s:popen2", &cmdstring, &mode)) + return NULL; + + if (*mode == 't') + tm = _O_TEXT; + else if (*mode != 'b') { + PyErr_SetString(PyExc_ValueError, "mode must be 't' or 'b'"); + return NULL; + } else + tm = _O_BINARY; + + f = _PyPopen(cmdstring, tm , POPEN_2); + + return f; + } + + /* + * Variation on + * The result of this function is 3 pipes - the process's stdin, + * stdout and stderr + * + */ + + static PyObject * + win32_popen3(PyObject *self, PyObject *args) + { + PyObject *f; + int tm = 0; + + char *cmdstring; + char *mode = "t"; + if (!PyArg_ParseTuple(args, "s|s:Popen3", &cmdstring, &mode)) + return NULL; + + if (*mode == 't') + tm = _O_TEXT; + else if (*mode != 'b') { + PyErr_SetString(PyExc_ValueError, "mode must be 't' or 'b'"); + return NULL; + } else + tm = _O_BINARY; + + f = _PyPopen(cmdstring, tm, POPEN_3); + + return f; + } + + /* + * Variation on win32pipe.popen + * + * The result of this function is 2 pipes - the processes stdin, + * and stdout+stderr combined as a single pipe. + */ + + static PyObject * + win32_popen4(PyObject *self, PyObject *args) + { + PyObject *f; + int tm = 0; + + char *cmdstring; + char *mode = "t"; + if (!PyArg_ParseTuple(args, "s|s:popen4", &cmdstring, &mode)) + return NULL; + + if (*mode == 't') + tm = _O_TEXT; + else if (*mode != 'b') { + PyErr_SetString(PyExc_ValueError, "mode must be 't' or 'b'"); + return NULL; + } else + tm = _O_BINARY; + + f = _PyPopen(cmdstring, tm , POPEN_4); + + return f; + } + + static int + _PyPopenCreateProcess(char *cmdstring, + HANDLE hStdin, + HANDLE hStdout, + HANDLE hStderr) + { + PROCESS_INFORMATION piProcInfo; + STARTUPINFO siStartInfo; + char *s1,*s2, *s3 = " /c "; + const char *szConsoleSpawn = "w9xpopen.exe \""; + int i; + int x; + + if (i = GetEnvironmentVariable("COMSPEC",NULL,0)) { + s1 = (char *)_alloca(i); + if (!(x = GetEnvironmentVariable("COMSPEC", s1, i))) + return x; + if (GetVersion() < 0x80000000) { + /* + * NT/2000 + */ + x = i + strlen(s3) + strlen(cmdstring) + 1; + s2 = (char *)_alloca(x); + ZeroMemory(s2, x); + sprintf(s2, "%s%s%s", s1, s3, cmdstring); + } + else { + /* + * Oh gag, we're on Win9x. Use the workaround listed in + * KB: Q150956 + */ + char modulepath[256]; + GetModuleFileName(NULL, modulepath, sizeof(modulepath)); + for (i = x = 0; modulepath[i]; i++) + if (modulepath[i] == '\\') + x = i+1; + modulepath[x] = '\0'; + x = i + strlen(s3) + strlen(cmdstring) + 1 + + strlen(modulepath) + + strlen(szConsoleSpawn) + 1; + s2 = (char *)_alloca(x); + ZeroMemory(s2, x); + sprintf( + s2, + "%s%s%s%s%s\"", + modulepath, + szConsoleSpawn, + s1, + s3, + cmdstring); + } + } + + /* Could be an else here to try cmd.exe / command.com in the path + Now we'll just error out.. */ + else + return -1; + + ZeroMemory(&siStartInfo, sizeof(STARTUPINFO)); + siStartInfo.cb = sizeof(STARTUPINFO); + siStartInfo.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW; + siStartInfo.hStdInput = hStdin; + siStartInfo.hStdOutput = hStdout; + siStartInfo.hStdError = hStderr; + siStartInfo.wShowWindow = SW_HIDE; + + if (CreateProcess(NULL, + s2, + NULL, + NULL, + TRUE, + CREATE_NEW_CONSOLE, + NULL, + NULL, + &siStartInfo, + &piProcInfo) ) { + /* Close the handles now so anyone waiting is woken. */ + CloseHandle(piProcInfo.hProcess); + CloseHandle(piProcInfo.hThread); + return TRUE; + } + return FALSE; + } + + /* The following code is based off of KB: Q190351 */ + + static PyObject * + _PyPopen(char *cmdstring, int mode, int n) + { + HANDLE hChildStdinRd, hChildStdinWr, hChildStdoutRd, hChildStdoutWr, + hChildStderrRd, hChildStderrWr, hChildStdinWrDup, hChildStdoutRdDup, + hChildStderrRdDup; /* hChildStdoutWrDup; */ + + SECURITY_ATTRIBUTES saAttr; + BOOL fSuccess; + int fd1, fd2, fd3; + FILE *f1, *f2, *f3; + PyObject *f; + + saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); + saAttr.bInheritHandle = TRUE; + saAttr.lpSecurityDescriptor = NULL; + + if (!CreatePipe(&hChildStdinRd, &hChildStdinWr, &saAttr, 0)) + return win32_error("CreatePipe", NULL); + + /* Create new output read handle and the input write handle. Set + * the inheritance properties to FALSE. Otherwise, the child inherits + * the these handles; resulting in non-closeable handles to the pipes + * being created. */ + fSuccess = DuplicateHandle(GetCurrentProcess(), hChildStdinWr, + GetCurrentProcess(), &hChildStdinWrDup, 0, + FALSE, + DUPLICATE_SAME_ACCESS); + if (!fSuccess) + return win32_error("DuplicateHandle", NULL); + + /* Close the inheritable version of ChildStdin + that we're using. */ + CloseHandle(hChildStdinWr); + + if (!CreatePipe(&hChildStdoutRd, &hChildStdoutWr, &saAttr, 0)) + return win32_error("CreatePipe", NULL); + + fSuccess = DuplicateHandle(GetCurrentProcess(), hChildStdoutRd, + GetCurrentProcess(), &hChildStdoutRdDup, 0, + FALSE, + DUPLICATE_SAME_ACCESS); + if (!fSuccess) + return win32_error("DuplicateHandle", NULL); + + /* Close the inheritable version of ChildStdout + that we're using. */ + CloseHandle(hChildStdoutRd); + + if (n != POPEN_4) { + if (!CreatePipe(&hChildStderrRd, &hChildStderrWr, &saAttr, 0)) + return win32_error("CreatePipe", NULL); + fSuccess = DuplicateHandle(GetCurrentProcess(), hChildStderrRd, + GetCurrentProcess(), &hChildStderrRdDup, 0, + FALSE, + DUPLICATE_SAME_ACCESS); + if (!fSuccess) + return win32_error("DuplicateHandle", NULL); + /* Close the inheritable version of ChildStdErr that we're using. */ + CloseHandle(hChildStderrRd); + } + + switch (n) { + case POPEN_1: + switch (mode & (_O_RDONLY | _O_TEXT | _O_BINARY | _O_WRONLY)) { + case _O_WRONLY | _O_TEXT: + /* Case for writing to child Stdin in text mode. */ + fd1 = _open_osfhandle((long)hChildStdinWrDup, mode); + f1 = _fdopen(fd1, "w"); + f = PyFile_FromFile(f1, cmdstring, "w", fclose); + PyFile_SetBufSize(f, 0); + /* We don't care about these pipes anymore, so close them. */ + CloseHandle(hChildStdoutRdDup); + CloseHandle(hChildStderrRdDup); + break; + + case _O_RDONLY | _O_TEXT: + /* Case for reading from child Stdout in text mode. */ + fd1 = _open_osfhandle((long)hChildStdoutRdDup, mode); + f1 = _fdopen(fd1, "r"); + f = PyFile_FromFile(f1, cmdstring, "r", fclose); + PyFile_SetBufSize(f, 0); + /* We don't care about these pipes anymore, so close them. */ + CloseHandle(hChildStdinWrDup); + CloseHandle(hChildStderrRdDup); + break; + + case _O_RDONLY | _O_BINARY: + /* Case for readinig from child Stdout in binary mode. */ + fd1 = _open_osfhandle((long)hChildStdoutRdDup, mode); + f1 = _fdopen(fd1, "rb"); + f = PyFile_FromFile(f1, cmdstring, "rb", fclose); + PyFile_SetBufSize(f, 0); + /* We don't care about these pipes anymore, so close them. */ + CloseHandle(hChildStdinWrDup); + CloseHandle(hChildStderrRdDup); + break; + + case _O_WRONLY | _O_BINARY: + /* Case for writing to child Stdin in binary mode. */ + fd1 = _open_osfhandle((long)hChildStdinWrDup, mode); + f1 = _fdopen(fd1, "wb"); + f = PyFile_FromFile(f1, cmdstring, "wb", fclose); + PyFile_SetBufSize(f, 0); + /* We don't care about these pipes anymore, so close them. */ + CloseHandle(hChildStdoutRdDup); + CloseHandle(hChildStderrRdDup); + break; + } + break; + + case POPEN_2: + case POPEN_4: + { + char *m1, *m2; + PyObject *p1, *p2; + + if (mode && _O_TEXT) { + m1 = "r"; + m2 = "w"; + } else { + m1 = "rb"; + m2 = "wb"; + } + + fd1 = _open_osfhandle((long)hChildStdinWrDup, mode); + f1 = _fdopen(fd1, m2); + fd2 = _open_osfhandle((long)hChildStdoutRdDup, mode); + f2 = _fdopen(fd2, m1); + p1 = PyFile_FromFile(f1, cmdstring, m2, fclose); + PyFile_SetBufSize(p1, 0); + p2 = PyFile_FromFile(f2, cmdstring, m1, fclose); + PyFile_SetBufSize(p2, 0); + + if (n != 4) + CloseHandle(hChildStderrRdDup); + + f = Py_BuildValue("OO",p1,p2); + break; + } + + case POPEN_3: + { + char *m1, *m2; + PyObject *p1, *p2, *p3; + + if (mode && _O_TEXT) { + m1 = "r"; + m2 = "w"; + } else { + m1 = "rb"; + m2 = "wb"; + } + + fd1 = _open_osfhandle((long)hChildStdinWrDup, mode); + f1 = _fdopen(fd1, m2); + fd2 = _open_osfhandle((long)hChildStdoutRdDup, mode); + f2 = _fdopen(fd2, m1); + fd3 = _open_osfhandle((long)hChildStderrRdDup, mode); + f3 = _fdopen(fd3, m1); + p1 = PyFile_FromFile(f1, cmdstring, m2, fclose); + p2 = PyFile_FromFile(f2, cmdstring, m1, fclose); + p3 = PyFile_FromFile(f3, cmdstring, m1, fclose); + PyFile_SetBufSize(p1, 0); + PyFile_SetBufSize(p2, 0); + PyFile_SetBufSize(p3, 0); + f = Py_BuildValue("OOO",p1,p2,p3); + break; + } + } + + if (n == POPEN_4) { + if (!_PyPopenCreateProcess(cmdstring, + hChildStdinRd, + hChildStdoutWr, + hChildStdoutWr)) + return win32_error("CreateProcess", NULL); + } + else { + if (!_PyPopenCreateProcess(cmdstring, + hChildStdinRd, + hChildStdoutWr, + hChildStderrWr)) + return win32_error("CreateProcess", NULL); + } + + /* Child is launched. Close the parents copy of those pipe + * handles that only the child should have open. You need to + * make sure that no handles to the write end of the output pipe + * are maintained in this process or else the pipe will not close + * when the child process exits and the ReadFile will hang. */ + + if (!CloseHandle(hChildStdinRd)) + return win32_error("CloseHandle", NULL); + + if (!CloseHandle(hChildStdoutWr)) + return win32_error("CloseHandle", NULL); + + if ((n != 4) && (!CloseHandle(hChildStderrWr))) + return win32_error("CloseHandle", NULL); + + return f; + } #else static PyObject * *************** *** 2729,2733 **** Py_END_ALLOW_THREADS if (!ok) ! return posix_error(); read_fd = _open_osfhandle((intptr_t)read, 0); write_fd = _open_osfhandle((intptr_t)write, 1); --- 3180,3184 ---- Py_END_ALLOW_THREADS if (!ok) ! return win32_error("CreatePipe", NULL); read_fd = _open_osfhandle((intptr_t)read, 0); write_fd = _open_osfhandle((intptr_t)write, 1); *************** *** 4424,4427 **** --- 4875,4883 ---- #ifdef HAVE_POPEN {"popen", posix_popen, METH_VARARGS, posix_popen__doc__}, + #ifdef MS_WIN32 + {"popen2", win32_popen2, METH_VARARGS}, + {"popen3", win32_popen3, METH_VARARGS}, + {"popen4", win32_popen4, METH_VARARGS}, + #endif #endif /* HAVE_POPEN */ #ifdef HAVE_SETUID From python-dev@python.org Sun Jul 9 16:09:58 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 08:09:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.114,1.115 Message-ID: <200007091509.IAA14596@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv14488/Modules Modified Files: socketmodule.c Log Message: - ANSI-ification (patch #100770 by Peter Schneider-Kamp) Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.114 retrieving revision 1.115 diff -C2 -r1.114 -r1.115 *** socketmodule.c 2000/07/09 03:09:55 1.114 --- socketmodule.c 2000/07/09 15:09:56 1.115 *************** *** 185,193 **** #endif /* USE_SSL */ - /* Here we have some hacks to choose between K&R or ANSI style function - definitions. For NT to build this as an extension module (ie, DLL) - it must be compiled by the C++ compiler, as it takes the address of - a static data item exported from the main Python DLL. - */ #if defined(MS_WINDOWS) || defined(__BEOS__) /* BeOS suffers from the same socket dichotomy as Win32... - [cjh] */ --- 185,188 ---- *************** *** 195,199 **** #define SOCKETCLOSE closesocket #define NO_DUP /* Actually it exists on NT 3.5, but what the heck... */ - #define FORCE_ANSI_FUNC_DEFS #endif --- 190,193 ---- *************** *** 215,219 **** #define SOCKETCLOSE soclose #define NO_DUP /* Sockets are Not Actual File Handles under OS/2 */ - #define FORCE_ANSI_FUNC_DEFS #endif --- 209,212 ---- *************** *** 222,263 **** #endif - #ifdef FORCE_ANSI_FUNC_DEFS - #define BUILD_FUNC_DEF_1( fnname, arg1type, arg1name ) \ - fnname( arg1type arg1name ) - - #define BUILD_FUNC_DEF_2( fnname, arg1type, arg1name, arg2type, arg2name ) \ - fnname( arg1type arg1name, arg2type arg2name ) - - #define BUILD_FUNC_DEF_3( fnname, arg1type, arg1name, arg2type, arg2name , arg3type, arg3name ) \ - fnname( arg1type arg1name, arg2type arg2name, arg3type arg3name ) - - #define BUILD_FUNC_DEF_4( fnname, arg1type, arg1name, arg2type, arg2name , arg3type, arg3name, arg4type, arg4name ) \ - fnname( arg1type arg1name, arg2type arg2name, arg3type arg3name, arg4type arg4name ) - - #else /* !FORCE_ANSI_FN_DEFS */ - #define BUILD_FUNC_DEF_1( fnname, arg1type, arg1name ) \ - fnname( arg1name ) \ - arg1type arg1name; - - #define BUILD_FUNC_DEF_2( fnname, arg1type, arg1name, arg2type, arg2name ) \ - fnname( arg1name, arg2name ) \ - arg1type arg1name; \ - arg2type arg2name; - - #define BUILD_FUNC_DEF_3( fnname, arg1type, arg1name, arg2type, arg2name, arg3type, arg3name ) \ - fnname( arg1name, arg2name, arg3name ) \ - arg1type arg1name; \ - arg2type arg2name; \ - arg3type arg3name; - - #define BUILD_FUNC_DEF_4( fnname, arg1type, arg1name, arg2type, arg2name, arg3type, arg3name, arg4type, arg4name ) \ - fnname( arg1name, arg2name, arg3name, arg4name ) \ - arg1type arg1name; \ - arg2type arg2name; \ - arg3type arg3name; \ - arg4type arg4name; - - #endif /* !FORCE_ANSI_FN_DEFS */ - /* Global variable holding the exception type for errors detected by this module (but not argument type or memory errors, etc.). */ --- 215,218 ---- *************** *** 377,381 **** static PySocketSockObject * ! BUILD_FUNC_DEF_4(PySocketSock_New,SOCKET_T,fd, int,family, int,type, int,proto) { PySocketSockObject *s; --- 332,336 ---- static PySocketSockObject * ! PySocketSock_New(SOCKET_T fd, int family, int type, int proto) { PySocketSockObject *s; *************** *** 406,410 **** static int ! BUILD_FUNC_DEF_2(setipaddr, char*,name, struct sockaddr_in *,addr_ret) { struct hostent *hp; --- 361,365 ---- static int ! setipaddr(char* name, struct sockaddr_in * addr_ret) { struct hostent *hp; *************** *** 489,493 **** static PyObject * ! BUILD_FUNC_DEF_1(makeipaddr, struct sockaddr_in *,addr) { long x = ntohl(addr->sin_addr.s_addr); --- 444,448 ---- static PyObject * ! makeipaddr(struct sockaddr_in *addr) { long x = ntohl(addr->sin_addr.s_addr); *************** *** 507,511 **** /*ARGSUSED*/ static PyObject * ! BUILD_FUNC_DEF_2(makesockaddr,struct sockaddr *,addr, int,addrlen) { if (addrlen == 0) { --- 462,466 ---- /*ARGSUSED*/ static PyObject * ! makesockaddr(struct sockaddr *addr, int addrlen) { if (addrlen == 0) { *************** *** 562,567 **** static int ! BUILD_FUNC_DEF_4( ! getsockaddrarg,PySocketSockObject *,s, PyObject *,args, struct sockaddr **,addr_ret, int *,len_ret) { switch (s->sock_family) { --- 517,521 ---- static int ! getsockaddrarg(PySocketSockObject *s, PyObject *args, struct sockaddr **addr_ret, int *len_ret) { switch (s->sock_family) { *************** *** 622,626 **** static int ! BUILD_FUNC_DEF_2(getsockaddrlen,PySocketSockObject *,s, int *,len_ret) { switch (s->sock_family) { --- 576,580 ---- static int ! getsockaddrlen(PySocketSockObject *s, int *len_ret) { switch (s->sock_family) { *************** *** 653,657 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_accept,PySocketSockObject *,s, PyObject *,args) { char addrbuf[256]; --- 607,611 ---- static PyObject * ! PySocketSock_accept(PySocketSockObject *s, PyObject *args) { char addrbuf[256]; *************** *** 709,713 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_setblocking,PySocketSockObject*,s,PyObject*,args) { int block; --- 663,667 ---- static PyObject * ! PySocketSock_setblocking(PySocketSockObject *s, PyObject *args) { int block; *************** *** 759,763 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_setsockopt,PySocketSockObject *,s, PyObject *,args) { int level; --- 713,717 ---- static PyObject * ! PySocketSock_setsockopt(PySocketSockObject *s, PyObject *args) { int level; *************** *** 799,803 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_getsockopt,PySocketSockObject *,s, PyObject *,args) { int level; --- 753,757 ---- static PyObject * ! PySocketSock_getsockopt(PySocketSockObject *s, PyObject *args) { int level; *************** *** 856,860 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_bind,PySocketSockObject *,s, PyObject *,args) { struct sockaddr *addr; --- 810,814 ---- static PyObject * ! PySocketSock_bind(PySocketSockObject *s, PyObject *args) { struct sockaddr *addr; *************** *** 887,891 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_close,PySocketSockObject *,s, PyObject *,args) { if (!PyArg_ParseTuple(args, ":close")) --- 841,845 ---- static PyObject * ! PySocketSock_close(PySocketSockObject *s, PyObject *args) { if (!PyArg_ParseTuple(args, ":close")) *************** *** 910,914 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_connect,PySocketSockObject *,s, PyObject *,args) { struct sockaddr *addr; --- 864,868 ---- static PyObject * ! PySocketSock_connect(PySocketSockObject *s, PyObject *args) { struct sockaddr *addr; *************** *** 939,943 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_connect_ex,PySocketSockObject *,s, PyObject *,args) { struct sockaddr *addr; --- 893,897 ---- static PyObject * ! PySocketSock_connect_ex(PySocketSockObject *s, PyObject *args) { struct sockaddr *addr; *************** *** 967,971 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_fileno,PySocketSockObject *,s, PyObject *,args) { if (!PyArg_ParseTuple(args, ":fileno")) --- 921,925 ---- static PyObject * ! PySocketSock_fileno(PySocketSockObject *s, PyObject *args) { if (!PyArg_ParseTuple(args, ":fileno")) *************** *** 988,992 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_dup,PySocketSockObject *,s, PyObject *,args) { SOCKET_T newfd; --- 942,946 ---- static PyObject * ! PySocketSock_dup(PySocketSockObject *s, PyObject *args) { SOCKET_T newfd; *************** *** 1017,1021 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_getsockname,PySocketSockObject *,s, PyObject *,args) { char addrbuf[256]; --- 971,975 ---- static PyObject * ! PySocketSock_getsockname(PySocketSockObject *s, PyObject *args) { char addrbuf[256]; *************** *** 1047,1051 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_getpeername,PySocketSockObject *,s, PyObject *,args) { char addrbuf[256]; --- 1001,1005 ---- static PyObject * ! PySocketSock_getpeername(PySocketSockObject *s, PyObject *args) { char addrbuf[256]; *************** *** 1077,1081 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_listen,PySocketSockObject *,s, PyObject *,args) { int backlog; --- 1031,1035 ---- static PyObject * ! PySocketSock_listen(PySocketSockObject *s, PyObject *args) { int backlog; *************** *** 1111,1115 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_makefile,PySocketSockObject *,s, PyObject *,args) { extern int fclose(FILE *); --- 1065,1069 ---- static PyObject * ! PySocketSock_makefile(PySocketSockObject *s, PyObject *args) { extern int fclose(FILE *); *************** *** 1155,1159 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_recv,PySocketSockObject *,s, PyObject *,args) { int len, n, flags = 0; --- 1109,1113 ---- static PyObject * ! PySocketSock_recv(PySocketSockObject *s, PyObject *args) { int len, n, flags = 0; *************** *** 1188,1192 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_recvfrom,PySocketSockObject *,s, PyObject *,args) { char addrbuf[256]; --- 1142,1146 ---- static PyObject * ! PySocketSock_recvfrom(PySocketSockObject *s, PyObject *args) { char addrbuf[256]; *************** *** 1243,1247 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_send,PySocketSockObject *,s, PyObject *,args) { char *buf; --- 1197,1201 ---- static PyObject * ! PySocketSock_send(PySocketSockObject *s, PyObject *args) { char *buf; *************** *** 1267,1271 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_sendto,PySocketSockObject *,s, PyObject *,args) { PyObject *addro; --- 1221,1225 ---- static PyObject * ! PySocketSock_sendto(PySocketSockObject *s, PyObject *args) { PyObject *addro; *************** *** 1300,1304 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_shutdown,PySocketSockObject *,s, PyObject *,args) { int how; --- 1254,1258 ---- static PyObject * ! PySocketSock_shutdown(PySocketSockObject *s, PyObject *args) { int how; *************** *** 1377,1381 **** static void ! BUILD_FUNC_DEF_1(PySocketSock_dealloc,PySocketSockObject *,s) { if (s->sock_fd != -1) --- 1331,1335 ---- static void ! PySocketSock_dealloc(PySocketSockObject *s) { if (s->sock_fd != -1) *************** *** 1388,1392 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_getattr,PySocketSockObject *,s, char *,name) { return Py_FindMethod(PySocketSock_methods, (PyObject *) s, name); --- 1342,1346 ---- static PyObject * ! PySocketSock_getattr(PySocketSockObject *s, char *name) { return Py_FindMethod(PySocketSock_methods, (PyObject *) s, name); *************** *** 1395,1399 **** static PyObject * ! BUILD_FUNC_DEF_1(PySocketSock_repr,PySocketSockObject *,s) { char buf[512]; --- 1349,1353 ---- static PyObject * ! PySocketSock_repr(PySocketSockObject *s) { char buf[512]; *************** *** 1439,1443 **** /*ARGSUSED*/ static PyObject * ! BUILD_FUNC_DEF_2(PySocket_gethostname,PyObject *,self, PyObject *,args) { char buf[1024]; --- 1393,1397 ---- /*ARGSUSED*/ static PyObject * ! PySocket_gethostname(PyObject *self, PyObject *args) { char buf[1024]; *************** *** 1464,1468 **** /*ARGSUSED*/ static PyObject * ! BUILD_FUNC_DEF_2(PySocket_gethostbyname,PyObject *,self, PyObject *,args) { char *name; --- 1418,1422 ---- /*ARGSUSED*/ static PyObject * ! PySocket_gethostbyname(PyObject *self, PyObject *args) { char *name; *************** *** 1540,1544 **** /*ARGSUSED*/ static PyObject * ! BUILD_FUNC_DEF_2(PySocket_gethostbyname_ex,PyObject *,self, PyObject *,args) { char *name; --- 1494,1498 ---- /*ARGSUSED*/ static PyObject * ! PySocket_gethostbyname_ex(PyObject *self, PyObject *args) { char *name; *************** *** 1599,1603 **** /*ARGSUSED*/ static PyObject * ! BUILD_FUNC_DEF_2(PySocket_gethostbyaddr,PyObject *,self, PyObject *, args) { struct sockaddr_in addr; --- 1553,1557 ---- /*ARGSUSED*/ static PyObject * ! PySocket_gethostbyaddr(PyObject *self, PyObject *args) { struct sockaddr_in addr; *************** *** 1671,1675 **** /*ARGSUSED*/ static PyObject * ! BUILD_FUNC_DEF_2(PySocket_getservbyname,PyObject *,self, PyObject *,args) { char *name, *proto; --- 1625,1629 ---- /*ARGSUSED*/ static PyObject * ! PySocket_getservbyname(PyObject *self, PyObject *args) { char *name, *proto; *************** *** 1700,1704 **** /*ARGSUSED*/ static PyObject * ! BUILD_FUNC_DEF_2(PySocket_getprotobyname,PyObject *,self, PyObject *,args) { char *name; --- 1654,1658 ---- /*ARGSUSED*/ static PyObject * ! PySocket_getprotobyname(PyObject *self, PyObject *args) { char *name; *************** *** 1734,1738 **** /*ARGSUSED*/ static PyObject * ! BUILD_FUNC_DEF_2(PySocket_socket,PyObject *,self, PyObject *,args) { PySocketSockObject *s; --- 1688,1692 ---- /*ARGSUSED*/ static PyObject * ! PySocket_socket(PyObject *self, PyObject *args) { PySocketSockObject *s; *************** *** 1780,1784 **** /*ARGSUSED*/ static PyObject * ! BUILD_FUNC_DEF_2(PySocket_fromfd,PyObject *,self, PyObject *,args) { PySocketSockObject *s; --- 1734,1738 ---- /*ARGSUSED*/ static PyObject * ! PySocket_fromfd(PyObject *self, PyObject *args) { PySocketSockObject *s; *************** *** 1811,1815 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocket_ntohs, PyObject *, self, PyObject *, args) { int x1, x2; --- 1765,1769 ---- static PyObject * ! PySocket_ntohs(PyObject *self, PyObject *args) { int x1, x2; *************** *** 1829,1833 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocket_ntohl, PyObject *, self, PyObject *, args) { int x1, x2; --- 1783,1787 ---- static PyObject * ! PySocket_ntohl(PyObject *self, PyObject *args) { int x1, x2; *************** *** 1847,1851 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocket_htons, PyObject *, self, PyObject *, args) { int x1, x2; --- 1801,1805 ---- static PyObject * ! PySocket_htons(PyObject *self, PyObject *args) { int x1, x2; *************** *** 1865,1869 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocket_htonl, PyObject *, self, PyObject *, args) { int x1, x2; --- 1819,1823 ---- static PyObject * ! PySocket_htonl(PyObject *self, PyObject *args) { int x1, x2; *************** *** 1895,1899 **** static PyObject* ! BUILD_FUNC_DEF_2(PySocket_inet_aton, PyObject *, self, PyObject *, args) { #ifndef INADDR_NONE --- 1849,1853 ---- static PyObject* ! PySocket_inet_aton(PyObject *self, PyObject *args) { #ifndef INADDR_NONE *************** *** 1930,1934 **** static PyObject* ! BUILD_FUNC_DEF_2(PySocket_inet_ntoa, PyObject *, self, PyObject *, args) { char *packed_str; --- 1884,1888 ---- static PyObject* ! PySocket_inet_ntoa(PyObject *self, PyObject *args) { char *packed_str; *************** *** 1956,1961 **** /* This is a C function to be called for new object initialization */ static SSLObject * ! BUILD_FUNC_DEF_3(newSSLObject, ! PySocketSockObject *,Sock, char*,key_file, char*,cert_file) { SSLObject *self; --- 1910,1914 ---- /* This is a C function to be called for new object initialization */ static SSLObject * ! newSSLObject(PySocketSockObject *Sock, char *key_file, char *cert_file) { SSLObject *self; *************** *** 2047,2051 **** /* This is the Python function called for new object initialization */ static PyObject * ! BUILD_FUNC_DEF_2(PySocket_ssl, PyObject *, self, PyObject *, args) { SSLObject *rv; --- 2000,2004 ---- /* This is the Python function called for new object initialization */ static PyObject * ! PySocket_ssl(PyObject *self, PyObject *args) { SSLObject *rv; *************** *** 2069,2073 **** static PyObject * ! BUILD_FUNC_DEF_2(SSL_server, SSLObject *, self, PyObject *, args) { return PyString_FromString(self->server); --- 2022,2026 ---- static PyObject * ! SSL_server(SSLObject *self, PyObject *args) { return PyString_FromString(self->server); *************** *** 2075,2079 **** static PyObject * ! BUILD_FUNC_DEF_2(SSL_issuer, SSLObject *, self, PyObject *, args) { return PyString_FromString(self->issuer); --- 2028,2032 ---- static PyObject * ! SSL_issuer(SSLObject *self, PyObject *args) { return PyString_FromString(self->issuer); *************** *** 2218,2222 **** */ static void ! BUILD_FUNC_DEF_3(insint,PyObject *,d, char *,name, int,value) { PyObject *v = PyInt_FromLong((long) value); --- 2171,2175 ---- */ static void ! insint(PyObject *d, char *name, int value) { PyObject *v = PyInt_FromLong((long) value); From python-dev@python.org Sun Jul 9 16:14:54 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 08:14:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules errnomodule.c,2.11,2.12 Message-ID: <200007091514.IAA14844@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv14811/Modules Modified Files: errnomodule.c Log Message: - ANSI-fication (patch #100784 by Peter Schneider-Kamp) Index: errnomodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/errnomodule.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** errnomodule.c 2000/06/30 23:58:05 2.11 --- errnomodule.c 2000/07/09 15:14:52 2.12 *************** *** 34,42 **** static void ! _inscode(d, de, name, code) ! PyObject *d; ! PyObject *de; ! char *name; ! int code; { PyObject *u; --- 34,38 ---- static void ! _inscode(PyObject *d, PyObject *de, char *name, int code) { PyObject *u; From python-dev@python.org Sun Jul 9 16:16:53 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 9 Jul 2000 08:16:53 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects intobject.c,2.46,2.47 listobject.c,2.79,2.80 Message-ID: <200007091516.IAA14941@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv14927 Modified Files: intobject.c listobject.c Log Message: ANSI-fication of the sources. Index: intobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/intobject.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** intobject.c 2000/07/08 04:17:21 2.46 --- intobject.c 2000/07/09 15:16:51 2.47 *************** *** 35,39 **** long ! PyInt_GetMax() { return LONG_MAX; /* To initialize sys.maxint */ --- 35,39 ---- long ! PyInt_GetMax(void) { return LONG_MAX; /* To initialize sys.maxint */ *************** *** 53,58 **** static PyObject * ! err_ovf(msg) ! char *msg; { PyErr_SetString(PyExc_OverflowError, msg); --- 53,57 ---- static PyObject * ! err_ovf(char *msg) { PyErr_SetString(PyExc_OverflowError, msg); *************** *** 85,89 **** static PyIntObject * ! fill_free_list() { PyIntObject *p, *q; --- 84,88 ---- static PyIntObject * ! fill_free_list(void) { PyIntObject *p, *q; *************** *** 121,126 **** PyObject * ! PyInt_FromLong(ival) ! long ival; { register PyIntObject *v; --- 120,124 ---- PyObject * ! PyInt_FromLong(long ival) { register PyIntObject *v; *************** *** 158,163 **** static void ! int_dealloc(v) ! PyIntObject *v; { v->ob_type = (struct _typeobject *)free_list; --- 156,160 ---- static void ! int_dealloc(PyIntObject *v) { v->ob_type = (struct _typeobject *)free_list; *************** *** 166,171 **** long ! PyInt_AsLong(op) ! register PyObject *op; { PyNumberMethods *nb; --- 163,167 ---- long ! PyInt_AsLong(register PyObject *op) { PyNumberMethods *nb; *************** *** 198,205 **** PyObject * ! PyInt_FromString(s, pend, base) ! char *s; ! char **pend; ! int base; { char *end; --- 194,198 ---- PyObject * ! PyInt_FromString(char *s, char **pend, int base) { char *end; *************** *** 240,247 **** PyObject * ! PyInt_FromUnicode(s, length, base) ! Py_UNICODE *s; ! int length; ! int base; { char buffer[256]; --- 233,237 ---- PyObject * ! PyInt_FromUnicode(Py_UNICODE *s, int length, int base) { char buffer[256]; *************** *** 261,268 **** /* ARGSUSED */ static int ! int_print(v, fp, flags) ! PyIntObject *v; ! FILE *fp; ! int flags; /* Not used but required by interface */ { fprintf(fp, "%ld", v->ob_ival); --- 251,256 ---- /* ARGSUSED */ static int ! int_print(PyIntObject *v, FILE *fp, int flags) ! /* flags -- not used but required by interface */ { fprintf(fp, "%ld", v->ob_ival); *************** *** 271,276 **** static PyObject * ! int_repr(v) ! PyIntObject *v; { char buf[20]; --- 259,263 ---- static PyObject * ! int_repr(PyIntObject *v) { char buf[20]; *************** *** 280,285 **** static int ! int_compare(v, w) ! PyIntObject *v, *w; { register long i = v->ob_ival; --- 267,271 ---- static int ! int_compare(PyIntObject *v, PyIntObject *w) { register long i = v->ob_ival; *************** *** 289,294 **** static long ! int_hash(v) ! PyIntObject *v; { /* XXX If this is changed, you also need to change the way --- 275,279 ---- static long ! int_hash(PyIntObject *v) { /* XXX If this is changed, you also need to change the way *************** *** 301,307 **** static PyObject * ! int_add(v, w) ! PyIntObject *v; ! PyIntObject *w; { register long a, b, x; --- 286,290 ---- static PyObject * ! int_add(PyIntObject *v, PyIntObject *w) { register long a, b, x; *************** *** 315,321 **** static PyObject * ! int_sub(v, w) ! PyIntObject *v; ! PyIntObject *w; { register long a, b, x; --- 298,302 ---- static PyObject * ! int_sub(PyIntObject *v, PyIntObject *w) { register long a, b, x; *************** *** 358,364 **** static PyObject * ! int_mul(v, w) ! PyIntObject *v; ! PyIntObject *w; { long a, b, ah, bh, x, y; --- 339,343 ---- static PyObject * ! int_mul(PyIntObject *v, PyIntObject *w) { long a, b, ah, bh, x, y; *************** *** 459,465 **** static int ! i_divmod(x, y, p_xdivy, p_xmody) ! register PyIntObject *x, *y; ! long *p_xdivy, *p_xmody; { long xi = x->ob_ival; --- 438,443 ---- static int ! i_divmod(register PyIntObject *x, register PyIntObject *y, ! long *p_xdivy, long *p_xmody) { long xi = x->ob_ival; *************** *** 501,507 **** static PyObject * ! int_div(x, y) ! PyIntObject *x; ! PyIntObject *y; { long d, m; --- 479,483 ---- static PyObject * ! int_div(PyIntObject *x, PyIntObject *y) { long d, m; *************** *** 512,518 **** static PyObject * ! int_mod(x, y) ! PyIntObject *x; ! PyIntObject *y; { long d, m; --- 488,492 ---- static PyObject * ! int_mod(PyIntObject *x, PyIntObject *y) { long d, m; *************** *** 523,529 **** static PyObject * ! int_divmod(x, y) ! PyIntObject *x; ! PyIntObject *y; { long d, m; --- 497,501 ---- static PyObject * ! int_divmod(PyIntObject *x, PyIntObject *y) { long d, m; *************** *** 534,541 **** static PyObject * ! int_pow(v, w, z) ! PyIntObject *v; ! PyIntObject *w; ! PyIntObject *z; { #if 1 --- 506,510 ---- static PyObject * ! int_pow(PyIntObject *v, PyIntObject *w, PyIntObject *z) { #if 1 *************** *** 633,638 **** static PyObject * ! int_neg(v) ! PyIntObject *v; { register long a, x; --- 602,606 ---- static PyObject * ! int_neg(PyIntObject *v) { register long a, x; *************** *** 645,650 **** static PyObject * ! int_pos(v) ! PyIntObject *v; { Py_INCREF(v); --- 613,617 ---- static PyObject * ! int_pos(PyIntObject *v) { Py_INCREF(v); *************** *** 653,658 **** static PyObject * ! int_abs(v) ! PyIntObject *v; { if (v->ob_ival >= 0) --- 620,624 ---- static PyObject * ! int_abs(PyIntObject *v) { if (v->ob_ival >= 0) *************** *** 663,668 **** static int ! int_nonzero(v) ! PyIntObject *v; { return v->ob_ival != 0; --- 629,633 ---- static int ! int_nonzero(PyIntObject *v) { return v->ob_ival != 0; *************** *** 670,675 **** static PyObject * ! int_invert(v) ! PyIntObject *v; { return PyInt_FromLong(~v->ob_ival); --- 635,639 ---- static PyObject * ! int_invert(PyIntObject *v) { return PyInt_FromLong(~v->ob_ival); *************** *** 677,683 **** static PyObject * ! int_lshift(v, w) ! PyIntObject *v; ! PyIntObject *w; { register long a, b; --- 641,645 ---- static PyObject * ! int_lshift(PyIntObject *v, PyIntObject *w) { register long a, b; *************** *** 700,706 **** static PyObject * ! int_rshift(v, w) ! PyIntObject *v; ! PyIntObject *w; { register long a, b; --- 662,666 ---- static PyObject * ! int_rshift(PyIntObject *v, PyIntObject *w) { register long a, b; *************** *** 728,734 **** static PyObject * ! int_and(v, w) ! PyIntObject *v; ! PyIntObject *w; { register long a, b; --- 688,692 ---- static PyObject * ! int_and(PyIntObject *v, PyIntObject *w) { register long a, b; *************** *** 739,745 **** static PyObject * ! int_xor(v, w) ! PyIntObject *v; ! PyIntObject *w; { register long a, b; --- 697,701 ---- static PyObject * ! int_xor(PyIntObject *v, PyIntObject *w) { register long a, b; *************** *** 750,756 **** static PyObject * ! int_or(v, w) ! PyIntObject *v; ! PyIntObject *w; { register long a, b; --- 706,710 ---- static PyObject * ! int_or(PyIntObject *v, PyIntObject *w) { register long a, b; *************** *** 761,766 **** static PyObject * ! int_int(v) ! PyIntObject *v; { Py_INCREF(v); --- 715,719 ---- static PyObject * ! int_int(PyIntObject *v) { Py_INCREF(v); *************** *** 769,774 **** static PyObject * ! int_long(v) ! PyIntObject *v; { return PyLong_FromLong((v -> ob_ival)); --- 722,726 ---- static PyObject * ! int_long(PyIntObject *v) { return PyLong_FromLong((v -> ob_ival)); *************** *** 776,781 **** static PyObject * ! int_float(v) ! PyIntObject *v; { return PyFloat_FromDouble((double)(v -> ob_ival)); --- 728,732 ---- static PyObject * ! int_float(PyIntObject *v) { return PyFloat_FromDouble((double)(v -> ob_ival)); *************** *** 783,788 **** static PyObject * ! int_oct(v) ! PyIntObject *v; { char buf[100]; --- 734,738 ---- static PyObject * ! int_oct(PyIntObject *v) { char buf[100]; *************** *** 796,801 **** static PyObject * ! int_hex(v) ! PyIntObject *v; { char buf[100]; --- 746,750 ---- static PyObject * ! int_hex(PyIntObject *v) { char buf[100]; *************** *** 850,854 **** void ! PyInt_Fini() { PyIntObject *p; --- 799,803 ---- void ! PyInt_Fini(void) { PyIntObject *p; Index: listobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v retrieving revision 2.79 retrieving revision 2.80 diff -C2 -r2.79 -r2.80 *** listobject.c 2000/07/01 01:00:38 2.79 --- listobject.c 2000/07/09 15:16:51 2.80 *************** *** 23,28 **** static int ! roundupsize(n) ! int n; { if (n < 500) --- 23,27 ---- static int ! roundupsize(int n) { if (n < 500) *************** *** 35,40 **** PyObject * ! PyList_New(size) ! int size; { int i; --- 34,38 ---- PyObject * ! PyList_New(int size) { int i; *************** *** 75,80 **** int ! PyList_Size(op) ! PyObject *op; { if (!PyList_Check(op)) { --- 73,77 ---- int ! PyList_Size(PyObject *op) { if (!PyList_Check(op)) { *************** *** 89,95 **** PyObject * ! PyList_GetItem(op, i) ! PyObject *op; ! int i; { if (!PyList_Check(op)) { --- 86,90 ---- PyObject * ! PyList_GetItem(PyObject *op, int i) { if (!PyList_Check(op)) { *************** *** 108,115 **** int ! PyList_SetItem(op, i, newitem) ! register PyObject *op; ! register int i; ! register PyObject *newitem; { register PyObject *olditem; --- 103,108 ---- int ! PyList_SetItem(register PyObject *op, register int i, ! register PyObject *newitem) { register PyObject *olditem; *************** *** 134,141 **** static int ! ins1(self, where, v) ! PyListObject *self; ! int where; ! PyObject *v; { int i; --- 127,131 ---- static int ! ins1(PyListObject *self, int where, PyObject *v) { int i; *************** *** 165,172 **** int ! PyList_Insert(op, where, newitem) ! PyObject *op; ! int where; ! PyObject *newitem; { if (!PyList_Check(op)) { --- 155,159 ---- int ! PyList_Insert(PyObject *op, int where, PyObject *newitem) { if (!PyList_Check(op)) { *************** *** 178,184 **** int ! PyList_Append(op, newitem) ! PyObject *op; ! PyObject *newitem; { if (!PyList_Check(op)) { --- 165,169 ---- int ! PyList_Append(PyObject *op, PyObject *newitem) { if (!PyList_Check(op)) { *************** *** 193,198 **** static void ! list_dealloc(op) ! PyListObject *op; { int i; --- 178,182 ---- static void ! list_dealloc(PyListObject *op) { int i; *************** *** 216,223 **** static int ! list_print(op, fp, flags) ! PyListObject *op; ! FILE *fp; ! int flags; { int i; --- 200,204 ---- static int ! list_print(PyListObject *op, FILE *fp, int flags) { int i; *************** *** 245,250 **** static PyObject * ! list_repr(v) ! PyListObject *v; { PyObject *s, *comma; --- 226,230 ---- static PyObject * ! list_repr(PyListObject *v) { PyObject *s, *comma; *************** *** 271,276 **** static int ! list_compare(v, w) ! PyListObject *v, *w; { int i; --- 251,255 ---- static int ! list_compare(PyListObject *v, PyListObject *w) { int i; *************** *** 284,289 **** static int ! list_length(a) ! PyListObject *a; { return a->ob_size; --- 263,267 ---- static int ! list_length(PyListObject *a) { return a->ob_size; *************** *** 293,299 **** static int ! list_contains(a, el) ! PyListObject *a; ! PyObject *el; { int i, cmp; --- 271,275 ---- static int ! list_contains(PyListObject *a, PyObject *el) { int i, cmp; *************** *** 311,317 **** static PyObject * ! list_item(a, i) ! PyListObject *a; ! int i; { if (i < 0 || i >= a->ob_size) { --- 287,291 ---- static PyObject * ! list_item(PyListObject *a, int i) { if (i < 0 || i >= a->ob_size) { *************** *** 327,333 **** static PyObject * ! list_slice(a, ilow, ihigh) ! PyListObject *a; ! int ilow, ihigh; { PyListObject *np; --- 301,305 ---- static PyObject * ! list_slice(PyListObject *a, int ilow, int ihigh) { PyListObject *np; *************** *** 353,359 **** PyObject * ! PyList_GetSlice(a, ilow, ihigh) ! PyObject *a; ! int ilow, ihigh; { if (!PyList_Check(a)) { --- 325,329 ---- PyObject * ! PyList_GetSlice(PyObject *a, int ilow, int ihigh) { if (!PyList_Check(a)) { *************** *** 365,371 **** static PyObject * ! list_concat(a, bb) ! PyListObject *a; ! PyObject *bb; { int size; --- 335,339 ---- static PyObject * ! list_concat(PyListObject *a, PyObject *bb) { int size; *************** *** 399,405 **** static PyObject * ! list_repeat(a, n) ! PyListObject *a; ! int n; { int i, j; --- 367,371 ---- static PyObject * ! list_repeat(PyListObject *a, int n) { int i, j; *************** *** 425,432 **** static int ! list_ass_slice(a, ilow, ihigh, v) ! PyListObject *a; ! int ilow, ihigh; ! PyObject *v; { /* Because [X]DECREF can recursively invoke list operations on --- 391,395 ---- static int ! list_ass_slice(PyListObject *a, int ilow, int ihigh, PyObject *v) { /* Because [X]DECREF can recursively invoke list operations on *************** *** 516,523 **** int ! PyList_SetSlice(a, ilow, ihigh, v) ! PyObject *a; ! int ilow, ihigh; ! PyObject *v; { if (!PyList_Check(a)) { --- 479,483 ---- int ! PyList_SetSlice(PyObject *a, int ilow, int ihigh, PyObject *v) { if (!PyList_Check(a)) { *************** *** 529,536 **** static int ! list_ass_item(a, i, v) ! PyListObject *a; ! int i; ! PyObject *v; { PyObject *old_value; --- 489,493 ---- static int ! list_ass_item(PyListObject *a, int i, PyObject *v) { PyObject *old_value; *************** *** 550,557 **** static PyObject * ! ins(self, where, v) ! PyListObject *self; ! int where; ! PyObject *v; { if (ins1(self, where, v) != 0) --- 507,511 ---- static PyObject * ! ins(PyListObject *self, int where, PyObject *v) { if (ins1(self, where, v) != 0) *************** *** 562,568 **** static PyObject * ! listinsert(self, args) ! PyListObject *self; ! PyObject *args; { int i; --- 516,520 ---- static PyObject * ! listinsert(PyListObject *self, PyObject *args) { int i; *************** *** 588,594 **** static PyObject * ! listappend(self, args) ! PyListObject *self; ! PyObject *args; { PyObject *v; --- 540,544 ---- static PyObject * ! listappend(PyListObject *self, PyObject *args) { PyObject *v; *************** *** 599,605 **** static PyObject * ! listextend(self, args) ! PyListObject *self; ! PyObject *args; { PyObject *b = NULL, *res = NULL; --- 549,553 ---- static PyObject * ! listextend(PyListObject *self, PyObject *args) { PyObject *b = NULL, *res = NULL; *************** *** 665,671 **** static PyObject * ! listpop(self, args) ! PyListObject *self; ! PyObject *args; { int i = -1; --- 613,617 ---- static PyObject * ! listpop(PyListObject *self, PyObject *args) { int i = -1; *************** *** 707,714 **** static int ! docompare(x, y, compare) ! PyObject *x; ! PyObject *y; ! PyObject *compare; { PyObject *args, *res; --- 653,657 ---- static int ! docompare(PyObject *x, PyObject *y, PyObject *compare) { PyObject *args, *res; *************** *** 796,804 **** static int ! binarysort(lo, hi, start, compare) ! PyObject **lo; ! PyObject **hi; ! PyObject **start; ! PyObject *compare;/* Comparison function object, or NULL for default */ { /* assert lo <= start <= hi --- 739,744 ---- static int ! binarysort(PyObject **lo, PyObject **hi, PyObject **start, PyObject *compare) ! /* compare -- comparison function object, or NULL for default */ { /* assert lo <= start <= hi *************** *** 930,937 **** static int ! samplesortslice(lo, hi, compare) ! PyObject **lo; ! PyObject **hi; ! PyObject *compare;/* Comparison function object, or NULL for default */ { register PyObject **l, **r; --- 870,875 ---- static int ! samplesortslice(PyObject **lo, PyObject **hi, PyObject *compare) ! /* compare -- comparison function object, or NULL for default */ { register PyObject **l, **r; *************** *** 1236,1242 **** static PyObject * ! listsort(self, args) ! PyListObject *self; ! PyObject *args; { int err; --- 1174,1178 ---- static PyObject * ! listsort(PyListObject *self, PyObject *args) { int err; *************** *** 1259,1264 **** int ! PyList_Sort(v) ! PyObject *v; { if (v == NULL || !PyList_Check(v)) { --- 1195,1199 ---- int ! PyList_Sort(PyObject *v) { if (v == NULL || !PyList_Check(v)) { *************** *** 1274,1280 **** static PyObject * ! listreverse(self, args) ! PyListObject *self; ! PyObject *args; { register PyObject **p, **q; --- 1209,1213 ---- static PyObject * ! listreverse(PyListObject *self, PyObject *args) { register PyObject **p, **q; *************** *** 1298,1303 **** int ! PyList_Reverse(v) ! PyObject *v; { if (v == NULL || !PyList_Check(v)) { --- 1231,1235 ---- int ! PyList_Reverse(PyObject *v) { if (v == NULL || !PyList_Check(v)) { *************** *** 1313,1318 **** PyObject * ! PyList_AsTuple(v) ! PyObject *v; { PyObject *w; --- 1245,1249 ---- PyObject * ! PyList_AsTuple(PyObject *v) { PyObject *w; *************** *** 1339,1345 **** static PyObject * ! listindex(self, args) ! PyListObject *self; ! PyObject *args; { int i; --- 1270,1274 ---- static PyObject * ! listindex(PyListObject *self, PyObject *args) { int i; *************** *** 1359,1365 **** static PyObject * ! listcount(self, args) ! PyListObject *self; ! PyObject *args; { int count = 0; --- 1288,1292 ---- static PyObject * ! listcount(PyListObject *self, PyObject *args) { int count = 0; *************** *** 1379,1385 **** static PyObject * ! listremove(self, args) ! PyListObject *self; ! PyObject *args; { int i; --- 1306,1310 ---- static PyObject * ! listremove(PyListObject *self, PyObject *args) { int i; *************** *** 1460,1466 **** static PyObject * ! list_getattr(f, name) ! PyListObject *f; ! char *name; { return Py_FindMethod(list_methods, (PyObject *)f, name); --- 1385,1389 ---- static PyObject * ! list_getattr(PyListObject *f, char *name) { return Py_FindMethod(list_methods, (PyObject *)f, name); *************** *** 1513,1517 **** static PyObject * ! immutable_list_op(/*No args!*/) { PyErr_SetString(PyExc_TypeError, --- 1436,1440 ---- static PyObject * ! immutable_list_op(void) { PyErr_SetString(PyExc_TypeError, *************** *** 1532,1538 **** static PyObject * ! immutable_list_getattr(f, name) ! PyListObject *f; ! char *name; { return Py_FindMethod(immutable_list_methods, (PyObject *)f, name); --- 1455,1459 ---- static PyObject * ! immutable_list_getattr(PyListObject *f, char *name) { return Py_FindMethod(immutable_list_methods, (PyObject *)f, name); *************** *** 1540,1544 **** static int ! immutable_list_ass(/*No args!*/) { immutable_list_op(); --- 1461,1465 ---- static int ! immutable_list_ass(void) { immutable_list_op(); *************** *** 1582,1584 **** (traverseproc)list_traverse, /* tp_traverse */ }; - --- 1503,1504 ---- From python-dev@python.org Sun Jul 9 16:48:52 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 9 Jul 2000 08:48:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects object.c,2.84,2.85 Message-ID: <200007091548.IAA16653@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv16646 Modified Files: object.c Log Message: ANSI-fication of the sources. Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.84 retrieving revision 2.85 diff -C2 -r2.84 -r2.85 *** object.c 2000/07/09 03:09:56 2.84 --- object.c 2000/07/09 15:48:49 2.85 *************** *** 34,38 **** extern int null_strings, one_strings; void ! dump_counts() { PyTypeObject *tp; --- 34,38 ---- extern int null_strings, one_strings; void ! dump_counts(void) { PyTypeObject *tp; *************** *** 51,55 **** PyObject * ! get_counts() { PyTypeObject *tp; --- 51,55 ---- PyObject * ! get_counts(void) { PyTypeObject *tp; *************** *** 78,83 **** void ! inc_count(tp) ! PyTypeObject *tp; { if (tp->tp_alloc == 0) { --- 78,82 ---- void ! inc_count(PyTypeObject *tp) { if (tp->tp_alloc == 0) { *************** *** 95,101 **** PyObject * ! PyObject_Init(op, tp) ! PyObject *op; ! PyTypeObject *tp; { if (op == NULL) { --- 94,98 ---- PyObject * ! PyObject_Init(PyObject *op, PyTypeObject *tp) { if (op == NULL) { *************** *** 115,122 **** PyVarObject * ! PyObject_InitVar(op, tp, size) ! PyVarObject *op; ! PyTypeObject *tp; ! int size; { if (op == NULL) { --- 112,116 ---- PyVarObject * ! PyObject_InitVar(PyVarObject *op, PyTypeObject *tp, int size) { if (op == NULL) { *************** *** 137,142 **** PyObject * ! _PyObject_New(tp) ! PyTypeObject *tp; { PyObject *op; --- 131,135 ---- PyObject * ! _PyObject_New(PyTypeObject *tp) { PyObject *op; *************** *** 152,158 **** PyVarObject * ! _PyObject_NewVar(tp, size) ! PyTypeObject *tp; ! int size; { PyVarObject *op; --- 145,149 ---- PyVarObject * ! _PyObject_NewVar(PyTypeObject *tp, int size) { PyVarObject *op; *************** *** 168,173 **** void ! _PyObject_Del(op) ! PyObject *op; { #ifdef WITH_CYCLE_GC --- 159,163 ---- void ! _PyObject_Del(PyObject *op) { #ifdef WITH_CYCLE_GC *************** *** 186,193 **** int ! PyObject_Print(op, fp, flags) ! PyObject *op; ! FILE *fp; ! int flags; { int ret = 0; --- 176,180 ---- int ! PyObject_Print(PyObject *op, FILE *fp, int flags) { int ret = 0; *************** *** 242,247 **** PyObject * ! PyObject_Repr(v) ! PyObject *v; { if (PyErr_CheckSignals()) --- 229,233 ---- PyObject * ! PyObject_Repr(PyObject *v) { if (PyErr_CheckSignals()) *************** *** 287,292 **** PyObject * ! PyObject_Str(v) ! PyObject *v; { PyObject *res; --- 273,277 ---- PyObject * ! PyObject_Str(PyObject *v) { PyObject *res; *************** *** 332,337 **** static PyObject * ! do_cmp(v, w) ! PyObject *v, *w; { long c; --- 317,321 ---- static PyObject * ! do_cmp(PyObject *v, PyObject *w) { long c; *************** *** 358,362 **** static PyObject* ! get_inprogress_dict() { PyObject *tstate_dict, *inprogress; --- 342,346 ---- static PyObject* ! get_inprogress_dict(void) { PyObject *tstate_dict, *inprogress; *************** *** 384,389 **** static PyObject * ! make_pair(v, w) ! PyObject *v, *w; { PyObject *pair; --- 368,372 ---- static PyObject * ! make_pair(PyObject *v, PyObject *w) { PyObject *pair; *************** *** 404,409 **** int ! PyObject_Compare(v, w) ! PyObject *v, *w; { PyTypeObject *vtp, *wtp; --- 387,391 ---- int ! PyObject_Compare(PyObject *v, PyObject *w) { PyTypeObject *vtp, *wtp; *************** *** 542,547 **** long ! _Py_HashDouble(v) ! double v; { /* Use frexp to get at the bits in the double. --- 524,528 ---- long ! _Py_HashDouble(double v) { /* Use frexp to get at the bits in the double. *************** *** 567,572 **** long ! _Py_HashPointer(p) ! void *p; { #if SIZEOF_LONG >= SIZEOF_VOID_P --- 548,552 ---- long ! _Py_HashPointer(void *p) { #if SIZEOF_LONG >= SIZEOF_VOID_P *************** *** 591,596 **** long ! PyObject_Hash(v) ! PyObject *v; { PyTypeObject *tp = v->ob_type; --- 571,575 ---- long ! PyObject_Hash(PyObject *v) { PyTypeObject *tp = v->ob_type; *************** *** 606,612 **** PyObject * ! PyObject_GetAttrString(v, name) ! PyObject *v; ! char *name; { if (v->ob_type->tp_getattro != NULL) { --- 585,589 ---- PyObject * ! PyObject_GetAttrString(PyObject *v, char *name) { if (v->ob_type->tp_getattro != NULL) { *************** *** 633,639 **** int ! PyObject_HasAttrString(v, name) ! PyObject *v; ! char *name; { PyObject *res = PyObject_GetAttrString(v, name); --- 610,614 ---- int ! PyObject_HasAttrString(PyObject *v, char *name) { PyObject *res = PyObject_GetAttrString(v, name); *************** *** 647,654 **** int ! PyObject_SetAttrString(v, name, w) ! PyObject *v; ! char *name; ! PyObject *w; { if (v->ob_type->tp_setattro != NULL) { --- 622,626 ---- int ! PyObject_SetAttrString(PyObject *v, char *name, PyObject *w) { if (v->ob_type->tp_setattro != NULL) { *************** *** 678,684 **** PyObject * ! PyObject_GetAttr(v, name) ! PyObject *v; ! PyObject *name; { if (v->ob_type->tp_getattro != NULL) --- 650,654 ---- PyObject * ! PyObject_GetAttr(PyObject *v, PyObject *name) { if (v->ob_type->tp_getattro != NULL) *************** *** 694,700 **** int ! PyObject_HasAttr(v, name) ! PyObject *v; ! PyObject *name; { PyObject *res = PyObject_GetAttr(v, name); --- 664,668 ---- int ! PyObject_HasAttr(PyObject *v, PyObject *name) { PyObject *res = PyObject_GetAttr(v, name); *************** *** 708,715 **** int ! PyObject_SetAttr(v, name, value) ! PyObject *v; ! PyObject *name; ! PyObject *value; { int err; --- 676,680 ---- int ! PyObject_SetAttr(PyObject *v, PyObject *name, PyObject *value) { int err; *************** *** 736,741 **** int ! PyObject_IsTrue(v) ! PyObject *v; { int res; --- 701,705 ---- int ! PyObject_IsTrue(PyObject *v) { int res; *************** *** 762,767 **** int ! PyObject_Not(v) ! PyObject *v; { int res; --- 726,730 ---- int ! PyObject_Not(PyObject *v) { int res; *************** *** 779,784 **** int ! PyNumber_CoerceEx(pv, pw) ! PyObject **pv, **pw; { register PyObject *v = *pv; --- 742,746 ---- int ! PyNumber_CoerceEx(PyObject **pv, PyObject **pw) { register PyObject *v = *pv; *************** *** 805,810 **** int ! PyNumber_Coerce(pv, pw) ! PyObject **pv, **pw; { int err = PyNumber_CoerceEx(pv, pw); --- 767,771 ---- int ! PyNumber_Coerce(PyObject **pv, PyObject **pw) { int err = PyNumber_CoerceEx(pv, pw); *************** *** 819,824 **** int ! PyCallable_Check(x) ! PyObject *x; { if (x == NULL) --- 780,784 ---- int ! PyCallable_Check(PyObject *x) { if (x == NULL) *************** *** 853,858 **** /* ARGSUSED */ static PyObject * ! none_repr(op) ! PyObject *op; { return PyString_FromString("None"); --- 813,817 ---- /* ARGSUSED */ static PyObject * ! none_repr(PyObject *op) { return PyString_FromString("None"); *************** *** 887,891 **** void ! _Py_ResetReferences() { refchain._ob_prev = refchain._ob_next = &refchain; --- 846,850 ---- void ! _Py_ResetReferences(void) { refchain._ob_prev = refchain._ob_next = &refchain; *************** *** 894,899 **** void ! _Py_NewReference(op) ! PyObject *op; { _Py_RefTotal++; --- 853,857 ---- void ! _Py_NewReference(PyObject *op) { _Py_RefTotal++; *************** *** 909,914 **** void ! _Py_ForgetReference(op) ! register PyObject *op; { #ifdef SLOW_UNREF_CHECK --- 867,871 ---- void ! _Py_ForgetReference(register PyObject *op) { #ifdef SLOW_UNREF_CHECK *************** *** 937,942 **** void ! _Py_Dealloc(op) ! PyObject *op; { destructor dealloc = op->ob_type->tp_dealloc; --- 894,898 ---- void ! _Py_Dealloc(PyObject *op) { destructor dealloc = op->ob_type->tp_dealloc; *************** *** 950,955 **** void ! _Py_PrintReferences(fp) ! FILE *fp; { PyObject *op; --- 906,910 ---- void ! _Py_PrintReferences(FILE *fp) { PyObject *op; *************** *** 964,970 **** PyObject * ! _Py_GetObjects(self, args) ! PyObject *self; ! PyObject *args; { int i, n; --- 919,923 ---- PyObject * ! _Py_GetObjects(PyObject *self, PyObject *args) { int i, n; *************** *** 1008,1013 **** ANY * ! PyMem_Malloc(nbytes) ! size_t nbytes; { #if _PyMem_EXTRA > 0 --- 961,965 ---- ANY * ! PyMem_Malloc(size_t nbytes) { #if _PyMem_EXTRA > 0 *************** *** 1019,1025 **** ANY * ! PyMem_Realloc(p, nbytes) ! ANY *p; ! size_t nbytes; { #if _PyMem_EXTRA > 0 --- 971,975 ---- ANY * ! PyMem_Realloc(ANY *p, size_t nbytes) { #if _PyMem_EXTRA > 0 *************** *** 1031,1036 **** void ! PyMem_Free(p) ! ANY *p; { PyMem_FREE(p); --- 981,985 ---- void ! PyMem_Free(ANY *p) { PyMem_FREE(p); *************** *** 1041,1046 **** ANY * ! PyObject_Malloc(nbytes) ! size_t nbytes; { return PyObject_MALLOC(nbytes); --- 990,994 ---- ANY * ! PyObject_Malloc(size_t nbytes) { return PyObject_MALLOC(nbytes); *************** *** 1048,1054 **** ANY * ! PyObject_Realloc(p, nbytes) ! ANY *p; ! size_t nbytes; { return PyObject_REALLOC(p, nbytes); --- 996,1000 ---- ANY * ! PyObject_Realloc(ANY *p, size_t nbytes) { return PyObject_REALLOC(p, nbytes); *************** *** 1056,1061 **** void ! PyObject_Free(p) ! ANY *p; { PyObject_FREE(p); --- 1002,1006 ---- void ! PyObject_Free(ANY *p) { PyObject_FREE(p); *************** *** 1078,1083 **** int ! Py_ReprEnter(obj) ! PyObject *obj; { PyObject *dict; --- 1023,1027 ---- int ! Py_ReprEnter(PyObject *obj) { PyObject *dict; *************** *** 1107,1112 **** void ! Py_ReprLeave(obj) ! PyObject *obj; { PyObject *dict; --- 1051,1055 ---- void ! Py_ReprLeave(PyObject *obj) { PyObject *dict; *************** *** 1166,1171 **** void ! _PyTrash_deposit_object(op) ! PyObject *op; { int typecode; --- 1109,1113 ---- void ! _PyTrash_deposit_object(PyObject *op) { int typecode; *************** *** 1188,1192 **** void ! _PyTrash_destroy_chain() { while (_PyTrash_delete_later) { --- 1130,1134 ---- void ! _PyTrash_destroy_chain(void) { while (_PyTrash_delete_later) { *************** *** 1218,1220 **** } } - --- 1160,1161 ---- From python-dev@python.org Sun Jul 9 17:27:35 2000 From: python-dev@python.org (Greg Stein) Date: Sun, 9 Jul 2000 09:27:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/ext ext.tex,1.79,1.80 Message-ID: <200007091627.JAA25676@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ext In directory slayer.i.sourceforge.net:/tmp/cvs-serv25663 Modified Files: ext.tex Log Message: needs a space Index: ext.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ext/ext.tex,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -r1.79 -r1.80 *** ext.tex 2000/07/09 03:35:10 1.79 --- ext.tex 2000/07/09 16:27:33 1.80 *************** *** 1604,1608 **** #define PySpam_System_NUM 0 #define PySpam_System_RETURN int ! #define PySpam_System_PROTO(char *command) /* Total number of C API pointers */ --- 1604,1608 ---- #define PySpam_System_NUM 0 #define PySpam_System_RETURN int ! #define PySpam_System_PROTO (char *command) /* Total number of C API pointers */ From python-dev@python.org Sun Jul 9 17:44:29 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 9 Jul 2000 09:44:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib mailbox.py,1.19,1.20 shlex.py,1.8,1.9 Message-ID: <200007091644.JAA26722@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv26713 Modified Files: mailbox.py shlex.py Log Message: Make tabnanny happy. mailbox.py: Convert to 4-space indents. Index: mailbox.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/mailbox.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** mailbox.py 2000/04/04 03:31:39 1.19 --- mailbox.py 2000/07/09 16:44:26 1.20 *************** *** 8,279 **** class _Mailbox: ! def __init__(self, fp): ! self.fp = fp ! self.seekp = 0 ! ! def seek(self, pos, whence=0): ! if whence==1: # Relative to current position ! self.pos = self.pos + pos ! if whence==2: # Relative to file's end ! self.pos = self.stop + pos ! else: # Default - absolute position ! self.pos = self.start + pos ! ! def next(self): ! while 1: ! self.fp.seek(self.seekp) ! try: ! self._search_start() ! except EOFError: ! self.seekp = self.fp.tell() ! return None ! start = self.fp.tell() ! self._search_end() ! self.seekp = stop = self.fp.tell() ! if start <> stop: ! break ! return rfc822.Message(_Subfile(self.fp, start, stop)) class _Subfile: ! def __init__(self, fp, start, stop): ! self.fp = fp ! self.start = start ! self.stop = stop ! self.pos = self.start ! ! def read(self, length = None): ! if self.pos >= self.stop: ! return '' ! remaining = self.stop - self.pos ! if length is None or length < 0: ! length = remaining ! elif length > remaining: ! length = remaining ! self.fp.seek(self.pos) ! data = self.fp.read(length) ! self.pos = self.fp.tell() ! return data ! ! def readline(self, length = None): ! if self.pos >= self.stop: ! return '' ! if length is None: ! length = self.stop - self.pos ! self.fp.seek(self.pos) ! data = self.fp.readline(length) ! self.pos = self.fp.tell() ! return data ! ! def readlines(self, sizehint = -1): ! lines = [] ! while 1: ! line = self.readline() ! if not line: ! break ! lines.append(line) ! if sizehint >= 0: ! sizehint = sizehint - len(line) ! if sizehint <= 0: ! break ! return lines ! ! def tell(self): ! return self.pos - self.start ! ! def seek(self, pos, whence=0): ! if whence == 0: ! self.pos = self.start + pos ! elif whence == 1: ! self.pos = self.pos + pos ! elif whence == 2: ! self.pos = self.stop + pos ! def close(self): ! del self.fp class UnixMailbox(_Mailbox): ! def _search_start(self): ! while 1: ! pos = self.fp.tell() ! line = self.fp.readline() ! if not line: ! raise EOFError ! if line[:5] == 'From ' and self._isrealfromline(line): ! self.fp.seek(pos) ! return ! ! def _search_end(self): ! self.fp.readline() # Throw away header line ! while 1: ! pos = self.fp.tell() ! line = self.fp.readline() ! if not line: ! return ! if line[:5] == 'From ' and self._isrealfromline(line): ! self.fp.seek(pos) ! return ! ! # An overridable mechanism to test for From-line-ness. ! # You can either specify a different regular expression ! # or define a whole new _isrealfromline() method. ! # Note that this only gets called for lines starting with ! # the 5 characters "From ". ! ! _fromlinepattern = r"From \s*[^\s]+\s+\w\w\w\s+\w\w\w\s+\d?\d\s+" \ ! r"\d?\d:\d\d(:\d\d)?(\s+[^\s]+)?\s+\d\d\d\d\s*$" ! _regexp = None ! ! def _isrealfromline(self, line): ! if not self._regexp: ! import re ! self._regexp = re.compile(self._fromlinepattern) ! return self._regexp.match(line) class MmdfMailbox(_Mailbox): - def _search_start(self): - while 1: - line = self.fp.readline() - if not line: - raise EOFError - if line[:5] == '\001\001\001\001\n': - return - - def _search_end(self): - while 1: - pos = self.fp.tell() - line = self.fp.readline() - if not line: - return - if line == '\001\001\001\001\n': - self.fp.seek(pos) - return class MHMailbox: - def __init__(self, dirname): - import re - pat = re.compile('^[0-9][0-9]*$') - self.dirname = dirname - files = os.listdir(self.dirname) - self.boxes = [] - for f in files: - if pat.match(f): - self.boxes.append(f) - - def next(self): - if not self.boxes: - return None - fn = self.boxes[0] - del self.boxes[0] - fp = open(os.path.join(self.dirname, fn)) - return rfc822.Message(fp) class Maildir: ! # Qmail directory mailbox - def __init__(self, dirname): - import string - self.dirname = dirname - self.boxes = [] - - # check for new mail - newdir = os.path.join(self.dirname, 'new') - for file in os.listdir(newdir): - if len(string.split(file, '.')) > 2: - self.boxes.append(os.path.join(newdir, file)) - - # Now check for current mail in this maildir - curdir = os.path.join(self.dirname, 'cur') - for file in os.listdir(curdir): - if len(string.split(file, '.')) > 2: - self.boxes.append(os.path.join(curdir, file)) - - def next(self): - if not self.boxes: - return None - fn = self.boxes[0] - del self.boxes[0] - fp = open(os.path.join(self.dirname, fn)) - return rfc822.Message(fp) class BabylMailbox(_Mailbox): ! def _search_start(self): ! while 1: ! line = self.fp.readline() ! if not line: ! raise EOFError ! if line == '*** EOOH ***\n': ! return ! ! def _search_end(self): ! while 1: ! pos = self.fp.tell() ! line = self.fp.readline() ! if not line: ! return ! if line == '\037\014\n': ! self.fp.seek(pos) ! return def _test(): ! import time ! import sys ! import string ! import os ! ! args = sys.argv[1:] ! if not args: ! for key in 'MAILDIR', 'MAIL', 'LOGNAME', 'USER': ! if os.environ.has_key(key): ! mbox = os.environ[key] ! break ! else: ! print "$MAIL, $LOGNAME nor $USER set -- who are you?" ! return else: ! mbox = args[0] ! if mbox[:1] == '+': ! mbox = os.environ['HOME'] + '/Mail/' + mbox[1:] ! elif not '/' in mbox: ! mbox = '/usr/mail/' + mbox ! if os.path.isdir(mbox): ! if os.path.isdir(os.path.join(mbox, 'cur')): ! mb = Maildir(mbox) ! else: ! mb = MHMailbox(mbox) ! else: ! fp = open(mbox, 'r') ! mb = UnixMailbox(fp) ! ! msgs = [] ! while 1: ! msg = mb.next() ! if msg is None: ! break ! msgs.append(msg) ! if len(args) <= 1: ! msg.fp = None ! if len(args) > 1: ! num = string.atoi(args[1]) ! print 'Message %d body:'%num ! msg = msgs[num-1] ! msg.rewindbody() ! sys.stdout.write(msg.fp.read()) else: ! print 'Mailbox',mbox,'has',len(msgs),'messages:' ! for msg in msgs: ! f = msg.getheader('from') or "" ! s = msg.getheader('subject') or "" ! d = msg.getheader('date') or "" ! print '%20.20s %18.18s %-30.30s'%(f, d[5:], s) if __name__ == '__main__': ! _test() --- 8,278 ---- class _Mailbox: + def __init__(self, fp): + self.fp = fp + self.seekp = 0 + + def seek(self, pos, whence=0): + if whence==1: # Relative to current position + self.pos = self.pos + pos + if whence==2: # Relative to file's end + self.pos = self.stop + pos + else: # Default - absolute position + self.pos = self.start + pos ! def next(self): ! while 1: ! self.fp.seek(self.seekp) ! try: ! self._search_start() ! except EOFError: ! self.seekp = self.fp.tell() ! return None ! start = self.fp.tell() ! self._search_end() ! self.seekp = stop = self.fp.tell() ! if start <> stop: ! break ! return rfc822.Message(_Subfile(self.fp, start, stop)) ! class _Subfile: + def __init__(self, fp, start, stop): + self.fp = fp + self.start = start + self.stop = stop + self.pos = self.start + + def read(self, length = None): + if self.pos >= self.stop: + return '' + remaining = self.stop - self.pos + if length is None or length < 0: + length = remaining + elif length > remaining: + length = remaining + self.fp.seek(self.pos) + data = self.fp.read(length) + self.pos = self.fp.tell() + return data + + def readline(self, length = None): + if self.pos >= self.stop: + return '' + if length is None: + length = self.stop - self.pos + self.fp.seek(self.pos) + data = self.fp.readline(length) + self.pos = self.fp.tell() + return data ! def readlines(self, sizehint = -1): ! lines = [] ! while 1: ! line = self.readline() ! if not line: ! break ! lines.append(line) ! if sizehint >= 0: ! sizehint = sizehint - len(line) ! if sizehint <= 0: ! break ! return lines ! ! def tell(self): ! return self.pos - self.start ! ! def seek(self, pos, whence=0): ! if whence == 0: ! self.pos = self.start + pos ! elif whence == 1: ! self.pos = self.pos + pos ! elif whence == 2: ! self.pos = self.stop + pos ! def close(self): ! del self.fp + class UnixMailbox(_Mailbox): + def _search_start(self): + while 1: + pos = self.fp.tell() + line = self.fp.readline() + if not line: + raise EOFError + if line[:5] == 'From ' and self._isrealfromline(line): + self.fp.seek(pos) + return ! def _search_end(self): ! self.fp.readline() # Throw away header line ! while 1: ! pos = self.fp.tell() ! line = self.fp.readline() ! if not line: ! return ! if line[:5] == 'From ' and self._isrealfromline(line): ! self.fp.seek(pos) ! return ! ! # An overridable mechanism to test for From-line-ness. ! # You can either specify a different regular expression ! # or define a whole new _isrealfromline() method. ! # Note that this only gets called for lines starting with ! # the 5 characters "From ". ! ! _fromlinepattern = r"From \s*[^\s]+\s+\w\w\w\s+\w\w\w\s+\d?\d\s+" \ ! r"\d?\d:\d\d(:\d\d)?(\s+[^\s]+)?\s+\d\d\d\d\s*$" ! _regexp = None ! ! def _isrealfromline(self, line): ! if not self._regexp: ! import re ! self._regexp = re.compile(self._fromlinepattern) ! return self._regexp.match(line) ! class MmdfMailbox(_Mailbox): + def _search_start(self): + while 1: + line = self.fp.readline() + if not line: + raise EOFError + if line[:5] == '\001\001\001\001\n': + return + + def _search_end(self): + while 1: + pos = self.fp.tell() + line = self.fp.readline() + if not line: + return + if line == '\001\001\001\001\n': + self.fp.seek(pos) + return class MHMailbox: + def __init__(self, dirname): + import re + pat = re.compile('^[0-9][0-9]*$') + self.dirname = dirname + files = os.listdir(self.dirname) + self.boxes = [] + for f in files: + if pat.match(f): + self.boxes.append(f) + + def next(self): + if not self.boxes: + return None + fn = self.boxes[0] + del self.boxes[0] + fp = open(os.path.join(self.dirname, fn)) + return rfc822.Message(fp) class Maildir: + # Qmail directory mailbox + + def __init__(self, dirname): + import string + self.dirname = dirname + self.boxes = [] ! # check for new mail ! newdir = os.path.join(self.dirname, 'new') ! for file in os.listdir(newdir): ! if len(string.split(file, '.')) > 2: ! self.boxes.append(os.path.join(newdir, file)) ! ! # Now check for current mail in this maildir ! curdir = os.path.join(self.dirname, 'cur') ! for file in os.listdir(curdir): ! if len(string.split(file, '.')) > 2: ! self.boxes.append(os.path.join(curdir, file)) ! ! def next(self): ! if not self.boxes: ! return None ! fn = self.boxes[0] ! del self.boxes[0] ! fp = open(os.path.join(self.dirname, fn)) ! return rfc822.Message(fp) class BabylMailbox(_Mailbox): + def _search_start(self): + while 1: + line = self.fp.readline() + if not line: + raise EOFError + if line == '*** EOOH ***\n': + return ! def _search_end(self): ! while 1: ! pos = self.fp.tell() ! line = self.fp.readline() ! if not line: ! return ! if line == '\037\014\n': ! self.fp.seek(pos) ! return def _test(): ! import time ! import sys ! import string ! import os ! ! args = sys.argv[1:] ! if not args: ! for key in 'MAILDIR', 'MAIL', 'LOGNAME', 'USER': ! if os.environ.has_key(key): ! mbox = os.environ[key] ! break else: ! print "$MAIL, $LOGNAME nor $USER set -- who are you?" ! return ! else: ! mbox = args[0] ! if mbox[:1] == '+': ! mbox = os.environ['HOME'] + '/Mail/' + mbox[1:] ! elif not '/' in mbox: ! mbox = '/usr/mail/' + mbox ! if os.path.isdir(mbox): ! if os.path.isdir(os.path.join(mbox, 'cur')): ! mb = Maildir(mbox) else: ! mb = MHMailbox(mbox) ! else: ! fp = open(mbox, 'r') ! mb = UnixMailbox(fp) ! ! msgs = [] ! while 1: ! msg = mb.next() ! if msg is None: ! break ! msgs.append(msg) ! if len(args) <= 1: ! msg.fp = None ! if len(args) > 1: ! num = string.atoi(args[1]) ! print 'Message %d body:'%num ! msg = msgs[num-1] ! msg.rewindbody() ! sys.stdout.write(msg.fp.read()) ! else: ! print 'Mailbox',mbox,'has',len(msgs),'messages:' ! for msg in msgs: ! f = msg.getheader('from') or "" ! s = msg.getheader('subject') or "" ! d = msg.getheader('date') or "" ! print '%20.20s %18.18s %-30.30s'%(f, d[5:], s) if __name__ == '__main__': ! _test() Index: shlex.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/shlex.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** shlex.py 2000/07/03 09:56:23 1.8 --- shlex.py 2000/07/09 16:44:26 1.9 *************** *** 18,22 **** self.infile = None self.commenters = '#' ! self.wordchars = 'abcdfeghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_' self.whitespace = ' \t\r\n' self.quotes = '\'"' --- 18,23 ---- self.infile = None self.commenters = '#' ! self.wordchars = ('abcdfeghijklmnopqrstuvwxyz' ! 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_') self.whitespace = ' \t\r\n' self.quotes = '\'"' *************** *** 26,30 **** self.debug = 0 self.token = '' ! self.filestack = [] self.source = None if self.debug: --- 27,31 ---- self.debug = 0 self.token = '' ! self.filestack = [] self.source = None if self.debug: *************** *** 46,50 **** print "shlex: popping token " + `tok` return tok ! # No pushback. Get a token. raw = self.read_token() # Handle inclusions --- 47,51 ---- print "shlex: popping token " + `tok` return tok ! # No pushback. Get a token. raw = self.read_token() # Handle inclusions *************** *** 89,98 **** print "shlex: in state", repr(self.state), \ "I see character:", repr(nextchar) ! if self.state == None: ! self.token = ''; # past end of file break elif self.state == ' ': if not nextchar: ! self.state = None; # end of file break elif nextchar in self.whitespace: --- 90,99 ---- print "shlex: in state", repr(self.state), \ "I see character:", repr(nextchar) ! if self.state is None: ! self.token = ''; # past end of file break elif self.state == ' ': if not nextchar: ! self.state = None; # end of file break elif nextchar in self.whitespace: *************** *** 100,104 **** print "shlex: I see whitespace in whitespace state" if self.token: ! break # emit current token else: continue --- 101,105 ---- print "shlex: I see whitespace in whitespace state" if self.token: ! break # emit current token else: continue *************** *** 115,119 **** self.token = nextchar if self.token: ! break # emit current token else: continue --- 116,120 ---- self.token = nextchar if self.token: ! break # emit current token else: continue *************** *** 125,129 **** elif self.state == 'a': if not nextchar: ! self.state = None; # end of file break elif nextchar in self.whitespace: --- 126,130 ---- elif self.state == 'a': if not nextchar: ! self.state = None; # end of file break elif nextchar in self.whitespace: *************** *** 132,136 **** self.state = ' ' if self.token: ! break # emit current token else: continue --- 133,137 ---- self.state = ' ' if self.token: ! break # emit current token else: continue *************** *** 146,150 **** self.state = ' ' if self.token: ! break # emit current token else: continue --- 147,151 ---- self.state = ' ' if self.token: ! break # emit current token else: continue From python-dev@python.org Sun Jul 9 17:45:58 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 9 Jul 2000 09:45:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib webbrowser.py,NONE,1.1 Message-ID: <200007091645.JAA26779@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv26773 Added Files: webbrowser.py Log Message: New module to control Web browsers; see the documentation for more information. --- NEW FILE --- """Remote-control interfaces to some browsers.""" import os import sys PROCESS_CREATION_DELAY = 4 class Error(Exception): pass _browsers = {} def register(name, klass, instance=None): """Register a browser connector and, optionally, connection.""" _browsers[name.lower()] = [klass, instance] def get(name=None): """Retrieve a connection to a browser by type name, or the default browser.""" name = name or DEFAULT_BROWSER try: L = _browsers[name.lower()] except KeyError: raise ValueError, "unknown browser type: " + `name` if L[1] is None: L[1] = L[0]() return L[1] # Please note: the following definition hides a builtin function. def open(url, new=0): get().open(url, new) def open_new(url): get().open_new(url) def _iscommand(cmd): """Return true if cmd can be found on the executable search path.""" path = os.environ.get("PATH") if not path: return 0 for d in path.split(os.pathsep): exe = os.path.join(d, cmd) if os.path.isfile(exe): return 1 return 0 class CommandLineBrowser: _browsers = [] if os.environ.get("DISPLAY"): _browsers.extend([ ("netscape", "netscape %s >/dev/null &"), ("mosaic", "mosaic %s >/dev/null &"), ]) _browsers.extend([ ("lynx", "lynx %s"), ("w3m", "w3m %s"), ]) def open(self, url, new=0): for exe, cmd in self._browsers: if _iscommand(exe): os.system(cmd % url) return raise Error("could not locate runnable browser") def open_new(self, url): self.open(url) register("command-line", CommandLineBrowser) class Netscape: autoRaise = 1 def _remote(self, action): raise_opt = ("-noraise", "-raise")[self.autoRaise] cmd = "netscape %s -remote '%s' >/dev/null 2>&1" % (raise_opt, action) rc = os.system(cmd) if rc: import time os.system("netscape -no-about-splash &") time.sleep(PROCESS_CREATION_DELAY) rc = os.system(cmd) return not rc def open(self, url, new=0): if new: self.open_new(url) else: self._remote("openURL(%s)" % url) def open_new(self, url): self._remote("openURL(%s, new-window)" % url) register("netscape", Netscape) class Konquerer: """Controller for the KDE File Manager (kfm, or Konquerer). See http://developer.kde.org/documentation/other/kfmclient.html for more information on the Konquerer remote-control interface. """ def _remote(self, action): cmd = "kfmclient %s >/dev/null 2>&1" % action rc = os.system(cmd) if rc: import time os.system("kfm -d &") time.sleep(PROCESS_CREATION_DELAY) rc = os.system(cmd) return not rc def open(self, url, new=1): # XXX currently I know no way to prevent KFM from opening a new win. self.open_new(url) def open_new(self, url): self._remote("openURL %s" % url) register("kfm", Konquerer) class Grail: # There should be a way to maintain a connection to Grail, but the # Grail remote control protocol doesn't really allow that at this # point. It probably never will! def _find_grail_rc(self): import glob import pwd import socket import tempfile tempdir = os.path.join(tempfile.gettempdir(), ".grail-unix") user = pwd.getpwuid(_os.getuid())[0] filename = os.path.join(tempdir, user + "-*") maybes = glob.glob(filename) if not maybes: return None s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) for fn in maybes: # need to PING each one until we find one that's live try: s.connect(fn) except socket.error: # no good; attempt to clean it out, but don't fail: try: os.unlink(fn) except IOError: pass else: return s def _remote(self, action): s = self._find_grail_rc() if not s: return 0 s.send(action) s.close() return 1 def open(self, url, new=0): if new: self.open_new(url) else: self._remote("LOAD " + url) def open_new(self, url): self._remote("LOADNEW " + url) register("grail", Grail) class WindowsDefault: def open(self, url, new=0): import win32api, win32con win32api.ShellExecute(0, "open", url, None, ".", win32con.SW_SHOWNORMAL) def open_new(self, url): self.open(url) DEFAULT_BROWSER = "command-line" if sys.platform[:3] == "win": del _browsers["kfm"] register("windows-default", WindowsDefault) DEFAULT_BROWSER = "windows-default" elif os.environ.get("DISPLAY"): if os.environ.get("KDEDIR"): DEFAULT_BROWSER = "kfm" elif _iscommand("netscape"): DEFAULT_BROWSER = "netscape" # If the $BROWSER environment variable is set and true, let that be # the name of the browser to use: # DEFAULT_BROWSER = os.environ.get("BROWSER") or DEFAULT_BROWSER # Now try to support the MacOS world. This is the only supported # controller on that platform, so don't mess with the default! try: import ic except ImportError: pass else: class InternetConfig: def open(self, url, new=0): ic.launcurl(url) def open_new(self, url): self.open(url) _browsers.clear() register("internet-config", InternetConfig) DEFAULT_BROWSER = "internet-config" From python-dev@python.org Sun Jul 9 18:13:00 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 10:13:00 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib locale.py,1.7,1.8 Message-ID: <200007091713.KAA02613@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv2501/Lib Modified Files: locale.py Log Message: - merged setlocale and set_locale. the internal setlocale function is overridden by a python version which accepts *either* a string (old behaviour) or a locale tuple. - renamed a few methods (for consistency): get_locale => getlocale get_default_locale => getdefaultlocale set_to_default => resetlocale (!) - the _locale implementation module can now implement an optional _getdefaultlocale function. if that function isn't available, a POSIX-based approach is used (checking LANG and other environment variables, as usual). (patch #100765) Index: locale.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/locale.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** locale.py 2000/06/28 14:48:01 1.7 --- locale.py 2000/07/09 17:12:58 1.8 *************** *** 12,24 **** """ ! import string ! ### Load C lib locale APIs or use an emulation try: from _locale import * except ImportError: CHAR_MAX = 127 LC_ALL = 6 --- 12,30 ---- """ ! import string, sys ! # Try importing the _locale module. ! # ! # If this fails, fall back on a basic 'C' locale emulation. ! # try: + from _locale import * except ImportError: + # Locale emulation + CHAR_MAX = 127 LC_ALL = 6 *************** *** 32,36 **** def localeconv(): ! """ localeconv() -> dict. Returns numeric and monetary locale-specific parameters. """ --- 38,42 ---- def localeconv(): ! """ localeconv() -> dict. Returns numeric and monetary locale-specific parameters. """ *************** *** 39,69 **** 'currency_symbol': '', 'n_sign_posn': 127, ! 'p_cs_precedes': 127, ! 'n_cs_precedes': 127, ! 'mon_grouping': [], 'n_sep_by_space': 127, 'decimal_point': '.', 'negative_sign': '', 'positive_sign': '', ! 'p_sep_by_space': 127, 'int_curr_symbol': '', ! 'p_sign_posn': 127, 'thousands_sep': '', ! 'mon_thousands_sep': '', ! 'frac_digits': 127, 'mon_decimal_point': '', 'int_frac_digits': 127} ! def setlocale(category, value=None): ! """ setlocale(integer,string=None) -> string. Activates/queries locale processing. """ if value is not None and \ value is not 'C': ! raise Error,'_locale emulation only supports "C" locale' return 'C' def strcoll(a,b): ! """ strcoll(string,string) -> int. Compares two strings according to the locale. """ --- 45,75 ---- 'currency_symbol': '', 'n_sign_posn': 127, ! 'p_cs_precedes': 127, ! 'n_cs_precedes': 127, ! 'mon_grouping': [], 'n_sep_by_space': 127, 'decimal_point': '.', 'negative_sign': '', 'positive_sign': '', ! 'p_sep_by_space': 127, 'int_curr_symbol': '', ! 'p_sign_posn': 127, 'thousands_sep': '', ! 'mon_thousands_sep': '', ! 'frac_digits': 127, 'mon_decimal_point': '', 'int_frac_digits': 127} ! def setlocale(category, value=None): ! """ setlocale(integer,string=None) -> string. Activates/queries locale processing. """ if value is not None and \ value is not 'C': ! raise Error, '_locale emulation only supports "C" locale' return 'C' def strcoll(a,b): ! """ strcoll(string,string) -> int. Compares two strings according to the locale. """ *************** *** 71,75 **** def strxfrm(s): ! """ strxfrm(string) -> string. Returns a string that behaves for cmp locale-aware. """ --- 77,81 ---- def strxfrm(s): ! """ strxfrm(string) -> string. Returns a string that behaves for cmp locale-aware. """ *************** *** 87,91 **** result="" while s and grouping: ! # if grouping is -1, we are done if grouping[0]==CHAR_MAX: break --- 93,97 ---- result="" while s and grouping: ! # if grouping is -1, we are done if grouping[0]==CHAR_MAX: break *************** *** 108,112 **** def format(f,val,grouping=0): """Formats a value in the same way that the % formatting would use, ! but takes the current locale into account. Grouping is applied if the third parameter is true.""" result = f % val --- 114,118 ---- def format(f,val,grouping=0): """Formats a value in the same way that the % formatting would use, ! but takes the current locale into account. Grouping is applied if the third parameter is true.""" result = f % val *************** *** 119,124 **** return fields[0] else: ! raise Error,"Too many decimal points in result string" ! def str(val): """Convert float to integer, taking the locale into account.""" --- 125,130 ---- return fields[0] else: ! raise Error, "Too many decimal points in result string" ! def str(val): """Convert float to integer, taking the locale into account.""" *************** *** 136,140 **** if dd: s=string.split(str,dd) ! str=string.join(s,'.') #finally, parse the string return func(str) --- 142,146 ---- if dd: s=string.split(str,dd) ! str=string.join(s, '.') #finally, parse the string return func(str) *************** *** 145,159 **** def _test(): ! setlocale(LC_ALL,"") #do grouping ! s1=format("%d",123456789,1) ! print s1,"is",atoi(s1) #standard formatting s1=str(3.14) ! print s1,"is",atof(s1) ### Locale name aliasing engine # Author: Marc-Andre Lemburg, mal@lemburg.com def normalize(localename): --- 151,170 ---- def _test(): ! setlocale(LC_ALL, "") #do grouping ! s1=format("%d", 123456789,1) ! print s1, "is", atoi(s1) #standard formatting s1=str(3.14) ! print s1, "is", atof(s1) ### Locale name aliasing engine # Author: Marc-Andre Lemburg, mal@lemburg.com + # Various tweaks by Fredrik Lundh + + # store away the low-level version of setlocale (it's + # overridden below) + _setlocale = setlocale def normalize(localename): *************** *** 230,234 **** return None, None else: ! raise ValueError,'unknown locale: %s' % localename return l --- 241,245 ---- return None, None else: ! raise ValueError, 'unknown locale: %s' % localename return l *************** *** 248,253 **** else: return language + '.' + encoding ! ! def get_default(envvars=('LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LANG')): """ Tries to determine the default locale settings and returns --- 259,264 ---- else: return language + '.' + encoding ! ! def getdefaultlocale(envvars=('LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LANG')): """ Tries to determine the default locale settings and returns *************** *** 255,260 **** According to POSIX, a program which has not called ! setlocale(LC_ALL,"") runs using the portable 'C' locale. ! Calling setlocale(LC_ALL,"") lets it use the default locale as defined by the LANG variable. Since we don't want to interfere with the current locale setting we thus emulate the behaviour --- 266,271 ---- According to POSIX, a program which has not called ! setlocale(LC_ALL, "") runs using the portable 'C' locale. ! Calling setlocale(LC_ALL, "") lets it use the default locale as defined by the LANG variable. Since we don't want to interfere with the current locale setting we thus emulate the behaviour *************** *** 272,275 **** --- 283,297 ---- """ + try: + # check if it's supported by the _locale module + import _locale + code, encoding = _locale._getdefaultlocale() + if sys.platform == "win32" and code and code[:2] == "0x": + # map windows language identifier to language name + code = windows_locale.get(int(code, 0)) + return code, encoding + except (ImportError, NameError): + pass + # fall back on POSIX behaviour import os lookup = os.environ.get *************** *** 281,286 **** localename = 'C' return _parse_localename(localename) ! def get_locale(category=LC_CTYPE): """ Returns the current setting for the given locale category as --- 303,311 ---- localename = 'C' return _parse_localename(localename) + + # compatibility + get_default = getdefaultlocale ! def getlocale(category=LC_CTYPE): """ Returns the current setting for the given locale category as *************** *** 295,326 **** """ ! localename = setlocale(category) if category == LC_ALL and ';' in localename: ! raise TypeError,'category LC_ALL is not supported' return _parse_localename(localename) ! def set_locale(localetuple, category=LC_ALL): ! """ Set the locale according to the localetuple (language code, ! encoding) as returned by get_locale() and get_default(). ! The given codes are passed through the locale aliasing engine ! before being given to setlocale() for processing. ! category may be given as one of the LC_* values. It defaults ! to LC_ALL. """ ! setlocale(category, normalize(_build_localename(localetuple))) ! def set_to_default(category=LC_ALL): """ Sets the locale for category to the default setting. The default setting is determined by calling ! get_default(). category defaults to LC_ALL. ! """ ! setlocale(category, _build_localename(get_default())) ### Database --- 320,353 ---- """ ! localename = _setlocale(category) if category == LC_ALL and ';' in localename: ! raise TypeError, 'category LC_ALL is not supported' return _parse_localename(localename) ! def setlocale(category, locale=None): ! """ Set the locale for the given category. The locale can be ! a string, a locale tuple (language code, encoding), or None. ! Locale tuples are converted to strings the locale aliasing ! engine. Locale strings are passed directly to the C lib. ! category may be given as one of the LC_* values. """ ! if locale and type(locale) is not type(""): ! # convert to string ! locale = normalize(_build_localename(locale)) ! return _setlocale(category, locale) ! def resetlocale(category=LC_ALL): """ Sets the locale for category to the default setting. The default setting is determined by calling ! getdefaultlocale(). category defaults to LC_ALL. ! """ ! _setlocale(category, _build_localename(getdefaultlocale())) ### Database *************** *** 330,334 **** # definitions and adding some more aliases. The file is usually # available as /usr/lib/X11/locale/locale.alias. ! # # --- 357,361 ---- # definitions and adding some more aliases. The file is usually # available as /usr/lib/X11/locale/locale.alias. ! # # *************** *** 337,374 **** # encoding_alias = { ! '437': 'C', ! 'c': 'C', ! 'iso8859': 'ISO8859-1', ! '8859': 'ISO8859-1', ! '88591': 'ISO8859-1', ! 'ascii': 'ISO8859-1', ! 'en': 'ISO8859-1', ! 'iso88591': 'ISO8859-1', ! 'iso_8859-1': 'ISO8859-1', ! '885915': 'ISO8859-15', ! 'iso885915': 'ISO8859-15', ! 'iso_8859-15': 'ISO8859-15', ! 'iso8859-2': 'ISO8859-2', ! 'iso88592': 'ISO8859-2', ! 'iso_8859-2': 'ISO8859-2', ! 'iso88595': 'ISO8859-5', ! 'iso88596': 'ISO8859-6', ! 'iso88597': 'ISO8859-7', ! 'iso88598': 'ISO8859-8', ! 'iso88599': 'ISO8859-9', ! 'iso-2022-jp': 'JIS7', ! 'jis': 'JIS7', ! 'jis7': 'JIS7', ! 'sjis': 'SJIS', ! 'tis620': 'TACTIS', ! 'ajec': 'eucJP', ! 'eucjp': 'eucJP', ! 'ujis': 'eucJP', ! 'utf-8': 'utf', ! 'utf8': 'utf', ! 'utf8@ucs4': 'utf', } ! # # The locale_alias table maps lowercase alias names to C locale names # (case-sensitive). Encodings are always separated from the locale --- 364,401 ---- # encoding_alias = { ! '437': 'C', ! 'c': 'C', ! 'iso8859': 'ISO8859-1', ! '8859': 'ISO8859-1', ! '88591': 'ISO8859-1', ! 'ascii': 'ISO8859-1', ! 'en': 'ISO8859-1', ! 'iso88591': 'ISO8859-1', ! 'iso_8859-1': 'ISO8859-1', ! '885915': 'ISO8859-15', ! 'iso885915': 'ISO8859-15', ! 'iso_8859-15': 'ISO8859-15', ! 'iso8859-2': 'ISO8859-2', ! 'iso88592': 'ISO8859-2', ! 'iso_8859-2': 'ISO8859-2', ! 'iso88595': 'ISO8859-5', ! 'iso88596': 'ISO8859-6', ! 'iso88597': 'ISO8859-7', ! 'iso88598': 'ISO8859-8', ! 'iso88599': 'ISO8859-9', ! 'iso-2022-jp': 'JIS7', ! 'jis': 'JIS7', ! 'jis7': 'JIS7', ! 'sjis': 'SJIS', ! 'tis620': 'TACTIS', ! 'ajec': 'eucJP', ! 'eucjp': 'eucJP', ! 'ujis': 'eucJP', ! 'utf-8': 'utf', ! 'utf8': 'utf', ! 'utf8@ucs4': 'utf', } ! # # The locale_alias table maps lowercase alias names to C locale names # (case-sensitive). Encodings are always separated from the locale *************** *** 562,565 **** --- 589,632 ---- } + # + # this maps windows language identifiers (as used on Windows 95 and + # earlier) to locale strings. + # + # NOTE: this mapping is incomplete. If your language is missing, send + # a note with the missing language identifier and the suggested locale + # code to Fredrik Lundh . Thanks /F + + windows_locale = { + 0x0404: "zh_TW", # Chinese (Taiwan) + 0x0804: "zh_CN", # Chinese (PRC) + 0x0406: "da_DK", # Danish + 0x0413: "nl_NL", # Dutch (Netherlands) + 0x0409: "en_US", # English (United States) + 0x0809: "en_UK", # English (United Kingdom) + 0x0c09: "en_AU", # English (Australian) + 0x1009: "en_CA", # English (Canadian) + 0x1409: "en_NZ", # English (New Zealand) + 0x1809: "en_IE", # English (Ireland) + 0x1c09: "en_ZA", # English (South Africa) + 0x040b: "fi_FI", # Finnish + 0x040c: "fr_FR", # French (Standard) + 0x080c: "fr_BE", # French (Belgian) + 0x0c0c: "fr_CA", # French (Canadian) + 0x100c: "fr_CH", # French (Switzerland) + 0x0407: "de_DE", # German (Standard) + 0x0408: "el_GR", # Greek + 0x040d: "iw_IL", # Hebrew + 0x040f: "is_IS", # Icelandic + 0x0410: "it_IT", # Italian (Standard) + 0x0411: "ja_JA", # Japanese + 0x0414: "no_NO", # Norwegian (Bokmal) + 0x0816: "pt_PT", # Portuguese (Standard) + 0x0c0a: "es_ES", # Spanish (Modern Sort) + 0x0441: "sw_KE", # Swahili (Kenya) + 0x041d: "sv_SE", # Swedish + 0x081d: "sv_FI", # Swedish (Finland) + 0x041f: "tr_TR", # Turkish + } + def _print_locale(): *************** *** 574,580 **** del categories['LC_ALL'] ! print 'Locale defaults as determined by get_default():' print '-'*72 ! lang, enc = get_default() print 'Language: ', lang or '(undefined)' print 'Encoding: ', enc or '(undefined)' --- 641,647 ---- del categories['LC_ALL'] ! print 'Locale defaults as determined by getdefaultlocale():' print '-'*72 ! lang, enc = getdefaultlocale() print 'Language: ', lang or '(undefined)' print 'Encoding: ', enc or '(undefined)' *************** *** 584,621 **** print '-'*72 for name,category in categories.items(): ! print name,'...' ! lang, enc = get_locale(category) print ' Language: ', lang or '(undefined)' print ' Encoding: ', enc or '(undefined)' print - set_to_default() print ! print 'Locale settings after calling set_to_default():' print '-'*72 for name,category in categories.items(): ! print name,'...' ! lang, enc = get_locale(category) print ' Language: ', lang or '(undefined)' print ' Encoding: ', enc or '(undefined)' print ! try: ! setlocale(LC_ALL,"") except: print 'NOTE:' ! print 'setlocale(LC_ALL,"") does not support the default locale' print 'given in the OS environment variables.' else: print ! print 'Locale settings after calling setlocale(LC_ALL,""):' print '-'*72 for name,category in categories.items(): ! print name,'...' ! lang, enc = get_locale(category) print ' Language: ', lang or '(undefined)' print ' Encoding: ', enc or '(undefined)' print ! ### --- 651,688 ---- print '-'*72 for name,category in categories.items(): ! print name, '...' ! lang, enc = getlocale(category) print ' Language: ', lang or '(undefined)' print ' Encoding: ', enc or '(undefined)' print print ! print 'Locale settings after calling resetlocale():' print '-'*72 + resetlocale() for name,category in categories.items(): ! print name, '...' ! lang, enc = getlocale(category) print ' Language: ', lang or '(undefined)' print ' Encoding: ', enc or '(undefined)' print ! try: ! setlocale(LC_ALL, "") except: print 'NOTE:' ! print 'setlocale(LC_ALL, "") does not support the default locale' print 'given in the OS environment variables.' else: print ! print 'Locale settings after calling setlocale(LC_ALL, ""):' print '-'*72 for name,category in categories.items(): ! print name, '...' ! lang, enc = getlocale(category) print ' Language: ', lang or '(undefined)' print ' Encoding: ', enc or '(undefined)' print ! ### From python-dev@python.org Sun Jul 9 18:41:04 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 10:41:04 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.145,2.146 Message-ID: <200007091741.KAA03939@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv3773/Modules Modified Files: posixmodule.c Log Message: - added optional bufsize argument to new popen methods. for the moment, this argument must be left out or set to -1 (only the default bufsize is supported, that is) Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.145 retrieving revision 2.146 diff -C2 -r2.145 -r2.146 *** posixmodule.c 2000/07/09 14:49:51 2.145 --- posixmodule.c 2000/07/09 17:41:01 2.146 *************** *** 2156,2160 **** char *cmdstring; char *mode = "r"; ! if (!PyArg_ParseTuple(args, "s|s:popen", &cmdstring, &mode)) return NULL; --- 2156,2160 ---- char *cmdstring; char *mode = "r"; ! if (!PyArg_ParseTuple(args, "s|si:popen", &cmdstring, &mode, &bufsize)) return NULL; *************** *** 2169,2172 **** --- 2169,2177 ---- tm = _O_WRONLY; + if (bufsize != -1) { + PyErr_SetString(PyExc_ValueError, "bufsize must be -1"); + return NULL; + } + if (*(mode+1) == 't') f = _PyPopen(cmdstring, tm | _O_TEXT , POPEN_1); *************** *** 2193,2197 **** char *cmdstring; char *mode = "t"; ! if (!PyArg_ParseTuple(args, "s|s:popen2", &cmdstring, &mode)) return NULL; --- 2198,2203 ---- char *cmdstring; char *mode = "t"; ! int bufsize = -1; ! if (!PyArg_ParseTuple(args, "s|si:popen2", &cmdstring, &mode, &bufsize)) return NULL; *************** *** 2204,2208 **** tm = _O_BINARY; ! f = _PyPopen(cmdstring, tm , POPEN_2); return f; --- 2210,2219 ---- tm = _O_BINARY; ! if (bufsize != -1) { ! PyErr_SetString(PyExc_ValueError, "bufsize must be -1"); ! return NULL; ! } ! ! f = _PyPopen(cmdstring, tm, POPEN_2); return f; *************** *** 2224,2228 **** char *cmdstring; char *mode = "t"; ! if (!PyArg_ParseTuple(args, "s|s:Popen3", &cmdstring, &mode)) return NULL; --- 2235,2240 ---- char *cmdstring; char *mode = "t"; ! int bufsize = -1; ! if (!PyArg_ParseTuple(args, "s|si:popen3", &cmdstring, &mode, &bufsize)) return NULL; *************** *** 2235,2238 **** --- 2247,2255 ---- tm = _O_BINARY; + if (bufsize != -1) { + PyErr_SetString(PyExc_ValueError, "bufsize must be -1"); + return NULL; + } + f = _PyPopen(cmdstring, tm, POPEN_3); *************** *** 2255,2259 **** char *cmdstring; char *mode = "t"; ! if (!PyArg_ParseTuple(args, "s|s:popen4", &cmdstring, &mode)) return NULL; --- 2272,2277 ---- char *cmdstring; char *mode = "t"; ! int bufsize = -1; ! if (!PyArg_ParseTuple(args, "s|si:popen4", &cmdstring, &mode, &bufsize)) return NULL; *************** *** 2265,2271 **** } else tm = _O_BINARY; ! f = _PyPopen(cmdstring, tm , POPEN_4); ! return f; } --- 2283,2294 ---- } else tm = _O_BINARY; ! ! if (bufsize != -1) { ! PyErr_SetString(PyExc_ValueError, "bufsize must be -1"); ! return NULL; ! } ! f = _PyPopen(cmdstring, tm , POPEN_4); ! return f; } From python-dev@python.org Sun Jul 9 18:59:34 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 10:59:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.146,2.147 Message-ID: <200007091759.KAA04879@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv4740/Modules Modified Files: posixmodule.c Log Message: - added popen.popen2/popen3/popen4 support for windows. - added optional mode argument to popen2/popen3 for unix; if the second argument is an integer, it's assumed to be the buffer size. - changed nt.popen2/popen3/popen4 return values to match the popen2 module (stdout first, not stdin). Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.146 retrieving revision 2.147 diff -C2 -r2.146 -r2.147 *** posixmodule.c 2000/07/09 17:41:01 2.146 --- posixmodule.c 2000/07/09 17:59:32 2.147 *************** *** 2150,2154 **** posix_popen(PyObject *self, PyObject *args) { - int bufsize = -1; PyObject *f, *s; int tm = 0; --- 2150,2153 ---- *************** *** 2156,2159 **** --- 2155,2159 ---- char *cmdstring; char *mode = "r"; + int bufsize = -1; if (!PyArg_ParseTuple(args, "s|si:popen", &cmdstring, &mode, &bufsize)) return NULL; *************** *** 2175,2181 **** if (*(mode+1) == 't') ! f = _PyPopen(cmdstring, tm | _O_TEXT , POPEN_1); else if (*(mode+1) == 'b') ! f = _PyPopen(cmdstring, tm | _O_BINARY , POPEN_1); else f = _PyPopen(cmdstring, tm | _O_TEXT, POPEN_1); --- 2175,2181 ---- if (*(mode+1) == 't') ! f = _PyPopen(cmdstring, tm | _O_TEXT, POPEN_1); else if (*(mode+1) == 'b') ! f = _PyPopen(cmdstring, tm | _O_BINARY, POPEN_1); else f = _PyPopen(cmdstring, tm | _O_TEXT, POPEN_1); *************** *** 2222,2228 **** /* * Variation on * The result of this function is 3 pipes - the process's stdin, * stdout and stderr - * */ --- 2222,2228 ---- /* * Variation on + * * The result of this function is 3 pipes - the process's stdin, * stdout and stderr */ *************** *** 2289,2293 **** } ! f = _PyPopen(cmdstring, tm , POPEN_4); return f; --- 2289,2293 ---- } ! f = _PyPopen(cmdstring, tm, POPEN_4); return f; *************** *** 2517,2521 **** CloseHandle(hChildStderrRdDup); ! f = Py_BuildValue("OO",p1,p2); break; } --- 2517,2521 ---- CloseHandle(hChildStderrRdDup); ! f = Py_BuildValue("OO",p2,p1); break; } *************** *** 2546,2550 **** PyFile_SetBufSize(p2, 0); PyFile_SetBufSize(p3, 0); ! f = Py_BuildValue("OOO",p1,p2,p3); break; } --- 2546,2550 ---- PyFile_SetBufSize(p2, 0); PyFile_SetBufSize(p3, 0); ! f = Py_BuildValue("OOO",p2,p1,p3); break; } From python-dev@python.org Sun Jul 9 18:59:34 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 10:59:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib popen2.py,1.9,1.10 Message-ID: <200007091759.KAA04874@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv4740/Lib Modified Files: popen2.py Log Message: - added popen.popen2/popen3/popen4 support for windows. - added optional mode argument to popen2/popen3 for unix; if the second argument is an integer, it's assumed to be the buffer size. - changed nt.popen2/popen3/popen4 return values to match the popen2 module (stdout first, not stdin). Index: popen2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/popen2.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** popen2.py 2000/02/04 15:10:34 1.9 --- popen2.py 2000/07/09 17:59:31 1.10 *************** *** 90,118 **** return self.sts ! def popen2(cmd, bufsize=-1): ! """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is ! specified, it sets the buffer size for the I/O pipes. The file objects ! (child_stdout, child_stdin) are returned.""" ! _cleanup() ! inst = Popen3(cmd, 0, bufsize) ! return inst.fromchild, inst.tochild ! def popen3(cmd, bufsize=-1): ! """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is ! specified, it sets the buffer size for the I/O pipes. The file objects ! (child_stdout, child_stdin, child_stderr) are returned.""" ! _cleanup() ! inst = Popen3(cmd, 1, bufsize) ! return inst.fromchild, inst.tochild, inst.childerr def _test(): teststr = "abc\n" print "testing popen2..." r, w = popen2('cat') w.write(teststr) w.close() assert r.read() == teststr print "testing popen3..." ! r, w, e = popen3(['cat']) w.write(teststr) w.close() --- 90,142 ---- return self.sts ! try: ! from os import popen2 ! except NameError: ! def popen2(cmd, mode='t', bufsize=-1): ! """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is ! specified, it sets the buffer size for the I/O pipes. The file objects ! (child_stdout, child_stdin) are returned.""" ! if type(mode) is type(0) and bufsize == -1: ! bufsize = mode ! mode = 't' ! assert mode in ('t', 'b') ! _cleanup() ! inst = Popen3(cmd, 0, bufsize) ! return inst.fromchild, inst.tochild ! try: ! from os import popen3 ! except NameError: ! def popen3(cmd, mode='t', bufsize=-1): ! """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is ! specified, it sets the buffer size for the I/O pipes. The file objects ! (child_stdout, child_stdin, child_stderr) are returned.""" ! if type(mode) is type(0) and bufsize == -1: ! bufsize = mode ! mode = 't' ! assert mode in ('t', 'b') ! _cleanup() ! inst = Popen3(cmd, 1, bufsize) ! return inst.fromchild, inst.tochild, inst.childerr + try: + from os import popen4 + except NameError: + pass # not on unix + def _test(): teststr = "abc\n" print "testing popen2..." r, w = popen2('cat') + print r, w w.write(teststr) w.close() assert r.read() == teststr print "testing popen3..." ! try: ! r, w, e = popen3(['cat']) ! except: ! r, w, e = popen3('cat') ! print r, w, e w.write(teststr) w.close() From python-dev@python.org Sun Jul 9 20:10:22 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 9 Jul 2000 12:10:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/idle EditorWindow.py,1.34,1.35 Message-ID: <200007091910.MAA22797@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/idle In directory slayer.i.sourceforge.net:/tmp/cvs-serv22787 Modified Files: EditorWindow.py Log Message: Update to use the new standard webbrowser module if available, otherwise uses the BrowserControl module. BrowserControl is not removed to allow IDLE to be distributed separately and still be used with Python 1.5.2. Index: EditorWindow.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/idle/EditorWindow.py,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** EditorWindow.py 2000/05/10 17:28:42 1.34 --- EditorWindow.py 2000/07/09 19:10:19 1.35 *************** *** 7,11 **** import tkSimpleDialog import tkMessageBox ! import BrowserControl import idlever import WindowList --- 7,16 ---- import tkSimpleDialog import tkMessageBox ! try: ! import webbrowser ! except ImportError: ! import BrowserControl ! webbrowser = BrowserControl ! del BrowserControl import idlever import WindowList *************** *** 28,31 **** --- 33,37 ---- #$ event <> + #$ unix #$ unix *************** *** 299,303 **** def python_docs(self, event=None): ! BrowserControl.open(self.help_url) def select_all(self, event=None): --- 305,309 ---- def python_docs(self, event=None): ! webbrowser.open(self.help_url) def select_all(self, event=None): From python-dev@python.org Sun Jul 9 21:35:18 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 13:35:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules python.c,2.4,2.5 Message-ID: <200007092035.NAA01855@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv1751/Modules Modified Files: python.c Log Message: - ANSI-fication (patch #100805 by Peter Schneider-Kamp) Index: python.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/python.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** python.c 1998/12/07 14:28:47 2.4 --- python.c 2000/07/09 20:35:15 2.5 *************** *** 6,12 **** int ! main(argc, argv) ! int argc; ! char **argv; { return Py_Main(argc, argv); --- 6,10 ---- int ! main(int argc, char **argv) { return Py_Main(argc, argv); From python-dev@python.org Sun Jul 9 21:42:36 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 13:42:36 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules main.c,1.40,1.41 Message-ID: <200007092042.NAA02112@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2071/Modules Modified Files: main.c Log Message: - changed 1.5 to 2.0 in the help text (the PYTHONHOMEHELP define) - ANSI-fication (patch #100794 by Peter Schneider-Kamp) Index: main.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/main.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -r1.40 -r1.41 *** main.c 2000/06/30 23:58:05 1.40 --- main.c 2000/07/09 20:42:34 1.41 *************** *** 25,29 **** #define PYTHONHOMEHELP "\\lib" #else ! #define PYTHONHOMEHELP "/python1.5" #endif --- 25,29 ---- #define PYTHONHOMEHELP "\\lib" #else ! #define PYTHONHOMEHELP "/python2.0" #endif *************** *** 76,82 **** DL_EXPORT(int) ! Py_Main(argc, argv) ! int argc; ! char **argv; { int c; --- 76,80 ---- DL_EXPORT(int) ! Py_Main(int argc, char **argv) { int c; *************** *** 291,297 **** void ! Py_GetArgcArgv(argc, argv) ! int *argc; ! char ***argv; { *argc = orig_argc; --- 289,293 ---- void ! Py_GetArgcArgv(int *argc, char ***argv) { *argc = orig_argc; From python-dev@python.org Sun Jul 9 22:24:34 2000 From: python-dev@python.org (Barry Warsaw) Date: Sun, 9 Jul 2000 14:24:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib smtplib.py,1.23,1.24 Message-ID: <200007092124.OAA11926@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv11916 Modified Files: smtplib.py Log Message: Use TQSQ (triple quoted single quote) module docstring for better font-locking. This complets the merge with Mailman's version. Index: smtplib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/smtplib.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** smtplib.py 2000/03/28 21:45:46 1.23 --- smtplib.py 2000/07/09 21:24:31 1.24 *************** *** 1,5 **** #! /usr/bin/env python ! """SMTP/ESMTP client class. This should follow RFC 821 (SMTP) and RFC 1869 (ESMTP). --- 1,5 ---- #! /usr/bin/env python ! '''SMTP/ESMTP client class. This should follow RFC 821 (SMTP) and RFC 1869 (ESMTP). *************** *** 30,34 **** (250, "Somebody OverHere ") >>> s.quit() ! """ # Author: The Dragon De Monsyne --- 30,34 ---- (250, "Somebody OverHere ") >>> s.quit() ! ''' # Author: The Dragon De Monsyne From python-dev@python.org Sun Jul 9 23:27:13 2000 From: python-dev@python.org (Barry Warsaw) Date: Sun, 9 Jul 2000 15:27:13 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python exceptions.c,1.5,1.6 Message-ID: <200007092227.PAA22256@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv22242 Modified Files: exceptions.c Log Message: Exception__str__(): In case 1, be sure to decref the tmp local variable. This crushes another memory leak. Slight rewrite included. Index: exceptions.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** exceptions.c 2000/07/09 04:56:25 1.5 --- exceptions.c 2000/07/09 22:27:10 1.6 *************** *** 232,236 **** { PyObject* out; - PyObject* tmp; if (!PyArg_ParseTuple(args, "O", &self)) --- 232,235 ---- *************** *** 246,254 **** break; case 1: ! if (!(tmp = PySequence_GetItem(args, 0))) ! out = NULL; ! else out = PyObject_Str(tmp); break; default: out = PyObject_Str(args); --- 245,258 ---- break; case 1: ! { ! PyObject* tmp = PySequence_GetItem(args, 0); ! if (tmp) { out = PyObject_Str(tmp); + Py_DECREF(tmp); + } + else + out = NULL; break; + } default: out = PyObject_Str(args); From python-dev@python.org Mon Jul 10 00:16:13 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 16:16:13 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib locale.py,1.8,1.9 Message-ID: <200007092316.QAA32289@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv32044/Lib Modified Files: locale.py Log Message: - repaired locale.py for non-windows platforms. the try/except checked for the wrong exception. my fault. sorry. (first reported by Alex Coventry) Index: locale.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/locale.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** locale.py 2000/07/09 17:12:58 1.8 --- locale.py 2000/07/09 23:16:10 1.9 *************** *** 283,296 **** """ try: # check if it's supported by the _locale module import _locale code, encoding = _locale._getdefaultlocale() if sys.platform == "win32" and code and code[:2] == "0x": # map windows language identifier to language name code = windows_locale.get(int(code, 0)) return code, encoding ! except (ImportError, NameError): ! pass # fall back on POSIX behaviour import os --- 283,299 ---- """ + try: # check if it's supported by the _locale module import _locale code, encoding = _locale._getdefaultlocale() + except (ImportError, AttributeError): + pass + else: if sys.platform == "win32" and code and code[:2] == "0x": # map windows language identifier to language name code = windows_locale.get(int(code, 0)) return code, encoding ! # fall back on POSIX behaviour import os From python-dev@python.org Mon Jul 10 00:35:27 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 16:35:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib popen2.py,1.10,1.11 Message-ID: <200007092335.QAA00901@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv840/Lib Modified Files: popen2.py Log Message: - changed the nt.popen2 return values back to (write, read, ...), based on feedback from GvR. - added tuple-swapping code to popen2.py - fixed some runaway indentation in posixmodule.c Index: popen2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/popen2.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** popen2.py 2000/07/09 17:59:31 1.10 --- popen2.py 2000/07/09 23:35:24 1.11 *************** *** 90,100 **** return self.sts ! try: ! from os import popen2 ! except NameError: def popen2(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin) are returned.""" if type(mode) is type(0) and bufsize == -1: bufsize = mode --- 90,105 ---- return self.sts ! if hasattr(os, "popen2"): def popen2(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin) are returned.""" + w, r = os.popen2(cmd, mode, bufsize) + return r, w + else: + def popen2(cmd, mode='t', bufsize=-1): + """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is + specified, it sets the buffer size for the I/O pipes. The file objects + (child_stdout, child_stdin) are returned.""" if type(mode) is type(0) and bufsize == -1: bufsize = mode *************** *** 105,111 **** return inst.fromchild, inst.tochild ! try: ! from os import popen3 ! except NameError: def popen3(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is --- 110,121 ---- return inst.fromchild, inst.tochild ! if hasattr(os, "popen3"): ! def popen3(cmd, mode='t', bufsize=-1): ! """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is ! specified, it sets the buffer size for the I/O pipes. The file objects ! (child_stdout, child_stdin, child_stderr) are returned.""" ! w, r, e = os.popen3(cmd, mode, bufsize) ! return r, w, e ! else: def popen3(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is *************** *** 120,127 **** return inst.fromchild, inst.tochild, inst.childerr ! try: ! from os import popen4 ! except NameError: ! pass # not on unix def _test(): --- 130,142 ---- return inst.fromchild, inst.tochild, inst.childerr ! if hasattr(os, "popen4"): ! def popen4(cmd, mode='t', bufsize=-1): ! """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is ! specified, it sets the buffer size for the I/O pipes. The file objects ! (child_stdout_stderr, child_stdin) are returned.""" ! w, r = os.popen4(cmd, mode, bufsize) ! return r, w ! else: ! pass # not yet on unix def _test(): From python-dev@python.org Mon Jul 10 00:35:27 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 16:35:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.147,2.148 Message-ID: <200007092335.QAA00897@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv840/Modules Modified Files: posixmodule.c Log Message: - changed the nt.popen2 return values back to (write, read, ...), based on feedback from GvR. - added tuple-swapping code to popen2.py - fixed some runaway indentation in posixmodule.c Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.147 retrieving revision 2.148 diff -C2 -r2.147 -r2.148 *** posixmodule.c 2000/07/09 17:59:32 2.147 --- posixmodule.c 2000/07/09 23:35:24 2.148 *************** *** 2296,2302 **** static int _PyPopenCreateProcess(char *cmdstring, ! HANDLE hStdin, ! HANDLE hStdout, ! HANDLE hStderr) { PROCESS_INFORMATION piProcInfo; --- 2296,2302 ---- static int _PyPopenCreateProcess(char *cmdstring, ! HANDLE hStdin, ! HANDLE hStdout, ! HANDLE hStderr) { PROCESS_INFORMATION piProcInfo; *************** *** 2361,2373 **** if (CreateProcess(NULL, ! s2, ! NULL, ! NULL, ! TRUE, ! CREATE_NEW_CONSOLE, ! NULL, ! NULL, ! &siStartInfo, ! &piProcInfo) ) { /* Close the handles now so anyone waiting is woken. */ CloseHandle(piProcInfo.hProcess); --- 2361,2373 ---- if (CreateProcess(NULL, ! s2, ! NULL, ! NULL, ! TRUE, ! CREATE_NEW_CONSOLE, ! NULL, ! NULL, ! &siStartInfo, ! &piProcInfo) ) { /* Close the handles now so anyone waiting is woken. */ CloseHandle(piProcInfo.hProcess); *************** *** 2405,2411 **** * being created. */ fSuccess = DuplicateHandle(GetCurrentProcess(), hChildStdinWr, ! GetCurrentProcess(), &hChildStdinWrDup, 0, ! FALSE, ! DUPLICATE_SAME_ACCESS); if (!fSuccess) return win32_error("DuplicateHandle", NULL); --- 2405,2411 ---- * being created. */ fSuccess = DuplicateHandle(GetCurrentProcess(), hChildStdinWr, ! GetCurrentProcess(), &hChildStdinWrDup, 0, ! FALSE, ! DUPLICATE_SAME_ACCESS); if (!fSuccess) return win32_error("DuplicateHandle", NULL); *************** *** 2419,2425 **** fSuccess = DuplicateHandle(GetCurrentProcess(), hChildStdoutRd, ! GetCurrentProcess(), &hChildStdoutRdDup, 0, ! FALSE, ! DUPLICATE_SAME_ACCESS); if (!fSuccess) return win32_error("DuplicateHandle", NULL); --- 2419,2424 ---- fSuccess = DuplicateHandle(GetCurrentProcess(), hChildStdoutRd, ! GetCurrentProcess(), &hChildStdoutRdDup, 0, ! FALSE, DUPLICATE_SAME_ACCESS); if (!fSuccess) return win32_error("DuplicateHandle", NULL); *************** *** 2432,2439 **** if (!CreatePipe(&hChildStderrRd, &hChildStderrWr, &saAttr, 0)) return win32_error("CreatePipe", NULL); ! fSuccess = DuplicateHandle(GetCurrentProcess(), hChildStderrRd, ! GetCurrentProcess(), &hChildStderrRdDup, 0, ! FALSE, ! DUPLICATE_SAME_ACCESS); if (!fSuccess) return win32_error("DuplicateHandle", NULL); --- 2431,2439 ---- if (!CreatePipe(&hChildStderrRd, &hChildStderrWr, &saAttr, 0)) return win32_error("CreatePipe", NULL); ! fSuccess = DuplicateHandle(GetCurrentProcess(), ! hChildStderrRd, ! GetCurrentProcess(), ! &hChildStderrRdDup, 0, ! FALSE, DUPLICATE_SAME_ACCESS); if (!fSuccess) return win32_error("DuplicateHandle", NULL); *************** *** 2517,2521 **** CloseHandle(hChildStderrRdDup); ! f = Py_BuildValue("OO",p2,p1); break; } --- 2517,2521 ---- CloseHandle(hChildStderrRdDup); ! f = Py_BuildValue("OO",p1,p2); break; } *************** *** 2546,2550 **** PyFile_SetBufSize(p2, 0); PyFile_SetBufSize(p3, 0); ! f = Py_BuildValue("OOO",p2,p1,p3); break; } --- 2546,2550 ---- PyFile_SetBufSize(p2, 0); PyFile_SetBufSize(p3, 0); ! f = Py_BuildValue("OOO",p1,p2,p3); break; } *************** *** 2553,2566 **** if (n == POPEN_4) { if (!_PyPopenCreateProcess(cmdstring, ! hChildStdinRd, ! hChildStdoutWr, ! hChildStdoutWr)) return win32_error("CreateProcess", NULL); } else { if (!_PyPopenCreateProcess(cmdstring, ! hChildStdinRd, ! hChildStdoutWr, ! hChildStderrWr)) return win32_error("CreateProcess", NULL); } --- 2553,2566 ---- if (n == POPEN_4) { if (!_PyPopenCreateProcess(cmdstring, ! hChildStdinRd, ! hChildStdoutWr, ! hChildStdoutWr)) return win32_error("CreateProcess", NULL); } else { if (!_PyPopenCreateProcess(cmdstring, ! hChildStdinRd, ! hChildStdoutWr, ! hChildStderrWr)) return win32_error("CreateProcess", NULL); } From python-dev@python.org Mon Jul 10 05:21:00 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 9 Jul 2000 21:21:00 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules md5.h,2.5,2.6 md5c.c,2.3,2.4 Message-ID: <200007100421.VAA16454@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv16446 Modified Files: md5.h md5c.c Log Message: Guido said include these in the Great ANSI-fication, so here they are! Index: md5.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/md5.h,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** md5.h 1996/07/21 02:34:55 2.5 --- md5.h 2000/07/10 04:20:57 2.6 *************** *** 28,43 **** */ - /* PROTOTYPES should be set to one if and only if the compiler supports - function argument prototyping. - The following makes PROTOTYPES default to 0 if it has not already - been defined with C compiler flags. - */ - #ifdef HAVE_PROTOTYPES - #define PROTOTYPES 1 - #endif - #ifndef PROTOTYPES - #define PROTOTYPES 0 - #endif - /* POINTER defines a generic pointer type */ typedef unsigned char *POINTER; --- 28,31 ---- *************** *** 63,82 **** #endif - /* PROTO_LIST is defined depending on how PROTOTYPES is defined above. - If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it - returns an empty list. - */ - #if PROTOTYPES - #define PROTO_LIST(list) list - #else - #define PROTO_LIST(list) () - #endif /* ========== End global.h; continue md5.h ========== */ /* MD5 context. */ typedef struct { ! UINT4 state[4]; /* state (ABCD) */ ! UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ ! unsigned char buffer[64]; /* input buffer */ } MD5_CTX; --- 51,61 ---- #endif /* ========== End global.h; continue md5.h ========== */ /* MD5 context. */ typedef struct { ! UINT4 state[4]; /* state (ABCD) */ ! UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ ! unsigned char buffer[64]; /* input buffer */ } MD5_CTX; *************** *** 88,93 **** #define MD5Final _Py_MD5Final ! void MD5Init PROTO_LIST ((MD5_CTX *)); ! void MD5Update PROTO_LIST ! ((MD5_CTX *, unsigned char *, unsigned int)); ! void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *)); --- 67,71 ---- #define MD5Final _Py_MD5Final ! void MD5Init(MD5_CTX *); ! void MD5Update(MD5_CTX *, unsigned char *, unsigned int); ! void MD5Final(unsigned char [16], MD5_CTX *); Index: md5c.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/md5c.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** md5c.c 1996/08/19 22:03:48 2.3 --- md5c.c 2000/07/10 04:20:57 2.4 *************** *** 27,32 **** #include "md5.h" ! /* Constants for MD5Transform routine. ! */ #define S11 7 --- 27,31 ---- #include "md5.h" ! /* Constants for MD5Transform routine. */ #define S11 7 *************** *** 47,66 **** #define S44 21 ! static void MD5Transform PROTO_LIST ((UINT4 [4], unsigned char [64])); ! static void Encode PROTO_LIST ! ((unsigned char *, UINT4 *, unsigned int)); ! static void Decode PROTO_LIST ! ((UINT4 *, unsigned char *, unsigned int)); ! static void MD5_memcpy PROTO_LIST ((POINTER, POINTER, unsigned int)); ! static void MD5_memset PROTO_LIST ((POINTER, int, unsigned int)); static unsigned char PADDING[64] = { ! 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; ! /* F, G, H and I are basic MD5 functions. ! */ #define F(x, y, z) (((x) & (y)) | ((~x) & (z))) #define G(x, y, z) (((x) & (z)) | ((y) & (~z))) --- 46,62 ---- #define S44 21 ! static void MD5Transform(UINT4[4], unsigned char[64]); ! static void Encode(unsigned char *, UINT4 *, unsigned int); ! static void Decode(UINT4 *, unsigned char *, unsigned int); ! static void MD5_memcpy(POINTER, POINTER, unsigned int); ! static void MD5_memset(POINTER, int, unsigned int); static unsigned char PADDING[64] = { ! 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; ! /* F, G, H and I are basic MD5 functions. */ #define F(x, y, z) (((x) & (y)) | ((~x) & (z))) #define G(x, y, z) (((x) & (z)) | ((y) & (~z))) *************** *** 68,335 **** #define I(x, y, z) ((y) ^ ((x) | (~z))) ! /* ROTATE_LEFT rotates x left n bits. ! */ #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) /* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. ! Rotation is separate from addition to prevent recomputation. */ #define FF(a, b, c, d, x, s, ac) { \ ! (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \ ! (a) = ROTATE_LEFT ((a), (s)); \ ! (a) += (b); \ ! } #define GG(a, b, c, d, x, s, ac) { \ ! (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \ ! (a) = ROTATE_LEFT ((a), (s)); \ ! (a) += (b); \ ! } #define HH(a, b, c, d, x, s, ac) { \ ! (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \ ! (a) = ROTATE_LEFT ((a), (s)); \ ! (a) += (b); \ ! } #define II(a, b, c, d, x, s, ac) { \ ! (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \ ! (a) = ROTATE_LEFT ((a), (s)); \ ! (a) += (b); \ ! } ! /* MD5 initialization. Begins an MD5 operation, writing a new context. ! */ ! void MD5Init (context) ! MD5_CTX *context; /* context */ { ! context->count[0] = context->count[1] = 0; ! /* Load magic initialization constants. ! */ ! context->state[0] = 0x67452301; ! context->state[1] = 0xefcdab89; ! context->state[2] = 0x98badcfe; ! context->state[3] = 0x10325476; } /* MD5 block update operation. Continues an MD5 message-digest ! operation, processing another message block, and updating the ! context. */ ! void MD5Update (context, input, inputLen) ! MD5_CTX *context; /* context */ ! unsigned char *input; /* input block */ ! unsigned int inputLen; /* length of input block */ { ! unsigned int i, index, partLen; ! /* Compute number of bytes mod 64 */ ! index = (unsigned int)((context->count[0] >> 3) & 0x3F); ! /* Update number of bits */ ! if ((context->count[0] += ((UINT4)inputLen << 3)) ! < ((UINT4)inputLen << 3)) ! context->count[1]++; ! context->count[1] += ((UINT4)inputLen >> 29); ! ! partLen = 64 - index; ! ! /* Transform as many times as possible. ! */ ! if (inputLen >= partLen) { ! MD5_memcpy ! ((POINTER)&context->buffer[index], (POINTER)input, partLen); ! MD5Transform (context->state, context->buffer); ! ! for (i = partLen; i + 63 < inputLen; i += 64) ! MD5Transform (context->state, &input[i]); ! ! index = 0; ! } ! else ! i = 0; ! ! /* Buffer remaining input */ ! MD5_memcpy ! ((POINTER)&context->buffer[index], (POINTER)&input[i], ! inputLen-i); } /* MD5 finalization. Ends an MD5 message-digest operation, writing the ! the message digest and zeroizing the context. */ ! void MD5Final (digest, context) ! unsigned char digest[16]; /* message digest */ ! MD5_CTX *context; /* context */ { ! unsigned char bits[8]; ! unsigned int index, padLen; ! /* Save number of bits */ ! Encode (bits, context->count, 8); ! /* Pad out to 56 mod 64. ! */ ! index = (unsigned int)((context->count[0] >> 3) & 0x3f); ! padLen = (index < 56) ? (56 - index) : (120 - index); ! MD5Update (context, PADDING, padLen); ! ! /* Append length (before padding) */ ! MD5Update (context, bits, 8); ! ! /* Store state in digest */ ! Encode (digest, context->state, 16); ! ! /* Zeroize sensitive information. ! */ ! MD5_memset ((POINTER)context, 0, sizeof (*context)); } ! /* MD5 basic transformation. Transforms state based on block. ! */ ! static void MD5Transform (state, block) ! UINT4 state[4]; ! unsigned char block[64]; { ! UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; ! Decode (x, block, 64); ! /* Round 1 */ ! FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */ ! FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */ ! FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */ ! FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */ ! FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */ ! FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */ ! FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */ ! FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */ ! FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */ ! FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */ ! FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */ ! FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */ ! FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */ ! FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */ ! FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */ ! FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */ ! ! /* Round 2 */ ! GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */ ! GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */ ! GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */ ! GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */ ! GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */ ! GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */ ! GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */ ! GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */ ! GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */ ! GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */ ! GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */ ! GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */ ! GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */ ! GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */ ! GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */ ! GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */ ! ! /* Round 3 */ ! HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */ ! HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */ ! HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */ ! HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */ ! HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */ ! HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */ ! HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */ ! HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */ ! HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */ ! HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */ ! HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */ ! HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */ ! HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */ ! HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */ ! HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */ ! HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */ ! ! /* Round 4 */ ! II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */ ! II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */ ! II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */ ! II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */ ! II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */ ! II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */ ! II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */ ! II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */ ! II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */ ! II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */ ! II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */ ! II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */ ! II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */ ! II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */ ! II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */ ! II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */ ! ! state[0] += a; ! state[1] += b; ! state[2] += c; ! state[3] += d; ! ! /* Zeroize sensitive information. ! */ ! MD5_memset ((POINTER)x, 0, sizeof (x)); } /* Encodes input (UINT4) into output (unsigned char). Assumes len is ! a multiple of 4. */ ! static void Encode (output, input, len) ! unsigned char *output; ! UINT4 *input; ! unsigned int len; { ! unsigned int i, j; ! for (i = 0, j = 0; j < len; i++, j += 4) { ! output[j] = (unsigned char)(input[i] & 0xff); ! output[j+1] = (unsigned char)((input[i] >> 8) & 0xff); ! output[j+2] = (unsigned char)((input[i] >> 16) & 0xff); ! output[j+3] = (unsigned char)((input[i] >> 24) & 0xff); ! } } /* Decodes input (unsigned char) into output (UINT4). Assumes len is ! a multiple of 4. */ ! static void Decode (output, input, len) ! UINT4 *output; ! unsigned char *input; ! unsigned int len; { ! unsigned int i, j; ! for (i = 0, j = 0; j < len; i++, j += 4) ! output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) | ! (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); } - /* Note: Replace "for loop" with standard memcpy if possible. - */ ! static void MD5_memcpy (output, input, len) ! POINTER output; ! POINTER input; ! unsigned int len; { ! unsigned int i; ! for (i = 0; i < len; i++) ! output[i] = input[i]; } ! /* Note: Replace "for loop" with standard memset if possible. ! */ ! static void MD5_memset (output, value, len) ! POINTER output; ! int value; ! unsigned int len; { ! unsigned int i; ! for (i = 0; i < len; i++) ! ((char *)output)[i] = (char)value; } --- 64,314 ---- #define I(x, y, z) ((y) ^ ((x) | (~z))) ! /* ROTATE_LEFT rotates x left n bits. */ #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) /* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. ! Rotation is separate from addition to prevent recomputation. */ #define FF(a, b, c, d, x, s, ac) { \ ! (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \ ! (a) = ROTATE_LEFT ((a), (s)); \ ! (a) += (b); \ ! } #define GG(a, b, c, d, x, s, ac) { \ ! (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \ ! (a) = ROTATE_LEFT ((a), (s)); \ ! (a) += (b); \ ! } #define HH(a, b, c, d, x, s, ac) { \ ! (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \ ! (a) = ROTATE_LEFT ((a), (s)); \ ! (a) += (b); \ ! } #define II(a, b, c, d, x, s, ac) { \ ! (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \ ! (a) = ROTATE_LEFT ((a), (s)); \ ! (a) += (b); \ ! } ! ! /* MD5 initialization. Begins an MD5 operation, writing a new context. */ ! void ! MD5Init(MD5_CTX *context) { ! context->count[0] = context->count[1] = 0; ! /* Load magic initialization constants. */ ! context->state[0] = 0x67452301; ! context->state[1] = 0xefcdab89; ! context->state[2] = 0x98badcfe; ! context->state[3] = 0x10325476; } + /* MD5 block update operation. Continues an MD5 message-digest ! operation, processing another message block, and updating the ! context. */ ! void ! MD5Update(MD5_CTX *context, unsigned char *input, unsigned int inputLen) { ! unsigned int i, index, partLen; ! /* Compute number of bytes mod 64 */ ! index = (unsigned int)((context->count[0] >> 3) & 0x3F); ! /* Update number of bits */ ! if ((context->count[0] += ((UINT4)inputLen << 3)) ! < ((UINT4)inputLen << 3)) ! context->count[1]++; ! context->count[1] += ((UINT4)inputLen >> 29); ! ! partLen = 64 - index; ! ! /* Transform as many times as possible. */ ! if (inputLen >= partLen) { ! MD5_memcpy((POINTER)&context->buffer[index], (POINTER)input, partLen); ! MD5Transform(context->state, context->buffer); ! ! for (i = partLen; i + 63 < inputLen; i += 64) ! MD5Transform(context->state, &input[i]); ! ! index = 0; ! } ! else ! i = 0; ! ! /* Buffer remaining input */ ! MD5_memcpy((POINTER)&context->buffer[index], ! (POINTER)&input[i], inputLen-i); } /* MD5 finalization. Ends an MD5 message-digest operation, writing the ! the message digest and zeroizing the context. */ ! void ! MD5Final(unsigned char digest[16], MD5_CTX *context) { ! unsigned char bits[8]; ! unsigned int index, padLen; ! ! /* Save number of bits */ ! Encode (bits, context->count, 8); ! ! /* Pad out to 56 mod 64. */ ! index = (unsigned int)((context->count[0] >> 3) & 0x3f); ! padLen = (index < 56) ? (56 - index) : (120 - index); ! MD5Update(context, PADDING, padLen); ! ! /* Append length (before padding) */ ! MD5Update(context, bits, 8); ! /* Store state in digest */ ! Encode(digest, context->state, 16); ! /* Zeroize sensitive information. */ ! MD5_memset((POINTER)context, 0, sizeof (*context)); } ! ! /* MD5 basic transformation. Transforms state based on block. */ ! static void ! MD5Transform(UINT4 state[4], unsigned char block[64]) { ! UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; ! Decode (x, block, 64); ! /* Round 1 */ ! FF(a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */ ! FF(d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */ ! FF(c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */ ! FF(b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */ ! FF(a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */ ! FF(d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */ ! FF(c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */ ! FF(b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */ ! FF(a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */ ! FF(d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */ ! FF(c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */ ! FF(b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */ ! FF(a, b, c, d, x[12], S11, 0x6b901122); /* 13 */ ! FF(d, a, b, c, x[13], S12, 0xfd987193); /* 14 */ ! FF(c, d, a, b, x[14], S13, 0xa679438e); /* 15 */ ! FF(b, c, d, a, x[15], S14, 0x49b40821); /* 16 */ ! ! /* Round 2 */ ! GG(a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */ ! GG(d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */ ! GG(c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */ ! GG(b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */ ! GG(a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */ ! GG(d, a, b, c, x[10], S22, 0x2441453); /* 22 */ ! GG(c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */ ! GG(b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */ ! GG(a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */ ! GG(d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */ ! GG(c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */ ! GG(b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */ ! GG(a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */ ! GG(d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */ ! GG(c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */ ! GG(b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */ ! ! /* Round 3 */ ! HH(a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */ ! HH(d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */ ! HH(c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */ ! HH(b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */ ! HH(a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */ ! HH(d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */ ! HH(c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */ ! HH(b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */ ! HH(a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */ ! HH(d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */ ! HH(c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */ ! HH(b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */ ! HH(a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */ ! HH(d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */ ! HH(c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */ ! HH(b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */ ! ! /* Round 4 */ ! II(a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */ ! II(d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */ ! II(c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */ ! II(b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */ ! II(a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */ ! II(d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */ ! II(c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */ ! II(b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */ ! II(a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */ ! II(d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */ ! II(c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */ ! II(b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */ ! II(a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */ ! II(d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */ ! II(c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */ ! II(b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */ ! ! state[0] += a; ! state[1] += b; ! state[2] += c; ! state[3] += d; ! ! /* Zeroize sensitive information. */ ! MD5_memset((POINTER)x, 0, sizeof (x)); } + /* Encodes input (UINT4) into output (unsigned char). Assumes len is ! a multiple of 4. */ ! static void ! Encode(unsigned char *output, UINT4 *input, unsigned int len) { ! unsigned int i, j; ! for (i = 0, j = 0; j < len; i++, j += 4) { ! output[j] = (unsigned char)(input[i] & 0xff); ! output[j+1] = (unsigned char)((input[i] >> 8) & 0xff); ! output[j+2] = (unsigned char)((input[i] >> 16) & 0xff); ! output[j+3] = (unsigned char)((input[i] >> 24) & 0xff); ! } } + /* Decodes input (unsigned char) into output (UINT4). Assumes len is ! a multiple of 4. */ ! static void ! Decode(UINT4 *output, unsigned char *input, unsigned int len) { ! unsigned int i, j; ! for (i = 0, j = 0; j < len; i++, j += 4) { ! output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) | ! (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); ! } } ! /* Note: Replace "for loop" with standard memcpy if possible. */ ! static void ! MD5_memcpy(POINTER output, POINTER input, unsigned int len) { ! unsigned int i; ! for (i = 0; i < len; i++) ! output[i] = input[i]; } ! ! /* Note: Replace "for loop" with standard memset if possible. */ ! static void ! MD5_memset(POINTER output, int value, unsigned int len) { ! unsigned int i; ! for (i = 0; i < len; i++) ! ((char *)output)[i] = (char)value; } From python-dev@python.org Mon Jul 10 05:30:59 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Sun, 9 Jul 2000 21:30:59 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include objimpl.h,2.21,2.22 Message-ID: <200007100430.VAA16909@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv16857 Modified Files: objimpl.h Log Message: A small comment fix just to make sure I got my cvs/ssh setup right. Index: objimpl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/objimpl.h,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** objimpl.h 2000/07/09 00:55:06 2.21 --- objimpl.h 2000/07/10 04:30:56 2.22 *************** *** 70,74 **** */ ! /* The purpose of the object allocator is to make make the distinction between "object memory" and the rest within the Python heap. --- 70,74 ---- */ ! /* The purpose of the object allocator is to make the distinction between "object memory" and the rest within the Python heap. From python-dev@python.org Mon Jul 10 05:59:52 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Sun, 9 Jul 2000 21:59:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include pyport.h,2.1,2.2 Message-ID: <200007100459.VAA18203@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv18165 Modified Files: pyport.h Log Message: Remove the "1" that Tim sticked to the preprocessor symbol for unknown reasons (cf. the rest of the headers in the distribution) Index: pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.1 retrieving revision 2.2 diff -C2 -r2.1 -r2.2 *** pyport.h 2000/07/08 04:17:21 2.1 --- pyport.h 2000/07/10 04:59:49 2.2 *************** *** 8,12 **** #ifndef Py_PYPORT_H ! #define Py_PYPORT_H 1 /************************************************************************** --- 8,12 ---- #ifndef Py_PYPORT_H ! #define Py_PYPORT_H /************************************************************************** From python-dev@python.org Mon Jul 10 06:37:42 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Sun, 9 Jul 2000 22:37:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules gcmodule.c,2.1,2.2 Message-ID: <200007100537.WAA26490@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv26362 Modified Files: gcmodule.c Log Message: Initialize the return value in collect_generations() since it is updated conditionally in the code. Index: gcmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v retrieving revision 2.1 retrieving revision 2.2 diff -C2 -r2.1 -r2.2 *** gcmodule.c 2000/06/30 05:02:53 2.1 --- gcmodule.c 2000/07/10 05:37:39 2.2 *************** *** 456,460 **** static long collections0 = 0; static long collections1 = 0; ! long n; --- 456,460 ---- static long collections0 = 0; static long collections1 = 0; ! long n = 0; From python-dev@python.org Mon Jul 10 09:09:51 2000 From: python-dev@python.org (Sjoerd Mullender) Date: Mon, 10 Jul 2000 01:09:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib xmllib.py,1.20,1.21 Message-ID: <200007100809.BAA21042@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv21011 Modified Files: xmllib.py Log Message: Better error handling of bad entity references. Before when an & in an attribute value was not escaped, you could get two syntax errors: one about a missing semicolon and one about an unknown entity. Now you get only one about a bogus ampersand. Index: xmllib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xmllib.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** xmllib.py 2000/07/04 14:53:12 1.20 --- xmllib.py 2000/07/10 08:09:48 1.21 *************** *** 182,197 **** if res is None: return data ! res = ref.match(data, res.start(0)) if res is None: self.syntax_error("bogus `&'") ! i =i+1 continue i = res.end(0) - if data[i - 1] != ';': - self.syntax_error("`;' missing after entity/char reference") - i = i-1 str = res.group(1) ! pre = data[:res.start(0)] ! post = data[i:] if str[0] == '#': if str[1] == 'x': --- 182,194 ---- if res is None: return data ! s = res.start(0) ! res = ref.match(data, s) if res is None: self.syntax_error("bogus `&'") ! i = s+1 continue i = res.end(0) str = res.group(1) ! rescan = 0 if str[0] == '#': if str[1] == 'x': *************** *** 199,216 **** else: str = chr(string.atoi(str[1:])) ! data = pre + str + post ! i = res.start(0)+len(str) elif all: if self.entitydefs.has_key(str): ! data = pre + self.entitydefs[str] + post ! i = res.start(0) # rescan substituted text else: self.syntax_error("reference to unknown entity `&%s;'" % str) ! # can't do it, so keep the entity ref in ! data = pre + '&' + str + ';' + post ! i = res.start(0) + len(str) + 2 else: ! # just translating character references ! pass # i is already postioned correctly # Internal -- handle data as far as reasonable. May leave state --- 196,225 ---- else: str = chr(string.atoi(str[1:])) ! if data[i - 1] != ';': ! self.syntax_error("`;' missing after char reference") ! i = i-1 elif all: if self.entitydefs.has_key(str): ! str = self.entitydefs[str] ! rescan = 1 ! elif data[i - 1] != ';': ! self.syntax_error("bogus `&'") ! i = s + 1 # just past the & ! continue else: self.syntax_error("reference to unknown entity `&%s;'" % str) ! str = '&' + str + ';' ! elif data[i - 1] != ';': ! self.syntax_error("bogus `&'") ! i = s + 1 # just past the & ! continue ! ! # when we get here, str contains the translated text and i points ! # to the end of the string that is to be replaced ! data = data[:s] + str + data[i:] ! if rescan: ! i = s else: ! i = s + len(str) # Internal -- handle data as far as reasonable. May leave state From python-dev@python.org Mon Jul 10 10:26:44 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 02:26:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules tkappinit.c,1.7,1.8 Message-ID: <200007100926.CAA02580@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2537 Modified Files: tkappinit.c Log Message: ANSI-fication (and test if committing files works now) Index: tkappinit.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/tkappinit.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** tkappinit.c 1999/11/05 18:11:23 1.7 --- tkappinit.c 2000/07/10 09:26:41 1.8 *************** *** 17,22 **** int ! Tcl_AppInit(interp) ! Tcl_Interp *interp; { Tk_Window main; --- 17,21 ---- int ! Tcl_AppInit(Tcl_Interp *interp) { Tk_Window main; From python-dev@python.org Mon Jul 10 10:31:37 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 02:31:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules cmathmodule.c,2.14,2.15 Message-ID: <200007100931.CAA03260@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv3201 Modified Files: cmathmodule.c Log Message: ANSI-fication Index: cmathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cmathmodule.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** cmathmodule.c 2000/07/09 03:09:55 2.14 --- cmathmodule.c 2000/07/10 09:31:34 2.15 *************** *** 42,47 **** ! static Py_complex c_acos(x) ! Py_complex x; { return c_neg(c_prodi(c_log(c_sum(x,c_prod(c_i, --- 42,46 ---- ! static Py_complex c_acos(Py_complex x) { return c_neg(c_prodi(c_log(c_sum(x,c_prod(c_i, *************** *** 55,60 **** ! static Py_complex c_acosh(x) ! Py_complex x; { Py_complex z; --- 54,58 ---- ! static Py_complex c_acosh(Py_complex x) { Py_complex z; *************** *** 71,76 **** ! static Py_complex c_asin(x) ! Py_complex x; { Py_complex z; --- 69,73 ---- ! static Py_complex c_asin(Py_complex x) { Py_complex z; *************** *** 87,92 **** ! static Py_complex c_asinh(x) ! Py_complex x; { /* Break up long expression for WATCOM */ --- 84,88 ---- ! static Py_complex c_asinh(Py_complex x) { /* Break up long expression for WATCOM */ *************** *** 102,107 **** ! static Py_complex c_atan(x) ! Py_complex x; { return c_prod(c_i2,c_log(c_quot(c_sum(c_i,x),c_diff(c_i,x)))); --- 98,102 ---- ! static Py_complex c_atan(Py_complex x) { return c_prod(c_i2,c_log(c_quot(c_sum(c_i,x),c_diff(c_i,x)))); *************** *** 114,119 **** ! static Py_complex c_atanh(x) ! Py_complex x; { return c_prod(c_half,c_log(c_quot(c_sum(c_1,x),c_diff(c_1,x)))); --- 109,113 ---- ! static Py_complex c_atanh(Py_complex x) { return c_prod(c_half,c_log(c_quot(c_sum(c_1,x),c_diff(c_1,x)))); *************** *** 126,131 **** ! static Py_complex c_cos(x) ! Py_complex x; { Py_complex r; --- 120,124 ---- ! static Py_complex c_cos(Py_complex x) { Py_complex r; *************** *** 141,146 **** ! static Py_complex c_cosh(x) ! Py_complex x; { Py_complex r; --- 134,138 ---- ! static Py_complex c_cosh(Py_complex x) { Py_complex r; *************** *** 156,161 **** ! static Py_complex c_exp(x) ! Py_complex x; { Py_complex r; --- 148,152 ---- ! static Py_complex c_exp(Py_complex x) { Py_complex r; *************** *** 172,177 **** ! static Py_complex c_log(x) ! Py_complex x; { Py_complex r; --- 163,167 ---- ! static Py_complex c_log(Py_complex x) { Py_complex r; *************** *** 188,193 **** ! static Py_complex c_log10(x) ! Py_complex x; { Py_complex r; --- 178,182 ---- ! static Py_complex c_log10(Py_complex x) { Py_complex r; *************** *** 205,210 **** /* internal function not available from Python */ ! static Py_complex c_prodi(x) ! Py_complex x; { Py_complex r; --- 194,198 ---- /* internal function not available from Python */ ! static Py_complex c_prodi(Py_complex x) { Py_complex r; *************** *** 215,220 **** ! static Py_complex c_sin(x) ! Py_complex x; { Py_complex r; --- 203,207 ---- ! static Py_complex c_sin(Py_complex x) { Py_complex r; *************** *** 230,235 **** ! static Py_complex c_sinh(x) ! Py_complex x; { Py_complex r; --- 217,221 ---- ! static Py_complex c_sinh(Py_complex x) { Py_complex r; *************** *** 245,250 **** ! static Py_complex c_sqrt(x) ! Py_complex x; { Py_complex r; --- 231,235 ---- ! static Py_complex c_sqrt(Py_complex x) { Py_complex r; *************** *** 277,282 **** ! static Py_complex c_tan(x) ! Py_complex x; { Py_complex r; --- 262,266 ---- ! static Py_complex c_tan(Py_complex x) { Py_complex r; *************** *** 304,309 **** ! static Py_complex c_tanh(x) ! Py_complex x; { Py_complex r; --- 288,292 ---- ! static Py_complex c_tanh(Py_complex x) { Py_complex r; *************** *** 346,352 **** static PyObject * ! math_1(args, func) ! PyObject *args; ! Py_complex (*func)(Py_complex); { Py_complex x; --- 329,333 ---- static PyObject * ! math_1(PyObject *args, Py_complex (*func)(Py_complex)) { Py_complex x; *************** *** 366,370 **** #define FUNC1(stubname, func) \ ! static PyObject * stubname(self, args) PyObject *self, *args; { \ return math_1(args, func); \ } --- 347,351 ---- #define FUNC1(stubname, func) \ ! static PyObject * stubname(PyObject *self, PyObject *args) { \ return math_1(args, func); \ } From python-dev@python.org Mon Jul 10 10:43:27 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 02:43:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules stropmodule.c,2.66,2.67 Message-ID: <200007100943.CAA04678@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv4667 Modified Files: stropmodule.c Log Message: ANSI-fication Index: stropmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/stropmodule.c,v retrieving revision 2.66 retrieving revision 2.67 diff -C2 -r2.66 -r2.67 *** stropmodule.c 2000/07/09 03:09:55 2.66 --- stropmodule.c 2000/07/10 09:43:24 2.67 *************** *** 39,46 **** static PyObject * ! split_whitespace(s, len, maxsplit) ! char *s; ! int len; ! int maxsplit; { int i = 0, j, err; --- 39,43 ---- static PyObject * ! split_whitespace(char *s, int len, int maxsplit) { int i = 0, j, err; *************** *** 108,114 **** static PyObject * ! strop_splitfields(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { int len, n, i, j, err; --- 105,109 ---- static PyObject * ! strop_splitfields(PyObject *self, PyObject *args) { int len, n, i, j, err; *************** *** 179,185 **** static PyObject * ! strop_joinfields(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { PyObject *seq; --- 174,178 ---- static PyObject * ! strop_joinfields(PyObject *self, PyObject *args) { PyObject *seq; *************** *** 311,317 **** static PyObject * ! strop_find(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *s, *sub; --- 304,308 ---- static PyObject * ! strop_find(PyObject *self, PyObject *args) { char *s, *sub; *************** *** 355,361 **** static PyObject * ! strop_rfind(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *s, *sub; --- 346,350 ---- static PyObject * ! strop_rfind(PyObject *self, PyObject *args) { char *s, *sub; *************** *** 390,396 **** static PyObject * ! do_strip(args, striptype) ! PyObject *args; ! int striptype; { char *s; --- 379,383 ---- static PyObject * ! do_strip(PyObject *args, int striptype) { char *s; *************** *** 432,438 **** static PyObject * ! strop_strip(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { return do_strip(args, BOTHSTRIP); --- 419,423 ---- static PyObject * ! strop_strip(PyObject *self, PyObject *args) { return do_strip(args, BOTHSTRIP); *************** *** 446,452 **** static PyObject * ! strop_lstrip(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { return do_strip(args, LEFTSTRIP); --- 431,435 ---- static PyObject * ! strop_lstrip(PyObject *self, PyObject *args) { return do_strip(args, LEFTSTRIP); *************** *** 460,466 **** static PyObject * ! strop_rstrip(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { return do_strip(args, RIGHTSTRIP); --- 443,447 ---- static PyObject * ! strop_rstrip(PyObject *self, PyObject *args) { return do_strip(args, RIGHTSTRIP); *************** *** 474,480 **** static PyObject * ! strop_lower(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *s, *s_new; --- 455,459 ---- static PyObject * ! strop_lower(PyObject *self, PyObject *args) { char *s, *s_new; *************** *** 514,520 **** static PyObject * ! strop_upper(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *s, *s_new; --- 493,497 ---- static PyObject * ! strop_upper(PyObject *self, PyObject *args) { char *s, *s_new; *************** *** 555,561 **** static PyObject * ! strop_capitalize(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *s, *s_new; --- 532,536 ---- static PyObject * ! strop_capitalize(PyObject *self, PyObject *args) { char *s, *s_new; *************** *** 607,613 **** static PyObject * ! strop_expandtabs(self, args) ! PyObject *self; ! PyObject *args; { /* Original by Fredrik Lundh */ --- 582,586 ---- static PyObject * ! strop_expandtabs(PyObject *self, PyObject *args) { /* Original by Fredrik Lundh */ *************** *** 679,685 **** static PyObject * ! strop_count(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *s, *sub; --- 652,656 ---- static PyObject * ! strop_count(PyObject *self, PyObject *args) { char *s, *sub; *************** *** 724,730 **** static PyObject * ! strop_swapcase(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *s, *s_new; --- 695,699 ---- static PyObject * ! strop_swapcase(PyObject *self, PyObject *args) { char *s, *s_new; *************** *** 774,780 **** static PyObject * ! strop_atoi(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *s, *end; --- 743,747 ---- static PyObject * ! strop_atoi(PyObject *self, PyObject *args) { char *s, *end; *************** *** 829,835 **** static PyObject * ! strop_atol(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *s, *end; --- 796,800 ---- static PyObject * ! strop_atol(PyObject *self, PyObject *args) { char *s, *end; *************** *** 875,881 **** static PyObject * ! strop_atof(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { extern double strtod(const char *, char **); --- 840,844 ---- static PyObject * ! strop_atof(PyObject *self, PyObject *args) { extern double strtod(const char *, char **); *************** *** 920,926 **** static PyObject * ! strop_maketrans(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { unsigned char *c, *from=NULL, *to=NULL; --- 883,887 ---- static PyObject * ! strop_maketrans(PyObject *self, PyObject *args) { unsigned char *c, *from=NULL, *to=NULL; *************** *** 959,965 **** static PyObject * ! strop_translate(self, args) ! PyObject *self; ! PyObject *args; { register char *input, *table, *output; --- 920,924 ---- static PyObject * ! strop_translate(PyObject *self, PyObject *args) { register char *input, *table, *output; *************** *** 1039,1047 **** MEM, the function returns -1. */ ! static int mymemfind(mem, len, pat, pat_len) ! char *mem; ! int len; ! char *pat; ! int pat_len; { register int ii; --- 998,1002 ---- MEM, the function returns -1. */ ! static int mymemfind(char *mem, int len, char *pat, int pat_len) { register int ii; *************** *** 1067,1075 **** mem=11111 and pat==11 also return 2. */ ! static int mymemcnt(mem, len, pat, pat_len) ! char *mem; ! int len; ! char *pat; ! int pat_len; { register int offset = 0; --- 1022,1026 ---- mem=11111 and pat==11 also return 2. */ ! static int mymemcnt(char *mem, int len, char *pat, int pat_len) { register int offset = 0; *************** *** 1106,1119 **** NULL if an error occurred. */ ! static char *mymemreplace(str, len, pat, pat_len, sub, sub_len, count, out_len) ! char *str; ! int len; /* input string */ ! char *pat; ! int pat_len; /* pattern string to find */ ! char *sub; ! int sub_len; /* substitution string */ ! int count; /* number of replacements, 0 == all */ ! int *out_len; ! { char *out_s; --- 1057,1061 ---- NULL if an error occurred. */ ! static char *mymemreplace(char *str, int len, char *pat, int pat_len, char *sub, int sub_len, int count, int *out_len) { char *out_s; *************** *** 1176,1182 **** static PyObject * ! strop_replace(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *str, *pat,*sub,*new_s; --- 1118,1122 ---- static PyObject * ! strop_replace(PyObject *self, PyObject *args) { char *str, *pat,*sub,*new_s; From python-dev@python.org Mon Jul 10 10:49:22 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 02:49:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules binascii.c,2.20,2.21 Message-ID: <200007100949.CAA05325@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv5291 Modified Files: binascii.c Log Message: ANSI-fication Index: binascii.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/binascii.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** binascii.c 2000/06/30 23:50:38 2.20 --- binascii.c 2000/07/10 09:49:19 2.21 *************** *** 188,194 **** static PyObject * ! binascii_a2b_uu(self, args) ! PyObject *self; ! PyObject *args; { unsigned char *ascii_data, *bin_data; --- 188,192 ---- static PyObject * ! binascii_a2b_uu(PyObject *self, PyObject *args) { unsigned char *ascii_data, *bin_data; *************** *** 265,271 **** static PyObject * ! binascii_b2a_uu(self, args) ! PyObject *self; ! PyObject *args; { unsigned char *ascii_data, *bin_data; --- 263,267 ---- static PyObject * ! binascii_b2a_uu(PyObject *self, PyObject *args) { unsigned char *ascii_data, *bin_data; *************** *** 316,323 **** static int ! binascii_find_valid(s, slen, num) ! char *s; ! int slen; ! int num; { /* Finds & returns the (num+1)th --- 312,316 ---- static int ! binascii_find_valid(unsigned char *s, int slen, int num) { /* Finds & returns the (num+1)th *************** *** 346,352 **** static PyObject * ! binascii_a2b_base64(self, args) ! PyObject *self; ! PyObject *args; { unsigned char *ascii_data, *bin_data; --- 339,343 ---- static PyObject * ! binascii_a2b_base64(PyObject *self, PyObject *args) { unsigned char *ascii_data, *bin_data; *************** *** 431,437 **** static PyObject * ! binascii_b2a_base64(self, args) ! PyObject *self; ! PyObject *args; { unsigned char *ascii_data, *bin_data; --- 422,426 ---- static PyObject * ! binascii_b2a_base64(PyObject *self, PyObject *args) { unsigned char *ascii_data, *bin_data; *************** *** 484,490 **** static PyObject * ! binascii_a2b_hqx(self, args) ! PyObject *self; ! PyObject *args; { unsigned char *ascii_data, *bin_data; --- 473,477 ---- static PyObject * ! binascii_a2b_hqx(PyObject *self, PyObject *args) { unsigned char *ascii_data, *bin_data; *************** *** 550,556 **** static PyObject * ! binascii_rlecode_hqx(self, args) ! PyObject *self; ! PyObject *args; { unsigned char *in_data, *out_data; --- 537,541 ---- static PyObject * ! binascii_rlecode_hqx(PyObject *self, PyObject *args) { unsigned char *in_data, *out_data; *************** *** 599,605 **** static PyObject * ! binascii_b2a_hqx(self, args) ! PyObject *self; ! PyObject *args; { unsigned char *ascii_data, *bin_data; --- 584,588 ---- static PyObject * ! binascii_b2a_hqx(PyObject *self, PyObject *args) { unsigned char *ascii_data, *bin_data; *************** *** 641,647 **** static PyObject * ! binascii_rledecode_hqx(self, args) ! PyObject *self; ! PyObject *args; { unsigned char *in_data, *out_data; --- 624,628 ---- static PyObject * ! binascii_rledecode_hqx(PyObject *self, PyObject *args) { unsigned char *in_data, *out_data; *************** *** 740,746 **** static PyObject * ! binascii_crc_hqx(self, args) ! PyObject *self; ! PyObject *args; { unsigned char *bin_data; --- 721,725 ---- static PyObject * ! binascii_crc_hqx(PyObject *self, PyObject *args) { unsigned char *bin_data; *************** *** 880,886 **** static PyObject * ! binascii_crc32(self, args) ! PyObject *self; ! PyObject *args; { /* By Jim Ahlstrom; All rights transferred to CNRI */ unsigned char *bin_data; --- 859,863 ---- static PyObject * ! binascii_crc32(PyObject *self, PyObject *args) { /* By Jim Ahlstrom; All rights transferred to CNRI */ unsigned char *bin_data; From python-dev@python.org Mon Jul 10 10:51:19 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 02:51:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules cryptmodule.c,2.6,2.7 Message-ID: <200007100951.CAA05670@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv5607 Modified Files: cryptmodule.c Log Message: ANSI-fication Index: cryptmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cryptmodule.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** cryptmodule.c 2000/02/01 20:12:39 2.6 --- cryptmodule.c 2000/07/10 09:51:17 2.7 *************** *** 10,15 **** ! static PyObject *crypt_crypt(self, args) ! PyObject *self, *args; { char *word, *salt; --- 10,14 ---- ! static PyObject *crypt_crypt(PyObject *self, PyObject *args) { char *word, *salt; From python-dev@python.org Mon Jul 10 10:53:14 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 02:53:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules readline.c,2.20,2.21 Message-ID: <200007100953.CAA06074@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6009 Modified Files: readline.c Log Message: ANSI-fication Index: readline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** readline.c 2000/07/09 03:09:55 2.20 --- readline.c 2000/07/10 09:53:12 2.21 *************** *** 46,52 **** static PyObject * ! parse_and_bind(self, args) ! PyObject *self; ! PyObject *args; { char *s, *copy; --- 46,50 ---- static PyObject * ! parse_and_bind(PyObject *self, PyObject *args) { char *s, *copy; *************** *** 74,80 **** static PyObject * ! read_init_file(self, args) ! PyObject *self; ! PyObject *args; { char *s = NULL; --- 72,76 ---- static PyObject * ! read_init_file(PyObject *self, PyObject *args) { char *s = NULL; *************** *** 98,104 **** static PyObject * ! read_history_file(self, args) ! PyObject *self; ! PyObject *args; { char *s = NULL; --- 94,98 ---- static PyObject * ! read_history_file(PyObject *self, PyObject *args) { char *s = NULL; *************** *** 122,128 **** static PyObject * ! write_history_file(self, args) ! PyObject *self; ! PyObject *args; { char *s = NULL; --- 116,120 ---- static PyObject * ! write_history_file(PyObject *self, PyObject *args) { char *s = NULL; *************** *** 153,159 **** /* get the beginning index for the scope of the tab-completion */ static PyObject * ! get_begidx(self, args) ! PyObject *self; ! PyObject *args; { if(!PyArg_NoArgs(args)) { --- 145,149 ---- /* get the beginning index for the scope of the tab-completion */ static PyObject * ! get_begidx(PyObject *self, PyObject *args) { if(!PyArg_NoArgs(args)) { *************** *** 170,176 **** /* get the ending index for the scope of the tab-completion */ static PyObject * ! get_endidx(self, args) ! PyObject *self; ! PyObject *args; { if(!PyArg_NoArgs(args)) { --- 160,164 ---- /* get the ending index for the scope of the tab-completion */ static PyObject * ! get_endidx(PyObject *self, PyObject *args) { if(!PyArg_NoArgs(args)) { *************** *** 189,195 **** static PyObject * ! set_completer_delims(self, args) ! PyObject *self; ! PyObject *args; { char *break_chars; --- 177,181 ---- static PyObject * ! set_completer_delims(PyObject *self, PyObject *args) { char *break_chars; *************** *** 212,218 **** static PyObject * ! get_completer_delims(self, args) ! PyObject *self; ! PyObject *args; { if(!PyArg_NoArgs(args)) { --- 198,202 ---- static PyObject * ! get_completer_delims(PyObject *self, PyObject *args) { if(!PyArg_NoArgs(args)) { *************** *** 227,233 **** static PyObject * ! set_completer(self, args) ! PyObject *self; ! PyObject *args; { PyObject *function = Py_None; --- 211,215 ---- static PyObject * ! set_completer(PyObject *self, PyObject *args) { PyObject *function = Py_None; *************** *** 266,272 **** static PyObject * ! get_line_buffer(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_NoArgs(args)) --- 248,252 ---- static PyObject * ! get_line_buffer(PyObject *self, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 283,289 **** static PyObject * ! insert_text(self, args) ! PyObject *self; ! PyObject *args; { char *s; --- 263,267 ---- static PyObject * ! insert_text(PyObject *self, PyObject *args) { char *s; *************** *** 326,332 **** static char * ! on_completion(text, state) ! char *text; ! int state; { char *result = NULL; --- 304,308 ---- static char * ! on_completion(char *text, int state) { char *result = NULL; *************** *** 367,374 **** char ** ! flex_complete(text, start, end) ! char *text; ! int start; ! int end; { Py_XDECREF(begidx); --- 343,347 ---- char ** ! flex_complete(char *text, int start, int end) { Py_XDECREF(begidx); *************** *** 414,419 **** /* ARGSUSED */ static RETSIGTYPE ! onintr(sig) ! int sig; { longjmp(jbuf, 1); --- 387,391 ---- /* ARGSUSED */ static RETSIGTYPE ! onintr(int sig) { longjmp(jbuf, 1); *************** *** 424,429 **** static char * ! call_readline(prompt) ! char *prompt; { size_t n; --- 396,400 ---- static char * ! call_readline(char *prompt) { size_t n; From python-dev@python.org Mon Jul 10 10:55:34 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 02:55:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules imageop.c,2.22,2.23 Message-ID: <200007100955.CAA06377@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6307 Modified Files: imageop.c Log Message: ANSI-fication Index: imageop.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/imageop.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** imageop.c 2000/06/30 23:58:05 2.22 --- imageop.c 2000/07/10 09:55:32 2.23 *************** *** 36,42 **** static PyObject * ! imageop_crop(self, args) ! PyObject *self; ! PyObject *args; { char *cp, *ncp; --- 36,40 ---- static PyObject * ! imageop_crop(PyObject *self, PyObject *args) { char *cp, *ncp; *************** *** 92,98 **** static PyObject * ! imageop_scale(self, args) ! PyObject *self; ! PyObject *args; { char *cp, *ncp; --- 90,94 ---- static PyObject * ! imageop_scale(PyObject *self, PyObject *args) { char *cp, *ncp; *************** *** 141,147 **** static PyObject * ! imageop_tovideo(self, args) ! PyObject *self; ! PyObject *args; { int maxx, maxy, x, y, len; --- 137,141 ---- static PyObject * ! imageop_tovideo(PyObject *self, PyObject *args) { int maxx, maxy, x, y, len; *************** *** 197,203 **** static PyObject * ! imageop_grey2mono(self, args) ! PyObject *self; ! PyObject *args; { int tres, x, y, len; --- 191,195 ---- static PyObject * ! imageop_grey2mono(PyObject *self, PyObject *args) { int tres, x, y, len; *************** *** 239,245 **** static PyObject * ! imageop_grey2grey4(self, args) ! PyObject *self; ! PyObject *args; { int x, y, len; --- 231,235 ---- static PyObject * ! imageop_grey2grey4(PyObject *self, PyObject *args) { int x, y, len; *************** *** 280,286 **** static PyObject * ! imageop_grey2grey2(self, args) ! PyObject *self; ! PyObject *args; { int x, y, len; --- 270,274 ---- static PyObject * ! imageop_grey2grey2(PyObject *self, PyObject *args) { int x, y, len; *************** *** 321,327 **** static PyObject * ! imageop_dither2mono(self, args) ! PyObject *self; ! PyObject *args; { int sum, x, y, len; --- 309,313 ---- static PyObject * ! imageop_dither2mono(PyObject *self, PyObject *args) { int sum, x, y, len; *************** *** 367,373 **** static PyObject * ! imageop_dither2grey2(self, args) ! PyObject *self; ! PyObject *args; { int x, y, len; --- 353,357 ---- static PyObject * ! imageop_dither2grey2(PyObject *self, PyObject *args) { int x, y, len; *************** *** 412,418 **** static PyObject * ! imageop_mono2grey(self, args) ! PyObject *self; ! PyObject *args; { int v0, v1, x, y, len, nlen; --- 396,400 ---- static PyObject * ! imageop_mono2grey(PyObject *self, PyObject *args) { int v0, v1, x, y, len, nlen; *************** *** 451,457 **** static PyObject * ! imageop_grey22grey(self, args) ! PyObject *self; ! PyObject *args; { int x, y, len, nlen; --- 433,437 ---- static PyObject * ! imageop_grey22grey(PyObject *self, PyObject *args) { int x, y, len, nlen; *************** *** 489,495 **** static PyObject * ! imageop_grey42grey(self, args) ! PyObject *self; ! PyObject *args; { int x, y, len, nlen; --- 469,473 ---- static PyObject * ! imageop_grey42grey(PyObject *self, PyObject *args) { int x, y, len, nlen; *************** *** 526,532 **** static PyObject * ! imageop_rgb2rgb8(self, args) ! PyObject *self; ! PyObject *args; { int x, y, len, nlen; --- 504,508 ---- static PyObject * ! imageop_rgb2rgb8(PyObject *self, PyObject *args) { int x, y, len, nlen; *************** *** 570,576 **** static PyObject * ! imageop_rgb82rgb(self, args) ! PyObject *self; ! PyObject *args; { int x, y, len, nlen; --- 546,550 ---- static PyObject * ! imageop_rgb82rgb(PyObject *self, PyObject *args) { int x, y, len, nlen; *************** *** 613,619 **** static PyObject * ! imageop_rgb2grey(self, args) ! PyObject *self; ! PyObject *args; { int x, y, len, nlen; --- 587,591 ---- static PyObject * ! imageop_rgb2grey(PyObject *self, PyObject *args) { int x, y, len, nlen; *************** *** 651,657 **** static PyObject * ! imageop_grey2rgb(self, args) ! PyObject *self; ! PyObject *args; { int x, y, len, nlen; --- 623,627 ---- static PyObject * ! imageop_grey2rgb(PyObject *self, PyObject *args) { int x, y, len, nlen; *************** *** 685,691 **** /* static object * ! imageop_mul(self, args) ! object *self; ! object *args; { char *cp, *ncp; --- 655,659 ---- /* static object * ! imageop_mul(object *self, object *args) { char *cp, *ncp; From python-dev@python.org Mon Jul 10 10:57:22 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 02:57:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules zlibmodule.c,2.32,2.33 Message-ID: <200007100957.CAA06662@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6609 Modified Files: zlibmodule.c Log Message: ANSI-fication Index: zlibmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/zlibmodule.c,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -r2.32 -r2.33 *** zlibmodule.c 2000/05/03 23:44:33 2.32 --- zlibmodule.c 2000/07/10 09:57:19 2.33 *************** *** 43,48 **** static compobject * ! newcompobject(type) ! PyTypeObject *type; { compobject *self; --- 43,47 ---- static compobject * ! newcompobject(PyTypeObject *type) { compobject *self; *************** *** 63,69 **** static PyObject * ! PyZlib_compress(self, args) ! PyObject *self; ! PyObject *args; { PyObject *ReturnVal; --- 62,66 ---- static PyObject * ! PyZlib_compress(PyObject *self, PyObject *args) { PyObject *ReturnVal; *************** *** 161,167 **** static PyObject * ! PyZlib_decompress(self, args) ! PyObject *self; ! PyObject *args; { PyObject *result_str; --- 158,162 ---- static PyObject * ! PyZlib_decompress(PyObject *self, PyObject *args) { PyObject *result_str; *************** *** 268,274 **** static PyObject * ! PyZlib_compressobj(selfptr, args) ! PyObject *selfptr; ! PyObject *args; { compobject *self; --- 263,267 ---- static PyObject * ! PyZlib_compressobj(PyObject *selfptr, PyObject *args) { compobject *self; *************** *** 317,323 **** static PyObject * ! PyZlib_decompressobj(selfptr, args) ! PyObject *selfptr; ! PyObject *args; { int wbits=DEF_WBITS, err; --- 310,314 ---- static PyObject * ! PyZlib_decompressobj(PyObject *selfptr, PyObject *args) { int wbits=DEF_WBITS, err; *************** *** 364,369 **** static void ! Comp_dealloc(self) ! compobject *self; { if (self->is_initialised) --- 355,359 ---- static void ! Comp_dealloc(compobject *self) { if (self->is_initialised) *************** *** 374,379 **** static void ! Decomp_dealloc(self) ! compobject *self; { inflateEnd(&self->zst); --- 364,368 ---- static void ! Decomp_dealloc(compobject *self) { inflateEnd(&self->zst); *************** *** 391,397 **** static PyObject * ! PyZlib_objcompress(self, args) ! compobject *self; ! PyObject *args; { int err = Z_OK, inplen; --- 380,384 ---- static PyObject * ! PyZlib_objcompress(compobject *self, PyObject *args) { int err = Z_OK, inplen; *************** *** 450,456 **** static PyObject * ! PyZlib_objdecompress(self, args) ! compobject *self; ! PyObject *args; { int length, err, inplen; --- 437,441 ---- static PyObject * ! PyZlib_objdecompress(compobject *self, PyObject *args) { int length, err, inplen; *************** *** 524,530 **** static PyObject * ! PyZlib_flush(self, args) ! compobject *self; ! PyObject *args; { int length=DEFAULTALLOC, err = Z_OK; --- 509,513 ---- static PyObject * ! PyZlib_flush(compobject *self, PyObject *args) { int length=DEFAULTALLOC, err = Z_OK; *************** *** 623,629 **** static PyObject * ! PyZlib_unflush(self, args) ! compobject *self; ! PyObject *args; { int length=0, err; --- 606,610 ---- static PyObject * ! PyZlib_unflush(compobject *self, PyObject *args) { int length=0, err; *************** *** 708,714 **** static PyObject * ! Comp_getattr(self, name) ! compobject *self; ! char *name; { return Py_FindMethod(comp_methods, (PyObject *)self, name); --- 689,693 ---- static PyObject * ! Comp_getattr(compobject *self, char *name) { return Py_FindMethod(comp_methods, (PyObject *)self, name); *************** *** 716,722 **** static PyObject * ! Decomp_getattr(self, name) ! compobject *self; ! char *name; { if (strcmp(name, "unused_data") == 0) --- 695,699 ---- static PyObject * ! Decomp_getattr(compobject *self, char *name) { if (strcmp(name, "unused_data") == 0) *************** *** 736,741 **** static PyObject * ! PyZlib_adler32(self, args) ! PyObject *self, *args; { uLong adler32val=adler32(0L, Z_NULL, 0); --- 713,717 ---- static PyObject * ! PyZlib_adler32(PyObject *self, PyObject *args) { uLong adler32val=adler32(0L, Z_NULL, 0); *************** *** 759,764 **** static PyObject * ! PyZlib_crc32(self, args) ! PyObject *self, *args; { uLong crc32val=crc32(0L, Z_NULL, 0); --- 735,739 ---- static PyObject * ! PyZlib_crc32(PyObject *self, PyObject *args) { uLong crc32val=crc32(0L, Z_NULL, 0); *************** *** 825,832 **** For simplicity, errors (which are unlikely anyway) are ignored. */ static void ! insint(d, name, value) ! PyObject *d; ! char *name; ! int value; { PyObject *v = PyInt_FromLong((long) value); --- 800,804 ---- For simplicity, errors (which are unlikely anyway) are ignored. */ static void ! insint(PyObject *d, char *name, int value) { PyObject *v = PyInt_FromLong((long) value); From python-dev@python.org Mon Jul 10 11:04:00 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 03:04:00 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules threadmodule.c,2.33,2.34 Message-ID: <200007101004.DAA08474@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8410 Modified Files: threadmodule.c Log Message: ANSI-fication Index: threadmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/threadmodule.c,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -r2.33 -r2.34 *** threadmodule.c 2000/06/30 23:58:05 2.33 --- threadmodule.c 2000/07/10 10:03:58 2.34 *************** *** 51,56 **** static void ! lock_dealloc(self) ! lockobject *self; { /* Unlock the lock so it's safe to free it */ --- 51,55 ---- static void ! lock_dealloc(lockobject *self) { /* Unlock the lock so it's safe to free it */ *************** *** 63,69 **** static PyObject * ! lock_PyThread_acquire_lock(self, args) ! lockobject *self; ! PyObject *args; { int i; --- 62,66 ---- static PyObject * ! lock_PyThread_acquire_lock(lockobject *self, PyObject *args) { int i; *************** *** 100,106 **** static PyObject * ! lock_PyThread_release_lock(self, args) ! lockobject *self; ! PyObject *args; { if (!PyArg_NoArgs(args)) --- 97,101 ---- static PyObject * ! lock_PyThread_release_lock(lockobject *self, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 128,134 **** static PyObject * ! lock_locked_lock(self, args) ! lockobject *self; ! PyObject *args; { if (!PyArg_NoArgs(args)) --- 123,127 ---- static PyObject * ! lock_locked_lock(lockobject *self, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 159,165 **** static PyObject * ! lock_getattr(self, name) ! lockobject *self; ! char *name; { return Py_FindMethod(lock_methods, (PyObject *)self, name); --- 152,156 ---- static PyObject * ! lock_getattr(lockobject *self, char *name) { return Py_FindMethod(lock_methods, (PyObject *)self, name); *************** *** 192,197 **** static void ! t_bootstrap(boot_raw) ! void *boot_raw; { struct bootstate *boot = (struct bootstate *) boot_raw; --- 183,187 ---- static void ! t_bootstrap(void *boot_raw) { struct bootstate *boot = (struct bootstate *) boot_raw; *************** *** 224,230 **** static PyObject * ! thread_PyThread_start_new_thread(self, fargs) ! PyObject *self; /* Not used */ ! PyObject *fargs; { PyObject *func, *args = NULL, *keyw = NULL; --- 214,218 ---- static PyObject * ! thread_PyThread_start_new_thread(PyObject *self, PyObject *fargs) { PyObject *func, *args = NULL, *keyw = NULL; *************** *** 283,289 **** static PyObject * ! thread_PyThread_exit_thread(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { if (!PyArg_NoArgs(args)) --- 271,275 ---- static PyObject * ! thread_PyThread_exit_thread(PyObject *self, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 302,308 **** #ifndef NO_EXIT_PROG static PyObject * ! thread_PyThread_exit_prog(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { int sts; --- 288,292 ---- #ifndef NO_EXIT_PROG static PyObject * ! thread_PyThread_exit_prog(PyObject *self, PyObject *args) { int sts; *************** *** 315,321 **** static PyObject * ! thread_PyThread_allocate_lock(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { if (!PyArg_NoArgs(args)) --- 299,303 ---- static PyObject * ! thread_PyThread_allocate_lock(PyObject *self, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 331,337 **** static PyObject * ! thread_get_ident(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { long ident; --- 313,317 ---- static PyObject * ! thread_get_ident(PyObject *self, PyObject *args) { long ident; From python-dev@python.org Mon Jul 10 11:49:33 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 03:49:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules rgbimgmodule.c,2.19,2.20 Message-ID: <200007101049.DAA20502@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv20482 Modified Files: rgbimgmodule.c Log Message: ANSI-fication Index: rgbimgmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/rgbimgmodule.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** rgbimgmodule.c 2000/07/09 03:09:55 2.19 --- rgbimgmodule.c 2000/07/10 10:49:30 2.20 *************** *** 120,126 **** */ static void ! addlongimgtag(dptr, xsize, ysize) ! Py_UInt32 *dptr; ! int xsize, ysize; { dptr = dptr + (xsize * ysize); --- 120,124 ---- */ static void ! addlongimgtag(Py_UInt32 *dptr, int xsize, int ysize) { dptr = dptr + (xsize * ysize); *************** *** 138,143 **** */ static unsigned short ! getshort(inf) ! FILE *inf; { unsigned char buf[2]; --- 136,140 ---- */ static unsigned short ! getshort(FILE *inf) { unsigned char buf[2]; *************** *** 148,153 **** static Py_UInt32 ! getlong(inf) ! FILE *inf; { unsigned char buf[4]; --- 145,149 ---- static Py_UInt32 ! getlong(FILE *inf) { unsigned char buf[4]; *************** *** 158,164 **** static void ! putshort(outf, val) ! FILE *outf; ! unsigned short val; { unsigned char buf[2]; --- 154,158 ---- static void ! putshort(FILE *outf, unsigned short val) { unsigned char buf[2]; *************** *** 170,176 **** static int ! putlong(outf, val) ! FILE *outf; ! Py_UInt32 val; { unsigned char buf[4]; --- 164,168 ---- static int ! putlong(FILE *outf, Py_UInt32 val) { unsigned char buf[4]; *************** *** 184,190 **** static void ! readheader(inf, image) ! FILE *inf; ! IMAGE *image; { memset(image ,0, sizeof(IMAGE)); --- 176,180 ---- static void ! readheader(FILE *inf, IMAGE *image) { memset(image ,0, sizeof(IMAGE)); *************** *** 198,204 **** static int ! writeheader(outf, image) ! FILE *outf; ! IMAGE *image; { IMAGE t; --- 188,192 ---- static int ! writeheader(FILE *outf, IMAGE *image) { IMAGE t; *************** *** 220,227 **** static int ! writetab(outf, tab, len) ! FILE *outf; ! /*unsigned*/ Py_Int32 *tab; ! int len; { int r = 0; --- 208,212 ---- static int ! writetab(FILE *outf, /*unsigned*/ Py_Int32 *tab, int len) { int r = 0; *************** *** 235,242 **** static void ! readtab(inf, tab, len) ! FILE *inf; ! /*unsigned*/ Py_Int32 *tab; ! int len; { while(len) { --- 220,224 ---- static void ! readtab(FILE *inf, /*unsigned*/ Py_Int32 *tab, int len) { while(len) { *************** *** 252,257 **** */ static PyObject * ! sizeofimage(self, args) ! PyObject *self, *args; { char *name; --- 234,238 ---- */ static PyObject * ! sizeofimage(PyObject *self, PyObject *args) { char *name; *************** *** 284,289 **** */ static PyObject * ! longimagedata(self, args) ! PyObject *self, *args; { char *name; --- 265,269 ---- */ static PyObject * ! longimagedata(PyObject *self, PyObject *args) { char *name; *************** *** 466,472 **** static void ! interleaverow(lptr, cptr, z, n) ! unsigned char *lptr, *cptr; ! int z, n; { lptr += z; --- 446,450 ---- static void ! interleaverow(unsigned char *lptr, unsigned char *cptr, int z, int n) { lptr += z; *************** *** 478,484 **** static void ! copybw(lptr, n) ! Py_Int32 *lptr; ! int n; { while (n >= 8) { --- 456,460 ---- static void ! copybw(Py_Int32 *lptr, int n) { while (n >= 8) { *************** *** 501,506 **** static void ! setalpha(lptr, n) ! unsigned char *lptr; { while (n >= 8) { --- 477,481 ---- static void ! setalpha(unsigned char *lptr, int n) { while (n >= 8) { *************** *** 523,529 **** static void ! expandrow(optr, iptr, z) ! unsigned char *optr, *iptr; ! int z; { unsigned char pixel, count; --- 498,502 ---- static void ! expandrow(unsigned char *optr, unsigned char *iptr, int z) { unsigned char pixel, count; *************** *** 587,592 **** */ static PyObject * ! longstoimage(self, args) ! PyObject *self, *args; { unsigned char *lptr; --- 560,564 ---- */ static PyObject * ! longstoimage(PyObject *self, PyObject *args) { unsigned char *lptr; *************** *** 688,694 **** static void ! lumrow(rgbptr, lumptr, n) ! unsigned char *rgbptr, *lumptr; ! int n; { lumptr += CHANOFFSET(0); --- 660,664 ---- static void ! lumrow(unsigned char *rgbptr, unsigned char *lumptr, int n) { lumptr += CHANOFFSET(0); *************** *** 703,709 **** static int ! compressrow(lbuf, rlebuf, z, cnt) ! unsigned char *lbuf, *rlebuf; ! int z, cnt; { unsigned char *iptr, *ibufend, *sptr, *optr; --- 673,677 ---- static int ! compressrow(unsigned char *lbuf, unsigned char *rlebuf, int z, int cnt) { unsigned char *iptr, *ibufend, *sptr, *optr; *************** *** 766,772 **** static PyObject * ! ttob(self, args) ! PyObject *self; ! PyObject *args; { int order, oldorder; --- 734,738 ---- static PyObject * ! ttob(PyObject *self, PyObject *args) { int order, oldorder; From python-dev@python.org Mon Jul 10 12:56:06 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 04:56:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules dlmodule.c,2.9,2.10 newmodule.c,2.23,2.24 xxmodule.c,2.18,2.19 Message-ID: <200007101156.EAA09858@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv9813 Modified Files: dlmodule.c newmodule.c xxmodule.c Log Message: ANSI-fication Index: dlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/dlmodule.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** dlmodule.c 2000/06/30 23:58:05 2.9 --- dlmodule.c 2000/07/10 11:56:03 2.10 *************** *** 30,35 **** static PyObject * ! newdlobject(handle) ! PyUnivPtr *handle; { dlobject *xp; --- 30,34 ---- static PyObject * ! newdlobject(PyUnivPtr *handle) { dlobject *xp; *************** *** 42,47 **** static void ! dl_dealloc(xp) ! dlobject *xp; { if (xp->dl_handle != NULL) --- 41,45 ---- static void ! dl_dealloc(dlobject *xp) { if (xp->dl_handle != NULL) *************** *** 51,57 **** static PyObject * ! dl_close(xp, args) ! dlobject *xp; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 49,53 ---- static PyObject * ! dl_close(dlobject *xp, PyObject *args) { if (!PyArg_Parse(args, "")) *************** *** 66,72 **** static PyObject * ! dl_sym(xp, args) ! dlobject *xp; ! PyObject *args; { char *name; --- 62,66 ---- static PyObject * ! dl_sym(dlobject *xp, PyObject *args) { char *name; *************** *** 83,89 **** static PyObject * ! dl_call(xp, args) ! dlobject *xp; ! PyObject *args; /* (varargs) */ { PyObject *name; --- 77,81 ---- static PyObject * ! dl_call(dlobject *xp, PyObject *args) { PyObject *name; *************** *** 142,148 **** static PyObject * ! dl_getattr(xp, name) ! dlobject *xp; ! char *name; { return Py_FindMethod(dlobject_methods, (PyObject *)xp, name); --- 134,138 ---- static PyObject * ! dl_getattr(dlobject *xp, char *name) { return Py_FindMethod(dlobject_methods, (PyObject *)xp, name); *************** *** 170,176 **** static PyObject * ! dl_open(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 160,164 ---- static PyObject * ! dl_open(PyObject *self, PyObject *args) { char *name; Index: newmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/newmodule.c,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** newmodule.c 2000/06/30 23:58:05 2.23 --- newmodule.c 2000/07/10 11:56:03 2.24 *************** *** 18,24 **** static PyObject * ! new_instance(unused, args) ! PyObject* unused; ! PyObject* args; { PyObject* klass; --- 18,22 ---- static PyObject * ! new_instance(PyObject* unused, PyObject* args) { PyObject* klass; *************** *** 44,50 **** static PyObject * ! new_instancemethod(unused, args) ! PyObject* unused; ! PyObject* args; { PyObject* func; --- 42,46 ---- static PyObject * ! new_instancemethod(PyObject* unused, PyObject* args) { PyObject* func; *************** *** 76,82 **** static PyObject * ! new_function(unused, args) ! PyObject* unused; ! PyObject* args; { PyObject* code; --- 72,76 ---- static PyObject * ! new_function(PyObject* unused, PyObject* args) { PyObject* code; *************** *** 115,121 **** static PyObject * ! new_code(unused, args) ! PyObject* unused; ! PyObject* args; { int argcount; --- 109,113 ---- static PyObject * ! new_code(PyObject* unused, PyObject* args) { int argcount; *************** *** 163,169 **** static PyObject * ! new_module(unused, args) ! PyObject* unused; ! PyObject* args; { char *name; --- 155,159 ---- static PyObject * ! new_module(PyObject* unused, PyObject* args) { char *name; *************** *** 178,184 **** static PyObject * ! new_class(unused, args) ! PyObject* unused; ! PyObject* args; { PyObject * name; --- 168,172 ---- static PyObject * ! new_class(PyObject* unused, PyObject* args) { PyObject * name; Index: xxmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/xxmodule.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** xxmodule.c 2000/06/30 23:58:05 2.18 --- xxmodule.c 2000/07/10 11:56:03 2.19 *************** *** 38,43 **** static XxoObject * ! newXxoObject(arg) ! PyObject *arg; { XxoObject *self; --- 38,42 ---- static XxoObject * ! newXxoObject(PyObject *arg) { XxoObject *self; *************** *** 52,57 **** static void ! Xxo_dealloc(self) ! XxoObject *self; { Py_XDECREF(self->x_attr); --- 51,55 ---- static void ! Xxo_dealloc(XxoObject *self) { Py_XDECREF(self->x_attr); *************** *** 60,66 **** static PyObject * ! Xxo_demo(self, args) ! XxoObject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, ":demo")) --- 58,62 ---- static PyObject * ! Xxo_demo(XxoObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":demo")) *************** *** 76,82 **** static PyObject * ! Xxo_getattr(self, name) ! XxoObject *self; ! char *name; { if (self->x_attr != NULL) { --- 72,76 ---- static PyObject * ! Xxo_getattr(XxoObject *self, char *name) { if (self->x_attr != NULL) { *************** *** 91,98 **** static int ! Xxo_setattr(self, name, v) ! XxoObject *self; ! char *name; ! PyObject *v; { if (self->x_attr == NULL) { --- 85,89 ---- static int ! Xxo_setattr(XxoObject *self, char *name, PyObject *v) { if (self->x_attr == NULL) { *************** *** 137,143 **** static PyObject * ! xx_foo(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { long i, j; --- 128,132 ---- static PyObject * ! xx_foo(PyObject *self, PyObject *args) { long i, j; *************** *** 153,159 **** static PyObject * ! xx_new(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { XxoObject *rv; --- 142,146 ---- static PyObject * ! xx_new(PyObject *self, PyObject *args) { XxoObject *rv; *************** *** 170,176 **** static PyObject * ! xx_bug(self, args) ! PyObject *self; ! PyObject *args; { PyObject *list, *item; --- 157,161 ---- static PyObject * ! xx_bug(PyObject *self, PyObject *args) { PyObject *list, *item; *************** *** 193,199 **** static PyObject * ! xx_roj(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { PyObject *a; --- 178,182 ---- static PyObject * ! xx_roj(PyObject *self, PyObject *args) { PyObject *a; From python-dev@python.org Mon Jul 10 13:04:21 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 05:04:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules signalmodule.c,2.45,2.46 timingmodule.c,2.5,2.6 Message-ID: <200007101204.FAA12383@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv12134 Modified Files: signalmodule.c timingmodule.c Log Message: ANSI-fication Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** signalmodule.c 2000/07/09 03:09:55 2.45 --- signalmodule.c 2000/07/10 12:04:18 2.46 *************** *** 98,104 **** static PyObject * ! signal_default_int_handler(self, arg) ! PyObject *self; ! PyObject *arg; { PyErr_SetNone(PyExc_KeyboardInterrupt); --- 98,102 ---- static PyObject * ! signal_default_int_handler(PyObject *self, PyObject *args) { PyErr_SetNone(PyExc_KeyboardInterrupt); *************** *** 114,119 **** static RETSIGTYPE ! signal_handler(sig_num) ! int sig_num; { #ifdef WITH_THREAD --- 112,116 ---- static RETSIGTYPE ! signal_handler(int sig_num) { #ifdef WITH_THREAD *************** *** 147,153 **** #ifdef HAVE_ALARM static PyObject * ! signal_alarm(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { int t; --- 144,148 ---- #ifdef HAVE_ALARM static PyObject * ! signal_alarm(PyObject *self, PyObject *args) { int t; *************** *** 166,172 **** #ifdef HAVE_PAUSE static PyObject * ! signal_pause(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { if (!PyArg_NoArgs(args)) --- 161,165 ---- #ifdef HAVE_PAUSE static PyObject * ! signal_pause(PyObject *self, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 194,200 **** static PyObject * ! signal_signal(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { PyObject *obj; --- 187,191 ---- static PyObject * ! signal_signal(PyObject *self, PyObject *args) { PyObject *obj; *************** *** 254,260 **** static PyObject * ! signal_getsignal(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { int sig_num; --- 245,249 ---- static PyObject * ! signal_getsignal(PyObject *self, PyObject *args) { int sig_num; Index: timingmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timingmodule.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** timingmodule.c 1998/12/04 18:50:16 2.5 --- timingmodule.c 2000/07/10 12:04:18 2.6 *************** *** 9,15 **** static PyObject * ! start_timing(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 9,13 ---- static PyObject * ! start_timing(PyObject *self, PyObject *args) { if (!PyArg_Parse(args, "")) *************** *** 22,28 **** static PyObject * ! finish_timing(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 20,24 ---- static PyObject * ! finish_timing(PyObject *self, PyObject *args) { if (!PyArg_Parse(args, "")) *************** *** 35,41 **** static PyObject * ! seconds(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 31,35 ---- static PyObject * ! seconds(PyObject *self, PyObject *args) { if (!PyArg_Parse(args, "")) *************** *** 47,53 **** static PyObject * ! milli(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 41,45 ---- static PyObject * ! milli(PyObject *self, PyObject *args) { if (!PyArg_Parse(args, "")) *************** *** 58,64 **** } static PyObject * ! micro(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 50,54 ---- } static PyObject * ! micro(PyObject *self, PyObject *args) { if (!PyArg_Parse(args, "")) From python-dev@python.org Mon Jul 10 13:15:56 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 05:15:56 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules resource.c,2.12,2.13 termios.c,2.11,2.12 timemodule.c,2.90,2.91 Message-ID: <200007101215.FAA17987@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv17857 Modified Files: resource.c termios.c timemodule.c Log Message: ANSI-fication Index: resource.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/resource.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** resource.c 2000/06/30 23:58:05 2.12 --- resource.c 2000/07/10 12:15:54 2.13 *************** *** 33,39 **** static PyObject * ! resource_getrusage(self, args) ! PyObject *self; ! PyObject *args; { int who; --- 33,37 ---- static PyObject * ! resource_getrusage(PyObject *self, PyObject *args) { int who; *************** *** 80,86 **** static PyObject * ! resource_getrlimit(self, args) ! PyObject *self; ! PyObject *args; { struct rlimit rl; --- 78,82 ---- static PyObject * ! resource_getrlimit(PyObject *self, PyObject *args) { struct rlimit rl; *************** *** 112,118 **** static PyObject * ! resource_setrlimit(self, args) ! PyObject *self; ! PyObject *args; { struct rlimit rl; --- 108,112 ---- static PyObject * ! resource_setrlimit(PyObject *self, PyObject *args) { struct rlimit rl; *************** *** 158,164 **** static PyObject * ! resource_getpagesize(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, ":getpagesize")) --- 152,156 ---- static PyObject * ! resource_getpagesize(PyObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":getpagesize")) Index: termios.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/termios.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** termios.c 1999/01/14 19:31:42 2.11 --- termios.c 2000/07/10 12:15:54 2.12 *************** *** 47,53 **** static PyObject * ! termios_tcgetattr(self, args) ! PyObject *self; ! PyObject *args; { int fd; --- 47,51 ---- static PyObject * ! termios_tcgetattr(PyObject *self, PyObject *args) { int fd; *************** *** 127,133 **** static PyObject * ! termios_tcsetattr(self, args) ! PyObject *self; ! PyObject *args; { int fd, when; --- 125,129 ---- static PyObject * ! termios_tcsetattr(PyObject *self, PyObject *args) { int fd, when; *************** *** 196,202 **** static PyObject * ! termios_tcsendbreak(self, args) ! PyObject *self; ! PyObject *args; { int fd, duration; --- 192,196 ---- static PyObject * ! termios_tcsendbreak(PyObject *self, PyObject *args) { int fd, duration; *************** *** 220,226 **** static PyObject * ! termios_tcdrain(self, args) ! PyObject *self; ! PyObject *args; { int fd; --- 214,218 ---- static PyObject * ! termios_tcdrain(PyObject *self, PyObject *args) { int fd; *************** *** 247,253 **** static PyObject * ! termios_tcflush(self, args) ! PyObject *self; ! PyObject *args; { int fd, queue; --- 239,243 ---- static PyObject * ! termios_tcflush(PyObject *self, PyObject *args) { int fd, queue; *************** *** 274,280 **** static PyObject * ! termios_tcflow(self, args) ! PyObject *self; ! PyObject *args; { int fd, action; --- 264,268 ---- static PyObject * ! termios_tcflow(PyObject *self, PyObject *args) { int fd, action; Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.90 retrieving revision 2.91 diff -C2 -r2.90 -r2.91 *** timemodule.c 2000/07/09 03:09:56 2.90 --- timemodule.c 2000/07/10 12:15:54 2.91 *************** *** 129,135 **** static PyObject * ! time_time(self, args) ! PyObject *self; ! PyObject *args; { double secs; --- 129,133 ---- static PyObject * ! time_time(PyObject *self, PyObject *args) { double secs; *************** *** 161,167 **** static PyObject * ! time_clock(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_NoArgs(args)) --- 159,163 ---- static PyObject * ! time_clock(PyObject *self, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 174,180 **** /* Due to Mark Hammond */ static PyObject * ! time_clock(self, args) ! PyObject *self; ! PyObject *args; { static LARGE_INTEGER ctrStart; --- 170,174 ---- /* Due to Mark Hammond */ static PyObject * ! time_clock(PyObject *self, PyObject *args) { static LARGE_INTEGER ctrStart; *************** *** 218,224 **** static PyObject * ! time_sleep(self, args) ! PyObject *self; ! PyObject *args; { double secs; --- 212,216 ---- static PyObject * ! time_sleep(PyObject *self, PyObject *args) { double secs; *************** *** 238,243 **** static PyObject * ! tmtotuple(p) ! struct tm *p; { return Py_BuildValue("(iiiiiiiii)", --- 230,234 ---- static PyObject * ! tmtotuple(struct tm *p) { return Py_BuildValue("(iiiiiiiii)", *************** *** 254,260 **** static PyObject * ! time_convert(when, function) ! time_t when; ! struct tm * (*function)(const time_t *); { struct tm *p; --- 245,249 ---- static PyObject * ! time_convert(time_t when, struct tm * (*function)(const time_t *)) { struct tm *p; *************** *** 275,281 **** static PyObject * ! time_gmtime(self, args) ! PyObject *self; ! PyObject *args; { double when; --- 264,268 ---- static PyObject * ! time_gmtime(PyObject *self, PyObject *args) { double when; *************** *** 291,297 **** static PyObject * ! time_localtime(self, args) ! PyObject *self; ! PyObject *args; { double when; --- 278,282 ---- static PyObject * ! time_localtime(PyObject *self, PyObject *args) { double when; *************** *** 306,312 **** static int ! gettmarg(args, p) ! PyObject *args; ! struct tm *p; { int y; --- 291,295 ---- static int ! gettmarg(PyObject *args, struct tm *p) { int y; *************** *** 352,358 **** #ifdef HAVE_STRFTIME static PyObject * ! time_strftime(self, args) ! PyObject *self; ! PyObject *args; { PyObject *tup; --- 335,339 ---- #ifdef HAVE_STRFTIME static PyObject * ! time_strftime(PyObject *self, PyObject *args) { PyObject *tup; *************** *** 408,414 **** static PyObject * ! time_strptime(self, args) ! PyObject *self; ! PyObject *args; { struct tm tm; --- 389,393 ---- static PyObject * ! time_strptime(PyObject *self, PyObject *args) { struct tm tm; *************** *** 442,448 **** static PyObject * ! time_asctime(self, args) ! PyObject *self; ! PyObject *args; { PyObject *tup; --- 421,425 ---- static PyObject * ! time_asctime(PyObject *self, PyObject *args) { PyObject *tup; *************** *** 465,471 **** static PyObject * ! time_ctime(self, args) ! PyObject *self; ! PyObject *args; { double dt; --- 442,446 ---- static PyObject * ! time_ctime(PyObject *self, PyObject *args) { double dt; *************** *** 496,502 **** #ifdef HAVE_MKTIME static PyObject * ! time_mktime(self, args) ! PyObject *self; ! PyObject *args; { PyObject *tup; --- 471,475 ---- #ifdef HAVE_MKTIME static PyObject * ! time_mktime(PyObject *self, PyObject *args) { PyObject *tup; *************** *** 550,557 **** static void ! ins(d, name, v) ! PyObject *d; ! char *name; ! PyObject *v; { if (v == NULL) --- 523,527 ---- static void ! ins(PyObject *d, char *name, PyObject *v) { if (v == NULL) From python-dev@python.org Mon Jul 10 13:29:32 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 05:29:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules selectmodule.c,2.35,2.36 sgimodule.c,1.13,1.14 structmodule.c,2.34,2.35 syslogmodule.c,2.13,2.14 Message-ID: <200007101229.FAA21056@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv21042 Modified Files: selectmodule.c sgimodule.c structmodule.c syslogmodule.c Log Message: ANSI-fication Index: selectmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** selectmodule.c 2000/06/30 23:58:05 2.35 --- selectmodule.c 2000/07/10 12:29:26 2.36 *************** *** 59,64 **** static void ! reap_obj(fd2obj) ! pylist fd2obj[FD_SETSIZE + 3]; { int i; --- 59,63 ---- static void ! reap_obj(pylist fd2obj[FD_SETSIZE + 3]) { int i; *************** *** 75,82 **** */ static int ! list2set(list, set, fd2obj) ! PyObject *list; ! fd_set *set; ! pylist fd2obj[FD_SETSIZE + 3]; { int i; --- 74,78 ---- */ static int ! list2set(PyObject *list, fd_set *set, pylist fd2obj[FD_SETSIZE + 3]) { int i; *************** *** 156,162 **** /* returns NULL and sets the Python exception if an error occurred */ static PyObject * ! set2list(set, fd2obj) ! fd_set *set; ! pylist fd2obj[FD_SETSIZE + 3]; { int i, j, count=0; --- 152,156 ---- /* returns NULL and sets the Python exception if an error occurred */ static PyObject * ! set2list(fd_set *set, pylist fd2obj[FD_SETSIZE + 3]) { int i, j, count=0; *************** *** 200,206 **** static PyObject * ! select_select(self, args) ! PyObject *self; ! PyObject *args; { #ifdef MS_WINDOWS --- 194,198 ---- static PyObject * ! select_select(PyObject *self, PyObject *args) { #ifdef MS_WINDOWS Index: sgimodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sgimodule.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** sgimodule.c 2000/06/30 23:58:05 1.13 --- sgimodule.c 2000/07/10 12:29:26 1.14 *************** *** 19,25 **** static PyObject * ! sgi_nap(self, args) ! PyObject *self; ! PyObject *args; { long ticks; --- 19,23 ---- static PyObject * ! sgi_nap(PyObject *self, PyObject *args) { long ticks; *************** *** 36,42 **** static PyObject * ! sgi__getpty(self, args) ! PyObject *self; ! PyObject *args; { int oflag; --- 34,38 ---- static PyObject * ! sgi__getpty(PyObject *self, PyObject *args) { int oflag; Index: structmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/structmodule.c,v retrieving revision 2.34 retrieving revision 2.35 diff -C2 -r2.34 -r2.35 *** structmodule.c 2000/07/09 03:09:56 2.34 --- structmodule.c 2000/07/10 12:29:26 2.35 *************** *** 85,91 **** static int ! get_long(v, p) ! PyObject *v; ! long *p; { long x = PyInt_AsLong(v); --- 85,89 ---- static int ! get_long(PyObject *v, long *p) { long x = PyInt_AsLong(v); *************** *** 104,110 **** static int ! get_ulong(v, p) ! PyObject *v; ! unsigned long *p; { if (PyLong_Check(v)) { --- 102,106 ---- static int ! get_ulong(PyObject *v, unsigned long *p) { if (PyLong_Check(v)) { *************** *** 130,137 **** static int ! pack_float(x, p, incr) ! double x; /* The number to pack */ ! char *p; /* Where to pack the high order byte */ ! int incr; /* 1 for big-endian; -1 for little-endian */ { int s; --- 126,132 ---- static int ! pack_float(double x, /* The number to pack */ ! char *p, /* Where to pack the high order byte */ ! int incr) /* 1 for big-endian; -1 for little-endian */ { int s; *************** *** 202,209 **** static int ! pack_double(x, p, incr) ! double x; /* The number to pack */ ! char *p; /* Where to pack the high order byte */ ! int incr; /* 1 for big-endian; -1 for little-endian */ { int s; --- 197,203 ---- static int ! pack_double(double x, /* The number to pack */ ! char *p, /* Where to pack the high order byte */ ! int incr) /* 1 for big-endian; -1 for little-endian */ { int s; *************** *** 295,301 **** static PyObject * ! unpack_float(p, incr) ! char *p; /* Where the high order byte is */ ! int incr; /* 1 for big-endian; -1 for little-endian */ { int s; --- 289,294 ---- static PyObject * ! unpack_float(const char *p, /* Where the high order byte is */ ! int incr) /* 1 for big-endian; -1 for little-endian */ { int s; *************** *** 339,345 **** static PyObject * ! unpack_double(p, incr) ! char *p; /* Where the high order byte is */ ! int incr; /* 1 for big-endian; -1 for little-endian */ { int s; --- 332,337 ---- static PyObject * ! unpack_double(const char *p, /* Where the high order byte is */ ! int incr) /* 1 for big-endian; -1 for little-endian */ { int s; *************** *** 414,420 **** static PyObject * ! nu_char(p, f) ! const char *p; ! const formatdef *f; { return PyString_FromStringAndSize(p, 1); --- 406,410 ---- static PyObject * ! nu_char(const char *p, const formatdef *f) { return PyString_FromStringAndSize(p, 1); *************** *** 422,428 **** static PyObject * ! nu_byte(p, f) ! const char *p; ! const formatdef *f; { return PyInt_FromLong((long) *(signed char *)p); --- 412,416 ---- static PyObject * ! nu_byte(const char *p, const formatdef *f) { return PyInt_FromLong((long) *(signed char *)p); *************** *** 430,436 **** static PyObject * ! nu_ubyte(p, f) ! const char *p; ! const formatdef *f; { return PyInt_FromLong((long) *(unsigned char *)p); --- 418,422 ---- static PyObject * ! nu_ubyte(const char *p, const formatdef *f) { return PyInt_FromLong((long) *(unsigned char *)p); *************** *** 438,444 **** static PyObject * ! nu_short(p, f) ! const char *p; ! const formatdef *f; { return PyInt_FromLong((long) *(short *)p); --- 424,428 ---- static PyObject * ! nu_short(const char *p, const formatdef *f) { return PyInt_FromLong((long) *(short *)p); *************** *** 446,452 **** static PyObject * ! nu_ushort(p, f) ! const char *p; ! const formatdef *f; { return PyInt_FromLong((long) *(unsigned short *)p); --- 430,434 ---- static PyObject * ! nu_ushort(const char *p, const formatdef *f) { return PyInt_FromLong((long) *(unsigned short *)p); *************** *** 454,460 **** static PyObject * ! nu_int(p, f) ! const char *p; ! const formatdef *f; { return PyInt_FromLong((long) *(int *)p); --- 436,440 ---- static PyObject * ! nu_int(const char *p, const formatdef *f) { return PyInt_FromLong((long) *(int *)p); *************** *** 462,468 **** static PyObject * ! nu_uint(p, f) ! const char *p; ! const formatdef *f; { unsigned int x = *(unsigned int *)p; --- 442,446 ---- static PyObject * ! nu_uint(const char *p, const formatdef *f) { unsigned int x = *(unsigned int *)p; *************** *** 471,477 **** static PyObject * ! nu_long(p, f) ! const char *p; ! const formatdef *f; { return PyInt_FromLong(*(long *)p); --- 449,453 ---- static PyObject * ! nu_long(const char *p, const formatdef *f) { return PyInt_FromLong(*(long *)p); *************** *** 479,485 **** static PyObject * ! nu_ulong(p, f) ! const char *p; ! const formatdef *f; { return PyLong_FromUnsignedLong(*(unsigned long *)p); --- 455,459 ---- static PyObject * ! nu_ulong(const char *p, const formatdef *f) { return PyLong_FromUnsignedLong(*(unsigned long *)p); *************** *** 487,493 **** static PyObject * ! nu_float(p, f) ! const char *p; ! const formatdef *f; { float x; --- 461,465 ---- static PyObject * ! nu_float(const char *p, const formatdef *f) { float x; *************** *** 497,503 **** static PyObject * ! nu_double(p, f) ! const char *p; ! const formatdef *f; { double x; --- 469,473 ---- static PyObject * ! nu_double(const char *p, const formatdef *f) { double x; *************** *** 507,513 **** static PyObject * ! nu_void_p(p, f) ! const char *p; ! const formatdef *f; { return PyLong_FromVoidPtr(*(void **)p); --- 477,481 ---- static PyObject * ! nu_void_p(const char *p, const formatdef *f) { return PyLong_FromVoidPtr(*(void **)p); *************** *** 515,522 **** static int ! np_byte(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { long x; --- 483,487 ---- static int ! np_byte(char *p, PyObject *v, const formatdef *f) { long x; *************** *** 528,535 **** static int ! np_char(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { if (!PyString_Check(v) || PyString_Size(v) != 1) { --- 493,497 ---- static int ! np_char(char *p, PyObject *v, const formatdef *f) { if (!PyString_Check(v) || PyString_Size(v) != 1) { *************** *** 543,550 **** static int ! np_short(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { long x; --- 505,509 ---- static int ! np_short(char *p, PyObject *v, const formatdef *f) { long x; *************** *** 556,563 **** static int ! np_int(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { long x; --- 515,519 ---- static int ! np_int(char *p, PyObject *v, const formatdef *f) { long x; *************** *** 569,576 **** static int ! np_uint(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { unsigned long x; --- 525,529 ---- static int ! np_uint(char *p, PyObject *v, const formatdef *f) { unsigned long x; *************** *** 582,589 **** static int ! np_long(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { long x; --- 535,539 ---- static int ! np_long(char *p, PyObject *v, const formatdef *f) { long x; *************** *** 595,602 **** static int ! np_ulong(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { unsigned long x; --- 545,549 ---- static int ! np_ulong(char *p, PyObject *v, const formatdef *f) { unsigned long x; *************** *** 608,615 **** static int ! np_float(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { float x = (float)PyFloat_AsDouble(v); --- 555,559 ---- static int ! np_float(char *p, PyObject *v, const formatdef *f) { float x = (float)PyFloat_AsDouble(v); *************** *** 624,631 **** static int ! np_double(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { double x = PyFloat_AsDouble(v); --- 568,572 ---- static int ! np_double(char *p, PyObject *v, const formatdef *f) { double x = PyFloat_AsDouble(v); *************** *** 640,647 **** static int ! np_void_p(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { void *x = PyLong_AsVoidPtr(v); --- 581,585 ---- static int ! np_void_p(char *p, PyObject *v, const formatdef *f) { void *x = PyLong_AsVoidPtr(v); *************** *** 677,683 **** static PyObject * ! bu_int(p, f) ! const char *p; ! const formatdef *f; { long x = 0; --- 615,619 ---- static PyObject * ! bu_int(const char *p, const formatdef *f) { long x = 0; *************** *** 695,701 **** static PyObject * ! bu_uint(p, f) ! const char *p; ! const formatdef *f; { unsigned long x = 0; --- 631,635 ---- static PyObject * ! bu_uint(const char *p, const formatdef *f) { unsigned long x = 0; *************** *** 711,717 **** static PyObject * ! bu_float(p, f) ! const char *p; ! const formatdef *f; { return unpack_float(p, 1); --- 645,649 ---- static PyObject * ! bu_float(const char *p, const formatdef *f) { return unpack_float(p, 1); *************** *** 719,725 **** static PyObject * ! bu_double(p, f) ! const char *p; ! const formatdef *f; { return unpack_double(p, 1); --- 651,655 ---- static PyObject * ! bu_double(const char *p, const formatdef *f) { return unpack_double(p, 1); *************** *** 727,734 **** static int ! bp_int(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { long x; --- 657,661 ---- static int ! bp_int(char *p, PyObject *v, const formatdef *f) { long x; *************** *** 745,752 **** static int ! bp_uint(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { unsigned long x; --- 672,676 ---- static int ! bp_uint(char *p, PyObject *v, const formatdef *f) { unsigned long x; *************** *** 763,770 **** static int ! bp_float(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { double x = PyFloat_AsDouble(v); --- 687,691 ---- static int ! bp_float(char *p, PyObject *v, const formatdef *f) { double x = PyFloat_AsDouble(v); *************** *** 778,785 **** static int ! bp_double(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { double x = PyFloat_AsDouble(v); --- 699,703 ---- static int ! bp_double(char *p, PyObject *v, const formatdef *f) { double x = PyFloat_AsDouble(v); *************** *** 811,817 **** static PyObject * ! lu_int(p, f) ! const char *p; ! const formatdef *f; { long x = 0; --- 729,733 ---- static PyObject * ! lu_int(const char *p, const formatdef *f) { long x = 0; *************** *** 829,835 **** static PyObject * ! lu_uint(p, f) ! const char *p; ! const formatdef *f; { unsigned long x = 0; --- 745,749 ---- static PyObject * ! lu_uint(const char *p, const formatdef *f) { unsigned long x = 0; *************** *** 845,851 **** static PyObject * ! lu_float(p, f) ! const char *p; ! const formatdef *f; { return unpack_float(p+3, -1); --- 759,763 ---- static PyObject * ! lu_float(const char *p, const formatdef *f) { return unpack_float(p+3, -1); *************** *** 853,859 **** static PyObject * ! lu_double(p, f) ! const char *p; ! const formatdef *f; { return unpack_double(p+7, -1); --- 765,769 ---- static PyObject * ! lu_double(const char *p, const formatdef *f) { return unpack_double(p+7, -1); *************** *** 861,868 **** static int ! lp_int(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { long x; --- 771,775 ---- static int ! lp_int(char *p, PyObject *v, const formatdef *f) { long x; *************** *** 879,886 **** static int ! lp_uint(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { unsigned long x; --- 786,790 ---- static int ! lp_uint(char *p, PyObject *v, const formatdef *f) { unsigned long x; *************** *** 897,904 **** static int ! lp_float(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { double x = PyFloat_AsDouble(v); --- 801,805 ---- static int ! lp_float(char *p, PyObject *v, const formatdef *f) { double x = PyFloat_AsDouble(v); *************** *** 912,919 **** static int ! lp_double(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { double x = PyFloat_AsDouble(v); --- 813,817 ---- static int ! lp_double(char *p, PyObject *v, const formatdef *f) { double x = PyFloat_AsDouble(v); *************** *** 946,951 **** static const formatdef * ! whichtable(pfmt) ! const char **pfmt; { const char *fmt = (*pfmt)++; /* May be backed out of later */ --- 844,848 ---- static const formatdef * ! whichtable(char **pfmt) { const char *fmt = (*pfmt)++; /* May be backed out of later */ *************** *** 976,982 **** static const formatdef * ! getentry(c, f) ! int c; ! const formatdef *f; { for (; f->format != '\0'; f++) { --- 873,877 ---- static const formatdef * ! getentry(int c, const formatdef *f) { for (; f->format != '\0'; f++) { *************** *** 993,1000 **** static int ! align(size, c, e) ! int size; ! int c; ! const formatdef *e; { if (e->format == c) { --- 888,892 ---- static int ! align(int size, int c, const formatdef *e) { if (e->format == c) { *************** *** 1012,1018 **** static int ! calcsize(fmt, f) ! const char *fmt; ! const formatdef *f; { const formatdef *e; --- 904,908 ---- static int ! calcsize(const char *fmt, const formatdef *f) { const formatdef *e; *************** *** 1068,1074 **** static PyObject * ! struct_calcsize(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *fmt; --- 958,962 ---- static PyObject * ! struct_calcsize(PyObject *self, PyObject *args) { char *fmt; *************** *** 1092,1098 **** static PyObject * ! struct_pack(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { const formatdef *f, *e; --- 980,984 ---- static PyObject * ! struct_pack(PyObject *self, PyObject *args) { const formatdef *f, *e; *************** *** 1232,1238 **** static PyObject * ! struct_unpack(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { const formatdef *f, *e; --- 1118,1122 ---- static PyObject * ! struct_unpack(PyObject *self, PyObject *args) { const formatdef *f, *e; Index: syslogmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/syslogmodule.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** syslogmodule.c 2000/02/29 13:59:24 2.13 --- syslogmodule.c 2000/07/10 12:29:26 2.14 *************** *** 54,60 **** static PyObject * ! syslog_openlog(self, args) ! PyObject * self; ! PyObject * args; { long logopt = 0; --- 54,58 ---- static PyObject * ! syslog_openlog(PyObject * self, PyObject * args) { long logopt = 0; *************** *** 81,87 **** static PyObject * ! syslog_syslog(self, args) ! PyObject * self; ! PyObject * args; { char *message; --- 79,83 ---- static PyObject * ! syslog_syslog(PyObject * self, PyObject * args) { char *message; *************** *** 102,108 **** static PyObject * ! syslog_closelog(self, args) ! PyObject * self; ! PyObject * args; { if (!PyArg_ParseTuple(args, ":closelog")) --- 98,102 ---- static PyObject * ! syslog_closelog(PyObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":closelog")) *************** *** 116,122 **** static PyObject * ! syslog_setlogmask(self, args) ! PyObject * self; ! PyObject * args; { long maskpri, omaskpri; --- 110,114 ---- static PyObject * ! syslog_setlogmask(PyObject *self, PyObject *args) { long maskpri, omaskpri; *************** *** 129,135 **** static PyObject * ! syslog_log_mask(self, args) ! PyObject * self; ! PyObject * args; { long mask; --- 121,125 ---- static PyObject * ! syslog_log_mask(PyObject *self, PyObject *args) { long mask; *************** *** 142,148 **** static PyObject * ! syslog_log_upto(self, args) ! PyObject * self; ! PyObject * args; { long mask; --- 132,136 ---- static PyObject * ! syslog_log_upto(PyObject *self, PyObject *args) { long mask; *************** *** 169,176 **** static void ! ins(d, s, x) ! PyObject *d; ! char *s; ! long x; { PyObject *v = PyInt_FromLong(x); --- 157,161 ---- static void ! ins(PyObject *d, char *s, long x) { PyObject *v = PyInt_FromLong(x); From python-dev@python.org Mon Jul 10 13:44:01 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 05:44:01 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _tkinter.c,1.104,1.105 md5module.c,2.17,2.18 parsermodule.c,2.44,2.45 svmodule.c,2.14,2.15 Message-ID: <200007101244.FAA22140@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv22008 Modified Files: _tkinter.c md5module.c parsermodule.c svmodule.c Log Message: ANSI-fying added excplicit node * parameter to termvalid argument in validate_two_chain_ops of parsermodule.c (as proposed by fred) Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.104 retrieving revision 1.105 diff -C2 -r1.104 -r1.105 *** _tkinter.c 2000/07/08 04:04:38 1.104 --- _tkinter.c 2000/07/10 12:43:58 1.105 *************** *** 266,270 **** /* XXX Too bad if you don't have select(). */ struct timeval t; - double frac; t.tv_sec = milli/1000; t.tv_usec = (milli%1000) * 1000; --- 266,269 ---- *************** *** 1504,1508 **** { PyObject *file; - FileHandler_ClientData *data; int tfile; --- 1503,1506 ---- Index: md5module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/md5module.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** md5module.c 2000/06/30 23:58:05 2.17 --- md5module.c 2000/07/10 12:43:58 2.18 *************** *** 48,53 **** static void ! md5_dealloc(md5p) ! md5object *md5p; { PyObject_Del(md5p); --- 48,52 ---- static void ! md5_dealloc(md5object *md5p) { PyObject_Del(md5p); *************** *** 58,64 **** static PyObject * ! md5_update(self, args) ! md5object *self; ! PyObject *args; { unsigned char *cp; --- 57,61 ---- static PyObject * ! md5_update(md5object *self, PyObject *args) { unsigned char *cp; *************** *** 83,89 **** static PyObject * ! md5_digest(self, args) ! md5object *self; ! PyObject *args; { --- 80,84 ---- static PyObject * ! md5_digest(md5object *self, PyObject *args) { *************** *** 110,116 **** static PyObject * ! md5_copy(self, args) ! md5object *self; ! PyObject *args; { md5object *md5p; --- 105,109 ---- static PyObject * ! md5_copy(md5object *self, PyObject *args) { md5object *md5p; *************** *** 141,147 **** static PyObject * ! md5_getattr(self, name) ! md5object *self; ! char *name; { return Py_FindMethod(md5_methods, (PyObject *)self, name); --- 134,138 ---- static PyObject * ! md5_getattr(md5object *self, char *name) { return Py_FindMethod(md5_methods, (PyObject *)self, name); *************** *** 209,215 **** static PyObject * ! MD5_new(self, args) ! PyObject *self; ! PyObject *args; { md5object *md5p; --- 200,204 ---- static PyObject * ! MD5_new(PyObject *self, PyObject *args) { md5object *md5p; Index: parsermodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v retrieving revision 2.44 retrieving revision 2.45 diff -C2 -r2.44 -r2.45 *** parsermodule.c 2000/07/09 14:36:13 2.44 --- parsermodule.c 2000/07/10 12:43:58 2.45 *************** *** 478,484 **** static PyObject* ! parser_getattr(self, name) ! PyObject *self; ! char *name; { return (Py_FindMethod(parser_methods, self, name)); --- 478,482 ---- static PyObject* ! parser_getattr(PyObject *self, char *name) { return (Py_FindMethod(parser_methods, self, name)); *************** *** 492,497 **** */ static void ! err_string(message) ! char *message; { PyErr_SetString(parser_error, message); --- 490,494 ---- */ static void ! err_string(char *message) { PyErr_SetString(parser_error, message); *************** *** 1633,1638 **** */ static int ! validate_try(tree) ! node *tree; { int nch = NCH(tree); --- 1630,1634 ---- */ static int ! validate_try(node *tree) { int nch = NCH(tree); *************** *** 1883,1891 **** static int ! validate_chain_two_ops(tree, termvalid, op1, op2) ! node *tree; ! int (*termvalid)(); ! int op1; ! int op2; { int pos = 1; --- 1879,1883 ---- static int ! validate_chain_two_ops(node *tree, int (*termvalid)(node *), int op1, int op2) { int pos = 1; Index: svmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/svmodule.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** svmodule.c 2000/07/09 03:09:56 2.14 --- svmodule.c 2000/07/10 12:43:58 2.15 *************** *** 49,57 **** static PyObject * ! svc_conversion(self, args, function, factor) ! captureobject *self; ! PyObject *args; ! void (*function)(); ! float factor; { PyObject *output; --- 49,53 ---- static PyObject * ! svc_conversion(captureobject *self, PyObject *args, void (*function)(), float factor) { PyObject *output; *************** *** 85,91 **** */ static PyObject * ! svc_YUVtoYUV422DC(self, args) ! captureobject *self; ! PyObject *args; { if (self->ob_info.format != SV_YUV411_FRAMES) { --- 81,85 ---- */ static PyObject * ! svc_YUVtoYUV422DC(captureobject *self, PyObject *args) { if (self->ob_info.format != SV_YUV411_FRAMES) { *************** *** 97,103 **** static PyObject * ! svc_YUVtoYUV422DC_quarter(self, args) ! captureobject *self; ! PyObject *args; { if (self->ob_info.format != SV_YUV411_FRAMES) { --- 91,95 ---- static PyObject * ! svc_YUVtoYUV422DC_quarter(captureobject *self, PyObject *args) { if (self->ob_info.format != SV_YUV411_FRAMES) { *************** *** 110,116 **** static PyObject * ! svc_YUVtoYUV422DC_sixteenth(self, args) ! captureobject *self; ! PyObject *args; { if (self->ob_info.format != SV_YUV411_FRAMES) { --- 102,106 ---- static PyObject * ! svc_YUVtoYUV422DC_sixteenth(captureobject *self, PyObject *args) { if (self->ob_info.format != SV_YUV411_FRAMES) { *************** *** 123,129 **** static PyObject * ! svc_YUVtoRGB(self, args) ! captureobject *self; ! PyObject *args; { switch (self->ob_info.format) { --- 113,117 ---- static PyObject * ! svc_YUVtoRGB(captureobject *self, PyObject *args) { switch (self->ob_info.format) { *************** *** 139,145 **** static PyObject * ! svc_RGB8toRGB32(self, args) ! captureobject *self; ! PyObject *args; { if (self->ob_info.format != SV_RGB8_FRAMES) { --- 127,131 ---- static PyObject * ! svc_RGB8toRGB32(captureobject *self, PyObject *args) { if (self->ob_info.format != SV_RGB8_FRAMES) { *************** *** 151,157 **** static PyObject * ! svc_InterleaveFields(self, args) ! captureobject *self; ! PyObject *args; { if (self->ob_info.format != SV_RGB8_FRAMES) { --- 137,141 ---- static PyObject * ! svc_InterleaveFields(captureobject *self, PyObject *args) { if (self->ob_info.format != SV_RGB8_FRAMES) { *************** *** 163,169 **** static PyObject * ! svc_GetFields(self, args) ! captureobject *self; ! PyObject *args; { PyObject *f1 = NULL; --- 147,151 ---- static PyObject * ! svc_GetFields(captureobject *self, PyObject *args) { PyObject *f1 = NULL; *************** *** 195,201 **** static PyObject * ! svc_UnlockCaptureData(self, args) ! captureobject *self; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 177,181 ---- static PyObject * ! svc_UnlockCaptureData(captureobject *self, PyObject *args) { if (!PyArg_Parse(args, "")) *************** *** 220,226 **** static PyObject * ! svc_lrectwrite(self, args) ! captureobject *self; ! PyObject *args; { Screencoord x1, x2, y1, y2; --- 200,204 ---- static PyObject * ! svc_lrectwrite(captureobject *self, PyObject *args) { Screencoord x1, x2, y1, y2; *************** *** 237,243 **** static PyObject * ! svc_writefile(self, args) ! captureobject *self; ! PyObject *args; { PyObject *file; --- 215,219 ---- static PyObject * ! svc_writefile(captureobject *self, PyObject *args) { PyObject *file; *************** *** 268,274 **** static PyObject * ! svc_FindVisibleRegion(self, args) ! captureobject *self; ! PyObject *args; { void *visible; --- 244,248 ---- static PyObject * ! svc_FindVisibleRegion(captureobject *self, PyObject *args) { void *visible; *************** *** 309,314 **** static void ! capture_dealloc(self) ! captureobject *self; { if (self->ob_capture != NULL) { --- 283,287 ---- static void ! capture_dealloc(captureobject *self) { if (self->ob_capture != NULL) { *************** *** 324,330 **** static PyObject * ! capture_getattr(self, name) ! svobject *self; ! char *name; { return Py_FindMethod(capture_methods, (PyObject *)self, name); --- 297,301 ---- static PyObject * ! capture_getattr(svobject *self, char *name) { return Py_FindMethod(capture_methods, (PyObject *)self, name); *************** *** 347,354 **** static PyObject * ! newcaptureobject(self, ptr, mustunlock) ! svobject *self; ! void *ptr; ! int mustunlock; { captureobject *p; --- 318,322 ---- static PyObject * ! newcaptureobject(svobject *self, void *ptr, int mustunlock) { captureobject *p; *************** *** 366,372 **** static PyObject * ! sv_GetCaptureData(self, args) ! svobject *self; ! PyObject *args; { void *ptr; --- 334,338 ---- static PyObject * ! sv_GetCaptureData(svobject *self, PyObject *args) { void *ptr; *************** *** 394,400 **** static PyObject * ! sv_BindGLWindow(self, args) ! svobject *self; ! PyObject *args; { long wid; --- 360,364 ---- static PyObject * ! sv_BindGLWindow(svobject *self, PyObject *args) { long wid; *************** *** 412,418 **** static PyObject * ! sv_EndContinuousCapture(self, args) ! svobject *self; ! PyObject *args; { --- 376,380 ---- static PyObject * ! sv_EndContinuousCapture(svobject *self, PyObject *args) { *************** *** 428,434 **** static PyObject * ! sv_IsVideoDisplayed(self, args) ! svobject *self; ! PyObject *args; { int v; --- 390,394 ---- static PyObject * ! sv_IsVideoDisplayed(svobject *self, PyObject *args) { int v; *************** *** 445,451 **** static PyObject * ! sv_OutputOffset(self, args) ! svobject *self; ! PyObject *args; { int x_offset; --- 405,409 ---- static PyObject * ! sv_OutputOffset(svobject *self, PyObject *args) { int x_offset; *************** *** 463,469 **** static PyObject * ! sv_PutFrame(self, args) ! svobject *self; ! PyObject *args; { char *buffer; --- 421,425 ---- static PyObject * ! sv_PutFrame(svobject *self, PyObject *args) { char *buffer; *************** *** 480,486 **** static PyObject * ! sv_QuerySize(self, args) ! svobject *self; ! PyObject *args; { int w; --- 436,440 ---- static PyObject * ! sv_QuerySize(svobject *self, PyObject *args) { int w; *************** *** 499,505 **** static PyObject * ! sv_SetSize(self, args) ! svobject *self; ! PyObject *args; { int w; --- 453,457 ---- static PyObject * ! sv_SetSize(svobject *self, PyObject *args) { int w; *************** *** 517,523 **** static PyObject * ! sv_SetStdDefaults(self, args) ! svobject *self; ! PyObject *args; { --- 469,473 ---- static PyObject * ! sv_SetStdDefaults(svobject *self, PyObject *args) { *************** *** 533,539 **** static PyObject * ! sv_UseExclusive(self, args) ! svobject *self; ! PyObject *args; { boolean onoff; --- 483,487 ---- static PyObject * ! sv_UseExclusive(svobject *self, PyObject *args) { boolean onoff; *************** *** 551,557 **** static PyObject * ! sv_WindowOffset(self, args) ! svobject *self; ! PyObject *args; { int x_offset; --- 499,503 ---- static PyObject * ! sv_WindowOffset(svobject *self, PyObject *args) { int x_offset; *************** *** 569,575 **** static PyObject * ! sv_CaptureBurst(self, args) ! svobject *self; ! PyObject *args; { int bytes, i; --- 515,519 ---- static PyObject * ! sv_CaptureBurst(svobject *self, PyObject *args) { int bytes, i; *************** *** 662,668 **** static PyObject * ! sv_CaptureOneFrame(self, args) ! svobject *self; ! PyObject *args; { svCaptureInfo info; --- 606,610 ---- static PyObject * ! sv_CaptureOneFrame(svobject *self, PyObject *args) { svCaptureInfo info; *************** *** 704,710 **** static PyObject * ! sv_InitContinuousCapture(self, args) ! svobject *self; ! PyObject *args; { svCaptureInfo info; --- 646,650 ---- static PyObject * ! sv_InitContinuousCapture(svobject *self, PyObject *args) { svCaptureInfo info; *************** *** 725,731 **** static PyObject * ! sv_LoadMap(self, args) ! svobject *self; ! PyObject *args; { PyObject *rgb; --- 665,669 ---- static PyObject * ! sv_LoadMap(svobject *self, PyObject *args) { PyObject *rgb; *************** *** 788,794 **** static PyObject * ! sv_CloseVideo(self, args) ! svobject *self; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 726,730 ---- static PyObject * ! sv_CloseVideo(svobject *self, PyObject *args) { if (!PyArg_Parse(args, "")) *************** *** 804,812 **** static PyObject * ! doParams(self, args, func, modified) ! svobject *self; ! PyObject *args; ! int (*func)(SV_nodeP, long *, int); ! int modified; { PyObject *list; --- 740,745 ---- static PyObject * ! doParams(svobject *self, PyObject *args, ! int (*func)(SV_nodeP, long *, int), int modified) { PyObject *list; *************** *** 870,875 **** static PyObject * ! sv_GetParam(self, args) ! PyObject *self, *args; { return doParams(self, args, svGetParam, 1); --- 803,807 ---- static PyObject * ! sv_GetParam(PyObject *self, PyObject *args) { return doParams(self, args, svGetParam, 1); *************** *** 877,882 **** static PyObject * ! sv_GetParamRange(self, args) ! PyObject *self, *args; { return doParams(self, args, svGetParamRange, 1); --- 809,813 ---- static PyObject * ! sv_GetParamRange(PyObject *self, PyObject *args) { return doParams(self, args, svGetParamRange, 1); *************** *** 884,889 **** static PyObject * ! sv_SetParam(self, args) ! PyObject *self, *args; { return doParams(self, args, svSetParam, 0); --- 815,819 ---- static PyObject * ! sv_SetParam(PyObject *self, PyObject *args) { return doParams(self, args, svSetParam, 0); *************** *** 914,922 **** static PyObject * ! sv_conversion(self, args, function, inputfactor, factor) ! PyObject *self, *args; ! void (*function)(); ! int inputfactor; ! float factor; { int invert, width, height, inputlength; --- 844,849 ---- static PyObject * ! sv_conversion(PyObject *self, PyObject *args, void (*function)(), ! int inputfactor, float factor) { int invert, width, height, inputlength; *************** *** 948,953 **** static PyObject * ! sv_InterleaveFields(self, args) ! PyObject *self, *args; { return sv_conversion(self, args, svInterleaveFields, 1, 1.0); --- 875,879 ---- static PyObject * ! sv_InterleaveFields(PyObject *self, PyObject *args) { return sv_conversion(self, args, svInterleaveFields, 1, 1.0); *************** *** 955,960 **** static PyObject * ! sv_RGB8toRGB32(self, args) ! PyObject *self, *args; { return sv_conversion(self, args, svRGB8toRGB32, 1, (float) sizeof(long)); --- 881,885 ---- static PyObject * ! sv_RGB8toRGB32(PyObject *self, PyObject *args) { return sv_conversion(self, args, svRGB8toRGB32, 1, (float) sizeof(long)); *************** *** 962,967 **** static PyObject * ! sv_YUVtoRGB(self, args) ! PyObject *self, *args; { return sv_conversion(self, args, svYUVtoRGB, 2, (float) sizeof(long)); --- 887,891 ---- static PyObject * ! sv_YUVtoRGB(PyObject *self, PyObject *args) { return sv_conversion(self, args, svYUVtoRGB, 2, (float) sizeof(long)); *************** *** 969,974 **** static void ! svideo_dealloc(self) ! svobject *self; { if (self->ob_svideo != NULL) --- 893,897 ---- static void ! svideo_dealloc(svobject *self) { if (self->ob_svideo != NULL) *************** *** 978,984 **** static PyObject * ! svideo_getattr(self, name) ! svobject *self; ! char *name; { return Py_FindMethod(svideo_methods, (PyObject *)self, name); --- 901,905 ---- static PyObject * ! svideo_getattr(svobject *self, char *name) { return Py_FindMethod(svideo_methods, (PyObject *)self, name); *************** *** 1001,1006 **** static PyObject * ! newsvobject(svp) ! SV_nodeP svp; { svobject *p; --- 922,926 ---- static PyObject * ! newsvobject(SV_nodeP svp) { svobject *p; *************** *** 1019,1024 **** static PyObject * ! sv_OpenVideo(self, args) ! PyObject *self, *args; { SV_nodeP svp; --- 939,943 ---- static PyObject * ! sv_OpenVideo(PyObject *self, PyObject *args) { SV_nodeP svp; From python-dev@python.org Mon Jul 10 14:05:31 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 06:05:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules regexmodule.c,1.36,1.37 regexpr.c,1.30,1.31 rotormodule.c,2.24,2.25 Message-ID: <200007101305.GAA27805@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv27262 Modified Files: regexmodule.c regexpr.c rotormodule.c Log Message: ANSI-fication Index: regexmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/regexmodule.c,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** regexmodule.c 2000/06/30 23:58:05 1.36 --- regexmodule.c 2000/07/10 13:05:28 1.37 *************** *** 41,46 **** static void ! reg_dealloc(re) ! regexobject *re; { if (re->re_patbuf.buffer) --- 41,45 ---- static void ! reg_dealloc(regexobject *re) { if (re->re_patbuf.buffer) *************** *** 55,60 **** static PyObject * ! makeresult(regs) ! struct re_registers *regs; { PyObject *v; --- 54,58 ---- static PyObject * ! makeresult(struct re_registers *regs) { PyObject *v; *************** *** 90,96 **** static PyObject * ! regobj_match(re, args) ! regexobject *re; ! PyObject *args; { PyObject *argstring; --- 88,92 ---- static PyObject * ! regobj_match(regexobject *re, PyObject *args) { PyObject *argstring; *************** *** 128,134 **** static PyObject * ! regobj_search(re, args) ! regexobject *re; ! PyObject *args; { PyObject *argstring; --- 124,128 ---- static PyObject * ! regobj_search(regexobject *re, PyObject *args) { PyObject *argstring; *************** *** 175,181 **** */ static PyObject* ! group_from_index(re, index) ! regexobject *re; ! PyObject *index; { int i, a, b; --- 169,173 ---- */ static PyObject* ! group_from_index(regexobject *re, PyObject *index) { int i, a, b; *************** *** 219,225 **** static PyObject * ! regobj_group(re, args) ! regexobject *re; ! PyObject *args; { int n = PyTuple_Size(args); --- 211,215 ---- static PyObject * ! regobj_group(regexobject *re, PyObject *args) { int n = PyTuple_Size(args); *************** *** 282,288 **** static PyObject * ! regobj_getattr(re, name) ! regexobject *re; ! char *name; { if (strcmp(name, "regs") == 0) { --- 272,276 ---- static PyObject * ! regobj_getattr(regexobject *re, char *name) { if (strcmp(name, "regs") == 0) { *************** *** 381,389 **** */ static PyObject * ! newregexobject(pattern, translate, givenpat, groupindex) ! PyObject *pattern; ! PyObject *translate; ! PyObject *givenpat; ! PyObject *groupindex; { regexobject *re; --- 369,373 ---- */ static PyObject * ! newregexobject(PyObject *pattern, PyObject *translate, PyObject *givenpat, PyObject *groupindex) { regexobject *re; *************** *** 433,439 **** static PyObject * ! regex_compile(self, args) ! PyObject *self; ! PyObject *args; { PyObject *pat = NULL; --- 417,421 ---- static PyObject * ! regex_compile(PyObject *self, PyObject *args) { PyObject *pat = NULL; *************** *** 446,452 **** static PyObject * ! symcomp(pattern, gdict) ! PyObject *pattern; ! PyObject *gdict; { char *opat, *oend, *o, *n, *g, *v; --- 428,432 ---- static PyObject * ! symcomp(PyObject *pattern, PyObject *gdict) { char *opat, *oend, *o, *n, *g, *v; *************** *** 555,561 **** static PyObject * ! regex_symcomp(self, args) ! PyObject *self; ! PyObject *args; { PyObject *pattern; --- 535,539 ---- static PyObject * ! regex_symcomp(PyObject *self, PyObject *args) { PyObject *pattern; *************** *** 584,589 **** static int ! update_cache(pat) ! PyObject *pat; { PyObject *tuple = Py_BuildValue("(O)", pat); --- 562,566 ---- static int ! update_cache(PyObject *pat) { PyObject *tuple = Py_BuildValue("(O)", pat); *************** *** 611,617 **** static PyObject * ! regex_match(self, args) ! PyObject *self; ! PyObject *args; { PyObject *pat, *string; --- 588,592 ---- static PyObject * ! regex_match(PyObject *self, PyObject *args) { PyObject *pat, *string; *************** *** 631,637 **** static PyObject * ! regex_search(self, args) ! PyObject *self; ! PyObject *args; { PyObject *pat, *string; --- 606,610 ---- static PyObject * ! regex_search(PyObject *self, PyObject *args) { PyObject *pat, *string; *************** *** 651,657 **** static PyObject * ! regex_set_syntax(self, args) ! PyObject *self; ! PyObject *args; { int syntax; --- 624,628 ---- static PyObject * ! regex_set_syntax(PyObject *self, PyObject *args) { int syntax; *************** *** 668,674 **** static PyObject * ! regex_get_syntax(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 639,643 ---- static PyObject * ! regex_get_syntax(PyObject *self, PyObject *args) { if (!PyArg_Parse(args, "")) Index: regexpr.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/regexpr.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -r1.30 -r1.31 *** regexpr.c 1999/04/10 15:46:56 1.30 --- regexpr.c 2000/07/10 13:05:28 1.31 *************** *** 547,552 **** } ! int re_set_syntax(syntax) ! int syntax; { int ret; --- 547,551 ---- } ! int re_set_syntax(int syntax) { int ret; *************** *** 559,564 **** } ! static int hex_char_to_decimal(ch) ! int ch; { if (ch >= '0' && ch <= '9') --- 558,562 ---- } ! static int hex_char_to_decimal(int ch) { if (ch >= '0' && ch <= '9') *************** *** 571,584 **** } ! static void re_compile_fastmap_aux(code, ! pos, ! visited, ! can_be_null, ! fastmap) ! unsigned char *code; ! int pos; ! unsigned char *visited; ! unsigned char *can_be_null; ! unsigned char *fastmap; { int a; --- 569,576 ---- } ! static void re_compile_fastmap_aux(unsigned char *code, int pos, ! unsigned char *visited, ! unsigned char *can_be_null, ! unsigned char *fastmap) { int a; *************** *** 707,720 **** } ! static int re_do_compile_fastmap(buffer, ! used, ! pos, ! can_be_null, ! fastmap) ! unsigned char *buffer; ! int used; ! int pos; ! unsigned char *can_be_null; ! unsigned char *fastmap; { unsigned char small_visited[512], *visited; --- 699,705 ---- } ! static int re_do_compile_fastmap(unsigned char *buffer, int used, int pos, ! unsigned char *can_be_null, ! unsigned char *fastmap) { unsigned char small_visited[512], *visited; *************** *** 737,742 **** } ! void re_compile_fastmap(bufp) ! regexp_t bufp; { if (!bufp->fastmap || bufp->fastmap_accurate) --- 722,726 ---- } ! void re_compile_fastmap(regexp_t bufp) { if (!bufp->fastmap || bufp->fastmap_accurate) *************** *** 783,789 **** */ ! static int re_optimize_star_jump(bufp, code) ! regexp_t bufp; ! unsigned char *code; { unsigned char map[256]; --- 767,771 ---- */ ! static int re_optimize_star_jump(regexp_t bufp, unsigned char *code) { unsigned char map[256]; *************** *** 946,951 **** } ! static int re_optimize(bufp) ! regexp_t bufp; { unsigned char *code; --- 928,932 ---- } ! static int re_optimize(regexp_t bufp) { unsigned char *code; *************** *** 1148,1155 **** } ! char *re_compile_pattern(regex, size, bufp) ! unsigned char *regex; ! int size; ! regexp_t bufp; { int a; --- 1129,1133 ---- } ! char *re_compile_pattern(unsigned char *regex, int size, regexp_t bufp) { int a; *************** *** 1418,1423 **** int offset; int range; ! int firstchar; ! SET_LEVEL_START; ALLOC(1+256/8); --- 1396,1401 ---- int offset; int range; ! int firstchar; ! SET_LEVEL_START; ALLOC(1+256/8); *************** *** 1587,1600 **** var = translate[var] ! int re_match(bufp, ! string, ! size, ! pos, ! old_regs) ! regexp_t bufp; ! unsigned char *string; ! int size; ! int pos; ! regexp_registers_t old_regs; { unsigned char *code; --- 1565,1570 ---- var = translate[var] ! int re_match(regexp_t bufp, unsigned char *string, int size, int pos, ! regexp_registers_t old_regs) { unsigned char *code; *************** *** 2022,2037 **** #undef NEXTCHAR ! int re_search(bufp, ! string, ! size, ! pos, ! range, ! regs) ! regexp_t bufp; ! unsigned char *string; ! int size; ! int pos; ! int range; ! regexp_registers_t regs; { unsigned char *fastmap; --- 1992,1997 ---- #undef NEXTCHAR ! int re_search(regexp_t bufp, unsigned char *string, int size, int pos, ! int range, regexp_registers_t regs) { unsigned char *fastmap; Index: rotormodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/rotormodule.c,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -r2.24 -r2.25 *** rotormodule.c 2000/06/28 21:31:10 2.24 --- rotormodule.c 2000/07/10 13:05:29 2.25 *************** *** 88,93 **** static void ! set_seed(r) ! Rotorobj *r; { r->seed[0] = r->key[0]; --- 88,92 ---- static void ! set_seed(Rotorobj *r) { r->seed[0] = r->key[0]; *************** *** 99,104 **** /* Return the next random number in the range [0.0 .. 1.0) */ static double ! r_random(r) ! Rotorobj *r; { int x, y, z; --- 98,102 ---- /* Return the next random number in the range [0.0 .. 1.0) */ static double ! r_random(Rotorobj *r) { int x, y, z; *************** *** 135,141 **** static short ! r_rand(r, s) ! Rotorobj *r; ! short s; { return (short)((short)(r_random(r) * (double)s) % s); --- 133,137 ---- static short ! r_rand(Rotorobj *r, short s) { return (short)((short)(r_random(r) * (double)s) % s); *************** *** 143,149 **** static void ! set_key(r, key) ! Rotorobj *r; ! char *key; { unsigned long k1=995, k2=576, k3=767, k4=671, k5=463; --- 139,143 ---- static void ! set_key(Rotorobj *r, char *key) { unsigned long k1=995, k2=576, k3=767, k4=671, k5=463; *************** *** 173,179 **** /* These define the interface to a rotor object */ static Rotorobj * ! rotorobj_new(num_rotors, key) ! int num_rotors; ! char *key; { Rotorobj *xp; --- 167,171 ---- /* These define the interface to a rotor object */ static Rotorobj * ! rotorobj_new(int num_rotors, char *key) { Rotorobj *xp; *************** *** 252,258 **** /* Set ROTOR to the identity permutation */ static void ! RTR_make_id_rotor(r, rtr) ! Rotorobj *r; ! unsigned char *rtr; { register int j; --- 244,248 ---- /* Set ROTOR to the identity permutation */ static void ! RTR_make_id_rotor(Rotorobj *r, unsigned char *rtr) { register int j; *************** *** 266,271 **** /* The current set of encryption rotors */ static void ! RTR_e_rotors(r) ! Rotorobj *r; { int i; --- 256,260 ---- /* The current set of encryption rotors */ static void ! RTR_e_rotors(Rotorobj *r) { int i; *************** *** 277,282 **** /* The current set of decryption rotors */ static void ! RTR_d_rotors(r) ! Rotorobj *r; { register int i, j; --- 266,270 ---- /* The current set of decryption rotors */ static void ! RTR_d_rotors(Rotorobj *r) { register int i, j; *************** *** 290,295 **** /* The positions of the rotors at this time */ static void ! RTR_positions(r) ! Rotorobj *r; { int i; --- 278,282 ---- /* The positions of the rotors at this time */ static void ! RTR_positions(Rotorobj *r) { int i; *************** *** 301,306 **** /* The number of positions to advance the rotors at a time */ static void ! RTR_advances(r) ! Rotorobj *r; { int i; --- 288,292 ---- /* The number of positions to advance the rotors at a time */ static void ! RTR_advances(Rotorobj *r) { int i; *************** *** 314,321 **** */ static void ! RTR_permute_rotor(r, e, d) ! Rotorobj *r; ! unsigned char *e; ! unsigned char *d; { short i = r->size; --- 300,304 ---- */ static void ! RTR_permute_rotor(Rotorobj *r, unsigned char *e, unsigned char *d) { short i = r->size; *************** *** 339,344 **** */ static void ! RTR_init(r) ! Rotorobj *r; { int i; --- 322,326 ---- */ static void ! RTR_init(Rotorobj *r) { int i; *************** *** 360,365 **** /* Change the RTR-positions vector, using the RTR-advances vector */ static void ! RTR_advance(r) ! Rotorobj *r; { register int i=0, temp=0; --- 342,346 ---- /* Change the RTR-positions vector, using the RTR-advances vector */ static void ! RTR_advance(Rotorobj *r) { register int i=0, temp=0; *************** *** 387,393 **** /* Encrypt the character P with the current rotor machine */ static unsigned char ! RTR_e_char(r, p) ! Rotorobj *r; ! unsigned char p; { register int i=0; --- 368,372 ---- /* Encrypt the character P with the current rotor machine */ static unsigned char ! RTR_e_char(Rotorobj *r, unsigned char p) { register int i=0; *************** *** 414,420 **** /* Decrypt the character C with the current rotor machine */ static unsigned char ! RTR_d_char(r, c) ! Rotorobj *r; ! unsigned char c; { register int i = r->rotors - 1; --- 393,397 ---- /* Decrypt the character C with the current rotor machine */ static unsigned char ! RTR_d_char(Rotorobj *r, unsigned char c) { register int i = r->rotors - 1; *************** *** 441,449 **** /* Perform a rotor encryption of the region from BEG to END by KEY */ static void ! RTR_e_region(r, beg, len, doinit) ! Rotorobj *r; ! unsigned char *beg; ! int len; ! int doinit; { register int i; --- 418,422 ---- /* Perform a rotor encryption of the region from BEG to END by KEY */ static void ! RTR_e_region(Rotorobj *r, unsigned char *beg, int len, int doinit) { register int i; *************** *** 457,465 **** /* Perform a rotor decryption of the region from BEG to END by KEY */ static void ! RTR_d_region(r, beg, len, doinit) ! Rotorobj *r; ! unsigned char *beg; ! int len; ! int doinit; { register int i; --- 430,434 ---- /* Perform a rotor decryption of the region from BEG to END by KEY */ static void ! RTR_d_region(Rotorobj *r, unsigned char *beg, int len, int doinit) { register int i; *************** *** 475,480 **** /* Rotor methods */ static void ! rotor_dealloc(xp) ! Rotorobj *xp; { if (xp->e_rotor) --- 444,448 ---- /* Rotor methods */ static void ! rotor_dealloc(Rotorobj *xp) { if (xp->e_rotor) *************** *** 490,496 **** static PyObject * ! rotorobj_encrypt(self, args) ! Rotorobj *self; ! PyObject * args; { char *string = NULL; --- 458,462 ---- static PyObject * ! rotorobj_encrypt(Rotorobj *self, PyObject *args) { char *string = NULL; *************** *** 514,520 **** static PyObject * ! rotorobj_encrypt_more(self, args) ! Rotorobj *self; ! PyObject * args; { char *string = NULL; --- 480,484 ---- static PyObject * ! rotorobj_encrypt_more(Rotorobj *self, PyObject *args) { char *string = NULL; *************** *** 538,544 **** static PyObject * ! rotorobj_decrypt(self, args) ! Rotorobj *self; ! PyObject * args; { char *string = NULL; --- 502,506 ---- static PyObject * ! rotorobj_decrypt(Rotorobj *self, PyObject *args) { char *string = NULL; *************** *** 562,568 **** static PyObject * ! rotorobj_decrypt_more(self, args) ! Rotorobj *self; ! PyObject * args; { char *string = NULL; --- 524,528 ---- static PyObject * ! rotorobj_decrypt_more(Rotorobj *self, PyObject *args) { char *string = NULL; *************** *** 586,592 **** static PyObject * ! rotorobj_setkey(self, args) ! Rotorobj *self; ! PyObject * args; { char *key; --- 546,550 ---- static PyObject * ! rotorobj_setkey(Rotorobj *self, PyObject *args) { char *key; *************** *** 613,619 **** /* Return a rotor object's named attribute. */ static PyObject * ! rotorobj_getattr(s, name) ! Rotorobj *s; ! char *name; { return Py_FindMethod(rotorobj_methods, (PyObject*)s, name); --- 571,575 ---- /* Return a rotor object's named attribute. */ static PyObject * ! rotorobj_getattr(Rotorobj *s, char *name) { return Py_FindMethod(rotorobj_methods, (PyObject*)s, name); *************** *** 639,645 **** static PyObject * ! rotor_rotor(self, args) ! PyObject * self; ! PyObject * args; { Rotorobj *r; --- 595,599 ---- static PyObject * ! rotor_rotor(PyObject *self, PyObject *args) { Rotorobj *r; From python-dev@python.org Mon Jul 10 14:12:30 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 06:12:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules nismodule.c,2.17,2.18 pcremodule.c,2.21,2.22 pwdmodule.c,1.19,1.20 Message-ID: <200007101312.GAA30272@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv30258 Modified Files: nismodule.c pcremodule.c pwdmodule.c Log Message: ANSI-fication Index: nismodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/nismodule.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** nismodule.c 2000/07/09 03:09:55 2.17 --- nismodule.c 2000/07/10 13:12:27 2.18 *************** *** 27,32 **** static PyObject * ! nis_error (err) ! int err; { PyErr_SetString(NisError, yperr_string(err)); --- 27,31 ---- static PyObject * ! nis_error (int err) { PyErr_SetString(NisError, yperr_string(err)); *************** *** 51,57 **** static char * ! nis_mapname (map, pfix) ! char *map; ! int *pfix; { int i; --- 50,54 ---- static char * ! nis_mapname (char *map, int *pfix) { int i; *************** *** 80,90 **** static int ! nis_foreach (instatus, inkey, inkeylen, inval, invallen, indata) ! int instatus; ! char *inkey; ! int inkeylen; ! char *inval; ! int invallen; ! struct ypcallback_data *indata; { if (instatus == YP_TRUE) { --- 77,82 ---- static int ! nis_foreach (int instatus, char *inkey, int inkeylen, char *inval, ! int invallen, struct ypcallback_data *indata) { if (instatus == YP_TRUE) { *************** *** 119,125 **** static PyObject * ! nis_match (self, args) ! PyObject *self; ! PyObject *args; { char *match; --- 111,115 ---- static PyObject * ! nis_match (PyObject *self, PyObject *args) { char *match; *************** *** 151,157 **** static PyObject * ! nis_cat (self, args) ! PyObject *self; ! PyObject *args; { char *domain; --- 141,145 ---- static PyObject * ! nis_cat (PyObject *self, PyObject *args) { char *domain; *************** *** 229,235 **** static bool_t ! nis_xdr_domainname(xdrs, objp) ! XDR *xdrs; ! domainname *objp; { if (!xdr_string(xdrs, objp, YPMAXDOMAIN)) { --- 217,221 ---- static bool_t ! nis_xdr_domainname(XDR *xdrs, domainname *objp) { if (!xdr_string(xdrs, objp, YPMAXDOMAIN)) { *************** *** 241,247 **** static bool_t ! nis_xdr_mapname(xdrs, objp) ! XDR *xdrs; ! mapname *objp; { if (!xdr_string(xdrs, objp, YPMAXMAP)) { --- 227,231 ---- static bool_t ! nis_xdr_mapname(XDR *xdrs, mapname *objp) { if (!xdr_string(xdrs, objp, YPMAXMAP)) { *************** *** 253,259 **** static bool_t ! nis_xdr_ypmaplist(xdrs, objp) ! XDR *xdrs; ! nismaplist *objp; { if (!nis_xdr_mapname(xdrs, &objp->map)) { --- 237,241 ---- static bool_t ! nis_xdr_ypmaplist(XDR *xdrs, nismaplist *objp) { if (!nis_xdr_mapname(xdrs, &objp->map)) { *************** *** 270,276 **** static bool_t ! nis_xdr_ypstat(xdrs, objp) ! XDR *xdrs; ! nisstat *objp; { if (!xdr_enum(xdrs, (enum_t *)objp)) { --- 252,256 ---- static bool_t ! nis_xdr_ypstat(XDR *xdrs, nisstat *objp) { if (!xdr_enum(xdrs, (enum_t *)objp)) { *************** *** 283,289 **** static bool_t ! nis_xdr_ypresp_maplist(xdrs, objp) ! XDR *xdrs; ! nisresp_maplist *objp; { if (!nis_xdr_ypstat(xdrs, &objp->stat)) { --- 263,267 ---- static bool_t ! nis_xdr_ypresp_maplist(XDR *xdrs, nisresp_maplist *objp) { if (!nis_xdr_ypstat(xdrs, &objp->stat)) { *************** *** 301,307 **** static nisresp_maplist * ! nisproc_maplist_2(argp, clnt) ! domainname *argp; ! CLIENT *clnt; { static nisresp_maplist res; --- 279,283 ---- static nisresp_maplist * ! nisproc_maplist_2(domainname *argp, CLIENT *clnt) { static nisresp_maplist res; *************** *** 363,369 **** static PyObject * ! nis_maps (self, args) ! PyObject *self; ! PyObject *args; { nismaplist *maps; --- 339,343 ---- static PyObject * ! nis_maps (PyObject *self, PyObject *args) { nismaplist *maps; Index: pcremodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pcremodule.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** pcremodule.c 2000/07/06 19:38:49 2.21 --- pcremodule.c 2000/07/10 13:12:27 2.22 *************** *** 61,66 **** static PcreObject * ! newPcreObject(arg) ! PyObject *arg; { PcreObject *self; --- 61,65 ---- static PcreObject * ! newPcreObject(PyObject *args) { PcreObject *self; *************** *** 76,81 **** static void ! PyPcre_dealloc(self) ! PcreObject *self; { if (self->regex) (pcre_free)(self->regex); --- 75,79 ---- static void ! PyPcre_dealloc(PcreObject *self) { if (self->regex) (pcre_free)(self->regex); *************** *** 86,92 **** static PyObject * ! PyPcre_exec(self, args) ! PcreObject *self; ! PyObject *args; { char *string; --- 84,88 ---- static PyObject * ! PyPcre_exec(PcreObject *self, PyObject *args) { char *string; *************** *** 140,146 **** static PyObject * ! PyPcre_getattr(self, name) ! PcreObject *self; ! char *name; { return Py_FindMethod(Pcre_methods, (PyObject *)self, name); --- 136,140 ---- static PyObject * ! PyPcre_getattr(PcreObject *self, char *name) { return Py_FindMethod(Pcre_methods, (PyObject *)self, name); *************** *** 169,175 **** static PyObject * ! PyPcre_compile(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { PcreObject *rv; --- 163,167 ---- static PyObject * ! PyPcre_compile(PyObject *self, PyObject *args) { PcreObject *rv; *************** *** 221,227 **** static PyObject * ! PyPcre_expand_escape(pattern, pattern_len, indexptr, typeptr) ! unsigned char *pattern; ! int pattern_len, *indexptr, *typeptr; { unsigned char c; --- 213,218 ---- static PyObject * ! PyPcre_expand_escape(unsigned char *pattern, int pattern_len, ! int *indexptr, int *typeptr) { unsigned char c; *************** *** 448,454 **** static PyObject * ! PyPcre_expand(self, args) ! PyObject *self; ! PyObject *args; { PyObject *results, *match_obj; --- 439,443 ---- static PyObject * ! PyPcre_expand(PyObject *self, PyObject *args) { PyObject *results, *match_obj; *************** *** 624,631 **** static void ! insint(d, name, value) ! PyObject * d; ! char * name; ! int value; { PyObject *v = PyInt_FromLong((long) value); --- 613,617 ---- static void ! insint(PyObject *d, char *name, int value) { PyObject *v = PyInt_FromLong((long) value); Index: pwdmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pwdmodule.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** pwdmodule.c 2000/06/30 23:58:05 1.19 --- pwdmodule.c 2000/07/10 13:12:27 1.20 *************** *** 28,33 **** static PyObject * ! mkpwent(p) ! struct passwd *p; { #ifdef __BEOS__ --- 28,32 ---- static PyObject * ! mkpwent(struct passwd *p) { #ifdef __BEOS__ *************** *** 67,73 **** static PyObject * ! pwd_getpwuid(self, args) ! PyObject *self; ! PyObject *args; { int uid; --- 66,70 ---- static PyObject * ! pwd_getpwuid(PyObject *self, PyObject *args) { int uid; *************** *** 88,94 **** static PyObject * ! pwd_getpwnam(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 85,89 ---- static PyObject * ! pwd_getpwnam(PyObject *self, PyObject *args) { char *name; *************** *** 111,117 **** static PyObject * ! pwd_getpwall(self, args) ! PyObject *self; ! PyObject *args; { PyObject *d; --- 106,110 ---- static PyObject * ! pwd_getpwall(PyObject *self, PyObject *args) { PyObject *d; From python-dev@python.org Mon Jul 10 14:56:38 2000 From: python-dev@python.org (A.M. Kuchling) Date: Mon, 10 Jul 2000 06:56:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib dumbdbm.py,1.4,1.5 Message-ID: <200007101356.GAA00334@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv32761 Modified Files: dumbdbm.py Log Message: Patch from Joe Eaton (SF#100741) to fix following problem: There is a silly bug in the fall-back dumbdbm.py database package in the Python 1.5.2 standard distro. This bug causes any changes to an existing item to generate a new key, even when the key already exists. After many updates, the .dir file used by dumbdbm grows to a huge size, and can cause filesystem problems. Index: dumbdbm.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dumbdbm.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** dumbdbm.py 1999/04/27 12:21:17 1.4 --- dumbdbm.py 2000/07/10 13:56:35 1.5 *************** *** 121,125 **** pos, siz = self._addval(val) self._index[key] = pos, siz - self._addkey(key, (pos, siz)) def __delitem__(self, key): --- 121,124 ---- From python-dev@python.org Mon Jul 10 15:14:43 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 10 Jul 2000 07:14:43 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_userstring,1.1,1.2 Message-ID: <200007101414.HAA08212@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv8190 Modified Files: test_userstring Log Message: expect message "no regression test case for method 'encode' Index: test_userstring =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_userstring,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_userstring 2000/04/03 03:51:50 1.1 --- test_userstring 2000/07/10 14:14:40 1.2 *************** *** 1 **** --- 1,4 ---- test_userstring + no regression test case for method 'encode' + no regression test case for method 'isalnum' + no regression test case for method 'isalpha' From python-dev@python.org Mon Jul 10 15:28:28 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 10 Jul 2000 07:28:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib popen2.py,1.11,1.12 Message-ID: <200007101428.HAA08984@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv8968 Modified Files: popen2.py Log Message: remove prints of file objects from _test Index: popen2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/popen2.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** popen2.py 2000/07/09 23:35:24 1.11 --- popen2.py 2000/07/10 14:28:25 1.12 *************** *** 144,148 **** print "testing popen2..." r, w = popen2('cat') - print r, w w.write(teststr) w.close() --- 144,147 ---- *************** *** 153,157 **** except: r, w, e = popen3('cat') - print r, w, e w.write(teststr) w.close() --- 152,155 ---- From python-dev@python.org Mon Jul 10 15:35:15 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 10 Jul 2000 07:35:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Demo/embed Makefile,1.3,1.4 Message-ID: <200007101435.HAA09733@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/embed In directory slayer.i.sourceforge.net:/tmp/cvs-serv9724 Modified Files: Makefile Log Message: Adapted for Python 2.0 under RH Linux. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/embed/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Makefile 1997/07/19 20:58:50 1.3 --- Makefile 2000/07/10 14:35:12 1.4 *************** *** 1,4 **** # Makefile for embedded Python use demo. ! # (This version tailored for CNRI and Solaris; edit lines marked with XXX.) # XXX The compiler you are using --- 1,5 ---- # Makefile for embedded Python use demo. ! # (This version tailored for my Red Hat Linux 6.1 setup; ! # edit lines marked with XXX.) # XXX The compiler you are using *************** *** 6,14 **** # XXX Top of the build tree and source tree ! blddir= ../.. srcdir= ../.. # Python version ! VERSION= 1.5 # Compiler flags --- 7,15 ---- # XXX Top of the build tree and source tree ! blddir= ../../linux srcdir= ../.. # Python version ! VERSION= 2.0 # Compiler flags *************** *** 18,25 **** # The Python library ! LIBPYTHON= $(blddir)/libpython$(VERSION).a # XXX edit LIBS (in particular) to match $(blddir)/Modules/Makefile ! LIBS= -lsocket -lnsl -ldl -lreadline -ltermcap SYSLIBS= -lm MODLIBS= --- 19,26 ---- # The Python library ! LIBPYTHON= $(blddir)/libpython$(VERSION).a # XXX edit LIBS (in particular) to match $(blddir)/Modules/Makefile ! LIBS= -lnsl -ldl -lreadline -ltermcap -lieee -lpthread -lutil SYSLIBS= -lm MODLIBS= From python-dev@python.org Mon Jul 10 16:00:35 2000 From: python-dev@python.org (Eric S. Raymond) Date: Mon, 10 Jul 2000 08:00:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib urllib.py,1.96,1.97 Message-ID: <200007101500.IAA13372@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv11503/dist/src/Lib Modified Files: urllib.py Log Message: Moves some test code into the scope of if __name__ == '__main__', where it won't get loaded when we're using the classes in this module. Index: urllib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/urllib.py,v retrieving revision 1.96 retrieving revision 1.97 diff -C2 -r1.96 -r1.97 *** urllib.py 2000/07/01 07:03:30 1.96 --- urllib.py 2000/07/10 15:00:32 1.97 *************** *** 1078,1166 **** return proxies ! ! # Test and time quote() and unquote() ! def test1(): ! import time ! s = '' ! for i in range(256): s = s + chr(i) ! s = s*4 ! t0 = time.time() ! qs = quote(s) ! uqs = unquote(qs) ! t1 = time.time() ! if uqs != s: ! print 'Wrong!' ! print `s` ! print `qs` ! print `uqs` ! print round(t1 - t0, 3), 'sec' ! ! ! def reporthook(blocknum, blocksize, totalsize): ! # Report during remote transfers ! print "Block number: %d, Block size: %d, Total size: %d" % (blocknum, blocksize, totalsize) ! ! # Test program ! def test(args=[]): ! if not args: ! args = [ ! '/etc/passwd', ! 'file:/etc/passwd', ! 'file://localhost/etc/passwd', ! 'ftp://ftp.python.org/etc/passwd', ! ## 'gopher://gopher.micro.umn.edu/1/', ! 'http://www.python.org/index.html', ! ] ! if hasattr(URLopener, "open_https"): ! args.append('https://synergy.as.cmu.edu/~geek/') ! try: ! for url in args: ! print '-'*10, url, '-'*10 ! fn, h = urlretrieve(url, None, reporthook) ! print fn, h ! if h: ! print '======' ! for k in h.keys(): print k + ':', h[k] ! print '======' ! fp = open(fn, 'rb') ! data = fp.read() ! del fp ! if '\r' in data: ! table = string.maketrans("", "") ! data = string.translate(data, table, "\r") ! print data ! fn, h = None, None ! print '-'*40 ! finally: ! urlcleanup() ! def main(): ! import getopt, sys ! try: ! opts, args = getopt.getopt(sys.argv[1:], "th") ! except getopt.error, msg: ! print msg ! print "Use -h for help" ! return ! t = 0 ! for o, a in opts: ! if o == '-t': ! t = t + 1 ! if o == '-h': ! print "Usage: python urllib.py [-t] [url ...]" ! print "-t runs self-test;", ! print "otherwise, contents of urls are printed" ! return ! if t: ! if t > 1: ! test1() ! test(args) ! else: if not args: print "Use -h for help" ! for url in args: ! print urlopen(url).read(), - # Run test program when run as a script - if __name__ == '__main__': main() --- 1078,1165 ---- return proxies ! # Run test program when run as a script ! if __name__ == '__main__': ! # Test and time quote() and unquote() ! def test1(): ! import time ! s = '' ! for i in range(256): s = s + chr(i) ! s = s*4 ! t0 = time.time() ! qs = quote(s) ! uqs = unquote(qs) ! t1 = time.time() ! if uqs != s: ! print 'Wrong!' ! print `s` ! print `qs` ! print `uqs` ! print round(t1 - t0, 3), 'sec' ! ! ! def reporthook(blocknum, blocksize, totalsize): ! # Report during remote transfers ! print "Block number: %d, Block size: %d, Total size: %d" % (blocknum, blocksize, totalsize) ! # Test program ! def test(args=[]): if not args: + args = [ + '/etc/passwd', + 'file:/etc/passwd', + 'file://localhost/etc/passwd', + 'ftp://ftp.python.org/etc/passwd', + ## 'gopher://gopher.micro.umn.edu/1/', + 'http://www.python.org/index.html', + ] + if hasattr(URLopener, "open_https"): + args.append('https://synergy.as.cmu.edu/~geek/') + try: + for url in args: + print '-'*10, url, '-'*10 + fn, h = urlretrieve(url, None, reporthook) + print fn, h + if h: + print '======' + for k in h.keys(): print k + ':', h[k] + print '======' + fp = open(fn, 'rb') + data = fp.read() + del fp + if '\r' in data: + table = string.maketrans("", "") + data = string.translate(data, table, "\r") + print data + fn, h = None, None + print '-'*40 + finally: + urlcleanup() + + def main(): + import getopt, sys + try: + opts, args = getopt.getopt(sys.argv[1:], "th") + except getopt.error, msg: + print msg print "Use -h for help" ! return ! t = 0 ! for o, a in opts: ! if o == '-t': ! t = t + 1 ! if o == '-h': ! print "Usage: python urllib.py [-t] [url ...]" ! print "-t runs self-test;", ! print "otherwise, contents of urls are printed" ! return ! if t: ! if t > 1: ! test1() ! test(args) ! else: ! if not args: ! print "Use -h for help" ! for url in args: ! print urlopen(url).read(), main() From python-dev@python.org Mon Jul 10 16:06:08 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 10 Jul 2000 08:06:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_unicode,1.8,1.9 Message-ID: <200007101506.IAA18485@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv18477 Modified Files: test_unicode Log Message: Added the line 'Testing UTF-16 code point order comparisons... done." to match addition to test_unicode.py. Index: test_unicode =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_unicode,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** test_unicode 2000/06/30 09:14:13 1.8 --- test_unicode 2000/07/10 15:06:06 1.9 *************** *** 1,4 **** --- 1,5 ---- test_unicode Testing Unicode comparisons... done. + Testing UTF-16 code point order comparisons... done. Testing Unicode contains method... done. Testing Unicode formatting strings... done. From python-dev@python.org Mon Jul 10 16:59:33 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 10 Jul 2000 08:59:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.148,2.149 Message-ID: <200007101559.IAA22393@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv21665/Modules Modified Files: posixmodule.c Log Message: -- get rid of a compiler warning on unix. (as reported for #100836, but implemented in a different way) Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.148 retrieving revision 2.149 diff -C2 -r2.148 -r2.149 *** posixmodule.c 2000/07/09 23:35:24 2.148 --- posixmodule.c 2000/07/10 15:59:30 2.149 *************** *** 513,536 **** } - static PyObject * - posix_strintint(PyObject *args, char *format, - int (*func)(const char *, int, int)) - { - char *path; - int i,i2; - int res; - if (!PyArg_ParseTuple(args, format, &path, &i, &i2)) - return NULL; - Py_BEGIN_ALLOW_THREADS - res = (*func)(path, i, i2); - Py_END_ALLOW_THREADS - if (res < 0) - return posix_error_with_filename(path); - Py_INCREF(Py_None); - return Py_None; - } - - /* pack a system stat C structure into the Python stat tuple (used by posix_stat() and posix_fstat()) */ --- 513,517 ---- *************** *** 769,773 **** ! #ifdef HAVE_CHOWN static char posix_chown__doc__[] = "chown(path, uid, gid) -> None\n\ --- 750,754 ---- ! #if HAVE_CHOWN static char posix_chown__doc__[] = "chown(path, uid, gid) -> None\n\ *************** *** 777,781 **** posix_chown(PyObject *self, PyObject *args) { ! return posix_strintint(args, "sii:chown", chown); } #endif /* HAVE_CHOWN */ --- 758,773 ---- posix_chown(PyObject *self, PyObject *args) { ! char *path; ! int uid, gid; ! int res; ! if (!PyArg_ParseTuple(args, "sii:chown", &path, &uid, &gid)) ! return NULL; ! Py_BEGIN_ALLOW_THREADS ! res = chown(path, (uid_t) uid, (gid_t) gid); ! Py_END_ALLOW_THREADS ! if (res < 0) ! return posix_error_with_filename(path); ! Py_INCREF(Py_None); ! return Py_None; } #endif /* HAVE_CHOWN */ From python-dev@python.org Mon Jul 10 17:22:15 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 10 Jul 2000 09:22:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Demo/embed Makefile,1.4,1.5 Message-ID: <200007101622.JAA30458@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/embed In directory slayer.i.sourceforge.net:/tmp/cvs-serv30444 Modified Files: Makefile Log Message: Add linker flag -export-dynamic so symbols in libpython*.a are exported. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/embed/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Makefile 2000/07/10 14:35:12 1.4 --- Makefile 2000/07/10 16:22:12 1.5 *************** *** 23,26 **** --- 23,27 ---- # XXX edit LIBS (in particular) to match $(blddir)/Modules/Makefile LIBS= -lnsl -ldl -lreadline -ltermcap -lieee -lpthread -lutil + LDFLAGS= -Xlinker -export-dynamic SYSLIBS= -lm MODLIBS= *************** *** 30,34 **** all: demo demo: demo.o ! $(CC) demo.o $(ALLLIBS) -o demo # Administrative targets --- 31,35 ---- all: demo demo: demo.o ! $(CC) $(LDFLAGS) demo.o $(ALLLIBS) -o demo # Administrative targets From python-dev@python.org Mon Jul 10 17:38:11 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 10 Jul 2000 09:38:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.149,2.150 Message-ID: <200007101638.JAA31758@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv31226/Modules Modified Files: posixmodule.c Log Message: - stupid typo. Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.149 retrieving revision 2.150 diff -C2 -r2.149 -r2.150 *** posixmodule.c 2000/07/10 15:59:30 2.149 --- posixmodule.c 2000/07/10 16:38:09 2.150 *************** *** 750,754 **** ! #if HAVE_CHOWN static char posix_chown__doc__[] = "chown(path, uid, gid) -> None\n\ --- 750,754 ---- ! #ifdef HAVE_CHOWN static char posix_chown__doc__[] = "chown(path, uid, gid) -> None\n\ From python-dev@python.org Mon Jul 10 18:04:37 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 10:04:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules almodule.c,1.27,1.28 cdmodule.c,1.21,1.22 cgensupport.c,2.13,2.14 flmodule.c,1.39,1.40 fmmodule.c,1.13,1.14 glmodule.c,2.6,2.7 imgfile.c,1.24,1.25 Message-ID: <200007101704.KAA07693@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv7533 Modified Files: almodule.c cdmodule.c cgensupport.c flmodule.c fmmodule.c glmodule.c imgfile.c Log Message: ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c have already been checked in) UNTESTED! Index: almodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/almodule.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** almodule.c 2000/07/06 19:38:49 1.27 --- almodule.c 2000/07/10 17:04:33 1.28 *************** *** 254,261 **** static PyObject * ! SetConfig(self, args, func) ! alcobject *self; ! PyObject *args; ! int (*func)(ALconfig, int); { int par; --- 254,258 ---- [...1103 lines suppressed...] --- 1970,1974 ---- static PyObject * ! al_getdefault(PyObject *self, PyObject *args) { long device, descriptor, value; *************** *** 2128,2133 **** static PyObject * ! al_getminmax(self, args) ! PyObject *self, *args; { long device, descriptor, min, max; --- 1982,1986 ---- static PyObject * ! al_getminmax(PyObject *self, PyObject *args) { long device, descriptor, min, max; Index: cdmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cdmodule.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** cdmodule.c 2000/06/30 23:58:05 1.21 --- cdmodule.c 2000/07/10 17:04:33 1.22 *************** *** 26,32 **** static PyObject * ! CD_allowremoval(self, args) ! cdplayerobject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, ":allowremoval")) --- 26,30 ---- static PyObject * ! CD_allowremoval(cdplayerobject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":allowremoval")) *************** *** 40,46 **** static PyObject * ! CD_preventremoval(self, args) ! cdplayerobject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, ":preventremoval")) --- 38,42 ---- static PyObject * ! CD_preventremoval(cdplayerobject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":preventremoval")) *************** *** 54,60 **** static PyObject * ! CD_bestreadsize(self, args) ! cdplayerobject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, ":bestreadsize")) --- 50,54 ---- static PyObject * ! CD_bestreadsize(cdplayerobject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":bestreadsize")) *************** *** 65,71 **** static PyObject * ! CD_close(self, args) ! cdplayerobject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, ":close")) --- 59,63 ---- static PyObject * ! CD_close(cdplayerobject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":close")) *************** *** 83,89 **** static PyObject * ! CD_eject(self, args) ! cdplayerobject *self; ! PyObject *args; { CDSTATUS status; --- 75,79 ---- static PyObject * ! CD_eject(cdplayerobject *self, PyObject *args) { CDSTATUS status; *************** *** 106,112 **** static PyObject * ! CD_getstatus(self, args) ! cdplayerobject *self; ! PyObject *args; { CDSTATUS status; --- 96,100 ---- static PyObject * ! CD_getstatus(cdplayerobject *self, PyObject *args) { CDSTATUS status; *************** *** 129,135 **** static PyObject * ! CD_gettrackinfo(self, args) ! cdplayerobject *self; ! PyObject *args; { int track; --- 117,121 ---- static PyObject * ! CD_gettrackinfo(cdplayerobject *self, PyObject *args) { int track; *************** *** 155,161 **** static PyObject * ! CD_msftoblock(self, args) ! cdplayerobject *self; ! PyObject *args; { int min, sec, frame; --- 141,145 ---- static PyObject * ! CD_msftoblock(cdplayerobject *self, PyObject *args) { int min, sec, frame; *************** *** 169,175 **** static PyObject * ! CD_play(self, args) ! cdplayerobject *self; ! PyObject *args; { int start, play; --- 153,157 ---- static PyObject * ! CD_play(cdplayerobject *self, PyObject *args) { int start, play; *************** *** 193,199 **** static PyObject * ! CD_playabs(self, args) ! cdplayerobject *self; ! PyObject *args; { int min, sec, frame, play; --- 175,179 ---- static PyObject * ! CD_playabs(cdplayerobject *self, PyObject *args) { int min, sec, frame, play; *************** *** 217,223 **** static PyObject * ! CD_playtrack(self, args) ! cdplayerobject *self; ! PyObject *args; { int start, play; --- 197,201 ---- static PyObject * ! CD_playtrack(cdplayerobject *self, PyObject *args) { int start, play; *************** *** 241,247 **** static PyObject * ! CD_playtrackabs(self, args) ! cdplayerobject *self; ! PyObject *args; { int track, min, sec, frame, play; --- 219,223 ---- static PyObject * ! CD_playtrackabs(cdplayerobject *self, PyObject *args) { int track, min, sec, frame, play; *************** *** 266,272 **** static PyObject * ! CD_readda(self, args) ! cdplayerobject *self; ! PyObject *args; { int numframes, n; --- 242,246 ---- static PyObject * ! CD_readda(cdplayerobject *self, PyObject *args) { int numframes, n; *************** *** 295,301 **** static PyObject * ! CD_seek(self, args) ! cdplayerobject *self; ! PyObject *args; { int min, sec, frame; --- 269,273 ---- static PyObject * ! CD_seek(cdplayerobject *self, PyObject *args) { int min, sec, frame; *************** *** 315,321 **** static PyObject * ! CD_seektrack(self, args) ! cdplayerobject *self; ! PyObject *args; { int track; --- 287,291 ---- static PyObject * ! CD_seektrack(cdplayerobject *self, PyObject *args) { int track; *************** *** 335,341 **** static PyObject * ! CD_seekblock(self, args) ! cdplayerobject *self; ! PyObject *args; { unsigned long PyTryBlock; --- 305,309 ---- static PyObject * ! CD_seekblock(cdplayerobject *self, PyObject *args) { unsigned long PyTryBlock; *************** *** 354,360 **** static PyObject * ! CD_stop(self, args) ! cdplayerobject *self; ! PyObject *args; { CDSTATUS status; --- 322,326 ---- static PyObject * ! CD_stop(cdplayerobject *self, PyObject *args) { CDSTATUS status; *************** *** 377,383 **** static PyObject * ! CD_togglepause(self, args) ! cdplayerobject *self; ! PyObject *args; { CDSTATUS status; --- 343,347 ---- static PyObject * ! CD_togglepause(cdplayerobject *self, PyObject *args) { CDSTATUS status; *************** *** 422,427 **** static void ! cdplayer_dealloc(self) ! cdplayerobject *self; { if (self->ob_cdplayer != NULL) --- 386,390 ---- static void ! cdplayer_dealloc(cdplayerobject *self) { if (self->ob_cdplayer != NULL) *************** *** 431,437 **** static PyObject * ! cdplayer_getattr(self, name) ! cdplayerobject *self; ! char *name; { if (self->ob_cdplayer == NULL) { --- 394,398 ---- static PyObject * ! cdplayer_getattr(cdplayerobject *self, char *name) { if (self->ob_cdplayer == NULL) { *************** *** 458,463 **** static PyObject * ! newcdplayerobject(cdp) ! CDPLAYER *cdp; { cdplayerobject *p; --- 419,423 ---- static PyObject * ! newcdplayerobject(CDPLAYER *cdp) { cdplayerobject *p; *************** *** 471,476 **** static PyObject * ! CD_open(self, args) ! PyObject *self, *args; { char *dev, *direction; --- 431,435 ---- static PyObject * ! CD_open(PyObject *self, PyObject *args) { char *dev, *direction; *************** *** 505,512 **** static void ! CD_callback(arg, type, data) ! void *arg; ! CDDATATYPES type; ! void *data; { PyObject *result, *args, *v = NULL; --- 464,468 ---- static void ! CD_callback(void *arg, CDDATATYPES type, void *data) { PyObject *result, *args, *v = NULL; *************** *** 579,585 **** static PyObject * ! CD_deleteparser(self, args) ! cdparserobject *self; ! PyObject *args; { int i; --- 535,539 ---- static PyObject * ! CD_deleteparser(cdparserobject *self, PyObject *args) { int i; *************** *** 604,610 **** static PyObject * ! CD_parseframe(self, args) ! cdparserobject *self; ! PyObject *args; { char *cdfp; --- 558,562 ---- static PyObject * ! CD_parseframe(cdparserobject *self, PyObject *args) { char *cdfp; *************** *** 634,640 **** static PyObject * ! CD_removecallback(self, args) ! cdparserobject *self; ! PyObject *args; { int type; --- 586,590 ---- static PyObject * ! CD_removecallback(cdparserobject *self, PyObject *args) { int type; *************** *** 661,667 **** static PyObject * ! CD_resetparser(self, args) ! cdparserobject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, ":resetparser")) --- 611,615 ---- static PyObject * ! CD_resetparser(cdparserobject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":resetparser")) *************** *** 675,681 **** static PyObject * ! CD_addcallback(self, args) ! cdparserobject *self; ! PyObject *args; { int type; --- 623,627 ---- static PyObject * ! CD_addcallback(cdparserobject *self, PyObject *args) { int type; *************** *** 729,734 **** static void ! cdparser_dealloc(self) ! cdparserobject *self; { int i; --- 675,679 ---- static void ! cdparser_dealloc(cdparserobject *self) { int i; *************** *** 745,751 **** static PyObject * ! cdparser_getattr(self, name) ! cdparserobject *self; ! char *name; { if (self->ob_cdparser == NULL) { --- 690,694 ---- static PyObject * ! cdparser_getattr(cdparserobject *self, char *name) { if (self->ob_cdparser == NULL) { *************** *** 773,778 **** static PyObject * ! newcdparserobject(cdp) ! CDPARSER *cdp; { cdparserobject *p; --- 716,720 ---- static PyObject * ! newcdparserobject(CDPARSER *cdp) { cdparserobject *p; *************** *** 791,796 **** static PyObject * ! CD_createparser(self, args) ! PyObject *self, *args; { CDPARSER *cdp; --- 733,737 ---- static PyObject * ! CD_createparser(PyObject *self, PyObject *args) { CDPARSER *cdp; *************** *** 808,813 **** static PyObject * ! CD_msftoframe(self, args) ! PyObject *self, *args; { int min, sec, frame; --- 749,753 ---- static PyObject * ! CD_msftoframe(PyObject *self, PyObject *args) { int min, sec, frame; Index: cgensupport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cgensupport.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** cgensupport.c 2000/06/30 23:58:05 2.13 --- cgensupport.c 2000/07/10 17:04:33 2.14 *************** *** 21,28 **** int ! PyArg_GetObject(args, nargs, i, p_arg) ! register PyObject *args; ! int nargs, i; ! PyObject **p_arg; { if (nargs != 1) { --- 21,25 ---- int ! PyArg_GetObject(register PyObject *args, int nargs, int i, PyObject **p_arg) { if (nargs != 1) { *************** *** 44,51 **** int ! PyArg_GetLong(args, nargs, i, p_arg) ! register PyObject *args; ! int nargs, i; ! long *p_arg; { if (nargs != 1) { --- 41,45 ---- int ! PyArg_GetLong(register PyObject *args, int nargs, int i, long *p_arg) { if (nargs != 1) { *************** *** 65,72 **** int ! PyArg_GetShort(args, nargs, i, p_arg) ! register PyObject *args; ! int nargs, i; ! short *p_arg; { long x; --- 59,63 ---- int ! PyArg_GetShort(register PyObject *args, int nargs, int i, short *p_arg) { long x; *************** *** 78,84 **** static int ! extractdouble(v, p_arg) ! register PyObject *v; ! double *p_arg; { if (v == NULL) { --- 69,73 ---- static int ! extractdouble(register PyObject *v, double *p_arg) { if (v == NULL) { *************** *** 101,107 **** static int ! extractfloat(v, p_arg) ! register PyObject *v; ! float *p_arg; { if (v == NULL) { --- 90,94 ---- static int ! extractfloat(register PyObject *v, float *p_arg) { if (v == NULL) { *************** *** 124,131 **** int ! PyArg_GetFloat(args, nargs, i, p_arg) ! register PyObject *args; ! int nargs, i; ! float *p_arg; { PyObject *v; --- 111,115 ---- int ! PyArg_GetFloat(register PyObject *args, int nargs, int i, float *p_arg) { PyObject *v; *************** *** 140,147 **** int ! PyArg_GetString(args, nargs, i, p_arg) ! PyObject *args; ! int nargs, i; ! string *p_arg; { PyObject *v; --- 124,128 ---- int ! PyArg_GetString(PyObject *args, int nargs, int i, string *p_arg) { PyObject *v; *************** *** 156,163 **** int ! PyArg_GetChar(args, nargs, i, p_arg) ! PyObject *args; ! int nargs, i; ! char *p_arg; { string x; --- 137,141 ---- int ! PyArg_GetChar(PyObject *args, int nargs, int i, char *p_arg) { string x; *************** *** 173,180 **** int ! PyArg_GetLongArraySize(args, nargs, i, p_arg) ! PyObject *args; ! int nargs, i; ! long *p_arg; { PyObject *v; --- 151,155 ---- int ! PyArg_GetLongArraySize(PyObject *args, int nargs, int i, long *p_arg) { PyObject *v; *************** *** 193,200 **** int ! PyArg_GetShortArraySize(args, nargs, i, p_arg) ! PyObject *args; ! int nargs, i; ! short *p_arg; { long x; --- 168,172 ---- int ! PyArg_GetShortArraySize(PyObject *args, int nargs, int i, short *p_arg) { long x; *************** *** 208,216 **** int ! PyArg_GetLongArray(args, nargs, i, n, p_arg) ! PyObject *args; ! int nargs, i; ! int n; ! long *p_arg; /* [n] */ { PyObject *v, *w; --- 180,184 ---- int ! PyArg_GetLongArray(PyObject *args, int nargs, int i, int n, long *p_arg) { PyObject *v, *w; *************** *** 249,257 **** int ! PyArg_GetShortArray(args, nargs, i, n, p_arg) ! PyObject *args; ! int nargs, i; ! int n; ! short *p_arg; /* [n] */ { PyObject *v, *w; --- 217,221 ---- int ! PyArg_GetShortArray(PyObject *args, int nargs, int i, int n, short *p_arg) { PyObject *v, *w; *************** *** 290,298 **** int ! PyArg_GetDoubleArray(args, nargs, i, n, p_arg) ! PyObject *args; ! int nargs, i; ! int n; ! double *p_arg; /* [n] */ { PyObject *v, *w; --- 254,258 ---- int ! PyArg_GetDoubleArray(PyObject *args, int nargs, int i, int n, double *p_arg) { PyObject *v, *w; *************** *** 327,335 **** int ! PyArg_GetFloatArray(args, nargs, i, n, p_arg) ! PyObject *args; ! int nargs, i; ! int n; ! float *p_arg; /* [n] */ { PyObject *v, *w; --- 287,291 ---- int ! PyArg_GetFloatArray(PyObject *args, int nargs, int i, int n, float *p_arg) { PyObject *v, *w; Index: flmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/flmodule.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** flmodule.c 2000/06/30 23:58:05 1.39 --- flmodule.c 2000/07/10 17:04:33 1.40 *************** *** 52,57 **** static void ! knowgeneric(g) ! genericobject *g; { int i, n; --- 52,56 ---- static void ! knowgeneric(genericobject *g) [...2636 lines suppressed...] static PyObject * ! forms_get_pattern(PyObject *f, PyObject *args) { return forms_file_selector_func(args, fl_get_pattern); *************** *** 2450,2456 **** static PyObject * ! forms_get_filename(f, args) ! PyObject *f; ! PyObject *args; { return forms_file_selector_func(args, fl_get_filename); --- 2085,2089 ---- static PyObject * ! forms_get_filename(PyObject *f, PyObject *args) { return forms_file_selector_func(args, fl_get_filename); Index: fmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fmmodule.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** fmmodule.c 2000/06/30 23:58:05 1.13 --- fmmodule.c 2000/07/10 17:04:33 1.14 *************** *** 30,35 **** static PyObject * ! newfhobject(fh) ! fmfonthandle fh; { fhobject *fhp; --- 30,34 ---- static PyObject * ! newfhobject(fmfonthandle fh) { fhobject *fhp; *************** *** 49,55 **** static PyObject * ! fh_scalefont(self, args) ! fhobject *self; ! PyObject *args; { double size; --- 48,52 ---- static PyObject * ! fh_scalefont(fhobject *self, PyObject *args) { double size; *************** *** 62,68 **** static PyObject * ! fh_setfont(self, args) ! fhobject *self; ! PyObject *args; { if (!PyArg_NoArgs(args)) --- 59,63 ---- static PyObject * ! fh_setfont(fhobject *self, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 74,80 **** static PyObject * ! fh_getfontname(self, args) ! fhobject *self; ! PyObject *args; { char fontname[256]; --- 69,73 ---- static PyObject * ! fh_getfontname(fhobject *self, PyObject *args) { char fontname[256]; *************** *** 91,97 **** static PyObject * ! fh_getcomment(self, args) ! fhobject *self; ! PyObject *args; { char comment[256]; --- 84,88 ---- static PyObject * ! fh_getcomment(fhobject *self, PyObject *args) { char comment[256]; *************** *** 108,114 **** static PyObject * ! fh_getfontinfo(self, args) ! fhobject *self; ! PyObject *args; { fmfontinfo info; --- 99,103 ---- static PyObject * ! fh_getfontinfo(fhobject *self, PyObject *args) { fmfontinfo info; *************** *** 132,138 **** #if 0 static PyObject * ! fh_getwholemetrics(self, args) ! fhobject *self; ! PyObject *args; { } --- 121,125 ---- #if 0 static PyObject * ! fh_getwholemetrics(fhobject *self, PyObject *args) { } *************** *** 140,146 **** static PyObject * ! fh_getstrwidth(self, args) ! fhobject *self; ! PyObject *args; { char *str; --- 127,131 ---- static PyObject * ! fh_getstrwidth(fhobject *self, PyObject *args) { char *str; *************** *** 164,170 **** static PyObject * ! fh_getattr(fhp, name) ! fhobject *fhp; ! char *name; { return Py_FindMethod(fh_methods, (PyObject *)fhp, name); --- 149,153 ---- static PyObject * ! fh_getattr(fhobject *fhp, char *name) { return Py_FindMethod(fh_methods, (PyObject *)fhp, name); *************** *** 172,177 **** static void ! fh_dealloc(fhp) ! fhobject *fhp; { fmfreefont(fhp->fh_fh); --- 155,159 ---- static void ! fh_dealloc(fhobject *fhp) { fmfreefont(fhp->fh_fh); *************** *** 198,203 **** static PyObject * ! fm_init(self, args) ! PyObject *self, *args; { if (!PyArg_NoArgs(args)) --- 180,184 ---- static PyObject * ! fm_init(PyObject *self, *args) { if (!PyArg_NoArgs(args)) *************** *** 209,214 **** static PyObject * ! fm_findfont(self, args) ! PyObject *self, *args; { char *str; --- 190,194 ---- static PyObject * ! fm_findfont(PyObject *self, *args) { char *str; *************** *** 219,224 **** static PyObject * ! fm_prstr(self, args) ! PyObject *self, *args; { char *str; --- 199,203 ---- static PyObject * ! fm_prstr(PyObject *self, *args) { char *str; *************** *** 235,240 **** static void ! clientproc(fontname) ! char *fontname; { int err; --- 214,218 ---- static void ! clientproc(char *fontname) { int err; *************** *** 256,261 **** static PyObject * ! fm_enumerate(self, args) ! PyObject *self, *args; { PyObject *res; --- 234,238 ---- static PyObject * ! fm_enumerate(PyObject *self, PyObject *args) { PyObject *res; *************** *** 272,277 **** static PyObject * ! fm_setpath(self, args) ! PyObject *self, *args; { char *str; --- 249,253 ---- static PyObject * ! fm_setpath(PyObject *self, PyObject *args) { char *str; *************** *** 284,289 **** static PyObject * ! fm_fontpath(self, args) ! PyObject *self, *args; { if (!PyArg_NoArgs(args)) --- 260,264 ---- static PyObject * ! fm_fontpath(PyObject *self, *args) { if (!PyArg_NoArgs(args)) Index: glmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/glmodule.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** glmodule.c 2000/07/09 03:09:55 2.6 --- glmodule.c 2000/07/10 17:04:33 2.7 *************** *** 70,76 **** static PyObject * ! gl_qread(self, args) ! PyObject *self; ! PyObject *args; { long retval; --- 70,74 ---- static PyObject * [...6474 lines suppressed...] static PyObject * ! gl_qgetfd(PyObject *self, PyObject *args) { long retval; *************** *** 8043,8049 **** static PyObject * ! gl_dither(self, args) ! PyObject *self; ! PyObject *args; { long arg1 ; --- 7187,7191 ---- static PyObject * ! gl_dither(PyObject *self, PyObject *args) { long arg1 ; Index: imgfile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/imgfile.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** imgfile.c 2000/06/30 23:58:05 1.24 --- imgfile.c 2000/07/10 17:04:33 1.25 *************** *** 47,52 **** static void ! imgfile_error(str) ! char *str; { PyErr_SetString(ImgfileError, str); --- 47,51 ---- static void ! imgfile_error(char *str) { PyErr_SetString(ImgfileError, str); *************** *** 60,65 **** static IMAGE * ! imgfile_open(fname) ! char *fname; { IMAGE *image; --- 59,63 ---- static IMAGE * ! imgfile_open(char *fname) { IMAGE *image; *************** *** 82,88 **** static PyObject * ! imgfile_ttob(self, args) ! PyObject *self; ! PyObject *args; { int newval; --- 80,84 ---- static PyObject * ! imgfile_ttob(PyObject *self, PyObject *args) { int newval; *************** *** 97,103 **** static PyObject * ! imgfile_read(self, args) ! PyObject *self; ! PyObject *args; { char *fname; --- 93,97 ---- static PyObject * ! imgfile_read(PyObject *self, PyObject *args) { char *fname; *************** *** 191,197 **** static void ! xs_get(buf, y) ! short *buf; ! int y; { if (top_to_bottom) --- 185,189 ---- static void ! xs_get(short *buf, int y) { if (top_to_bottom) *************** *** 202,208 **** static void ! xs_put_c(buf, y) ! short *buf; ! int y; { char *datap = (char *)glob_datap + y*glob_width; --- 194,198 ---- static void ! xs_put_c(short *buf, int y) { char *datap = (char *)glob_datap + y*glob_width; *************** *** 214,220 **** static void ! xs_put_0(buf, y) ! short *buf; ! int y; { long *datap = glob_datap + y*glob_width; --- 204,208 ---- static void ! xs_put_0(short *buf, int y) { long *datap = glob_datap + y*glob_width; *************** *** 225,231 **** } static void ! xs_put_12(buf, y) ! short *buf; ! int y; { long *datap = glob_datap + y*glob_width; --- 213,217 ---- } static void ! xs_put_12(short *buf, int y) { long *datap = glob_datap + y*glob_width; *************** *** 237,247 **** static void ! xscale(image, xsize, ysize, zsize, datap, xnew, ynew, fmode, blur) ! IMAGE *image; ! int xsize, ysize, zsize; ! long *datap; ! int xnew, ynew; ! int fmode; ! double blur; { glob_image = image; --- 223,228 ---- static void ! xscale(IMAGE *image, int xsize, int ysize, int zsize, ! long *datap, int xnew, int ynew, int fmode, double blur) { glob_image = image; *************** *** 268,274 **** static PyObject * ! imgfile_readscaled(self, args) ! PyObject *self; ! PyObject *args; { char *fname; --- 249,253 ---- static PyObject * ! imgfile_readscaled(PyObject *self, PyObject *args) { char *fname; *************** *** 416,422 **** static PyObject * ! imgfile_getsizes(self, args) ! PyObject *self; ! PyObject *args; { char *fname; --- 395,399 ---- static PyObject * ! imgfile_getsizes(PyObject *self, PyObject *args) { char *fname; *************** *** 435,441 **** static PyObject * ! imgfile_write(self, args) ! PyObject *self; ! PyObject *args; { IMAGE *image; --- 412,416 ---- static PyObject * ! imgfile_write(PyObject *self, PyObject *args) { IMAGE *image; From python-dev@python.org Mon Jul 10 18:06:42 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 10:06:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules bsddbmodule.c,1.21,1.22 dbmmodule.c,2.19,2.20 Message-ID: <200007101706.KAA07841@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv7771 Modified Files: bsddbmodule.c dbmmodule.c Log Message: ANSI-fication, not really tested, but should (hopefully) compile Index: bsddbmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/bsddbmodule.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** bsddbmodule.c 2000/06/30 23:58:05 1.21 --- bsddbmodule.c 2000/07/10 17:06:38 1.22 *************** *** 55,69 **** static PyObject * ! newdbhashobject(file, flags, mode, ! bsize, ffactor, nelem, cachesize, hash, lorder) ! char *file; ! int flags; ! int mode; ! int bsize; ! int ffactor; ! int nelem; ! int cachesize; ! int hash; /* XXX ignored */ ! int lorder; { bsddbobject *dp; --- 55,60 ---- static PyObject * ! newdbhashobject(char *file, int flags, int mode, ! int bsize, int ffactor, int nelem, int cachesize, int hash, int lorder) { bsddbobject *dp; *************** *** 109,123 **** static PyObject * ! newdbbtobject(file, flags, mode, ! btflags, cachesize, maxkeypage, minkeypage, psize, lorder) ! char *file; ! int flags; ! int mode; ! int btflags; ! int cachesize; ! int maxkeypage; ! int minkeypage; ! int psize; ! int lorder; { bsddbobject *dp; --- 100,105 ---- static PyObject * ! newdbbtobject(char *file, int flags, int mode, ! int btflags, int cachesize, int maxkeypage, int minkeypage, int psize, int lorder) { bsddbobject *dp; *************** *** 165,180 **** static PyObject * ! newdbrnobject(file, flags, mode, ! rnflags, cachesize, psize, lorder, reclen, bval, bfname) ! char *file; ! int flags; ! int mode; ! int rnflags; ! int cachesize; ! int psize; ! int lorder; ! size_t reclen; ! u_char bval; ! char *bfname; { bsddbobject *dp; --- 147,152 ---- static PyObject * ! newdbrnobject(char *file, int flags, int mode, ! int rnflags, int cachesize, int psize, int lorder, size_t reclen, u_char bval, char *bfname) { bsddbobject *dp; *************** *** 221,226 **** static void ! bsddb_dealloc(dp) ! bsddbobject *dp; { #ifdef WITH_THREAD --- 193,197 ---- static void ! bsddb_dealloc(bsddbobject *dp) { #ifdef WITH_THREAD *************** *** 254,259 **** static int ! bsddb_length(dp) ! bsddbobject *dp; { if (dp->di_bsddb == NULL) { --- 225,229 ---- static int ! bsddb_length(bsddbobject *dp) { if (dp->di_bsddb == NULL) { *************** *** 283,289 **** static PyObject * ! bsddb_subscript(dp, key) ! bsddbobject *dp; ! PyObject *key; { int status; --- 253,257 ---- static PyObject * ! bsddb_subscript(bsddbobject *dp, PyObject *key) { int status; *************** *** 322,328 **** static int ! bsddb_ass_sub(dp, key, value) ! bsddbobject *dp; ! PyObject *key, *value; { int status; --- 290,294 ---- static int ! bsddb_ass_sub(bsddbobject *dp, PyObject *key, PyObject *value) { int status; *************** *** 388,394 **** static PyObject * ! bsddb_close(dp, args) ! bsddbobject *dp; ! PyObject *args; { if (!PyArg_NoArgs(args)) --- 354,358 ---- static PyObject * ! bsddb_close(bsddbobject *dp, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 411,417 **** static PyObject * ! bsddb_keys(dp, args) ! bsddbobject *dp; ! PyObject *args; { PyObject *list, *item; --- 375,379 ---- static PyObject * ! bsddb_keys(bsddbobject *dp, PyObject *args) { PyObject *list, *item; *************** *** 468,474 **** static PyObject * ! bsddb_has_key(dp, args) ! bsddbobject *dp; ! PyObject *args; { DBT krec, drec; --- 430,434 ---- static PyObject * ! bsddb_has_key(bsddbobject *dp, PyObject *args) { DBT krec, drec; *************** *** 495,501 **** static PyObject * ! bsddb_set_location(dp, key) ! bsddbobject *dp; ! PyObject *key; { int status; --- 455,459 ---- static PyObject * ! bsddb_set_location(bsddbobject *dp, PyObject *key) { int status; *************** *** 533,540 **** static PyObject * ! bsddb_seq(dp, args, sequence_request) ! bsddbobject *dp; ! PyObject *args; ! int sequence_request; { int status; --- 491,495 ---- static PyObject * ! bsddb_seq(bsddbobject *dp, PyObject *args, int sequence_request) { int status; *************** *** 578,612 **** static PyObject * ! bsddb_next(dp, key) ! bsddbobject *dp; ! PyObject *key; { return bsddb_seq(dp, key, R_NEXT); } static PyObject * ! bsddb_previous(dp, key) ! bsddbobject *dp; ! PyObject *key; { return bsddb_seq(dp, key, R_PREV); } static PyObject * ! bsddb_first(dp, key) ! bsddbobject *dp; ! PyObject *key; { return bsddb_seq(dp, key, R_FIRST); } static PyObject * ! bsddb_last(dp, key) ! bsddbobject *dp; ! PyObject *key; { return bsddb_seq(dp, key, R_LAST); } static PyObject * ! bsddb_sync(dp, args) ! bsddbobject *dp; ! PyObject *args; { int status; --- 533,557 ---- static PyObject * ! bsddb_next(bsddbobject *dp, PyObject *key) { return bsddb_seq(dp, key, R_NEXT); } static PyObject * ! bsddb_previous(bsddbobject *dp, PyObject *key) { return bsddb_seq(dp, key, R_PREV); } static PyObject * ! bsddb_first(bsddbobject *dp, PyObject *key) { return bsddb_seq(dp, key, R_FIRST); } static PyObject * ! bsddb_last(bsddbobject *dp, PyObject *key) { return bsddb_seq(dp, key, R_LAST); } static PyObject * ! bsddb_sync(bsddbobject *dp, PyObject *args) { int status; *************** *** 638,644 **** static PyObject * ! bsddb_getattr(dp, name) ! PyObject *dp; ! char *name; { return Py_FindMethod(bsddb_methods, dp, name); --- 583,587 ---- static PyObject * ! bsddb_getattr(PyObject *dp, char *name) { return Py_FindMethod(bsddb_methods, dp, name); *************** *** 663,669 **** static PyObject * ! bsdhashopen(self, args) ! PyObject *self; ! PyObject *args; { char *file; --- 606,610 ---- static PyObject * ! bsdhashopen(PyObject *self, PyObject *args) { char *file; *************** *** 716,722 **** static PyObject * ! bsdbtopen(self, args) ! PyObject *self; ! PyObject *args; { char *file; --- 657,661 ---- static PyObject * ! bsdbtopen(PyObject *self, PyObject *args) { char *file; *************** *** 770,776 **** static PyObject * ! bsdrnopen(self, args) ! PyObject *self; ! PyObject *args; { char *file; --- 709,713 ---- static PyObject * ! bsdrnopen(PyObject *self, PyObject *args) { char *file; Index: dbmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/dbmmodule.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** dbmmodule.c 2000/06/30 23:58:05 2.19 --- dbmmodule.c 2000/07/10 17:06:38 2.20 *************** *** 35,42 **** static PyObject * ! newdbmobject(file, flags, mode) ! char *file; ! int flags; ! int mode; { dbmobject *dp; --- 35,39 ---- static PyObject * ! newdbmobject(char *file, int flags, int mode) { dbmobject *dp; *************** *** 57,62 **** static void ! dbm_dealloc(dp) ! register dbmobject *dp; { if ( dp->di_dbm ) --- 54,58 ---- static void ! dbm_dealloc(register dbmobject *dp) { if ( dp->di_dbm ) *************** *** 66,71 **** static int ! dbm_length(dp) ! dbmobject *dp; { if (dp->di_dbm == NULL) { --- 62,66 ---- static int ! dbm_length(dbmobject *dp) { if (dp->di_dbm == NULL) { *************** *** 87,93 **** static PyObject * ! dbm_subscript(dp, key) ! dbmobject *dp; ! register PyObject *key; { datum drec, krec; --- 82,86 ---- static PyObject * ! dbm_subscript(dbmobject *dp, register PyObject *key) { datum drec, krec; *************** *** 112,118 **** static int ! dbm_ass_sub(dp, v, w) ! dbmobject *dp; ! PyObject *v, *w; { datum krec, drec; --- 105,109 ---- static int ! dbm_ass_sub(dbmobject *dp, PyObject *v, PyObject *w) { datum krec, drec; *************** *** 163,169 **** static PyObject * ! dbm__close(dp, args) ! register dbmobject *dp; ! PyObject *args; { if ( !PyArg_NoArgs(args) ) --- 154,158 ---- static PyObject * ! dbm__close(register dbmobject *dp, PyObject *args) { if ( !PyArg_NoArgs(args) ) *************** *** 177,183 **** static PyObject * ! dbm_keys(dp, args) ! register dbmobject *dp; ! PyObject *args; { register PyObject *v, *item; --- 166,170 ---- static PyObject * ! dbm_keys(register dbmobject *dp, PyObject *args) { register PyObject *v, *item; *************** *** 209,215 **** static PyObject * ! dbm_has_key(dp, args) ! register dbmobject *dp; ! PyObject *args; { datum key, val; --- 196,200 ---- static PyObject * ! dbm_has_key(register dbmobject *dp, PyObject *args) { datum key, val; *************** *** 230,236 **** static PyObject * ! dbm_getattr(dp, name) ! dbmobject *dp; ! char *name; { return Py_FindMethod(dbm_methods, (PyObject *)dp, name); --- 215,219 ---- static PyObject * ! dbm_getattr(dbmobject *dp, char *name) { return Py_FindMethod(dbm_methods, (PyObject *)dp, name); *************** *** 257,263 **** static PyObject * ! dbmopen(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 240,244 ---- static PyObject * ! dbmopen(PyObject *self, PyObject *args) { char *name; From python-dev@python.org Mon Jul 10 18:07:20 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 10 Jul 2000 10:07:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib UserString.py,1.2,1.3 Message-ID: <200007101707.KAA07910@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv7880 Modified Files: UserString.py Log Message: add isalpha and isalnum methods Index: UserString.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/UserString.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** UserString.py 2000/04/11 15:36:10 1.2 --- UserString.py 2000/07/10 17:07:17 1.3 *************** *** 76,79 **** --- 76,81 ---- def index(self, sub, start=0, end=sys.maxint): return self.data.index(sub, start, end) + def isalpha(self): return self.data.isalpha() + def isalnum(self): return self.data.isalnum() def isdecimal(self): return self.data.isdecimal() def isdigit(self): return self.data.isdigit() From python-dev@python.org Mon Jul 10 18:08:44 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 10 Jul 2000 10:08:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_userstring,1.2,1.3 Message-ID: <200007101708.KAA08017@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv7964/test/output Modified Files: test_userstring Log Message: factor out test definitions to string_tests module test_string and test_userstring run same tests for string methods Index: test_userstring =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_userstring,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** test_userstring 2000/07/10 14:14:40 1.2 --- test_userstring 2000/07/10 17:08:42 1.3 *************** *** 1,4 **** test_userstring - no regression test case for method 'encode' - no regression test case for method 'isalnum' - no regression test case for method 'isalpha' --- 1 ---- From python-dev@python.org Mon Jul 10 18:08:44 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 10 Jul 2000 10:08:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test string_tests.py,NONE,1.1 test_string.py,1.9,1.10 test_userstring.py,1.1,1.2 Message-ID: <200007101708.KAA08018@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv7964/test Modified Files: test_string.py test_userstring.py Added Files: string_tests.py Log Message: factor out test definitions to string_tests module test_string and test_userstring run same tests for string methods --- NEW FILE --- """Common tests shared by test_string and test_userstring""" import string transtable = '\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`xyzdefghijklmnopqrstuvwxyz{|}~\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377' class Sequence: def __init__(self): self.seq = 'wxyz' def __len__(self): return len(self.seq) def __getitem__(self, i): return self.seq[i] class BadSeq1(Sequence): def __init__(self): self.seq = [7, 'hello', 123L] class BadSeq2(Sequence): def __init__(self): self.seq = ['a', 'b', 'c'] def __len__(self): return 8 def run_module_tests(test): """Run all tests that exercise a function in the string module""" test('atoi', " 1 ", 1) test('atoi', " 1x", ValueError) test('atoi', " x1 ", ValueError) test('atol', " 1 ", 1L) test('atol', " 1x ", ValueError) test('atol', " x1 ", ValueError) test('atof', " 1 ", 1.0) test('atof', " 1x ", ValueError) test('atof', " x1 ", ValueError) test('maketrans', 'abc', transtable, 'xyz') test('maketrans', 'abc', ValueError, 'xyzq') # join now works with any sequence type test('join', ['a', 'b', 'c', 'd'], 'a b c d') test('join', ('a', 'b', 'c', 'd'), 'abcd', '') test('join', Sequence(), 'w x y z') test('join', 7, TypeError) test('join', BadSeq1(), TypeError) test('join', BadSeq2(), IndexError) # XXX should this test really raise an exception; lots of other core # code will just ignore the lying __len__ method. # test('join', BadSeq2(), 'a b c') # try a few long ones print string.join(['x' * 100] * 100, ':') print string.join(('x' * 100,) * 100, ':') def run_method_tests(test): """Run all tests that exercise a method of a string object""" test('capitalize', ' hello ', ' hello ') test('capitalize', 'hello ', 'Hello ') test('find', 'abcdefghiabc', 0, 'abc') test('find', 'abcdefghiabc', 9, 'abc', 1) test('find', 'abcdefghiabc', -1, 'def', 4) test('rfind', 'abcdefghiabc', 9, 'abc') test('lower', 'HeLLo', 'hello') test('lower', 'hello', 'hello') test('upper', 'HeLLo', 'HELLO') test('upper', 'HELLO', 'HELLO') test('title', ' hello ', ' Hello ') test('title', 'hello ', 'Hello ') test('title', "fOrMaT thIs aS titLe String", 'Format This As Title String') test('title', "fOrMaT,thIs-aS*titLe;String", 'Format,This-As*Title;String') test('title', "getInt", 'Getint') test('expandtabs', 'abc\rab\tdef\ng\thi', 'abc\rab def\ng hi') test('expandtabs', 'abc\rab\tdef\ng\thi', 'abc\rab def\ng hi', 8) test('expandtabs', 'abc\rab\tdef\ng\thi', 'abc\rab def\ng hi', 4) test('expandtabs', 'abc\r\nab\tdef\ng\thi', 'abc\r\nab def\ng hi', 4) test('islower', 'a', 1) test('islower', 'A', 0) test('islower', '\n', 0) test('islower', 'abc', 1) test('islower', 'aBc', 0) test('islower', 'abc\n', 1) test('isupper', 'a', 0) test('isupper', 'A', 1) test('isupper', '\n', 0) test('isupper', 'ABC', 1) test('isupper', 'AbC', 0) test('isupper', 'ABC\n', 1) test('istitle', 'a', 0) test('istitle', 'A', 1) test('istitle', '\n', 0) test('istitle', 'A Titlecased Line', 1) test('istitle', 'A\nTitlecased Line', 1) test('istitle', 'A Titlecased, Line', 1) test('istitle', 'Not a capitalized String', 0) test('istitle', 'Not\ta Titlecase String', 0) test('istitle', 'Not--a Titlecase String', 0) test('isalpha', 'a', 1) test('isalpha', 'A', 1) test('isalpha', '\n', 0) test('isalpha', 'abc', 1) test('isalpha', 'aBc123', 0) test('isalpha', 'abc\n', 0) test('isalnum', 'a', 1) test('isalnum', 'A', 1) test('isalnum', '\n', 0) test('isalnum', '123abc456', 1) test('isalnum', 'a1b3c', 1) test('isalnum', 'aBc000 ', 0) test('isalnum', 'abc\n', 0) # join now works with any sequence type test('join', ' ', 'a b c d', ['a', 'b', 'c', 'd']) test('join', '', 'abcd', ('a', 'b', 'c', 'd')) test('join', ' ', 'w x y z', Sequence()) test('join', ' ', TypeError, BadSeq1()) test('join', ' ', IndexError, BadSeq2()) # XXX should this test really raise an exception; lots of other core # code will just ignore the lying __len__ method. # test('join', BadSeq2(), 'a b c') test('splitlines', "abc\ndef\n\rghi", ['abc', 'def', '', 'ghi']) test('splitlines', "abc\ndef\n\r\nghi", ['abc', 'def', '', 'ghi']) test('splitlines', "abc\ndef\r\nghi", ['abc', 'def', 'ghi']) test('splitlines', "abc\ndef\r\nghi\n", ['abc', 'def', 'ghi']) test('splitlines', "abc\ndef\r\nghi\n\r", ['abc', 'def', 'ghi', '']) test('splitlines', "\nabc\ndef\r\nghi\n\r", ['', 'abc', 'def', 'ghi', '']) test('splitlines', "\nabc\ndef\r\nghi\n\r", ['\n', 'abc\n', 'def\r\n', 'ghi\n', '\r'], 1) test('split', 'this is the split function', ['this', 'is', 'the', 'split', 'function']) test('split', 'a|b|c|d', ['a', 'b', 'c', 'd'], '|') test('split', 'a|b|c|d', ['a', 'b', 'c|d'], '|', 2) test('split', 'a b c d', ['a', 'b c d'], None, 1) test('split', 'a b c d', ['a', 'b', 'c d'], None, 2) test('split', 'a b c d', ['a', 'b', 'c', 'd'], None, 3) test('split', 'a b c d', ['a', 'b', 'c', 'd'], None, 4) test('split', 'a b c d', ['a b c d'], None, 0) test('split', 'a b c d', ['a', 'b', 'c d'], None, 2) test('split', 'a b c d ', ['a', 'b', 'c', 'd']) test('strip', ' hello ', 'hello') test('lstrip', ' hello ', 'hello ') test('rstrip', ' hello ', ' hello') test('strip', 'hello', 'hello') test('swapcase', 'HeLLo cOmpUteRs', 'hEllO CoMPuTErS') test('translate', 'xyzabcdef', 'xyzxyz', transtable, 'def') table = string.maketrans('a', 'A') test('translate', 'abc', 'Abc', table) test('translate', 'xyz', 'xyz', table) test('replace', 'one!two!three!', 'one@two!three!', '!', '@', 1) test('replace', 'one!two!three!', 'onetwothree', '!', '') test('replace', 'one!two!three!', 'one@two@three!', '!', '@', 2) test('replace', 'one!two!three!', 'one@two@three@', '!', '@', 3) test('replace', 'one!two!three!', 'one@two@three@', '!', '@', 4) test('replace', 'one!two!three!', 'one!two!three!', '!', '@', 0) test('replace', 'one!two!three!', 'one@two@three@', '!', '@') test('replace', 'one!two!three!', 'one!two!three!', 'x', '@') test('replace', 'one!two!three!', 'one!two!three!', 'x', '@', 2) test('startswith', 'hello', 1, 'he') test('startswith', 'hello', 1, 'hello') test('startswith', 'hello', 0, 'hello world') test('startswith', 'hello', 1, '') test('startswith', 'hello', 0, 'ello') test('startswith', 'hello', 1, 'ello', 1) test('startswith', 'hello', 1, 'o', 4) test('startswith', 'hello', 0, 'o', 5) test('startswith', 'hello', 1, '', 5) test('startswith', 'hello', 0, 'lo', 6) test('startswith', 'helloworld', 1, 'lowo', 3) test('startswith', 'helloworld', 1, 'lowo', 3, 7) test('startswith', 'helloworld', 0, 'lowo', 3, 6) test('endswith', 'hello', 1, 'lo') test('endswith', 'hello', 0, 'he') test('endswith', 'hello', 1, '') test('endswith', 'hello', 0, 'hello world') test('endswith', 'helloworld', 0, 'worl') test('endswith', 'helloworld', 1, 'worl', 3, 9) test('endswith', 'helloworld', 1, 'world', 3, 12) test('endswith', 'helloworld', 1, 'lowo', 1, 7) test('endswith', 'helloworld', 1, 'lowo', 2, 7) test('endswith', 'helloworld', 1, 'lowo', 3, 7) test('endswith', 'helloworld', 0, 'lowo', 4, 7) test('endswith', 'helloworld', 0, 'lowo', 3, 8) test('endswith', 'ab', 0, 'ab', 0, 1) test('endswith', 'ab', 0, 'ab', 0, 0) Index: test_string.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_string.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** test_string.py 2000/07/05 09:46:26 1.9 --- test_string.py 2000/07/10 17:08:42 1.10 *************** *** 1,3 **** --- 1,4 ---- from test_support import verbose + import string_tests import string, sys *************** *** 29,200 **** print 'yes' ! test('atoi', " 1 ", 1) ! test('atoi', " 1x", ValueError) ! test('atoi', " x1 ", ValueError) ! test('atol', " 1 ", 1L) ! test('atol', " 1x ", ValueError) ! test('atol', " x1 ", ValueError) ! test('atof', " 1 ", 1.0) ! test('atof', " 1x ", ValueError) ! test('atof', " x1 ", ValueError) - test('capitalize', ' hello ', ' hello ') - test('capitalize', 'hello ', 'Hello ') - test('find', 'abcdefghiabc', 0, 'abc') - test('find', 'abcdefghiabc', 9, 'abc', 1) - test('find', 'abcdefghiabc', -1, 'def', 4) - test('rfind', 'abcdefghiabc', 9, 'abc') - test('lower', 'HeLLo', 'hello') - test('lower', 'hello', 'hello') - test('upper', 'HeLLo', 'HELLO') - test('upper', 'HELLO', 'HELLO') - - test('title', ' hello ', ' Hello ') - test('title', 'hello ', 'Hello ') - test('title', "fOrMaT thIs aS titLe String", 'Format This As Title String') - test('title', "fOrMaT,thIs-aS*titLe;String", 'Format,This-As*Title;String') - test('title', "getInt", 'Getint') - - test('expandtabs', 'abc\rab\tdef\ng\thi', 'abc\rab def\ng hi') - test('expandtabs', 'abc\rab\tdef\ng\thi', 'abc\rab def\ng hi', 8) - test('expandtabs', 'abc\rab\tdef\ng\thi', 'abc\rab def\ng hi', 4) - test('expandtabs', 'abc\r\nab\tdef\ng\thi', 'abc\r\nab def\ng hi', 4) - - test('islower', 'a', 1) - test('islower', 'A', 0) - test('islower', '\n', 0) - test('islower', 'abc', 1) - test('islower', 'aBc', 0) - test('islower', 'abc\n', 1) - - test('isupper', 'a', 0) - test('isupper', 'A', 1) - test('isupper', '\n', 0) - test('isupper', 'ABC', 1) - test('isupper', 'AbC', 0) - test('isupper', 'ABC\n', 1) - - test('istitle', 'a', 0) - test('istitle', 'A', 1) - test('istitle', '\n', 0) - test('istitle', 'A Titlecased Line', 1) - test('istitle', 'A\nTitlecased Line', 1) - test('istitle', 'A Titlecased, Line', 1) - test('istitle', 'Not a capitalized String', 0) - test('istitle', 'Not\ta Titlecase String', 0) - test('istitle', 'Not--a Titlecase String', 0) - - test('isalpha', 'a', 1) - test('isalpha', 'A', 1) - test('isalpha', '\n', 0) - test('isalpha', 'abc', 1) - test('isalpha', 'aBc123', 0) - test('isalpha', 'abc\n', 0) - - test('isalnum', 'a', 1) - test('isalnum', 'A', 1) - test('isalnum', '\n', 0) - test('isalnum', '123abc456', 1) - test('isalnum', 'a1b3c', 1) - test('isalnum', 'aBc000 ', 0) - test('isalnum', 'abc\n', 0) - - test('splitlines', "abc\ndef\n\rghi", ['abc', 'def', '', 'ghi']) - test('splitlines', "abc\ndef\n\r\nghi", ['abc', 'def', '', 'ghi']) - test('splitlines', "abc\ndef\r\nghi", ['abc', 'def', 'ghi']) - test('splitlines', "abc\ndef\r\nghi\n", ['abc', 'def', 'ghi']) - test('splitlines', "abc\ndef\r\nghi\n\r", ['abc', 'def', 'ghi', '']) - test('splitlines', "\nabc\ndef\r\nghi\n\r", ['', 'abc', 'def', 'ghi', '']) - test('splitlines', "\nabc\ndef\r\nghi\n\r", ['\n', 'abc\n', 'def\r\n', 'ghi\n', '\r'], 1) - - transtable = '\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`xyzdefghijklmnopqrstuvwxyz{|}~\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377' - - test('maketrans', 'abc', transtable, 'xyz') - test('maketrans', 'abc', ValueError, 'xyzq') - - test('split', 'this is the split function', - ['this', 'is', 'the', 'split', 'function']) - test('split', 'a|b|c|d', ['a', 'b', 'c', 'd'], '|') - test('split', 'a|b|c|d', ['a', 'b', 'c|d'], '|', 2) - test('split', 'a b c d', ['a', 'b c d'], None, 1) - test('split', 'a b c d', ['a', 'b', 'c d'], None, 2) - test('split', 'a b c d', ['a', 'b', 'c', 'd'], None, 3) - test('split', 'a b c d', ['a', 'b', 'c', 'd'], None, 4) - test('split', 'a b c d', ['a b c d'], None, 0) - test('split', 'a b c d', ['a', 'b', 'c d'], None, 2) - test('split', 'a b c d ', ['a', 'b', 'c', 'd']) - - # join now works with any sequence type - class Sequence: - def __init__(self): self.seq = 'wxyz' - def __len__(self): return len(self.seq) - def __getitem__(self, i): return self.seq[i] - - test('join', ['a', 'b', 'c', 'd'], 'a b c d') - test('join', ('a', 'b', 'c', 'd'), 'abcd', '') - test('join', Sequence(), 'w x y z') - test('join', 7, TypeError) - - class BadSeq(Sequence): - def __init__(self): self.seq = [7, 'hello', 123L] - - test('join', BadSeq(), TypeError) - - # try a few long ones - print string.join(['x' * 100] * 100, ':') - print string.join(('x' * 100,) * 100, ':') - - test('strip', ' hello ', 'hello') - test('lstrip', ' hello ', 'hello ') - test('rstrip', ' hello ', ' hello') - test('strip', 'hello', 'hello') - - test('swapcase', 'HeLLo cOmpUteRs', 'hEllO CoMPuTErS') - test('translate', 'xyzabcdef', 'xyzxyz', transtable, 'def') - - table = string.maketrans('a', 'A') - test('translate', 'abc', 'Abc', table) - test('translate', 'xyz', 'xyz', table) - - test('replace', 'one!two!three!', 'one@two!three!', '!', '@', 1) - test('replace', 'one!two!three!', 'onetwothree', '!', '') - test('replace', 'one!two!three!', 'one@two@three!', '!', '@', 2) - test('replace', 'one!two!three!', 'one@two@three@', '!', '@', 3) - test('replace', 'one!two!three!', 'one@two@three@', '!', '@', 4) - test('replace', 'one!two!three!', 'one!two!three!', '!', '@', 0) - test('replace', 'one!two!three!', 'one@two@three@', '!', '@') - test('replace', 'one!two!three!', 'one!two!three!', 'x', '@') - test('replace', 'one!two!three!', 'one!two!three!', 'x', '@', 2) - - test('startswith', 'hello', 1, 'he') - test('startswith', 'hello', 1, 'hello') - test('startswith', 'hello', 0, 'hello world') - test('startswith', 'hello', 1, '') - test('startswith', 'hello', 0, 'ello') - test('startswith', 'hello', 1, 'ello', 1) - test('startswith', 'hello', 1, 'o', 4) - test('startswith', 'hello', 0, 'o', 5) - test('startswith', 'hello', 1, '', 5) - test('startswith', 'hello', 0, 'lo', 6) - test('startswith', 'helloworld', 1, 'lowo', 3) - test('startswith', 'helloworld', 1, 'lowo', 3, 7) - test('startswith', 'helloworld', 0, 'lowo', 3, 6) - - test('endswith', 'hello', 1, 'lo') - test('endswith', 'hello', 0, 'he') - test('endswith', 'hello', 1, '') - test('endswith', 'hello', 0, 'hello world') - test('endswith', 'helloworld', 0, 'worl') - test('endswith', 'helloworld', 1, 'worl', 3, 9) - test('endswith', 'helloworld', 1, 'world', 3, 12) - test('endswith', 'helloworld', 1, 'lowo', 1, 7) - test('endswith', 'helloworld', 1, 'lowo', 2, 7) - test('endswith', 'helloworld', 1, 'lowo', 3, 7) - test('endswith', 'helloworld', 0, 'lowo', 4, 7) - test('endswith', 'helloworld', 0, 'lowo', 3, 8) - test('endswith', 'ab', 0, 'ab', 0, 1) - test('endswith', 'ab', 0, 'ab', 0, 0) - string.whitespace string.lowercase string.uppercase --- 30,38 ---- print 'yes' ! string_tests.run_module_tests(test) ! string_tests.run_method_tests(test) string.whitespace string.lowercase string.uppercase + Index: test_userstring.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_userstring.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_userstring.py 2000/04/03 03:51:50 1.1 --- test_userstring.py 2000/07/10 17:08:42 1.2 *************** *** 2,5 **** --- 2,6 ---- import sys, string from test_support import verbose + import string_tests # UserString is a wrapper around the native builtin string type. # UserString instances should behave similar to builtin string objects. *************** *** 42,227 **** print 'yes' ! test('capitalize', ' hello ') ! test('capitalize', 'hello ') ! ! test('center', 'foo', 0) ! test('center', 'foo', 3) ! test('center', 'foo', 16) ! ! test('ljust', 'foo', 0) ! test('ljust', 'foo', 3) ! test('ljust', 'foo', 16) ! ! test('rjust', 'foo', 0) ! test('rjust', 'foo', 3) ! test('rjust', 'foo', 16) ! ! test('count', 'abcabcabc', 'abc') ! test('count', 'abcabcabc', 'abc', 1) ! test('count', 'abcabcabc', 'abc', -1) ! test('count', 'abcabcabc', 'abc', 7) ! test('count', 'abcabcabc', 'abc', 0, 3) ! test('count', 'abcabcabc', 'abc', 0, 333) ! ! test('find', 'abcdefghiabc', 'abc') ! test('find', 'abcdefghiabc', 'abc', 1) ! test('find', 'abcdefghiabc', 'def', 4) ! test('rfind', 'abcdefghiabc', 'abc') ! ! test('index', 'abcabcabc', 'abc') ! test('index', 'abcabcabc', 'abc', 1) ! test('index', 'abcabcabc', 'abc', -1) ! test('index', 'abcabcabc', 'abc', 7) ! test('index', 'abcabcabc', 'abc', 0, 3) ! test('index', 'abcabcabc', 'abc', 0, 333) ! ! test('rindex', 'abcabcabc', 'abc') ! test('rindex', 'abcabcabc', 'abc', 1) ! test('rindex', 'abcabcabc', 'abc', -1) ! test('rindex', 'abcabcabc', 'abc', 7) ! test('rindex', 'abcabcabc', 'abc', 0, 3) ! test('rindex', 'abcabcabc', 'abc', 0, 333) ! ! ! test('lower', 'HeLLo') ! test('lower', 'hello') ! test('upper', 'HeLLo') ! test('upper', 'HELLO') ! ! test('title', ' hello ') ! test('title', 'hello ') ! test('title', "fOrMaT thIs aS titLe String") ! test('title', "fOrMaT,thIs-aS*titLe;String") ! test('title', "getInt") ! ! test('expandtabs', 'abc\rab\tdef\ng\thi') ! test('expandtabs', 'abc\rab\tdef\ng\thi', 8) ! test('expandtabs', 'abc\rab\tdef\ng\thi', 4) ! test('expandtabs', 'abc\r\nab\tdef\ng\thi', 4) ! ! test('islower', 'a') ! test('islower', 'A') ! test('islower', '\n') ! test('islower', 'abc') ! test('islower', 'aBc') ! test('islower', 'abc\n') ! ! test('isupper', 'a') ! test('isupper', 'A') ! test('isupper', '\n') ! test('isupper', 'ABC') ! test('isupper', 'AbC') ! test('isupper', 'ABC\n') ! ! test('isdigit', ' 0123456789') ! test('isdigit', '56789') ! test('isdigit', '567.89') ! test('isdigit', '0123456789abc') ! ! test('isspace', '') ! test('isspace', ' ') ! test('isspace', ' \t') ! test('isspace', ' \t\f\n') ! ! test('istitle', 'a') ! test('istitle', 'A') ! test('istitle', '\n') ! test('istitle', 'A Titlecased Line') ! test('istitle', 'A\nTitlecased Line') ! test('istitle', 'A Titlecased, Line') ! test('istitle', 'Not a capitalized String') ! test('istitle', 'Not\ta Titlecase String') ! test('istitle', 'Not--a Titlecase String') ! ! test('splitlines', "abc\ndef\n\rghi") ! test('splitlines', "abc\ndef\n\r\nghi") ! test('splitlines', "abc\ndef\r\nghi") ! test('splitlines', "abc\ndef\r\nghi\n") ! test('splitlines', "abc\ndef\r\nghi\n\r") ! test('splitlines', "\nabc\ndef\r\nghi\n\r") ! test('splitlines', "\nabc\ndef\r\nghi\n\r") ! test('splitlines', "\nabc\ndef\r\nghi\n\r") ! ! test('split', 'this is the split function') ! test('split', 'a|b|c|d', '|') ! test('split', 'a|b|c|d', '|', 2) ! test('split', 'a b c d', None, 1) ! test('split', 'a b c d', None, 2) ! test('split', 'a b c d', None, 3) ! test('split', 'a b c d', None, 4) ! test('split', 'a b c d', None, 0) ! test('split', 'a b c d', None, 2) ! test('split', 'a b c d ') ! ! # join now works with any sequence type ! class Sequence: ! def __init__(self): self.seq = 'wxyz' ! def __len__(self): return len(self.seq) ! def __getitem__(self, i): return self.seq[i] ! ! test('join', '', ('a', 'b', 'c', 'd')) ! test('join', '', Sequence()) ! test('join', '', 7) ! ! class BadSeq(Sequence): ! def __init__(self): self.seq = [7, 'hello', 123L] ! ! test('join', '', BadSeq()) ! ! test('strip', ' hello ') ! test('lstrip', ' hello ') ! test('rstrip', ' hello ') ! test('strip', 'hello') ! ! test('swapcase', 'HeLLo cOmpUteRs') ! transtable = string.maketrans("abc", "xyz") ! test('translate', 'xyzabcdef', transtable, 'def') ! ! transtable = string.maketrans('a', 'A') ! test('translate', 'abc', transtable) ! test('translate', 'xyz', transtable) ! ! test('replace', 'one!two!three!', '!', '@', 1) ! test('replace', 'one!two!three!', '!', '') ! test('replace', 'one!two!three!', '!', '@', 2) ! test('replace', 'one!two!three!', '!', '@', 3) ! test('replace', 'one!two!three!', '!', '@', 4) ! test('replace', 'one!two!three!', '!', '@', 0) ! test('replace', 'one!two!three!', '!', '@') ! test('replace', 'one!two!three!', 'x', '@') ! test('replace', 'one!two!three!', 'x', '@', 2) ! ! test('startswith', 'hello', 'he') ! test('startswith', 'hello', 'hello') ! test('startswith', 'hello', 'hello world') ! test('startswith', 'hello', '') ! test('startswith', 'hello', 'ello') ! test('startswith', 'hello', 'ello', 1) ! test('startswith', 'hello', 'o', 4) ! test('startswith', 'hello', 'o', 5) ! test('startswith', 'hello', '', 5) ! test('startswith', 'hello', 'lo', 6) ! test('startswith', 'helloworld', 'lowo', 3) ! test('startswith', 'helloworld', 'lowo', 3, 7) ! test('startswith', 'helloworld', 'lowo', 3, 6) ! ! test('endswith', 'hello', 'lo') ! test('endswith', 'hello', 'he') ! test('endswith', 'hello', '') ! test('endswith', 'hello', 'hello world') ! test('endswith', 'helloworld', 'worl') ! test('endswith', 'helloworld', 'worl', 3, 9) ! test('endswith', 'helloworld', 'world', 3, 12) ! test('endswith', 'helloworld', 'lowo', 1, 7) ! test('endswith', 'helloworld', 'lowo', 2, 7) ! test('endswith', 'helloworld', 'lowo', 3, 7) ! test('endswith', 'helloworld', 'lowo', 4, 7) ! test('endswith', 'helloworld', 'lowo', 3, 8) ! test('endswith', 'ab', 'ab', 0, 1) ! test('endswith', 'ab', 'ab', 0, 0) ! ! # TODO: test cases for: int, long, float, complex, +, * and cmp ! s = "" ! for builtin_method in dir(s): ! if not tested_methods.has_key(builtin_method): ! print "no regression test case for method '"+builtin_method+"'" --- 43,45 ---- print 'yes' ! string_tests.run_method_tests(test) From python-dev@python.org Mon Jul 10 18:10:28 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 10:10:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules fcntlmodule.c,2.21,2.22 gcmodule.c,2.2,2.3 Message-ID: <200007101710.KAA08193@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8179 Modified Files: fcntlmodule.c gcmodule.c Log Message: ANSI-fication Index: fcntlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fcntlmodule.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** fcntlmodule.c 2000/06/30 23:58:05 2.21 --- fcntlmodule.c 2000/07/10 17:10:26 2.22 *************** *** 28,34 **** static PyObject * ! fcntl_fcntl(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { int fd; --- 28,32 ---- static PyObject * ! fcntl_fcntl(PyObject *self, PyObject *args) { int fd; *************** *** 88,94 **** static PyObject * ! fcntl_ioctl(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { int fd; --- 86,90 ---- static PyObject * ! fcntl_ioctl(PyObject *self, PyObject *args) { int fd; *************** *** 147,153 **** static PyObject * ! fcntl_flock(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { int fd; --- 143,147 ---- static PyObject * ! fcntl_flock(PyObject *self, PyObject *args) { int fd; *************** *** 207,213 **** /* lockf(fd, operation) */ static PyObject * ! fcntl_lockf(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { int fd, code, ret, whence = 0; --- 201,205 ---- /* lockf(fd, operation) */ static PyObject * ! fcntl_lockf(PyObject *self, PyObject *args) { int fd, code, ret, whence = 0; *************** *** 300,307 **** static int ! ins(d, symbol, value) ! PyObject* d; ! char* symbol; ! long value; { PyObject* v = PyInt_FromLong(value); --- 292,296 ---- static int ! ins(PyObject* d, char* symbol, long value) { PyObject* v = PyInt_FromLong(value); *************** *** 314,319 **** static int ! all_ins(d) ! PyObject* d; { if (ins(d, "LOCK_SH", (long)LOCK_SH)) return -1; --- 303,307 ---- static int ! all_ins(PyObject* d) { if (ins(d, "LOCK_SH", (long)LOCK_SH)) return -1; Index: gcmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** gcmodule.c 2000/07/10 05:37:39 2.2 --- gcmodule.c 2000/07/10 17:10:26 2.3 *************** *** 528,534 **** static PyObject * ! Py_collect(self, args) ! PyObject *self; ! PyObject *args; { long n; --- 528,532 ---- static PyObject * ! Py_collect(PyObject *self, PyObject *args) { long n; *************** *** 562,568 **** static PyObject * ! Py_set_debug(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, "l", &debug)) --- 560,564 ---- static PyObject * ! Py_set_debug(PyObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, "l", &debug)) *************** *** 580,586 **** static PyObject * ! Py_get_debug(self, args) ! PyObject *self; ! PyObject *args; { if(!PyArg_ParseTuple(args, "")) /* no args */ --- 576,580 ---- static PyObject * ! Py_get_debug(PyObject *self, PyObject *args) { if(!PyArg_ParseTuple(args, "")) /* no args */ *************** *** 598,604 **** static PyObject * ! Py_set_thresh(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, "i|ii", &threshold0, --- 592,596 ---- static PyObject * ! Py_set_thresh(PyObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, "i|ii", &threshold0, *************** *** 617,623 **** static PyObject * ! Py_get_thresh(self, args) ! PyObject *self; ! PyObject *args; { if(!PyArg_ParseTuple(args, "")) /* no args */ --- 609,613 ---- static PyObject * ! Py_get_thresh(PyObject *self, PyObject *args) { if(!PyArg_ParseTuple(args, "")) /* no args */ From python-dev@python.org Mon Jul 10 18:14:02 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 10:14:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mpzmodule.c,2.28,2.29 Message-ID: <200007101714.KAA08377@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8265 Modified Files: mpzmodule.c Log Message: ANSI-fication, added #ifdef construction in mpz_coerce Index: mpzmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mpzmodule.c,v retrieving revision 2.28 retrieving revision 2.29 diff -C2 -r2.28 -r2.29 *** mpzmodule.c 2000/07/09 03:09:55 2.28 --- mpzmodule.c 2000/07/10 17:14:00 2.29 *************** *** 116,123 **** static PyObject * ! mpz_format(objp, base, withname) ! PyObject *objp; ! int base; ! unsigned char withname; { mpzobject *mpzp = (mpzobject *)objp; --- 116,120 ---- static PyObject * ! mpz_format(PyObject *objp, int base, unsigned char withname) { mpzobject *mpzp = (mpzobject *)objp; *************** *** 258,263 **** static void ! mpz_dealloc(mpzp) ! mpzobject *mpzp; { #ifdef MPZ_DEBUG --- 255,259 ---- static void ! mpz_dealloc(mpzobject *mpzp) { #ifdef MPZ_DEBUG *************** *** 273,278 **** static int ! mpz_compare(a, b) ! mpzobject *a, *b; { int cmpres; --- 269,273 ---- static int ! mpz_compare(mpzobject *a, mpzobject *b) { int cmpres; *************** *** 285,291 **** static PyObject * ! mpz_addition(a, b) ! mpzobject *a; ! mpzobject *b; { mpzobject *z; --- 280,284 ---- static PyObject * ! mpz_addition(mpzobject *a, mpzobject *b) { mpzobject *z; *************** *** 312,318 **** static PyObject * ! mpz_substract(a, b) ! mpzobject *a; ! mpzobject *b; { mpzobject *z; --- 305,309 ---- static PyObject * ! mpz_substract(mpzobject *a, mpzobject *b) { mpzobject *z; *************** *** 334,340 **** static PyObject * ! mpz_multiply(a, b) ! mpzobject *a; ! mpzobject *b; { #ifdef MPZ_SPARE_MALLOC --- 325,329 ---- static PyObject * ! mpz_multiply(mpzobject *a, mpzobject *b) { #ifdef MPZ_SPARE_MALLOC *************** *** 373,379 **** static PyObject * ! mpz_divide(a, b) ! mpzobject *a; ! mpzobject *b; { #ifdef MPZ_SPARE_MALLOC --- 362,366 ---- static PyObject * ! mpz_divide(mpzobject *a, mpzobject *b) { #ifdef MPZ_SPARE_MALLOC *************** *** 444,450 **** static PyObject * ! mpz_remainder(a, b) ! mpzobject *a; ! mpzobject *b; { #ifdef MPZ_SPARE_MALLOC --- 431,435 ---- static PyObject * ! mpz_remainder(mpzobject *a, mpzobject *b) { #ifdef MPZ_SPARE_MALLOC *************** *** 515,521 **** static PyObject * ! mpz_div_and_mod(a, b) ! mpzobject *a; ! mpzobject *b; { PyObject *z = NULL; --- 500,504 ---- static PyObject * ! mpz_div_and_mod(mpzobject *a, mpzobject *b) { PyObject *z = NULL; *************** *** 575,582 **** static PyObject * ! mpz_power(a, b, m) ! mpzobject *a; ! mpzobject *b; ! mpzobject *m; { mpzobject *z; --- 558,562 ---- static PyObject * ! mpz_power(mpzobject *a, mpzobject *b, mpzobject *m) { mpzobject *z; *************** *** 669,674 **** static PyObject * ! mpz_negative(v) ! mpzobject *v; { mpzobject *z; --- 649,653 ---- static PyObject * ! mpz_negative(mpzobject *v) { mpzobject *z; *************** *** 692,697 **** static PyObject * ! mpz_positive(v) ! mpzobject *v; { Py_INCREF(v); --- 671,675 ---- static PyObject * ! mpz_positive(mpzobject *v) { Py_INCREF(v); *************** *** 701,706 **** static PyObject * ! mpz_absolute(v) ! mpzobject *v; { mpzobject *z; --- 679,683 ---- static PyObject * ! mpz_absolute(mpzobject *v) { mpzobject *z; *************** *** 720,725 **** static int ! mpz_nonzero(v) ! mpzobject *v; { return mpz_cmp_ui(&v->mpz, (unsigned long int)0) != 0; --- 697,701 ---- static int ! mpz_nonzero(mpzobject *v) { return mpz_cmp_ui(&v->mpz, (unsigned long int)0) != 0; *************** *** 727,732 **** static PyObject * ! py_mpz_invert(v) ! mpzobject *v; { mpzobject *z; --- 703,707 ---- static PyObject * ! py_mpz_invert(mpzobject *v) { mpzobject *z; *************** *** 742,748 **** static PyObject * ! mpz_lshift(a, b) ! mpzobject *a; ! mpzobject *b; { int cmpres; --- 717,721 ---- static PyObject * ! mpz_lshift(mpzobject *a, mpzobject *b) { int cmpres; *************** *** 782,788 **** static PyObject * ! mpz_rshift(a, b) ! mpzobject *a; ! mpzobject *b; { int cmpres; --- 755,759 ---- static PyObject * ! mpz_rshift(mpzobject *a, mpzobject *b) { int cmpres; *************** *** 813,819 **** static PyObject * ! mpz_andfunc(a, b) ! mpzobject *a; ! mpzobject *b; { mpzobject *z; --- 784,788 ---- static PyObject * ! mpz_andfunc(mpzobject *a, mpzobject *b) { mpzobject *z; *************** *** 829,836 **** /* hack Hack HAck HACk HACK, XXX this code is dead slow */ void ! mpz_xor(res, op1, op2) ! MP_INT *res; ! const MP_INT *op1; ! const MP_INT *op2; { MP_INT tmpmpz; --- 798,802 ---- /* hack Hack HAck HACk HACK, XXX this code is dead slow */ void ! mpz_xor(MP_INT *res, const MP_INT *op1, const MP_INT *op2) { MP_INT tmpmpz; *************** *** 847,853 **** static PyObject * ! mpz_xorfunc(a, b) ! mpzobject *a; ! mpzobject *b; { mpzobject *z; --- 813,817 ---- static PyObject * ! mpz_xorfunc(mpzobject *a, mpzobject *b) { mpzobject *z; *************** *** 862,868 **** static PyObject * ! mpz_orfunc(a, b) ! mpzobject *a; ! mpzobject *b; { mpzobject *z; --- 826,830 ---- static PyObject * ! mpz_orfunc(mpzobject *a, mpzobject *b) { mpzobject *z; *************** *** 881,887 **** static PyObject * ! MPZ_mpz(self, args) ! PyObject *self; ! PyObject *args; { mpzobject *mpzp; --- 843,847 ---- static PyObject * ! MPZ_mpz(PyObject *self, PyObject *args) { mpzobject *mpzp; *************** *** 994,999 **** static mpzobject * ! mpz_mpzcoerce(z) ! PyObject *z; { /* shortcut: 9 out of 10 times the type is already ok */ --- 954,958 ---- static mpzobject * ! mpz_mpzcoerce(PyObject *z) { /* shortcut: 9 out of 10 times the type is already ok */ *************** *** 1017,1023 **** static PyObject * ! MPZ_powm(self, args) ! PyObject *self; ! PyObject *args; { PyObject *base, *exp, *mod; --- 976,980 ---- static PyObject * ! MPZ_powm(PyObject *self, PyObject *args) { PyObject *base, *exp, *mod; *************** *** 1070,1076 **** static PyObject * ! MPZ_gcd(self, args) ! PyObject *self; ! PyObject *args; { PyObject *op1, *op2; --- 1027,1031 ---- static PyObject * ! MPZ_gcd(PyObject *self, PyObject *args) { PyObject *op1, *op2; *************** *** 1101,1107 **** static PyObject * ! MPZ_gcdext(self, args) ! PyObject *self; ! PyObject *args; { PyObject *op1, *op2, *z = NULL; --- 1056,1060 ---- static PyObject * ! MPZ_gcdext(PyObject *self, PyObject *args) { PyObject *op1, *op2, *z = NULL; *************** *** 1142,1148 **** static PyObject * ! MPZ_sqrt(self, args) ! PyObject *self; ! PyObject *args; { PyObject *op; --- 1095,1099 ---- static PyObject * ! MPZ_sqrt(PyObject *self, PyObject *args) { PyObject *op; *************** *** 1169,1175 **** static PyObject * ! MPZ_sqrtrem(self, args) ! PyObject *self; ! PyObject *args; { PyObject *op, *z = NULL; --- 1120,1124 ---- static PyObject * ! MPZ_sqrtrem(PyObject *self, PyObject *args) { PyObject *op, *z = NULL; *************** *** 1204,1216 **** static void - #if __STDC__ mpz_divm(MP_INT *res, const MP_INT *num, const MP_INT *den, const MP_INT *mod) - #else - mpz_divm(res, num, den, mod) - MP_INT *res; - const MP_INT *num; - const MP_INT *den; - const MP_INT *mod; - #endif { MP_INT s0, s1, q, r, x, d0, d1; --- 1153,1157 ---- *************** *** 1275,1281 **** static PyObject * ! MPZ_divm(self, args) ! PyObject *self; ! PyObject *args; { PyObject *num, *den, *mod; --- 1216,1220 ---- static PyObject * ! MPZ_divm(PyObject *self, PyObject *args) { PyObject *num, *den, *mod; *************** *** 1317,1327 **** #ifdef MPZ_CONVERSIONS_AS_METHODS static PyObject * ! mpz_int(self, args) ! mpzobject *self; ! PyObject *args; #else /* def MPZ_CONVERSIONS_AS_METHODS */ static PyObject * ! mpz_int(self) ! mpzobject *self; #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ { --- 1256,1263 ---- #ifdef MPZ_CONVERSIONS_AS_METHODS static PyObject * ! mpz_int(mpzobject *self, PyObject *args) #else /* def MPZ_CONVERSIONS_AS_METHODS */ static PyObject * ! mpz_int(mpzobject *self) #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ { *************** *** 1349,1358 **** static PyObject * #ifdef MPZ_CONVERSIONS_AS_METHODS ! mpz_long(self, args) ! mpzobject *self; ! PyObject *args; #else /* def MPZ_CONVERSIONS_AS_METHODS */ ! mpz_long(self) ! mpzobject *self; #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ { --- 1285,1291 ---- static PyObject * #ifdef MPZ_CONVERSIONS_AS_METHODS ! mpz_long(mpzobject *self, PyObject *args) #else /* def MPZ_CONVERSIONS_AS_METHODS */ ! mpz_long(mpzobject *self) #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ { *************** *** 1432,1442 **** #ifdef MPZ_CONVERSIONS_AS_METHODS static PyObject * ! mpz_float(self, args) ! mpzobject *self; ! PyObject *args; #else /* def MPZ_CONVERSIONS_AS_METHODS */ static PyObject * ! mpz_float(self) ! mpzobject *self; #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ { --- 1365,1372 ---- #ifdef MPZ_CONVERSIONS_AS_METHODS static PyObject * ! mpz_float(mpzobject *self, PyObject *args) #else /* def MPZ_CONVERSIONS_AS_METHODS */ static PyObject * ! mpz_float(mpzobject *self) #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ { *************** *** 1489,1499 **** #ifdef MPZ_CONVERSIONS_AS_METHODS static PyObject * ! mpz_hex(self, args) ! mpzobject *self; ! PyObject *args; #else /* def MPZ_CONVERSIONS_AS_METHODS */ static PyObject * ! mpz_hex(self) ! mpzobject *self; #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ { --- 1419,1426 ---- #ifdef MPZ_CONVERSIONS_AS_METHODS static PyObject * ! mpz_hex(mpzobject *self, PyObject *args) #else /* def MPZ_CONVERSIONS_AS_METHODS */ static PyObject * ! mpz_hex(mpzobject *self) #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ { *************** *** 1503,1518 **** #endif /* def MPZ_CONVERSIONS_AS_METHODS */ ! return mpz_format(self, 16, (unsigned char)1); } /* mpz_hex() */ #ifdef MPZ_CONVERSIONS_AS_METHODS static PyObject * ! mpz_oct(self, args) ! mpzobject *self; ! PyObject *args; #else /* def MPZ_CONVERSIONS_AS_METHODS */ static PyObject * ! mpz_oct(self) ! mpzobject *self; #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ { --- 1430,1442 ---- #endif /* def MPZ_CONVERSIONS_AS_METHODS */ ! return mpz_format((PyObject *)self, 16, (unsigned char)1); } /* mpz_hex() */ #ifdef MPZ_CONVERSIONS_AS_METHODS static PyObject * ! mpz_oct(mpzobject *self, PyObject *args) #else /* def MPZ_CONVERSIONS_AS_METHODS */ static PyObject * ! mpz_oct(mpzobject *self) #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ { *************** *** 1522,1532 **** #endif /* def MPZ_CONVERSIONS_AS_METHODS */ ! return mpz_format(self, 8, (unsigned char)1); } /* mpz_oct() */ static PyObject * ! mpz_binary(self, args) ! mpzobject *self; ! PyObject *args; { int size; --- 1446,1454 ---- #endif /* def MPZ_CONVERSIONS_AS_METHODS */ ! return mpz_format((PyObject *)self, 8, (unsigned char)1); } /* mpz_oct() */ static PyObject * ! mpz_binary(mpzobject *self, PyObject *args) { int size; *************** *** 1587,1593 **** static PyObject * ! mpz_getattr(self, name) ! mpzobject *self; ! char *name; { return Py_FindMethod(mpz_methods, (PyObject *)self, name); --- 1509,1513 ---- static PyObject * ! mpz_getattr(mpzobject *self, char *name) { return Py_FindMethod(mpz_methods, (PyObject *)self, name); *************** *** 1596,1602 **** static int ! mpz_coerce(pv, pw) ! PyObject **pv; ! PyObject **pw; { PyObject *z; --- 1516,1520 ---- static int ! mpz_coerce(PyObject **pv, PyObject **pw) { PyObject *z; *************** *** 1617,1622 **** } else { ! if ((z = mpz_float(*pv, NULL)) == NULL) return -1; Py_INCREF(*pw); --- 1535,1545 ---- } else { ! #ifdef MPZ_CONVERSIONS_AS_METHODS ! if ((z = mpz_float((mpzobject *)(*pv), NULL)) == NULL) ! return -1; ! #else /* def MPZ_CONVERSIONS_AS_METHODS */ ! if ((z = mpz_float((mpzobject *)(*pv))) == NULL) return -1; + #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ Py_INCREF(*pw); *************** *** 1629,1634 **** static PyObject * ! mpz_repr(v) ! PyObject *v; { return mpz_format(v, 10, (unsigned char)1); --- 1552,1556 ---- static PyObject * ! mpz_repr(PyObject *v) { return mpz_format(v, 10, (unsigned char)1); *************** *** 1731,1736 **** #endif /* def MP_TEST_ALLOC else */ ! void *mp_allocate( alloc_size ) ! size_t alloc_size; { void *res; --- 1653,1657 ---- #endif /* def MP_TEST_ALLOC else */ ! void *mp_allocate(size_t alloc_size) { void *res; *************** *** 1754,1761 **** ! void *mp_reallocate( ptr, old_size, new_size ) ! void *ptr; ! size_t old_size; ! size_t new_size; { void *res; --- 1675,1679 ---- ! void *mp_reallocate(void *ptr, size_t old_size, size_t new_size) { void *res; *************** *** 1782,1788 **** ! void mp_free( ptr, size ) ! void *ptr; ! size_t size; { --- 1700,1704 ---- ! void mp_free(void *ptr, size_t size) { From python-dev@python.org Mon Jul 10 18:15:09 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 10:15:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules audioop.c,1.38,1.39 Message-ID: <200007101715.KAA08574@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8549 Modified Files: audioop.c Log Message: ANSI-fication Index: audioop.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/audioop.c,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** audioop.c 2000/06/30 23:58:05 1.38 --- audioop.c 2000/07/10 17:15:07 1.39 *************** *** 27,31 **** #if defined(__CHAR_UNSIGNED__) #if defined(signed) - !ERROR!; READ THE SOURCE FILE!; /* This module currently does not work on systems where only unsigned characters are available. Take it out of Setup. Sorry. */ --- 27,30 ---- *************** *** 96,101 **** static unsigned char ! st_linear_to_ulaw( sample ) ! int sample; { static int exp_lut[256] = {0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3, --- 95,99 ---- static unsigned char ! st_linear_to_ulaw(int sample) { static int exp_lut[256] = {0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3, *************** *** 163,169 **** static PyObject * ! audioop_getsample(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 161,165 ---- static PyObject * ! audioop_getsample(PyObject *self, PyObject *args) { signed char *cp; *************** *** 188,194 **** static PyObject * ! audioop_max(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 184,188 ---- static PyObject * ! audioop_max(PyObject *self, PyObject *args) { signed char *cp; *************** *** 214,220 **** static PyObject * ! audioop_minmax(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 208,212 ---- static PyObject * ! audioop_minmax(PyObject *self, PyObject *args) { signed char *cp; *************** *** 240,246 **** static PyObject * ! audioop_avg(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 232,236 ---- static PyObject * ! audioop_avg(PyObject *self, PyObject *args) { signed char *cp; *************** *** 269,275 **** static PyObject * ! audioop_rms(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 259,263 ---- static PyObject * ! audioop_rms(PyObject *self, PyObject *args) { signed char *cp; *************** *** 344,350 **** */ static PyObject * ! audioop_findfit(self, args) ! PyObject *self; ! PyObject *args; { short *cp1, *cp2; --- 332,336 ---- */ static PyObject * ! audioop_findfit(PyObject *self, PyObject *args) { short *cp1, *cp2; *************** *** 404,410 **** */ static PyObject * ! audioop_findfactor(self, args) ! PyObject *self; ! PyObject *args; { short *cp1, *cp2; --- 390,394 ---- */ static PyObject * ! audioop_findfactor(PyObject *self, PyObject *args) { short *cp1, *cp2; *************** *** 436,442 **** */ static PyObject * ! audioop_findmax(self, args) ! PyObject *self; ! PyObject *args; { short *cp1; --- 420,424 ---- */ static PyObject * ! audioop_findmax(PyObject *self, PyObject *args) { short *cp1; *************** *** 482,488 **** static PyObject * ! audioop_avgpp(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 464,468 ---- static PyObject * ! audioop_avgpp(PyObject *self, PyObject *args) { signed char *cp; *************** *** 541,547 **** static PyObject * ! audioop_maxpp(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 521,525 ---- static PyObject * ! audioop_maxpp(PyObject *self, PyObject *args) { signed char *cp; *************** *** 596,602 **** static PyObject * ! audioop_cross(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 574,578 ---- static PyObject * ! audioop_cross(PyObject *self, PyObject *args) { signed char *cp; *************** *** 625,631 **** static PyObject * ! audioop_mul(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp, *ncp; --- 601,605 ---- static PyObject * ! audioop_mul(PyObject *self, PyObject *args) { signed char *cp, *ncp; *************** *** 668,674 **** static PyObject * ! audioop_tomono(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp, *ncp; --- 642,646 ---- static PyObject * ! audioop_tomono(PyObject *self, PyObject *args) { signed char *cp, *ncp; *************** *** 714,720 **** static PyObject * ! audioop_tostereo(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp, *ncp; --- 686,690 ---- static PyObject * ! audioop_tostereo(PyObject *self, PyObject *args) { signed char *cp, *ncp; *************** *** 768,774 **** static PyObject * ! audioop_add(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp1, *cp2, *ncp; --- 738,742 ---- static PyObject * ! audioop_add(PyObject *self, PyObject *args) { signed char *cp1, *cp2, *ncp; *************** *** 823,829 **** static PyObject * ! audioop_bias(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp, *ncp; --- 791,795 ---- static PyObject * ! audioop_bias(PyObject *self, PyObject *args) { signed char *cp, *ncp; *************** *** 861,867 **** static PyObject * ! audioop_reverse(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 827,831 ---- static PyObject * ! audioop_reverse(PyObject *self, PyObject *args) { signed char *cp; *************** *** 900,906 **** static PyObject * ! audioop_lin2lin(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 864,868 ---- static PyObject * ! audioop_lin2lin(PyObject *self, PyObject *args) { signed char *cp; *************** *** 950,956 **** static PyObject * ! audioop_ratecv(self, args) ! PyObject *self; ! PyObject *args; { char *cp, *ncp; --- 912,916 ---- static PyObject * ! audioop_ratecv(PyObject *self, PyObject *args) { char *cp, *ncp; *************** *** 1091,1097 **** static PyObject * ! audioop_lin2ulaw(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 1051,1055 ---- static PyObject * ! audioop_lin2ulaw(PyObject *self, PyObject *args) { signed char *cp; *************** *** 1126,1132 **** static PyObject * ! audioop_ulaw2lin(self, args) ! PyObject *self; ! PyObject *args; { unsigned char *cp; --- 1084,1088 ---- static PyObject * ! audioop_ulaw2lin(PyObject *self, PyObject *args) { unsigned char *cp; *************** *** 1163,1169 **** static PyObject * ! audioop_lin2adpcm(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 1119,1123 ---- static PyObject * ! audioop_lin2adpcm(PyObject *self, PyObject *args) { signed char *cp; *************** *** 1274,1280 **** static PyObject * ! audioop_adpcm2lin(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 1228,1232 ---- static PyObject * ! audioop_adpcm2lin(PyObject *self, PyObject *args) { signed char *cp; From python-dev@python.org Mon Jul 10 18:25:39 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 10:25:39 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules sunaudiodev.c,1.19,1.20 Message-ID: <200007101725.KAA09295@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv9249 Modified Files: sunaudiodev.c Log Message: ANSI-fication (fixed on parameter list I messed up in the patch) Index: sunaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sunaudiodev.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** sunaudiodev.c 2000/06/30 23:58:05 1.19 --- sunaudiodev.c 2000/07/10 17:25:37 1.20 *************** *** 61,66 **** static sadobject * ! newsadobject(arg) ! PyObject *arg; { sadobject *xp; --- 61,65 ---- static sadobject * ! newsadobject(PyObject *args) { sadobject *xp; *************** *** 73,77 **** /* Check arg for r/w/rw */ ! if (!PyArg_Parse(arg, "s", &mode)) return NULL; if (strcmp(mode, "r") == 0) --- 72,76 ---- /* Check arg for r/w/rw */ ! if (!PyArg_Parse(args, "s", &mode)) return NULL; if (strcmp(mode, "r") == 0) *************** *** 134,139 **** static void ! sad_dealloc(xp) ! sadobject *xp; { close(xp->x_fd); --- 133,137 ---- static void ! sad_dealloc(sadobject *xp) { close(xp->x_fd); *************** *** 142,148 **** static PyObject * ! sad_read(self, args) ! sadobject *self; ! PyObject *args; { int size, count; --- 140,144 ---- static PyObject * ! sad_read(sadobject *self, PyObject *args) { int size, count; *************** *** 181,187 **** static PyObject * ! sad_write(self, args) ! sadobject *self; ! PyObject *args; { char *cp; --- 177,181 ---- static PyObject * ! sad_write(sadobject *self, PyObject *args) { char *cp; *************** *** 207,213 **** static PyObject * ! sad_getinfo(self, args) ! sadobject *self; ! PyObject *args; { sadstatusobject *rv; --- 201,205 ---- static PyObject * ! sad_getinfo(sadobject *self, PyObject *args) { sadstatusobject *rv; *************** *** 227,233 **** static PyObject * ! sad_setinfo(self, arg) ! sadobject *self; ! sadstatusobject *arg; { if (!is_sadstatusobject(arg)) { --- 219,223 ---- static PyObject * ! sad_setinfo(sadobject *self, sadstatusobject *arg) { if (!is_sadstatusobject(arg)) { *************** *** 245,251 **** static PyObject * ! sad_ibufcount(self, args) ! sadobject *self; ! PyObject *args; { audio_info_t ai; --- 235,239 ---- static PyObject * ! sad_ibufcount(sadobject *self, PyObject *args) { audio_info_t ai; *************** *** 261,267 **** static PyObject * ! sad_obufcount(self, args) ! sadobject *self; ! PyObject *args; { audio_info_t ai; --- 249,253 ---- static PyObject * ! sad_obufcount(sadobject *self, PyObject *args) { audio_info_t ai; *************** *** 281,287 **** static PyObject * ! sad_drain(self, args) ! sadobject *self; ! PyObject *args; { --- 267,271 ---- static PyObject * ! sad_drain(sadobject *self, PyObject *args) { *************** *** 298,304 **** #ifdef SOLARIS static PyObject * ! sad_getdev(self, args) ! sadobject *self; ! PyObject *args; { struct audio_device ad; --- 282,286 ---- #ifdef SOLARIS static PyObject * ! sad_getdev(sadobject *self, PyObject *args) { struct audio_device ad; *************** *** 315,321 **** static PyObject * ! sad_flush(self, args) ! sadobject *self; ! PyObject *args; { --- 297,301 ---- static PyObject * ! sad_flush(sadobject *self, PyObject *args) { *************** *** 331,337 **** static PyObject * ! sad_close(self, args) ! sadobject *self; ! PyObject *args; { --- 311,315 ---- static PyObject * ! sad_close(sadobject *self, PyObject *args) { *************** *** 347,353 **** static PyObject * ! sad_fileno(self, args) ! sadobject *self; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 325,329 ---- static PyObject * ! sad_fileno(sadobject *self, PyObject *args) { if (!PyArg_Parse(args, "")) *************** *** 377,383 **** static PyObject * ! sad_getattr(xp, name) ! sadobject *xp; ! char *name; { if (xp->x_isctl) --- 353,357 ---- static PyObject * ! sad_getattr(sadobject *xp, char *name) { if (xp->x_isctl) *************** *** 396,401 **** static void ! sads_dealloc(xp) ! sadstatusobject *xp; { PyMem_DEL(xp); --- 370,374 ---- static void ! sads_dealloc(sadstatusobject *xp) { PyMem_DEL(xp); *************** *** 447,453 **** static PyObject * ! sads_getattr(xp, name) ! sadstatusobject *xp; ! char *name; { return PyMember_Get((char *)&xp->ai, sads_ml, name); --- 420,424 ---- static PyObject * ! sads_getattr(sadstatusobject *xp, char *name) { return PyMember_Get((char *)&xp->ai, sads_ml, name); *************** *** 455,462 **** static int ! sads_setattr(xp, name, v) ! sadstatusobject *xp; ! char *name; ! PyObject *v; { --- 426,430 ---- static int ! sads_setattr(sadstatusobject *xp, char *name, PyObject *v) { *************** *** 504,510 **** static PyObject * ! sadopen(self, args) ! PyObject *self; ! PyObject *args; { return (PyObject *)newsadobject(args); --- 472,476 ---- static PyObject * ! sadopen(PyObject *self, PyObject *args) { return (PyObject *)newsadobject(args); From python-dev@python.org Mon Jul 10 19:11:02 2000 From: python-dev@python.org (Eric S. Raymond) Date: Mon, 10 Jul 2000 11:11:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcfgparser.tex,1.10,1.11 Message-ID: <200007101811.LAA19117@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv18589/dist/src/Doc/lib Modified Files: libcfgparser.tex Log Message: Give ConfigParser the capability to set as well as read options, and to write a representation of the configuration state in .ini format that can be read back in by a future read() call. Thus this class is now a back end for .ini editors as well as parsers. This patch is complete and tested, but exposes a bug in the ConfigParser implementation which I have not yet fixed. Because case information is discarded during parsing, the output of write() has its case smashed. I wrote this for a SourceForge interface script called forgetool. Documentation for the new entry points included. Index: libcfgparser.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcfgparser.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** libcfgparser.tex 2000/05/23 02:28:26 1.10 --- libcfgparser.tex 2000/07/10 18:10:59 1.11 *************** *** 6,9 **** --- 6,10 ---- \moduleauthor{Ken Manheimer}{klm@digicool.com} \moduleauthor{Barry Warsaw}{bwarsaw@python.org} + \moduleauthor{Eric S. Raymond}{esr@thyrsus.com} \sectionauthor{Christopher G. Petrilli}{petrilli@amber.org} *************** *** 114,117 **** --- 115,123 ---- \end{methoddesc} + \begin{methoddesc}{has_option}{section, option} + If the given section exists, and contains the given option. return 1; + otherwise return 0. (New in 1.6) + \end{methoddesc} + \begin{methoddesc}{read}{filenames} Read and parse a list of filenames. If \var{filenames} is a string or *************** *** 148,150 **** --- 154,167 ---- for the option are \samp{0} and \samp{1}, any others will raise \exception{ValueError}. + \end{methoddesc} + + \begin{methoddesc}{set}{section, option, value} + If the given section exists, set the given option to the specified value; + otherwise raise \exception{NoSectionError}. (New in 1.6) + \end{methoddesc} + + \begin{methoddesc}{write}{fileobect} + Write a representation of the configuration to the specified file + object. This representation can be parsed by a future \method{read()} + call. (New in 1.6) \end{methoddesc} From python-dev@python.org Mon Jul 10 19:11:02 2000 From: python-dev@python.org (Eric S. Raymond) Date: Mon, 10 Jul 2000 11:11:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib ConfigParser.py,1.18,1.19 Message-ID: <200007101811.LAA19121@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv18589/dist/src/Lib Modified Files: ConfigParser.py Log Message: Give ConfigParser the capability to set as well as read options, and to write a representation of the configuration state in .ini format that can be read back in by a future read() call. Thus this class is now a back end for .ini editors as well as parsers. This patch is complete and tested, but exposes a bug in the ConfigParser implementation which I have not yet fixed. Because case information is discarded during parsing, the output of write() has its case smashed. I wrote this for a SourceForge interface script called forgetool. Documentation for the new entry points included. Index: ConfigParser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ConfigParser.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** ConfigParser.py 2000/05/09 14:46:40 1.18 --- ConfigParser.py 2000/07/10 18:11:00 1.19 *************** *** 287,290 **** --- 287,326 ---- return string.lower(optionstr) + def has_option(self, section, option): + """Check for the existence of a given option in a given section.""" + if not section or section == "DEFAULT": + return self.__defaults.has_key(option) + elif not self.has_section(section): + return 0 + else: + return self.__sections[section].has_key(option) + + def set(self, section, option, value): + """Set an option.""" + if not section or section == "DEFAULT": + sectdict = self.__defaults + else: + try: + sectdict = self.__sections[section] + except KeyError: + raise NoSectionError(section) + sectdict[option] = value + + def write(self, fp): + """Write an .ini-format representation of the configuration state.""" + if self.__defaults: + fp.write("[DEFAULT]\n") + for key in self.__defaults.keys(): + fp.write(key + " = " + self.__defaults[key] + "\n") + fp.write("\n") + for section in self.sections(): + fp.write("[" + section + "]\n") + sectdict = self.__sections[section] + for key in sectdict.keys(): + if key == "__name__": + continue + fp.write(key + " = " + str(sectdict[key]) + "\n") + fp.write("\n") + # # Regular expressions for parsing section headers and options. Note a From python-dev@python.org Mon Jul 10 19:27:50 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 10 Jul 2000 11:27:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.41,2.42 Message-ID: <200007101827.LAA20779@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv20359/objects Modified Files: unicodeobject.c Log Message: - changed hash calculation for unicode strings. the new value is calculated from the character values, in a way that makes sure an 8-bit ASCII string and a unicode string with the same contents get the same hash value. (as a side effect, this also works for ISO Latin 1 strings). for more details, see the python-dev discussion. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.41 retrieving revision 2.42 diff -C2 -r2.41 -r2.42 *** unicodeobject.c 2000/07/07 17:51:08 2.41 --- unicodeobject.c 2000/07/10 18:27:47 2.42 *************** *** 3472,3495 **** unicode_hash(PyUnicodeObject *self) { ! long hash; ! PyObject *utf8; ! /* Since Unicode objects compare equal to their UTF-8 string ! counterparts, they should also use the UTF-8 strings as basis ! for their hash value. This is needed to assure that strings and ! Unicode objects behave in the same way as dictionary ! keys. Unfortunately, this costs some performance and also some ! memory if the cached UTF-8 representation is not used later ! on. */ if (self->hash != -1) return self->hash; ! utf8 = _PyUnicode_AsUTF8String((PyObject *)self, NULL); ! if (utf8 == NULL) ! return -1; ! hash = PyObject_Hash(utf8); ! if (hash == -1) ! return -1; ! self->hash = hash; ! return hash; } --- 3472,3497 ---- unicode_hash(PyUnicodeObject *self) { ! /* Since Unicode objects compare equal to their ASCII string ! counterparts, they should use the individual character values ! as basis for their hash value. This is needed to assure that ! strings and Unicode objects behave in the same way as ! dictionary keys. */ ! register int len; ! register Py_UNICODE *p; ! register long x; ! if (self->hash != -1) return self->hash; ! len = PyUnicode_GET_SIZE(self); ! p = PyUnicode_AS_UNICODE(self); ! x = *p << 7; ! while (--len >= 0) ! x = (1000003*x) ^ *p++; ! x ^= PyUnicode_GET_SIZE(self); ! if (x == -1) ! x = -2; ! self->hash = x; ! return x; } From python-dev@python.org Mon Jul 10 20:32:22 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 10 Jul 2000 12:32:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib locale.py,1.9,1.10 site.py,1.12,1.13 Message-ID: <200007101932.MAA31864@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv31795/lib Modified Files: locale.py site.py Log Message: -- removed get_default compatibility kludge -- added a few extra comments to locale.py Index: locale.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/locale.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** locale.py 2000/07/09 23:16:10 1.9 --- locale.py 2000/07/10 19:32:19 1.10 *************** *** 291,297 **** --- 291,300 ---- pass else: + # make sure the code/encoding values are valid if sys.platform == "win32" and code and code[:2] == "0x": # map windows language identifier to language name code = windows_locale.get(int(code, 0)) + # ...add other platform-specific processing here, if + # necessary... return code, encoding *************** *** 307,312 **** return _parse_localename(localename) - # compatibility - get_default = getdefaultlocale def getlocale(category=LC_CTYPE): --- 310,313 ---- Index: site.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/site.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** site.py 2000/06/28 14:48:01 1.12 --- site.py 2000/07/10 19:32:19 1.13 *************** *** 127,131 **** def locale_aware_defaultencoding(): import locale ! code, encoding = locale.get_default() if encoding is None: encoding = 'ascii' --- 127,131 ---- def locale_aware_defaultencoding(): import locale ! code, encoding = locale.getdefaultlocale() if encoding is None: encoding = 'ascii' From python-dev@python.org Mon Jul 10 22:30:31 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 10 Jul 2000 14:30:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.76,2.77 Message-ID: <200007102130.OAA21959@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv21752/Objects Modified Files: stringobject.c Log Message: two changes to string_join: implementation -- use PySequence_Fast interface to iterate over elements interface -- if instance object reports wrong length, ignore it; previous version raised an IndexError if reported length was too high Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.76 retrieving revision 2.77 diff -C2 -r2.76 -r2.77 *** stringobject.c 2000/07/09 08:02:21 2.76 --- stringobject.c 2000/07/10 21:30:28 2.77 *************** *** 745,848 **** int sz = 100; int i, slen; ! PyObject *seq; ! if (!PyArg_ParseTuple(args, "O:join", &seq)) return NULL; ! seqlen = PySequence_Length(seq); ! if (seqlen < 0 && PyErr_Occurred()) return NULL; if (seqlen == 1) { ! /* Optimization if there's only one item */ ! PyObject *item = PySequence_GetItem(seq, 0); ! if (item == NULL) ! return NULL; ! if (!PyString_Check(item) && ! !PyUnicode_Check(item)) { ! PyErr_SetString(PyExc_TypeError, ! "first argument must be sequence of strings"); ! Py_DECREF(item); ! return NULL; ! } return item; } if (!(res = PyString_FromStringAndSize((char*)NULL, sz))) return NULL; p = PyString_AsString(res); ! /* optimize for lists. all others (tuples and arbitrary sequences) ! * just use the abstract interface. ! */ ! if (PyList_Check(seq)) { ! for (i = 0; i < seqlen; i++) { ! PyObject *item = PyList_GET_ITEM(seq, i); ! if (!PyString_Check(item)){ ! if (PyUnicode_Check(item)) { ! Py_DECREF(res); ! return PyUnicode_Join( ! (PyObject *)self, ! seq); ! } ! PyErr_Format(PyExc_TypeError, ! "sequence item %i not a string", ! i); ! goto finally; ! } ! slen = PyString_GET_SIZE(item); ! while (reslen + slen + seplen >= sz) { ! if (_PyString_Resize(&res, sz*2)) ! goto finally; ! sz *= 2; ! p = PyString_AsString(res) + reslen; ! } ! if (i > 0) { ! memcpy(p, sep, seplen); ! p += seplen; ! reslen += seplen; } ! memcpy(p, PyString_AS_STRING(item), slen); ! p += slen; ! reslen += slen; } ! } ! else { ! for (i = 0; i < seqlen; i++) { ! PyObject *item = PySequence_GetItem(seq, i); ! if (!item) ! goto finally; ! if (!PyString_Check(item)){ ! if (PyUnicode_Check(item)) { ! Py_DECREF(res); ! Py_DECREF(item); ! return PyUnicode_Join( ! (PyObject *)self, ! seq); ! } Py_DECREF(item); ! PyErr_Format(PyExc_TypeError, ! "sequence item %i not a string", ! i); goto finally; } ! slen = PyString_GET_SIZE(item); ! while (reslen + slen + seplen >= sz) { ! if (_PyString_Resize(&res, sz*2)) { ! Py_DECREF(item); ! goto finally; ! } ! sz *= 2; ! p = PyString_AsString(res) + reslen; ! } ! if (i > 0) { ! memcpy(p, sep, seplen); ! p += seplen; ! reslen += seplen; ! } ! memcpy(p, PyString_AS_STRING(item), slen); ! Py_DECREF(item); ! p += slen; ! reslen += slen; } } if (_PyString_Resize(&res, reslen)) --- 745,808 ---- int sz = 100; int i, slen; ! PyObject *orig, *seq, *item; ! if (!PyArg_ParseTuple(args, "O:join", &orig)) return NULL; ! seq = PySequence_Fast(orig, ""); ! if (seq == NULL) { ! if (PyErr_ExceptionMatches(PyExc_TypeError)) ! PyErr_Format(PyExc_TypeError, ! "sequence expected, %.80s found", ! orig->ob_type->tp_name); return NULL; + } + seqlen = PySequence_Length(seq); if (seqlen == 1) { ! item = PySequence_Fast_GET_ITEM(seq, 0); ! Py_INCREF(item); return item; } + if (!(res = PyString_FromStringAndSize((char*)NULL, sz))) return NULL; p = PyString_AsString(res); ! for (i = 0; i < seqlen; i++) { ! item = PySequence_Fast_GET_ITEM(seq, i); ! if (!PyString_Check(item)){ ! if (PyUnicode_Check(item)) { ! Py_DECREF(res); ! Py_DECREF(item); ! return PyUnicode_Join((PyObject *)self, ! seq); } ! PyErr_Format(PyExc_TypeError, ! "sequence item %i: expected string, %.80s found", ! i, item->ob_type->tp_name); ! Py_DECREF(item); ! Py_DECREF(seq); ! goto finally; } ! slen = PyString_GET_SIZE(item); ! while (reslen + slen + seplen >= sz) { ! if (_PyString_Resize(&res, sz*2)) { Py_DECREF(item); ! Py_DECREF(seq); goto finally; } ! sz *= 2; ! p = PyString_AsString(res) + reslen; ! } ! if (i > 0) { ! memcpy(p, sep, seplen); ! p += seplen; ! reslen += seplen; } + memcpy(p, PyString_AS_STRING(item), slen); + Py_DECREF(item); + p += slen; + reslen += slen; } if (_PyString_Resize(&res, reslen)) From python-dev@python.org Mon Jul 10 23:41:33 2000 From: python-dev@python.org (Tim Peters) Date: Mon, 10 Jul 2000 15:41:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules rotormodule.c,2.25,2.26 Message-ID: <200007102241.PAA00960@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv694/python/dist/src/modules Modified Files: rotormodule.c Log Message: Now that prototypes are in scope, the compiler gives legit wngs about int size mismatches at two calls to s_rand. Stuffed in casts to make the code do what it did before but w/o warnings -- although unclear that's correct! Index: rotormodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/rotormodule.c,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** rotormodule.c 2000/07/10 13:05:29 2.25 --- rotormodule.c 2000/07/10 22:41:30 2.26 *************** *** 331,336 **** RTR_d_rotors(r); for (i = 0; i < r->rotors; i++) { ! r->positions[i] = (unsigned char) r_rand(r,r->size); ! r->advances[i] = (1+(2*(r_rand(r,r->size/2)))); RTR_permute_rotor(r, &(r->e_rotor[(i*r->size)]), --- 331,336 ---- RTR_d_rotors(r); for (i = 0; i < r->rotors; i++) { ! r->positions[i] = (unsigned char) r_rand(r, (short)r->size); ! r->advances[i] = (1+(2*(r_rand(r, (short)(r->size/2))))); RTR_permute_rotor(r, &(r->e_rotor[(i*r->size)]), From python-dev@python.org Tue Jul 11 04:28:20 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 10 Jul 2000 20:28:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.77,2.78 Message-ID: <200007110328.UAA20307@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv20163/Objects Modified Files: stringobject.c Log Message: fix two refcount bugs in new string_join implementation: 1. PySequence_Fast_GET_ITEM is a macro and borrows a reference 2. The seq returned from PySequence_Fast must be decref'd Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.77 retrieving revision 2.78 diff -C2 -r2.77 -r2.78 *** stringobject.c 2000/07/10 21:30:28 2.77 --- stringobject.c 2000/07/11 03:28:17 2.78 *************** *** 775,779 **** if (PyUnicode_Check(item)) { Py_DECREF(res); - Py_DECREF(item); return PyUnicode_Join((PyObject *)self, seq); --- 775,778 ---- *************** *** 782,787 **** "sequence item %i: expected string, %.80s found", i, item->ob_type->tp_name); - Py_DECREF(item); - Py_DECREF(seq); goto finally; } --- 781,784 ---- *************** *** 789,794 **** while (reslen + slen + seplen >= sz) { if (_PyString_Resize(&res, sz*2)) { - Py_DECREF(item); - Py_DECREF(seq); goto finally; } --- 786,789 ---- *************** *** 802,806 **** } memcpy(p, PyString_AS_STRING(item), slen); - Py_DECREF(item); p += slen; reslen += slen; --- 797,800 ---- *************** *** 808,814 **** --- 802,810 ---- if (_PyString_Resize(&res, reslen)) goto finally; + Py_DECREF(seq); return res; finally: + Py_DECREF(seq); Py_DECREF(res); return NULL; From python-dev@python.org Tue Jul 11 04:31:57 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 10 Jul 2000 20:31:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test string_tests.py,1.1,1.2 Message-ID: <200007110331.UAA20483@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv20466 Modified Files: string_tests.py Log Message: add more tests of string.join variants to run_method_tests Index: string_tests.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/string_tests.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** string_tests.py 2000/07/10 17:08:42 1.1 --- string_tests.py 2000/07/11 03:31:55 1.2 *************** *** 5,8 **** --- 5,10 ---- transtable = '\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`xyzdefghijklmnopqrstuvwxyz{|}~\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377' + from UserList import UserList + class Sequence: def __init__(self): self.seq = 'wxyz' *************** *** 40,47 **** test('join', BadSeq1(), TypeError) ! test('join', BadSeq2(), IndexError) ! # XXX should this test really raise an exception; lots of other core ! # code will just ignore the lying __len__ method. ! # test('join', BadSeq2(), 'a b c') # try a few long ones --- 42,46 ---- test('join', BadSeq1(), TypeError) ! test('join', BadSeq2(), 'a b c') # try a few long ones *************** *** 118,127 **** test('join', '', 'abcd', ('a', 'b', 'c', 'd')) test('join', ' ', 'w x y z', Sequence()) test('join', ' ', TypeError, BadSeq1()) ! test('join', ' ', IndexError, BadSeq2()) ! # XXX should this test really raise an exception; lots of other core ! # code will just ignore the lying __len__ method. ! # test('join', BadSeq2(), 'a b c') test('splitlines', "abc\ndef\n\rghi", ['abc', 'def', '', 'ghi']) --- 117,130 ---- test('join', '', 'abcd', ('a', 'b', 'c', 'd')) test('join', ' ', 'w x y z', Sequence()) + test('join', 'a', 'abc', ('abc',)) + test('join', 'a', 'z', UserList(['z'])) + test('join', u'.', u'a.b.c', ['a', 'b', 'c']) + test('join', '.', u'a.b.c', [u'a', 'b', 'c']) + test('join', '.', u'a.b.c', ['a', u'b', 'c']) + test('join', '.', u'a.b.c', ['a', 'b', u'c']) + test('join', '.', TypeError, ['a', u'b', 3]) test('join', ' ', TypeError, BadSeq1()) ! test('join', ' ', 'a b c', BadSeq2()) test('splitlines', "abc\ndef\n\rghi", ['abc', 'def', '', 'ghi']) From python-dev@python.org Tue Jul 11 05:36:11 2000 From: python-dev@python.org (Moshe Zadka) Date: Tue, 11 Jul 2000 07:36:11 +0300 (IDT) Subject: [Python-checkins] CVS: python/dist/src/Lib urllib.py,1.96,1.97 In-Reply-To: <200007101500.IAA13372@slayer.i.sourceforge.net> Message-ID: On Mon, 10 Jul 2000, Eric S. Raymond wrote: > Update of /cvsroot/python/python/dist/src/Lib > In directory slayer.i.sourceforge.net:/tmp/cvs-serv11503/dist/src/Lib > > Modified Files: > urllib.py > Log Message: > Moves some test code into the scope of if __name__ == '__main__', where it > won't get loaded when we're using the classes in this module. Why? It's only parsed once (under usual conditions) per installation, it's cost in memory is not so high, and it's cool to be able to test via ''' import urllib urllib.main() ''' -- Moshe Zadka There is no GOD but Python, and HTTP is its prophet. http://advogato.org/person/moshez From python-dev@python.org Tue Jul 11 05:58:15 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 10 Jul 2000 21:58:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.78,2.79 Message-ID: <200007110458.VAA31637@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv31629 Modified Files: stringobject.c Log Message: string_join(): Some cleaning up of reference counting. In the seqlen==1 clause, before returning item, we need to DECREF seq. In the res=PyString... failure clause, we need to goto finally to also decref seq (and the DECREF of res in finally is changed to a XDECREF). Also, we need to DECREF seq just before the PyUnicode_Join() return. Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.78 retrieving revision 2.79 diff -C2 -r2.78 -r2.79 *** stringobject.c 2000/07/11 03:28:17 2.78 --- stringobject.c 2000/07/11 04:58:12 2.79 *************** *** 750,755 **** return NULL; ! seq = PySequence_Fast(orig, ""); ! if (seq == NULL) { if (PyErr_ExceptionMatches(PyExc_TypeError)) PyErr_Format(PyExc_TypeError, --- 750,754 ---- return NULL; ! if (!(seq = PySequence_Fast(orig, ""))) { if (PyErr_ExceptionMatches(PyExc_TypeError)) PyErr_Format(PyExc_TypeError, *************** *** 758,771 **** return NULL; } ! seqlen = PySequence_Length(seq); if (seqlen == 1) { item = PySequence_Fast_GET_ITEM(seq, 0); Py_INCREF(item); return item; } if (!(res = PyString_FromStringAndSize((char*)NULL, sz))) ! return NULL; p = PyString_AsString(res); --- 757,774 ---- return NULL; } ! /* From here on out, errors go through finally: for proper ! * reference count manipulations. ! */ seqlen = PySequence_Length(seq); if (seqlen == 1) { item = PySequence_Fast_GET_ITEM(seq, 0); Py_INCREF(item); + Py_DECREF(seq); return item; } if (!(res = PyString_FromStringAndSize((char*)NULL, sz))) ! goto finally; ! p = PyString_AsString(res); *************** *** 775,780 **** if (PyUnicode_Check(item)) { Py_DECREF(res); ! return PyUnicode_Join((PyObject *)self, ! seq); } PyErr_Format(PyExc_TypeError, --- 778,783 ---- if (PyUnicode_Check(item)) { Py_DECREF(res); ! Py_DECREF(seq); ! return PyUnicode_Join((PyObject *)self, seq); } PyErr_Format(PyExc_TypeError, *************** *** 807,811 **** finally: Py_DECREF(seq); ! Py_DECREF(res); return NULL; } --- 810,814 ---- finally: Py_DECREF(seq); ! Py_XDECREF(res); return NULL; } From python-dev@python.org Tue Jul 11 10:47:08 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Tue, 11 Jul 2000 02:47:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.42,2.43 Message-ID: <200007110947.CAA21400@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv21384/Objects Modified Files: unicodeobject.c Log Message: Jeremy Hylton: better error message for unicode coercion failure Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.42 retrieving revision 2.43 diff -C2 -r2.42 -r2.43 *** unicodeobject.c 2000/07/10 18:27:47 2.42 --- unicodeobject.c 2000/07/11 09:47:04 2.43 *************** *** 407,412 **** case of a TypeError. */ if (PyErr_ExceptionMatches(PyExc_TypeError)) ! PyErr_SetString(PyExc_TypeError, ! "coercing to Unicode: need string or buffer"); goto onError; } --- 407,414 ---- case of a TypeError. */ if (PyErr_ExceptionMatches(PyExc_TypeError)) ! PyErr_Format(PyExc_TypeError, ! "coercing to Unicode: need string or buffer, " ! "%.80s found", ! obj->ob_type->tp_name); goto onError; } From python-dev@python.org Tue Jul 11 11:38:28 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 11 Jul 2000 03:38:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/curses ascii.py,1.2,1.3 textpad.py,1.2,1.3 Message-ID: <200007111038.DAA02128@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/curses In directory slayer.i.sourceforge.net:/tmp/cvs-serv1998 Modified Files: ascii.py textpad.py Log Message: Docstring changes. Index: ascii.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/curses/ascii.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ascii.py 2000/06/27 14:15:29 1.2 --- ascii.py 2000/07/11 10:38:24 1.3 *************** *** 1,5 **** ! # ! # ascii.py -- constants and membership tests for ASCII characters ! # NUL = 0x00 # ^@ --- 1,3 ---- ! """Constants and membership tests for ASCII characters""" NUL = 0x00 # ^@ Index: textpad.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/curses/textpad.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** textpad.py 2000/06/27 00:53:12 1.2 --- textpad.py 2000/07/11 10:38:24 1.3 *************** *** 1,5 **** ! """curses.textpad ! ! """ import sys, curses, ascii --- 1,3 ---- ! """Simple textbox editing widget with Emacs-like keybindings.""" import sys, curses, ascii From python-dev@python.org Tue Jul 11 11:45:30 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 11 Jul 2000 03:45:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_mmap,1.2,1.3 Message-ID: <200007111045.DAA03213@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv2891/output Modified Files: test_mmap Log Message: Add test of resize() method of mmap objects Index: test_mmap =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_mmap,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 Binary files /tmp/cvsiFpAzk and /tmp/cvseey01u differ From python-dev@python.org Tue Jul 11 11:45:30 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 11 Jul 2000 03:45:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_mmap.py,1.5,1.6 Message-ID: <200007111045.DAA03209@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv2891 Modified Files: test_mmap.py Log Message: Add test of resize() method of mmap objects Index: test_mmap.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_mmap.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_mmap.py 2000/06/18 04:47:08 1.5 --- test_mmap.py 2000/07/11 10:45:27 1.6 *************** *** 95,98 **** --- 95,111 ---- assert 0, 'expected a ValueError but did not get it' + # Try resizing map + print ' Attempting resize()' + try: + m.resize( 512 ) + except SystemError: + # resize() not supported + # No messages are printed, since the output of this test suite + # would then be different across platforms. + pass + else: + # resize() is supported + pass + m.close() os.unlink("foo") From python-dev@python.org Tue Jul 11 12:24:44 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Tue, 11 Jul 2000 04:24:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_mmap.py,1.6,1.7 Message-ID: <200007111124.EAA19137@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv18786 Modified Files: test_mmap.py Log Message: fixed inconsistent use of tab and spaces Index: test_mmap.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_mmap.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** test_mmap.py 2000/07/11 10:45:27 1.6 --- test_mmap.py 2000/07/11 11:24:41 1.7 *************** *** 70,74 **** print ' Seek to last byte' assert m.tell() == len(m) ! print ' Try to seek to negative position...' try: --- 70,74 ---- print ' Seek to last byte' assert m.tell() == len(m) ! print ' Try to seek to negative position...' try: *************** *** 98,102 **** print ' Attempting resize()' try: ! m.resize( 512 ) except SystemError: # resize() not supported --- 98,102 ---- print ' Attempting resize()' try: ! m.resize( 512 ) except SystemError: # resize() not supported *************** *** 105,109 **** pass else: ! # resize() is supported pass --- 105,109 ---- pass else: ! # resize() is supported pass From python-dev@python.org Tue Jul 11 14:03:58 2000 From: python-dev@python.org (Eric S. Raymond) Date: Tue, 11 Jul 2000 06:03:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib cmd.py,1.17,1.18 Message-ID: <200007111303.GAA10423@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9661 Modified Files: cmd.py Log Message: Bug fix: ? and ! were not full aliases for `help' and `shell' as implied in the documentation; the cases `? foo' and `! foo' failed. Index: cmd.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/cmd.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** cmd.py 2000/02/02 15:10:14 1.17 --- cmd.py 2000/07/11 13:03:55 1.18 *************** *** 91,103 **** def onecmd(self, line): line = string.strip(line) ! if line == '?': ! line = 'help' ! elif line == '!': if hasattr(self, 'do_shell'): ! line = 'shell' else: return self.default(line) - elif not line: - return self.emptyline() self.lastcmd = line i, n = 0, len(line) --- 91,103 ---- def onecmd(self, line): line = string.strip(line) ! if not line: ! return self.emptyline() ! elif line[0] == '?': ! line = 'help ' + line[1:] ! elif line[0] == '!': if hasattr(self, 'do_shell'): ! line = 'shell ' + line[1:] else: return self.default(line) self.lastcmd = line i, n = 0, len(line) From python-dev@python.org Tue Jul 11 15:37:44 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 07:37:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules gcmodule.c,2.3,2.4 Message-ID: <200007111437.HAA26326@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv26316 Modified Files: gcmodule.c Log Message: Neil Schemenauer : Change a cast, intialize a local, and make some sprintf() format strings type-appropriate (add the "l" to "%d"). Closes SourceForge patch #100737. Index: gcmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** gcmodule.c 2000/07/10 17:10:26 2.3 --- gcmodule.c 2000/07/11 14:37:41 2.4 *************** *** 290,297 **** } else if (debug & DEBUG_OBJECTS) { char buf[200]; ! sprintf(buf, "gc: %s<%s 0x%x>\n", msg, op->ob_type->tp_name, ! (long)op); PyFile_WriteString(buf, output); } --- 290,297 ---- } else if (debug & DEBUG_OBJECTS) { char buf[200]; ! sprintf(buf, "gc: %s<%.100s 0x%p>\n", msg, op->ob_type->tp_name, ! op); PyFile_WriteString(buf, output); } *************** *** 369,373 **** sprintf(buf, "gc: collecting generation %d...\n", generation); PyFile_WriteString(buf,output); ! sprintf(buf, "gc: objects in each generation: %d %d %d\n", gc_list_size(&generation0), gc_list_size(&generation1), --- 369,373 ---- sprintf(buf, "gc: collecting generation %d...\n", generation); PyFile_WriteString(buf,output); ! sprintf(buf, "gc: objects in each generation: %ld %ld %ld\n", gc_list_size(&generation0), gc_list_size(&generation1), *************** *** 435,439 **** char buf[200]; sprintf(buf, ! "gc: done, %d unreachable, %d uncollectable.\n", n+m, n); PyFile_WriteString(buf, output); --- 435,439 ---- char buf[200]; sprintf(buf, ! "gc: done, %ld unreachable, %ld uncollectable.\n", n+m, n); PyFile_WriteString(buf, output); From python-dev@python.org Tue Jul 11 16:15:34 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 11 Jul 2000 08:15:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test regrtest.py,1.17,1.18 test_select.py,1.8,1.9 Message-ID: <200007111515.IAA00921@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv31604 Modified Files: regrtest.py test_select.py Log Message: fix bug #42 reported by Andrew Dalke The Compare close contains a close method that checks to see if there is any unconsumed data in the Compare instance; i.e. if the canonical output file contains more data than was produced by the current test run. This method was never called, allowing differences to go undetected. Fix is to call close after the test is run (after __import__) output/test_long and output/test_popen2 needed trivial changes output/test_select contained lots of text, but test_select.py produced no output Index: regrtest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/regrtest.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** regrtest.py 2000/06/30 16:39:27 1.17 --- regrtest.py 2000/07/11 15:15:30 1.18 *************** *** 213,216 **** --- 213,218 ---- print test # Output file starts with test name __import__(test, globals(), locals(), []) + if cfp and not (generate or verbose): + cfp.close() finally: sys.stdout = save_stdout Index: test_select.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_select.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** test_select.py 1998/03/26 19:42:42 1.8 --- test_select.py 2000/07/11 15:15:30 1.9 *************** *** 46,50 **** print 'timeout =', tout rfd, wfd, xfd = select.select([p], [], [], tout) - ## print rfd, wfd, xfd if (rfd, wfd, xfd) == ([], [], []): continue --- 46,49 ---- From python-dev@python.org Tue Jul 11 16:15:34 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 11 Jul 2000 08:15:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_long,1.2,1.3 test_popen2,1.1,1.2 test_select,1.1,1.2 Message-ID: <200007111515.IAA00922@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv31604/output Modified Files: test_long test_popen2 test_select Log Message: fix bug #42 reported by Andrew Dalke The Compare close contains a close method that checks to see if there is any unconsumed data in the Compare instance; i.e. if the canonical output file contains more data than was produced by the current test run. This method was never called, allowing differences to go undetected. Fix is to call close after the test is run (after __import__) output/test_long and output/test_popen2 needed trivial changes output/test_select contained lots of text, but test_select.py produced no output Index: test_long =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_long,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** test_long 1998/10/02 01:19:48 1.2 --- test_long 2000/07/11 15:15:31 1.3 *************** *** 4,6 **** long str/hex/oct/atol long miscellaneous operations - --- 4,5 ---- Index: test_popen2 =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_popen2,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_popen2 1999/03/11 13:26:23 1.1 --- test_popen2 2000/07/11 15:15:31 1.2 *************** *** 3,5 **** testing popen3... All OK - --- 3,4 ---- Index: test_select =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_select,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_select 1996/12/11 23:58:46 1.1 --- test_select 2000/07/11 15:15:31 1.2 *************** *** 1,25 **** test_select - timeout = 0 - timeout = 1 - 'testing...\012' - timeout = 2 - 'testing...\012' - timeout = 4 - 'testing...\012' - timeout = 8 - 'testing...\012' - timeout = 16 - 'testing...\012' - timeout = None - 'testing...\012' - timeout = None - 'testing...\012' - timeout = None - 'testing...\012' - timeout = None - 'testing...\012' - timeout = None - 'testing...\012' - timeout = None - '' - EOF --- 1 ---- From python-dev@python.org Tue Jul 11 17:30:35 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 09:30:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libpyexpat.tex,1.2,1.3 Message-ID: <200007111630.JAA20148@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv20129/Doc/lib Modified Files: libpyexpat.tex Log Message: Change the table in the pyexpat.errors module to a series of datadesc elements (since the table was pretty screwed up); this is how it is done elsewhere in the manual. I could use some help creating descriptions of the specific error identifiers (input conditions that lead to each error, etc.). Index: libpyexpat.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpyexpat.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libpyexpat.tex 2000/07/05 02:03:34 1.2 --- libpyexpat.tex 2000/07/11 16:30:30 1.3 *************** *** 254,276 **** The following constants are defined: ! \begin{tableii}{l|l}{code}{Constants}{} ! \lineii{XML_ERROR_ASYNC_ENTITY} ! {XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF} ! \lineii{XML_ERROR_BAD_CHAR_REF} ! {XML_ERROR_BINARY_ENTITY_REF} ! \lineii{XML_ERROR_DUPLICATE_ATTRIBUTE} ! {XML_ERROR_INCORRECT_ENCODING} ! \lineii{XML_ERROR_INVALID_TOKEN} ! {XML_ERROR_JUNK_AFTER_DOC_ELEMENT} ! \lineii{XML_ERROR_MISPLACED_XML_PI} ! {XML_ERROR_NO_ELEMENTS} ! \lineii{XML_ERROR_NO_MEMORY} ! {XML_ERROR_PARAM_ENTITY_REF} ! \lineii{XML_ERROR_PARTIAL_CHAR} ! {XML_ERROR_RECURSIVE_ENTITY_REF} ! \lineii{XML_ERROR_SYNTAX} ! {XML_ERROR_TAG_MISMATCH} ! \lineii{XML_ERROR_UNCLOSED_TOKEN} ! {XML_ERROR_UNDEFINED_ENTITY} ! \lineii{XML_ERROR_UNKNOWN_ENCODING}{} ! \end{tableii} --- 254,319 ---- The following constants are defined: ! \begin{datadesc}{XML_ERROR_ASYNC_ENTITY} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_BAD_CHAR_REF} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_BINARY_ENTITY_REF} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_DUPLICATE_ATTRIBUTE} ! An attribute was used more than once in a start tag. ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_INCORRECT_ENCODING} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_INVALID_TOKEN} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_JUNK_AFTER_DOC_ELEMENT} ! Something other than whitespace occurred after the document element. ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_MISPLACED_XML_PI} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_NO_ELEMENTS} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_NO_MEMORY} ! Expat was not able to allocate memory internally. ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_PARAM_ENTITY_REF} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_PARTIAL_CHAR} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_RECURSIVE_ENTITY_REF} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_SYNTAX} ! Some unspecified syntax error was encountered. ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_TAG_MISMATCH} ! An end tag did not match the innermost open start tag. ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_UNCLOSED_TOKEN} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_UNDEFINED_ENTITY} ! A reference was made to a entity which was not defined. ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_UNKNOWN_ENCODING} ! The document encoding is not supported by Expat. ! \end{datadesc} ! From python-dev@python.org Tue Jul 11 17:43:19 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Tue, 11 Jul 2000 09:43:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/scripts pindent.py,1.8,1.9 Message-ID: <200007111643.JAA22540@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/scripts In directory slayer.i.sourceforge.net:/tmp/cvs-serv22421 Modified Files: pindent.py Log Message: add expandtabs command (-e) change eliminate to delete (-d) Index: pindent.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/scripts/pindent.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** pindent.py 2000/06/28 22:55:20 1.8 --- pindent.py 2000/07/11 16:43:16 1.9 *************** *** 5,9 **** # programs. When called as "pindent -c", it takes a valid Python # program as input and outputs a version augmented with block-closing ! # comments. When called as "pindent -e", it assumes its input is a # Python program with block-closing comments and outputs a commentless # version. When called as "pindent -r" it assumes its input is a --- 5,9 ---- # programs. When called as "pindent -c", it takes a valid Python # program as input and outputs a version augmented with block-closing ! # comments. When called as "pindent -d", it assumes its input is a # Python program with block-closing comments and outputs a commentless # version. When called as "pindent -r" it assumes its input is a *************** *** 47,50 **** --- 47,51 ---- # -s stepsize: set the indentation step size (default 8) # -t tabsize : set the number of spaces a tab character is worth (default 8) + # -e : expand TABs into spaces # file ... : input file(s) (default standard input) # The results always go to standard output *************** *** 79,82 **** --- 80,84 ---- STEPSIZE = 8 TABSIZE = 8 + EXPANDTABS = 0 import os *************** *** 97,101 **** def __init__(self, fpi = sys.stdin, fpo = sys.stdout, ! indentsize = STEPSIZE, tabsize = TABSIZE): self.fpi = fpi self.fpo = fpo --- 99,103 ---- def __init__(self, fpi = sys.stdin, fpo = sys.stdout, ! indentsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS): self.fpi = fpi self.fpo = fpo *************** *** 103,107 **** self.tabsize = tabsize self.lineno = 0 ! self.write = fpo.write self.kwprog = re.compile( r'^\s*(?P[a-z]+)' --- 105,110 ---- self.tabsize = tabsize self.lineno = 0 ! self.expandtabs = expandtabs ! self._write = fpo.write self.kwprog = re.compile( r'^\s*(?P[a-z]+)' *************** *** 115,118 **** --- 118,129 ---- # end def __init__ + def write(self, line): + if self.expandtabs: + self._write(string.expandtabs(line, self.tabsize)) + else: + self._write(line) + # end if + # end def write + def readline(self): line = self.fpi.readline() *************** *** 197,201 **** # end def reformat ! def eliminate(self): begin_counter = 0 end_counter = 0 --- 208,212 ---- # end def reformat ! def delete(self): begin_counter = 0 end_counter = 0 *************** *** 223,227 **** sys.stderr.write('Warning: input contained less end tags than expected\n') # end if ! # end def eliminate def complete(self): --- 234,238 ---- sys.stderr.write('Warning: input contained less end tags than expected\n') # end if ! # end def delete def complete(self): *************** *** 326,343 **** def complete_filter(input = sys.stdin, output = sys.stdout, ! stepsize = STEPSIZE, tabsize = TABSIZE): ! pi = PythonIndenter(input, output, stepsize, tabsize) pi.complete() # end def complete_filter ! def eliminate_filter(input= sys.stdin, output = sys.stdout, ! stepsize = STEPSIZE, tabsize = TABSIZE): ! pi = PythonIndenter(input, output, stepsize, tabsize) ! pi.eliminate() ! # end def eliminate_filter def reformat_filter(input = sys.stdin, output = sys.stdout, ! stepsize = STEPSIZE, tabsize = TABSIZE): ! pi = PythonIndenter(input, output, stepsize, tabsize) pi.reformat() # end def reformat_filter --- 337,354 ---- def complete_filter(input = sys.stdin, output = sys.stdout, ! stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS): ! pi = PythonIndenter(input, output, stepsize, tabsize, expandtabs) pi.complete() # end def complete_filter ! def delete_filter(input= sys.stdin, output = sys.stdout, ! stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS): ! pi = PythonIndenter(input, output, stepsize, tabsize, expandtabs) ! pi.delete() ! # end def delete_filter def reformat_filter(input = sys.stdin, output = sys.stdout, ! stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS): ! pi = PythonIndenter(input, output, stepsize, tabsize, expandtabs) pi.reformat() # end def reformat_filter *************** *** 387,417 **** # end class StringWriter ! def complete_string(source, stepsize = STEPSIZE, tabsize = TABSIZE): input = StringReader(source) output = StringWriter() ! pi = PythonIndenter(input, output, stepsize, tabsize) pi.complete() return output.getvalue() # end def complete_string ! def eliminate_string(source, stepsize = STEPSIZE, tabsize = TABSIZE): input = StringReader(source) output = StringWriter() ! pi = PythonIndenter(input, output, stepsize, tabsize) ! pi.eliminate() return output.getvalue() ! # end def eliminate_string ! def reformat_string(source, stepsize = STEPSIZE, tabsize = TABSIZE): input = StringReader(source) output = StringWriter() ! pi = PythonIndenter(input, output, stepsize, tabsize) pi.reformat() return output.getvalue() # end def reformat_string ! def complete_file(filename, stepsize = STEPSIZE, tabsize = TABSIZE): source = open(filename, 'r').read() ! result = complete_string(source, stepsize, tabsize) if source == result: return 0 # end if --- 398,428 ---- # end class StringWriter ! def complete_string(source, stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS): input = StringReader(source) output = StringWriter() ! pi = PythonIndenter(input, output, stepsize, tabsize, expandtabs) pi.complete() return output.getvalue() # end def complete_string ! def delete_string(source, stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS): input = StringReader(source) output = StringWriter() ! pi = PythonIndenter(input, output, stepsize, tabsize, expandtabs) ! pi.delete() return output.getvalue() ! # end def delete_string ! def reformat_string(source, stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS): input = StringReader(source) output = StringWriter() ! pi = PythonIndenter(input, output, stepsize, tabsize, expandtabs) pi.reformat() return output.getvalue() # end def reformat_string ! def complete_file(filename, stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS): source = open(filename, 'r').read() ! result = complete_string(source, stepsize, tabsize, expandtabs) if source == result: return 0 # end if *************** *** 426,432 **** # end def complete_file ! def eliminate_file(filename, stepsize = STEPSIZE, tabsize = TABSIZE): source = open(filename, 'r').read() ! result = eliminate_string(source, stepsize, tabsize) if source == result: return 0 # end if --- 437,443 ---- # end def complete_file ! def delete_file(filename, stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS): source = open(filename, 'r').read() ! result = delete_string(source, stepsize, tabsize, expandtabs) if source == result: return 0 # end if *************** *** 439,447 **** f.close() return 1 ! # end def eliminate_file ! def reformat_file(filename, stepsize = STEPSIZE, tabsize = TABSIZE): source = open(filename, 'r').read() ! result = reformat_string(source, stepsize, tabsize) if source == result: return 0 # end if --- 450,458 ---- f.close() return 1 ! # end def delete_file ! def reformat_file(filename, stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS): source = open(filename, 'r').read() ! result = reformat_string(source, stepsize, tabsize, expandtabs) if source == result: return 0 # end if *************** *** 459,468 **** usage = """ ! usage: pindent (-c|-e|-r) [-s stepsize] [-t tabsize] [file] ... -c : complete a correctly indented program (add #end directives) ! -e : eliminate #end directives -r : reformat a completed program (use #end directives) -s stepsize: indentation step (default %(STEPSIZE)d) -t tabsize : the worth in spaces of a tab (default %(TABSIZE)d) [file] ... : files are changed in place, with backups in file~ If no files are specified or a single - is given, --- 470,480 ---- usage = """ ! usage: pindent (-c|-d|-r) [-s stepsize] [-t tabsize] [-e] [file] ... -c : complete a correctly indented program (add #end directives) ! -d : delete #end directives -r : reformat a completed program (use #end directives) -s stepsize: indentation step (default %(STEPSIZE)d) -t tabsize : the worth in spaces of a tab (default %(TABSIZE)d) + -e : expand TABs into spaces (defailt OFF) [file] ... : files are changed in place, with backups in file~ If no files are specified or a single - is given, *************** *** 470,477 **** """ % vars() def test(): import getopt try: ! opts, args = getopt.getopt(sys.argv[1:], 'cers:t:') except getopt.error, msg: sys.stderr.write('Error: %s\n' % msg) --- 482,495 ---- """ % vars() + def error_both(op1, op2): + sys.stderr.write('Error: You can not specify both '+op1+' and -'+op2[0]+' at the same time\n') + sys.stderr.write(usage) + sys.exit(2) + # end def error_both + def test(): import getopt try: ! opts, args = getopt.getopt(sys.argv[1:], 'cdrs:t:e') except getopt.error, msg: sys.stderr.write('Error: %s\n' % msg) *************** *** 482,491 **** stepsize = STEPSIZE tabsize = TABSIZE for o, a in opts: if o == '-c': action = 'complete' ! elif o == '-e': ! action = 'eliminate' elif o == '-r': action = 'reformat' elif o == '-s': --- 500,516 ---- stepsize = STEPSIZE tabsize = TABSIZE + expandtabs = EXPANDTABS for o, a in opts: if o == '-c': + if action: error_both(o, action) + # end if action = 'complete' ! elif o == '-d': ! if action: error_both(o, action) ! # end if ! action = 'delete' elif o == '-r': + if action: error_both(o, action) + # end if action = 'reformat' elif o == '-s': *************** *** 493,501 **** elif o == '-t': tabsize = string.atoi(a) # end if # end for if not action: sys.stderr.write( ! 'You must specify -c(omplete), -e(eliminate) or -r(eformat)\n') sys.stderr.write(usage) sys.exit(2) --- 518,528 ---- elif o == '-t': tabsize = string.atoi(a) + elif o == '-e': + expandtabs = 1 # end if # end for if not action: sys.stderr.write( ! 'You must specify -c(omplete), -d(elete) or -r(eformat)\n') sys.stderr.write(usage) sys.exit(2) *************** *** 503,511 **** if not args or args == ['-']: action = eval(action + '_filter') ! action(sys.stdin, sys.stdout, stepsize, tabsize) else: action = eval(action + '_file') for file in args: ! action(file, stepsize, tabsize) # end for # end if --- 530,538 ---- if not args or args == ['-']: action = eval(action + '_filter') ! action(sys.stdin, sys.stdout, stepsize, tabsize, expandtabs) else: action = eval(action + '_file') for file in args: ! action(file, stepsize, tabsize, expandtabs) # end for # end if From python-dev@python.org Tue Jul 11 18:40:33 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Tue, 11 Jul 2000 10:40:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.115,1.116 Message-ID: <200007111740.KAA06683@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6582 Modified Files: socketmodule.c Log Message: fixed a warning in getsockaddrlen Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.115 retrieving revision 1.116 diff -C2 -r1.115 -r1.116 *** socketmodule.c 2000/07/09 15:09:56 1.115 --- socketmodule.c 2000/07/11 17:40:30 1.116 *************** *** 576,580 **** static int ! getsockaddrlen(PySocketSockObject *s, int *len_ret) { switch (s->sock_family) { --- 576,580 ---- static int ! getsockaddrlen(PySocketSockObject *s, unsigned int *len_ret) { switch (s->sock_family) { From python-dev@python.org Tue Jul 11 18:53:03 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 10:53:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_exceptions,1.3,1.4 Message-ID: <200007111753.KAA07953@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv7915/Lib/test/output Modified Files: test_exceptions Log Message: Create two new exceptions: IndentationError and TabError. These are used for indentation related errors. This patch includes Ping's improvements for indentation-related error messages. Closes SourceForge patches #100734 and #100856. Index: test_exceptions =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_exceptions,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_exceptions 2000/06/25 10:44:57 1.3 --- test_exceptions 2000/07/11 17:52:59 1.4 *************** *** 29,32 **** --- 29,36 ---- SyntaxError spam + IndentationError + spam + TabError + spam SystemError (hard to reproduce) From python-dev@python.org Tue Jul 11 18:53:03 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 10:53:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include errcode.h,2.11,2.12 parsetok.h,2.13,2.14 Message-ID: <200007111753.KAA07951@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv7915/Include Modified Files: errcode.h parsetok.h Log Message: Create two new exceptions: IndentationError and TabError. These are used for indentation related errors. This patch includes Ping's improvements for indentation-related error messages. Closes SourceForge patches #100734 and #100856. Index: errcode.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/errcode.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** errcode.h 2000/06/30 23:58:04 2.11 --- errcode.h 2000/07/11 17:52:59 2.12 *************** *** 31,36 **** #define E_DONE 16 /* Parsing complete */ #define E_ERROR 17 /* Execution error */ ! #define E_INDENT 18 /* Invalid indentation detected */ ! #define E_OVERFLOW 19 /* Node had too many children */ #ifdef __cplusplus --- 31,38 ---- #define E_DONE 16 /* Parsing complete */ #define E_ERROR 17 /* Execution error */ ! #define E_TABSPACE 18 /* Invalid indentation detected */ ! #define E_OVERFLOW 19 /* Node had too many children */ ! #define E_TOODEEP 20 /* Too many indentation levels */ ! #define E_DEDENT 21 /* No matching outer block for dedent */ #ifdef __cplusplus Index: parsetok.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/parsetok.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** parsetok.h 2000/07/08 23:37:28 2.13 --- parsetok.h 2000/07/11 17:52:59 2.14 *************** *** 23,26 **** --- 23,28 ---- int offset; char *text; + int token; + int expected; } perrdetail; From python-dev@python.org Tue Jul 11 18:53:03 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 10:53:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser parser.c,2.14,2.15 parser.h,2.12,2.13 parsetok.c,2.21,2.22 tokenizer.c,2.45,2.46 Message-ID: <200007111753.KAA07954@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv7915/Parser Modified Files: parser.c parser.h parsetok.c tokenizer.c Log Message: Create two new exceptions: IndentationError and TabError. These are used for indentation related errors. This patch includes Ping's improvements for indentation-related error messages. Closes SourceForge patches #100734 and #100856. Index: parser.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parser.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** parser.c 2000/07/09 03:09:56 2.14 --- parser.c 2000/07/11 17:52:59 2.15 *************** *** 206,214 **** int ! PyParser_AddToken(ps, type, str, lineno) register parser_state *ps; register int type; char *str; int lineno; { register int ilabel; --- 206,215 ---- int ! PyParser_AddToken(ps, type, str, lineno, expected_ret) register parser_state *ps; register int type; char *str; int lineno; + int *expected_ret; { register int ilabel; *************** *** 286,289 **** --- 287,299 ---- /* Stuck, report syntax error */ D(printf(" Error.\n")); + if (expected_ret) { + if (s->s_lower == s->s_upper - 1) { + /* Only one possible expected token */ + *expected_ret = ps->p_grammar-> + g_ll.ll_label[s->s_lower].lb_type; + } + else + *expected_ret = -1; + } return E_SYNTAX; } Index: parser.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parser.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** parser.h 2000/07/09 03:09:56 2.12 --- parser.h 2000/07/11 17:52:59 2.13 *************** *** 39,43 **** parser_state *PyParser_New(grammar *g, int start); void PyParser_Delete(parser_state *ps); ! int PyParser_AddToken(parser_state *ps, int type, char *str, int lineno); void PyGrammar_AddAccelerators(grammar *g); --- 39,44 ---- parser_state *PyParser_New(grammar *g, int start); void PyParser_Delete(parser_state *ps); ! int PyParser_AddToken(parser_state *ps, int type, char *str, int lineno, ! int *expected_ret); void PyGrammar_AddAccelerators(grammar *g); Index: parsetok.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parsetok.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** parsetok.c 2000/07/09 03:09:56 2.21 --- parsetok.c 2000/07/11 17:52:59 2.22 *************** *** 140,145 **** str[len] = '\0'; if ((err_ret->error = ! PyParser_AddToken(ps, (int)type, str, ! tok->lineno)) != E_OK) { if (err_ret->error != E_DONE) PyMem_DEL(str); --- 140,145 ---- str[len] = '\0'; if ((err_ret->error = ! PyParser_AddToken(ps, (int)type, str, tok->lineno, ! &(err_ret->expected))) != E_OK) { if (err_ret->error != E_DONE) PyMem_DEL(str); Index: tokenizer.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/tokenizer.c,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** tokenizer.c 2000/07/09 03:09:56 2.45 --- tokenizer.c 2000/07/11 17:52:59 2.46 *************** *** 413,423 **** { if (tok->alterror) { ! tok->done = E_INDENT; tok->cur = tok->inp; return 1; } if (tok->altwarning) { ! PySys_WriteStderr("%s: inconsistent tab/space usage\n", ! tok->filename); tok->altwarning = 0; } --- 413,423 ---- { if (tok->alterror) { ! tok->done = E_TABSPACE; tok->cur = tok->inp; return 1; } if (tok->altwarning) { ! PySys_WriteStderr("%s: inconsistent use of tabs and spaces " ! "in indentation\n", tok->filename); tok->altwarning = 0; } *************** *** 485,491 **** /* Indent -- always one */ if (tok->indent+1 >= MAXINDENT) { ! PySys_WriteStderr( ! "excessive indent\n"); ! tok->done = E_TOKEN; tok->cur = tok->inp; return ERRORTOKEN; --- 485,489 ---- /* Indent -- always one */ if (tok->indent+1 >= MAXINDENT) { ! tok->done = E_TOODEEP; tok->cur = tok->inp; return ERRORTOKEN; *************** *** 507,513 **** } if (col != tok->indstack[tok->indent]) { ! PySys_WriteStderr( ! "inconsistent dedent\n"); ! tok->done = E_TOKEN; tok->cur = tok->inp; return ERRORTOKEN; --- 505,509 ---- } if (col != tok->indstack[tok->indent]) { ! tok->done = E_DEDENT; tok->cur = tok->inp; return ERRORTOKEN; From python-dev@python.org Tue Jul 11 18:53:03 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 10:53:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python exceptions.c,1.6,1.7 pythonrun.c,2.101,2.102 Message-ID: <200007111753.KAA07950@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv7915/Python Modified Files: exceptions.c pythonrun.c Log Message: Create two new exceptions: IndentationError and TabError. These are used for indentation related errors. This patch includes Ping's improvements for indentation-related error messages. Closes SourceForge patches #100734 and #100856. Index: exceptions.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** exceptions.c 2000/07/09 22:27:10 1.6 --- exceptions.c 2000/07/11 17:52:59 1.7 *************** *** 69,72 **** --- 69,77 ---- +-- AttributeError\n\ +-- SyntaxError\n\ + | |\n\ + | +-- IndentationError\n\ + | |\n\ + | +-- TabError\n\ + |\n\ +-- TypeError\n\ +-- AssertionError\n\ *************** *** 784,787 **** --- 789,798 ---- MemoryError__doc__[] = "Out of memory."; + static char + IndentationError__doc__[] = "Improper indentation."; + + static char + TabError__doc__[] = "Improper mixture of spaces and tabs."; + *************** *** 818,821 **** --- 829,834 ---- PyObject *PyExc_NotImplementedError; PyObject *PyExc_SyntaxError; + PyObject *PyExc_IndentationError; + PyObject *PyExc_TabError; PyObject *PyExc_SystemError; PyObject *PyExc_SystemExit; *************** *** 879,882 **** --- 892,899 ---- {"SyntaxError", &PyExc_SyntaxError, 0, SyntaxError__doc__, SyntaxError_methods, SyntaxError__classinit__}, + {"IndentationError", &PyExc_IndentationError, &PyExc_SyntaxError, + IndentationError__doc__}, + {"TabError", &PyExc_TabError, &PyExc_IndentationError, + TabError__doc__}, {"AssertionError", &PyExc_AssertionError, 0, AssertionError__doc__}, {"LookupError", &PyExc_LookupError, 0, LookupError__doc__}, Index: pythonrun.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v retrieving revision 2.101 retrieving revision 2.102 diff -C2 -r2.101 -r2.102 *** pythonrun.c 2000/07/09 03:09:56 2.101 --- pythonrun.c 2000/07/11 17:53:00 2.102 *************** *** 15,18 **** --- 15,19 ---- #include "grammar.h" #include "node.h" + #include "token.h" #include "parsetok.h" #include "errcode.h" *************** *** 984,989 **** perrdetail *err; { ! PyObject *v, *w; char *msg = NULL; v = Py_BuildValue("(ziiz)", err->filename, err->lineno, err->offset, err->text); --- 985,991 ---- perrdetail *err; { ! PyObject *v, *w, *errtype; char *msg = NULL; + errtype = PyExc_SyntaxError; v = Py_BuildValue("(ziiz)", err->filename, err->lineno, err->offset, err->text); *************** *** 994,998 **** switch (err->error) { case E_SYNTAX: ! msg = "invalid syntax"; break; case E_TOKEN: --- 996,1010 ---- switch (err->error) { case E_SYNTAX: ! errtype = PyExc_IndentationError; ! if (err->expected == INDENT) ! msg = "expected an indented block"; ! else if (err->token == INDENT) ! msg = "unexpected indent"; ! else if (err->token == DEDENT) ! msg = "unexpected unindent"; ! else { ! errtype = PyExc_SyntaxError; ! msg = "invalid syntax"; ! } break; case E_TOKEN: *************** *** 1010,1014 **** msg = "unexpected EOF while parsing"; break; ! case E_INDENT: msg = "inconsistent use of tabs and spaces in indentation"; break; --- 1022,1027 ---- msg = "unexpected EOF while parsing"; break; ! case E_TABSPACE: ! errtype = PyExc_TabError; msg = "inconsistent use of tabs and spaces in indentation"; break; *************** *** 1016,1019 **** --- 1029,1040 ---- msg = "expression too long"; break; + case E_DEDENT: + errtype = PyExc_IndentationError; + msg = "unindent does not match any outer indentation level"; + break; + case E_TOODEEP: + errtype = PyExc_IndentationError; + msg = "too many levels of indentation"; + break; default: fprintf(stderr, "error=%d\n", err->error); *************** *** 1023,1027 **** w = Py_BuildValue("(sO)", msg, v); Py_XDECREF(v); ! PyErr_SetObject(PyExc_SyntaxError, w); Py_XDECREF(w); } --- 1044,1048 ---- w = Py_BuildValue("(sO)", msg, v); Py_XDECREF(v); ! PyErr_SetObject(errtype, w); Py_XDECREF(w); } From python-dev@python.org Tue Jul 11 18:53:03 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 10:53:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_exceptions.py,1.7,1.8 Message-ID: <200007111753.KAA07952@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv7915/Lib/test Modified Files: test_exceptions.py Log Message: Create two new exceptions: IndentationError and TabError. These are used for indentation related errors. This patch includes Ping's improvements for indentation-related error messages. Closes SourceForge patches #100734 and #100856. Index: test_exceptions.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_exceptions.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** test_exceptions.py 2000/06/20 18:52:57 1.7 --- test_exceptions.py 2000/07/11 17:52:59 1.8 *************** *** 87,90 **** --- 87,98 ---- except SyntaxError: pass + r(IndentationError) + + r(TabError) + # can only be tested under -tt, and is the only test for -tt + #try: compile("try:\n\t1/0\n \t1/0\nfinally:\n pass\n", '', 'exec') + #except TabError: pass + #else: raise TestFailed + r(SystemError) print '(hard to reproduce)' From python-dev@python.org Tue Jul 11 20:43:50 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 12:43:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/ref ref5.tex,1.29,1.30 Message-ID: <200007111943.MAA31126@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ref In directory slayer.i.sourceforge.net:/tmp/cvs-serv31113/ref Modified Files: ref5.tex Log Message: Moshe Zadka : Update the "in" / "not in" description to accomodate the current use of the __contains__() discipline. This patch also incorporates suggestions from Marc-Andre Lemburg , minor markup revisions from Fred Drake, and some rewording of the first affected paragraph (also from Fred). Closes SourceForge patch #100831. Index: ref5.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref5.tex,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** ref5.tex 2000/04/25 21:09:10 1.29 --- ref5.tex 2000/07/11 19:43:47 1.30 *************** *** 741,752 **** \end{itemize} ! The operators \keyword{in} and \keyword{not in} test for sequence ! membership: if \var{y} is a sequence, \code{\var{x} in \var{y}} is ! true if and only if there exists an index \var{i} such that ! \code{\var{x} = \var{y}[\var{i}]}. ! \code{\var{x} not in \var{y}} yields the inverse truth value. The ! exception \exception{TypeError} is raised when \var{y} is not a sequence, ! or when \var{y} is a string and \var{x} is not a string of length ! one.\footnote{The latter restriction is sometimes a nuisance.} \opindex{in} \opindex{not in} --- 741,773 ---- \end{itemize} ! The operators \keyword{in} and \keyword{not in} test for set ! membership: every type can define membership in whatever way is ! appropriate. Traditionally, this interface has been tightly bound ! the sequence interface, which is related in that presence in a sequence ! can be usefully interpreted as membership in a set. ! ! For the list, tuple types, \code{\var{x} in \var{y}} is true if and only ! if there exists such an index \var{i} such that ! \code{var{x} == \var{y}[\var{i}]} is true. ! ! For the Unicode and string types, \code{\var{x} in \var{y}} is true if and only ! if there exists such an index \var{i} such that ! \code{var{x} == \var{y}[\var{i}]} is true. If \code{\var{x}} is not ! a string of length \code{1} or a unicode object of length \code{1}, ! a \exception{TypeError} exception is raised. ! ! For user-defined classes which define the \method{__contains__()} method, ! \code{\var{x} in \var{y}} is true if and only if ! \code{\var{y}.__contains__(\var{x})} is true. ! ! For user-defined classes which do not define \method{__contains__()} and ! do define \var{__getitem__}, \code{\var{x} in \var{y}} is true if and only ! if there is a non-negative integer index \var{i} such that ! \code{\var{x} == \var{y}[\var{i}]}, and all lower integer indices ! do not raise \exception{IndexError} exception. (If any other exception ! is raised, it is as if \keyword{in} raised that exception). ! ! The operator \keyword{not in} is defined to have the inverse true value ! of \keyword{in}. \opindex{in} \opindex{not in} From python-dev@python.org Tue Jul 11 20:49:25 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 12:49:25 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include errcode.h,2.12,2.13 Message-ID: <200007111949.MAA31487@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv31477/Include Modified Files: errcode.h Log Message: Fix incomplete merge of Ping's SyntaxError enhancement patch (my fault). Comment change only. Index: errcode.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/errcode.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** errcode.h 2000/07/11 17:52:59 2.12 --- errcode.h 2000/07/11 19:49:15 2.13 *************** *** 31,35 **** #define E_DONE 16 /* Parsing complete */ #define E_ERROR 17 /* Execution error */ ! #define E_TABSPACE 18 /* Invalid indentation detected */ #define E_OVERFLOW 19 /* Node had too many children */ #define E_TOODEEP 20 /* Too many indentation levels */ --- 31,35 ---- #define E_DONE 16 /* Parsing complete */ #define E_ERROR 17 /* Execution error */ ! #define E_TABSPACE 18 /* Inconsistent mixing of tabs and spaces */ #define E_OVERFLOW 19 /* Node had too many children */ #define E_TOODEEP 20 /* Too many indentation levels */ From python-dev@python.org Tue Jul 11 21:30:08 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 11 Jul 2000 13:30:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules linuxaudiodev.c,2.3,2.4 Message-ID: <200007112030.NAA08476@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8436/Modules Modified Files: linuxaudiodev.c Log Message: satisfy the -Wall: remove two unused local variables and unused ins function Index: linuxaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/linuxaudiodev.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** linuxaudiodev.c 2000/07/08 06:05:58 2.3 --- linuxaudiodev.c 2000/07/11 20:30:05 2.4 *************** *** 65,70 **** char *mode; char *basedev; - char *ctldev; - char *opendev; /* Check arg for r/w/rw */ --- 65,68 ---- *************** *** 385,399 **** { 0, 0 }, }; - - static int - ins(PyObject *d, char *symbol, long value) - { - PyObject* v = PyInt_FromLong(value); - if (!v || PyDict_SetItemString(d, symbol, v) < 0) - return -1; /* triggers fatal error */ - - Py_DECREF(v); - return 0; - } void --- 383,386 ---- From python-dev@python.org Tue Jul 11 21:55:40 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 11 Jul 2000 13:55:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test string_tests.py,1.2,1.3 Message-ID: <200007112055.NAA10428@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv10345/Lib/test Modified Files: string_tests.py Log Message: small updates to string_join: use PyString_AS_STRING macro on local string object when resizing string, make sure resized string will always be big enough split string containing error message across two lines add test to string_tests that causes resizing Index: string_tests.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/string_tests.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** string_tests.py 2000/07/11 03:31:55 1.2 --- string_tests.py 2000/07/11 20:55:38 1.3 *************** *** 124,127 **** --- 124,130 ---- test('join', '.', u'a.b.c', ['a', 'b', u'c']) test('join', '.', TypeError, ['a', u'b', 3]) + for i in [5, 25, 125]: + test('join', '-', ((('a' * i) + '-') * i)[:-1], + ['a' * i] * i) test('join', ' ', TypeError, BadSeq1()) From python-dev@python.org Tue Jul 11 21:55:40 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 11 Jul 2000 13:55:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.79,2.80 Message-ID: <200007112055.NAA10427@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv10345/Objects Modified Files: stringobject.c Log Message: small updates to string_join: use PyString_AS_STRING macro on local string object when resizing string, make sure resized string will always be big enough split string containing error message across two lines add test to string_tests that causes resizing Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.79 retrieving revision 2.80 diff -C2 -r2.79 -r2.80 *** stringobject.c 2000/07/11 04:58:12 2.79 --- stringobject.c 2000/07/11 20:55:38 2.80 *************** *** 744,748 **** int seqlen = 0; int sz = 100; ! int i, slen; PyObject *orig, *seq, *item; --- 744,748 ---- int seqlen = 0; int sz = 100; ! int i, slen, sz_incr; PyObject *orig, *seq, *item; *************** *** 771,775 **** goto finally; ! p = PyString_AsString(res); for (i = 0; i < seqlen; i++) { --- 771,775 ---- goto finally; ! p = PyString_AS_STRING(res); for (i = 0; i < seqlen; i++) { *************** *** 782,786 **** } PyErr_Format(PyExc_TypeError, ! "sequence item %i: expected string, %.80s found", i, item->ob_type->tp_name); goto finally; --- 782,787 ---- } PyErr_Format(PyExc_TypeError, ! "sequence item %i: expected string," ! " %.80s found", i, item->ob_type->tp_name); goto finally; *************** *** 788,796 **** slen = PyString_GET_SIZE(item); while (reslen + slen + seplen >= sz) { ! if (_PyString_Resize(&res, sz*2)) { goto finally; } ! sz *= 2; ! p = PyString_AsString(res) + reslen; } if (i > 0) { --- 789,799 ---- slen = PyString_GET_SIZE(item); while (reslen + slen + seplen >= sz) { ! /* at least double the size of the string */ ! sz_incr = slen + seplen > sz ? slen + seplen : sz; ! if (_PyString_Resize(&res, sz + sz_incr)) { goto finally; } ! sz += sz_incr; ! p = PyString_AS_STRING(res) + reslen; } if (i > 0) { From python-dev@python.org Tue Jul 11 22:35:05 2000 From: python-dev@python.org (Jack Jansen) Date: Tue, 11 Jul 2000 14:35:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules selectmodule.c,2.36,2.37 Message-ID: <200007112135.OAA20326@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv20295 Modified Files: selectmodule.c Log Message: One more include of limits.h (possibly to be moved elsewhere when there is consensus where it should go). Index: selectmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v retrieving revision 2.36 retrieving revision 2.37 diff -C2 -r2.36 -r2.37 *** selectmodule.c 2000/07/10 12:29:26 2.36 --- selectmodule.c 2000/07/11 21:35:02 2.37 *************** *** 22,25 **** --- 22,28 ---- #include #endif + #ifdef HAVE_LIMITS_H + #include + #endif #ifdef __sgi From python-dev@python.org Tue Jul 11 22:47:22 2000 From: python-dev@python.org (Jack Jansen) Date: Tue, 11 Jul 2000 14:47:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects object.c,2.85,2.86 Message-ID: <200007112147.OAA20955@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv20913 Modified Files: object.c Log Message: Include macglue.h on the macintosh, so function prototypes are in scope. Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.85 retrieving revision 2.86 diff -C2 -r2.85 -r2.86 *** object.c 2000/07/09 15:48:49 2.85 --- object.c 2000/07/11 21:47:20 2.86 *************** *** 13,16 **** --- 13,20 ---- #include "Python.h" + #ifdef macintosh + #include "macglue.h" + #endif + #include "mymath.h" From python-dev@python.org Tue Jul 11 22:59:18 2000 From: python-dev@python.org (Jack Jansen) Date: Tue, 11 Jul 2000 14:59:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.183,2.184 import.c,2.140,2.141 pythonrun.c,2.102,2.103 Message-ID: <200007112159.OAA22061@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv21949 Modified Files: ceval.c import.c pythonrun.c Log Message: Include macglue.h for some function prototypes, and renamed a few mac-specific functions to have a PyMac_ name. Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.183 retrieving revision 2.184 diff -C2 -r2.183 -r2.184 *** ceval.c 2000/07/09 03:09:56 2.183 --- ceval.c 2000/07/11 21:59:16 2.184 *************** *** 24,27 **** --- 24,31 ---- #include "opcode.h" + #ifdef macintosh + #include "macglue.h" + #endif + #include Index: import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.140 retrieving revision 2.141 diff -C2 -r2.140 -r2.141 *** import.c 2000/07/09 03:09:56 2.140 --- import.c 2000/07/11 21:59:16 2.141 *************** *** 699,703 **** PySys_WriteStderr("# wrote %s\n", cpathname); #ifdef macintosh ! setfiletype(cpathname, 'Pyth', 'PYC '); #endif } --- 699,703 ---- PySys_WriteStderr("# wrote %s\n", cpathname); #ifdef macintosh ! PyMac_setfiletype(cpathname, 'Pyth', 'PYC '); #endif } Index: pythonrun.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v retrieving revision 2.102 retrieving revision 2.103 diff -C2 -r2.102 -r2.103 *** pythonrun.c 2000/07/11 17:53:00 2.102 --- pythonrun.c 2000/07/11 21:59:16 2.103 *************** *** 35,38 **** --- 35,41 ---- #endif + #ifdef macintosh + #include "macglue.h" + #endif extern char *Py_GetPath(); *************** *** 562,567 **** #ifdef macintosh /* On a mac, we also assume a pyc file for types 'PYC ' and 'APPL' */ ! || getfiletype(filename) == 'PYC ' ! || getfiletype(filename) == 'APPL' #endif /* macintosh */ ) { --- 565,570 ---- #ifdef macintosh /* On a mac, we also assume a pyc file for types 'PYC ' and 'APPL' */ ! || PyMac_getfiletype(filename) == 'PYC ' ! || PyMac_getfiletype(filename) == 'APPL' #endif /* macintosh */ ) { From python-dev@python.org Wed Jul 12 00:00:17 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Tue, 11 Jul 2000 16:00:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.116,1.117 Message-ID: <200007112300.QAA00429@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv32713 Modified Files: socketmodule.c Log Message: Errare humanum est. Changed parameter in getsockaddrlen from unsigned to socklen_t. Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.116 retrieving revision 1.117 diff -C2 -r1.116 -r1.117 *** socketmodule.c 2000/07/11 17:40:30 1.116 --- socketmodule.c 2000/07/11 23:00:12 1.117 *************** *** 576,580 **** static int ! getsockaddrlen(PySocketSockObject *s, unsigned int *len_ret) { switch (s->sock_family) { --- 576,580 ---- static int ! getsockaddrlen(PySocketSockObject *s, socklen_t *len_ret) { switch (s->sock_family) { From python-dev@python.org Wed Jul 12 01:20:48 2000 From: python-dev@python.org (Skip Montanaro) Date: Tue, 11 Jul 2000 17:20:48 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_posixpath,NONE,1.1 Message-ID: <200007120020.RAA17798@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv17791 Added Files: test_posixpath Log Message: new test for posixpath module --- NEW FILE --- test_posixpath No errors. Thank your lucky stars. From python-dev@python.org Wed Jul 12 01:20:21 2000 From: python-dev@python.org (Skip Montanaro) Date: Tue, 11 Jul 2000 17:20:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_posixpath.py,NONE,1.1 Message-ID: <200007120020.RAA17773@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv17757 Added Files: test_posixpath.py Log Message: new test file for posixpath module --- NEW FILE --- import posixpath import string errors = 0 def tester(fn, wantResult): gotResult = eval(fn) if wantResult != gotResult: print "error!" print "evaluated: " + str(fn) print "should be: " + str(wantResult) print " returned: " + str(gotResult) print "" global errors errors = errors + 1 tester('posixpath.splitdrive("/foo/bar")', ('', '/foo/bar')) tester('posixpath.split("/foo/bar")', ('/foo', 'bar')) tester('posixpath.split("/")', ('/', '')) tester('posixpath.split("foo")', ('', 'foo')) tester('posixpath.splitext("foo.ext")', ('foo', '.ext')) tester('posixpath.splitext("/foo/foo.ext")', ('/foo/foo', '.ext')) tester('posixpath.isabs("/")', 1) tester('posixpath.isabs("/foo")', 1) tester('posixpath.isabs("/foo/bar")', 1) tester('posixpath.isabs("foo/bar")', 0) tester('posixpath.commonprefix(["/home/swenson/spam", "/home/swen/spam"])', "/home") tester('posixpath.commonprefix(["/home/swen/spam", "/home/swen/eggs"])', "/home/swen") tester('posixpath.commonprefix(["/home/swen/spam", "/home/swen/spam"])', "/home/swen/spam") if errors: print str(errors) + " errors." else: print "No errors. Thank your lucky stars." From python-dev@python.org Wed Jul 12 01:49:20 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Tue, 11 Jul 2000 17:49:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules regexmodule.c,1.37,1.38 Message-ID: <200007120049.RAA19213@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv19203 Modified Files: regexmodule.c Log Message: Fix mixed mallocs: re->re_patbuf.buffer is allocated with std malloc(). Index: regexmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/regexmodule.c,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -r1.37 -r1.38 *** regexmodule.c 2000/07/10 13:05:28 1.37 --- regexmodule.c 2000/07/12 00:49:17 1.38 *************** *** 44,48 **** { if (re->re_patbuf.buffer) ! PyMem_DEL(re->re_patbuf.buffer); Py_XDECREF(re->re_translate); Py_XDECREF(re->re_lastok); --- 44,48 ---- { if (re->re_patbuf.buffer) ! free(re->re_patbuf.buffer); Py_XDECREF(re->re_translate); Py_XDECREF(re->re_lastok); From python-dev@python.org Wed Jul 12 01:53:44 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 11 Jul 2000 17:53:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules pyexpat.c,2.8,2.9 Message-ID: <200007120053.RAA19535@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv19519 Modified Files: pyexpat.c Log Message: Patch #100854 from jhylton: eliminate compiler warnings in pyexpat: The first two warnings seem harmless enough, but the last one looks like a potential bug: an uninitialized int is returned on error. (I also ended up reformatting some of the code, because it was hard to read.) Index: pyexpat.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pyexpat.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** pyexpat.c 2000/07/04 23:51:31 2.8 --- pyexpat.c 2000/07/12 00:53:41 2.9 *************** *** 71,102 **** /* Convert an array of attributes and their values into a Python dict */ ! static PyObject *conv_atts_using_string( XML_Char **atts){ ! PyObject *attrs_obj=NULL; ! XML_Char **attrs_p, **attrs_k; int attrs_len; PyObject *rv; ! if( (attrs_obj = PyDict_New()) == NULL ) goto finally; ! for(attrs_len=0, attrs_p = atts; ! *attrs_p; ! attrs_p++, attrs_len++) { ! if (attrs_len%2) { ! rv=PyString_FromString(*attrs_p); if (! rv) { Py_DECREF(attrs_obj); ! attrs_obj=NULL; goto finally; } ! if (PyDict_SetItemString( ! attrs_obj, ! (char*)*attrs_k, rv) < 0){ Py_DECREF(attrs_obj); ! attrs_obj=NULL; goto finally; } Py_DECREF(rv); } ! else attrs_k=attrs_p; } finally: --- 71,103 ---- /* Convert an array of attributes and their values into a Python dict */ ! static PyObject *conv_atts_using_string(XML_Char **atts) ! { ! PyObject *attrs_obj = NULL; ! XML_Char **attrs_p, **attrs_k = NULL; int attrs_len; PyObject *rv; ! if ((attrs_obj = PyDict_New()) == NULL) goto finally; ! for (attrs_len = 0, attrs_p = atts; ! *attrs_p; ! attrs_p++, attrs_len++) { ! if (attrs_len % 2) { ! rv = PyString_FromString(*attrs_p); if (! rv) { Py_DECREF(attrs_obj); ! attrs_obj = NULL; goto finally; } ! if (PyDict_SetItemString(attrs_obj, ! (char*)*attrs_k, rv) < 0) { Py_DECREF(attrs_obj); ! attrs_obj = NULL; goto finally; } Py_DECREF(rv); } ! else ! attrs_k = attrs_p; } finally: *************** *** 107,111 **** static PyObject *conv_atts_using_unicode( XML_Char **atts){ PyObject *attrs_obj=NULL; ! XML_Char **attrs_p, **attrs_k; int attrs_len; --- 108,112 ---- static PyObject *conv_atts_using_unicode( XML_Char **atts){ PyObject *attrs_obj=NULL; ! XML_Char **attrs_p, **attrs_k = NULL; int attrs_len; *************** *** 446,454 **** PyObject *bytes=NULL; PyObject *str=NULL; ! int len; UNLESS(bytes = PyInt_FromLong(buf_size)) { if (!PyErr_Occurred()) ! PyErr_SetNone(PyExc_EOFError); goto finally; } --- 447,455 ---- PyObject *bytes=NULL; PyObject *str=NULL; ! int len = 0; UNLESS(bytes = PyInt_FromLong(buf_size)) { if (!PyErr_Occurred()) ! PyErr_SetNone(PyExc_EOFError); goto finally; } *************** *** 468,474 **** goto finally; ! len=PyString_GET_SIZE( str ); ! strncpy( buf, PyString_AsString(str), len ); ! Py_XDECREF( str ); finally: return len; --- 469,475 ---- goto finally; ! len = PyString_GET_SIZE(str); ! strncpy(buf, PyString_AsString(str), len); ! Py_XDECREF(str); finally: return len; From python-dev@python.org Wed Jul 12 02:27:21 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 11 Jul 2000 18:27:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules pyexpat.c,2.9,2.10 Message-ID: <200007120127.SAA27857@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv27849 Modified Files: pyexpat.c Log Message: Fix bugs in readinst(): * There was no error reported if the .read() method returns a non-string * If read() returned too much data, the buffer would be overflowed causing a core dump * Used strncpy, not memcpy, which seems incorrect if there are embedded \0s. * The args and bytes objects were leaked Index: pyexpat.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pyexpat.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** pyexpat.c 2000/07/12 00:53:41 2.9 --- pyexpat.c 2000/07/12 01:27:18 2.10 *************** *** 447,451 **** PyObject *bytes=NULL; PyObject *str=NULL; ! int len = 0; UNLESS(bytes = PyInt_FromLong(buf_size)) { --- 447,451 ---- PyObject *bytes=NULL; PyObject *str=NULL; ! int len = -1; UNLESS(bytes = PyInt_FromLong(buf_size)) { *************** *** 459,463 **** goto finally; - Py_INCREF(bytes); if (PyTuple_SetItem(arg, 0, bytes) < 0) goto finally; --- 459,462 ---- *************** *** 466,476 **** goto finally; ! UNLESS(PyString_Check( str )) goto finally; ! len = PyString_GET_SIZE(str); ! strncpy(buf, PyString_AsString(str), len); Py_XDECREF(str); finally: return len; } --- 465,489 ---- goto finally; ! /* XXX what to do if it returns a Unicode string? */ ! UNLESS(PyString_Check( str )) { ! PyErr_Format(PyExc_TypeError, ! "read() did not return a string object (type=%.400s)", ! str->ob_type->tp_name); goto finally; ! } ! len = PyString_GET_SIZE(str); ! if (len > buf_size) { ! PyErr_Format(PyExc_ValueError, ! "read() returned too much data: " ! "%i bytes requested, %i returned", ! buf_size, len); ! Py_DECREF(str); ! goto finally; ! } ! memcpy(buf, PyString_AsString(str), len); Py_XDECREF(str); finally: + Py_XDECREF(arg); return len; } *************** *** 513,524 **** if( fp ){ bytes_read=fread( buf, sizeof( char ), BUF_SIZE, fp); ! }else{ bytes_read=readinst( buf, BUF_SIZE, readmethod ); } - if (bytes_read < 0) { - PyErr_SetFromErrno(PyExc_IOError); - return NULL; - } rv=XML_ParseBuffer(self->itself, bytes_read, bytes_read == 0); if( PyErr_Occurred() ){ --- 526,539 ---- if( fp ){ bytes_read=fread( buf, sizeof( char ), BUF_SIZE, fp); ! if (bytes_read < 0) { ! PyErr_SetFromErrno(PyExc_IOError); ! return NULL; ! } ! } else { bytes_read=readinst( buf, BUF_SIZE, readmethod ); + if (bytes_read < 0) + return NULL; } rv=XML_ParseBuffer(self->itself, bytes_read, bytes_read == 0); if( PyErr_Occurred() ){ From python-dev@python.org Wed Jul 12 03:56:17 2000 From: python-dev@python.org (Eric S. Raymond) Date: Tue, 11 Jul 2000 19:56:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcmd.tex,1.4,1.5 Message-ID: <200007120256.TAA06844@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv6745 Modified Files: libcmd.tex Log Message: Resynchronize the TeX docs with (a) the module docstring, and (b) my recent fix to the code to make it behave like the module docstring. Index: libcmd.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcmd.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** libcmd.tex 1998/08/10 19:41:40 1.4 --- libcmd.tex 2000/07/12 02:56:15 1.5 *************** *** 44,50 **** An interpreter instance will recognize a command name \samp{foo} if and only if it has a method \method{do_foo()}. As a special case, ! a line containing only the character \character{?} is dispatched to the method \method{do_help()}. As another special case, a line ! containing only the character \character{!} is dispatched to the method \method{do_shell} (if such a method is defined). --- 44,50 ---- An interpreter instance will recognize a command name \samp{foo} if and only if it has a method \method{do_foo()}. As a special case, ! a line beginning with the character \character{?} is dispatched to the method \method{do_help()}. As another special case, a line ! beginning with the character \character{!} is dispatched to the method \method{do_shell} (if such a method is defined). From python-dev@python.org Wed Jul 12 03:58:30 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 11 Jul 2000 19:58:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.80,2.81 Message-ID: <200007120258.TAA06976@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv6953 Modified Files: stringobject.c Log Message: Fix typo in error message Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.80 retrieving revision 2.81 diff -C2 -r2.80 -r2.81 *** stringobject.c 2000/07/11 20:55:38 2.80 --- stringobject.c 2000/07/12 02:58:28 2.81 *************** *** 177,181 **** if (!PyString_Check(str)) { PyErr_Format(PyExc_TypeError, ! "decoder did not return an string object (type=%.400s)", str->ob_type->tp_name); Py_DECREF(str); --- 177,181 ---- if (!PyString_Check(str)) { PyErr_Format(PyExc_TypeError, ! "decoder did not return a string object (type=%.400s)", str->ob_type->tp_name); Py_DECREF(str); From python-dev@python.org Wed Jul 12 04:02:19 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Tue, 11 Jul 2000 20:02:19 -0700 Subject: [Python-checkins] CVS: python/dist/src configure.in,1.134,1.135 Message-ID: <200007120302.UAA13467@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv12123 Modified Files: configure.in Log Message: Checks whether right shift extends the sign bit. Patch by Thomas Wouters with small changes of mine (in main(), use return instead of exit). Closes patch #100832 (but I can't assign it to myself, nor close it -- sorry) Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.134 retrieving revision 1.135 diff -C2 -r1.134 -r1.135 *** configure.in 2000/07/09 14:39:29 1.134 --- configure.in 2000/07/12 03:02:16 1.135 *************** *** 1137,1140 **** --- 1137,1153 ---- AC_C_BIGENDIAN + # Check whether right shifting a negative integer extends the sign bit + # or fills with zeros (like the Cray J90, according to Tim Peters). + AC_MSG_CHECKING(whether right shift extends the sign bit) + AC_TRY_RUN([ + int main() + { + return ((-1)>>3 == -1) ? 1 : 0; + } + ], + [AC_DEFINE(SIGNED_RIGHT_SHIFT_ZERO_FILLS) + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)]) + # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! # Add sys/socket.h to confdefs.h From python-dev@python.org Wed Jul 12 04:02:45 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Tue, 11 Jul 2000 20:02:45 -0700 Subject: [Python-checkins] CVS: python/dist/src configure,1.125,1.126 Message-ID: <200007120302.UAA13892@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv13877 Modified Files: configure Log Message: Checks whether right shift extends the sign bit. Patch by Thomas Wouters with small changes of mine (in main(), use return instead of exit). Closes patch #100832 Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.125 retrieving revision 1.126 diff -C2 -r1.125 -r1.126 *** configure 2000/07/09 14:39:28 1.125 --- configure 2000/07/12 03:02:43 1.126 *************** *** 1,8 **** #! /bin/sh ! # From configure.in Revision: 1.133 # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.14.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # --- 1,8 ---- #! /bin/sh [...3989 lines suppressed...] ! echo "$CONFIG_STATUS generated by autoconf version 2.14.1" exit 0 ;; -help | --help | --hel | --he | --h) --- 5767,5771 ---- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) *************** *** 6058,6061 **** chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 --- 6066,6069 ---- chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 From python-dev@python.org Wed Jul 12 04:38:37 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 11 Jul 2000 20:38:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/curses textpad.py,1.3,1.4 Message-ID: <200007120338.UAA15715@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/curses In directory slayer.i.sourceforge.net:/tmp/cvs-serv15696 Modified Files: textpad.py Log Message: Remove extra argument to method call Index: textpad.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/curses/textpad.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** textpad.py 2000/07/11 10:38:24 1.3 --- textpad.py 2000/07/12 03:38:34 1.4 *************** *** 89,93 **** elif ch == ascii.ENQ: # ^e if self.stripspaces: ! self.win.move(y, self.firstblank(y, maxx)) else: self.win.move(y, self.maxx) --- 89,93 ---- elif ch == ascii.ENQ: # ^e if self.stripspaces: ! self.win.move(y, self.firstblank(y)) else: self.win.move(y, self.maxx) From python-dev@python.org Wed Jul 12 05:02:13 2000 From: python-dev@python.org (Tim Peters) Date: Tue, 11 Jul 2000 21:02:13 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python exceptions.c,1.7,1.8 Message-ID: <200007120402.VAA23494@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv21690/python/dist/src/python Modified Files: exceptions.c Log Message: Worm around MSVC6 error on single string literal > 2Kb. Index: exceptions.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** exceptions.c 2000/07/11 17:52:59 1.7 --- exceptions.c 2000/07/12 04:02:10 1.8 *************** *** 21,24 **** --- 21,28 ---- #include "Python.h" + /* Caution: MS Visual C++ 6 errors if a single string literal exceeds + * 2Kb. So the module docstring has been broken roughly in half, using + * compile-time literal concatenation. + */ static char module__doc__[] = *************** *** 42,47 **** inserted into both the exceptions module and the `built-in' module. It is\n\ recommended that user defined class based exceptions be derived from the\n\ ! `Exception' class, although this is currently not enforced.\n\ ! \n\ Exception\n\ |\n\ --- 46,52 ---- inserted into both the exceptions module and the `built-in' module. It is\n\ recommended that user defined class based exceptions be derived from the\n\ ! `Exception' class, although this is currently not enforced.\n" ! /* keep string pieces "small" */ ! "\n\ Exception\n\ |\n\ From python-dev@python.org Wed Jul 12 05:22:55 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 21:22:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile.deps,1.37,1.38 Message-ID: <200007120422.VAA24501@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv24488 Modified Files: Makefile.deps Log Message: Documentation for the gc module. Text from Neil Schemenauer , markup & minor revisions from Fred Drake. Index: Makefile.deps =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile.deps,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -r1.37 -r1.38 *** Makefile.deps 2000/07/07 03:36:11 1.37 --- Makefile.deps 2000/07/12 04:22:53 1.38 *************** *** 49,52 **** --- 49,53 ---- ../lib/libpython.tex \ ../lib/libsys.tex \ + ../lib/libgc.tex \ ../lib/libtypes.tex \ ../lib/libtraceback.tex \ From python-dev@python.org Wed Jul 12 05:22:55 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 21:22:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libgc.tex,NONE,1.1 lib.tex,1.157,1.158 Message-ID: <200007120422.VAA24505@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv24488/lib Modified Files: lib.tex Added Files: libgc.tex Log Message: Documentation for the gc module. Text from Neil Schemenauer , markup & minor revisions from Fred Drake. --- NEW FILE --- \section{\module{gc} --- Garbage Collector interface} \declaremodule{extension}{gc} \moduleauthor{Neil Schemenauer}{nascheme@enme.ucalgary.ca} \sectionauthor{Neil Schemenauer}{nascheme@enme.ucalgary.ca} This module provides an interface to the optional garbage collector. It provides the ability to disable the collector, tune the collection frequency, and set debugging options. It also provides access to unreachable objects that the collector found but cannot free. Since the collector supplements the reference counting already used in Python, you can disable the collector if you are sure your program does not create reference cycles. The collector can be disabled by calling \code{gc.set_threshold(0)}. To debug a leaking program call \code{gc.set_debug(gc.DEBUG_LEAK)}. The \module{gc} module provides the following functions: \begin{funcdesc}{collect}{} Run a full collection. All generations are examined and the number of unreachable objects found is returned. \end{funcdesc} \begin{funcdesc}{set_debug}{flags} Set the garbage collection debugging flags. Debugging information will be written to \code{sys.stderr}. See below for a list of debugging flags which can be combined using bit operations to control debugging. \end{funcdesc} \begin{funcdesc}{get_debug}{} Return the debugging flags currently set. \end{funcdesc} \begin{funcdesc}{set_threshold}{threshold0\optional{, threshold1\optional{, threshold2}}} Set the garbage collection thresholds (the collection frequency). Setting \var{threshold0} to zero disables collection. The GC classifies objects into three generations depending on how many collection sweeps they have survived. New objects are placed in the youngest generation (generation \code{0}). If an object survives a collection it is moved into the next older generation. Since generation \code{2} is the oldest generation, objects in that generation remain there after a collection. In order to decide when to run, the collector keeps track of the number object allocations and deallocations since the last collection. When the number of allocations minus the number of deallocations exceeds \var{threshold0}, collection starts. Initially only generation \code{0} is examined. If generation \code{0} has been examined more than \var{threshold1} times since generation \code{1} has been examined, then generation \code{1} is examined as well. Similarly, \var{threshold2} controls the number of collections of generation \code{1} before collecting generation \code{2}. \end{funcdesc} \begin{funcdesc}{get_threshold}{} Return the current collection thresholds as a tuple of \code{(\var{threshold0}, \var{threshold1}, \var{threshold2})}. \end{funcdesc} The following variable is provided for read-only access: \begin{datadesc}{garbage} A list of objects which the collector found to be unreachable but could not be freed (uncollectable objects). Objects that have \method{__del__()} methods and create part of a reference cycle cause the entire reference cycle to be uncollectable. \end{datadesc} The following constants are provided for use with \function{set_debug()}: \begin{datadesc}{DEBUG_STATS} Print statistics during collection. This information can be useful when tuning the collection frequency. \end{datadesc} \begin{datadesc}{DEBUG_COLLECTABLE} Print information on collectable objects found. \end{datadesc} \begin{datadesc}{DEBUG_UNCOLLECTABLE} Print information of uncollectable objects found (objects which are not reachable but cannot be freed by the collector). These objects will be added to the \code{garbage} list. \end{datadesc} \begin{datadesc}{DEBUG_INSTANCES} When \constant{DEBUG_COLLECTABLE} or \constant{DEBUG_UNCOLLECTABLE} is set, print information about instance objects found. \end{datadesc} \begin{datadesc}{DEBUG_OBJECTS} When \constant{DEBUG_COLLECTABLE} or \constant{DEBUG_UNCOLLECTABLE} is set, print information about objects other than instance objects found. \end{datadesc} \begin{datadesc}{DEBUG_LEAK} The debugging flags necessary for the collector to print information about a leaking program (equal to \code{DEBUG_COLLECTABLE | DEBUG_UNCOLLECTABLE | DEBUG_INSTANCES | DEBUG_OBJECTS}). \end{datadesc} Index: lib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/lib.tex,v retrieving revision 1.157 retrieving revision 1.158 diff -C2 -r1.157 -r1.158 *** lib.tex 2000/07/07 03:36:12 1.157 --- lib.tex 2000/07/12 04:22:53 1.158 *************** *** 74,77 **** --- 74,78 ---- \input{libpython} % Python Services \input{libsys} + \input{libgc} \input{libatexit} \input{libtypes} From python-dev@python.org Wed Jul 12 05:42:26 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 21:42:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules gcmodule.c,2.4,2.5 Message-ID: <200007120442.VAA25434@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv25427/Modules Modified Files: gcmodule.c Log Message: Always use the :funcname part of the format specifier for PyArg_ParseTuple() so we get better error messages. Index: gcmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** gcmodule.c 2000/07/11 14:37:41 2.4 --- gcmodule.c 2000/07/12 04:42:23 2.5 *************** *** 532,536 **** long n; ! if(!PyArg_ParseTuple(args, "")) /* check no args */ return NULL; --- 532,536 ---- long n; ! if (!PyArg_ParseTuple(args, ":collect")) /* check no args */ return NULL; *************** *** 562,566 **** Py_set_debug(PyObject *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, "l", &debug)) return NULL; --- 562,566 ---- Py_set_debug(PyObject *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, "l:get_debug", &debug)) return NULL; *************** *** 578,582 **** Py_get_debug(PyObject *self, PyObject *args) { ! if(!PyArg_ParseTuple(args, "")) /* no args */ return NULL; --- 578,582 ---- Py_get_debug(PyObject *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":get_debug")) /* no args */ return NULL; *************** *** 594,598 **** Py_set_thresh(PyObject *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, "i|ii", &threshold0, &threshold1, &threshold2)) return NULL; --- 594,598 ---- Py_set_thresh(PyObject *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, "i|ii:set_threshold", &threshold0, &threshold1, &threshold2)) return NULL; *************** *** 611,615 **** Py_get_thresh(PyObject *self, PyObject *args) { ! if(!PyArg_ParseTuple(args, "")) /* no args */ return NULL; --- 611,615 ---- Py_get_thresh(PyObject *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":get_threshold")) /* no args */ return NULL; From python-dev@python.org Wed Jul 12 05:49:02 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 21:49:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules pyexpat.c,2.10,2.11 Message-ID: <200007120449.VAA25684@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv25675/Modules Modified Files: pyexpat.c Log Message: Convert coding style to be internally consistent and similar to the rest of the Python C code: space between "if", "for" and "(", no space between "(", ")" and function call parameters, etc. Index: pyexpat.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pyexpat.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** pyexpat.c 2000/07/12 01:27:18 2.10 --- pyexpat.c 2000/07/12 04:49:00 2.11 *************** *** 23,42 **** #define VERSION "1.9" ! enum HandlerTypes{ ! StartElement, ! EndElement, ! ProcessingInstruction, ! CharacterData, ! UnparsedEntityDecl, ! NotationDecl, ! StartNamespaceDecl, [...1422 lines suppressed...] ! pyxml_SetStartCdataSection, ! (xmlhandler)my_StartCdataSectionHandler}, ! {"EndCdataSectionHandler", ! pyxml_SetEndCdataSection, ! (xmlhandler)my_EndCdataSectionHandler}, ! {"DefaultHandler", ! (xmlhandlersetter)XML_SetDefaultHandler, ! (xmlhandler)my_DefaultHandler}, ! {"DefaultHandlerExpand", ! (xmlhandlersetter)XML_SetDefaultHandlerExpand, ! (xmlhandler)my_DefaultHandlerExpandHandler}, ! {"NotStandaloneHandler", ! (xmlhandlersetter)XML_SetNotStandaloneHandler, ! (xmlhandler)my_NotStandaloneHandler}, ! {"ExternalEntityRefHandler", ! (xmlhandlersetter)XML_SetExternalEntityRefHandler, ! (xmlhandler)my_ExternalEntityRefHandler }, ! {NULL, NULL, NULL} /* sentinel */ }; From python-dev@python.org Wed Jul 12 06:04:47 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Tue, 11 Jul 2000 22:04:47 -0700 Subject: [Python-checkins] CVS: python/dist/src configure.in,1.135,1.136 Message-ID: <200007120504.WAA00786@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv774 Modified Files: configure.in Log Message: Second try: checks whether right shift extends the sign bit. Adds caching and reverts back the 'return' to 'exit()' in AC_TRY_RUN as recommended by the Autoconf documentation. Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.135 retrieving revision 1.136 diff -C2 -r1.135 -r1.136 *** configure.in 2000/07/12 03:02:16 1.135 --- configure.in 2000/07/12 05:04:44 1.136 *************** *** 1140,1152 **** # or fills with zeros (like the Cray J90, according to Tim Peters). AC_MSG_CHECKING(whether right shift extends the sign bit) AC_TRY_RUN([ int main() { ! return ((-1)>>3 == -1) ? 1 : 0; } ! ], ! [AC_DEFINE(SIGNED_RIGHT_SHIFT_ZERO_FILLS) ! AC_MSG_RESULT(yes)], ! [AC_MSG_RESULT(no)]) # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! --- 1140,1156 ---- # or fills with zeros (like the Cray J90, according to Tim Peters). AC_MSG_CHECKING(whether right shift extends the sign bit) + AC_CACHE_VAL(ac_cv_rshift_extends_sign, [ AC_TRY_RUN([ int main() { ! exit(((-1)>>3 == -1) ? 0 : 1); } ! ], ac_cv_rshift_extends_sign=yes, ac_cv_rshift_extends_sign=no)]) ! AC_MSG_RESULT($ac_cv_rshift_extends_sign) ! if test "$ac_cv_rshift_extends_sign" = no ! then ! AC_DEFINE(SIGNED_RIGHT_SHIFT_ZERO_FILLS) ! fi ! # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! From python-dev@python.org Wed Jul 12 06:05:09 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Tue, 11 Jul 2000 22:05:09 -0700 Subject: [Python-checkins] CVS: python/dist/src configure,1.126,1.127 Message-ID: <200007120505.WAA00810@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv794 Modified Files: configure Log Message: Second try: checks whether right shift extends the sign bit. Adds caching and reverts back the 'return' to 'exit()' in AC_TRY_RUN as recommended by the Autoconf documentation. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.126 retrieving revision 1.127 diff -C2 -r1.126 -r1.127 *** configure 2000/07/12 03:02:43 1.126 --- configure 2000/07/12 05:05:06 1.127 *************** *** 1,5 **** #! /bin/sh ! # From configure.in Revision: 1.135 # Guess values for system-dependent variables and create Makefiles. --- 1,5 ---- #! /bin/sh ! # From configure.in Revision: 1.136 # Guess values for system-dependent variables and create Makefiles. *************** *** 5605,5637 **** echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 echo "configure:5607: checking whether right shift extends the sign bit" >&5 if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <>3 == -1) ? 1 : 0; } EOF ! if { (eval echo configure:5621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ! cat >> confdefs.h <<\EOF ! #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 ! EOF ! ! echo "$ac_t""yes" 1>&6 else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ! echo "$ac_t""no" 1>&6 fi rm -fr conftest* fi # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! --- 5605,5648 ---- echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 echo "configure:5607: checking whether right shift extends the sign bit" >&5 + if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <>3 == -1) ? 0 : 1); } EOF ! if { (eval echo configure:5625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ! ac_cv_rshift_extends_sign=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ! ac_cv_rshift_extends_sign=no fi rm -fr conftest* fi + fi + + echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6 + if test "$ac_cv_rshift_extends_sign" = no + then + cat >> confdefs.h <<\EOF + #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 + EOF + + fi + # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! *************** *** 5643,5652 **** EOF echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 ! echo "configure:5646: checking for socklen_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 5654,5663 ---- EOF echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 ! echo "configure:5657: checking for socklen_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < From python-dev@python.org Wed Jul 12 06:18:38 2000 From: python-dev@python.org (Barry Warsaw) Date: Tue, 11 Jul 2000 22:18:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules gcmodule.c,2.5,2.6 Message-ID: <200007120518.WAA01620@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv1612 Modified Files: gcmodule.c Log Message: debug_instance(): Use the same %p format directive as with debug_cycle(), and don't cast the pointer to a long. Neither needs the literal `0x' prefix as %p automatically inserts this (on Linux at least). Index: gcmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** gcmodule.c 2000/07/12 04:42:23 2.5 --- gcmodule.c 2000/07/12 05:18:36 2.6 *************** *** 278,283 **** else cname = "?"; ! sprintf(buf, "gc: %s<%.100s instance at %lx>\n", ! msg, cname, (long)inst); PyFile_WriteString(buf, output); } --- 278,282 ---- else cname = "?"; ! sprintf(buf, "gc: %s<%.100s instance at %p>\n", msg, cname, inst); PyFile_WriteString(buf, output); } *************** *** 290,297 **** } else if (debug & DEBUG_OBJECTS) { char buf[200]; ! sprintf(buf, "gc: %s<%.100s 0x%p>\n", ! msg, ! op->ob_type->tp_name, ! op); PyFile_WriteString(buf, output); } --- 289,294 ---- } else if (debug & DEBUG_OBJECTS) { char buf[200]; ! sprintf(buf, "gc: %s<%.100s %p>\n", msg, ! op->ob_type->tp_name, op); PyFile_WriteString(buf, output); } From python-dev@python.org Wed Jul 12 10:55:33 2000 From: python-dev@python.org (Greg Stein) Date: Wed, 12 Jul 2000 02:55:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib shutil.py,1.16,1.17 Message-ID: <200007120955.CAA15322@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv15196 Modified Files: shutil.py Log Message: apply patch #100868 from Moshe Zadka: refactor the copying of file data. new: shutil.copyfileobj(fsrc, fdst) Index: shutil.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/shutil.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** shutil.py 2000/04/07 14:34:50 1.16 --- shutil.py 2000/07/12 09:55:30 1.17 *************** *** 10,13 **** --- 10,22 ---- + def copyfileobj(fsrc, fdst, length=16*1024): + """copy data from file-like object fsrc to file-like object fdst""" + while 1: + buf = fsrc.read(length) + if not buf: + break + fdst.write(buf) + + def copyfile(src, dst): """Copy data from src to dst""" *************** *** 17,25 **** fsrc = open(src, 'rb') fdst = open(dst, 'wb') ! while 1: ! buf = fsrc.read(16*1024) ! if not buf: ! break ! fdst.write(buf) finally: if fdst: --- 26,30 ---- fsrc = open(src, 'rb') fdst = open(dst, 'wb') ! copyfileobj(fsrc, fdst) finally: if fdst: From python-dev@python.org Wed Jul 12 11:43:14 2000 From: python-dev@python.org (Sjoerd Mullender) Date: Wed, 12 Jul 2000 03:43:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules flmodule.c,1.40,1.41 fmmodule.c,1.14,1.15 Message-ID: <200007121043.DAA27255@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv27219 Modified Files: flmodule.c fmmodule.c Log Message: Fixed up some ANSIfications. Index: flmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/flmodule.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -r1.40 -r1.41 *** flmodule.c 2000/07/10 17:04:33 1.40 --- flmodule.c 2000/07/12 10:43:11 1.41 *************** *** 344,348 **** static int ! generic_setattr(genericobject *g, char *name PyObject *v) { int ret; --- 344,348 ---- static int ! generic_setattr(genericobject *g, char *name, PyObject *v) { int ret; Index: fmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fmmodule.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** fmmodule.c 2000/07/10 17:04:33 1.14 --- fmmodule.c 2000/07/12 10:43:11 1.15 *************** *** 180,184 **** static PyObject * ! fm_init(PyObject *self, *args) { if (!PyArg_NoArgs(args)) --- 180,184 ---- static PyObject * ! fm_init(PyObject *self, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 190,194 **** static PyObject * ! fm_findfont(PyObject *self, *args) { char *str; --- 190,194 ---- static PyObject * ! fm_findfont(PyObject *self, PyObject *args) { char *str; *************** *** 199,203 **** static PyObject * ! fm_prstr(PyObject *self, *args) { char *str; --- 199,203 ---- static PyObject * ! fm_prstr(PyObject *self, PyObject *args) { char *str; *************** *** 260,264 **** static PyObject * ! fm_fontpath(PyObject *self, *args) { if (!PyArg_NoArgs(args)) --- 260,264 ---- static PyObject * ! fm_fontpath(PyObject *self, PyObject *args) { if (!PyArg_NoArgs(args)) From python-dev@python.org Wed Jul 12 13:09:08 2000 From: python-dev@python.org (Guido van Rossum) Date: Wed, 12 Jul 2000 05:09:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules config.c.in,1.69,1.70 Message-ID: <200007121209.FAA20664@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv20626 Modified Files: config.c.in Log Message: Add "exceptions" to list of built-in modules for the sake of sys.builtin_module_names. (Noticed by Toby Dickenson.) Index: config.c.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/config.c.in,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -r1.69 -r1.70 *** config.c.in 2000/06/30 23:58:05 1.69 --- config.c.in 2000/07/12 12:09:05 1.70 *************** *** 38,41 **** --- 38,42 ---- {"__builtin__", NULL}, {"sys", NULL}, + {"exceptions", NULL}, /* Sentinel */ From python-dev@python.org Wed Jul 12 13:11:38 2000 From: python-dev@python.org (Guido van Rossum) Date: Wed, 12 Jul 2000 05:11:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC config.c,1.25,1.26 Message-ID: <200007121211.FAA21238@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv21231 Modified Files: config.c Log Message: Add "exceptions" to list of built-in modules for the sake of sys.builtin_module_names. (Noticed by Toby Dickenson.) [Tim, please test!] Index: config.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/config.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** config.c 2000/06/30 23:58:05 1.25 --- config.c 2000/07/12 12:11:36 1.26 *************** *** 118,121 **** --- 118,122 ---- {"__builtin__", NULL}, {"sys", NULL}, + {"exceptions", NULL}, /* Sentinel */ From python-dev@python.org Wed Jul 12 13:56:21 2000 From: python-dev@python.org (Jeremy Hylton) Date: Wed, 12 Jul 2000 05:56:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include abstract.h,2.21,2.22 Message-ID: <200007121256.FAA00462@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv413/Include Modified Files: abstract.h Log Message: change abstract size functions PySequence_Size &c. add macros for backwards compatibility with C source Index: abstract.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/abstract.h,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** abstract.h 2000/07/09 00:20:36 2.21 --- abstract.h 2000/07/12 12:56:18 2.22 *************** *** 382,390 **** */ ! DL_IMPORT(int) PyObject_Length(PyObject *o); /* ! Return the length of object o. If the object, o, provides ! both sequence and mapping protocols, the sequence length is returned. On error, -1 is returned. This is the equivalent to the Python expression: len(o). --- 382,392 ---- */ ! DL_IMPORT(int) PyObject_Size(PyObject *o); + #define PyObject_Length(O) PyObject_Size((O)) + /* ! Return the size of object o. If the object, o, provides ! both sequence and mapping protocols, the sequence size is returned. On error, -1 is returned. This is the equivalent to the Python expression: len(o). *************** *** 681,689 **** */ ! DL_IMPORT(int) PySequence_Length(PyObject *o); /* ! Return the length of sequence object o, or -1 on failure. */ --- 683,693 ---- */ + + DL_IMPORT(int) PySequence_Size(PyObject *o); ! #define PySequence_Length(O) PySequence_Size((O)) /* ! Return the size of sequence object o, or -1 on failure. */ *************** *** 833,838 **** This function always succeeds. */ ! DL_IMPORT(int) PyMapping_Length(PyObject *o); /* --- 837,844 ---- This function always succeeds. */ + + DL_IMPORT(int) PyMapping_Size(PyObject *o); ! #define PyMapping_Length(O) PyMapping_Size((O)) /* From python-dev@python.org Wed Jul 12 13:56:21 2000 From: python-dev@python.org (Jeremy Hylton) Date: Wed, 12 Jul 2000 05:56:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.40,2.41 object.c,2.86,2.87 Message-ID: <200007121256.FAA00463@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv413/Objects Modified Files: abstract.c object.c Log Message: change abstract size functions PySequence_Size &c. add macros for backwards compatibility with C source Index: abstract.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v retrieving revision 2.40 retrieving revision 2.41 diff -C2 -r2.40 -r2.41 *** abstract.c 2000/07/09 04:34:13 2.40 --- abstract.c 2000/07/12 12:56:19 2.41 *************** *** 63,67 **** int ! PyObject_Length(PyObject *o) { PySequenceMethods *m; --- 63,67 ---- int ! PyObject_Size(PyObject *o) { PySequenceMethods *m; *************** *** 76,80 **** return m->sq_length(o); ! return PyMapping_Length(o); } --- 76,80 ---- return m->sq_length(o); ! return PyMapping_Size(o); } *************** *** 804,808 **** int ! PySequence_Length(PyObject *s) { PySequenceMethods *m; --- 804,808 ---- int ! PySequence_Size(PyObject *s) { PySequenceMethods *m; *************** *** 1037,1041 **** int i; PyObject *t; ! int n = PySequence_Length(v); if (n < 0) return NULL; --- 1037,1041 ---- int i; PyObject *t; ! int n = PySequence_Size(v); if (n < 0) return NULL; *************** *** 1088,1092 **** int i; PyObject *l; ! int n = PySequence_Length(v); if (n < 0) return NULL; --- 1088,1092 ---- int i; PyObject *l; ! int n = PySequence_Size(v); if (n < 0) return NULL; *************** *** 1153,1157 **** } ! l = PySequence_Length(s); if (l < 0) return -1; --- 1153,1157 ---- } ! l = PySequence_Size(s); if (l < 0) return -1; *************** *** 1233,1237 **** } ! l = PySequence_Length(s); if (l < 0) return -1; --- 1233,1237 ---- } ! l = PySequence_Size(s); if (l < 0) return -1; *************** *** 1262,1266 **** int ! PyMapping_Length(PyObject *o) { PyMappingMethods *m; --- 1262,1266 ---- int ! PyMapping_Size(PyObject *o) { PyMappingMethods *m; Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.86 retrieving revision 2.87 diff -C2 -r2.86 -r2.87 *** object.c 2000/07/11 21:47:20 2.86 --- object.c 2000/07/12 12:56:19 2.87 *************** *** 959,963 **** /* Hack to force loading of abstract.o */ ! int (*_Py_abstract_hack)(PyObject *) = &PyObject_Length; --- 959,963 ---- /* Hack to force loading of abstract.o */ ! int (*_Py_abstract_hack)(PyObject *) = &PyObject_Size; From python-dev@python.org Wed Jul 12 14:03:05 2000 From: python-dev@python.org (Jeremy Hylton) Date: Wed, 12 Jul 2000 06:03:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects listobject.c,2.80,2.81 stringobject.c,2.81,2.82 unicodeobject.c,2.43,2.44 Message-ID: <200007121303.GAA04481@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv4183/Objects Modified Files: listobject.c stringobject.c unicodeobject.c Log Message: replace PyXXX_Length calls with PyXXX_Size calls Index: listobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v retrieving revision 2.80 retrieving revision 2.81 diff -C2 -r2.80 -r2.81 *** listobject.c 2000/07/09 15:16:51 2.80 --- listobject.c 2000/07/12 13:03:02 2.81 *************** *** 564,568 **** return NULL; ! if (PyObject_Length(b) == 0) /* short circuit when b is empty */ goto ok; --- 564,568 ---- return NULL; ! if (PyObject_Size(b) == 0) /* short circuit when b is empty */ goto ok; *************** *** 586,590 **** } ! blen = PyObject_Length(b); /* resize a using idiom */ --- 586,590 ---- } ! blen = PyObject_Size(b); /* resize a using idiom */ Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.81 retrieving revision 2.82 diff -C2 -r2.81 -r2.82 *** stringobject.c 2000/07/12 02:58:28 2.81 --- stringobject.c 2000/07/12 13:03:02 2.82 *************** *** 760,764 **** * reference count manipulations. */ ! seqlen = PySequence_Length(seq); if (seqlen == 1) { item = PySequence_Fast_GET_ITEM(seq, 0); --- 760,764 ---- * reference count manipulations. */ ! seqlen = PySequence_Size(seq); if (seqlen == 1) { item = PySequence_Fast_GET_ITEM(seq, 0); Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.43 retrieving revision 2.44 diff -C2 -r2.43 -r2.44 *** unicodeobject.c 2000/07/11 09:47:04 2.43 --- unicodeobject.c 2000/07/12 13:03:02 2.44 *************** *** 2651,2655 **** int i; ! seqlen = PySequence_Length(seq); if (seqlen < 0 && PyErr_Occurred()) return NULL; --- 2651,2655 ---- int i; ! seqlen = PySequence_Size(seq); if (seqlen < 0 && PyErr_Occurred()) return NULL; From python-dev@python.org Wed Jul 12 14:03:05 2000 From: python-dev@python.org (Jeremy Hylton) Date: Wed, 12 Jul 2000 06:03:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.169,2.170 exceptions.c,1.8,1.9 getargs.c,2.39,2.40 Message-ID: <200007121303.GAA04491@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv4183/Python Modified Files: bltinmodule.c exceptions.c getargs.c Log Message: replace PyXXX_Length calls with PyXXX_Size calls Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.169 retrieving revision 2.170 diff -C2 -r2.169 -r2.170 *** bltinmodule.c 2000/07/09 03:09:56 2.169 --- bltinmodule.c 2000/07/12 13:03:02 2.170 *************** *** 1386,1390 **** if (!PyArg_ParseTuple(args, "O:len", &v)) return NULL; ! res = PyObject_Length(v); if (res < 0 && PyErr_Occurred()) return NULL; --- 1386,1390 ---- if (!PyArg_ParseTuple(args, "O:len", &v)) return NULL; ! res = PyObject_Size(v); if (res < 0 && PyErr_Occurred()) return NULL; Index: exceptions.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** exceptions.c 2000/07/12 04:02:10 1.8 --- exceptions.c 2000/07/12 13:03:03 1.9 *************** *** 225,229 **** /* set args attribute */ ! args = PySequence_GetSlice(args, 1, PySequence_Length(args)); if (!args) return NULL; --- 225,230 ---- /* set args attribute */ ! /* XXX size is only a hint */ ! args = PySequence_GetSlice(args, 1, PySequence_Size(args)); if (!args) return NULL; *************** *** 250,254 **** return NULL; ! switch (PySequence_Length(args)) { case 0: out = PyString_FromString(""); --- 251,255 ---- return NULL; ! switch (PySequence_Size(args)) { case 0: out = PyString_FromString(""); *************** *** 375,379 **** /* Set args attribute. */ ! if (!(args = PySequence_GetSlice(args, 1, PySequence_Length(args)))) return NULL; --- 376,380 ---- /* Set args attribute. */ ! if (!(args = PySequence_GetSlice(args, 1, PySequence_Size(args)))) return NULL; *************** *** 385,389 **** /* set code attribute */ ! switch (PySequence_Length(args)) { case 0: Py_INCREF(Py_None); --- 386,390 ---- /* set code attribute */ ! switch (PySequence_Size(args)) { case 0: Py_INCREF(Py_None); *************** *** 442,446 **** return NULL; ! if (!(args = PySequence_GetSlice(args, 1, PySequence_Length(args)))) return NULL; --- 443,447 ---- return NULL; ! if (!(args = PySequence_GetSlice(args, 1, PySequence_Size(args)))) return NULL; *************** *** 453,457 **** } ! switch (PySequence_Length(args)) { case 3: /* Where a function has a single filename, such as open() or some --- 454,458 ---- } ! switch (PySequence_Size(args)) { case 3: /* Where a function has a single filename, such as open() or some *************** *** 672,676 **** return NULL; ! if (!(args = PySequence_GetSlice(args, 1, PySequence_Length(args)))) return NULL; --- 673,677 ---- return NULL; ! if (!(args = PySequence_GetSlice(args, 1, PySequence_Size(args)))) return NULL; *************** *** 678,682 **** goto finally; ! lenargs = PySequence_Length(args); if (lenargs >= 1) { PyObject* item0 = PySequence_GetItem(args, 0); --- 679,683 ---- goto finally; ! lenargs = PySequence_Size(args); if (lenargs >= 1) { PyObject* item0 = PySequence_GetItem(args, 0); Index: getargs.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v retrieving revision 2.39 retrieving revision 2.40 diff -C2 -r2.39 -r2.40 *** getargs.c 2000/07/09 03:09:56 2.39 --- getargs.c 2000/07/12 13:03:03 2.40 *************** *** 349,353 **** } ! if ((i = PySequence_Length(arg)) != n) { levels[0] = 0; sprintf(msgbuf, --- 349,353 ---- } ! if ((i = PySequence_Size(arg)) != n) { levels[0] = 0; sprintf(msgbuf, From python-dev@python.org Wed Jul 12 14:05:36 2000 From: python-dev@python.org (Jeremy Hylton) Date: Wed, 12 Jul 2000 06:05:36 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.25,2.26 _tkinter.c,1.105,1.106 almodule.c,1.28,1.29 cPickle.c,2.44,2.45 cStringIO.c,2.21,2.22 parsermodule.c,2.45,2.46 posixmodule.c,2.150,2.151 stropmodule.c,2.67,2.68 Message-ID: <200007121305.GAA05390@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv5188/Modules Modified Files: _sre.c _tkinter.c almodule.c cPickle.c cStringIO.c parsermodule.c posixmodule.c stropmodule.c Log Message: replace PyXXX_Length calls with PyXXX_Size calls Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** _sre.c 2000/07/05 21:14:16 2.25 --- _sre.c 2000/07/12 13:05:32 2.26 *************** *** 1128,1132 **** return NULL; ! n = PySequence_Length(code); self = PyObject_NEW_VAR(PatternObject, &Pattern_Type, 100*n); --- 1128,1132 ---- return NULL; ! n = PySequence_Size(code); self = PyObject_NEW_VAR(PatternObject, &Pattern_Type, 100*n); Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.105 retrieving revision 1.106 diff -C2 -r1.105 -r1.106 *** _tkinter.c 2000/07/10 12:43:58 1.105 --- _tkinter.c 2000/07/12 13:05:33 1.106 *************** *** 1935,1939 **** return NULL; ! context.maxsize = PySequence_Length(item); if (context.maxsize <= 0) return PyTuple_New(0); --- 1935,1939 ---- return NULL; ! context.maxsize = PySequence_Size(item); if (context.maxsize <= 0) return PyTuple_New(0); Index: almodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/almodule.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** almodule.c 2000/07/10 17:04:33 1.28 --- almodule.c 2000/07/12 13:05:33 1.29 *************** *** 177,181 **** case AL_RESOURCE_ELEM: case AL_ENUM_ELEM: ! param->sizeIn = PySequence_Length(value); param->value.ptr = PyMem_NEW(int, param->sizeIn); stepsize = sizeof(int); --- 177,181 ---- case AL_RESOURCE_ELEM: case AL_ENUM_ELEM: ! param->sizeIn = PySequence_Size(value); param->value.ptr = PyMem_NEW(int, param->sizeIn); stepsize = sizeof(int); *************** *** 183,187 **** case AL_INT64_ELEM: case AL_FIXED_ELEM: ! param->sizeIn = PySequence_Length(value); param->value.ptr = PyMem_NEW(long long, param->sizeIn); stepsize = sizeof(long long); --- 183,187 ---- case AL_INT64_ELEM: case AL_FIXED_ELEM: ! param->sizeIn = PySequence_Size(value); param->value.ptr = PyMem_NEW(long long, param->sizeIn); stepsize = sizeof(long long); Index: cPickle.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v retrieving revision 2.44 retrieving revision 2.45 diff -C2 -r2.44 -r2.45 *** cPickle.c 2000/06/30 05:02:53 2.44 --- cPickle.c 2000/07/12 13:05:33 2.45 *************** *** 1467,1471 **** goto finally; ! if ((len = PyObject_Length(class_args)) < 0) goto finally; --- 1467,1471 ---- goto finally; ! if ((len = PyObject_Size(class_args)) < 0) goto finally; *************** *** 2875,2879 **** int l; ! if ((l=PyObject_Length(args)) < 0) goto err; UNLESS (l) { PyObject *__getinitargs__; --- 2875,2879 ---- int l; ! if ((l=PyObject_Size(args)) < 0) goto err; UNLESS (l) { PyObject *__getinitargs__; Index: cStringIO.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cStringIO.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** cStringIO.c 2000/06/19 13:17:41 2.21 --- cStringIO.c 2000/07/12 13:05:33 2.22 *************** *** 368,372 **** } ! if (PyObject_Length(args) == -1) { return NULL; } --- 368,372 ---- } ! if (PyObject_Size(args) == -1) { return NULL; } Index: parsermodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** parsermodule.c 2000/07/10 12:43:58 2.45 --- parsermodule.c 2000/07/12 13:05:33 2.46 *************** *** 611,615 **** * lists as well as tuples at the very least. */ ! ok = PyObject_Length(tuple) >= 2; if (ok) { temp = PySequence_GetItem(tuple, 0); --- 611,615 ---- * lists as well as tuples at the very least. */ ! ok = PyObject_Size(tuple) >= 2; if (ok) { temp = PySequence_GetItem(tuple, 0); *************** *** 627,631 **** if (ok) { temp = PySequence_GetItem(tuple, 1); ! ok = (temp != NULL) && PyObject_Length(temp) >= 2; if (ok) { PyObject *temp2 = PySequence_GetItem(temp, 0); --- 627,631 ---- if (ok) { temp = PySequence_GetItem(tuple, 1); ! ok = (temp != NULL) && PyObject_Size(temp) >= 2; if (ok) { PyObject *temp2 = PySequence_GetItem(temp, 0); *************** *** 694,698 **** check_terminal_tuple(PyObject *elem) { ! int len = PyObject_Length(elem); int res = 1; char* str = "Illegal terminal symbol; bad node length."; --- 694,698 ---- check_terminal_tuple(PyObject *elem) { ! int len = PyObject_Size(elem); int res = 1; char* str = "Illegal terminal symbol; bad node length."; *************** *** 732,736 **** build_node_children(PyObject *tuple, node *root, int *line_num) { ! int len = PyObject_Length(tuple); int i; --- 732,736 ---- build_node_children(PyObject *tuple, node *root, int *line_num) { ! int len = PyObject_Size(tuple); int i; *************** *** 772,776 **** Py_DECREF(temp); ! if (PyObject_Length(elem) == 3) { PyObject* temp = PySequence_GetItem(elem, 2); *line_num = PyInt_AsLong(temp); --- 772,776 ---- Py_DECREF(temp); ! if (PyObject_Size(elem) == 3) { PyObject* temp = PySequence_GetItem(elem, 2); *line_num = PyInt_AsLong(temp); Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.150 retrieving revision 2.151 diff -C2 -r2.150 -r2.151 *** posixmodule.c 2000/07/10 16:38:09 2.150 --- posixmodule.c 2000/07/12 13:05:33 2.151 *************** *** 1418,1422 **** argvlist[argc] = NULL; ! i = PyMapping_Length(env); envlist = PyMem_NEW(char *, i + 1); if (envlist == NULL) { --- 1418,1422 ---- argvlist[argc] = NULL; ! i = PyMapping_Size(env); envlist = PyMem_NEW(char *, i + 1); if (envlist == NULL) { *************** *** 1611,1615 **** argvlist[argc] = NULL; ! i = PyMapping_Length(env); envlist = PyMem_NEW(char *, i + 1); if (envlist == NULL) { --- 1611,1615 ---- argvlist[argc] = NULL; ! i = PyMapping_Size(env); envlist = PyMem_NEW(char *, i + 1); if (envlist == NULL) { Index: stropmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/stropmodule.c,v retrieving revision 2.67 retrieving revision 2.68 diff -C2 -r2.67 -r2.68 *** stropmodule.c 2000/07/10 09:43:24 2.67 --- stropmodule.c 2000/07/12 13:05:33 2.68 *************** *** 191,195 **** } ! seqlen = PySequence_Length(seq); if (seqlen < 0 && PyErr_Occurred()) return NULL; --- 191,195 ---- } ! seqlen = PySequence_Size(seq); if (seqlen < 0 && PyErr_Occurred()) return NULL; From python-dev@python.org Wed Jul 12 17:56:00 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 12 Jul 2000 09:56:00 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib dospath.py,1.13,1.14 macpath.py,1.22,1.23 ntpath.py,1.24,1.25 posixpath.py,1.31,1.32 Message-ID: <200007121656.JAA09687@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9633/Lib Modified Files: dospath.py macpath.py ntpath.py posixpath.py Log Message: fixed semantics of commonprefix to work by path elements instead of characters. Index: dospath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dospath.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** dospath.py 2000/07/01 10:52:49 1.13 --- dospath.py 2000/07/12 16:55:57 1.14 *************** *** 103,112 **** ! def commonprefix(m): ! """Return the longest prefix of all list elements.""" if not m: return '' ! prefix = m[0] ! for item in m: for i in range(len(prefix)): if prefix[:i+1] <> item[:i+1]: --- 103,120 ---- ! # Return the longest prefix of all list elements. + def commonprefix(m): + "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! n = m[:] ! for i in range(len(n)): ! n[i] = n[i].split(os.sep) ! # if os.sep didn't have any effect, try os.altsep ! if os.altsep and len(n[i]) == 1: ! n[i] = n[i].split(os.altsep) ! ! prefix = n[0] ! for item in n: for i in range(len(prefix)): if prefix[:i+1] <> item[:i+1]: *************** *** 114,118 **** if i == 0: return '' break ! return prefix --- 122,126 ---- if i == 0: return '' break ! return os.sep.join(prefix) Index: macpath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/macpath.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** macpath.py 2000/07/01 10:52:26 1.22 --- macpath.py 2000/07/12 16:55:57 1.23 *************** *** 90,93 **** --- 90,116 ---- + # Return the longest prefix of all list elements. + # XXX completely untested on Mac!!! + + def commonprefix(m): + "Given a list of pathnames, returns the longest common leading component" + if not m: return '' + n = m[:] + for i in range(len(n)): + n[i] = n[i].split(os.sep) + # if os.sep didn't have any effect, try os.altsep + if os.altsep and len(n[i]) == 1: + n[i] = n[i].split(os.altsep) + + prefix = n[0] + for item in n: + for i in range(len(prefix)): + if prefix[:i+1] <> item[:i+1]: + prefix = prefix[:i] + if i == 0: return '' + break + return os.sep.join(prefix) + + def isdir(s): """Return true if the pathname refers to an existing directory.""" Index: ntpath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ntpath.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** ntpath.py 2000/07/01 06:36:51 1.24 --- ntpath.py 2000/07/12 16:55:57 1.25 *************** *** 9,14 **** import stat import string - # Normalize the case of a pathname and map slashes to backslashes. # Other normalizations (such as optimizing '../' away) are not done --- 9,14 ---- import stat import string + import copy # Normalize the case of a pathname and map slashes to backslashes. # Other normalizations (such as optimizing '../' away) are not done *************** *** 159,164 **** "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! prefix = m[0] ! for item in m: for i in range(len(prefix)): if prefix[:i+1] <> item[:i+1]: --- 159,167 ---- "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! n = copy.copy(m) ! for i in range(len(n)): ! n[i] = n[i].split(os.sep) ! prefix = n[0] ! for item in n: for i in range(len(prefix)): if prefix[:i+1] <> item[:i+1]: *************** *** 166,170 **** if i == 0: return '' break ! return prefix --- 169,173 ---- if i == 0: return '' break ! return os.sep.join(prefix) Index: posixpath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/posixpath.py,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** posixpath.py 2000/06/28 14:48:01 1.31 --- posixpath.py 2000/07/12 16:55:57 1.32 *************** *** 119,124 **** "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! prefix = m[0] ! for item in m: for i in range(len(prefix)): if prefix[:i+1] <> item[:i+1]: --- 119,131 ---- "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! n = m[:] ! for i in range(len(n)): ! n[i] = n[i].split(os.sep) ! # if os.sep didn't have any effect, try os.altsep ! if os.altsep and len(n[i]) == 1: ! n[i] = n[i].split(os.altsep) ! ! prefix = n[0] ! for item in n: for i in range(len(prefix)): if prefix[:i+1] <> item[:i+1]: *************** *** 126,130 **** if i == 0: return '' break ! return prefix --- 133,137 ---- if i == 0: return '' break ! return os.sep.join(prefix) From python-dev@python.org Wed Jul 12 18:21:44 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 12 Jul 2000 10:21:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include mymalloc.h,2.22,2.23 mymath.h,2.10,2.11 Message-ID: <200007121721.KAA18006@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv17993/Include Modified Files: mymalloc.h mymath.h Log Message: delete obsolete SYMANTEC__CFM68K__ #ifdefs Index: mymalloc.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mymalloc.h,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** mymalloc.h 2000/07/09 03:09:55 2.22 --- mymalloc.h 2000/07/12 17:21:41 2.23 *************** *** 45,52 **** #endif - #ifdef SYMANTEC__CFM68K__ - #pragma lib_export on - #endif - #ifndef DL_IMPORT /* declarations for DLL import */ #define DL_IMPORT(RTYPE) RTYPE --- 45,48 ---- Index: mymath.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mymath.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** mymath.h 2000/07/09 03:09:55 2.10 --- mymath.h 2000/07/12 17:21:41 2.11 *************** *** 6,13 **** XXX Not sure now... Seems to be something else going on as well... */ - #ifdef SYMANTEC__CFM68K__ - #pragma lib_export off - #endif - #ifndef HAVE_HYPOT extern double hypot(double, double); --- 6,9 ---- *************** *** 23,30 **** #undef hypot #endif - #endif - - #ifdef SYMANTEC__CFM68K__ - #pragma lib_export on #endif --- 19,22 ---- From python-dev@python.org Wed Jul 12 18:21:44 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 12 Jul 2000 10:21:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python dynload_mac.c,2.6,2.7 errors.c,2.48,2.49 Message-ID: <200007121721.KAA18011@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv17993/Python Modified Files: dynload_mac.c errors.c Log Message: delete obsolete SYMANTEC__CFM68K__ #ifdefs Index: dynload_mac.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_mac.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** dynload_mac.c 2000/06/30 23:58:06 2.6 --- dynload_mac.c 2000/07/12 17:21:42 2.7 *************** *** 16,23 **** #include #include - #ifdef SYMANTEC__CFM68K__ /* Really an older version of Universal Headers */ - #define CFragConnectionID ConnectionID - #define kLoadCFrag 0x01 - #endif #ifdef USE_GUSI1 #include "TFileSpec.h" /* for Path2FSSpec() */ --- 16,19 ---- Index: errors.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/errors.c,v retrieving revision 2.48 retrieving revision 2.49 diff -C2 -r2.48 -r2.49 *** errors.c 2000/07/09 03:09:56 2.48 --- errors.c 2000/07/12 17:21:42 2.49 *************** *** 13,20 **** #include "Python.h" - #ifdef SYMANTEC__CFM68K__ - #pragma lib_export on - #endif - #ifdef macintosh extern char *PyMac_StrError(int); --- 13,16 ---- From python-dev@python.org Wed Jul 12 18:26:12 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 12 Jul 2000 10:26:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include Python.h,2.22,2.23 Message-ID: <200007121726.KAA18283@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv18194/Include Modified Files: Python.h Log Message: deleted obsolete SYMANTEC__CFM68K__ tests Index: Python.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** Python.h 2000/07/08 04:17:21 2.22 --- Python.h 2000/07/12 17:26:09 2.23 *************** *** 42,49 **** #endif - #ifdef SYMANTEC__CFM68K__ - #define UsingSharedLibs - #endif - #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE) #define _SGI_MP_SOURCE --- 42,45 ---- *************** *** 58,65 **** #include "myproto.h" - - #ifdef SYMANTEC__CFM68K__ - #pragma lib_export on - #endif #include "object.h" --- 54,57 ---- From python-dev@python.org Thu Jul 13 00:39:40 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Wed, 12 Jul 2000 16:39:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects object.c,2.87,2.88 Message-ID: <200007122339.QAA18126@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv17806 Modified Files: object.c Log Message: Propagate the current exception in get_inprogress_dict() -- it doesn't need to be cleared. Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.87 retrieving revision 2.88 diff -C2 -r2.87 -r2.88 *** object.c 2000/07/12 12:56:19 2.87 --- object.c 2000/07/12 23:39:38 2.88 *************** *** 357,361 **** inprogress = PyDict_GetItem(tstate_dict, _PyCompareState_Key); if (inprogress == NULL) { - PyErr_Clear(); inprogress = PyDict_New(); if (inprogress == NULL) --- 357,360 ---- From python-dev@python.org Thu Jul 13 02:01:06 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 12 Jul 2000 18:01:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib ntpath.py,1.25,1.26 Message-ID: <200007130101.SAA30460@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv30374 Modified Files: ntpath.py Log Message: forgot to change copy.copy(m) to m[:] Index: ntpath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ntpath.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** ntpath.py 2000/07/12 16:55:57 1.25 --- ntpath.py 2000/07/13 01:01:03 1.26 *************** *** 9,14 **** import stat import string - import copy # Normalize the case of a pathname and map slashes to backslashes. # Other normalizations (such as optimizing '../' away) are not done --- 9,14 ---- import stat import string + # Normalize the case of a pathname and map slashes to backslashes. # Other normalizations (such as optimizing '../' away) are not done *************** *** 159,163 **** "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! n = copy.copy(m) for i in range(len(n)): n[i] = n[i].split(os.sep) --- 159,163 ---- "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! n = m[:] for i in range(len(n)): n[i] = n[i].split(os.sep) From python-dev@python.org Thu Jul 13 02:27:00 2000 From: python-dev@python.org (A.M. Kuchling) Date: Wed, 12 Jul 2000 18:27:00 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.151,2.152 Message-ID: <200007130127.SAA03986@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv3810/Modules Modified Files: posixmodule.c Log Message: From Sam Rushing's Medusa, via SF patch #100858: add & document os.seteuid(), os.setegid(), os.setreuid(), os.setregid(). Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.151 retrieving revision 2.152 diff -C2 -r2.151 -r2.152 *** posixmodule.c 2000/07/12 13:05:33 2.151 --- posixmodule.c 2000/07/13 01:26:58 2.152 *************** *** 2619,2622 **** --- 2619,2698 ---- + #ifdef HAVE_SETEUID + static char posix_seteuid__doc__[] = + "seteuid(uid) -> None\n\ + Set the current process's effective user id."; + static PyObject * + posix_seteuid (PyObject *self, PyObject *args) + { + int euid; + if (!PyArg_ParseTuple(args, "i", &euid)) { + return NULL; + } else if (seteuid(euid) < 0) { + return posix_error(); + } else { + Py_INCREF(Py_None); + return Py_None; + } + } + #endif /* HAVE_SETEUID */ + + #ifdef HAVE_SETEGID + static char posix_setegid__doc__[] = + "setegid(gid) -> None\n\ + Set the current process's effective group id."; + static PyObject * + posix_setegid (PyObject *self, PyObject *args) + { + int egid; + if (!PyArg_ParseTuple(args, "i", &egid)) { + return NULL; + } else if (setegid(egid) < 0) { + return posix_error(); + } else { + Py_INCREF(Py_None); + return Py_None; + } + } + #endif /* HAVE_SETEGID */ + + #ifdef HAVE_SETREUID + static char posix_setreuid__doc__[] = + "seteuid(ruid, euid) -> None\n\ + Set the current process's real and effective user ids."; + static PyObject * + posix_setreuid (PyObject *self, PyObject *args) + { + int ruid, euid; + if (!PyArg_ParseTuple(args, "ii", &ruid, &euid)) { + return NULL; + } else if (setreuid(ruid, euid) < 0) { + return posix_error(); + } else { + Py_INCREF(Py_None); + return Py_None; + } + } + #endif /* HAVE_SETREUID */ + + #ifdef HAVE_SETREGID + static char posix_setregid__doc__[] = + "setegid(rgid, egid) -> None\n\ + Set the current process's real and effective group ids."; + static PyObject * + posix_setregid (PyObject *self, PyObject *args) + { + int rgid, egid; + if (!PyArg_ParseTuple(args, "ii", &rgid, &egid)) { + return NULL; + } else if (setregid(rgid, egid) < 0) { + return posix_error(); + } else { + Py_INCREF(Py_None); + return Py_None; + } + } + #endif /* HAVE_SETREGID */ + #ifdef HAVE_SETGID static char posix_setgid__doc__[] = *************** *** 4899,4902 **** --- 4975,4990 ---- {"setuid", posix_setuid, METH_VARARGS, posix_setuid__doc__}, #endif /* HAVE_SETUID */ + #ifdef HAVE_SETEUID + {"seteuid", posix_seteuid, METH_VARARGS, posix_seteuid__doc__}, + #endif /* HAVE_SETEUID */ + #ifdef HAVE_SETEGID + {"setegid", posix_setegid, METH_VARARGS, posix_setegid__doc__}, + #endif /* HAVE_SETEGID */ + #ifdef HAVE_SETREUID + {"setreuid", posix_setreuid, METH_VARARGS, posix_setreuid__doc__}, + #endif /* HAVE_SETREUID */ + #ifdef HAVE_SETREGID + {"setregid", posix_setregid, METH_VARARGS, posix_setregid__doc__}, + #endif /* HAVE_SETREGID */ #ifdef HAVE_SETGID {"setgid", posix_setgid, METH_VARARGS, posix_setgid__doc__}, From python-dev@python.org Thu Jul 13 02:27:00 2000 From: python-dev@python.org (A.M. Kuchling) Date: Wed, 12 Jul 2000 18:27:00 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libos.tex,1.42,1.43 Message-ID: <200007130127.SAA03988@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv3810/Doc/lib Modified Files: libos.tex Log Message: From Sam Rushing's Medusa, via SF patch #100858: add & document os.seteuid(), os.setegid(), os.setreuid(), os.setregid(). Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -r1.42 -r1.43 *** libos.tex 2000/06/30 16:06:19 1.42 --- libos.tex 2000/07/13 01:26:58 1.43 *************** *** 182,185 **** --- 182,195 ---- \end{funcdesc} + \begin{funcdesc}{setegid}{egid} + Set the current process's effective group id. + Availability: \UNIX{}. + \end{funcdesc} + + \begin{funcdesc}{seteuid}{euid} + Set the current process's effective user id. + Availability: \UNIX{}. + \end{funcdesc} + \begin{funcdesc}{setgid}{gid} Set the current process' group id. *************** *** 197,200 **** --- 207,220 ---- Calls the system call \cfunction{setpgid()}. See the \UNIX{} manual for the semantics. + Availability: \UNIX{}. + \end{funcdesc} + + \begin{funcdesc}{setreuid}{ruid, euid} + Set the current process's real and effective user ids. + Availability: \UNIX{}. + \end{funcdesc} + + \begin{funcdesc}{setregid}{rgid, egid} + Set the current process's real and effective group ids. Availability: \UNIX{}. \end{funcdesc} From python-dev@python.org Thu Jul 13 02:27:01 2000 From: python-dev@python.org (A.M. Kuchling) Date: Wed, 12 Jul 2000 18:27:01 -0700 Subject: [Python-checkins] CVS: python/dist/src configure.in,1.136,1.137 config.h.in,2.62,2.63 configure,1.127,1.128 Message-ID: <200007130127.SAA03998@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv3810 Modified Files: configure.in config.h.in configure Log Message: From Sam Rushing's Medusa, via SF patch #100858: add & document os.seteuid(), os.setegid(), os.setreuid(), os.setregid(). Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.136 retrieving revision 1.137 diff -C2 -r1.136 -r1.137 *** configure.in 2000/07/12 05:04:44 1.136 --- configure.in 2000/07/13 01:26:58 1.137 *************** *** 823,827 **** nice pathconf pause plock pthread_init \ putenv readlink \ ! select setgid setlocale setuid setsid setpgid setpgrp setvbuf \ sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ --- 823,828 ---- nice pathconf pause plock pthread_init \ putenv readlink \ ! select setegid seteuid setgid \ ! setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf \ sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ Index: config.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/config.h.in,v retrieving revision 2.62 retrieving revision 2.63 diff -C2 -r2.62 -r2.63 *** config.h.in 2000/07/09 14:39:28 2.62 --- config.h.in 2000/07/13 01:26:58 2.63 *************** *** 408,411 **** --- 408,417 ---- #undef HAVE_SELECT + /* Define if you have the setegid function. */ + #undef HAVE_SETEGID + + /* Define if you have the seteuid function. */ + #undef HAVE_SETEUID + /* Define if you have the setgid function. */ #undef HAVE_SETGID *************** *** 419,422 **** --- 425,434 ---- /* Define if you have the setpgrp function. */ #undef HAVE_SETPGRP + + /* Define if you have the setregid function. */ + #undef HAVE_SETREGID + + /* Define if you have the setreuid function. */ + #undef HAVE_SETREUID /* Define if you have the setsid function. */ Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.127 retrieving revision 1.128 diff -C2 -r1.127 -r1.128 *** configure 2000/07/12 05:05:06 1.127 --- configure 2000/07/13 01:26:58 1.128 *************** *** 3642,3646 **** nice pathconf pause plock pthread_init \ putenv readlink \ ! select setgid setlocale setuid setsid setpgid setpgrp setvbuf \ sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ --- 3642,3647 ---- nice pathconf pause plock pthread_init \ putenv readlink \ ! select setegid seteuid setgid \ ! setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf \ [...1626 lines suppressed...] echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 ! echo "configure:5657: checking for socklen_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 5655,5664 ---- EOF echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 ! echo "configure:5658: checking for socklen_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < From python-dev@python.org Thu Jul 13 05:58:01 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 12 Jul 2000 21:58:01 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/ref ref3.tex,1.44,1.45 Message-ID: <200007130458.VAA01269@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ref In directory slayer.i.sourceforge.net:/tmp/cvs-serv1260/ref Modified Files: ref3.tex Log Message: Improve the descriptions of expected exceptions for __getitem__(), __setitem__(), and __delitem__(). Based on related comments from Barry Warsaw. Index: ref3.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref3.tex,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -r1.44 -r1.45 *** ref3.tex 2000/06/28 20:15:47 1.44 --- ref3.tex 2000/07/13 04:57:58 1.45 *************** *** 1092,1098 **** \begin{methoddesc}[mapping object]{__getitem__}{self, key} Called to implement evaluation of \code{\var{self}[\var{key}]}. ! For a sequence types, the accepted keys should be integers. Note that the ! special interpretation of negative indices (if the class wishes to emulate a sequence type) is up to the \method{__getitem__()} method. \end{methoddesc} --- 1092,1105 ---- \begin{methoddesc}[mapping object]{__getitem__}{self, key} Called to implement evaluation of \code{\var{self}[\var{key}]}. ! For a sequence types, the accepted keys should be integers. Note that ! the special interpretation of negative indices (if the class wishes to emulate a sequence type) is up to the \method{__getitem__()} method. + If \var{key} is of an inappropriate type, \exception{TypeError} may be + raised; if of a value outside the set of indexes for the sequence + (after any special interpretation of negative values), + \exception{IndexError} should be raised. + \strong{Note:} \keyword{for} loops expect that an + \exception{IndexError} will be raised for illegal indexes to allow + proper detection of the end of the sequence. \end{methoddesc} *************** *** 1102,1106 **** for mappings if the objects support changes to the values for keys, or if new keys can be added, or for sequences if elements can be ! replaced. \end{methoddesc} --- 1109,1114 ---- for mappings if the objects support changes to the values for keys, or if new keys can be added, or for sequences if elements can be ! replaced. The same exceptions should be raised for improper ! \var{key} values as for the \method{__getitem__()} method. \end{methoddesc} *************** *** 1109,1113 **** note as for \method{__getitem__()}. This should only be implemented for mappings if the objects support removal of keys, or for sequences ! if elements can be removed from the sequence. \end{methoddesc} --- 1117,1123 ---- note as for \method{__getitem__()}. This should only be implemented for mappings if the objects support removal of keys, or for sequences ! if elements can be removed from the sequence. The same exceptions ! should be raised for improper \var{key} values as for the ! \method{__getitem__()} method. \end{methoddesc} From python-dev@python.org Thu Jul 13 07:15:07 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Wed, 12 Jul 2000 23:15:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python compile.c,2.114,2.115 Message-ID: <200007130615.XAA17849@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv17802 Modified Files: compile.c Log Message: raise error on duplicate function arguments example: >>> def f(a,a):print a ... SyntaxError: duplicate argument in function definition Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.114 retrieving revision 2.115 diff -C2 -r2.114 -r2.115 *** compile.c 2000/07/09 03:09:56 2.114 --- compile.c 2000/07/13 06:15:04 2.115 *************** *** 3093,3096 **** --- 3093,3097 ---- node *fp; char *name; + PyObject *nameval; if (TYPE(ch) == STAR || TYPE(ch) == DOUBLESTAR) break; *************** *** 3104,3108 **** complex = 1; } ! com_newlocal(c, name); c->c_argcount++; if (++i >= nch) --- 3105,3117 ---- complex = 1; } ! nameval = PyString_InternFromString(name); ! if (nameval == NULL) { ! c->c_errors++; ! } ! if (PyDict_GetItem(c->c_locals, nameval)) { ! com_error(c, PyExc_SyntaxError,"duplicate argument in function definition"); ! } ! com_newlocal_o(c, nameval); ! Py_DECREF(nameval); c->c_argcount++; if (++i >= nch) From python-dev@python.org Thu Jul 13 07:24:32 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Wed, 12 Jul 2000 23:24:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python compile.c,2.115,2.116 Message-ID: <200007130624.XAA18306@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv18295 Modified Files: compile.c Log Message: just fixing the indentation Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.115 retrieving revision 2.116 diff -C2 -r2.115 -r2.116 *** compile.c 2000/07/13 06:15:04 2.115 --- compile.c 2000/07/13 06:24:29 2.116 *************** *** 3109,3113 **** c->c_errors++; } ! if (PyDict_GetItem(c->c_locals, nameval)) { com_error(c, PyExc_SyntaxError,"duplicate argument in function definition"); } --- 3109,3113 ---- c->c_errors++; } ! if (PyDict_GetItem(c->c_locals, nameval)) { com_error(c, PyExc_SyntaxError,"duplicate argument in function definition"); } From python-dev@python.org Thu Jul 13 07:32:30 2000 From: python-dev@python.org (Barry Warsaw) Date: Wed, 12 Jul 2000 23:32:30 -0700 Subject: [Python-checkins] CVS: python/nondist/peps - New directory Message-ID: <200007130632.XAA18665@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv18652/peps Log Message: Directory /cvsroot/python/python/nondist/peps added to the repository From python-dev@python.org Thu Jul 13 07:33:10 2000 From: python-dev@python.org (Barry Warsaw) Date: Wed, 12 Jul 2000 23:33:10 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,NONE,1.1 pep-0001.txt,NONE,1.1 pep-0200.txt,NONE,1.1 pep-0201.txt,NONE,1.1 pep-0202.txt,NONE,1.1 pep-0203.txt,NONE,1.1 Message-ID: <200007130633.XAA18817@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv18795 Added Files: pep-0000.txt pep-0001.txt pep-0200.txt pep-0201.txt pep-0202.txt pep-0203.txt Log Message: Initial set of Python Enhancement Proposals ***** Error reading new file(2, 'No such file or directory') ***** Error reading new file(2, 'No such file or directory') ***** Error reading new file(2, 'No such file or directory') ***** Error reading new file(2, 'No such file or directory') ***** Error reading new file(2, 'No such file or directory') ***** Error reading new file(2, 'No such file or directory') From python-dev@python.org Thu Jul 13 14:12:24 2000 From: python-dev@python.org (Eric S. Raymond) Date: Thu, 13 Jul 2000 06:12:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib netrc.py,1.4,1.5 Message-ID: <200007131312.GAA13270@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv13078 Modified Files: netrc.py Log Message: Fix bug open/243 reported by Dimitri Papadopoulos Index: netrc.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/netrc.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** netrc.py 2000/02/04 15:10:33 1.4 --- netrc.py 2000/07/13 13:12:21 1.5 *************** *** 16,20 **** self.macros = {} lexer = shlex.shlex(fp) ! lexer.wordchars = lexer.wordchars + '.' while 1: # Look for a machine, default, or macdef top-level keyword --- 16,21 ---- self.macros = {} lexer = shlex.shlex(fp) ! # Allows @ in hostnames. Not a big deal... ! lexer.wordchars = lexer.wordchars + '.-@' while 1: # Look for a machine, default, or macdef top-level keyword From python-dev@python.org Thu Jul 13 14:25:09 2000 From: python-dev@python.org (Eric S. Raymond) Date: Thu, 13 Jul 2000 06:25:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib netrc.py,1.5,1.6 Message-ID: <200007131325.GAA17041@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv17023 Modified Files: netrc.py Log Message: Apply Greg Kochanski's fix for open/265. Index: netrc.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/netrc.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** netrc.py 2000/07/13 13:12:21 1.5 --- netrc.py 2000/07/13 13:25:07 1.6 *************** *** 9,16 **** if not file: file = os.path.join(os.environ['HOME'], ".netrc") ! try: ! fp = open(file) ! except: ! return None self.hosts = {} self.macros = {} --- 9,13 ---- if not file: file = os.path.join(os.environ['HOME'], ".netrc") ! fp = open(file) self.hosts = {} self.macros = {} From python-dev@python.org Thu Jul 13 16:45:21 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 13 Jul 2000 08:45:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/freeze checkextensions_win32.py,1.4,1.5 extensions_win32.ini,1.2,1.3 freeze.py,1.35,1.36 winmakemakefile.py,1.10,1.11 Message-ID: <200007131545.IAA07292@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/freeze In directory slayer.i.sourceforge.net:/tmp/cvs-serv7174 Modified Files: checkextensions_win32.py extensions_win32.ini freeze.py winmakemakefile.py Log Message: Patch by Toby Dickenson, mentored by Mark Hammond, to support automatically finding (most of) the standard PYD extensions, and to remove the hardcoded Python version. Index: checkextensions_win32.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/freeze/checkextensions_win32.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** checkextensions_win32.py 1999/11/02 15:44:40 1.4 --- checkextensions_win32.py 2000/07/13 15:45:17 1.5 *************** *** 55,59 **** return self.linkerLibs ! def checkextensions(unknown, extra_inis): # Create a table of frozen extensions --- 55,59 ---- return self.linkerLibs ! def checkextensions(unknown, extra_inis, prefix): # Create a table of frozen extensions *************** *** 69,73 **** for ini in extra_inis: # print "Looking for", mod, "in", win32api.GetFullPathName(ini),"...", ! defn = get_extension_defn( mod, ini ) if defn is not None: # print "Yay - found it!" --- 69,73 ---- for ini in extra_inis: # print "Looking for", mod, "in", win32api.GetFullPathName(ini),"...", ! defn = get_extension_defn( mod, ini, prefix ) if defn is not None: # print "Yay - found it!" *************** *** 80,85 **** return ret ! def get_extension_defn(moduleName, mapFileName): if win32api is None: return None dsp = win32api.GetProfileVal(moduleName, "dsp", "", mapFileName) if dsp=="": --- 80,86 ---- return ret ! def get_extension_defn(moduleName, mapFileName, prefix): if win32api is None: return None + os.environ['PYTHONPREFIX'] = prefix dsp = win32api.GetProfileVal(moduleName, "dsp", "", mapFileName) if dsp=="": Index: extensions_win32.ini =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/freeze/extensions_win32.ini,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** extensions_win32.ini 1998/08/25 14:06:53 1.2 --- extensions_win32.ini 2000/07/13 15:45:17 1.3 *************** *** 10,16 **** --- 10,61 ---- ; to point to the root win32 extensions directory + ; PYTHONPREFIX must point to the Python build root directory + ; (the *parent* of PCbuild); normally the freeze script takes + ; care of this. + + + + ;-------------------------------------------------------------- ; + ; Standard Python extension modules + ; + + ; Here are some of the standard Python extensions modules. + ; If you need others, add them here + + [_socket] + dsp=%PYTHONPREFIX%\PCBuild\_socket.dsp + + [_sre] + dsp=%PYTHONPREFIX%\PCBuild\_sre.dsp + + [unicodedata] + dsp=%PYTHONPREFIX%\PCBuild\unicodedata.dsp + + [mmap] + dsp=%PYTHONPREFIX%\PCBuild\mmap.dsp + + [winsound] + dsp=%PYTHONPREFIX%\PCBuild\winsound.dsp + libs=winmm.lib + + [parser] + dsp=%PYTHONPREFIX%\PCBuild\parser.dsp + + [select] + dsp=%PYTHONPREFIX%\PCBuild\select.dsp + + [ucnhash] + dsp=%PYTHONPREFIX%\PCBuild\ucnhash.dsp + + [zlib] + dsp=%PYTHONPREFIX%\PCBuild\zlib.dsp + cl=/I %PYTHONPREFIX%\..\zlib113 /D WINDOWS /D _WINDOWS /D ZLIB_DLL /D WIN32 + libs=%PYTHONPREFIX%\..\zlib113dll\static32\zlibstat.lib /nodefaultlib:libc + + ;-------------------------------------------------------------- + ; ; Win32 Projects. ; *************** *** 40,43 **** --- 85,92 ---- cl=/I %PYTHONEX%\win32\src + [win32process] + dsp=%PYTHONEX%\win32\win32process.dsp + cl=/I %PYTHONEX%\win32\src + [win32event] dsp=%PYTHONEX%\win32\win32event.dsp *************** *** 82,85 **** --- 131,138 ---- cl=/I %PYTHONEX%\com\win32com\src\include /I %PYTHONEX%\win32\src libs=uuid.lib + + [win32com.axcontrol.axcontrol] + dsp=%PYTHONEX%\com\axcontrol.dsp + cl=/I %PYTHONEX%\win32\src /I %PYTHONEX%\com\win32com\src\include [win32com.axscript.axscript] Index: freeze.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/freeze/freeze.py,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** freeze.py 2000/05/06 03:18:08 1.35 --- freeze.py 2000/07/13 15:45:17 1.36 *************** *** 113,117 **** # default the exclude list for each platform if win: exclude = exclude + [ ! 'dos', 'dospath', 'mac', 'macpath', 'macfs', 'MACFS', 'posix', 'os2'] # modules that are imported by the Python runtime --- 113,117 ---- # default the exclude list for each platform if win: exclude = exclude + [ ! 'dos', 'dospath', 'mac', 'macpath', 'macfs', 'MACFS', 'posix', 'os2', 'ce'] # modules that are imported by the Python runtime *************** *** 377,381 **** # (including its source files) frozen_extensions = checkextensions_win32.checkextensions( ! unknown, extensions) for mod in frozen_extensions: unknown.remove(mod.name) --- 377,381 ---- # (including its source files) frozen_extensions = checkextensions_win32.checkextensions( ! unknown, extensions, prefix) for mod in frozen_extensions: unknown.remove(mod.name) Index: winmakemakefile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/freeze/winmakemakefile.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** winmakemakefile.py 1999/11/02 15:44:40 1.10 --- winmakemakefile.py 2000/07/13 15:45:17 1.11 *************** *** 52,55 **** --- 52,56 ---- def realwork(vars, moddefns, target): + version_suffix = `sys.version_info[0]`+`sys.version_info[1]` print "# Makefile for Microsoft Visual C++ generated by freeze.py script" print *************** *** 73,77 **** print '# The following line assumes you have built Python using the standard instructions' print '# Otherwise fix the following line to point to the library.' ! print 'pythonlib = "$(pythonhome)/pcbuild/python15$(debug_suffix).lib"' print --- 74,78 ---- print '# The following line assumes you have built Python using the standard instructions' print '# Otherwise fix the following line to point to the library.' ! print 'pythonlib = "$(pythonhome)/pcbuild/python%s$(debug_suffix).lib"' % version_suffix print *************** *** 88,92 **** ! print "# As the target uses Python15.dll, we must use this compiler option!" print "cdl = /MD" print --- 89,93 ---- ! print "# As the target uses Python%s.dll, we must use this compiler option!" % version_suffix print "cdl = /MD" print From python-dev@python.org Thu Jul 13 20:39:18 2000 From: python-dev@python.org (Jeremy Hylton) Date: Thu, 13 Jul 2000 12:39:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include abstract.h,2.22,2.23 Message-ID: <200007131939.MAA18030@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv18016/Include Modified Files: abstract.h Log Message: fix PyXXX_Length macros as suggested by Fred Index: abstract.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/abstract.h,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** abstract.h 2000/07/12 12:56:18 2.22 --- abstract.h 2000/07/13 19:39:15 2.23 *************** *** 384,388 **** DL_IMPORT(int) PyObject_Size(PyObject *o); ! #define PyObject_Length(O) PyObject_Size((O)) /* --- 384,388 ---- DL_IMPORT(int) PyObject_Size(PyObject *o); ! #define PyObject_Length PyObject_Size /* *************** *** 686,690 **** DL_IMPORT(int) PySequence_Size(PyObject *o); ! #define PySequence_Length(O) PySequence_Size((O)) /* --- 686,690 ---- DL_IMPORT(int) PySequence_Size(PyObject *o); ! #define PySequence_Length PySequence_Size /* *************** *** 840,844 **** DL_IMPORT(int) PyMapping_Size(PyObject *o); ! #define PyMapping_Length(O) PyMapping_Size((O)) /* --- 840,844 ---- DL_IMPORT(int) PyMapping_Size(PyObject *o); ! #define PyMapping_Length PyMapping_Size /* From python-dev@python.org Thu Jul 13 21:25:47 2000 From: python-dev@python.org (Jeremy Hylton) Date: Thu, 13 Jul 2000 13:25:47 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.1,1.2 Message-ID: <200007132025.NAA28269@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv28254 Modified Files: pep-0000.txt Log Message: added names of owners (hope they're right) Barry can fix them if they aren't Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0000.txt 2000/07/13 06:33:08 1.1 --- pep-0000.txt 2000/07/13 20:25:45 1.2 *************** *** 14,26 **** Index ! num filename title ! ---- -------- ----- ! 0 pep-0000.txt Index of Python Enhance Proposals ! 1 pep-0001.txt PEP Guidelines ! 200 pep-0200.txt Python 2.0 Release Schedule ! 201 pep-0201.txt Parallel Iteration ! 202 pep-0202.txt List Comprehensions ! 203 pep-0203.txt Augmented Assignments --- 14,26 ---- Index ! num filename title owner ! ---- -------- ----- ----- ! 0 pep-0000.txt Index of Python Enhance Proposals bwarsaw ! 1 pep-0001.txt PEP Guidelines bwarsaw, jhylton ! 200 pep-0200.txt Python 2.0 Release Schedule jhylton ! 201 pep-0201.txt Parallel Iteration bwarsaw ! 202 pep-0202.txt List Comprehensions tim_one ! 203 pep-0203.txt Augmented Assignments guido From python-dev@python.org Thu Jul 13 21:52:42 2000 From: python-dev@python.org (Jeremy Hylton) Date: Thu, 13 Jul 2000 13:52:42 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.2,1.3 Message-ID: <200007132052.NAA30355@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv30336 Modified Files: pep-0000.txt Log Message: believe twouters is actually responsible for 203 Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pep-0000.txt 2000/07/13 20:25:45 1.2 --- pep-0000.txt 2000/07/13 20:52:39 1.3 *************** *** 22,26 **** 201 pep-0201.txt Parallel Iteration bwarsaw 202 pep-0202.txt List Comprehensions tim_one ! 203 pep-0203.txt Augmented Assignments guido --- 22,26 ---- 201 pep-0201.txt Parallel Iteration bwarsaw 202 pep-0202.txt List Comprehensions tim_one ! 203 pep-0203.txt Augmented Assignments twouters From python-dev@python.org Thu Jul 13 22:11:00 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Thu, 13 Jul 2000 14:11:00 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules arraymodule.c,2.47,2.48 Message-ID: <200007132111.OAA03982@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv3739 Modified Files: arraymodule.c Log Message: ANSI-fication (got lost in the deep seas of source forge ) Index: arraymodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v retrieving revision 2.47 retrieving revision 2.48 diff -C2 -r2.47 -r2.48 *** arraymodule.c 2000/07/09 03:09:55 2.47 --- arraymodule.c 2000/07/13 21:10:57 2.48 *************** *** 59,65 **** static PyObject * ! c_getitem(ap, i) ! arrayobject *ap; ! int i; { return PyString_FromStringAndSize(&((char *)ap->ob_item)[i], 1); --- 59,63 ---- static PyObject * ! c_getitem(arrayobject *ap, int i) { return PyString_FromStringAndSize(&((char *)ap->ob_item)[i], 1); *************** *** 67,74 **** static int ! c_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { char x; --- 65,69 ---- static int ! c_setitem(arrayobject *ap, int i, PyObject *v) { char x; *************** *** 81,87 **** static PyObject * ! b_getitem(ap, i) ! arrayobject *ap; ! int i; { long x = ((char *)ap->ob_item)[i]; --- 76,80 ---- static PyObject * ! b_getitem(arrayobject *ap, int i) { long x = ((char *)ap->ob_item)[i]; *************** *** 92,99 **** static int ! b_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { short x; --- 85,89 ---- static int ! b_setitem(arrayobject *ap, int i, PyObject *v) { short x; *************** *** 119,125 **** static PyObject * ! BB_getitem(ap, i) ! arrayobject *ap; ! int i; { long x = ((unsigned char *)ap->ob_item)[i]; --- 109,113 ---- static PyObject * ! BB_getitem(arrayobject *ap, int i) { long x = ((unsigned char *)ap->ob_item)[i]; *************** *** 128,135 **** static int ! BB_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { unsigned char x; --- 116,120 ---- static int ! BB_setitem(arrayobject *ap, int i, PyObject *v) { unsigned char x; *************** *** 143,149 **** static PyObject * ! h_getitem(ap, i) ! arrayobject *ap; ! int i; { return PyInt_FromLong((long) ((short *)ap->ob_item)[i]); --- 128,132 ---- static PyObject * ! h_getitem(arrayobject *ap, int i) { return PyInt_FromLong((long) ((short *)ap->ob_item)[i]); *************** *** 151,158 **** static int ! h_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { short x; --- 134,138 ---- static int ! h_setitem(arrayobject *ap, int i, PyObject *v) { short x; *************** *** 166,172 **** static PyObject * ! HH_getitem(ap, i) ! arrayobject *ap; ! int i; { return PyInt_FromLong((long) ((unsigned short *)ap->ob_item)[i]); --- 146,150 ---- static PyObject * ! HH_getitem(arrayobject *ap, int i) { return PyInt_FromLong((long) ((unsigned short *)ap->ob_item)[i]); *************** *** 174,181 **** static int ! HH_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { int x; --- 152,156 ---- static int ! HH_setitem(arrayobject *ap, int i, PyObject *v) { int x; *************** *** 200,206 **** static PyObject * ! i_getitem(ap, i) ! arrayobject *ap; ! int i; { return PyInt_FromLong((long) ((int *)ap->ob_item)[i]); --- 175,179 ---- static PyObject * ! i_getitem(arrayobject *ap, int i) { return PyInt_FromLong((long) ((int *)ap->ob_item)[i]); *************** *** 208,215 **** static int ! i_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { int x; --- 181,185 ---- static int ! i_setitem(arrayobject *ap, int i, PyObject *v) { int x; *************** *** 223,229 **** static PyObject * ! II_getitem(ap, i) ! arrayobject *ap; ! int i; { return PyLong_FromUnsignedLong( --- 193,197 ---- static PyObject * ! II_getitem(arrayobject *ap, int i) { return PyLong_FromUnsignedLong( *************** *** 232,239 **** static int ! II_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { unsigned long x; --- 200,204 ---- static int ! II_setitem(arrayobject *ap, int i, PyObject *v) { unsigned long x; *************** *** 267,273 **** static PyObject * ! l_getitem(ap, i) ! arrayobject *ap; ! int i; { return PyInt_FromLong(((long *)ap->ob_item)[i]); --- 232,236 ---- static PyObject * ! l_getitem(arrayobject *ap, int i) { return PyInt_FromLong(((long *)ap->ob_item)[i]); *************** *** 275,282 **** static int ! l_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { long x; --- 238,242 ---- static int ! l_setitem(arrayobject *ap, int i, PyObject *v) { long x; *************** *** 289,295 **** static PyObject * ! LL_getitem(ap, i) ! arrayobject *ap; ! int i; { return PyLong_FromUnsignedLong(((unsigned long *)ap->ob_item)[i]); --- 249,253 ---- static PyObject * ! LL_getitem(arrayobject *ap, int i) { return PyLong_FromUnsignedLong(((unsigned long *)ap->ob_item)[i]); *************** *** 297,304 **** static int ! LL_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { unsigned long x; --- 255,259 ---- static int ! LL_setitem(arrayobject *ap, int i, PyObject *v) { unsigned long x; *************** *** 332,338 **** static PyObject * ! f_getitem(ap, i) ! arrayobject *ap; ! int i; { return PyFloat_FromDouble((double) ((float *)ap->ob_item)[i]); --- 287,291 ---- static PyObject * ! f_getitem(arrayobject *ap, int i) { return PyFloat_FromDouble((double) ((float *)ap->ob_item)[i]); *************** *** 340,347 **** static int ! f_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { float x; --- 293,297 ---- static int ! f_setitem(arrayobject *ap, int i, PyObject *v) { float x; *************** *** 354,360 **** static PyObject * ! d_getitem(ap, i) ! arrayobject *ap; ! int i; { return PyFloat_FromDouble(((double *)ap->ob_item)[i]); --- 304,308 ---- static PyObject * ! d_getitem(arrayobject *ap, int i) { return PyFloat_FromDouble(((double *)ap->ob_item)[i]); *************** *** 362,369 **** static int ! d_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { double x; --- 310,314 ---- static int ! d_setitem(arrayobject *ap, int i, PyObject *v) { double x; *************** *** 394,400 **** static PyObject * ! newarrayobject(size, descr) ! int size; ! struct arraydescr *descr; { arrayobject *op; --- 339,343 ---- static PyObject * ! newarrayobject(int size, struct arraydescr *descr) { arrayobject *op; *************** *** 429,434 **** #if 0 static int ! getarraysize(op) ! PyObject *op; { if (!is_arrayobject(op)) { --- 372,376 ---- #if 0 static int ! getarraysize(PyObject *op) { if (!is_arrayobject(op)) { *************** *** 441,447 **** static PyObject * ! getarrayitem(op, i) ! PyObject *op; ! int i; { register arrayobject *ap; --- 383,387 ---- static PyObject * ! getarrayitem(PyObject *op, int i) { register arrayobject *ap; *************** *** 459,466 **** static int ! ins1(self, where, v) ! arrayobject *self; ! int where; ! PyObject *v; { char *items; --- 399,403 ---- static int ! ins1(arrayobject *self, int where, PyObject *v) { char *items; *************** *** 492,499 **** #if 0 static int ! insarrayitem(op, where, newitem) ! PyObject *op; ! int where; ! PyObject *newitem; { if (!is_arrayobject(op)) { --- 429,433 ---- #if 0 static int ! insarrayitem(PyObject *op, int where, PyObject *newitem) { if (!is_arrayobject(op)) { *************** *** 505,511 **** static int ! addarrayitem(op, newitem) ! PyObject *op; ! PyObject *newitem; { if (!is_arrayobject(op)) { --- 439,443 ---- static int ! addarrayitem(PyObject *op, PyObject *newitem) { if (!is_arrayobject(op)) { *************** *** 521,526 **** static void ! array_dealloc(op) ! arrayobject *op; { if (op->ob_item != NULL) --- 453,457 ---- static void ! array_dealloc(arrayobject *op) { if (op->ob_item != NULL) *************** *** 530,535 **** static int ! array_compare(v, w) ! arrayobject *v, *w; { int len = (v->ob_size < w->ob_size) ? v->ob_size : w->ob_size; --- 461,465 ---- static int ! array_compare(arrayobject *v, arrayobject *w) { int len = (v->ob_size < w->ob_size) ? v->ob_size : w->ob_size; *************** *** 553,558 **** static int ! array_length(a) ! arrayobject *a; { return a->ob_size; --- 483,487 ---- static int ! array_length(arrayobject *a) { return a->ob_size; *************** *** 560,566 **** static PyObject * ! array_item(a, i) ! arrayobject *a; ! int i; { if (i < 0 || i >= a->ob_size) { --- 489,493 ---- static PyObject * ! array_item(arrayobject *a, int i) { if (i < 0 || i >= a->ob_size) { *************** *** 572,578 **** static PyObject * ! array_slice(a, ilow, ihigh) ! arrayobject *a; ! int ilow, ihigh; { arrayobject *np; --- 499,503 ---- static PyObject * ! array_slice(arrayobject *a, int ilow, int ihigh) { arrayobject *np; *************** *** 596,602 **** static PyObject * ! array_concat(a, bb) ! arrayobject *a; ! PyObject *bb; { int size; --- 521,525 ---- static PyObject * ! array_concat(arrayobject *a, PyObject *bb) { int size; *************** *** 626,632 **** static PyObject * ! array_repeat(a, n) ! arrayobject *a; ! int n; { int i; --- 549,553 ---- static PyObject * ! array_repeat(arrayobject *a, int n) { int i; *************** *** 651,658 **** static int ! array_ass_slice(a, ilow, ihigh, v) ! arrayobject *a; ! int ilow, ihigh; ! PyObject *v; { char *item; --- 572,576 ---- static int ! array_ass_slice(arrayobject *a, int ilow, int ihigh, PyObject *v) { char *item; *************** *** 725,732 **** static int ! array_ass_item(a, i, v) ! arrayobject *a; ! int i; ! PyObject *v; { if (i < 0 || i >= a->ob_size) { --- 643,647 ---- static int ! array_ass_item(arrayobject *a, int i, PyObject *v) { if (i < 0 || i >= a->ob_size) { *************** *** 741,748 **** static int ! setarrayitem(a, i, v) ! PyObject *a; ! int i; ! PyObject *v; { if (!is_arrayobject(a)) { --- 656,660 ---- static int ! setarrayitem(PyObject *a, int i, PyObject *v) { if (!is_arrayobject(a)) { *************** *** 754,761 **** static PyObject * ! ins(self, where, v) ! arrayobject *self; ! int where; ! PyObject *v; { if (ins1(self, where, v) != 0) --- 666,670 ---- static PyObject * ! ins(arrayobject *self, int where, PyObject *v) { if (ins1(self, where, v) != 0) *************** *** 766,772 **** static PyObject * ! array_insert(self, args) ! arrayobject *self; ! PyObject *args; { int i; --- 675,679 ---- static PyObject * ! array_insert(arrayobject *self, PyObject *args) { int i; *************** *** 784,790 **** static PyObject * ! array_buffer_info(self, args) ! arrayobject *self; ! PyObject *args; { PyObject* retval = PyTuple_New(2); --- 691,695 ---- static PyObject * ! array_buffer_info(arrayobject *self, PyObject *args) { PyObject* retval = PyTuple_New(2); *************** *** 805,811 **** static PyObject * ! array_append(self, args) ! arrayobject *self; ! PyObject *args; { PyObject *v; --- 710,714 ---- static PyObject * ! array_append(arrayobject *self, PyObject *args) { PyObject *v; *************** *** 822,828 **** static PyObject * ! array_byteswap(self, args) ! arrayobject *self; ! PyObject *args; { char *p; --- 725,729 ---- static PyObject * ! array_byteswap(arrayobject *self, PyObject *args) { char *p; *************** *** 884,890 **** static PyObject * ! array_reverse(self, args) ! arrayobject *self; ! PyObject *args; { register int itemsize = self->ob_descr->itemsize; --- 785,789 ---- static PyObject * ! array_reverse(arrayobject *self, PyObject *args) { register int itemsize = self->ob_descr->itemsize; *************** *** 923,929 **** #if 0 static PyObject * ! array_index(self, args) ! arrayobject *self; ! PyObject *args; { int i; --- 822,826 ---- #if 0 static PyObject * ! array_index(arrayobject *self, PyObject *args) { int i; *************** *** 945,951 **** #if 0 static PyObject * ! array_count(self, args) ! arrayobject *self; ! PyObject *args; { int count = 0; --- 842,846 ---- #if 0 static PyObject * ! array_count(arrayobject *self, PyObject *args) { int count = 0; *************** *** 967,973 **** #if 0 static PyObject * ! array_remove(self, args) ! arrayobject *self; ! PyObject *args; { int i; --- 862,866 ---- #if 0 static PyObject * ! array_remove(arrayobject *self, PyObject *args) { int i; *************** *** 993,999 **** static PyObject * ! array_fromfile(self, args) ! arrayobject *self; ! PyObject *args; { PyObject *f; --- 886,890 ---- static PyObject * ! array_fromfile(arrayobject *self, PyObject *args) { PyObject *f; *************** *** 1049,1055 **** static PyObject * ! array_tofile(self, args) ! arrayobject *self; ! PyObject *args; { PyObject *f; --- 940,944 ---- static PyObject * ! array_tofile(arrayobject *self, PyObject *args) { PyObject *f; *************** *** 1082,1088 **** static PyObject * ! array_fromlist(self, args) ! arrayobject *self; ! PyObject *args; { int n; --- 971,975 ---- static PyObject * ! array_fromlist(arrayobject *self, PyObject *args) { int n; *************** *** 1129,1135 **** static PyObject * ! array_tolist(self, args) ! arrayobject *self; ! PyObject *args; { PyObject *list = PyList_New(self->ob_size); --- 1016,1020 ---- static PyObject * ! array_tolist(arrayobject *self, PyObject *args) { PyObject *list = PyList_New(self->ob_size); *************** *** 1155,1161 **** static PyObject * ! array_fromstring(self, args) ! arrayobject *self; ! PyObject *args; { char *str; --- 1040,1044 ---- static PyObject * ! array_fromstring(arrayobject *self, PyObject *args) { char *str; *************** *** 1194,1200 **** static PyObject * ! array_tostring(self, args) ! arrayobject *self; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 1077,1081 ---- static PyObject * ! array_tostring(arrayobject *self, PyObject *args) { if (!PyArg_Parse(args, "")) *************** *** 1233,1239 **** static PyObject * ! array_getattr(a, name) ! arrayobject *a; ! char *name; { if (strcmp(name, "typecode") == 0) { --- 1114,1118 ---- static PyObject * ! array_getattr(arrayobject *a, char *name) { if (strcmp(name, "typecode") == 0) { *************** *** 1262,1269 **** static int ! array_print(a, fp, flags) ! arrayobject *a; ! FILE *fp; ! int flags; { int ok = 0; --- 1141,1145 ---- static int ! array_print(arrayobject *a, FILE *fp, int flags) { int ok = 0; *************** *** 1296,1301 **** static PyObject * ! array_repr(a) ! arrayobject *a; { char buf[256]; --- 1172,1176 ---- static PyObject * ! array_repr(arrayobject *a) { char buf[256]; *************** *** 1334,1341 **** static int ! array_buffer_getreadbuf(self, index, ptr) ! arrayobject *self; ! int index; ! const void **ptr; { if ( index != 0 ) { --- 1209,1213 ---- static int ! array_buffer_getreadbuf(arrayobject *self, int index, const void **ptr) { if ( index != 0 ) { *************** *** 1349,1356 **** static int ! array_buffer_getwritebuf(self, index, ptr) ! arrayobject *self; ! int index; ! const void **ptr; { if ( index != 0 ) { --- 1221,1225 ---- static int ! array_buffer_getwritebuf(arrayobject *self, int index, const void **ptr) { if ( index != 0 ) { *************** *** 1364,1370 **** static int ! array_buffer_getsegcount(self, lenp) ! arrayobject *self; ! int *lenp; { if ( lenp ) --- 1233,1237 ---- static int ! array_buffer_getsegcount(arrayobject *self, int *lenp) { if ( lenp ) *************** *** 1393,1399 **** static PyObject * ! a_array(self, args) ! PyObject *self; ! PyObject *args; { char c; --- 1260,1264 ---- static PyObject * ! a_array(PyObject *self, PyObject *args) { char c; From python-dev@python.org Fri Jul 14 00:56:56 2000 From: python-dev@python.org (A.M. Kuchling) Date: Thu, 13 Jul 2000 16:56:56 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include fileobject.h,2.20,2.21 Message-ID: <200007132356.QAA29091@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv29070/Include Modified Files: fileobject.h Log Message: Added PyObject_AsFileDescriptor, which checks for integer, long integer, or .fileno() method Index: fileobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/fileobject.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** fileobject.h 2000/07/09 00:20:36 2.20 --- fileobject.h 2000/07/13 23:56:54 2.21 *************** *** 31,34 **** --- 31,35 ---- extern DL_IMPORT(int) PyFile_SoftSpace(PyObject *, int); extern DL_IMPORT(int) PyFile_WriteString(char *, PyObject *); + extern DL_IMPORT(int) PyObject_AsFileDescriptor(PyObject *); #ifdef __cplusplus From python-dev@python.org Fri Jul 14 00:56:56 2000 From: python-dev@python.org (A.M. Kuchling) Date: Thu, 13 Jul 2000 16:56:56 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects fileobject.c,2.80,2.81 Message-ID: <200007132356.QAA29095@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv29070/Objects Modified Files: fileobject.c Log Message: Added PyObject_AsFileDescriptor, which checks for integer, long integer, or .fileno() method Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.80 retrieving revision 2.81 diff -C2 -r2.80 -r2.81 *** fileobject.c 2000/07/09 05:02:18 2.80 --- fileobject.c 2000/07/13 23:56:54 2.81 *************** *** 1099,1100 **** --- 1099,1158 ---- return -1; } + + /* Try to get a file-descriptor from a Python object. If the object + is an integer or long integer, its value is returned. If not, the + object's fileno() method is called if it exists; the method must return + an integer or long integer, which is returned as the file descriptor value. + -1 is returned on failure. + */ + + int PyObject_AsFileDescriptor(PyObject *o) + { + int fd; + PyObject *meth; + + if (PyInt_Check(o)) { + fd = PyInt_AsLong(o); + } + else if (PyLong_Check(o)) { + fd = PyLong_AsLong(o); + } + else if ((meth = PyObject_GetAttrString(o, "fileno")) != NULL) + { + PyObject *fno = PyEval_CallObject(meth, NULL); + Py_DECREF(meth); + if (fno == NULL) + return -1; + + if (PyInt_Check(fno)) { + fd = PyInt_AsLong(fno); + Py_DECREF(fno); + } + else if (PyLong_Check(fno)) { + fd = PyLong_AsLong(fno); + Py_DECREF(fno); + } + else { + PyErr_SetString(PyExc_TypeError, + "fileno() returned a non-integer"); + Py_DECREF(fno); + return -1; + } + } + else { + PyErr_SetString(PyExc_TypeError, + "argument must be an int, or have a fileno() method."); + return -1; + } + + if (fd < 0) { + PyErr_Format(PyExc_ValueError, + "file descriptor cannot be a negative integer (%i)", + fd); + return -1; + } + return fd; + } + + + From python-dev@python.org Fri Jul 14 00:58:18 2000 From: python-dev@python.org (A.M. Kuchling) Date: Thu, 13 Jul 2000 16:58:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/api api.tex,1.73,1.74 refcounts.dat,1.11,1.12 Message-ID: <200007132358.QAA29152@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/api In directory slayer.i.sourceforge.net:/tmp/cvs-serv29126 Modified Files: api.tex refcounts.dat Log Message: Document PyObject_AsFileDescriptor Index: api.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/api.tex,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -r1.73 -r1.74 *** api.tex 2000/07/07 15:47:06 1.73 --- api.tex 2000/07/13 23:58:16 1.74 *************** *** 1420,1423 **** --- 1420,1430 ---- \end{cfuncdesc} + \begin{cfuncdesc}{int}{PyObject_AsFileDescriptor}{PyObject *o} + Derives a file-descriptor from a Python object. If the object + is an integer or long integer, its value is returned. If not, the + object's \method{fileno()} method is called if it exists; the method + must return an integer or long integer, which is returned as the file + descriptor value. Returns \code{-1} on failure. + \end{cfuncdesc} \section{Number Protocol \label{number}} Index: refcounts.dat =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/refcounts.dat,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** refcounts.dat 2000/07/07 15:48:54 1.11 --- refcounts.dat 2000/07/13 23:58:16 1.12 *************** *** 540,543 **** --- 540,546 ---- PyOS_GetLastModificationTime:char*:filename:: + PyObject_AsFileDescriptor:int::: + PyObject_AsFileDescriptor:PyObject*:o:0: + PyObject_CallFunction:PyObject*::+1: PyObject_CallFunction:PyObject*:callable_object:0: From python-dev@python.org Fri Jul 14 00:59:37 2000 From: python-dev@python.org (A.M. Kuchling) Date: Thu, 13 Jul 2000 16:59:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _tkinter.c,1.106,1.107 selectmodule.c,2.37,2.38 Message-ID: <200007132359.QAA29193@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv29178 Modified Files: _tkinter.c selectmodule.c Log Message: Use PyObject_AsFileDescriptor Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.106 retrieving revision 1.107 diff -C2 -r1.106 -r1.107 *** _tkinter.c 2000/07/12 13:05:33 1.106 --- _tkinter.c 2000/07/13 23:59:35 1.107 *************** *** 1427,1472 **** } - static int - GetFileNo(PyObject *file) - /* Either an int >= 0 or an object with a - *.fileno() method that returns an int >= 0 - */ - { - PyObject *meth, *args, *res; - int id; - if (PyInt_Check(file)) { - id = PyInt_AsLong(file); - if (id < 0) - PyErr_SetString(PyExc_ValueError, "invalid file id"); - return id; - } - args = PyTuple_New(0); - if (args == NULL) - return -1; - - meth = PyObject_GetAttrString(file, "fileno"); - if (meth == NULL) { - Py_DECREF(args); - return -1; - } - - res = PyEval_CallObject(meth, args); - Py_DECREF(args); - Py_DECREF(meth); - if (res == NULL) - return -1; - - if (PyInt_Check(res)) - id = PyInt_AsLong(res); - else - id = -1; - - if (id < 0) - PyErr_SetString(PyExc_ValueError, - "invalid fileno() return value"); - Py_DECREF(res); - return id; - } - static PyObject * Tkapp_CreateFileHandler(PyObject *self, PyObject *args) --- 1427,1430 ---- *************** *** 1479,1483 **** if (!PyArg_ParseTuple(args, "OiO:createfilehandler", &file, &mask, &func)) return NULL; ! tfile = GetFileNo(file); if (tfile < 0) return NULL; --- 1437,1441 ---- if (!PyArg_ParseTuple(args, "OiO:createfilehandler", &file, &mask, &func)) return NULL; ! tfile = PyObject_AsFileDescriptor(file); if (tfile < 0) return NULL; *************** *** 1507,1511 **** if (!PyArg_ParseTuple(args, "O:deletefilehandler", &file)) return NULL; ! tfile = GetFileNo(file); if (tfile < 0) return NULL; --- 1465,1469 ---- if (!PyArg_ParseTuple(args, "O:deletefilehandler", &file)) return NULL; ! tfile = PyObject_AsFileDescriptor(file); if (tfile < 0) return NULL; Index: selectmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v retrieving revision 2.37 retrieving revision 2.38 diff -C2 -r2.37 -r2.38 *** selectmodule.c 2000/07/11 21:35:02 2.37 --- selectmodule.c 2000/07/13 23:59:35 2.38 *************** *** 97,125 **** Py_INCREF(o); - if (PyInt_Check(o)) { - v = PyInt_AsLong(o); - } - else if ((meth = PyObject_GetAttrString(o, "fileno")) != NULL) - { - PyObject *fno = PyEval_CallObject(meth, NULL); - Py_DECREF(meth); - if (fno == NULL) - goto finally; - - if (!PyInt_Check(fno)) { - PyErr_SetString(PyExc_TypeError, - "fileno method returned a non-integer"); - Py_DECREF(fno); - goto finally; - } - v = PyInt_AsLong(fno); - Py_DECREF(fno); - } - else { - PyErr_SetString(PyExc_TypeError, - "argument must be an int, or have a fileno() method."); - goto finally; - } #if defined(_MSC_VER) max = 0; /* not used for Win32 */ --- 97,103 ---- Py_INCREF(o); + v = PyObject_AsFileDescriptor( o ); + if (v == -1) goto finally; #if defined(_MSC_VER) max = 0; /* not used for Win32 */ From python-dev@python.org Fri Jul 14 02:28:50 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Thu, 13 Jul 2000 18:28:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc sf-faq.html,NONE,1.1 Message-ID: <200007140128.SAA15033@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv14976 Added Files: sf-faq.html Log Message: small FAQ about Python CVS and patches at SourceForge --- NEW FILE ---

Python at SourceForge - Frequently Asked Questions

0. Contents

1. General

  1. What is SourceForge?
  2. Where do I find Python there?

2. CVS

  1. How do I check out a CVS version of Python?
  2. What settings should I use?
  3. Troubleshooting: "Permission Denied"
  4. Where can I learn more about CVS?

3. Patches

  1. How to make a patch?
  2. How to submit patches?
  3. How to change the status of a patch?

A. Appendix

  1. Patch Manager Guidelines [09.07.2000]
  2. Python Patch Submission Guidelines [29.06.2000]

1. General

1.1.:

Q: What is SourceForge?

A:

SourceForge is a free hosting service for OpenSource projects. The main website is found at
http://sourceforge.net

1.2.:

Q: Where can I find Python on SourceForge?

A:

The Python project page can be found at
http://sourceforge.net/projects/python

2. CVS

2.1.:

Q: How do I check out a CVS version of Python?

A:

If  you are not a SourceForge-recognized Python developer you can still check out an anonymous CVS version (read-only) of Python:
export CVSROOT=:pserver:anonymous@cvs.python.sourceforge.net:/cvsroot/python
cvs login
cvs -z3 co python
If you are indeed a developer you can check out a read/write version with ssh:
export CVS_RSH=ssh
export CVSROOT=sf_username@cvs.python.sourceforge.net:/cvsroot/python
cvs -z3 co python

2.2.:

Q:  What setting should I use?

A:

That is, of course, hard to answer in the general case. I use the following .cvsrc file:
diff -c
update -d
This defaults diff to context diffs (almost a requirement as everything else is harder to read) and tells update to automatically checkout new subdirectories.

2.3.:

Q: I get the following error message:

Sorry, you don't have read/write access to the history file /cvsroot/python/CVSROOT/history
Permission denied

A:

If you are not a developer, you don't have read/write access. You have to check out an anonymous copy. If you are a developer you have to be in the SourceForge group "python". You can check this with the following commands:
ssh -l sf_username shell.sourceforge.net
groups
If you have just recently (< 6 hours) been added to the Python project, you probably have to wait for the SourceForge servers to synch up. This can take up to 6 hours.

2.4.:

Q: Where can I learn more about CVS?

A:

For SourceForge specific information consult their CVS documentation at
http://sfdocs.sourceforge.net/sfdocs
For general (and more advanced) information consult the free CVS Book at
http://cvsbook.red-bean.com/cvsbook.html#Introduction

3. Patches

3.1.:

Q: How to make a patch?

A:

If you are using CVS (anonymous or developer) you can use CVS to make the patches for you. Just edit your local copy and enter the following command:
cvs diff | tee ~/name_of_the_patch.diff
Else you can use the diff util which comes with most operating systems (a Windows version is available as part of the cygwin tools).
 

3.2.:

Q: How to submit a patch?

A:

Please read the Patch Submission Guidelines at
http://www.python.org/patches
A recent copy can be found in the Appendix of this FAQ.
 

3.3.:

Q: How to change the status of a patch?

A:

To change the status of a patch or assign it to somebody else you have to be a) a SourceForge-recognized Python developer and b) a patch administrator. Unfortunately the SourceForge default for developers is not to be patch administrators. Contact one of the project administrators if the following does not work for you.

Click on the patch itself. In the screen that comes up, there is a drop-box for "Assigned To:" and a drop-box for "Status:" where you can select a new responsible developer or a new status respectively. After selecting the appropriate victim and status, hit the "Submit Changes" button at the bottom of the page.

For more information about the use of the "Status:" and "Assigned To:" fields consult the Patch Manager Guidelines. A recent copy can be found in the Appendix of this FAQ.
 

A. Appendix

A.1.: Patch Manager Guidelines

Intended use of SourceForge patch status & "assigned to" fields

revision 2                                          09-Jul-2000

In general, the status field should be close to self-explanatory, and the "Assigned to:" field should be the person responsible for taking the next step in the patch process.  Both fields are expected to change value over the life of a patch; the normal workflow is detailed below.

When you've got the time and the ability, feel free to move any patch that catches your eye along, whether or not it's been assigned to you.  And if you're assigned to a patch but aren't going to take reasonably quick action (for whatever reason), please assign it to someone else ASAP:  at those times you can't actively help, actively get out of the way.

If you're an expert in some area and know that a patch in that area is both needed and non-controversial, just commit your changes directly -- no need then to get the patch mechanism involved in it.

You should add a comment to every patch assigned to you at least once a week, if only to say that you realize it's still on your plate.  This rule is meant to force your attention periodically:  patches get harder & harder to deal with the longer they sit.
 

Open

The initial status of all patches.
The patch is under consideration, but has not been reviewed yet.
The status will normally change to Accepted or Rejected next.
The person submitting the patch should (if they can) assign it to the person they most want to review it.
Else the patch will be assigned via [xxx a list of expertise areas should be developed] [xxx but since this hasn't happened and volunteers are too few, random assignment is better than nothing:  if you're a Python developer, expect to get assigned out of the blue!]
Discussion of major patches is carried out on the Python-Dev mailing list.  For simple patches, the SourceForge comment mechanism should be sufficient. [xxx an email gateway would be great, ditto Ping's Roundup]

Accepted

The powers that be accepted the patch, but it hasn't been applied yet. [xxx flesh out -- Guido Bottleneck avoidable here?]
The status will normally change to Closed next.
The person changing the status to Accepted should, at the same time, assign the patch to whoever they believe is most likely to be able & willing to apply it (the submitter if possible).

Closed

The patch has been accepted and applied.
The previous status was Accepted, or possibly Open if the submitter was Guido (or moral equivalent in some particular area of expertise).

Rejected

The patch has been reviewed and rejected.
When the objections are addressed, the status may change to Open again.
The person changing the status to Rejected should assign the patch back to the submitter, or if it's clear the patch will never be accepted, assign it to None.
Note that SourceForge allows the submitter to overwrite the patch with a new version.

Out of date

Previous status was Open or Accepted or Postponed, but the patch no longer works.
Please enter a comment when changing the status to "Out of date", to record the nature of the problem and the previous status.
Also assign it back to the submitter, as they need to upload a new version (note that SourceForge will not allow anyone other than the original submitter to update the patch).

Postponed

The previous status was Open or Accepted, but for some reason (e.g., pending release) the patch should not be reviewed or applied until further notice.
The status will normally change to Open or Accepted next.
Please enter a comment when changing the status to Postponed, to record the reason, the previous status, and the conditions under which the patch should revert to Open or Accepted.  Also assign the patch to whoever is most likely able and willing to decide when the status should change again.

Deleted

Bit bucket.
Use only if it's OK for the patch and its SourceForge history to disappear.
As of 09-July-2000, SF does not actually throw away Deleted patches, but that may change.

A.2.: Python Patch Submission Guidelines

New: CNRI is no longer involved in Python patches. We no longer request legal disclaimers. Also, We're now using the SourceForge Patch Manager (a single mailing list became unmanageable).

Many people contribute patches to Python. We've set up a new system to deal with these. Here are the main guidelines:

  • Submit your patch to the patch manager interface at SourceForge. We strongly recommend that you register with SourceForge before submitting a patch. If you send patches directly to Guido you introduce an extra delay. Ditto for the "patches@python.org" mailing list address; this address should no longer be used for patch submission. The patch manager is for patches only; if you have a problem or suggestion but don't know how to write the code for it, use the Python Bugs List instead. The bugs list is searchable; if you have a problem and you're not sure if it has been reported or fixed already, this is the first place to look. (There used to be a separate TODO list; we now prefer that you use the bugs list for suggestions and requests too.)

  •  

     
     
     

    Submit documentation patches the same way. When adding the patch, be sure to set the "Category" field to "documentation". For documentation errors without patches, please use the Python Bugs List instead.

  • We like context diffs. We grudgingly accept unified diffs. Straight ("ed-style") diffs are right out! If you don't know how to generate context diffs, you're probably not qualified to produce high-quality patches anyway <0.5 wink>.
  • We appreciate it if you send patches relative to the current CVS tree. These are our latest sources. It's almost a year since Python 1.5.2 was released, and many source files have been touched in more or less significant ways; a patch relative to Python 1.5.2 can cause a lot of extra pain to apply right. Even a patch relative to the latest alpha or beta release may be way out of date.
  • Please add a succinct message to your SourceForge entry that explains what the patch is about that we can use directly as a checkin message. Ideally, such a message explains the problem and describes the fix in a few lines.
  • For patches that add or change functionality: please also update the documentation and the testcases (the Lib/test subdirectory). For new modules, we appreciate a new test module (typically test/test_spam.py). In this case, there's no need to mail the documentation to a different address (in fact, in order to verify that the bundle is complete, it's easier to mail everything together).
  • There are a variety of additional style requirements. Please have a look at these before writing new code. Also have a look at the general Python Style Guide.
From python-dev@python.org Fri Jul 14 02:43:34 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Thu, 13 Jul 2000 18:43:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc sf-faq.html,1.1,1.2 Message-ID: <200007140143.SAA15879@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv15862 Modified Files: sf-faq.html Log Message: added information how to edit pages at http://python.sourceforge.net Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/sf-faq.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** sf-faq.html 2000/07/14 01:28:47 1.1 --- sf-faq.html 2000/07/14 01:43:31 1.2 *************** *** 23,26 **** --- 23,29 ----
  • Where do I find Python there?
  • + +
  • + How can I change the pages at python.sourceforge.net?
  • *************** *** 95,98 **** --- 98,118 ----
    http://sourceforge.net/projects/python
    +

    + 1.3.:

    + +

    + Q: How can I change the pages at python.sourceforge.net?

    + +

    + A:

    + First you have to be in the SourceForge group "python" (true for + all developers). Then you can upload files using scp: +
    scp mylocalfile.html sf_username@shell.sourceforge.net:/home/groups/python/htdocs/
    + If you want to edit or remove files, you can use ssh: +
    ssh -l sf_username shell.sourceforge.net +
    cd /home/groups/python/htdocs +
    rm garbage.html +
    vi changeme.html
    +

    2. CVS

    *************** *** 146,150 **** If you are not a developer, you don't have read/write access. You have to check out an anonymous copy. If you are a developer you have to be in ! the SourceForge group "python". You can check this with the following commands:
    ssh -l sf_username shell.sourceforge.net
    groups
    --- 166,171 ---- If you are not a developer, you don't have read/write access. You have to check out an anonymous copy. If you are a developer you have to be in ! the SourceForge group "python". You can check this with the following ! commands:
    ssh -l sf_username shell.sourceforge.net
    groups
    *************** *** 343,353 **** that you use the bugs list for suggestions and requests too.) !
      !

      !
      !
      !

    Submit documentation patches the same way. When adding the patch, ! be sure to set the "Category" field to "documentation". For ! documentation errors without patches, please use the Python Bugs List instead.

  • --- 364,370 ---- that you use the bugs list for suggestions and requests too.)
  • !


    Submit documentation patches the same way. When adding the ! patch, be sure to set the "Category" field to "documentation". ! For documentation errors without patches, please use the Python Bugs List instead.

  • From python-dev@python.org Fri Jul 14 02:54:05 2000 From: python-dev@python.org (Jeremy Hylton) Date: Thu, 13 Jul 2000 18:54:05 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html - New directory Message-ID: <200007140154.SAA16350@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv16344/sf-html Log Message: Directory /cvsroot/python/python/nondist/sf-html added to the repository From python-dev@python.org Fri Jul 14 04:27:45 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 13 Jul 2000 20:27:45 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.3,1.4 Message-ID: <200007140327.UAA02884@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv2876 Modified Files: pep-0000.txt Log Message: Added PEP204, Range Literals, initially assigned to Thomas Wouters. Slight reformatting. Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** pep-0000.txt 2000/07/13 20:52:39 1.3 --- pep-0000.txt 2000/07/14 03:27:42 1.4 *************** *** 14,27 **** Index ! num filename title owner ! ---- -------- ----- ----- ! 0 pep-0000.txt Index of Python Enhance Proposals bwarsaw ! 1 pep-0001.txt PEP Guidelines bwarsaw, jhylton ! 200 pep-0200.txt Python 2.0 Release Schedule jhylton ! 201 pep-0201.txt Parallel Iteration bwarsaw ! 202 pep-0202.txt List Comprehensions tim_one ! 203 pep-0203.txt Augmented Assignments twouters ! --- 14,27 ---- Index ! num filename title owner ! --- ----------- ----- ----- ! 0 pep-0000.txt Index of Python Enhance Proposals bwarsaw ! 1 pep-0001.txt PEP Guidelines bwarsaw, jhylton ! 200 pep-0200.txt Python 2.0 Release Schedule jhylton ! 201 pep-0201.txt Parallel Iteration bwarsaw ! 202 pep-0202.txt List Comprehensions tim_one ! 203 pep-0203.txt Augmented Assignments twouters ! 204 pep-0204.txt Range Literals twouters From python-dev@python.org Fri Jul 14 04:29:14 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 13 Jul 2000 20:29:14 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0204.txt,NONE,1.1 Message-ID: <200007140329.UAA02938@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv2927 Added Files: pep-0204.txt Log Message: Range Literals PEP, initially assigned to Thomas Wouters. --- NEW FILE --- PEP: 203 Title: Range Literals Version: $Revision: 1.1 $ Owner: thomas@xs4all.net (Thomas Wouters) Python-Version: 2.0 Status: Incomplete Local Variables: mode: indented-text indent-tabs-mode: nil End: From python-dev@python.org Fri Jul 14 04:29:54 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 13 Jul 2000 20:29:54 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0202.txt,1.1,1.2 Message-ID: <200007140329.UAA02988@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv2979 Modified Files: pep-0202.txt Log Message: Assign to Tim Peters. Index: pep-0202.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0202.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0202.txt 2000/07/13 06:33:08 1.1 --- pep-0202.txt 2000/07/14 03:29:52 1.2 *************** *** 2,6 **** Title: List Comprehensions Version: $Revision$ ! Owner: bwarsaw@beopen.com (Barry A. Warsaw) Python-Version: 2.0 Status: Incomplete --- 2,6 ---- Title: List Comprehensions Version: $Revision$ ! Owner: tpeters@beopen.com (Tim Peters) Python-Version: 2.0 Status: Incomplete From python-dev@python.org Fri Jul 14 04:30:22 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 13 Jul 2000 20:30:22 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0203.txt,1.1,1.2 Message-ID: <200007140330.UAA03055@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv3044 Modified Files: pep-0203.txt Log Message: Assign to Thomas Wouters. Index: pep-0203.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0203.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0203.txt 2000/07/13 06:33:08 1.1 --- pep-0203.txt 2000/07/14 03:30:20 1.2 *************** *** 2,8 **** Title: Augmented Assignments Version: $Revision$ ! Owner: bwarsaw@beopen.com (Barry A. Warsaw) Python-Version: 2.0 Status: Incomplete --- 2,9 ---- Title: Augmented Assignments Version: $Revision$ ! Owner: thomas@xs4all.net (Thomas Wouters) Python-Version: 2.0 Status: Incomplete + From python-dev@python.org Fri Jul 14 04:44:03 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 13 Jul 2000 20:44:03 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0205.txt,NONE,1.1 Message-ID: <200007140344.UAA03870@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv3863 Added Files: pep-0205.txt Log Message: Weak References PEP, assigned to Fred Drake --- NEW FILE --- PEP: 205 Title: Weak References Version: $Revision: 1.1 $ Owner: fdrake@beopen.com (Fred Drake) Python-Version: 2.1 Status: Incomplete Local Variables: mode: indented-text indent-tabs-mode: nil End: From python-dev@python.org Fri Jul 14 04:44:29 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 13 Jul 2000 20:44:29 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.4,1.5 Message-ID: <200007140344.UAA03895@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv3887 Modified Files: pep-0000.txt Log Message: PEP 205, Weak References, assigned to Fred Drake Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** pep-0000.txt 2000/07/14 03:27:42 1.4 --- pep-0000.txt 2000/07/14 03:44:27 1.5 *************** *** 24,27 **** --- 24,28 ---- 203 pep-0203.txt Augmented Assignments twouters 204 pep-0204.txt Range Literals twouters + 205 pep-0205.txt Weak References fdrake From python-dev@python.org Fri Jul 14 04:53:56 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 13 Jul 2000 20:53:56 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0206.txt,NONE,1.1 Message-ID: <200007140353.UAA04310@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv4302 Added Files: pep-0206.txt Log Message: 2.0 Batteries Included PEP, owned by Moshe Zadka. The list of standard extensions to include in the 2.0 release. ***** Error reading new file(2, 'No such file or directory') From python-dev@python.org Fri Jul 14 04:54:51 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 13 Jul 2000 20:54:51 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.5,1.6 Message-ID: <200007140354.UAA04353@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv4345 Modified Files: pep-0000.txt Log Message: Added PEP206, called "2.0 Batteries Included", the list of extension modules to include in the fat distribution. Owned by Moshe Zadka. Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** pep-0000.txt 2000/07/14 03:44:27 1.5 --- pep-0000.txt 2000/07/14 03:54:49 1.6 *************** *** 25,28 **** --- 25,29 ---- 204 pep-0204.txt Range Literals twouters 205 pep-0205.txt Weak References fdrake + 206 pep-0206.txt 2.0 Batteries Included moshez From python-dev@python.org Fri Jul 14 05:32:12 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Thu, 13 Jul 2000 21:32:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_b1.py,1.23,1.24 Message-ID: <200007140432.VAA13027@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv13007 Modified Files: test_b1.py Log Message: Break the cycles after testing cmp() on cyclic objects. Index: test_b1.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_b1.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** test_b1.py 2000/06/28 14:48:01 1.23 --- test_b1.py 2000/07/14 04:32:09 1.24 *************** *** 73,76 **** --- 73,78 ---- if cmp(c, a) != 0: raise TestFailed, "cmp(%s, %s)" % (c, a) if cmp(a, c) != 0: raise TestFailed, "cmp(%s, %s)" % (a, c) + # okay, now break the cycles + a.pop(); b.pop(); c.pop() print 'coerce' From python-dev@python.org Fri Jul 14 07:22:57 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Thu, 13 Jul 2000 23:22:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc sf-faq.html,1.2,1.3 Message-ID: <200007140622.XAA32744@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv32383 Modified Files: sf-faq.html Log Message: Gosh - clean up that messy HTML; make it valid XHTML instead. Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/sf-faq.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** sf-faq.html 2000/07/14 01:43:31 1.2 --- sf-faq.html 2000/07/14 06:22:54 1.3 *************** *** 1,406 **** ! ! ! ! - !
    !

    ! Python at SourceForge - Frequently Asked Questions

    !

    ! 0. Contents

    !

    ! 1. General

      !
    1. ! What is SourceForge?
    2. ! !
    3. ! Where do I find Python there?
    4. !
    5. ! How can I change the pages at python.sourceforge.net?
    !

    ! 2. CVS

      !
    1. ! How do I check out a CVS version of Python?
    2. !
    3. ! What settings should I use?
    4. !
    5. ! Troubleshooting: "Permission Denied"
    6. !
    7. ! Where can I learn more about CVS?
    8. !
    !

    ! 3. Patches

    !
      !
    1. ! How to make a patch?
    2. !
    3. ! How to submit patches?
    4. !
    5. ! How to change the status of a patch?
    6. !
    !

    ! A. Appendix

    !
      !
    1. ! Patch Manager Guidelines [09.07.2000]
    2. !
    3. ! Python Patch Submission Guidelines [29.06.2000]
    4. !
    !

    ! 1. General

    !

    ! 1.1.:

    !

    ! Q: What is SourceForge?

    !

    ! A:

    ! SourceForge is a free hosting service ! for OpenSource projects. The main website ! is found at !
    http://sourceforge.net
    !

    ! 1.2.:

    !

    ! Q: Where can I find Python on SourceForge?

    !

    ! A:

    ! The Python project page ! can be found at !
    http://sourceforge.net/projects/python
    !

    ! 1.3.:

    !

    ! Q: How can I change the pages at python.sourceforge.net?

    !

    ! A:

    ! First you have to be in the SourceForge group "python" (true for ! all developers). Then you can upload files using scp: !
    scp mylocalfile.html sf_username@shell.sourceforge.net:/home/groups/python/htdocs/
    ! If you want to edit or remove files, you can use ssh: !
    ssh -l sf_username shell.sourceforge.net !
    cd /home/groups/python/htdocs !
    rm garbage.html !
    vi changeme.html
    ! !

    ! 2. CVS

    ! !

    ! 2.1.:

    ! !

    ! Q: How do I check out a CVS version of Python?

    ! !

    ! A:

    ! If  you are not a SourceForge-recognized Python developer you can ! still check out an anonymous CVS version (read-only) of Python: !
    export CVSROOT=:pserver:anonymous@cvs.python.sourceforge.net:/cvsroot/python !
    cvs login !
    cvs -z3 co python
    ! If you are indeed a developer you can check out a read/write version with ! ssh: !
    export CVS_RSH=ssh !
    export CVSROOT=sf_username@cvs.python.sourceforge.net:/cvsroot/python !
    cvs -z3 co python
    !

    ! 2.2.:

    !

    ! Q:  What setting should I use?

    !

    ! A:

    That is, of course, hard to answer in the general case. I use the following .cvsrc file: !
    diff -c !
    update -d
    ! This defaults diff to context diffs (almost a requirement as everything ! else is harder to read) and tells update to automatically checkout new subdirectories. !

    ! 2.3.:

    !

    ! Q: I get the following error message:

    !
    Sorry, you don't have read/write access to the history ! file /cvsroot/python/CVSROOT/history !
    Permission denied
    ! !

    ! A:

    ! If you are not a developer, you don't have read/write access. You have ! to check out an anonymous copy. If you are a developer you have to be in ! the SourceForge group "python". You can check this with the following commands: -
    ssh -l sf_username shell.sourceforge.net -
    groups
    - If you have just recently (< 6 hours) been added to the Python project, - you probably have to wait for the SourceForge servers to synch up. This - can take up to 6 hours. -

    - 2.4.:

    !

    ! Q: Where can I learn more about CVS?

    !

    ! A:

    For SourceForge specific information consult their CVS documentation at !
    http://sfdocs.sourceforge.net/sfdocs
    For general (and more advanced) information consult the free CVS Book at -
    http://cvsbook.red-bean.com/cvsbook.html#Introduction
    !

    ! 3. Patches

    !

    ! 3.1.:

    !

    ! Q: How to make a patch?

    !

    ! A:

    If you are using CVS (anonymous or developer) you can use CVS to make the patches for you. Just edit your local copy and enter the following command: !
    cvs diff | tee ~/name_of_the_patch.diff
    ! Else you can use the diff util which comes with most operating systems ! (a Windows version is available as part of the cygwin tools). !
      !

    ! 3.2.:

    -

    - Q: How to submit a patch?

    !

    ! A:

    Please read the Patch Submission Guidelines at !
    http://www.python.org/patches
    ! A recent copy can be found in the Appendix of this FAQ. !
      !

    ! 3.3.:

    ! !

    ! Q: How to change the status of a patch?

    ! !

    ! A:

    ! To change the status of a patch or assign it to somebody else you have ! to be a) a SourceForge-recognized Python developer and b) a patch administrator. Unfortunately the SourceForge default for developers is not to be patch administrators. Contact one of the project administrators if the following does not work for you.

    Click on the patch itself. In the screen that comes up, there is a drop-box ! for "Assigned To:" and a drop-box for "Status:" where you can select a ! new responsible developer or a new status respectively. After selecting ! the appropriate victim and status, hit the "Submit Changes" button at the ! bottom of the page.

    For more information about the use of the "Status:" and "Assigned To:" ! fields consult the Patch Manager Guidelines. A recent ! copy can be found in the Appendix of this FAQ. !
      !

    ! A. Appendix

    ! !

    ! A.1.: Patch Manager Guidelines

    ! !

    ! Intended use of SourceForge patch status & "assigned to" fields

    ! revision 2                                          09-Jul-2000 !

    In general, the status field should be close to self-explanatory, and ! the "Assigned to:" field should be the person responsible for taking the ! next step in the patch process.  Both fields are expected to change ! value over the life of a patch; the normal workflow is detailed below. !

    When you've got the time and the ability, feel free to move any patch ! that catches your eye along, whether or not it's been assigned to you.  ! And if you're assigned to a patch but aren't going to take reasonably quick ! action (for whatever reason), please assign it to someone else ASAP:  ! at those times you can't actively help, actively get out of the way. !

    If you're an expert in some area and know that a patch in that area ! is both needed and non-controversial, just commit your changes directly ! -- no need then to get the patch mechanism involved in it. !

    You should add a comment to every patch assigned to you at least once ! a week, if only to say that you realize it's still on your plate.  ! This rule is meant to force your attention periodically:  patches ! get harder & harder to deal with the longer they sit. !
      !

    ! Open

    ! !
    The initial status of all patches. !
    The patch is under consideration, but has not been reviewed yet. !
    The status will normally change to Accepted or Rejected next. !
    The person submitting the patch should (if they can) assign it to the ! person they most want to review it. !
    Else the patch will be assigned via [xxx a list of expertise areas ! should be developed] [xxx but since this hasn't happened and volunteers ! are too few, random assignment is better than nothing:  if you're ! a Python developer, expect to get assigned out of the blue!] !
    Discussion of major patches is carried out on the Python-Dev mailing ! list.  For simple patches, the SourceForge comment mechanism should ! be sufficient. [xxx an email gateway would be great, ditto Ping's Roundup]
    ! !

    ! Accepted

    ! !
    The powers that be accepted the patch, but it hasn't been applied ! yet. [xxx flesh out -- Guido Bottleneck avoidable here?] !
    The status will normally change to Closed next. !
    The person changing the status to Accepted should, at the same time, ! assign the patch to whoever they believe is most likely to be able & ! willing to apply it (the submitter if possible).
    ! !

    ! Closed

    ! !
    The patch has been accepted and applied. !
    The previous status was Accepted, or possibly Open if the submitter ! was Guido (or moral equivalent in some particular area of expertise).
    ! !

    ! Rejected

    ! !
    The patch has been reviewed and rejected. !
    When the objections are addressed, the status may change to Open again. !
    The person changing the status to Rejected should assign the patch ! back to the submitter, or if it's clear the patch will never be accepted, ! assign it to None. !
    Note that SourceForge allows the submitter to overwrite the patch with ! a new version.
    ! !

    ! Out of date

    ! !
    Previous status was Open or Accepted or Postponed, but the ! patch no longer works. !
    Please enter a comment when changing the status to "Out of date", to ! record the nature of the problem and the previous status. !
    Also assign it back to the submitter, as they need to upload a new ! version (note that SourceForge will not allow anyone other than the original ! submitter to update the patch).
    ! !

    ! Postponed

    ! !
    The previous status was Open or Accepted, but for some reason ! (e.g., pending release) the patch should not be reviewed or applied until ! further notice. !
    The status will normally change to Open or Accepted next. !
    Please enter a comment when changing the status to Postponed, to record ! the reason, the previous status, and the conditions under which the patch ! should revert to Open or Accepted.  Also assign the patch to whoever ! is most likely able and willing to decide when the status should change ! again.
    ! !

    ! Deleted

    ! !
    Bit bucket. !
    Use only if it's OK for the patch and its SourceForge history to disappear. !
    As of 09-July-2000, SF does not actually throw away Deleted patches, ! but that may change.
    ! !

    ! A.2.: Python Patch Submission Guidelines

    ! New: CNRI is no longer involved in Python patches. We no longer ! request legal disclaimers. Also, We're now using the SourceForge Patch ! Manager (a single mailing list became unmanageable). !

    Many people contribute patches to Python. We've set up a new system ! to deal with these. Here are the main guidelines:

      !
    • ! Submit your patch to the patch ! manager interface at SourceForge. ! We strongly recommend that you register ! with SourceForge before submitting a patch. If you send patches directly ! to Guido you introduce an extra delay. Ditto for the "patches@python.org" ! mailing list address; this address should no longer be used for patch submission. ! The patch manager is for ! patches only; if you have a problem or ! suggestion but don't know how to write the code for it, use the Python ! Bugs List instead. The bugs list is searchable; if you have a problem ! and you're not sure if it has been reported or fixed already, this is the ! first place to look. (There used to be a separate TODO list; we now prefer ! that you use the bugs list for suggestions and requests too.)
    • ! !


      Submit documentation patches the same way. When adding the ! patch, be sure to set the "Category" field to "documentation". ! For documentation errors without patches, please use the Python ! Bugs List instead. !

    • ! We like context diffs. We grudgingly accept unified diffs. ! Straight ! ("ed-style") diffs are right out! If you don't know how to generate ! context diffs, you're probably not qualified to produce high-quality patches ! anyway <0.5 wink>.
    • ! !
    • ! We appreciate it if you send patches relative to the current ! CVS tree. These are our latest sources. It's almost a year since Python ! 1.5.2 was released, and many source files have been touched in more or ! less significant ways; a patch relative to Python 1.5.2 can cause a lot ! of extra pain to apply right. Even a patch relative to the latest alpha ! or beta release may be way out of date.
    • ! !
    • ! Please add a succinct message to your SourceForge entry that explains what ! the patch is about that we can use directly as a checkin message. Ideally, ! such a message explains the problem and describes the fix in a few lines.
    • ! !
    • ! For patches that add or change functionality: please also update the documentation ! and the testcases (the Lib/test subdirectory). For new modules, ! we appreciate a new test module (typically test/test_spam.py). In this ! case, there's no need to mail the documentation to a different address ! (in fact, in order to verify that the bundle is complete, it's easier to ! mail everything together).
    • ! !
    • ! There are a variety of additional style ! requirements. Please have a look at these before writing new code. ! Also have a look at the general Python ! Style Guide.
    - --- 1,390 ---- ! ! ! ! Python at SourceForge - Frequently Asked Questions ! ! !
    !

    Python at SourceForge - Frequently Asked Questions

    !
    !

    0. Contents

    +

    1. General

      !
    1. What is SourceForge?
    2. !
    3. Where do I find Python there?
    4. !
    5. How can I change the pages at ! python.sourceforge.net?
    6. !
    !

    2. CVS

    !
      !
    1. How do I check out a CVS version of Python?
    2. !
    3. What settings should I use?
    4. !
    5. Troubleshooting: "Permission Denied"
    6. !
    7. Where can I learn more about CVS?
    !

    3. Patches

    !
      !
    1. How to make a patch?
    2. !
    3. How to submit patches?
    4. !
    5. How to change the status of a patch?
    6. !
    +

    A. Appendix

      !
    1. Patch Manager Guidelines [09.07.2000]
    2. !
    3. Python Patch Submission Guidelines [29.06.2000]
    4. !
    !

    1. General

    !

    1.1.:

    !

    Q: What is SourceForge?

    !

    A:

    ! SourceForge is a free hosting service for ! OpenSource projects. The main website is ! found at !
    ! http://sourceforge.net
    !

    1.2.:

    !

    Q: Where can I find Python on SourceForge?

    !

    A:

    ! The Python project page ! can be found at !
    ! http://sourceforge.net/projects/python
    !

    1.3.:

    !

    Q: How can I change the pages at python.sourceforge.net?

    !

    A:

    ! First you have to be in the SourceForge group "python" (true for all ! developers). Then you can upload files using scp: !
    ! scp mylocalfile.html ! sf_username@shell.sourceforge.net:/home/groups/python/htdocs/
    ! If you want to edit or remove files, you can use ssh: !
    ! ssh -l sf_username shell.sourceforge.net
    ! cd /home/groups/python/htdocs
    ! rm garbage.html
    ! vi changeme.html
    !

    2. CVS

    !

    2.1.:

    !

    Q: How do I check out a CVS version of Python?

    !

    A:

    ! If you are not a SourceForge-recognized Python developer you can still check ! out an anonymous CVS version (read-only) of Python: !
    ! export ! CVSROOT=:pserver:anonymous@cvs.python.sourceforge.net:/cvsroot/python
    ! cvs login
    ! cvs -z3 co python
    ! If you are indeed a developer you can check out a read/write version with ssh: !
    ! export CVS_RSH=ssh
    ! export ! CVSROOT=sf_username@cvs.python.sourceforge.net:/cvsroot/python
    ! cvs -z3 co python
    !

    2.2.:

    !

    Q: What setting should I use?

    !

    A:

    That is, of course, hard to answer in the general case. I use the following .cvsrc file: ! !
    ! diff -c
    ! update -d
    ! This defaults diff to context diffs (almost a requirement as everything else ! is harder to read) and tells update to automatically checkout new subdirectories. ! !

    2.3.:

    !

    Q: I get the following error message:

    !
    ! Sorry, you don't have read/write access to the history file ! /cvsroot/python/CVSROOT/history
    ! Permission denied
    ! !

    A:

    ! If you are not a developer, you don't have read/write access. You have to ! check out an anonymous copy. If you are a developer you have to be in the ! SourceForge group "python". You can check this with the following commands: !
    ! ssh -l sf_username shell.sourceforge.net
    ! groups
    ! If you have just recently (< 6 hours) been added to the Python project, you ! probably have to wait for the SourceForge servers to synch up. This can take ! up to 6 hours. !

    2.4.:

    ! !

    Q: Where can I learn more about CVS?

    ! !

    A:

    For SourceForge specific information consult their CVS documentation at ! !
    ! http://sfdocs.sourceforge.net/sfdocs
    For general (and more advanced) information consult the free CVS Book at !
    ! http://cvsbook.red-bean.com/cvsbook.html#Introduction
    !

    3. Patches

    !

    3.1.:

    !

    Q: How to make a patch?

    ! !

    A:

    If you are using CVS (anonymous or developer) you can use CVS to make the patches for you. Just edit your local copy and enter the following command: ! !
    ! cvs diff | tee ~/name_of_the_patch.diff
    ! Else you can use the diff util which comes with most operating systems (a ! Windows version is available as part of the cygwin tools).
    !

    3.2.:

    ! !

    Q: How to submit a patch?

    ! !

    A:

    Please read the Patch Submission Guidelines at ! !
    ! http://www.python.org/patches
    ! A recent copy can be found in the Appendix of this FAQ.
    ! ! !

    3.3.:

    ! !

    Q: How to change the status of a patch?

    ! !

    A:

    ! To change the status of a patch or assign it to somebody else you have to be ! a) a SourceForge-recognized Python developer and b) a patch administrator. Unfortunately the SourceForge default for developers is not to be patch administrators. Contact one of the project administrators if the following does not work for you. +

    Click on the patch itself. In the screen that comes up, there is a drop-box ! for "Assigned To:" and a drop-box for "Status:" where you can select a new ! responsible developer or a new status respectively. After selecting the ! appropriate victim and status, hit the "Submit Changes" button at the bottom ! of the page.

    !

    For more information about the use of the "Status:" and "Assigned To:" ! fields consult the Patch Manager Guidelines. A recent copy ! can be found in the Appendix of this FAQ.
    !

    ! !

    A. Appendix

    ! !

    A.1.: Patch Manager Guidelines

    ! !

    Intended use of SourceForge patch status & "assigned to" fields

    ! Revision 2
    09-Jul-2000 ! !

    In general, the status field should be close to self-explanatory, and the ! "Assigned to:" field should be the person responsible for taking the next step ! in the patch process. Both fields are expected to change value over the life ! of a patch; the normal workflow is detailed below.

    ! !

    When you've got the time and the ability, feel free to move any patch that ! catches your eye along, whether or not it's been assigned to you. And if ! you're assigned to a patch but aren't going to take reasonably quick action ! (for whatever reason), please assign it to someone else ASAP: at those times ! you can't actively help, actively get out of the way.

    ! !

    If you're an expert in some area and know that a patch in that area is both ! needed and non-controversial, just commit your changes directly -- no need ! then to get the patch mechanism involved in it.

    ! !

    You should add a comment to every patch assigned to you at least once a ! week, if only to say that you realize it's still on your plate. This rule is ! meant to force your attention periodically: patches get harder & harder to ! deal with the longer they sit.
    !

    ! !

    Open

    ! !
    ! The initial status of all patches.
    ! The patch is under consideration, but has not been reviewed yet.
    ! The status will normally change to Accepted or Rejected next.
    ! The person submitting the patch should (if they can) assign it to the person ! they most want to review it.
    ! Else the patch will be assigned via [xxx a list of expertise areas should be ! developed] [xxx but since this hasn't happened and volunteers are too few, ! random assignment is better than nothing: if you're a Python developer, ! expect to get assigned out of the blue!]
    ! Discussion of major patches is carried out on the Python-Dev mailing list. ! For simple patches, the SourceForge comment mechanism should be sufficient. ! [xxx an email gateway would be great, ditto Ping's Roundup]
    ! !

    Accepted

    ! !
    ! The powers that be accepted the patch, but it hasn't been applied yet. [xxx ! flesh out -- Guido Bottleneck avoidable here?]
    ! The status will normally change to Closed next.
    ! The person changing the status to Accepted should, at the same time, assign ! the patch to whoever they believe is most likely to be able & willing to ! apply it (the submitter if possible).
    ! !

    Closed

    ! !
    ! The patch has been accepted and applied.
    ! The previous status was Accepted, or possibly Open if the submitter was ! Guido (or moral equivalent in some particular area of ! expertise).
    ! !

    Rejected

    ! !
    ! The patch has been reviewed and rejected.
    ! When the objections are addressed, the status may change to Open again.
    ! The person changing the status to Rejected should assign the patch back to ! the submitter, or if it's clear the patch will never be accepted, assign it ! to None.
    ! Note that SourceForge allows the submitter to overwrite the patch with a new ! version.
    ! !

    Out of date

    ! !
    ! Previous status was Open or Accepted or Postponed, but the patch no longer ! works.
    ! Please enter a comment when changing the status to "Out of date", to record ! the nature of the problem and the previous status.
    ! Also assign it back to the submitter, as they need to upload a new version ! (note that SourceForge will not allow anyone other than the original ! submitter to update the patch).
    ! !

    Postponed

    ! !
    ! The previous status was Open or Accepted, but for some reason (e.g., pending ! release) the patch should not be reviewed or applied until further ! notice.
    ! The status will normally change to Open or Accepted next.
    ! Please enter a comment when changing the status to Postponed, to record the ! reason, the previous status, and the conditions under which the patch should ! revert to Open or Accepted. Also assign the patch to whoever is most likely ! able and willing to decide when the status should change again.
    ! !

    Deleted

    ! !
    ! Bit bucket.
    ! Use only if it's OK for the patch and its SourceForge history to ! disappear.
    ! As of 09-July-2000, SF does not actually throw away Deleted patches, but ! that may change.
    ! !

    A.2.: Python Patch Submission Guidelines

    ! New: CNRI is no longer involved in Python patches. We no longer request ! legal disclaimers. Also, We're now using the SourceForge Patch Manager (a ! single mailing list became unmanageable). ! !

    Many people contribute patches to Python. We've set up a new system to deal ! with these. Here are the main guidelines:

      !
    • Submit your patch to the patch manager ! interface at SourceForge. ! We strongly recommend that you register with ! SourceForge before submitting a patch. If you send patches directly to ! Guido you introduce an extra delay. Ditto for the "patches@python.org" ! mailing list address; this address should no longer be used for patch ! submission. The patch manager is for patches only; if you have a ! problem or suggestion but don't know how to write the code for it, use the ! Python Bugs ! List instead. The bugs list is searchable; if you have a problem and ! you're not sure if it has been reported or fixed already, this is the ! first place to look. (There used to be a separate TODO list; we now prefer ! that you use the bugs list for suggestions and requests too.)
    • !
    • Submit documentation patches the same ! way. When adding the patch, be sure to set the "Category" field ! to "documentation". For documentation errors without patches, ! please use the Python Bugs List ! instead.
    • !
    • We like context diffs. We grudgingly accept unified diffs. Straight ! ("ed-style") diffs are right out! If you don't know how to generate ! context diffs, you're probably not qualified to produce high-quality ! patches anyway <0.5 wink>.
    • !
    • We appreciate it if you send patches relative to the current CVS tree. ! These are our latest sources. It's almost a year since Python 1.5.2 was ! released, and many source files have been touched in more or less ! significant ways; a patch relative to Python 1.5.2 can cause a lot of ! extra pain to apply right. Even a patch relative to the latest alpha or ! beta release may be way out of date.
    • !
    • Please add a succinct message to your SourceForge entry that explains ! what the patch is about that we can use directly as a checkin message. ! Ideally, such a message explains the problem and describes the fix in a ! few lines.
    • !
    • For patches that add or change functionality: please also update the ! documentation and the testcases (the Lib/test subdirectory). ! For new modules, we appreciate a new test module (typically ! test/test_spam.py). In this case, there's no need to mail the ! documentation to a different address (in fact, in order to verify that the ! bundle is complete, it's easier to mail everything together).
    • !
    • There are a variety of additional style requirements. ! Please have a look at these before writing new code. Also have a look at ! the general Python Style ! Guide.
    From python-dev@python.org Fri Jul 14 09:55:01 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Fri, 14 Jul 2000 01:55:01 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc sf-faq.html,1.3,NONE Message-ID: <200007140855.BAA24590@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv24552 Removed Files: sf-faq.html Log Message: moving files to nondist/sf-html From python-dev@python.org Fri Jul 14 10:00:08 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Fri, 14 Jul 2000 02:00:08 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html README,NONE,1.1 index.html,NONE,1.1 sf-faq.html,NONE,1.1 Message-ID: <200007140900.CAA25254@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv25141 Added Files: README index.html sf-faq.html Log Message: put html files for http://python.sourceforge.net in nondist/sf-html added README file --- NEW FILE --- sf-html subdirectory ==================== This directory contains the xhtml files for the pages at http://python.sourceforge.net Files found here ---------------- index.html Link Page README The file you're reading now sf-faq.html Python at SourceForge FAQ --- NEW FILE --- Python Sites

    PYTHON MAIN WEBSITE

    On this site you will find all the information about the Python language. This includes:

    • Detailed Documentation (Language Specification, Library Reference, Tutorials, Information about Extending and Embedding)
    • Downloads (stable releases for your favorite platform, alpha and beta releases of new versions)
    • Special Interest Groups (from Database and Image Processing to XML Processing)
    • News, Announcements and lots of links to other Python resources

    PYTHON PROJECT PAGE

    Here you will find the busy developers and their resources.

    • access to the current development version via a CVS repository
    • the patch manager where new features and bugfixes can be submitted

    PYTHON AT SOURCEFORGE FAQ

    If you have questions about Python at SourceForge, you're probably right here. Topics include:

    • How to use CVS.
    • How to make/submit/administrate patches.
    --- NEW FILE --- Python at SourceForge - Frequently Asked Questions

    Python at SourceForge - Frequently Asked Questions

    0. Contents

    1. General

    1. What is SourceForge?
    2. Where do I find Python there?
    3. How can I change the pages at python.sourceforge.net?

    2. CVS

    1. How do I check out a CVS version of Python?
    2. What settings should I use?
    3. Troubleshooting: "Permission Denied"
    4. Where can I learn more about CVS?

    3. Patches

    1. How to make a patch?
    2. How to submit patches?
    3. How to change the status of a patch?

    A. Appendix

    1. Patch Manager Guidelines [09.07.2000]
    2. Python Patch Submission Guidelines [29.06.2000]

    1. General

    1.1.:

    Q: What is SourceForge?

    A:

    SourceForge is a free hosting service for OpenSource projects. The main website is found at
    http://sourceforge.net

    1.2.:

    Q: Where can I find Python on SourceForge?

    A:

    The Python project page can be found at
    http://sourceforge.net/projects/python

    1.3.:

    Q: How can I change the pages at python.sourceforge.net?

    A:

    First you have to be in the SourceForge group "python" (true for all developers). Then you can upload files using scp:
    scp mylocalfile.html sf_username@shell.sourceforge.net:/home/groups/python/htdocs/
    If you want to edit or remove files, you can use ssh:
    ssh -l sf_username shell.sourceforge.net
    cd /home/groups/python/htdocs
    rm garbage.html
    vi changeme.html

    2. CVS

    2.1.:

    Q: How do I check out a CVS version of Python?

    A:

    If you are not a SourceForge-recognized Python developer you can still check out an anonymous CVS version (read-only) of Python:
    export CVSROOT=:pserver:anonymous@cvs.python.sourceforge.net:/cvsroot/python
    cvs login
    cvs -z3 co python
    If you are indeed a developer you can check out a read/write version with ssh:
    export CVS_RSH=ssh
    export CVSROOT=sf_username@cvs.python.sourceforge.net:/cvsroot/python
    cvs -z3 co python

    2.2.:

    Q: What setting should I use?

    A:

    That is, of course, hard to answer in the general case. I use the following .cvsrc file:
    diff -c
    update -d
    This defaults diff to context diffs (almost a requirement as everything else is harder to read) and tells update to automatically checkout new subdirectories.

    2.3.:

    Q: I get the following error message:

    Sorry, you don't have read/write access to the history file /cvsroot/python/CVSROOT/history
    Permission denied

    A:

    If you are not a developer, you don't have read/write access. You have to check out an anonymous copy. If you are a developer you have to be in the SourceForge group "python". You can check this with the following commands:
    ssh -l sf_username shell.sourceforge.net
    groups
    If you have just recently (< 6 hours) been added to the Python project, you probably have to wait for the SourceForge servers to synch up. This can take up to 6 hours.

    2.4.:

    Q: Where can I learn more about CVS?

    A:

    For SourceForge specific information consult their CVS documentation at
    http://sfdocs.sourceforge.net/sfdocs
    For general (and more advanced) information consult the free CVS Book at
    http://cvsbook.red-bean.com/cvsbook.html#Introduction

    3. Patches

    3.1.:

    Q: How to make a patch?

    A:

    If you are using CVS (anonymous or developer) you can use CVS to make the patches for you. Just edit your local copy and enter the following command:
    cvs diff | tee ~/name_of_the_patch.diff
    Else you can use the diff util which comes with most operating systems (a Windows version is available as part of the cygwin tools).

    3.2.:

    Q: How to submit a patch?

    A:

    Please read the Patch Submission Guidelines at
    http://www.python.org/patches
    A recent copy can be found in the Appendix of this FAQ.

    3.3.:

    Q: How to change the status of a patch?

    A:

    To change the status of a patch or assign it to somebody else you have to be a) a SourceForge-recognized Python developer and b) a patch administrator. Unfortunately the SourceForge default for developers is not to be patch administrators. Contact one of the project administrators if the following does not work for you.

    Click on the patch itself. In the screen that comes up, there is a drop-box for "Assigned To:" and a drop-box for "Status:" where you can select a new responsible developer or a new status respectively. After selecting the appropriate victim and status, hit the "Submit Changes" button at the bottom of the page.

    For more information about the use of the "Status:" and "Assigned To:" fields consult the Patch Manager Guidelines. A recent copy can be found in the Appendix of this FAQ.

    A. Appendix

    A.1.: Patch Manager Guidelines

    Intended use of SourceForge patch status & "assigned to" fields

    Revision 2
    09-Jul-2000

    In general, the status field should be close to self-explanatory, and the "Assigned to:" field should be the person responsible for taking the next step in the patch process. Both fields are expected to change value over the life of a patch; the normal workflow is detailed below.

    When you've got the time and the ability, feel free to move any patch that catches your eye along, whether or not it's been assigned to you. And if you're assigned to a patch but aren't going to take reasonably quick action (for whatever reason), please assign it to someone else ASAP: at those times you can't actively help, actively get out of the way.

    If you're an expert in some area and know that a patch in that area is both needed and non-controversial, just commit your changes directly -- no need then to get the patch mechanism involved in it.

    You should add a comment to every patch assigned to you at least once a week, if only to say that you realize it's still on your plate. This rule is meant to force your attention periodically: patches get harder & harder to deal with the longer they sit.

    Open

    The initial status of all patches.
    The patch is under consideration, but has not been reviewed yet.
    The status will normally change to Accepted or Rejected next.
    The person submitting the patch should (if they can) assign it to the person they most want to review it.
    Else the patch will be assigned via [xxx a list of expertise areas should be developed] [xxx but since this hasn't happened and volunteers are too few, random assignment is better than nothing: if you're a Python developer, expect to get assigned out of the blue!]
    Discussion of major patches is carried out on the Python-Dev mailing list. For simple patches, the SourceForge comment mechanism should be sufficient. [xxx an email gateway would be great, ditto Ping's Roundup]

    Accepted

    The powers that be accepted the patch, but it hasn't been applied yet. [xxx flesh out -- Guido Bottleneck avoidable here?]
    The status will normally change to Closed next.
    The person changing the status to Accepted should, at the same time, assign the patch to whoever they believe is most likely to be able & willing to apply it (the submitter if possible).

    Closed

    The patch has been accepted and applied.
    The previous status was Accepted, or possibly Open if the submitter was Guido (or moral equivalent in some particular area of expertise).

    Rejected

    The patch has been reviewed and rejected.
    When the objections are addressed, the status may change to Open again.
    The person changing the status to Rejected should assign the patch back to the submitter, or if it's clear the patch will never be accepted, assign it to None.
    Note that SourceForge allows the submitter to overwrite the patch with a new version.

    Out of date

    Previous status was Open or Accepted or Postponed, but the patch no longer works.
    Please enter a comment when changing the status to "Out of date", to record the nature of the problem and the previous status.
    Also assign it back to the submitter, as they need to upload a new version (note that SourceForge will not allow anyone other than the original submitter to update the patch).

    Postponed

    The previous status was Open or Accepted, but for some reason (e.g., pending release) the patch should not be reviewed or applied until further notice.
    The status will normally change to Open or Accepted next.
    Please enter a comment when changing the status to Postponed, to record the reason, the previous status, and the conditions under which the patch should revert to Open or Accepted. Also assign the patch to whoever is most likely able and willing to decide when the status should change again.

    Deleted

    Bit bucket.
    Use only if it's OK for the patch and its SourceForge history to disappear.
    As of 09-July-2000, SF does not actually throw away Deleted patches, but that may change.

    A.2.: Python Patch Submission Guidelines

    New: CNRI is no longer involved in Python patches. We no longer request legal disclaimers. Also, We're now using the SourceForge Patch Manager (a single mailing list became unmanageable).

    Many people contribute patches to Python. We've set up a new system to deal with these. Here are the main guidelines:

    • Submit your patch to the patch manager interface at SourceForge. We strongly recommend that you register with SourceForge before submitting a patch. If you send patches directly to Guido you introduce an extra delay. Ditto for the "patches@python.org" mailing list address; this address should no longer be used for patch submission. The patch manager is for patches only; if you have a problem or suggestion but don't know how to write the code for it, use the Python Bugs List instead. The bugs list is searchable; if you have a problem and you're not sure if it has been reported or fixed already, this is the first place to look. (There used to be a separate TODO list; we now prefer that you use the bugs list for suggestions and requests too.)
    • Submit documentation patches the same way. When adding the patch, be sure to set the "Category" field to "documentation". For documentation errors without patches, please use the Python Bugs List instead.
    • We like context diffs. We grudgingly accept unified diffs. Straight ("ed-style") diffs are right out! If you don't know how to generate context diffs, you're probably not qualified to produce high-quality patches anyway <0.5 wink>.
    • We appreciate it if you send patches relative to the current CVS tree. These are our latest sources. It's almost a year since Python 1.5.2 was released, and many source files have been touched in more or less significant ways; a patch relative to Python 1.5.2 can cause a lot of extra pain to apply right. Even a patch relative to the latest alpha or beta release may be way out of date.
    • Please add a succinct message to your SourceForge entry that explains what the patch is about that we can use directly as a checkin message. Ideally, such a message explains the problem and describes the fix in a few lines.
    • For patches that add or change functionality: please also update the documentation and the testcases (the Lib/test subdirectory). For new modules, we appreciate a new test module (typically test/test_spam.py). In this case, there's no need to mail the documentation to a different address (in fact, in order to verify that the bundle is complete, it's easier to mail everything together).
    • There are a variety of additional style requirements. Please have a look at these before writing new code. Also have a look at the general Python Style Guide.
    From python-dev@python.org Fri Jul 14 14:35:10 2000 From: python-dev@python.org (A.M. Kuchling) Date: Fri, 14 Jul 2000 06:35:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/distutils/command build_ext.py,1.55,1.56 Message-ID: <200007141335.GAA29459@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv29451 Modified Files: build_ext.py Log Message: Typo fix from Bastian Kleineidam Index: build_ext.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/build_ext.py,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -r1.55 -r1.56 *** build_ext.py 2000/07/07 20:41:21 1.55 --- build_ext.py 2000/07/14 13:35:07 1.56 *************** *** 310,314 **** def get_source_files (self): ! self.check_extension_list() filenames = [] --- 310,314 ---- def get_source_files (self): ! self.check_extensions_list(self.extensions) filenames = [] From python-dev@python.org Fri Jul 14 15:21:53 2000 From: python-dev@python.org (Barry Warsaw) Date: Fri, 14 Jul 2000 07:21:53 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0206.txt,1.1,1.2 Message-ID: <200007141421.HAA07056@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv7046 Modified Files: pep-0206.txt Log Message: The contents of PEP206 as provided by Moshe. Spell checked, formatting, XXX=>TBD, and a few other editor's notes added by Barry. Index: pep-0206.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0206.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0206.txt 2000/07/14 03:53:53 1.1 --- pep-0206.txt 2000/07/14 14:21:51 1.2 *************** *** 4,8 **** Owner: moshez@math.huji.ac.il (Moshe Zadka) Python-Version: 2.0 ! Status: Incomplete --- 4,84 ---- Owner: moshez@math.huji.ac.il (Moshe Zadka) Python-Version: 2.0 ! Status: Draft ! ! ! ! Introduction ! ! This PEP describes the `batteries included' proposal for Python ! 2.0, the fat distribution containing commonly used third party ! extension modules. This PEP tracks the status and ownership of ! this proposal, slated for introduction in Python 2.0. It contains ! a description of the proposal and outlines how to support it. ! ! ! ! Batteries Included Philosophy ! ! The Python source distribution always maintained the philosophy of ! "batteries included" -- having a rich and versatile standard ! library which is immediately available, without making the user ! download separate packages. This gives the Python language a head ! start in many projects. However, the Python standard library ! often relies on important Open Source libraries which might be ! unavailable on many computers, so that the user has to separately ! download and compile those. Some examples are the zlib ! compression library, and the gmp number manipulation library. ! ! TBD -- can anyone give reference to some article describing ! TBD -- "batteries included?" ! ! ! ! The Proposed Solution ! ! The proposed solution is to download a few important third-party ! libraries, and distribute them with the source distribution of ! Python. In addition, the build procedure will be changed to build ! those libraries by default, and build the Python modules which ! rely on them linked against those libraries. Individual users ! will still be able to link the Python modules against already ! installed libraries, or disable them completely. ! ! Additionally, some Open Source third-party modules will also be ! distributed together with the source distribution. ! ! TBD -- does this mean some will be distributed but not enabled by ! default? [ed] ! ! Here is the list of libraries which are proposed to be dealt with ! in this manner, and where they can be downloaded: ! ! zlib -- http://www.info-zip.org/pub/infozip/zlib/zlib.tar.gz ! expat -- ftp://ftp.jclark.com/pub/xml/expat.zip. ! Tcl -- http://dev.scriptics.com:80/download/tcl/tcl8_3/tcl8.3.1.tar.gz ! Tk -- http://dev.scriptics.com:80/download/tcl/tcl8_3/tk8.3.1.tar.gz ! PIL -- http://www.pythonware.com/downloads/Imaging-1.1.tar.gz ! libjpeg -- ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz ! ncurses -- ftp://dickey.his.com/ncurses/ncurses.tar.gz ! ! ! ! Software covered by the GNU Public License ! ! TBD -- please explain why GPL'd software is not included in Python ! (and perhaps the difference between GPL and LGPL). ! ! ! ! Open Issues ! ! Where does all this source live? ! ! What should the build procedure look like? ! ! What to do if compilation of a supporting library fails? ! ! ESR also mentioned libpng, but I don't know of a Python module ! that uses it. From python-dev@python.org Fri Jul 14 15:28:24 2000 From: python-dev@python.org (Eric S. Raymond) Date: Fri, 14 Jul 2000 07:28:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib ConfigParser.py,1.19,1.20 Message-ID: <200007141428.HAA07512@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv7481 Modified Files: ConfigParser.py Log Message: ConfigParser enhancements to edit existing configs, part 2 Index: ConfigParser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ConfigParser.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** ConfigParser.py 2000/07/10 18:11:00 1.19 --- ConfigParser.py 2000/07/14 14:28:22 1.20 *************** *** 37,40 **** --- 37,43 ---- return whether the given section exists + has_option(section, option) + return whether the given option exists in the given section + options(section) return list of configuration options for the named section *************** *** 69,72 **** --- 72,87 ---- like get(), but convert value to a boolean (currently defined as 0 or 1, only) + + remove_section(section) + remove the given file section and all its options + + remove_option(section, option) + remove the given option from the given section + + set(section, option, value) + set the given option + + write(fp) + write the configuration state in .ini format """ *************** *** 311,326 **** if self.__defaults: fp.write("[DEFAULT]\n") ! for key in self.__defaults.keys(): ! fp.write(key + " = " + self.__defaults[key] + "\n") fp.write("\n") for section in self.sections(): fp.write("[" + section + "]\n") sectdict = self.__sections[section] ! for key in sectdict.keys(): if key == "__name__": continue ! fp.write(key + " = " + str(sectdict[key]) + "\n") fp.write("\n") # # Regular expressions for parsing section headers and options. Note a --- 326,363 ---- if self.__defaults: fp.write("[DEFAULT]\n") ! for (key, value) in self.__defaults.items(): ! fp.write("%s = %s\n" % (key, value)) fp.write("\n") for section in self.sections(): fp.write("[" + section + "]\n") sectdict = self.__sections[section] ! for (key, value) in sectdict.items(): if key == "__name__": continue ! fp.write("%s = %s\n" % (key, value)) fp.write("\n") + def remove_option(section, option): + """Remove an option.""" + if not section or section == "DEFAULT": + sectdict = self.__defaults + else: + try: + sectdict = self.__sections[section] + except KeyError: + raise NoSectionError(section) + existed = sectdict.has_key(key) + if existed: + del sectdict[key] + return existed + + def remove_section(section): + """Remove a file section.""" + if self.__sections.has_key(section): + del self.__sections[section] + return 1 + else: + return 0 + # # Regular expressions for parsing section headers and options. Note a *************** *** 394,398 **** if mo: optname, vi, optval = mo.group('option', 'vi', 'value') - optname = string.lower(optname) if vi in ('=', ':') and ';' in optval: # ';' is a comment delimiter only if it follows --- 431,434 ---- From python-dev@python.org Fri Jul 14 15:28:35 2000 From: python-dev@python.org (Thomas Wouters) Date: Fri, 14 Jul 2000 07:28:35 -0700 Subject: [Python-checkins] CVS: python/dist/src configure,1.128,1.129 configure.in,1.137,1.138 Message-ID: <200007141428.HAA07535@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv7380 Modified Files: configure configure.in Log Message: Move (actually copy) support for the sgi._getpty() function into posix.openpty(). And conveniently also check if CVS write access really works. Closes SF patch #100722 Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.128 retrieving revision 1.129 diff -C2 -r1.128 -r1.129 *** configure 2000/07/13 01:26:58 1.128 --- configure 2000/07/14 14:28:30 1.129 *************** *** 1,5 **** #! /bin/sh ! # From configure.in Revision: 1.136 # Guess values for system-dependent variables and create Makefiles. --- 1,5 ---- #! /bin/sh ! # From configure.in Revision: 1.137 # Guess values for system-dependent variables and create Makefiles. *************** *** 3646,3650 **** sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ ! truncate uname waitpid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --- 3646,3650 ---- sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ ! truncate uname waitpid _getpty do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.137 retrieving revision 1.138 diff -C2 -r1.137 -r1.138 *** configure.in 2000/07/13 01:26:58 1.137 --- configure.in 2000/07/14 14:28:32 1.138 *************** *** 827,831 **** sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ ! truncate uname waitpid) # check for openpty and forkpty --- 827,831 ---- sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ ! truncate uname waitpid _getpty) # check for openpty and forkpty From python-dev@python.org Fri Jul 14 15:28:35 2000 From: python-dev@python.org (Thomas Wouters) Date: Fri, 14 Jul 2000 07:28:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.152,2.153 Message-ID: <200007141428.HAA07536@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv7380/Modules Modified Files: posixmodule.c Log Message: Move (actually copy) support for the sgi._getpty() function into posix.openpty(). And conveniently also check if CVS write access really works. Closes SF patch #100722 Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.152 retrieving revision 2.153 diff -C2 -r2.152 -r2.153 *** posixmodule.c 2000/07/13 01:26:58 2.152 --- posixmodule.c 2000/07/14 14:28:33 2.153 *************** *** 1707,1713 **** #endif /* HAVE_LIBUTIL_H */ #endif /* HAVE_PTY_H */ ! #endif /* defined(HAVE_OPENPTY) or defined(HAVE_FORKPTY) */ ! #ifdef HAVE_OPENPTY static char posix_openpty__doc__[] = "openpty() -> (master_fd, slave_fd)\n\ --- 1707,1713 ---- #endif /* HAVE_LIBUTIL_H */ #endif /* HAVE_PTY_H */ ! #endif /* defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) */ ! #if defined(HAVE_OPENPTY) || defined(HAVE__GETPTY) static char posix_openpty__doc__[] = "openpty() -> (master_fd, slave_fd)\n\ *************** *** 1718,1728 **** { int master_fd, slave_fd; if (!PyArg_ParseTuple(args, ":openpty")) return NULL; if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) != 0) return posix_error(); return Py_BuildValue("(ii)", master_fd, slave_fd); } ! #endif #ifdef HAVE_FORKPTY --- 1718,1747 ---- { int master_fd, slave_fd; + #ifndef HAVE_OPENPTY + char * slave_name; + /* SGI apparently needs this forward declaration */ + extern char * _getpty(int *, int, mode_t, int); + #endif + if (!PyArg_ParseTuple(args, ":openpty")) return NULL; + + #ifdef HAVE_OPENPTY if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) != 0) return posix_error(); + #else + slave_name = _getpty(&master_fd, O_RDWR, 0666, 0); + if (slave_name == NULL) + return posix_error(); + + slave_fd = open(slave_name, O_RDWR); + if (slave_fd < 0) + return posix_error(); + #endif /* defined(HAVE_OPENPTY) */ + return Py_BuildValue("(ii)", master_fd, slave_fd); + } ! #endif /* defined(HAVE_OPENPTY) || defined(HAVE__GETPTY) */ #ifdef HAVE_FORKPTY *************** *** 4927,4933 **** {"fork", posix_fork, METH_VARARGS, posix_fork__doc__}, #endif /* HAVE_FORK */ ! #ifdef HAVE_OPENPTY {"openpty", posix_openpty, METH_VARARGS, posix_openpty__doc__}, ! #endif /* HAVE_OPENPTY */ #ifdef HAVE_FORKPTY {"forkpty", posix_forkpty, METH_VARARGS, posix_forkpty__doc__}, --- 4946,4952 ---- {"fork", posix_fork, METH_VARARGS, posix_fork__doc__}, #endif /* HAVE_FORK */ ! #if defined(HAVE_OPENPTY) || defined(HAVE__GETPTY) {"openpty", posix_openpty, METH_VARARGS, posix_openpty__doc__}, ! #endif /* HAVE_OPENPTY || HAVE__GETPTY */ #ifdef HAVE_FORKPTY {"forkpty", posix_forkpty, METH_VARARGS, posix_forkpty__doc__}, From python-dev@python.org Fri Jul 14 15:37:22 2000 From: python-dev@python.org (Barry Warsaw) Date: Fri, 14 Jul 2000 07:37:22 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0206.txt,1.2,1.3 Message-ID: <200007141437.HAA08094@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv8085 Modified Files: pep-0206.txt Log Message: An update from Moshe, and another question from the editor. Index: pep-0206.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0206.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pep-0206.txt 2000/07/14 14:21:51 1.2 --- pep-0206.txt 2000/07/14 14:37:20 1.3 *************** *** 55,66 **** zlib -- http://www.info-zip.org/pub/infozip/zlib/zlib.tar.gz ! expat -- ftp://ftp.jclark.com/pub/xml/expat.zip. Tcl -- http://dev.scriptics.com:80/download/tcl/tcl8_3/tcl8.3.1.tar.gz Tk -- http://dev.scriptics.com:80/download/tcl/tcl8_3/tk8.3.1.tar.gz PIL -- http://www.pythonware.com/downloads/Imaging-1.1.tar.gz - libjpeg -- ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz ncurses -- ftp://dickey.his.com/ncurses/ncurses.tar.gz Software covered by the GNU Public License --- 55,72 ---- zlib -- http://www.info-zip.org/pub/infozip/zlib/zlib.tar.gz ! expat -- ftp://ftp.jclark.com/pub/xml/expat.zip Tcl -- http://dev.scriptics.com:80/download/tcl/tcl8_3/tcl8.3.1.tar.gz Tk -- http://dev.scriptics.com:80/download/tcl/tcl8_3/tk8.3.1.tar.gz PIL -- http://www.pythonware.com/downloads/Imaging-1.1.tar.gz ncurses -- ftp://dickey.his.com/ncurses/ncurses.tar.gz + TBD, the following four: + + libjpeg -- ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz + NumPy -- http://download.sourceforge.net/numpy/Numerical-15.3.tgz + Pmw -- ftp://ftp.dscpl.com.au/pub/pmw/Pmw.0.8.4.tar.gz + BLT -- ftp://ftp.tcltk.com/aa004735/pub/blt/BLT2.4u.tar.gz + Software covered by the GNU Public License *************** *** 81,84 **** --- 87,92 ---- ESR also mentioned libpng, but I don't know of a Python module that uses it. + + How does all this fit in with distutils? From python-dev@python.org Fri Jul 14 16:00:05 2000 From: python-dev@python.org (Eric S. Raymond) Date: Fri, 14 Jul 2000 08:00:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcfgparser.tex,1.11,1.12 Message-ID: <200007141500.IAA09659@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9558/lib Modified Files: libcfgparser.tex Log Message: Document the second round of ConfigParser changes. Index: libcfgparser.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcfgparser.tex,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** libcfgparser.tex 2000/07/10 18:10:59 1.11 --- libcfgparser.tex 2000/07/14 15:00:02 1.12 *************** *** 161,167 **** \end{methoddesc} ! \begin{methoddesc}{write}{fileobect} Write a representation of the configuration to the specified file object. This representation can be parsed by a future \method{read()} call. (New in 1.6) \end{methoddesc} --- 161,180 ---- \end{methoddesc} ! \begin{methoddesc}{write}{fileobject} Write a representation of the configuration to the specified file object. This representation can be parsed by a future \method{read()} call. (New in 1.6) \end{methoddesc} + + \begin{methoddesc}{remove_option}{section, option} + Remove the specified \var{option} from the specified \var{section}. + If the section does not exist, raise \exception{NoSectionError}. + If the option existed to be removed, return 1; otherwise return 0. + (New in 1.6) + \end{methoddesc} + + \begin{methoddesc}{remove_section}{section} + Remove the specified \var{section} from the configuration. + If the section in fact existed, return 1. Otherwise return 0. + \end{methoddesc} + From python-dev@python.org Fri Jul 14 16:21:55 2000 From: python-dev@python.org (Barry Warsaw) Date: Fri, 14 Jul 2000 08:21:55 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0206.txt,1.3,1.4 Message-ID: <200007141521.IAA17789@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv17781 Modified Files: pep-0206.txt Log Message: Another round of updates from Moshe. A reference to the term "batteries included" was added. The question about open source 3rd party modules was answered, as was the explanation of GPL/LGPL. Index: pep-0206.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0206.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** pep-0206.txt 2000/07/14 14:37:20 1.3 --- pep-0206.txt 2000/07/14 15:21:52 1.4 *************** *** 30,37 **** compression library, and the gmp number manipulation library. ! TBD -- can anyone give reference to some article describing ! TBD -- "batteries included?" The Proposed Solution --- 30,39 ---- compression library, and the gmp number manipulation library. ! The original coinage of the term "batteries included" can be found ! here: + http://www.uk.research.att.com/~fms/ipc7/tr-1998-9.html + The Proposed Solution *************** *** 44,56 **** will still be able to link the Python modules against already installed libraries, or disable them completely. - - Additionally, some Open Source third-party modules will also be - distributed together with the source distribution. ! TBD -- does this mean some will be distributed but not enabled by ! default? [ed] ! Here is the list of libraries which are proposed to be dealt with ! in this manner, and where they can be downloaded: zlib -- http://www.info-zip.org/pub/infozip/zlib/zlib.tar.gz --- 46,59 ---- will still be able to link the Python modules against already installed libraries, or disable them completely. ! Additionally, some Open Source third-party Python modules will ! also be distributed together with the source distribution. The ! difference between those and external libraries is that the latter ! are distributed in order to make the Python distribution self ! contained, and the former are added so there will be new ! functionality in out-of-the-box Python. ! Here is the tentative list of libraries which are proposed to be ! dealt with in this manner, and where they can be downloaded: zlib -- http://www.info-zip.org/pub/infozip/zlib/zlib.tar.gz *************** *** 59,67 **** Tk -- http://dev.scriptics.com:80/download/tcl/tcl8_3/tk8.3.1.tar.gz PIL -- http://www.pythonware.com/downloads/Imaging-1.1.tar.gz ncurses -- ftp://dickey.his.com/ncurses/ncurses.tar.gz ! TBD, the following four: - libjpeg -- ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz NumPy -- http://download.sourceforge.net/numpy/Numerical-15.3.tgz Pmw -- ftp://ftp.dscpl.com.au/pub/pmw/Pmw.0.8.4.tar.gz --- 62,70 ---- Tk -- http://dev.scriptics.com:80/download/tcl/tcl8_3/tk8.3.1.tar.gz PIL -- http://www.pythonware.com/downloads/Imaging-1.1.tar.gz + libjpeg -- ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz ncurses -- ftp://dickey.his.com/ncurses/ncurses.tar.gz ! TBD, the following three: NumPy -- http://download.sourceforge.net/numpy/Numerical-15.3.tgz Pmw -- ftp://ftp.dscpl.com.au/pub/pmw/Pmw.0.8.4.tar.gz *************** *** 72,77 **** Software covered by the GNU Public License ! TBD -- please explain why GPL'd software is not included in Python ! (and perhaps the difference between GPL and LGPL). --- 75,87 ---- Software covered by the GNU Public License ! While many Python modules rely on software distributed under the ! GNU General Public License and the GNU Lesser General Public ! License, no such sources are proposed here to be added to the ! Python interpreter. Currently, the Python interpreter is ! distributed under a closed-source-friendly license, which means ! that it is possible to include it in a closed source product. ! Making redistributers worry about which parts they need to remove ! to make closed-source redistribution legal might cost more then ! the benefits. From python-dev@python.org Fri Jul 14 21:03:35 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Fri, 14 Jul 2000 13:03:35 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html sf-faq.html,1.1,1.2 Message-ID: <200007142003.NAA31617@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv31426 Modified Files: sf-faq.html Log Message: added Note about the importance of being logged in (and called earnest) Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** sf-faq.html 2000/07/14 09:00:06 1.1 --- sf-faq.html 2000/07/14 20:03:31 1.2 *************** *** 217,220 **** --- 217,223 ---- of the page.

    +

    Note: If you are sure that you have the right permissions and a drop-box + does not appear, check that you are actually logged in to SourceForge!

    +

    For more information about the use of the "Status:" and "Assigned To:" fields consult the Patch Manager Guidelines. A recent copy From python-dev@python.org Sat Jul 15 01:42:12 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Fri, 14 Jul 2000 17:42:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_extcall.py,1.4,1.5 Message-ID: <200007150042.RAA16047@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv15981 Modified Files: test_extcall.py Log Message: Break a cycle created in the saboteur() function. Index: test_extcall.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_extcall.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_extcall.py 2000/04/10 13:37:14 1.4 --- test_extcall.py 2000/07/15 00:42:09 1.5 *************** *** 86,93 **** # what about willful misconduct? def saboteur(**kw): ! kw['x'] = locals() d = {} ! saboteur(a=1, **d) assert d == {} try: --- 86,96 ---- # what about willful misconduct? def saboteur(**kw): ! kw['x'] = locals() # yields a cyclic kw ! return kw d = {} ! kw = saboteur(a=1, **d) assert d == {} + # break the cycle + del kw['x'] try: From python-dev@python.org Sat Jul 15 04:31:33 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Fri, 14 Jul 2000 20:31:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects listobject.c,2.81,2.82 Message-ID: <200007150331.UAA12299@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv12089 Modified Files: listobject.c Log Message: Fix in PyList_New(). With GC enabled and when out of memory, free() the GC pointer, not the object pointer. Index: listobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v retrieving revision 2.81 retrieving revision 2.82 diff -C2 -r2.81 -r2.82 *** listobject.c 2000/07/12 13:03:02 2.81 --- listobject.c 2000/07/15 03:31:31 2.82 *************** *** 61,65 **** op->ob_item = (PyObject **) PyMem_MALLOC(nbytes); if (op->ob_item == NULL) { ! PyObject_FREE(op); return PyErr_NoMemory(); } --- 61,65 ---- op->ob_item = (PyObject **) PyMem_MALLOC(nbytes); if (op->ob_item == NULL) { ! PyObject_FREE(PyObject_AS_GC(op)); return PyErr_NoMemory(); } From python-dev@python.org Sat Jul 15 21:45:26 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 15 Jul 2000 13:45:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib site.py,1.13,1.14 Message-ID: <200007152045.NAA04012@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv3787/Lib Modified Files: site.py Log Message: -- changed default encoding to "ascii". you can still change the default via site.py... Index: site.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/site.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** site.py 2000/07/10 19:32:19 1.13 --- site.py 2000/07/15 20:45:23 1.14 *************** *** 124,148 **** # encoding used by the default locale of this system. If the default # encoding cannot be determined or is unknown, it defaults to 'ascii'. ! # ! def locale_aware_defaultencoding(): ! import locale ! code, encoding = locale.getdefaultlocale() ! if encoding is None: ! encoding = 'ascii' ! try: ! sys.setdefaultencoding(encoding) ! except LookupError: ! sys.setdefaultencoding('ascii') ! if 1: # Enable to support locale aware default string encodings. ! locale_aware_defaultencoding() ! elif 0: # Enable to switch off string to Unicode coercion and implicit # Unicode to string conversion. ! sys.setdefaultencoding('undefined') ! elif 0: ! # Enable to hard-code a site specific default string encoding. ! sys.setdefaultencoding('ascii') # --- 124,144 ---- # encoding used by the default locale of this system. If the default # encoding cannot be determined or is unknown, it defaults to 'ascii'. ! ! encoding = None # default ! if 0: # Enable to support locale aware default string encodings. ! import locale ! loc = locale.getdefaultlocale() ! if loc[1]: ! encoding = loc[1] ! ! if 0: # Enable to switch off string to Unicode coercion and implicit # Unicode to string conversion. ! encoding = "undefined" ! ! if not encoding: ! encoding = "ascii" # From python-dev@python.org Sat Jul 15 21:50:29 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 15 Jul 2000 13:50:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib site.py,1.14,1.15 Message-ID: <200007152050.NAA04573@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv4355/Lib Modified Files: site.py Log Message: -- note to self: wait until 'cvs commit' has finished before you edit the file. Index: site.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/site.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** site.py 2000/07/15 20:45:23 1.14 --- site.py 2000/07/15 20:50:27 1.15 *************** *** 125,129 **** # encoding cannot be determined or is unknown, it defaults to 'ascii'. ! encoding = None # default if 0: --- 125,129 ---- # encoding cannot be determined or is unknown, it defaults to 'ascii'. ! encoding = "ascii" # default if 0: *************** *** 139,144 **** encoding = "undefined" ! if not encoding: ! encoding = "ascii" # --- 139,143 ---- encoding = "undefined" ! sys.setdefaultencoding(encoding) # From python-dev@python.org Sat Jul 15 21:58:47 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 15 Jul 2000 13:58:47 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib site.py,1.15,1.16 Message-ID: <200007152058.NAA06121@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv6101/Lib Modified Files: site.py Log Message: -- fixed the comment, too Index: site.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/site.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** site.py 2000/07/15 20:50:27 1.15 --- site.py 2000/07/15 20:58:44 1.16 *************** *** 121,127 **** # ! # Set the string encoding used by the Unicode implementation to the ! # encoding used by the default locale of this system. If the default ! # encoding cannot be determined or is unknown, it defaults to 'ascii'. encoding = "ascii" # default --- 121,127 ---- # ! # Set the string encoding used by the Unicode implementation. The ! # default is 'ascii', but if you're willing to experiment, you can ! # change this. encoding = "ascii" # default From python-dev@python.org Sat Jul 15 23:13:51 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 15 Jul 2000 15:13:51 -0700 Subject: [Python-checkins] CVS: python/dist/src config.h.in,2.63,2.64 Message-ID: <200007152213.PAA23854@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv23707 Modified Files: config.h.in Log Message: Oops, forgot to run autoheader before checking in the _getpty move to posixmodule. Index: config.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/config.h.in,v retrieving revision 2.63 retrieving revision 2.64 diff -C2 -r2.63 -r2.64 *** config.h.in 2000/07/13 01:26:58 2.63 --- config.h.in 2000/07/15 22:13:48 2.64 *************** *** 261,264 **** --- 261,267 ---- #undef SIZEOF_VOID_P + /* Define if you have the _getpty function. */ + #undef HAVE__GETPTY + /* Define if you have the alarm function. */ #undef HAVE_ALARM From python-dev@python.org Sat Jul 15 23:27:50 2000 From: python-dev@python.org (Jack Jansen) Date: Sat, 15 Jul 2000 15:27:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/bgen/bgen scantools.py,1.17,1.18 Message-ID: <200007152227.PAA24411@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/bgen/bgen In directory slayer.i.sourceforge.net:/tmp/cvs-serv24384 Modified Files: scantools.py Log Message: ScannerPREUH3.initpatterns() should call Scanner.initpatterns() so the new comment patterns get included. Index: scantools.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/bgen/bgen/scantools.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** scantools.py 2000/06/28 20:53:33 1.17 --- scantools.py 2000/07/15 22:27:47 1.18 *************** *** 559,562 **** --- 559,563 ---- """Scanner for Universal Headers before release 3""" def initpatterns(self): + Scanner.initpatterns(self) self.head_pat = "^extern pascal[ \t]+" # XXX Mac specific! self.tail_pat = "[;={}]" From python-dev@python.org Sat Jul 15 23:29:33 2000 From: python-dev@python.org (Jack Jansen) Date: Sat, 15 Jul 2000 15:29:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/bgen/bgen macsupport.py,1.18,1.19 Message-ID: <200007152229.PAA24579@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/bgen/bgen In directory slayer.i.sourceforge.net:/tmp/cvs-serv24422 Modified Files: macsupport.py Log Message: Modified the standard mac preamble so we include pymactoolbox.h in stead of defining lots of function prototypes in each module. Index: macsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/bgen/bgen/macsupport.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** macsupport.py 2000/07/06 15:17:52 1.18 --- macsupport.py 2000/07/15 22:29:30 1.19 *************** *** 101,140 **** # Stuff added immediately after the system include files includestuff = """ - #define SystemSevenOrLater 1 - #include "macglue.h" ! #include ! #include ! #include ! #include ! ! extern PyObject *ResObj_New(Handle); ! extern int ResObj_Convert(PyObject *, Handle *); ! extern PyObject *OptResObj_New(Handle); ! extern int OptResObj_Convert(PyObject *, Handle *); ! ! extern PyObject *WinObj_New(WindowPtr); ! extern int WinObj_Convert(PyObject *, WindowPtr *); ! extern PyTypeObject Window_Type; ! #define WinObj_Check(x) ((x)->ob_type == &Window_Type) ! ! extern PyObject *DlgObj_New(DialogPtr); ! extern int DlgObj_Convert(PyObject *, DialogPtr *); ! extern PyTypeObject Dialog_Type; ! #define DlgObj_Check(x) ((x)->ob_type == &Dialog_Type) ! ! extern PyObject *MenuObj_New(MenuHandle); ! extern int MenuObj_Convert(PyObject *, MenuHandle *); ! ! extern PyObject *CtlObj_New(ControlHandle); ! extern int CtlObj_Convert(PyObject *, ControlHandle *); ! ! extern PyObject *GrafObj_New(GrafPtr); ! extern int GrafObj_Convert(PyObject *, GrafPtr *); ! ! extern PyObject *BMObj_New(BitMapPtr); ! extern int BMObj_Convert(PyObject *, BitMapPtr *); ! ! extern PyObject *WinObj_WhichWindow(WindowPtr); """ --- 101,106 ---- # Stuff added immediately after the system include files includestuff = """ #include "macglue.h" ! #include "pymactoolbox.h" """ From python-dev@python.org Sat Jul 15 23:31:47 2000 From: python-dev@python.org (Jack Jansen) Date: Sat, 15 Jul 2000 15:31:47 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _localemodule.c,2.11,2.12 Message-ID: <200007152231.PAA24651@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv24642 Modified Files: _localemodule.c Log Message: Implemented getdefaultlocale() for macintosh, after an idea by Fredrik. Index: _localemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_localemodule.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** _localemodule.c 2000/07/08 20:07:24 2.11 --- _localemodule.c 2000/07/15 22:31:45 2.12 *************** *** 25,29 **** #ifdef macintosh ! char *strdup(char *); #endif --- 25,29 ---- #ifdef macintosh ! #include "macglue.h" #endif *************** *** 381,384 **** --- 381,392 ---- #endif + #if defined(macintosh) + static PyObject* + PyLocale_getdefaultlocale(PyObject* self, PyObject* args) + { + return Py_BuildValue("Os", Py_None, PyMac_getscript()); + } + #endif + static struct PyMethodDef PyLocale_Methods[] = { {"setlocale", (PyCFunction) PyLocale_setlocale, 1, setlocale__doc__}, *************** *** 386,390 **** {"strcoll", (PyCFunction) PyLocale_strcoll, 1, strcoll__doc__}, {"strxfrm", (PyCFunction) PyLocale_strxfrm, 1, strxfrm__doc__}, ! #if defined(MS_WIN32) {"_getdefaultlocale", (PyCFunction) PyLocale_getdefaultlocale, 0}, #endif --- 394,398 ---- {"strcoll", (PyCFunction) PyLocale_strcoll, 1, strcoll__doc__}, {"strxfrm", (PyCFunction) PyLocale_strxfrm, 1, strxfrm__doc__}, ! #if defined(MS_WIN32) || defined(macintosh) {"_getdefaultlocale", (PyCFunction) PyLocale_getdefaultlocale, 0}, #endif From python-dev@python.org Sun Jul 16 00:25:53 2000 From: python-dev@python.org (Barry Warsaw) Date: Sat, 15 Jul 2000 16:25:53 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0211.txt,NONE,1.1 Message-ID: <200007152325.QAA01755@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv1740 Added Files: pep-0211.txt Log Message: PEP 211, Adding New Operators to Python, owner Greg Wilson. ***** Error reading new file(2, 'No such file or directory') From python-dev@python.org Sun Jul 16 00:26:38 2000 From: python-dev@python.org (Barry Warsaw) Date: Sat, 15 Jul 2000 16:26:38 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.6,1.7 Message-ID: <200007152326.QAA01799@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv1791 Modified Files: pep-0000.txt Log Message: Added PEPs 207 - 211 Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** pep-0000.txt 2000/07/14 03:54:49 1.6 --- pep-0000.txt 2000/07/15 23:26:36 1.7 *************** *** 26,29 **** --- 26,34 ---- 205 pep-0205.txt Weak References fdrake 206 pep-0206.txt 2.0 Batteries Included moshez + 207 pep-0207.txt Rich Comparisons davida + 208 pep-0208.txt Reworking the Coercion Model davida + 209 pep-0209.txt Adding Multidimensional Arrays davida + 210 pep-0210.txt Decoupling the Interpreter Loop davida + 211 pep-0211.txt Adding New Operators to Python gvwilson From python-dev@python.org Sun Jul 16 00:28:29 2000 From: python-dev@python.org (Barry Warsaw) Date: Sat, 15 Jul 2000 16:28:29 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0207.txt,NONE,1.1 pep-0208.txt,NONE,1.1 pep-0209.txt,NONE,1.1 pep-0210.txt,NONE,1.1 Message-ID: <200007152328.QAA01998@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv1972 Added Files: pep-0207.txt pep-0208.txt pep-0209.txt pep-0210.txt Log Message: New PEPs, all initially owned by David Ascher. ***** Error reading new file(2, 'No such file or directory') ***** Error reading new file(2, 'No such file or directory') ***** Error reading new file(2, 'No such file or directory') ***** Error reading new file(2, 'No such file or directory') From python-dev@python.org Sun Jul 16 00:52:42 2000 From: python-dev@python.org (Barry Warsaw) Date: Sat, 15 Jul 2000 16:52:42 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0206.txt,1.4,1.5 Message-ID: <200007152352.QAA03097@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv3087 Modified Files: pep-0206.txt Log Message: Moshe sez: Added paragraphs about relation to distutils. Index: pep-0206.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0206.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** pep-0206.txt 2000/07/14 15:21:52 1.4 --- pep-0206.txt 2000/07/15 23:52:40 1.5 *************** *** 71,75 **** --- 71,89 ---- BLT -- ftp://ftp.tcltk.com/aa004735/pub/blt/BLT2.4u.tar.gz + + Connection to Distutils + + Since Python 2.0 comes with a new mechanism of distributing Python + modules, called ``distutils'', we should be able to use it. Specificially, + since distutils has the capability or building Python modules in an + automatic fashion, it is hoped that some of the work will consist in + creating a new directory with the source, and having the ``super-make'' + run "./setup --install" in those directories. This should at least take + care of PIL, NumPy and Pmw. In addition, it is hoped that this mechanism + will be easy enough to add other Python modules as user requests direct + us. + + Software covered by the GNU Public License *************** *** 97,102 **** ESR also mentioned libpng, but I don't know of a Python module that uses it. - - How does all this fit in with distutils? --- 111,114 ---- From python-dev@python.org Sun Jul 16 12:57:22 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 04:57:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-irix6 cdplayer.py,1.2,1.3 Message-ID: <200007161157.EAA10827@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/plat-irix6 In directory slayer.i.sourceforge.net:/tmp/cvs-serv10638/Lib/plat-irix6 Modified Files: cdplayer.py Log Message: Bugfix by Rob W. W. Hooft, from his spelling fixes patch. This one is a genuine bug, so I checked it in separately. Index: cdplayer.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/plat-irix6/cdplayer.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** cdplayer.py 1997/10/22 21:00:47 1.2 --- cdplayer.py 2000/07/16 11:57:20 1.3 *************** *** 54,58 **** print 'syntax error in ~/' + cdplayerrc continue ! name, valye = match.group(1, 2) if name == 'title': self.title = value --- 54,58 ---- print 'syntax error in ~/' + cdplayerrc continue ! name, value = match.group(1, 2) if name == 'title': self.title = value From python-dev@python.org Sun Jul 16 12:57:22 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 04:57:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-irix5 cdplayer.py,1.5,1.6 Message-ID: <200007161157.EAA10828@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/plat-irix5 In directory slayer.i.sourceforge.net:/tmp/cvs-serv10638/Lib/plat-irix5 Modified Files: cdplayer.py Log Message: Bugfix by Rob W. W. Hooft, from his spelling fixes patch. This one is a genuine bug, so I checked it in separately. Index: cdplayer.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/plat-irix5/cdplayer.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** cdplayer.py 1997/10/22 21:00:34 1.5 --- cdplayer.py 2000/07/16 11:57:19 1.6 *************** *** 54,58 **** print 'syntax error in ~/' + cdplayerrc continue ! name, valye = match.group(1, 2) if name == 'title': self.title = value --- 54,58 ---- print 'syntax error in ~/' + cdplayerrc continue ! name, value = match.group(1, 2) if name == 'title': self.title = value From python-dev@python.org Sun Jul 16 13:04:33 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 05:04:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/lib-old Para.py,1.5,1.6 ni.py,1.2,1.3 Message-ID: <200007161204.FAA12779@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/lib-old In directory slayer.i.sourceforge.net:/tmp/cvs-serv11187/Lib/lib-old Modified Files: Para.py ni.py Log Message: Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;) Index: Para.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/lib-old/Para.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** Para.py 2000/05/08 17:29:50 1.5 --- Para.py 2000/07/16 12:04:31 1.6 *************** *** 57,61 **** # Tab to a given position (relative to the current left indent): # remove all stretch, add fixed space up to the new indent. ! # If the current position is already beying the tab stop, # don't add any new space (but still remove the stretch) def tabto(self, tab): --- 57,61 ---- # Tab to a given position (relative to the current left indent): # remove all stretch, add fixed space up to the new indent. ! # If the current position is already at the tab stop, # don't add any new space (but still remove the stretch) def tabto(self, tab): Index: ni.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/lib-old/ni.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ni.py 1998/06/09 19:17:07 1.2 --- ni.py 2000/07/16 12:04:31 1.3 *************** *** 65,69 **** __domain__, defines a list of *packages* that are searched (using their respective module search paths) to satisfy imports. It is ! initialized to the list cosisting of the package itself, its parent package, its parent's parent, and so on, ending with the root package (the nameless package containing all top-level packages and modules, --- 65,69 ---- __domain__, defines a list of *packages* that are searched (using their respective module search paths) to satisfy imports. It is ! initialized to the list consisting of the package itself, its parent package, its parent's parent, and so on, ending with the root package (the nameless package containing all top-level packages and modules, From python-dev@python.org Sun Jul 16 13:04:34 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 05:04:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser pgen.c,2.15,2.16 Message-ID: <200007161204.FAA12819@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv11187/Parser Modified Files: pgen.c Log Message: Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;) Index: pgen.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgen.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** pgen.c 2000/07/09 03:09:56 2.15 --- pgen.c 2000/07/16 12:04:32 2.16 *************** *** 576,580 **** [Aho&Ullman 77]. It does not always finds the minimal DFA, but it does usually make a much smaller one... (For an example ! of sub-optimal behaviour, try S: x a b+ | y a b+.) */ --- 576,580 ---- [Aho&Ullman 77]. It does not always finds the minimal DFA, but it does usually make a much smaller one... (For an example ! of sub-optimal behavior, try S: x a b+ | y a b+.) */ From python-dev@python.org Sun Jul 16 13:04:35 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 05:04:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules cStringIO.c,2.22,2.23 flmodule.c,1.41,1.42 getpath.c,1.26,1.27 imgfile.c,1.25,1.26 md5c.c,2.4,2.5 md5module.c,2.18,2.19 mmapmodule.c,2.19,2.20 mpzmodule.c,2.29,2.30 parsermodule.c,2.46,2.47 posixmodule.c,2.153,2.154 pypcre.c,2.19,2.20 regexpr.c,1.31,1.32 regexpr.h,1.12,1.13 resource.c,2.13,2.14 rgbimgmodule.c,2.20,2.21 rotormodule.c,2.26,2.27 stropmodule.c,2.68,2.69 sunaudiodev.c,1.20,1.21 syslogmodule.c,2.14,2.15 tclNotify.c,2.1,2.2 Message-ID: <200007161204.FAA12834@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv11187/Modules Modified Files: cStringIO.c flmodule.c getpath.c imgfile.c md5c.c md5module.c mmapmodule.c mpzmodule.c parsermodule.c posixmodule.c pypcre.c regexpr.c regexpr.h resource.c rgbimgmodule.c rotormodule.c stropmodule.c sunaudiodev.c syslogmodule.c tclNotify.c Log Message: Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;) Index: cStringIO.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cStringIO.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** cStringIO.c 2000/07/12 13:05:33 2.22 --- cStringIO.c 2000/07/16 12:04:31 2.23 *************** *** 58,62 **** "the StringIO module that is written in C. It does not provide the\n" "full generality of StringIO, but it provides enough for most\n" ! "applications and is especially useful in conjuction with the\n" "pickle module.\n" "\n" --- 58,62 ---- "the StringIO module that is written in C. It does not provide the\n" "full generality of StringIO, but it provides enough for most\n" ! "applications and is especially useful in conjunction with the\n" "pickle module.\n" "\n" Index: flmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/flmodule.c,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -r1.41 -r1.42 *** flmodule.c 2000/07/12 10:43:11 1.41 --- flmodule.c 2000/07/16 12:04:31 1.42 *************** *** 23,27 **** * the program takes precaution to ensure that only one thread can be in * this module at any time). This will have to be fixed some time. ! * (A fix will probably also have to synchronise with the gl module). */ --- 23,27 ---- * the program takes precaution to ensure that only one thread can be in * this module at any time). This will have to be fixed some time. ! * (A fix will probably also have to synchronize with the gl module). */ Index: getpath.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/getpath.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** getpath.c 2000/07/08 06:16:37 1.26 --- getpath.c 2000/07/16 12:04:31 1.27 *************** *** 93,97 **** * * Well, almost. Once we have determined prefix and exec_prefix, the ! * preprocesor variable PYTHONPATH is used to construct a path. Each * relative path on PYTHONPATH is prefixed with prefix. Then the directory * containing the shared library modules is appended. The environment --- 93,97 ---- * * Well, almost. Once we have determined prefix and exec_prefix, the ! * preprocessor variable PYTHONPATH is used to construct a path. Each * relative path on PYTHONPATH is prefixed with prefix. Then the directory * containing the shared library modules is appended. The environment Index: imgfile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/imgfile.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** imgfile.c 2000/07/10 17:04:33 1.25 --- imgfile.c 2000/07/16 12:04:31 1.26 *************** *** 11,15 **** /* IMGFILE module - Interface to sgi libimage */ ! /* XXX This modele should be done better at some point. It should return ** an object of image file class, and have routines to manipulate these ** image files in a neater way (so you can get rgb images off a greyscale --- 11,15 ---- /* IMGFILE module - Interface to sgi libimage */ ! /* XXX This module should be done better at some point. It should return ** an object of image file class, and have routines to manipulate these ** image files in a neater way (so you can get rgb images off a greyscale Index: md5c.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/md5c.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** md5c.c 2000/07/10 04:20:57 2.4 --- md5c.c 2000/07/16 12:04:31 2.5 *************** *** 144,148 **** /* MD5 finalization. Ends an MD5 message-digest operation, writing the ! the message digest and zeroizing the context. */ void --- 144,148 ---- /* MD5 finalization. Ends an MD5 message-digest operation, writing the ! the message digest and zeroing the context. */ void Index: md5module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/md5module.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** md5module.c 2000/07/10 12:43:58 2.18 --- md5module.c 2000/07/16 12:04:31 2.19 *************** *** 146,150 **** feed this object with arbitrary strings using the update() method, and\n\ at any point you can ask it for the digest (a strong kind of 128-bit\n\ ! checksum, a.k.a. ``fingerprint'') of the contatenation of the strings\n\ fed to it so far using the digest() method.\n\ \n\ --- 146,150 ---- feed this object with arbitrary strings using the update() method, and\n\ at any point you can ask it for the digest (a strong kind of 128-bit\n\ ! checksum, a.k.a. ``fingerprint'') of the concatenation of the strings\n\ fed to it so far using the digest() method.\n\ \n\ Index: mmapmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** mmapmodule.c 2000/07/09 13:16:13 2.19 --- mmapmodule.c 2000/07/16 12:04:31 2.20 *************** *** 702,706 **** (len(), slicing(), sequence indexing) are limited by a C int. ! Returns -1 on error, with an apprpriate Python exception raised. On success, the map size is returned. */ static int --- 702,706 ---- (len(), slicing(), sequence indexing) are limited by a C int. ! Returns -1 on error, with an appropriate Python exception raised. On success, the map size is returned. */ static int Index: mpzmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mpzmodule.c,v retrieving revision 2.29 retrieving revision 2.30 diff -C2 -r2.29 -r2.30 *** mpzmodule.c 2000/07/10 17:14:00 2.29 --- mpzmodule.c 2000/07/16 12:04:31 2.30 *************** *** 1636,1641 **** int *location; { ! /* assumptions: *alloc returns address dividable by 4, ! mpz_* routines allocate in chunks dividable by four */ fprintf(stderr, "MP_TEST_ERROR: location holds 0x%08d\n", *location ); Py_FatalError("MP_TEST_ERROR"); --- 1636,1641 ---- int *location; { ! /* assumptions: *alloc returns address divisible by 4, ! mpz_* routines allocate in chunks divisible by four */ fprintf(stderr, "MP_TEST_ERROR: location holds 0x%08d\n", *location ); Py_FatalError("MP_TEST_ERROR"); Index: parsermodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** parsermodule.c 2000/07/12 13:05:33 2.46 --- parsermodule.c 2000/07/16 12:04:31 2.47 *************** *** 67,71 **** PyObject* element); ! /* The function below is copyrigthed by Stichting Mathematisch Centrum. The * original copyright statement is included below, and continues to apply * in full to the function immediately following. All other material is --- 67,71 ---- PyObject* element); ! /* The function below is copyrighted by Stichting Mathematisch Centrum. The * original copyright statement is included below, and continues to apply * in full to the function immediately following. All other material is *************** *** 2404,2408 **** break; /* ! * Fundemental statements. */ case expr_stmt: --- 2404,2408 ---- break; /* ! * Fundamental statements. */ case expr_stmt: *************** *** 2553,2557 **** res = validate_newline(CHILD(tree, j)); } ! /* This stays in to prevent any internal failues from getting to the * user. Hopefully, this won't be needed. If a user reports getting * this, we have some debugging to do. --- 2553,2557 ---- res = validate_newline(CHILD(tree, j)); } ! /* This stays in to prevent any internal failures from getting to the * user. Hopefully, this won't be needed. If a user reports getting * this, we have some debugging to do. Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.153 retrieving revision 2.154 diff -C2 -r2.153 -r2.154 *** posixmodule.c 2000/07/14 14:28:33 2.153 --- posixmodule.c 2000/07/16 12:04:31 2.154 *************** *** 1361,1365 **** path: path of executable file\n\ args: tuple or list of arguments\n\ ! env: dictonary of strings mapping to strings"; static PyObject * --- 1361,1365 ---- path: path of executable file\n\ args: tuple or list of arguments\n\ ! env: dictionary of strings mapping to strings"; static PyObject * *************** *** 1559,1563 **** path: path of executable file\n\ args: tuple or list of arguments\n\ ! env: dictonary of strings mapping to strings"; static PyObject * --- 1559,1563 ---- path: path of executable file\n\ args: tuple or list of arguments\n\ ! env: dictionary of strings mapping to strings"; static PyObject * *************** *** 1701,1705 **** #else /* BSDI does not supply a prototype for the 'openpty' and 'forkpty' ! functions, eventhough they are included in libutil. */ #include extern int openpty(int *, int *, char *, struct termios *, struct winsize *); --- 1701,1705 ---- #else /* BSDI does not supply a prototype for the 'openpty' and 'forkpty' ! functions, even though they are included in libutil. */ #include extern int openpty(int *, int *, char *, struct termios *, struct winsize *); *************** *** 3898,3902 **** * It maps strings representing configuration variable names to * integer values, allowing those functions to be called with the ! * magic names instead of poluting the module's namespace with tons of * rarely-used constants. There are three separate tables that use * these definitions. --- 3898,3902 ---- * It maps strings representing configuration variable names to * integer values, allowing those functions to be called with the ! * magic names instead of polluting the module's namespace with tons of * rarely-used constants. There are three separate tables that use * these definitions. Index: pypcre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pypcre.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** pypcre.c 2000/07/05 22:56:52 2.19 --- pypcre.c 2000/07/16 12:04:31 2.20 *************** *** 494,498 **** caseless = ((re->options | options) & PCRE_CASELESS) != 0; ! /* For an anchored pattern, or an unchored pattern that has a first char, or a multiline pattern that matches only at "line starts", no further processing at present. */ --- 494,498 ---- caseless = ((re->options | options) & PCRE_CASELESS) != 0; ! /* For an anchored pattern, or an unanchored pattern that has a first char, or a multiline pattern that matches only at "line starts", no further processing at present. */ *************** *** 1637,1642 **** } ! /* If the mininum is 1 and the previous item was a character string, ! we either have to put back the item that got cancelled if the string length was 1, or add the character back onto the end of a longer string. For a character type nothing need be done; it will just get --- 1637,1642 ---- } ! /* If the minimum is 1 and the previous item was a character string, ! we either have to put back the item that got canceled if the string length was 1, or add the character back onto the end of a longer string. For a character type nothing need be done; it will just get *************** *** 1650,1654 **** /* For a single negated character we also have to put back the ! item that got cancelled. */ else if (*previous == OP_NOT) code++; --- 1650,1654 ---- /* For a single negated character we also have to put back the ! item that got canceled. */ else if (*previous == OP_NOT) code++; Index: regexpr.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/regexpr.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** regexpr.c 2000/07/10 13:05:28 1.31 --- regexpr.c 2000/07/16 12:04:31 1.32 *************** *** 125,129 **** struct { ! /* index into the curent page. If index == 0 and you need * to pop an item, move to the previous page and set index * = STACK_PAGE_SIZE - 1. Otherwise decrement index to --- 125,129 ---- struct { ! /* index into the current page. If index == 0 and you need * to pop an item, move to the previous page and set index * = STACK_PAGE_SIZE - 1. Otherwise decrement index to Index: regexpr.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/regexpr.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** regexpr.h 1997/09/03 00:47:36 1.12 --- regexpr.h 2000/07/16 12:04:31 1.13 *************** *** 120,124 **** int re_search(regexp_t compiled, unsigned char *string, int size, int startpos, int range, regexp_registers_t regs); ! /* This rearches for a substring matching the regexp. This returns the * first index at which a match is found. range specifies at how many * positions to try matching; positive values indicate searching --- 120,124 ---- int re_search(regexp_t compiled, unsigned char *string, int size, int startpos, int range, regexp_registers_t regs); ! /* This searches for a substring matching the regexp. This returns the * first index at which a match is found. range specifies at how many * positions to try matching; positive values indicate searching Index: resource.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/resource.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** resource.c 2000/07/10 12:15:54 2.13 --- resource.c 2000/07/16 12:04:31 2.14 *************** *** 71,76 **** ru.ru_msgrcv, /* messages received */ ru.ru_nsignals, /* signals received */ ! ru.ru_nvcsw, /* voluntary context switchs */ ! ru.ru_nivcsw /* involuntary context switchs */ ); } --- 71,76 ---- ru.ru_msgrcv, /* messages received */ ru.ru_nsignals, /* signals received */ ! ru.ru_nvcsw, /* voluntary context switches */ ! ru.ru_nivcsw /* involuntary context switches */ ); } Index: rgbimgmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/rgbimgmodule.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** rgbimgmodule.c 2000/07/10 10:49:30 2.20 --- rgbimgmodule.c 2000/07/16 12:04:31 2.21 *************** *** 554,558 **** * the pixel array. zsize specifies what kind of image file to * write out. if zsize is 1, the luminance of the pixels are ! * calculated, and a sinlge channel black and white image is saved. * If zsize is 3, an RGB image file is saved. If zsize is 4, an * RGBA image file is saved. --- 554,558 ---- * the pixel array. zsize specifies what kind of image file to * write out. if zsize is 1, the luminance of the pixels are ! * calculated, and a single channel black and white image is saved. * If zsize is 3, an RGB image file is saved. If zsize is 4, an * RGBA image file is saved. Index: rotormodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/rotormodule.c,v retrieving revision 2.26 retrieving revision 2.27 diff -C2 -r2.26 -r2.27 *** rotormodule.c 2000/07/10 22:41:30 2.26 --- rotormodule.c 2000/07/16 12:04:31 2.27 *************** *** 24,28 **** /* This creates an encryption and decryption engine I am calling ! a rotor due to the original design was a harware rotor with contacts used in Germany during WWII. --- 24,28 ---- /* This creates an encryption and decryption engine I am calling ! a rotor due to the original design was a hardware rotor with contacts used in Germany during WWII. *************** *** 44,48 **** established via the {en,de}crypt calls. They will NOT re-initalize the rotors unless: 1) They have not been ! initalized with {en,de}crypt since the last setkey() call; 2) {en,de}crypt has not been called for this rotor yet. --- 44,48 ---- established via the {en,de}crypt calls. They will NOT re-initalize the rotors unless: 1) They have not been ! initialized with {en,de}crypt since the last setkey() call; 2) {en,de}crypt has not been called for this rotor yet. *************** *** 210,214 **** ! /* These routines impliment the rotor itself */ /* Here is a fairly sophisticated {en,de}cryption system. It is based on --- 210,214 ---- ! /* These routines implement the rotor itself */ /* Here is a fairly sophisticated {en,de}cryption system. It is based on *************** *** 218,222 **** used to encrypt one character. ! The code is smart enought to tell if your alphabet has a number of characters equal to a power of two. If it does, it uses logical operations, if not it uses div and mod (both require a division). --- 218,222 ---- used to encrypt one character. ! The code is smart enough to tell if your alphabet has a number of characters equal to a power of two. If it does, it uses logical operations, if not it uses div and mod (both require a division). Index: stropmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/stropmodule.c,v retrieving revision 2.68 retrieving revision 2.69 diff -C2 -r2.68 -r2.69 *** stropmodule.c 2000/07/12 13:05:33 2.68 --- stropmodule.c 2000/07/16 12:04:31 2.69 *************** *** 168,172 **** \n\ Return a string composed of the words in list, with\n\ ! intervening occurences of sep. Sep defaults to a single\n\ space.\n\ \n\ --- 168,172 ---- \n\ Return a string composed of the words in list, with\n\ ! intervening occurrences of sep. Sep defaults to a single\n\ space.\n\ \n\ *************** *** 1041,1048 **** mymemreplace ! Return a string in which all occurences of PAT in memory STR are replaced with SUB. ! If length of PAT is less than length of STR or there are no occurences of PAT in STR, then the original string is returned. Otherwise, a new string is allocated here and returned. --- 1041,1048 ---- mymemreplace ! Return a string in which all occurrences of PAT in memory STR are replaced with SUB. ! If length of PAT is less than length of STR or there are no occurrences of PAT in STR, then the original string is returned. Otherwise, a new string is allocated here and returned. Index: sunaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sunaudiodev.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** sunaudiodev.c 2000/07/10 17:25:37 1.20 --- sunaudiodev.c 2000/07/16 12:04:31 1.21 *************** *** 259,263 **** return NULL; } ! /* x_ocount is in bytes, wheras play.samples is in frames */ /* we want frames */ return PyInt_FromLong(self->x_ocount / (ai.play.channels * --- 259,263 ---- return NULL; } ! /* x_ocount is in bytes, whereas play.samples is in frames */ /* we want frames */ return PyInt_FromLong(self->x_ocount / (ai.play.channels * Index: syslogmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/syslogmodule.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** syslogmodule.c 2000/07/10 12:29:26 2.14 --- syslogmodule.c 2000/07/16 12:04:31 2.15 *************** *** 37,41 **** - Added PyErr_Clear() call(s) where needed. - Fix core dumps if user message contains format specifiers. ! - Change openlog arg defaults to match normal syslog behaviour. - Plug memory leak in openlog(). - Fix setlogmask() to return previous mask value. --- 37,41 ---- - Added PyErr_Clear() call(s) where needed. - Fix core dumps if user message contains format specifiers. ! - Change openlog arg defaults to match normal syslog behavior. - Plug memory leak in openlog(). - Fix setlogmask() to return previous mask value. Index: tclNotify.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/tclNotify.c,v retrieving revision 2.1 retrieving revision 2.2 diff -C2 -r2.1 -r2.2 *** tclNotify.c 1997/09/28 05:52:41 2.1 --- tclNotify.c 2000/07/16 12:04:31 2.2 *************** *** 120,124 **** * * Side effects: ! * Clears the notifier intialization flag. * *---------------------------------------------------------------------- --- 120,124 ---- * * Side effects: ! * Clears the notifier initialization flag. * *---------------------------------------------------------------------- *************** *** 203,207 **** * * Side effects: ! * The given event source is cancelled, so its procedure will * never again be called. If no such source exists, nothing * happens. --- 203,207 ---- * * Side effects: ! * The given event source is canceled, so its procedure will * never again be called. If no such source exists, nothing * happens. From python-dev@python.org Sun Jul 16 13:05:02 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 05:05:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Demo/sgi/gl kites.py,1.3,1.4 Message-ID: <200007161205.FAA13050@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/sgi/gl In directory slayer.i.sourceforge.net:/tmp/cvs-serv11187/Demo/sgi/gl Modified Files: kites.py Log Message: Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;) Index: kites.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/sgi/gl/kites.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** kites.py 1996/11/27 19:49:46 1.3 --- kites.py 2000/07/16 12:04:29 1.4 *************** *** 44,48 **** # ! # makeobj : the contructor of the object # def mkobj () : --- 44,48 ---- # ! # makeobj : the constructor of the object # def mkobj () : From python-dev@python.org Sun Jul 16 13:05:02 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 05:05:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Demo/sgi/video OldVcopy.py,1.3,1.4 Vrec.py,1.19,1.20 Vrecb.py,1.9,1.10 Message-ID: <200007161205.FAA13052@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/sgi/video In directory slayer.i.sourceforge.net:/tmp/cvs-serv11187/Demo/sgi/video Modified Files: OldVcopy.py Vrec.py Vrecb.py Log Message: Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;) Index: OldVcopy.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/sgi/video/OldVcopy.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** OldVcopy.py 1996/11/27 19:50:00 1.3 --- OldVcopy.py 2000/07/16 12:04:30 1.4 *************** *** 16,23 **** def usage(): ! sys.stderr.write('usage: Vcopy [-t type] [-m treshold] [-a] infile outfile\n') sys.stderr.write('-t Convert to other type\n') sys.stderr.write('-a Automatic\n') ! sys.stderr.write('-m Convert grey to mono with treshold\n') sys.stderr.write('-d Convert grey to mono with dithering\n') sys.exit(2) --- 16,23 ---- def usage(): ! sys.stderr.write('usage: Vcopy [-t type] [-m threshold] [-a] infile outfile\n') sys.stderr.write('-t Convert to other type\n') sys.stderr.write('-a Automatic\n') ! sys.stderr.write('-m Convert grey to mono with threshold\n') sys.stderr.write('-d Convert grey to mono with dithering\n') sys.exit(2) Index: Vrec.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/sgi/video/Vrec.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** Vrec.py 1996/11/27 19:50:19 1.19 --- Vrec.py 2000/07/16 12:04:30 1.20 *************** *** 27,31 **** print '-G : 2-bit greyscale dithered' print '-m : monochrome dithered' ! print '-M value : monochrome tresholded with value' print '-f : Capture fields (in stead of frames)' print '-P frames : preallocate space for "frames" frames' --- 27,31 ---- print '-G : 2-bit greyscale dithered' print '-m : monochrome dithered' ! print '-M value : monochrome thresholded with value' print '-f : Capture fields (in stead of frames)' print '-P frames : preallocate space for "frames" frames' Index: Vrecb.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/sgi/video/Vrecb.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** Vrecb.py 1996/11/27 19:50:21 1.9 --- Vrecb.py 2000/07/16 12:04:30 1.10 *************** *** 46,50 **** print '-G : 2-bit greyscale dithered' print '-m : monochrome dithered' ! print '-M value : monochrome tresholded with value' print '-f : Capture fields (instead of frames)' print '-n number : Capture this many frames (default 60)' --- 46,50 ---- print '-G : 2-bit greyscale dithered' print '-m : monochrome dithered' ! print '-M value : monochrome thresholded with value' print '-f : Capture fields (instead of frames)' print '-n number : Capture this many frames (default 60)' From python-dev@python.org Sun Jul 16 13:05:03 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 05:05:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include abstract.h,2.23,2.24 cStringIO.h,2.12,2.13 cobject.h,2.8,2.9 longintrepr.h,2.9,2.10 modsupport.h,2.31,2.32 object.h,2.62,2.63 unicodeobject.h,2.14,2.15 Message-ID: <200007161205.FAA13066@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv11187/Include Modified Files: abstract.h cStringIO.h cobject.h longintrepr.h modsupport.h object.h unicodeobject.h Log Message: Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;) Index: abstract.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/abstract.h,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** abstract.h 2000/07/13 19:39:15 2.23 --- abstract.h 2000/07/16 12:04:30 2.24 *************** *** 696,700 **** /* ! Return the concatination of o1 and o2 on success, and NULL on failure. This is the equivalent of the Python expression: o1+o2. --- 696,700 ---- /* ! Return the concatenation of o1 and o2 on success, and NULL on failure. This is the equivalent of the Python expression: o1+o2. Index: cStringIO.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/cStringIO.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** cStringIO.h 2000/07/09 03:09:55 2.12 --- cStringIO.h 2000/07/16 12:04:30 2.13 *************** *** 72,76 **** */ ! /* Basic fuctions to manipulate cStringIO objects from C */ static struct PycStringIO_CAPI { --- 72,76 ---- */ ! /* Basic functions to manipulate cStringIO objects from C */ static struct PycStringIO_CAPI { Index: cobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/cobject.h,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** cobject.h 2000/07/09 00:20:36 2.8 --- cobject.h 2000/07/16 12:04:30 2.9 *************** *** 29,33 **** /* Create a PyCObject from a pointer to a C object and an optional ! destrutor function. If the second argument is non-null, then it will be called with the first argument if and when the PyCObject is destroyed. --- 29,33 ---- /* Create a PyCObject from a pointer to a C object and an optional ! destructor function. If the second argument is non-null, then it will be called with the first argument if and when the PyCObject is destroyed. *************** *** 39,43 **** /* Create a PyCObject from a pointer to a C object, a description object, ! and an optional destrutor function. If the third argument is non-null, then it will be called with the first and second arguments if and when the PyCObject is destroyed. --- 39,43 ---- /* Create a PyCObject from a pointer to a C object, a description object, ! and an optional destructor function. If the third argument is non-null, then it will be called with the first and second arguments if and when the PyCObject is destroyed. Index: longintrepr.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/longintrepr.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** longintrepr.h 2000/07/08 04:17:21 2.9 --- longintrepr.h 2000/07/16 12:04:30 2.10 *************** *** 45,49 **** digit) is never zero. Also, in all cases, for all valid i, 0 <= ob_digit[i] <= MASK. ! The allocation fuction takes care of allocating extra memory so that ob_digit[0] ... ob_digit[abs(ob_size)-1] are actually available. */ --- 45,49 ---- digit) is never zero. Also, in all cases, for all valid i, 0 <= ob_digit[i] <= MASK. ! The allocation function takes care of allocating extra memory so that ob_digit[0] ... ob_digit[abs(ob_size)-1] are actually available. */ Index: modsupport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/modsupport.h,v retrieving revision 2.31 retrieving revision 2.32 diff -C2 -r2.31 -r2.32 *** modsupport.h 2000/07/08 17:25:54 2.31 --- modsupport.h 2000/07/16 12:04:30 2.32 *************** *** 45,49 **** /* The API version is maintained (independently from the Python version) so we can detect mismatches between the interpreter and dynamically ! loaded modules. These are diagnosticised by an error message but the module is still loaded (because the mismatch can only be tested after loading the module). The error message is intended to --- 45,49 ---- /* The API version is maintained (independently from the Python version) so we can detect mismatches between the interpreter and dynamically ! loaded modules. These are diagnosed by an error message but the module is still loaded (because the mismatch can only be tested after loading the module). The error message is intended to Index: object.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/object.h,v retrieving revision 2.62 retrieving revision 2.63 diff -C2 -r2.62 -r2.63 *** object.h 2000/07/09 14:22:08 2.62 --- object.h 2000/07/16 12:04:30 2.63 *************** *** 52,56 **** to a pointer to a longer structure type. This longer type must start with the reference count and type fields; the macro PyObject_HEAD should be ! used for this (to accomodate for future changes). The implementation of a particular object type can cast the object pointer to the proper type and back. --- 52,56 ---- to a pointer to a longer structure type. This longer type must start with the reference count and type fields; the macro PyObject_HEAD should be ! used for this (to accommodate for future changes). The implementation of a particular object type can cast the object pointer to the proper type and back. *************** *** 327,331 **** objects that don't contain references to other objects or heap memory this can be the standard function free(). Both macros can be used ! whereever a void expression is allowed. The argument shouldn't be a NIL pointer. The macro _Py_NewReference(op) is used only to initialize reference counts to 1; it is defined here for convenience. --- 327,331 ---- objects that don't contain references to other objects or heap memory this can be the standard function free(). Both macros can be used ! wherever a void expression is allowed. The argument shouldn't be a NIL pointer. The macro _Py_NewReference(op) is used only to initialize reference counts to 1; it is defined here for convenience. *************** *** 519,523 **** Objects that want to be recursion safe need to use ! the macroes Py_TRASHCAN_SAFE_BEGIN(name) and --- 519,523 ---- Objects that want to be recursion safe need to use ! the macro's Py_TRASHCAN_SAFE_BEGIN(name) and Index: unicodeobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/unicodeobject.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** unicodeobject.h 2000/07/07 13:45:44 2.14 --- unicodeobject.h 2000/07/16 12:04:30 2.15 *************** *** 494,498 **** Note that Py_UNICODE data is being interpreted as UTF-16 reduced to UCS-2. This trick makes it possible to add full UTF-16 capabilities ! at a later point without comprimising the APIs. */ --- 494,498 ---- Note that Py_UNICODE data is being interpreted as UTF-16 reduced to UCS-2. This trick makes it possible to add full UTF-16 capabilities ! at a later point without compromising the APIs. */ *************** *** 816,820 **** ); ! /* Apply a argument tuple or dictionar to a format string and return the resulting Unicode string. */ --- 816,820 ---- ); ! /* Apply a argument tuple or dictionary to a format string and return the resulting Unicode string. */ From python-dev@python.org Sun Jul 16 13:12:14 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 14:12:14 +0200 Subject: [Python-checkins] Spelling fixes Message-ID: <20000716141214.S7340@xs4all.nl> A couple of the checkin-mails about the spelling fixes are lots. I did the whole bunch in a single checkin, and SourceForge didn't like that: cvs server: cannot write entry to log filter: /cvsroot/python/CVSROOT/syncmail 'python/dist/src/Python ceval.c,2.184,2.185 codecs.c,2.9,2.10 dynload_aix.c,2.5,2.6 dynload_next.c,2.5,2.6 exceptions.c,1.9,1.10 getargs.c,2.40,2.41 pythonrun.c,2.103,2.104 strtod.c,1.8,1.9 thread_lwp.h,2.10,2.11 thread_os2.h,2.7,2.8' python-checkins@python.org cvs server: cannot write entry to log filter: /cvsroot/python/CVSROOT/syncmail 'python/dist/src/Tools/freeze checkextensions_win32.py,1.5,1.6 freeze.py,1.36,1.37 modulefinder.py,1.12,1.13' python-checkins@python.org Mailing python-checkins@python.org... Traceback (innermost last): File "/cvsroot/python/CVSROOT/syncmail", line 172, in ? main() File "/cvsroot/python/CVSROOT/syncmail", line 166, in main blast_mail(mailcmd, specs[1:]) File "/cvsroot/python/CVSROOT/syncmail", line 118, in blast_mail fp = os.popen(mailcmd, 'w') os.error: (11, 'Resource temporarily unavailable') sh: fork: Resource temporarily unavailable sh: fork: Resource temporarily unavailable sh: fork: Resource temporarily unavailable sh: fork: Resource temporarily unavailable [...] I'm unsure howmany checkin mails were lost, but I'd advise anyone doing large checkins to do them seperately in each directory, by hand ;-P The changes do seem to be checked in without trouble, though. -- Thomas Wouters Hi! I'm a .signature virus! copy me into your .signature file to help me spread! From python-dev@python.org Sun Jul 16 14:29:19 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Sun, 16 Jul 2000 06:29:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.45,2.46 Message-ID: <200007161329.GAA01198@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv1189/Objects Modified Files: unicodeobject.c Log Message: Fix to a bug found by Florian Weimer: The UTF-8 decoder is still buggy (i.e. it doesn't pass Markus Kuhn's stress test), mainly due to the following construct: #define UTF8_ERROR(details) do { \ if (utf8_decoding_error(&s, &p, errors, details)) \ goto onError; \ continue; \ } while (0) (The "continue" statement is supposed to exit from the outer loop, but of course, it doesn't. Indeed, this is a marvelous example of the dangers of the C programming language and especially of the C preprocessor.) Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** unicodeobject.c 2000/07/16 12:04:31 2.45 --- unicodeobject.c 2000/07/16 13:29:13 2.46 *************** *** 635,639 **** if (utf8_decoding_error(&s, &p, errors, details)) \ goto onError; \ ! continue; \ } while (0) --- 635,639 ---- if (utf8_decoding_error(&s, &p, errors, details)) \ goto onError; \ ! goto nextChar; \ } while (0) *************** *** 732,735 **** --- 732,736 ---- } s += n; + nextChar: } From python-dev@python.org Sun Jul 16 17:07:31 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 09:07:31 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0203.txt,1.2,1.3 Message-ID: <200007161607.JAA29452@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv29324 Modified Files: pep-0203.txt Log Message: Incomplete version of the augmented assignment PEP. It currently includes only the arguments for/against inclusion of augmented assignment in Python, not yet the technical details. I decided to upload this half-completed version to give people some time to respond before I finish it :-) Feel free to bring up any and all arguments. The point of the PEP is to archive those, after all! Index: pep-0203.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0203.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pep-0203.txt 2000/07/14 03:30:20 1.2 --- pep-0203.txt 2000/07/16 16:07:29 1.3 *************** *** 8,11 **** --- 8,153 ---- + Introduction + + This PEP describes the `augmented assignment' proposal for Python + 2.0. This PEP tracks the status and ownership of this feature, + slated for introduction in Python 2.0. It contains a description + of the feature and outlines changes necessary to support the + feature. This PEP summarizes discussions held in mailing list + forums, and provides URLs for further information, where + appropriate. The CVS revision history of this file contains the + definitive historical record. + + + + The Origin of Augmented Assignment + + Augmented assignment refers to binary operators that combine two + existing operators: the assignment operator, and one of the binary + operators. Its origins lie in other programming languages, most + notably `C', where it was defined for performance reasons. They + are meant to replace the repetetive syntax of, for instance, + adding the number '1' to a variable: + + x = x + 1; + + with an expression that is shorter, less error-prone and easier to + optimize (by the compiler): + + x += 1; + + The same goes for all other binary operands, resulting in the + following augmented assignment operator list, based on Python's + current binary operator list: + + +=, -=, /=, *=, %=, **=, >>=, <<=, &=, |=, ^= + + See the documentation of each operator on what they do. + + + + Augmented Assignment in Python + + The traditional reasons for augmented assignment, readability and + optimization, are not as obvious in Python, for several reasons. + + - Numbers are immutable, they cannot be changed. In other + programming languages, a variable holds a value, and altering + the variable changes the value it holds. In Python, variables + hold `references' to values, and altering an immutable value + means changing the variable, not what it points to. + + - Assignment is a different operation in Python. In most + languages, variables are containers, and assignment copies a + value into that container. In Python, assignment binds a value + to a name, it does not copy the value into a new storage space. + + - The augmented assignment operators map fairly directly into the + underlying hardware. Python does not deal directly with the + hardware it runs on, so this `natural inclusion' does not make + sense. + + - The augmented assigment syntax is subtly different in more + complex expressions. What to do, for instance, in a case such + as this: + + seq[i:calc(seq, i)] *= r + + It is unclear whether 'seq' gets indexed once or twice, and + whether 'calc' gets called once or twice. + + + + Normal operators + + There are, however, good reasons to include augented assignment. + One of these has to do with Python's way of handling operators. In + Python, a user defined class can implement one or more of the + binary operators by supplying a 'magic' method name. For instance, + for a class to support ' + ', the '__add__' + method should be defined. This method should return a new object, + which is the result of the expression. + + For the case of ' + ', where 'object' does not + have an '__add__' method, the class can define a '__radd__' + method, which then should behave exactly as '__add__'. Indeed, + '__radd__' is often a different name for the same method. + + For C extention types, a similar technique is available, through + the PyNumberMethods and PySequenceMethods members of the PyType + structure. + + However, the problem with this approach is that the '__add__' + method cannot know in what context it is called. It cannot tell + whether it should create a new object, or whether it is allowed to + modify itself. (As would be the case in 'x = x + 1') As a result, + the '__add__' method, and all other such 'magic' methods, should + always return a new object. For large objects, this can be very + inefficient. + + This inefficiency is often solved by adding a method that does the + appropriate modification 'in-place'. List objects, for instance, + have the 'extend' method that behaves exactly as the '+' operator, + except the operation is done on the list itself, instead of on a + copy. + + The augmented assignment syntax can support this behaviour + explicitly. When the magic method for 'in-place' operation are + missing, it can fall back to the normal methods for that + operation, maintaining full backward compatibility even when + mixing the new syntax with old objects. + + The other benifit of augmented assignment is readability. After + the general concept of augmented assignment is grasped, all the + augmented assigment operators instantly become obvious. There is + no need for non-obvious and non-standard method names to implement + efficient, in-place operations, and there is no need to check the + type of an object before operating on it: the augmented assignment + will work for all types that implement that basic operation, not + merely those that implement the augmented variant. + + And the last problem with augmented assignment, what to do with + indexes and function calls in the expression, can be solved in a + very Pythonic manner: if it looks like it's only called once, it + *is* only called once. Taking this expression: + + seq[func(x)] += x + + The function 'func' is called once, and 'seq' is indexed twice: + once to retrieve the value (__getitem__), and once to store it + (__setitem__). So the expression can be rewritten as: + + tmp = func(x) + seq[tmp] = seq[tmp] + x + + The augmented assignment form of this expression is much more + readable. + + + + + + + Local Variables: mode: indented-text From python-dev@python.org Sun Jul 16 17:52:47 2000 From: python-dev@python.org (Skip Montanaro) Date: Sun, 16 Jul 2000 09:52:47 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib posixpath.py,1.32,1.33 Message-ID: <200007161652.JAA00418@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv410 Modified Files: posixpath.py Log Message: split and join on "/" in commonprefix Index: posixpath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/posixpath.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** posixpath.py 2000/07/12 16:55:57 1.32 --- posixpath.py 2000/07/16 16:52:45 1.33 *************** *** 121,129 **** n = m[:] for i in range(len(n)): ! n[i] = n[i].split(os.sep) ! # if os.sep didn't have any effect, try os.altsep ! if os.altsep and len(n[i]) == 1: ! n[i] = n[i].split(os.altsep) ! prefix = n[0] for item in n: --- 121,126 ---- n = m[:] for i in range(len(n)): ! n[i] = n[i].split("/") ! prefix = n[0] for item in n: *************** *** 133,137 **** if i == 0: return '' break ! return os.sep.join(prefix) --- 130,134 ---- if i == 0: return '' break ! return "/".join(prefix) From python-dev@python.org Sun Jul 16 18:10:52 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 16 Jul 2000 10:10:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.46,2.47 Message-ID: <200007161710.KAA08036@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv7981/python/dist/src/objects Modified Files: unicodeobject.c Log Message: Fix fatal compiler (MSVC6) error: unicodeobject.c(735) : error C2143: syntax error : missing ';' before '}' Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** unicodeobject.c 2000/07/16 13:29:13 2.46 --- unicodeobject.c 2000/07/16 17:10:50 2.47 *************** *** 733,736 **** --- 733,737 ---- s += n; nextChar: + /* empty */; } From python-dev@python.org Sun Jul 16 19:47:46 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 16 Jul 2000 11:47:46 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.47,2.48 Message-ID: <200007161847.LAA19651@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv19385/objects Modified Files: unicodeobject.c Log Message: - change \x to mean "byte" also in unicode literals (patch #100912) Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.47 retrieving revision 2.48 diff -C2 -r2.47 -r2.48 *** unicodeobject.c 2000/07/16 17:10:50 2.47 --- unicodeobject.c 2000/07/16 18:47:43 2.48 *************** *** 1199,1203 **** break; ! /* \xXXXX escape with 0-4 hex digits */ case 'x': x = 0; --- 1199,1205 ---- break; ! /* \xXXXX escape with 1-n hex digits. for compatibility ! with 8-bit strings, this code ignores all but the last ! two digits */ case 'x': x = 0; *************** *** 1205,1209 **** if (isxdigit(c)) { do { ! x = (x<<4) & ~0xF; if ('0' <= c && c <= '9') x += c - '0'; --- 1207,1211 ---- if (isxdigit(c)) { do { ! x = (x<<4) & 0xF0; if ('0' <= c && c <= '9') x += c - '0'; *************** *** 1214,1218 **** c = (unsigned char)*++s; } while (isxdigit(c)); ! *p++ = x; } else { *p++ = '\\'; --- 1216,1220 ---- c = (unsigned char)*++s; } while (isxdigit(c)); ! *p++ = (unsigned char) x; } else { *p++ = '\\'; From python-dev@python.org Sun Jul 16 20:01:17 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 12:01:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib liballos.tex,1.9,1.10 libascii.tex,1.3,1.4 libasyncore.tex,1.4,1.5 libaudioop.tex,1.18,1.19 libbasehttp.tex,1.10,1.11 libbinascii.tex,1.16,1.17 libcd.tex,1.12,1.13 libcfgparser.tex,1.12,1.13 libcgi.tex,1.26,1.27 libcgihttp.tex,1.2,1.3 libchunk.tex,1.3,1.4 libcode.tex,1.10,1.11 libcurses.tex,1.7,1.8 libdircache.tex,1.2,1.3 libdl.tex,1.1,1.2 libformatter.tex,1.19,1.20 libftplib.tex,1.27,1.28 libhtmllib.tex,1.21,1.22 libimageop.tex,1.11,1.12 libimaplib.tex,1.15,1.16 libimp.tex,1.25,1.26 libintro.tex,1.6,1.7 liblocale.tex,1.16,1.17 libmarshal.tex,1.18,1.19 libmd5.tex,1.14,1.15 libmutex.tex,1.2,1.3 libnetrc.tex,1.6,1.7 libnis.tex,1.3,1.4 libos.tex,1.43,1.44 libpanel.tex,1.9,1.10 libparser.tex,1.35,1.36 libpdb.tex,1.27,1.28 libpickle.tex,1.26,1.27 libpipes.tex,1.2,1.3 libpoplib.tex,1.8,1.9 librotor.tex,1.14,1.15 libsched.tex,1.3,1.4 libsgmllib.tex,1.19,1.20 libsha.tex,1.2,1.3 libshelve.tex,1.13,1.14 libshlex.tex,1.8,1.9 libsignal.tex,1.17,1.18! libsmtplib.tex,1.14,1.15 libsomeos.tex,1.7,1.8 libstatvfs.tex,1.2,1.3 libstdwin.tex,1.22,1.23 libsunau.tex,1.1,1.2 libsymbol.tex,1.6,1.7 libtelnetlib.tex,1.5,1.6 libtempfile.tex,1.15,1.16 libtime.tex,1.32,1.33 libtoken.tex,1.6,1.7 libtraceback.tex,1.12,1.13 libundoc.tex,1.74,1.75 liburllib.tex,1.22,1.23 liburlparse.tex,1.15,1.16 libuser.tex,1.14,1.15 libuserdict.tex,1.14,1.15 libwave.tex,1.3,1.4 libwinsound.tex,1.4,1.5 libxmllib.tex,1.23,1.24 Message-ID: <200007161901.MAA24120@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv20144 Modified Files: liballos.tex libascii.tex libasyncore.tex libaudioop.tex libbasehttp.tex libbinascii.tex libcd.tex libcfgparser.tex libcgi.tex libcgihttp.tex libchunk.tex libcode.tex libcurses.tex libdircache.tex libdl.tex libformatter.tex libftplib.tex libhtmllib.tex libimageop.tex libimaplib.tex libimp.tex libintro.tex liblocale.tex libmarshal.tex libmd5.tex libmutex.tex libnetrc.tex libnis.tex libos.tex libpanel.tex libparser.tex libpdb.tex libpickle.tex libpipes.tex libpoplib.tex librotor.tex libsched.tex libsgmllib.tex libsha.tex libshelve.tex libshlex.tex libsignal.tex libsmtplib.tex libsomeos.tex libstatvfs.tex libstdwin.tex libsunau.tex libsymbol.tex libtelnetlib.tex libtempfile.tex libtime.tex libtoken.tex libtraceback.tex libundoc.tex liburllib.tex liburlparse.tex libuser.tex libuserdict.tex libwave.tex libwinsound.tex libxmllib.tex Log Message: Rob W. W. Hooft's spelling fixes for the Library Reference. I hope SourceForge doesn't choke on this batch :-) I'm not entirely sure this is 100% correct. The patch changes an \index{persistency} to \index{presistence}, and I don't know what \index{} does. But it seems to do so persi--er, consistently, so I hope it isn't a problem. Index: liballos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liballos.tex,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** liballos.tex 1999/05/11 13:45:37 1.9 --- liballos.tex 2000/07/16 19:01:09 1.10 *************** *** 3,7 **** The modules described in this chapter provide interfaces to operating system features that are available on (almost) all operating systems, ! such as files and a clock. The interfaces are generally modelled after the \UNIX{} or C interfaces, but they are available on most other systems as well. Here's an overview: --- 3,7 ---- The modules described in this chapter provide interfaces to operating system features that are available on (almost) all operating systems, ! such as files and a clock. The interfaces are generally modeled after the \UNIX{} or C interfaces, but they are available on most other systems as well. Here's an overview: Index: libascii.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libascii.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** libascii.tex 2000/06/30 16:06:19 1.3 --- libascii.tex 2000/07/16 19:01:09 1.4 *************** *** 19,23 **** \lineii{SOH}{Start of heading, console interrupt} \lineii{STX}{Start of text} ! \lineii{ETX}{Ennd of text} \lineii{EOT}{End of transmission} \lineii{ENQ}{Enquiry, goes with \constant{ACK} flow control} --- 19,23 ---- \lineii{SOH}{Start of heading, console interrupt} \lineii{STX}{Start of text} ! \lineii{ETX}{End of text} \lineii{EOT}{End of transmission} \lineii{ENQ}{Enquiry, goes with \constant{ACK} flow control} Index: libasyncore.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libasyncore.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** libasyncore.tex 2000/04/03 20:13:52 1.4 --- libasyncore.tex 2000/07/16 19:01:09 1.5 *************** *** 108,112 **** is scanned, and this method is called to see if there is any interest in writing. The default method simply returns \code{1}, ! indiciating that by default, all channels will be interested. \end{methoddesc} --- 108,112 ---- is scanned, and this method is called to see if there is any interest in writing. The default method simply returns \code{1}, ! indicating that by default, all channels will be interested. \end{methoddesc} Index: libaudioop.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libaudioop.tex,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** libaudioop.tex 1999/04/23 17:30:40 1.18 --- libaudioop.tex 2000/07/16 19:01:09 1.19 *************** *** 152,156 **** \begin{funcdesc}{mul}{fragment, width, factor} ! Return a fragment that has all samples in the original framgent multiplied by the floating-point value \var{factor}. Overflow is silently ignored. --- 152,156 ---- \begin{funcdesc}{mul}{fragment, width, factor} ! Return a fragment that has all samples in the original fragment multiplied by the floating-point value \var{factor}. Overflow is silently ignored. *************** *** 162,166 **** \var{state} is a tuple containing the state of the converter. The ! converter returns a tupl \code{(\var{newfragment}, \var{newstate})}, and \var{newstate} should be passed to the next call of \function{ratecv()}. --- 162,166 ---- \var{state} is a tuple containing the state of the converter. The ! converter returns a tuple \code{(\var{newfragment}, \var{newstate})}, and \var{newstate} should be passed to the next call of \function{ratecv()}. Index: libbasehttp.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbasehttp.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** libbasehttp.tex 1999/06/14 19:49:50 1.10 --- libbasehttp.tex 2000/07/16 19:01:09 1.11 *************** *** 91,95 **** \begin{memberdesc}{wfile} Contains the output stream for writing a response back to the client. ! Proper adherance to the HTTP protocol must be used when writing to this stream. \end{memberdesc} --- 91,95 ---- \begin{memberdesc}{wfile} Contains the output stream for writing a response back to the client. ! Proper adherence to the HTTP protocol must be used when writing to this stream. \end{memberdesc} *************** *** 116,120 **** client. It uses parenthesized, keyed format specifiers, so the format operand must be a dictionary. The \var{code} key should ! be an integer, specifing the numeric HTTP error code value. \var{message} should be a string containing a (detailed) error message of what occurred, and \var{explain} should be an --- 116,120 ---- client. It uses parenthesized, keyed format specifiers, so the format operand must be a dictionary. The \var{code} key should ! be an integer, specifying the numeric HTTP error code value. \var{message} should be a string containing a (detailed) error message of what occurred, and \var{explain} should be an Index: libbinascii.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbinascii.tex,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** libbinascii.tex 2000/02/16 21:13:37 1.16 --- libbinascii.tex 2000/07/16 19:01:09 1.17 *************** *** 12,16 **** but use wrapper modules like \refmodule{uu}\refstmodindex{uu} or \refmodule{binhex}\refstmodindex{binhex} instead, this module solely ! exists because bit-manipuation of large amounts of data is slow in Python. --- 12,16 ---- but use wrapper modules like \refmodule{uu}\refstmodindex{uu} or \refmodule{binhex}\refstmodindex{binhex} instead, this module solely ! exists because bit-manipulation of large amounts of data is slow in Python. Index: libcd.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcd.tex,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** libcd.tex 1999/03/02 16:37:07 1.12 --- libcd.tex 2000/07/16 19:01:09 1.13 *************** *** 87,91 **** \begin{datadesc}{ERROR} ! An error aoocurred while trying to read the disc or its table of contents. \end{datadesc} --- 87,91 ---- \begin{datadesc}{ERROR} ! An error occurred while trying to read the disc or its table of contents. \end{datadesc} *************** *** 195,199 **** \begin{methoddesc}[CD player]{playtrackabs}{track, minutes, seconds, frames, play} ! Like \method{play()}, except that playing begins at the spcified absolute time and ends at the end of the specified track. \end{methoddesc} --- 195,199 ---- \begin{methoddesc}[CD player]{playtrackabs}{track, minutes, seconds, frames, play} ! Like \method{play()}, except that playing begins at the specified absolute time and ends at the end of the specified track. \end{methoddesc} Index: libcfgparser.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcfgparser.tex,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** libcfgparser.tex 2000/07/14 15:00:02 1.12 --- libcfgparser.tex 2000/07/16 19:01:09 1.13 *************** *** 57,61 **** \begin{excdesc}{DuplicateSectionError} ! Exception raised when mutliple sections with the same name are found, or if \method{add_section()} is called with the name of a section that is already present. --- 57,61 ---- \begin{excdesc}{DuplicateSectionError} ! Exception raised when multiple sections with the same name are found, or if \method{add_section()} is called with the name of a section that is already present. Index: libcgi.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcgi.tex,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** libcgi.tex 2000/04/03 20:13:52 1.26 --- libcgi.tex 2000/07/16 19:01:09 1.27 *************** *** 105,109 **** \class{FieldStorage} or \class{MiniFieldStorage} instance but a list of such instances. If you expect this possibility ! (i.e., when your HTML form comtains multiple fields with the same name), use the \function{type()} function to determine whether you have a single instance or a list of instances. For example, here's --- 105,109 ---- \class{FieldStorage} or \class{MiniFieldStorage} instance but a list of such instances. If you expect this possibility ! (i.e., when your HTML form contains multiple fields with the same name), use the \function{type()} function to determine whether you have a single instance or a list of instances. For example, here's *************** *** 132,136 **** You can test for an uploaded file by testing either the filename attribute or the file attribute. You can then read the data at ! leasure from the file attribute: \begin{verbatim} --- 132,136 ---- You can test for an uploaded file by testing either the filename attribute or the file attribute. You can then read the data at ! leisure from the file attribute: \begin{verbatim} Index: libcgihttp.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcgihttp.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libcgihttp.tex 2000/04/03 20:13:52 1.2 --- libcgihttp.tex 2000/07/16 19:01:09 1.3 *************** *** 12,16 **** The \module{CGIHTTPServer} module defines a request-handler class, interface compatible with ! \class{BaseHTTPServer.BaseHTTPRequestHandler} and inherits behaviour from \class{SimpleHTTPServer.SimpleHTTPRequestHandler} but can also run CGI scripts. --- 12,16 ---- The \module{CGIHTTPServer} module defines a request-handler class, interface compatible with ! \class{BaseHTTPServer.BaseHTTPRequestHandler} and inherits behavior from \class{SimpleHTTPServer.SimpleHTTPRequestHandler} but can also run CGI scripts. Index: libchunk.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libchunk.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** libchunk.tex 1999/08/26 15:57:08 1.3 --- libchunk.tex 2000/07/16 19:01:09 1.4 *************** *** 25,29 **** header} \lineiii{8}{\var{n}}{Data bytes, where \var{n} is the size given in ! the preceeding field} \lineiii{8 + \var{n}}{0 or 1}{Pad byte needed if \var{n} is odd and chunk alignment is used} --- 25,29 ---- header} \lineiii{8}{\var{n}}{Data bytes, where \var{n} is the size given in ! the preceding field} \lineiii{8 + \var{n}}{0 or 1}{Pad byte needed if \var{n} is odd and chunk alignment is used} Index: libcode.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcode.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** libcode.tex 2000/04/03 20:13:52 1.10 --- libcode.tex 2000/07/16 19:01:09 1.11 *************** *** 104,108 **** When an exception occurs, \method{showtraceback()} is called to display a traceback. All exceptions are caught except ! \exception{SystemExit}, which is allowed to propogate. A note about \exception{KeyboardInterrupt}: this exception may occur --- 104,108 ---- When an exception occurs, \method{showtraceback()} is called to display a traceback. All exceptions are caught except ! \exception{SystemExit}, which is allowed to propagate. A note about \exception{KeyboardInterrupt}: this exception may occur Index: libcurses.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** libcurses.tex 2000/06/30 01:05:39 1.7 --- libcurses.tex 2000/07/16 19:01:09 1.8 *************** *** 1,4 **** \section{\module{curses} --- ! Terminal independant console handling} \declaremodule{extension}{curses} --- 1,4 ---- \section{\module{curses} --- ! Terminal independent console handling} \declaremodule{extension}{curses} *************** *** 244,248 **** \begin{funcdesc}{mouseinterval}{interval} ! Sets the maximum time in millisecondsthat can elapse between press and release events in order for them to be recognized as a click, and returns the previous interval value. The default value is 200 msec, --- 244,248 ---- \begin{funcdesc}{mouseinterval}{interval} ! Sets the maximum time in milliseconds that can elapse between press and release events in order for them to be recognized as a click, and returns the previous interval value. The default value is 200 msec, *************** *** 847,851 **** \begin{methoddesc}{timeout}{delay} ! Sets blocking or non-blocking read behaviour for the window. If \var{delay} is negative, blocking read is used, which will wait indefinitely for input). If \var{delay} is zero, then non-blocking --- 847,851 ---- \begin{methoddesc}{timeout}{delay} ! Sets blocking or non-blocking read behavior for the window. If \var{delay} is negative, blocking read is used, which will wait indefinitely for input). If \var{delay} is zero, then non-blocking Index: libdircache.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdircache.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libdircache.tex 1999/10/29 17:51:29 1.2 --- libdircache.tex 2000/07/16 19:01:09 1.3 *************** *** 23,27 **** \begin{funcdesc}{opendir}{path} ! Same as \function{listdir()}. Defined for backwards compatability. \end{funcdesc} --- 23,27 ---- \begin{funcdesc}{opendir}{path} ! Same as \function{listdir()}. Defined for backwards compatibility. \end{funcdesc} Index: libdl.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdl.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** libdl.tex 1999/07/01 20:40:21 1.1 --- libdl.tex 2000/07/16 19:01:09 1.2 *************** *** 9,13 **** \cfunction{dlopen()} function, which is the most common interface on \UNIX{} platforms for handling dynamically linked libraries. It allows ! the program to call arbitary functions in such a library. \strong{Note:} This module will not work unless --- 9,13 ---- \cfunction{dlopen()} function, which is the most common interface on \UNIX{} platforms for handling dynamically linked libraries. It allows ! the program to call arbitrary functions in such a library. \strong{Note:} This module will not work unless *************** *** 24,28 **** signifies late binding (\constant{RTLD_LAZY}) or immediate binding (\constant{RTLD_NOW}). Default is \constant{RTLD_LAZY}. Note that some ! sytems do not support \constant{RTLD_NOW}. Return value is a \pytype{dlobject}. --- 24,28 ---- signifies late binding (\constant{RTLD_LAZY}) or immediate binding (\constant{RTLD_NOW}). Default is \constant{RTLD_LAZY}. Note that some ! systems do not support \constant{RTLD_NOW}. Return value is a \pytype{dlobject}. *************** *** 45,49 **** \begin{excdesc}{error} ! Exception raised when an error has occured inside the dynamic loading and linking routines. \end{excdesc} --- 45,49 ---- \begin{excdesc}{error} ! Exception raised when an error has occurred inside the dynamic loading and linking routines. \end{excdesc} Index: libformatter.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libformatter.tex,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** libformatter.tex 1999/04/22 21:23:21 1.19 --- libformatter.tex 2000/07/16 19:01:09 1.20 *************** *** 7,11 **** ! This module supports two interface definitions, each with mulitple implementations. The \emph{formatter} interface is used by the \class{HTMLParser} class of the \refmodule{htmllib} module, and the --- 7,11 ---- ! This module supports two interface definitions, each with multiple implementations. The \emph{formatter} interface is used by the \class{HTMLParser} class of the \refmodule{htmllib} module, and the *************** *** 76,81 **** \begin{methoddesc}[formatter]{add_flowing_data}{data} ! Provide data which should be formatted with collapsed whitespaces. ! Whitespace from preceeding and successive calls to \method{add_flowing_data()} is considered as well when the whitespace collapse is performed. The data which is passed to this method is --- 76,81 ---- \begin{methoddesc}[formatter]{add_flowing_data}{data} ! Provide data which should be formatted with collapsed whitespace. ! Whitespace from preceding and successive calls to \method{add_flowing_data()} is considered as well when the whitespace collapse is performed. The data which is passed to this method is *************** *** 107,111 **** to indicate a transform on the counter value. Specifically, the character \character{1} represents the counter value formatter as an ! arabic number, the characters \character{A} and \character{a} represent alphabetic representations of the counter value in upper and lower case, respectively, and \character{I} and \character{i} --- 107,111 ---- to indicate a transform on the counter value. Specifically, the character \character{1} represents the counter value formatter as an ! Arabic number, the characters \character{A} and \character{a} represent alphabetic representations of the counter value in upper and lower case, respectively, and \character{I} and \character{i} *************** *** 265,269 **** \begin{methoddesc}[writer]{send_paragraph}{blankline} Produce a paragraph separation of at least \var{blankline} blank ! lines, or the equivelent. The \var{blankline} value will be an integer. Note that the implementation will receive a call to \method{send_line_break()} before this call if a line break is needed; --- 265,269 ---- \begin{methoddesc}[writer]{send_paragraph}{blankline} Produce a paragraph separation of at least \var{blankline} blank ! lines, or the equivalent. The \var{blankline} value will be an integer. Note that the implementation will receive a call to \method{send_line_break()} before this call if a line break is needed; Index: libftplib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libftplib.tex,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** libftplib.tex 1999/07/20 13:21:42 1.27 --- libftplib.tex 2000/07/16 19:01:09 1.28 *************** *** 266,270 **** \method{quit()}. After this call the \class{FTP} instance should not be used any more (i.e., after a call to \method{close()} or ! \method{quit()} you cannot reopen the connection by issueing another \method{login()} method). \end{methoddesc} --- 266,270 ---- \method{quit()}. After this call the \class{FTP} instance should not be used any more (i.e., after a call to \method{close()} or ! \method{quit()} you cannot reopen the connection by issuing another \method{login()} method). \end{methoddesc} Index: libhtmllib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libhtmllib.tex,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** libhtmllib.tex 1999/06/21 21:20:56 1.21 --- libhtmllib.tex 2000/07/16 19:01:09 1.22 *************** *** 125,131 **** \begin{methoddesc}{save_end}{} Ends buffering character data and returns all data saved since the ! preceeding call to \method{save_bgn()}. If the \member{nofill} flag is false, whitespace is collapsed to single spaces. A call to this ! method without a preceeding call to \method{save_bgn()} will raise a \exception{TypeError} exception. \end{methoddesc} --- 125,131 ---- \begin{methoddesc}{save_end}{} Ends buffering character data and returns all data saved since the ! preceding call to \method{save_bgn()}. If the \member{nofill} flag is false, whitespace is collapsed to single spaces. A call to this ! method without a preceding call to \method{save_bgn()} will raise a \exception{TypeError} exception. \end{methoddesc} Index: libimageop.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libimageop.tex,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** libimageop.tex 1999/04/22 21:23:21 1.11 --- libimageop.tex 2000/07/16 19:01:09 1.12 *************** *** 47,51 **** \begin{funcdesc}{grey2mono}{image, width, height, threshold} Convert a 8-bit deep greyscale image to a 1-bit deep image by ! tresholding all the pixels. The resulting image is tightly packed and is probably only useful as an argument to \function{mono2grey()}. \end{funcdesc} --- 47,51 ---- \begin{funcdesc}{grey2mono}{image, width, height, threshold} Convert a 8-bit deep greyscale image to a 1-bit deep image by ! thresholding all the pixels. The resulting image is tightly packed and is probably only useful as an argument to \function{mono2grey()}. \end{funcdesc} Index: libimaplib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libimaplib.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** libimaplib.tex 2000/05/26 04:08:37 1.15 --- libimaplib.tex 2000/07/16 19:01:09 1.16 *************** *** 43,47 **** \begin{excdesc}{IMAP4.readonly} ! This exception is raised when a writeable mailbox has its status changed by the server. This is a sub-class of \exception{IMAP4.error}. Some other client now has write permission, and the mailbox will need to be re-opened to re-obtain write permission. --- 43,47 ---- \begin{excdesc}{IMAP4.readonly} ! This exception is raised when a writable mailbox has its status changed by the server. This is a sub-class of \exception{IMAP4.error}. Some other client now has write permission, and the mailbox will need to be re-opened to re-obtain write permission. Index: libimp.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libimp.tex,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** libimp.tex 1999/06/10 22:08:16 1.25 --- libimp.tex 2000/07/16 19:01:09 1.26 *************** *** 53,57 **** \code{None}, \var{filename} is the empty string, and the \var{description} tuple contains empty strings for its suffix and ! mode; the module type is as indicate in parentheses dabove. If the search is unsuccessful, \exception{ImportError} is raised. Other exceptions indicate problems with the arguments or environment. --- 53,57 ---- \code{None}, \var{filename} is the empty string, and the \var{description} tuple contains empty strings for its suffix and ! mode; the module type is as indicate in parentheses above. If the search is unsuccessful, \exception{ImportError} is raised. Other exceptions indicate problems with the arguments or environment. *************** *** 188,192 **** used to construct the name of the initialization function: an external C function called \samp{init\var{name}()} in the shared library is ! called. The optional \var{file} argment is ignored. (Note: using shared libraries is highly system dependent, and not all systems support it.) --- 188,192 ---- used to construct the name of the initialization function: an external C function called \samp{init\var{name}()} in the shared library is ! called. The optional \var{file} argument is ignored. (Note: using shared libraries is highly system dependent, and not all systems support it.) Index: libintro.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libintro.tex,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** libintro.tex 2000/04/03 20:13:53 1.6 --- libintro.tex 2000/07/16 19:01:09 1.7 *************** *** 26,30 **** interfaces that are specific to a particular application domain, like the World-Wide Web. ! Some modules are avaiable in all versions and ports of Python; others are only available when the underlying system supports or requires them; yet others are available only when a particular configuration --- 26,30 ---- interfaces that are specific to a particular application domain, like the World-Wide Web. ! Some modules are available in all versions and ports of Python; others are only available when the underlying system supports or requires them; yet others are available only when a particular configuration Index: liblocale.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liblocale.tex,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** liblocale.tex 1999/07/01 16:31:03 1.16 --- liblocale.tex 2000/07/16 19:01:09 1.17 *************** *** 259,263 **** The \function{setlocale()} function in the \module{locale} module ! gives the Python progammer the impression that you can manipulate the \constant{LC_NUMERIC} locale setting, but this not the case at the C level: C code will always find that the \constant{LC_NUMERIC} locale --- 259,263 ---- The \function{setlocale()} function in the \module{locale} module ! gives the Python programmer the impression that you can manipulate the \constant{LC_NUMERIC} locale setting, but this not the case at the C level: C code will always find that the \constant{LC_NUMERIC} locale Index: libmarshal.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmarshal.tex,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** libmarshal.tex 2000/04/06 14:47:20 1.18 --- libmarshal.tex 2000/07/16 19:01:09 1.19 *************** *** 20,24 **** instance) and ``unmarshalling'' for the reverse process.} ! This is not a general ``persistency'' module. For general persistency and transfer of Python objects through RPC calls, see the modules \refmodule{pickle} and \refmodule{shelve}. The \module{marshal} module exists --- 20,24 ---- instance) and ``unmarshalling'' for the reverse process.} ! This is not a general ``persistence'' module. For general persistence and transfer of Python objects through RPC calls, see the modules \refmodule{pickle} and \refmodule{shelve}. The \module{marshal} module exists Index: libmd5.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmd5.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** libmd5.tex 1999/04/23 22:03:00 1.14 --- libmd5.tex 2000/07/16 19:01:09 1.15 *************** *** 13,17 **** \method{update()} method, and at any point you can ask it for the \dfn{digest} (a strong kind of 128-bit checksum, ! a.k.a. ``fingerprint'') of the contatenation of the strings fed to it so far using the \method{digest()} method. \index{checksum!MD5} --- 13,17 ---- \method{update()} method, and at any point you can ask it for the \dfn{digest} (a strong kind of 128-bit checksum, ! a.k.a. ``fingerprint'') of the concatenation of the strings fed to it so far using the \method{digest()} method. \index{checksum!MD5} Index: libmutex.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmutex.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libmutex.tex 1999/06/29 14:57:12 1.2 --- libmutex.tex 2000/07/16 19:01:09 1.3 *************** *** 8,12 **** The \module{mutex} defines a class that allows mutual-exclusion ! via aquiring and releasing locks. It does not require (or imply) threading or multi-tasking, though it could be useful for those purposes. --- 8,12 ---- The \module{mutex} defines a class that allows mutual-exclusion ! via acquiring and releasing locks. It does not require (or imply) threading or multi-tasking, though it could be useful for those purposes. *************** *** 28,32 **** Of course, no multi-threading is implied -- hence the funny interface ! for lock, where a function is called once the lock is aquired. \end{classdesc} --- 28,32 ---- Of course, no multi-threading is implied -- hence the funny interface ! for lock, where a function is called once the lock is acquired. \end{classdesc} Index: libnetrc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libnetrc.tex,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** libnetrc.tex 2000/04/03 20:13:53 1.6 --- libnetrc.tex 2000/07/16 19:01:09 1.7 *************** *** 15,19 **** \begin{classdesc}{netrc}{\optional{file}} ! A \class{netrc} instance or subclass instance enapsulates data from a netrc file. The initialization argument, if present, specifies the file to parse. If no argument is given, the file \file{.netrc} in the --- 15,19 ---- \begin{classdesc}{netrc}{\optional{file}} ! A \class{netrc} instance or subclass instance encapsulates data from a netrc file. The initialization argument, if present, specifies the file to parse. If no argument is given, the file \file{.netrc} in the Index: libnis.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libnis.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** libnis.tex 2000/04/03 20:13:53 1.3 --- libnis.tex 2000/07/16 19:01:09 1.4 *************** *** 20,24 **** error (\exception{nis.error}) if there is none. Both should be strings, \var{key} is 8-bit clean. ! Return value is an arbitary array of bytes (i.e., may contain \code{NULL} and other joys). --- 20,24 ---- error (\exception{nis.error}) if there is none. Both should be strings, \var{key} is 8-bit clean. ! Return value is an arbitrary array of bytes (i.e., may contain \code{NULL} and other joys). *************** *** 29,33 **** Return a dictionary mapping \var{key} to \var{value} such that \code{match(\var{key}, \var{mapname})==\var{value}}. ! Note that both keys and values of the dictionary are arbitary arrays of bytes. --- 29,33 ---- Return a dictionary mapping \var{key} to \var{value} such that \code{match(\var{key}, \var{mapname})==\var{value}}. ! Note that both keys and values of the dictionary are arbitrary arrays of bytes. Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -r1.43 -r1.44 *** libos.tex 2000/07/13 01:26:58 1.43 --- libos.tex 2000/07/16 19:01:09 1.44 *************** *** 326,330 **** \begin{funcdesc}{fpathconf}{fd, name} ! Return system configration information relevant to an open file. \var{name} specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are --- 326,330 ---- \begin{funcdesc}{fpathconf}{fd, name} ! Return system configuration information relevant to an open file. \var{name} specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are *************** *** 576,580 **** \begin{funcdesc}{pathconf}{path, name} ! Return system configration information relevant to a named file. \var{name} specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are --- 576,580 ---- \begin{funcdesc}{pathconf}{path, name} ! Return system configuration information relevant to a named file. \var{name} specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are *************** *** 984,988 **** ! \subsection{Miscellanenous System Information \label{os-path}} --- 984,988 ---- ! \subsection{Miscellaneous System Information \label{os-path}} Index: libpanel.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpanel.tex,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** libpanel.tex 1998/08/10 19:42:04 1.9 --- libpanel.tex 2000/07/16 19:01:09 1.10 *************** *** 65,69 **** All access to it should be done through the standard module \code{panel}\refstmodindex{panel}, ! which transparantly exports most functions from \code{pnl} but redefines --- 65,69 ---- All access to it should be done through the standard module \code{panel}\refstmodindex{panel}, ! which transparently exports most functions from \code{pnl} but redefines Index: libparser.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libparser.tex,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** libparser.tex 2000/05/09 17:10:23 1.35 --- libparser.tex 2000/07/16 19:01:09 1.36 *************** *** 594,598 **** Most of the accessor functions are declared in \class{SuiteInfoBase} ! and do not need to be overriden by subclasses. More importantly, the extraction of most information from a parse tree is handled through a method called by the \class{SuiteInfoBase} constructor. The example --- 594,598 ---- Most of the accessor functions are declared in \class{SuiteInfoBase} ! and do not need to be overridden by subclasses. More importantly, the extraction of most information from a parse tree is handled through a method called by the \class{SuiteInfoBase} constructor. The example *************** *** 685,689 **** element defined is extracted and a representation object appropriate to the definition is created with the defining subtree ! passed as an argument to the constructor. The repesentation objects are stored in instance variables and may be retrieved by name using the appropriate accessor methods. --- 685,689 ---- element defined is extracted and a representation object appropriate to the definition is created with the defining subtree ! passed as an argument to the constructor. The representation objects are stored in instance variables and may be retrieved by name using the appropriate accessor methods. Index: libpdb.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpdb.tex,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** libpdb.tex 2000/04/05 15:01:36 1.27 --- libpdb.tex 2000/07/16 19:01:10 1.28 *************** *** 154,158 **** This is particularly useful for aliases. If both files exist, the one in the home directory is read first and aliases defined there can be ! overriden by the local file. \begin{description} --- 154,158 ---- This is particularly useful for aliases. If both files exist, the one in the home directory is read first and aliases defined there can be ! overridden by the local file. \begin{description} Index: libpickle.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpickle.tex,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** libpickle.tex 2000/07/01 17:47:38 1.26 --- libpickle.tex 2000/07/16 19:01:10 1.27 *************** *** 6,10 **** % Substantial improvements by Jim Kerr . ! \index{persistency} \indexii{persistent}{objects} \indexii{serializing}{objects} --- 6,10 ---- % Substantial improvements by Jim Kerr . ! \index{persistence} \indexii{persistent}{objects} \indexii{serializing}{objects} *************** *** 18,22 **** nearly arbitrary Python objects. This is the act of converting objects to a stream of bytes (and back: ``unpickling''). This is a ! more primitive notion than persistency --- although \module{pickle} reads and writes file objects, it does not handle the issue of naming persistent objects, nor the (even more complicated) area of concurrent --- 18,22 ---- nearly arbitrary Python objects. This is the act of converting objects to a stream of bytes (and back: ``unpickling''). This is a ! more primitive notion than persistence --- although \module{pickle} reads and writes file objects, it does not handle the issue of naming persistent objects, nor the (even more complicated) area of concurrent *************** *** 93,97 **** avoids the possibility of smuggling Trojan horses into a program. ! For the benefit of persistency modules written using \module{pickle}, it supports the notion of a reference to an object outside the pickled data stream. Such objects are referenced by a name, which is an --- 93,97 ---- avoids the possibility of smuggling Trojan horses into a program. ! For the benefit of persistence modules written using \module{pickle}, it supports the notion of a reference to an object outside the pickled data stream. Such objects are referenced by a name, which is an *************** *** 251,255 **** \begin{funcdesc}{dump}{object, file\optional{, bin}} ! Write a pickled representation of \var{obect} to the open file object \var{file}. This is equivalent to \samp{Pickler(\var{file}, \var{bin}).dump(\var{object})}. --- 251,255 ---- \begin{funcdesc}{dump}{object, file\optional{, bin}} ! Write a pickled representation of \var{object} to the open file object \var{file}. This is equivalent to \samp{Pickler(\var{file}, \var{bin}).dump(\var{object})}. *************** *** 381,385 **** The format of the pickle data is identical to that produced using the \refmodule{pickle} module, so it is possible to use \refmodule{pickle} and ! \module{cPickle} interchangably with existing pickles. (Since the pickle data format is actually a tiny stack-oriented --- 381,385 ---- The format of the pickle data is identical to that produced using the \refmodule{pickle} module, so it is possible to use \refmodule{pickle} and ! \module{cPickle} interchangeably with existing pickles. (Since the pickle data format is actually a tiny stack-oriented Index: libpipes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpipes.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libpipes.tex 1999/06/21 18:36:09 1.2 --- libpipes.tex 2000/07/16 19:01:10 1.3 *************** *** 63,67 **** reads no input, and hence must be first.) ! Similarily, the second letter can be either of \code{'-'} (which means the command writes to standard output), \code{'f'} (which means the command writes a file on the command line) or \code{'.'} (which means --- 63,67 ---- reads no input, and hence must be first.) ! Similarly, the second letter can be either of \code{'-'} (which means the command writes to standard output), \code{'f'} (which means the command writes a file on the command line) or \code{'.'} (which means Index: libpoplib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpoplib.tex,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** libpoplib.tex 2000/04/03 20:13:53 1.8 --- libpoplib.tex 2000/07/16 19:01:10 1.9 *************** *** 14,18 **** This module defines a class, \class{POP3}, which encapsulates a connection to an POP3 server and implements protocol as defined in ! \rfc{1725}. The \class{POP3} class supports both the minmal and optional command sets. --- 14,18 ---- This module defines a class, \class{POP3}, which encapsulates a connection to an POP3 server and implements protocol as defined in ! \rfc{1725}. The \class{POP3} class supports both the minimal and optional command sets. *************** *** 47,51 **** \begin{methoddesc}{user}{username} ! Send user commad, response should indicate that a password is required. \end{methoddesc} --- 47,51 ---- \begin{methoddesc}{user}{username} ! Send user command, response should indicate that a password is required. \end{methoddesc} Index: librotor.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/librotor.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** librotor.tex 1998/08/10 19:42:14 1.14 --- librotor.tex 2000/07/16 19:01:10 1.15 *************** *** 99,103 **** The version implemented here is probably a good deal more difficult to crack (especially if you use many rotors), but it won't be impossible for ! a truly skilful and determined attacker to break the cipher. So if you want to keep the NSA out of your files, this rotor cipher may well be unsafe, but for discouraging casual snooping through your files, it will probably be --- 99,103 ---- The version implemented here is probably a good deal more difficult to crack (especially if you use many rotors), but it won't be impossible for ! a truly skillful and determined attacker to break the cipher. So if you want to keep the NSA out of your files, this rotor cipher may well be unsafe, but for discouraging casual snooping through your files, it will probably be Index: libsched.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsched.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** libsched.tex 2000/04/03 20:13:54 1.3 --- libsched.tex 2000/07/16 19:01:10 1.4 *************** *** 93,97 **** If a sequence of events takes longer to run than the time available before the next event, the scheduler will simply fall behind. No ! events will be dropped; the calling code is responsible for cancelling events which are no longer pertinent. \end{methoddesc} --- 93,97 ---- If a sequence of events takes longer to run than the time available before the next event, the scheduler will simply fall behind. No ! events will be dropped; the calling code is responsible for canceling events which are no longer pertinent. \end{methoddesc} Index: libsgmllib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsgmllib.tex,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** libsgmllib.tex 2000/07/03 14:32:04 1.19 --- libsgmllib.tex 2000/07/16 19:01:10 1.20 *************** *** 35,39 **** SGML comments of the form \samp{}. Note that spaces, tabs, and newlines are allowed between the trailing ! \samp{>} and the immediately preceeding \samp{--}. \end{itemize} --- 35,39 ---- SGML comments of the form \samp{}. Note that spaces, tabs, and newlines are allowed between the trailing ! \samp{>} and the immediately preceding \samp{--}. \end{itemize} Index: libsha.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsha.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libsha.tex 1999/11/09 20:10:01 1.2 --- libsha.tex 2000/07/16 19:01:10 1.3 *************** *** 12,16 **** to create an sha object, then feed this object with arbitrary strings using the \method{update()} method, and at any point you can ask it ! for the \dfn{digest} of the contatenation of the strings fed to it so far.\index{checksum!SHA} SHA digests are 160 bits instead of 128 bits. --- 12,16 ---- to create an sha object, then feed this object with arbitrary strings using the \method{update()} method, and at any point you can ask it ! for the \dfn{digest} of the concatenation of the strings fed to it so far.\index{checksum!SHA} SHA digests are 160 bits instead of 128 bits. Index: libshelve.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libshelve.tex,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** libshelve.tex 1999/04/22 21:23:22 1.13 --- libshelve.tex 2000/07/16 19:01:10 1.14 *************** *** 1,7 **** \section{\module{shelve} --- ! Python object persistency} \declaremodule{standard}{shelve} ! \modulesynopsis{Python object persistency.} --- 1,7 ---- \section{\module{shelve} --- ! Python object persistence} \declaremodule{standard}{shelve} ! \modulesynopsis{Python object persistence.} Index: libshlex.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libshlex.tex,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** libshlex.tex 2000/07/03 09:56:23 1.8 --- libshlex.tex 2000/07/16 19:01:10 1.9 *************** *** 22,26 **** argument is a filename string, which sets the initial value of the \member{infile} member. If the stream argument is omitted or ! equal to \code{sys.stdin}, this second argument defauilts to ``stdin''. \end{classdesc} --- 22,26 ---- argument is a filename string, which sets the initial value of the \member{infile} member. If the stream argument is omitted or ! equal to \code{sys.stdin}, this second argument defaults to ``stdin''. \end{classdesc} Index: libsignal.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsignal.tex,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** libsignal.tex 1999/03/25 20:29:59 1.17 --- libsignal.tex 2000/07/16 19:01:10 1.18 *************** *** 57,61 **** Python \module{signal} module, even if the underlying thread implementation supports sending signals to individual threads). This ! means that signals can't be used as a means of interthread communication. Use locks instead. --- 57,61 ---- Python \module{signal} module, even if the underlying thread implementation supports sending signals to individual threads). This ! means that signals can't be used as a means of inter-thread communication. Use locks instead. Index: libsmtplib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsmtplib.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** libsmtplib.tex 2000/04/05 22:12:06 1.14 --- libsmtplib.tex 2000/07/16 19:01:10 1.15 *************** *** 57,61 **** \begin{excdesc}{SMTPRecipientsRefused} All recipient addresses refused. The errors for each recipient are ! accessable through the attribute \member{recipients}, which is a dictionary of exactly the same sort as \method{SMTP.sendmail()} returns. --- 57,61 ---- \begin{excdesc}{SMTPRecipientsRefused} All recipient addresses refused. The errors for each recipient are ! accessible through the attribute \member{recipients}, which is a dictionary of exactly the same sort as \method{SMTP.sendmail()} returns. Index: libsomeos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsomeos.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** libsomeos.tex 1998/07/23 17:59:08 1.7 --- libsomeos.tex 2000/07/16 19:01:10 1.8 *************** *** 4,8 **** The modules described in this chapter provide interfaces to operating system features that are available on selected operating systems only. ! The interfaces are generally modelled after the \UNIX{} or \C{} interfaces but they are available on some other systems as well (e.g. Windows or NT). Here's an overview: --- 4,8 ---- The modules described in this chapter provide interfaces to operating system features that are available on selected operating systems only. ! The interfaces are generally modeled after the \UNIX{} or \C{} interfaces but they are available on some other systems as well (e.g. Windows or NT). Here's an overview: Index: libstatvfs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstatvfs.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libstatvfs.tex 2000/04/03 20:13:54 1.2 --- libstatvfs.tex 2000/07/16 19:01:10 1.3 *************** *** 48,52 **** \begin{datadesc}{F_FLAG} ! Flags. System dependant: see \cfunction{statvfs()} man page. \end{datadesc} --- 48,52 ---- \begin{datadesc}{F_FLAG} ! Flags. System dependent: see \cfunction{statvfs()} man page. \end{datadesc} Index: libstdwin.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdwin.tex,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** libstdwin.tex 1999/11/09 19:44:44 1.22 --- libstdwin.tex 2000/07/16 19:01:10 1.23 *************** *** 260,264 **** Return the number of characters of the string that fit into a space of \var{width} ! bits wide when drawn in the curent font. \end{funcdesc} --- 260,264 ---- Return the number of characters of the string that fit into a space of \var{width} ! bits wide when drawn in the current font. \end{funcdesc} Index: libsunau.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsunau.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** libsunau.tex 1999/06/23 13:33:39 1.1 --- libsunau.tex 2000/07/16 19:01:10 1.2 *************** *** 96,100 **** The following two methods define a term ``position'' which is compatible ! between them, and is otherwise implementation dependant. \begin{methoddesc}[AU_read]{setpos}{pos} --- 96,100 ---- The following two methods define a term ``position'' which is compatible ! between them, and is otherwise implementation dependent. \begin{methoddesc}[AU_read]{setpos}{pos} Index: libsymbol.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsymbol.tex,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** libsymbol.tex 1999/02/20 00:14:14 1.6 --- libsymbol.tex 2000/07/16 19:01:10 1.7 *************** *** 10,14 **** internal nodes of the parse tree. Unlike most Python constants, these use lower-case names. Refer to the file \file{Grammar/Grammar} in the ! Python distribution for the defintions of the names in the context of the language grammar. The specific numeric values which the names map to may change between Python versions. --- 10,14 ---- internal nodes of the parse tree. Unlike most Python constants, these use lower-case names. Refer to the file \file{Grammar/Grammar} in the ! Python distribution for the definitions of the names in the context of the language grammar. The specific numeric values which the names map to may change between Python versions. Index: libtelnetlib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtelnetlib.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** libtelnetlib.tex 2000/05/03 15:11:47 1.5 --- libtelnetlib.tex 2000/07/16 19:01:10 1.6 *************** *** 141,145 **** compiled (\class{re.RegexObject} instances) or uncompiled (strings). The optional second argument is a timeout, in seconds; the default ! is to block indefinately. Return a tuple of three items: the index in the list of the --- 141,145 ---- compiled (\class{re.RegexObject} instances) or uncompiled (strings). The optional second argument is a timeout, in seconds; the default ! is to block indefinitely. Return a tuple of three items: the index in the list of the *************** *** 154,158 **** If a regular expression ends with a greedy match (e.g. \regexp{.*}) or if more than one expression can match the same input, the ! results are undeterministic, and may depend on the I/O timing. \end{methoddesc} --- 154,158 ---- If a regular expression ends with a greedy match (e.g. \regexp{.*}) or if more than one expression can match the same input, the ! results are indeterministic, and may depend on the I/O timing. \end{methoddesc} Index: libtempfile.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtempfile.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** libtempfile.tex 2000/06/30 16:06:19 1.15 --- libtempfile.tex 2000/07/16 19:01:10 1.16 *************** *** 27,31 **** Return a file (or file-like) object that can be used as a temporary storage area. The file is created in the most secure manner available ! in the appporpriate temporary directory for the host platform. Under \UNIX, the directory entry to the file is removed so that it is secure against attacks which involve creating symbolic links to the file or --- 27,31 ---- Return a file (or file-like) object that can be used as a temporary storage area. The file is created in the most secure manner available ! in the appropriate temporary directory for the host platform. Under \UNIX, the directory entry to the file is removed so that it is secure against attacks which involve creating symbolic links to the file or Index: libtime.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtime.tex,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** libtime.tex 2000/07/06 18:09:02 1.32 --- libtime.tex 2000/07/16 19:01:10 1.33 *************** *** 87,91 **** \lineiii{4}{minute}{range [0,59]} \lineiii{5}{second}{range [0,61]; see \strong{(1)} in \function{strftime()} description} ! \lineiii{6}{weekday}{range [0,6], monday is 0} \lineiii{7}{Julian day}{range [1,366]} \lineiii{8}{daylight savings flag}{0, 1 or -1; see below} --- 87,91 ---- \lineiii{4}{minute}{range [0,59]} \lineiii{5}{second}{range [0,61]; see \strong{(1)} in \function{strftime()} description} ! \lineiii{6}{weekday}{range [0,6], Monday is 0} \lineiii{7}{Julian day}{range [1,366]} \lineiii{8}{daylight savings flag}{0, 1 or -1; see below} *************** *** 126,130 **** \begin{funcdesc}{clock}{} Return the current CPU time as a floating point number expressed in ! seconds. The precision, and in fact the very definiton of the meaning of ``CPU time''\index{CPU time}, depends on that of the C function of the same name, but in any case, this is the function to use for --- 126,130 ---- \begin{funcdesc}{clock}{} Return the current CPU time as a floating point number expressed in ! seconds. The precision, and in fact the very definition of the meaning of ``CPU time''\index{CPU time}, depends on that of the C function of the same name, but in any case, this is the function to use for Index: libtoken.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtoken.tex,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** libtoken.tex 1999/02/20 00:14:15 1.6 --- libtoken.tex 2000/07/16 19:01:10 1.7 *************** *** 9,13 **** This module provides constants which represent the numeric values of leaf nodes of the parse tree (terminal tokens). Refer to the file ! \file{Grammar/Grammar} in the Python distribution for the defintions of the names in the context of the language grammar. The specific numeric values which the names map to may change between Python --- 9,13 ---- This module provides constants which represent the numeric values of leaf nodes of the parse tree (terminal tokens). Refer to the file ! \file{Grammar/Grammar} in the Python distribution for the definitions of the names in the context of the language grammar. The specific numeric values which the names map to may change between Python Index: libtraceback.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtraceback.tex,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** libtraceback.tex 1999/06/29 17:08:41 1.12 --- libtraceback.tex 2000/07/16 19:01:10 1.13 *************** *** 105,109 **** \function{print_exception()}. The return value is a list of strings, each ending in a newline and some containing internal newlines. When ! these lines are contatenated and printed, exactly the same text is printed as does \function{print_exception()}. \end{funcdesc} --- 105,109 ---- \function{print_exception()}. The return value is a list of strings, each ending in a newline and some containing internal newlines. When ! these lines are concatenated and printed, exactly the same text is printed as does \function{print_exception()}. \end{funcdesc} Index: libundoc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libundoc.tex,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -r1.74 -r1.75 *** libundoc.tex 2000/06/30 16:06:19 1.74 --- libundoc.tex 2000/07/16 19:01:10 1.75 *************** *** 135,139 **** \item[\module{lockfile}] --- wrapper around FCNTL file locking (use ! \function{fcntl.lockf()}/\function{flock()} intead; see \refmodule{fcntl}) \item[\module{newdir}] --- 135,139 ---- \item[\module{lockfile}] --- wrapper around FCNTL file locking (use ! \function{fcntl.lockf()}/\function{flock()} instead; see \refmodule{fcntl}) \item[\module{newdir}] Index: liburllib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liburllib.tex,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** liburllib.tex 2000/05/30 14:39:45 1.22 --- liburllib.tex 2000/07/16 19:01:10 1.23 *************** *** 262,266 **** \class{URLopener} and \class{FancyURLopener} objects have the ! following methodsL \begin{methoddesc}{open}{fullurl\optional{, data}} --- 262,266 ---- \class{URLopener} and \class{FancyURLopener} objects have the ! following methods. \begin{methoddesc}{open}{fullurl\optional{, data}} Index: liburlparse.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liburlparse.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** liburlparse.tex 1998/08/10 19:42:31 1.15 --- liburlparse.tex 2000/07/16 19:01:10 1.16 *************** *** 13,17 **** This module defines a standard interface to break URL strings up in ! components (addessing scheme, network location, path etc.), to combine the components back into a URL string, and to convert a ``relative URL'' to an absolute URL given a ``base URL.'' --- 13,17 ---- This module defines a standard interface to break URL strings up in ! components (addressing scheme, network location, path etc.), to combine the components back into a URL string, and to convert a ``relative URL'' to an absolute URL given a ``base URL.'' Index: libuser.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libuser.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** libuser.tex 1999/02/20 00:14:16 1.14 --- libuser.tex 2000/07/16 19:01:10 1.15 *************** *** 24,28 **** The \module{user} module looks for a file \file{.pythonrc.py} in the user's ! home directory and if it can be opened, exececutes it (using \function{execfile()}\bifuncindex{execfile}) in its own (i.e. the module \module{user}'s) global namespace. Errors during this phase --- 24,28 ---- The \module{user} module looks for a file \file{.pythonrc.py} in the user's ! home directory and if it can be opened, executes it (using \function{execfile()}\bifuncindex{execfile}) in its own (i.e. the module \module{user}'s) global namespace. Errors during this phase Index: libuserdict.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libuserdict.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** libuserdict.tex 2000/04/03 15:02:35 1.14 --- libuserdict.tex 2000/07/16 19:01:10 1.15 *************** *** 9,17 **** your own dictionary-like classes, which can inherit from them and override existing methods or add new ones. In this way one ! can add new behaviours to dictionaries. The \module{UserDict} module defines the \class{UserDict} class: ! \begin{classdesc}{UserDict}{\optional{intialdata}} Return a class instance that simulates a dictionary. The instance's contents are kept in a regular dictionary, which is accessible via the --- 9,17 ---- your own dictionary-like classes, which can inherit from them and override existing methods or add new ones. In this way one ! can add new behaviors to dictionaries. The \module{UserDict} module defines the \class{UserDict} class: ! \begin{classdesc}{UserDict}{\optional{initialdata}} Return a class instance that simulates a dictionary. The instance's contents are kept in a regular dictionary, which is accessible via the *************** *** 43,47 **** your own list-like classes, which can inherit from them and override existing methods or add new ones. In this way one ! can add new behaviours to lists. The \module{UserList} module defines the \class{UserList} class: --- 43,47 ---- your own list-like classes, which can inherit from them and override existing methods or add new ones. In this way one ! can add new behaviors to lists. The \module{UserList} module defines the \class{UserList} class: *************** *** 78,82 **** your own string-like classes, which can inherit from them and override existing methods or add new ones. In this way one ! can add new behaviours to strings. The \module{UserString} module defines the \class{UserString} class: --- 78,82 ---- your own string-like classes, which can inherit from them and override existing methods or add new ones. In this way one ! can add new behaviors to strings. The \module{UserString} module defines the \class{UserString} class: *************** *** 110,113 **** \function{__hash__} method in order to trap attempts to use a mutable object as dictionary key, which would be otherwise very ! errorprone and hard to track down. \end{classdesc} --- 110,113 ---- \function{__hash__} method in order to trap attempts to use a mutable object as dictionary key, which would be otherwise very ! error prone and hard to track down. \end{classdesc} Index: libwave.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libwave.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** libwave.tex 1999/12/21 18:31:30 1.3 --- libwave.tex 2000/07/16 19:01:10 1.4 *************** *** 103,107 **** The following two methods define a term ``position'' which is compatible ! between them, and is otherwise implementation dependant. \begin{methoddesc}[Wave_read]{setpos}{pos} --- 103,107 ---- The following two methods define a term ``position'' which is compatible ! between them, and is otherwise implementation dependent. \begin{methoddesc}[Wave_read]{setpos}{pos} Index: libwinsound.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libwinsound.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** libwinsound.tex 1999/10/22 21:08:56 1.4 --- libwinsound.tex 2000/07/16 19:01:10 1.5 *************** *** 54,58 **** \strong{Note:} This module does not support playing from a memory ! image asynchonously, so a combination of this flag and \constant{SND_ASYNC} will raise a \exception{RuntimeError}. \end{datadesc} --- 54,58 ---- \strong{Note:} This module does not support playing from a memory ! image asynchronously, so a combination of this flag and \constant{SND_ASYNC} will raise a \exception{RuntimeError}. \end{datadesc} Index: libxmllib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libxmllib.tex,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** libxmllib.tex 2000/07/06 04:45:14 1.23 --- libxmllib.tex 2000/07/16 19:01:10 1.24 *************** *** 198,202 **** \var{message} is a description of what was wrong. The default method raises a \exception{RuntimeError} exception. If this method is ! overridden, it is permissable for it to return. This method is only called when the error can be recovered from. Unrecoverable errors raise a \exception{RuntimeError} without first calling --- 198,202 ---- \var{message} is a description of what was wrong. The default method raises a \exception{RuntimeError} exception. If this method is ! overridden, it is permissible for it to return. This method is only called when the error can be recovered from. Unrecoverable errors raise a \exception{RuntimeError} without first calling From python-dev@python.org Sun Jul 16 20:05:41 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 12:05:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tut tut.tex,1.109,1.110 Message-ID: <200007161905.MAA27369@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tut In directory slayer.i.sourceforge.net:/tmp/cvs-serv27163/Doc/tut Modified Files: tut.tex Log Message: More of Rob W. W. Hooft's spelling fixes. The only ones left now are the distutils patches, which I'll leave to the distutils maintainers. Tip: review the patch like this: grep "^[\!+-] " To get a quick and easy way to review the actual changes. Most of the changes are single-line ones, anyway. Index: tut.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v retrieving revision 1.109 retrieving revision 1.110 diff -C2 -r1.109 -r1.110 *** tut.tex 2000/07/08 05:18:54 1.109 --- tut.tex 2000/07/16 19:05:38 1.110 *************** *** 742,746 **** available to the programmer: the Unicode object. It can be used to store and manipulate Unicode data (see \url{http://www.unicode.org}) ! and intergrates well with the existing string objects providing auto-conversions where necessary. --- 742,746 ---- available to the programmer: the Unicode object. It can be used to store and manipulate Unicode data (see \url{http://www.unicode.org}) ! and integrates well with the existing string objects providing auto-conversions where necessary. *************** *** 799,803 **** Apart from these standard encodings, Python provides a whole set of ! other ways of creating Unicod strings on the basis of a known encoding. --- 799,803 ---- Apart from these standard encodings, Python provides a whole set of ! other ways of creating Unicode strings on the basis of a known encoding. *************** *** 808,812 **** are variable length encodings which permit to store Unicode characters in 8 or 16 bits. Python uses UTF-8 as default encoding. This becomes ! noticable when printing Unicode strings or writing them to files. \begin{verbatim} --- 808,812 ---- are variable length encodings which permit to store Unicode characters in 8 or 16 bits. Python uses UTF-8 as default encoding. This becomes ! noticeable when printing Unicode strings or writing them to files. \begin{verbatim} *************** *** 3020,3024 **** When an exception occurs, it may have an associated value, also known as ! the exceptions's \emph{argument}. The presence and type of the argument depend on the exception type. For exception types which have an argument, the except clause may --- 3020,3024 ---- When an exception occurs, it may have an associated value, also known as ! the exception's \emph{argument}. The presence and type of the argument depend on the exception type. For exception types which have an argument, the except clause may From python-dev@python.org Sun Jul 16 20:05:41 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 12:05:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/ref ref1.tex,1.11,1.12 ref3.tex,1.45,1.46 ref6.tex,1.26,1.27 ref7.tex,1.19,1.20 Message-ID: <200007161905.MAA27370@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ref In directory slayer.i.sourceforge.net:/tmp/cvs-serv27163/Doc/ref Modified Files: ref1.tex ref3.tex ref6.tex ref7.tex Log Message: More of Rob W. W. Hooft's spelling fixes. The only ones left now are the distutils patches, which I'll leave to the distutils maintainers. Tip: review the patch like this: grep "^[\!+-] " To get a quick and easy way to review the actual changes. Most of the changes are single-line ones, anyway. Index: ref1.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref1.tex,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** ref1.tex 1999/11/10 16:13:25 1.11 --- ref1.tex 2000/07/16 19:05:38 1.12 *************** *** 14,18 **** Python and wonder what the precise rules about a particular area of the language are, you should definitely be able to find them here. ! If you would like to see a more formal definitition of the language, maybe you could volunteer your time --- or invent a cloning machine :-). --- 14,18 ---- Python and wonder what the precise rules about a particular area of the language are, you should definitely be able to find them here. ! If you would like to see a more formal definition of the language, maybe you could volunteer your time --- or invent a cloning machine :-). Index: ref3.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref3.tex,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -r1.45 -r1.46 *** ref3.tex 2000/07/13 04:57:58 1.45 --- ref3.tex 2000/07/16 19:05:38 1.46 *************** *** 218,222 **** The built-in function \function{len()}\bifuncindex{len} returns the number of items of a sequence. ! When the lenth of a sequence is \var{n}, the index set contains the numbers 0, 1, \ldots, \var{n}-1. Item \var{i} of sequence \var{a} is selected by \code{\var{a}[\var{i}]}. --- 218,222 ---- The built-in function \function{len()}\bifuncindex{len} returns the number of items of a sequence. ! When the length of a sequence is \var{n}, the index set contains the numbers 0, 1, \ldots, \var{n}-1. Item \var{i} of sequence \var{a} is selected by \code{\var{a}[\var{i}]}. *************** *** 311,315 **** subscription and slicing notations can be used as the target of assignment and \keyword{del} (delete) statements. ! \obindex{mutable sequece} \obindex{mutable} \indexii{assignment}{statement} --- 311,315 ---- subscription and slicing notations can be used as the target of assignment and \keyword{del} (delete) statements. ! \obindex{mutable sequence} \obindex{mutable} \indexii{assignment}{statement} *************** *** 701,705 **** was compiled; \member{co_firstlineno} is the first line number of the function; \member{co_lnotab} is a string encoding the mapping from ! byte code offsets to line numbers (for detais see the source code of the interpreter); \member{co_stacksize} is the required stack size (including local variables); \member{co_flags} is an integer encoding --- 701,705 ---- was compiled; \member{co_firstlineno} is the first line number of the function; \member{co_lnotab} is a string encoding the mapping from ! byte code offsets to line numbers (for details see the source code of the interpreter); \member{co_stacksize} is the required stack size (including local variables); \member{co_flags} is an integer encoding *************** *** 816,821 **** \function{slice()}\bifuncindex{slice} function. ! Special read-only attributes: \member{start} is the lowerbound; ! \member{stop} is the upperbound; \member{step} is the step value; each is \code{None} if omitted. These attributes can have any type. \withsubitem{(slice object attribute)}{ --- 816,821 ---- \function{slice()}\bifuncindex{slice} function. ! Special read-only attributes: \member{start} is the lower bound; ! \member{stop} is the upper bound; \member{step} is the step value; each is \code{None} if omitted. These attributes can have any type. \withsubitem{(slice object attribute)}{ Index: ref6.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref6.tex,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** ref6.tex 2000/07/06 00:50:42 1.26 --- ref6.tex 2000/07/16 19:05:38 1.27 *************** *** 432,436 **** \keyword{try} statement within that loop.\footnote{It may occur within an \keyword{except} or \keyword{else} clause. The ! restriction on occurring in the \keyword{try} clause is implementer's laziness and will eventually be lifted.} It continues with the next cycle of the nearest enclosing loop. --- 432,436 ---- \keyword{try} statement within that loop.\footnote{It may occur within an \keyword{except} or \keyword{else} clause. The ! restriction on occurring in the \keyword{try} clause is implementor's laziness and will eventually be lifted.} It continues with the next cycle of the nearest enclosing loop. Index: ref7.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref7.tex,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** ref7.tex 2000/04/03 04:41:18 1.19 --- ref7.tex 2000/07/16 19:05:38 1.20 *************** *** 212,216 **** If the evaluation of an expression in the header of an except clause ! raises an exception, the original search for a handler is cancelled and a search starts for the new exception in the surrounding code and on the call stack (it is treated as if the entire \keyword{try} statement --- 212,216 ---- If the evaluation of an expression in the header of an except clause ! raises an exception, the original search for a handler is canceled and a search starts for the new exception in the surrounding code and on the call stack (it is treated as if the entire \keyword{try} statement From python-dev@python.org Sun Jul 16 20:53:02 2000 From: python-dev@python.org (Paul Prescod) Date: Sun, 16 Jul 2000 12:53:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib onlinehelp.py,NONE,1.1 Message-ID: <200007161953.MAA30130@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv30103 Added Files: onlinehelp.py Log Message: Online help facility for the Python interprter and other interactive environments. --- NEW FILE --- """ Online help module. This module is experimental and could be removed or radically changed at any time. It is intended specifically for the standard interpreter command line but is intended to be compatible with and useful for other (e.g. GUI, handheld) environments. Help with those other environments is appreciated. Please remember to set PYTHONDOCS to the location of your HTML files: e.g. set PYTHONDOCS=c:\python\docs PYTHONDOCS=/python/docs The docs directory should have a lib subdirectory with "index.html" in it. If it has *.tex then you have the documentation *source* distribution, not the runtime distribution. The module exposes one object: "help". "help" has a repr that does something useful if you just type: >>> from onlinehelp import help >>> help Of course one day the first line will be done automatically by site.py or something like that. help can be used as a function. The function takes the following forms of input: help( "string" ) -- built-in topic or global help( ) -- docstring from object or type help( "doc:filename" ) -- filename from Python documentation Type help to get the rest of the instructions. """ import htmllib # todo: add really basic tr/td support import formatter import os, sys import re prompt="--more-- (enter for more, q to quit) " topics={} # all built-in (non-HTML, non-docstring) topics go in here commands="" # only used at the top level def topLevelCommand( name, description, text ): """ this function is just for use at the top-level to make sure that every advertised top-level topic has a description and every description has text. Maybe we can generalize it later.""" global commands topics[name]=text if description[0]=="[": placeholder="(dummy)" elif description[0]=="<": placeholder="link" else: placeholder="" commands=commands+'help( "%s" ) %s - %s\n' % \ (name, placeholder, description ) topLevelCommand( "intro", "What is Python? Read this first!", """Welcome to Python, the easy to learn, portable, object oriented programming language. [info on how to use help] [info on intepreter]""" ) topLevelCommand( "keywords", "What are the keywords?", "") topLevelCommand( "syntax", "What is the overall syntax?", "[placeholder]") topLevelCommand( "operators", "What operators are available?", "" ) topLevelCommand( "builtins", "What functions, types, etc. are built-in?", "") topLevelCommand( "modules", "What modules are in the standard library?", "") topLevelCommand( "copyright", "Who owns Python?", "[who knows]") topLevelCommand( "moreinfo", "Where is there more information?", "[placeholder]") topLevelCommand( "changes", "What changed in Python 2.0?", "[placeholder]" ) topLevelCommand( "extensions", "What extensions are installed?", "[placeholder]") topLevelCommand( "faq", "What questions are frequently asked?", "[placeholder]") topLevelCommand( "ack", "Who has done work on Python lately?", "[placeholder for list of people who contributed patches]") topics[ "prompt" ]="""""" topics[ "types" ]="""""" topics["everything"]= \ """
    The help function allows you to read help on Python's various 
    functions, objects, instructions and modules. You have two options:
    
    1. Use help( obj ) to browse the help attached to some function, module
    class or other object. e.g. help( dir )
    
    2. Use help( "somestring" ) to browse help on one of the predefined 
    help topics, unassociated with any particular object:
    
    %s
    """ % commands topics[ "keywords" ]=\ """
    "if"       - Conditional execution
    "while"    - Loop while a condition is true
    "for"      - Loop over a sequence of values (often numbers)
    "try"      - Set up an exception handler
    "def"      - Define a named function
    "class"    - Define a class
    "assert"   - Check that some code is working as you expect it to.
    "pass"     - Do nothing
    "del"      - Delete a data value
    "print"    - Print a value
    "return"   - Return information from a function
    "raise"    - Raise an exception
    "break"    - Terminate a loop
    "continue" - Skip to the next loop statement
    "import"   - Import a module
    "global"   - Declare a variable global
    "exec"     - Execute some dynamically generated code
    "lambda"   - Define an unnamed function
    
    For more information, type e.g. help("assert")
    """ topics[ "if" ]="""""" topics[ "while" ]="""""" topics[ "for" ]="""""" topics[ "try" ]="""""" topics[ "def" ]="""""" topics[ "class" ]="""""" topics[ "assert" ]="""""" topics[ "pass" ]="""""" topics[ "del" ]="""""" topics[ "print" ]="""""" topics[ "return" ]="""""" topics[ "raise" ]="""""" topics[ "break" ]="""""" topics[ "continue" ]="""""" topics[ "import" ]="""""" topics[ "global" ]="""""" topics[ "exec" ]="""""" topics[ "lambda" ]="""""" envir_var="PYTHONDOCS" class Help: def __init__( self, out, line_length, docdir=None ): self.out=out self.line_length=line_length self.Parser=htmllib.HTMLParser self.Formatter=formatter.AbstractFormatter self.Pager=Pager self.Writer=formatter.DumbWriter if os.environ.has_key(envir_var): self.docdir=os.environ[envir_var] else: if os.environ.has_key("PYTHONHOME"): pyhome=os.environ["PYTHONHOME"] else: pyhome=os.path.split( sys.executable )[0] self.docdir=os.path.join( pyhome, "doc" ) testfile=os.path.join( os.path.join( self.docdir, "lib" ), "index.html") if not os.path.exists( testfile ): error = \ """Cannot find documentation directory %s. Set the %s environment variable to point to a "doc" directory. It should have a subdirectory "Lib" with a file named "index.html". """ % (self.docdir, envir_var ) raise EnvironmentError, error def __repr__( self ): self( "everything" ) return "" def __call__( self, ob, out=None ): try: self.call( ob, out ) return 1 except (KeyboardInterrupt, EOFError): return 0 def call( self, ob, out ): self.pager=out or self.Pager( self.out, self.line_length ) if type( ob ) in (type(""),type(u"")): if ob.startswith( "<" ): ob=ob[1:] if ob.endswith( ">" ): ob=ob[:-1] self.write( 'Topic: help( "%s" )\n' % ob ) if ob.startswith("doc:"): path=ob[4:] fullpath=os.path.join( self.docdir, path ) data=open( fullpath ).read() index=ob.rfind( "/" ) self.writeHTML( ob[:index], data ) else: try: info=topics[ob] docrlmatch=re.search( "(]+>)", info.split("\n")[0] ) if docrlmatch: # a first-line redirect self( docrlmatch.group(1) ) else: self.writeHTML( "", info ) except KeyError: glo=__builtins__.__dict__.get( ob, 0 ) if glo: self( glo ) else: sys.stderr.write( "No such topic "+`ob` ) return None else: self.write( 'Topic: help( %s )\n' % ob ) if hasattr( ob, "__doc__" ): self.writeText(ob.__doc__) else: self.writeText( type( ob ).__doc__ ) def writeHTML( self, base, str ): parser=self.Parser(self.Formatter( self.Writer( self ))) parser.feed( str ) # calls self.write automatically for i in range( len( parser.anchorlist) ): self.pager.write( "[%s] %s/%s\n" %(i+1, base,parser.anchorlist[i] )) self.pager.flush() self.out.write( "\n" ) def writeText( self, str ): self.pager.write( str ) self.pager.flush() self.out.write( "\n" ) def write( self, str ): self.pager.write( str ) from cStringIO import StringIO class Pager: numlines=1 def __init__(self, out, pagesize=24, linestart="" ): self.out=out self.pagesize=pagesize self.buf=StringIO() self.linestart=linestart def close(self ): self.flush() def flush(self ): data=self.buf.getvalue().rstrip() # dump trailing ws while data.endswith( "\n|" ): # dump trailing lines data=data[:-2] self.out.write( data ) self.buf=StringIO() def write(self, str ): lines=str.split( "\n" ) self.buf.write( lines[0] ) for line in lines[1:]: self.buf.write( "\n| " ) self.buf.write( line ) if self.numlines and not self.numlines%(self.pagesize): dat=self.buf.getvalue().strip() self.out.write( "| " ) self.out.write( dat ) self.out.write( "\n" ) j=raw_input(prompt) if j and j[0]=="q": raise EOFError self.buf=StringIO() self.numlines=self.numlines+1 help=Help(sys.stdout,24) def test(): rc = 1 rc = rc and help( "everything" ) rc = rc and help( "exec" ) rc = rc and help( "doc:lib/unix.html" ) rc = rc and help( "doc:lib/module-tty.html" ) rc = rc and help( "doc:ref/print.html" ) rc = rc and help( "faq" ) rc = rc and help( dir ) repr( help ) if __name__=="__main__": if len( sys.argv )!=2: print "Usage: %s or %s test" % ( sys.argv[0], sys.argv[0] ) sys.exit(0) elif sys.argv[1]=="test": test() else: help( sys.argv[1] ) From python-dev@python.org Sun Jul 16 22:39:52 2000 From: python-dev@python.org (Greg Stein) Date: Sun, 16 Jul 2000 14:39:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.48,2.49 Message-ID: <200007162139.OAA18443@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv18430 Modified Files: unicodeobject.c Log Message: stop messing around with goto and just write the macro correctly. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.48 retrieving revision 2.49 diff -C2 -r2.48 -r2.49 *** unicodeobject.c 2000/07/16 18:47:43 2.48 --- unicodeobject.c 2000/07/16 21:39:49 2.49 *************** *** 632,640 **** } ! #define UTF8_ERROR(details) do { \ ! if (utf8_decoding_error(&s, &p, errors, details)) \ ! goto onError; \ ! goto nextChar; \ ! } while (0) PyObject *PyUnicode_DecodeUTF8(const char *s, --- 632,641 ---- } ! #define UTF8_ERROR(details) \ ! if (1) { \ ! if (utf8_decoding_error(&s, &p, errors, (details))) \ ! goto onError; \ ! continue; \ ! } else PyObject *PyUnicode_DecodeUTF8(const char *s, *************** *** 732,737 **** } s += n; - nextChar: - /* empty */; } --- 733,736 ---- From python-dev@python.org Sun Jul 16 23:01:48 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Mon, 17 Jul 2000 00:01:48 +0200 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.48,2.49 References: <200007162139.OAA18443@slayer.i.sourceforge.net> Message-ID: <397230CC.D8380547@lemburg.com> Greg Stein wrote: > > Update of /cvsroot/python/python/dist/src/Objects > In directory slayer.i.sourceforge.net:/tmp/cvs-serv18430 > > Modified Files: > unicodeobject.c > Log Message: > stop messing around with goto and just write the macro correctly. > > Index: unicodeobject.c > =================================================================== > RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v > retrieving revision 2.48 > retrieving revision 2.49 > diff -C2 -r2.48 -r2.49 > *** unicodeobject.c 2000/07/16 18:47:43 2.48 > --- unicodeobject.c 2000/07/16 21:39:49 2.49 > *************** > *** 632,640 **** > } > > ! #define UTF8_ERROR(details) do { \ > ! if (utf8_decoding_error(&s, &p, errors, details)) \ > ! goto onError; \ > ! goto nextChar; \ > ! } while (0) > > PyObject *PyUnicode_DecodeUTF8(const char *s, > --- 632,641 ---- > } > > ! #define UTF8_ERROR(details) \ > ! if (1) { \ > ! if (utf8_decoding_error(&s, &p, errors, (details))) \ > ! goto onError; \ > ! continue; \ > ! } else Greg, this doesn't work... UTF8_ERROR is used in if-clauses and the above may alter the else-branches in subtle ways which are just as hard to detect as the original bug. The goto may not be the greatest in style, but it doesn't have the above caveats. Please revert the checkin. > > PyObject *PyUnicode_DecodeUTF8(const char *s, > *************** > *** 732,737 **** > } > s += n; > - nextChar: > - /* empty */; > } > > --- 733,736 ---- > > _______________________________________________ > Python-checkins mailing list > Python-checkins@python.org > http://www.python.org/mailman/listinfo/python-checkins -- Marc-Andre Lemburg ______________________________________________________________________ Business: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/ From python-dev@python.org Mon Jul 17 00:00:20 2000 From: python-dev@python.org (Paul Prescod) Date: Sun, 16 Jul 2000 16:00:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib onlinehelp.py,1.1,NONE Message-ID: <200007162300.QAA30665@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv29718 Removed Files: onlinehelp.py Log Message: At GVR's request. From python-dev@python.org Mon Jul 17 04:04:22 2000 From: python-dev@python.org (Skip Montanaro) Date: Sun, 16 Jul 2000 20:04:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib dospath.py,1.14,1.15 Message-ID: <200007170304.UAA09620@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9608 Modified Files: dospath.py Log Message: * split on / or \ * case insensitive Index: dospath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dospath.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** dospath.py 2000/07/12 16:55:57 1.14 --- dospath.py 2000/07/17 03:04:19 1.15 *************** *** 108,117 **** "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! n = m[:] for i in range(len(n)): ! n[i] = n[i].split(os.sep) ! # if os.sep didn't have any effect, try os.altsep ! if os.altsep and len(n[i]) == 1: ! n[i] = n[i].split(os.altsep) prefix = n[0] --- 108,114 ---- "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! n = map(string.lower, m) for i in range(len(n)): ! n[i] = re.split(r"[/\\]", n[i]) prefix = n[0] *************** *** 122,126 **** if i == 0: return '' break ! return os.sep.join(prefix) --- 119,123 ---- if i == 0: return '' break ! return "\\".join(prefix) From python-dev@python.org Mon Jul 17 04:06:29 2000 From: python-dev@python.org (Skip Montanaro) Date: Sun, 16 Jul 2000 20:06:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib dospath.py,1.15,1.16 Message-ID: <200007170306.UAA09818@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9810 Modified Files: dospath.py Log Message: damn! cut-n-paste from ntpath forgot the "import re" Index: dospath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dospath.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** dospath.py 2000/07/17 03:04:19 1.15 --- dospath.py 2000/07/17 03:06:26 1.16 *************** *** 4,7 **** --- 4,8 ---- import stat import string + import re From python-dev@python.org Mon Jul 17 04:07:00 2000 From: python-dev@python.org (Skip Montanaro) Date: Sun, 16 Jul 2000 20:07:00 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib ntpath.py,1.26,1.27 Message-ID: <200007170307.UAA09833@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9825 Modified Files: ntpath.py Log Message: * split on / or \ * case insensitive comparison Index: ntpath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ntpath.py,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** ntpath.py 2000/07/13 01:01:03 1.26 --- ntpath.py 2000/07/17 03:06:58 1.27 *************** *** 9,12 **** --- 9,13 ---- import stat import string + import re *************** *** 159,165 **** "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! n = m[:] for i in range(len(n)): ! n[i] = n[i].split(os.sep) prefix = n[0] for item in n: --- 160,167 ---- "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! n = map(string.lower, m) for i in range(len(n)): ! n[i] = re.split(r"[/\\]", n[i]) ! prefix = n[0] for item in n: *************** *** 169,173 **** if i == 0: return '' break ! return os.sep.join(prefix) --- 171,175 ---- if i == 0: return '' break ! return "\\".join(prefix) From python-dev@python.org Mon Jul 17 10:04:46 2000 From: python-dev@python.org (Greg Stein) Date: Mon, 17 Jul 2000 02:04:46 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.49,2.50 Message-ID: <200007170904.CAA02323@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv2235 Modified Files: unicodeobject.c Log Message: gcc is being stupid with if/else constructs clean out some other warnings Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.49 retrieving revision 2.50 diff -C2 -r2.49 -r2.50 *** unicodeobject.c 2000/07/16 21:39:49 2.49 --- unicodeobject.c 2000/07/17 09:04:43 2.50 *************** *** 422,432 **** v = PyUnicode_Decode(s, len, encoding, errors); done: ! if (owned) Py_DECREF(obj); return v; onError: ! if (owned) Py_DECREF(obj); return NULL; } --- 422,434 ---- v = PyUnicode_Decode(s, len, encoding, errors); done: ! if (owned) { Py_DECREF(obj); + } return v; onError: ! if (owned) { Py_DECREF(obj); + } return NULL; } *************** *** 633,641 **** #define UTF8_ERROR(details) \ ! if (1) { \ if (utf8_decoding_error(&s, &p, errors, (details))) \ goto onError; \ ! continue; \ ! } else PyObject *PyUnicode_DecodeUTF8(const char *s, --- 635,643 ---- #define UTF8_ERROR(details) \ ! do { \ if (utf8_decoding_error(&s, &p, errors, (details))) \ goto onError; \ ! goto nextchar; \ ! } while (0) PyObject *PyUnicode_DecodeUTF8(const char *s, *************** *** 733,736 **** --- 735,741 ---- } s += n; + + nextchar: + ; } *************** *** 748,751 **** --- 753,758 ---- #undef UTF8_ERROR + /* NOT USED */ + #if 0 static int utf8_encoding_error(const Py_UNICODE **source, *************** *** 777,780 **** --- 784,788 ---- } } + #endif /* NOT USED */ PyObject *PyUnicode_EncodeUTF8(const Py_UNICODE *s, *************** *** 827,831 **** *p++ = (char)((ch >> 18) | 0xf0); ! *p++ = (char)(0x80 | (ch >> 12) & 0x3f); i++; cbWritten += 4; --- 835,839 ---- *p++ = (char)((ch >> 18) | 0xf0); ! *p++ = (char)(0x80 | ((ch >> 12) & 0x3f)); i++; cbWritten += 4; From python-dev@python.org Mon Jul 17 10:22:28 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Mon, 17 Jul 2000 02:22:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include abstract.h,2.24,2.25 Message-ID: <200007170922.CAA08115@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv8086/Include Modified Files: abstract.h Log Message: Restore PyXXX_Length() APIs for binary compatibility. New code will see the macros and therefore use the PyXXX_Size() APIs instead. By Thomas Wouters. Index: abstract.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/abstract.h,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -r2.24 -r2.25 *** abstract.h 2000/07/16 12:04:30 2.24 --- abstract.h 2000/07/17 09:22:26 2.25 *************** *** 384,389 **** DL_IMPORT(int) PyObject_Size(PyObject *o); - #define PyObject_Length PyObject_Size - /* Return the size of object o. If the object, o, provides --- 384,387 ---- *************** *** 394,397 **** --- 392,401 ---- */ + /* For DLL compatibility */ + #undef PyObject_Length + DL_IMPORT(int) PyObject_Length(PyObject *o); + #define PyObject_Length PyObject_Size + + DL_IMPORT(PyObject *) PyObject_GetItem(PyObject *o, PyObject *key); *************** *** 686,691 **** DL_IMPORT(int) PySequence_Size(PyObject *o); - #define PySequence_Length PySequence_Size - /* Return the size of sequence object o, or -1 on failure. --- 690,693 ---- *************** *** 693,696 **** --- 695,704 ---- */ + /* For DLL compatibility */ + #undef PySequence_Length + DL_IMPORT(int) PySequence_Length(PyObject *o); + #define PySequence_Length PySequence_Size + + DL_IMPORT(PyObject *) PySequence_Concat(PyObject *o1, PyObject *o2); *************** *** 840,845 **** DL_IMPORT(int) PyMapping_Size(PyObject *o); - #define PyMapping_Length PyMapping_Size - /* Returns the number of keys in object o on success, and -1 on --- 848,851 ---- *************** *** 847,850 **** --- 853,862 ---- this is equivalent to the Python expression: len(o). */ + + /* For DLL compatibility */ + #undef PyMapping_Length + DL_IMPORT(int) PyMapping_Length(PyObject *o); + #define PyMapping_Length PyMapping_Size + /* implemented as a macro: From python-dev@python.org Mon Jul 17 10:22:58 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Mon, 17 Jul 2000 02:22:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.41,2.42 Message-ID: <200007170922.CAA08249@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv8234/Objects Modified Files: abstract.c Log Message: Restore PyXXX_Length() APIs for binary compatibility. New code will see the macros and therefore use the PyXXX_Size() APIs instead. By Thomas Wouters. Index: abstract.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v retrieving revision 2.41 retrieving revision 2.42 diff -C2 -r2.41 -r2.42 *** abstract.c 2000/07/12 12:56:19 2.41 --- abstract.c 2000/07/17 09:22:55 2.42 *************** *** 79,82 **** --- 79,90 ---- } + #undef PyObject_Length + int + PyObject_Length(PyObject *o) + { + return PyObject_Size(o); + } + #define PyObject_Length PyObject_Size + PyObject * PyObject_GetItem(PyObject *o, PyObject *key) *************** *** 821,824 **** --- 829,840 ---- } + #undef PySequence_Length + int + PySequence_Length(PyObject *s) + { + return PySequence_Size(s); + } + #define PySequence_Length PySequence_Size + PyObject * PySequence_Concat(PyObject *s, PyObject *o) *************** *** 1278,1281 **** --- 1294,1305 ---- return -1; } + + #undef PyMapping_Length + int + PyMapping_Length(PyObject *o) + { + return PyMapping_Size(o); + } + #define PyMapping_Length PyMapping_Size PyObject * From python-dev@python.org Mon Jul 17 11:50:28 2000 From: python-dev@python.org (Paul Prescod) Date: Mon, 17 Jul 2000 03:50:28 -0700 Subject: [Python-checkins] CVS: python/nondist/nondist - New directory Message-ID: <200007171050.DAA28047@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/nondist In directory slayer.i.sourceforge.net:/tmp/cvs-serv28038/nondist Log Message: Directory /cvsroot/python/python/nondist/nondist added to the repository From python-dev@python.org Mon Jul 17 18:42:29 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 17 Jul 2000 10:42:29 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html sf-faq.html,1.2,1.3 Message-ID: <200007171742.KAA30679@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv30592 Modified Files: sf-faq.html Log Message: added question about removing directories added developer <-> real name mapping (Should this go on the web page?) Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** sf-faq.html 2000/07/14 20:03:31 1.2 --- sf-faq.html 2000/07/17 17:42:26 1.3 *************** *** 23,26 **** --- 23,27 ----
  • How can I change the pages at python.sourceforge.net?
  • +
  • Who is who? What is a nowonder?
  • *************** *** 31,34 **** --- 32,36 ----
  • Troubleshooting: "Permission Denied"
  • Where can I learn more about CVS?
  • +
  • How can I remove a directory from the CVS tree?
  • *************** *** 92,95 **** --- 94,203 ---- vi changeme.html +

    1.4.:

    + +

    Q: Who is who? What is a nowonder?

    + +

    A:

    + To get the real name, click on "View members" in the "Developer + Info" field, then click on the user name you're unsure about.
    + A recent [17.07.2000] list of mapping is given here: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    akuchlingA.M. Kuchling
    bwarsawBarry Warsaw
    david_ascherDavid Ascher
    effbotFredrik Lundh
    esrEric S. Raymond
    fdrakeFred L. Drake, Jr.
    gsteinGreg Stein
    gvanrossumGuido van Rossum
    gwardGreg Ward
    jackjansenJack Jansen
    jhyltonJeremy Hylton
    larsgaLars Marius Garshol
    lemburgM.-A. Lemburg
    marangozVladimir Marangozov
    mhammondMark Hammond
    montanaroSkip Montanaro
    moshezMoshe Zadka
    nowonderPeter Schneider-Kamp
    prescodPaul Prescod
    sjoerdSjoerd Mullender
    tim_oneTim Bot
    tmickTrent Mick
    twoutersThomas Wouters
    +

    2. CVS

    *************** *** 168,171 **** --- 276,296 ---- http://cvsbook.red-bean.com/cvsbook.html#Introduction + +

    2.5.:

    + +

    Q: How can I remove a directory from the CVS tree?

    + +

    A:

    + Simple answer: You cannot!
    + More complicated answer: Remove all files from the directory, delete the + directory, use the -P (prune) option of the update command: + +
    + cd the_directory
    + rm file1 file2 file3
    + cvs remove file1 file2 file3
    + cvs ci -m "removed all files" file1 file2 file3
    + cd ..
    + cvs update -P

    3. Patches

    From python-dev@python.org Mon Jul 17 18:43:40 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 17 Jul 2000 10:43:40 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html sf-faq.html,1.3,1.4 Message-ID: <200007171743.KAA30759@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv30739 Modified Files: sf-faq.html Log Message: fixed a stupid spelling mistake Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** sf-faq.html 2000/07/17 17:42:26 1.3 --- sf-faq.html 2000/07/17 17:43:37 1.4 *************** *** 187,191 **** tim_one ! Tim Bot --- 187,191 ---- tim_one ! Tim Peters From python-dev@python.org Mon Jul 17 19:23:20 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Mon, 17 Jul 2000 11:23:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.50,2.51 Message-ID: <200007171823.LAA08035@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv8024/Objects Modified Files: unicodeobject.c Log Message: Fixed problems with UTF error reporting macros and some formatting bugs. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.50 retrieving revision 2.51 diff -C2 -r2.50 -r2.51 *** unicodeobject.c 2000/07/17 09:04:43 2.50 --- unicodeobject.c 2000/07/17 18:23:13 2.51 *************** *** 634,644 **** } - #define UTF8_ERROR(details) \ - do { \ - if (utf8_decoding_error(&s, &p, errors, (details))) \ - goto onError; \ - goto nextchar; \ - } while (0) - PyObject *PyUnicode_DecodeUTF8(const char *s, int size, --- 634,637 ---- *************** *** 649,652 **** --- 642,646 ---- PyUnicodeObject *unicode; Py_UNICODE *p; + const char *errmsg = ""; /* Note: size will always be longer than the resulting Unicode *************** *** 673,706 **** n = utf8_code_length[ch]; ! if (s + n > e) ! UTF8_ERROR("unexpected end of data"); switch (n) { case 0: ! UTF8_ERROR("unexpected code byte"); break; case 1: ! UTF8_ERROR("internal error"); break; case 2: ! if ((s[1] & 0xc0) != 0x80) ! UTF8_ERROR("invalid data"); ch = ((s[0] & 0x1f) << 6) + (s[1] & 0x3f); ! if (ch < 0x80) ! UTF8_ERROR("illegal encoding"); else ! *p++ = (Py_UNICODE)ch; break; case 3: if ((s[1] & 0xc0) != 0x80 || ! (s[2] & 0xc0) != 0x80) ! UTF8_ERROR("invalid data"); ch = ((s[0] & 0x0f) << 12) + ((s[1] & 0x3f) << 6) + (s[2] & 0x3f); ! if (ch < 0x800 || (ch >= 0xd800 && ch < 0xe000)) ! UTF8_ERROR("illegal encoding"); else *p++ = (Py_UNICODE)ch; --- 667,712 ---- n = utf8_code_length[ch]; ! if (s + n > e) { ! errmsg = "unexpected end of data"; ! goto utf8Error; ! } switch (n) { case 0: ! errmsg = "unexpected code byte"; ! goto utf8Error; break; case 1: ! errmsg = "internal error"; ! goto utf8Error; break; case 2: ! if ((s[1] & 0xc0) != 0x80) { ! errmsg = "invalid data"; ! goto utf8Error; ! } ch = ((s[0] & 0x1f) << 6) + (s[1] & 0x3f); ! if (ch < 0x80) { ! errmsg = "illegal encoding"; ! goto utf8Error; ! } else ! *p++ = (Py_UNICODE)ch; break; case 3: if ((s[1] & 0xc0) != 0x80 || ! (s[2] & 0xc0) != 0x80) { ! errmsg = "invalid data"; ! goto utf8Error; ! } ch = ((s[0] & 0x0f) << 12) + ((s[1] & 0x3f) << 6) + (s[2] & 0x3f); ! if (ch < 0x800 || (ch >= 0xd800 && ch < 0xe000)) { ! errmsg = "illegal encoding"; ! goto utf8Error; ! } else *p++ = (Py_UNICODE)ch; *************** *** 710,721 **** if ((s[1] & 0xc0) != 0x80 || (s[2] & 0xc0) != 0x80 || ! (s[3] & 0xc0) != 0x80) ! UTF8_ERROR("invalid data"); ch = ((s[0] & 0x7) << 18) + ((s[1] & 0x3f) << 12) + ((s[2] & 0x3f) << 6) + (s[3] & 0x3f); /* validate and convert to UTF-16 */ ! if ((ch < 0x10000) || /* minimum value allowed for 4 byte encoding */ ! (ch > 0x10ffff)) /* maximum value allowed for UTF-16 */ ! UTF8_ERROR("illegal encoding"); /* compute and append the two surrogates: */ --- 716,733 ---- if ((s[1] & 0xc0) != 0x80 || (s[2] & 0xc0) != 0x80 || ! (s[3] & 0xc0) != 0x80) { ! errmsg = "invalid data"; ! goto utf8Error; ! } ch = ((s[0] & 0x7) << 18) + ((s[1] & 0x3f) << 12) + ((s[2] & 0x3f) << 6) + (s[3] & 0x3f); /* validate and convert to UTF-16 */ ! if ((ch < 0x10000) || /* minimum value allowed for 4 ! byte encoding */ ! (ch > 0x10ffff)) { /* maximum value allowed for ! UTF-16 */ ! errmsg = "illegal encoding"; ! goto utf8Error; ! } /* compute and append the two surrogates: */ *************** *** 732,741 **** default: /* Other sizes are only needed for UCS-4 */ ! UTF8_ERROR("unsupported Unicode code range"); } s += n; ! ! nextchar: ! ; } --- 744,757 ---- default: /* Other sizes are only needed for UCS-4 */ ! errmsg = "unsupported Unicode code range"; ! goto utf8Error; ! break; } s += n; ! continue; ! ! utf8Error: ! if (utf8_decoding_error(&s, &p, errors, errmsg)) ! goto onError; } *************** *** 750,757 **** return NULL; } - - #undef UTF8_ERROR ! /* NOT USED */ #if 0 static --- 766,772 ---- return NULL; } ! /* Not used anymore, now that the encoder supports UTF-16 ! surrogates. */ #if 0 static *************** *** 784,788 **** } } ! #endif /* NOT USED */ PyObject *PyUnicode_EncodeUTF8(const Py_UNICODE *s, --- 799,803 ---- } } ! #endif PyObject *PyUnicode_EncodeUTF8(const Py_UNICODE *s, *************** *** 828,832 **** cbAllocated += 4*10; if (_PyString_Resize(&v, cbAllocated)) ! goto onError; } --- 843,847 ---- cbAllocated += 4*10; if (_PyString_Resize(&v, cbAllocated)) ! goto onError; } *************** *** 939,948 **** } - #define UTF16_ERROR(details) do { \ - if (utf16_decoding_error(&q, &p, errors, details)) \ - goto onError; \ - continue; \ - } while(0) - PyObject *PyUnicode_DecodeUTF16(const char *s, int size, --- 954,957 ---- *************** *** 954,957 **** --- 963,967 ---- const Py_UNICODE *q, *e; int bo = 0; + const char *errmsg = ""; /* size should be an even number */ *************** *** 1013,1030 **** /* UTF-16 code pair: */ ! if (q >= e) ! UTF16_ERROR("unexpected end of data"); if (0xDC00 <= *q && *q <= 0xDFFF) { q++; ! if (0xD800 <= *q && *q <= 0xDBFF) /* This is valid data (a UTF-16 surrogate pair), but we are not able to store this information since our Py_UNICODE type only has 16 bits... this might change someday, even though it's unlikely. */ ! UTF16_ERROR("code pairs are not supported"); else continue; } ! UTF16_ERROR("illegal encoding"); } --- 1023,1049 ---- /* UTF-16 code pair: */ ! if (q >= e) { ! errmsg = "unexpected end of data"; ! goto utf16Error; ! } if (0xDC00 <= *q && *q <= 0xDFFF) { q++; ! if (0xD800 <= *q && *q <= 0xDBFF) { /* This is valid data (a UTF-16 surrogate pair), but we are not able to store this information since our Py_UNICODE type only has 16 bits... this might change someday, even though it's unlikely. */ ! errmsg = "code pairs are not supported"; ! goto utf16Error; ! } else continue; } ! errmsg = "illegal encoding"; ! /* Fall through to report the error */ ! ! utf16Error: ! if (utf16_decoding_error(&q, &p, errors, errmsg)) ! goto onError; } From python-dev@python.org Mon Jul 17 19:49:25 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 17 Jul 2000 11:49:25 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.1,1.2 Message-ID: <200007171849.LAA09860@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv9849 Modified Files: pep-0201.txt Log Message: Latest update. After consultation with Guido, zip() is chosen as the name of this built-in. In reference implementation added an __len__() method. Added a `Rejected Elaborations' section to talk about suggestions from the list that I've rejected (and the reasoning behind the rejection). Also: rewrite of paragraph 1 under "Standard For-Loops" for clarity; Spelling and grammar fixes; use a References section. Index: pep-0201.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0201.txt 2000/07/13 06:33:08 1.1 --- pep-0201.txt 2000/07/17 18:49:21 1.2 *************** *** 26,32 **** as `parallel for loops'. A standard for-loop in Python iterates over every element in the sequence until the sequence is ! exhausted. The for-loop can also be explicitly exited with a ! `break' statement, and for-loops can have else: clauses, but these ! is has no bearing on this PEP. For-loops can iterate over built-in types such as lists and --- 26,33 ---- as `parallel for loops'. A standard for-loop in Python iterates over every element in the sequence until the sequence is ! exhausted. A `break' statement inside the loop suite causes an ! explicit loop exit. For-loops also have else: clauses which get ! executed when the loop exits normally (i.e. not by execution of a ! break). For-loops can iterate over built-in types such as lists and *************** *** 36,46 **** monotonically increasing index starting at 0, and this method should raise an IndexError when the sequence is exhausted. This ! protocol is current undocumented -- a defect in Python's documentation hopefully soon corrected. ! For loops are described in the language reference manual here ! http://www.python.org/doc/devel/ref/for.html ! An example for-loop >>> for i in (1, 2, 3): print i --- 37,47 ---- monotonically increasing index starting at 0, and this method should raise an IndexError when the sequence is exhausted. This ! protocol is currently undocumented -- a defect in Python's documentation hopefully soon corrected. ! For-loops are described in the Python language reference ! manual[1]. ! An example for-loop: >>> for i in (1, 2, 3): print i *************** *** 89,93 **** - The use of the magic `None' first argument is non-obvious. ! - Its has arbitrary, often unintended, and inflexible semantics when the lists are not of the same length: the shorter sequences are padded with `None'. --- 90,94 ---- - The use of the magic `None' first argument is non-obvious. ! - It has arbitrary, often unintended, and inflexible semantics when the lists are not of the same length: the shorter sequences are padded with `None'. *************** *** 111,119 **** The proposed solution is to introduce a new built-in sequence generator function, available in the __builtin__ module. This ! function is to be called `marry' and has the following signature: ! marry(seqa, [seqb, [...]], [pad=]) ! marry() takes one or more sequences and weaves their elements together, just as map(None, ...) does with sequences of equal length. The optional keyword argument `pad', if supplied, is a --- 112,120 ---- The proposed solution is to introduce a new built-in sequence generator function, available in the __builtin__ module. This ! function is to be called `zip' and has the following signature: ! zip(seqa, [seqb, [...]], [pad=]) ! zip() takes one or more sequences and weaves their elements together, just as map(None, ...) does with sequences of equal length. The optional keyword argument `pad', if supplied, is a *************** *** 123,129 **** It is not possible to pad short lists with different pad values, ! nor will marry() ever raise an exception with lists of different ! lengths. To accomplish both of these, the sequences must be ! checked and processed before the call to marry(). --- 124,130 ---- It is not possible to pad short lists with different pad values, ! nor will zip() ever raise an exception with lists of different ! lengths. To accomplish either behavior, the sequences must be ! checked and processed before the call to zip(). *************** *** 131,135 **** Lazy Execution ! For performance purposes, marry() does not construct the list of tuples immediately. Instead it instantiates an object that implements a __getitem__() method and conforms to the informal --- 132,136 ---- Lazy Execution ! For performance purposes, zip() does not construct the list of tuples immediately. Instead it instantiates an object that implements a __getitem__() method and conforms to the informal *************** *** 149,171 **** >>> d = (12, 13) ! >>> marry(a, b) [(1, 5), (2, 6), (3, 7), (4, 8)] ! >>> marry(a, d) [(1, 12), (2, 13)] ! >>> marry(a, d, pad=0) [(1, 12), (2, 13), (3, 0), (4, 0)] ! >>> marry(a, d, pid=0) Traceback (most recent call last): File "", line 1, in ? ! File "/usr/tmp/python-iKAOxR", line 11, in marry TypeError: unexpected keyword arguments ! >>> marry(a, b, c, d) [(1, 5, 9, 12), (2, 6, 10, 13)] ! >>> marry(a, b, c, d, pad=None) [(1, 5, 9, 12), (2, 6, 10, 13), (3, 7, 11, None), (4, 8, None, None)] >>> map(None, a, b, c, d) --- 150,172 ---- >>> d = (12, 13) ! >>> zip(a, b) [(1, 5), (2, 6), (3, 7), (4, 8)] ! >>> zip(a, d) [(1, 12), (2, 13)] ! >>> zip(a, d, pad=0) [(1, 12), (2, 13), (3, 0), (4, 0)] ! >>> zip(a, d, pid=0) Traceback (most recent call last): File "", line 1, in ? ! File "/usr/tmp/python-iKAOxR", line 11, in zip TypeError: unexpected keyword arguments ! >>> zip(a, b, c, d) [(1, 5, 9, 12), (2, 6, 10, 13)] ! >>> zip(a, b, c, d, pad=None) [(1, 5, 9, 12), (2, 6, 10, 13), (3, 7, 11, None), (4, 8, None, None)] >>> map(None, a, b, c, d) *************** *** 176,185 **** Reference Implementation ! Here is a reference implementation, in Python of the marry() built-in function and helper class. These would ultimately be replaced by equivalent C code. ! class _Marriage: def __init__(self, args, kws): self.__padgiven = 0 if kws.has_key('pad'): --- 177,187 ---- Reference Implementation ! Here is a reference implementation, in Python of the zip() built-in function and helper class. These would ultimately be replaced by equivalent C code. ! class _Zipper: def __init__(self, args, kws): + # Defaults self.__padgiven = 0 if kws.has_key('pad'): *************** *** 187,190 **** --- 189,193 ---- self.__pad = kws['pad'] del kws['pad'] + # Assert no unknown arguments are left if kws: raise TypeError('unexpected keyword arguments') *************** *** 207,210 **** --- 210,230 ---- return tuple(ret) + def __len__(self): + # If we're padding, then len is the length of the longest sequence, + # otherwise it's the length of the shortest sequence. + if not self.__padgiven: + shortest = -1 + for s in self.__sequences: + slen = len(s) + if shortest < 0 or slen < shortest: + shortest = slen + return shortest + longest = 0 + for s in self.__sequences: + slen = len(s) + if slen > longest: + longest = slen + return longest + def __str__(self): ret = [] *************** *** 220,242 **** ! def marry(*args, **kws): ! return _Marriage(args, kws) Open Issues ! What should "marry(a)" do? ! Given a = (1, 2, 3), should marry(a) return [(1,), (2,), (3,)] or ! should it return [1, 2, 3]? The first is more consistent with the ! description given above, while the latter is what map(None, a) ! does, and may be more consistent with user expectation. ! The latter interpretation requires special casing, which is not ! present in the reference implementation. It returns ! >>> marry(a) ! [(1,), (2,), (3,), (4,)] --- 240,367 ---- ! def zip(*args, **kws): ! return _Zipper(args, kws) + Rejected Elaborations + + Some people have suggested that the user be able to specify the + type of the inner and outer containers for the zipped sequence. + This would be specified by additional keyword arguments to zip(), + named `inner' and `outer'. + + This elaboration is rejected for several reasons. First, there + really is no outer container, even though there appears to be an + outer list container the example above. This is simply an + artifact of the repr() of the zipped object. User code can do its + own looping over the zipped object via __getitem__(), and build + any type of outer container for the fully evaluated, concrete + sequence. For example, to build a zipped object with lists as an + outer container, use + + >>> list(zip(sequence_a, sequence_b, sequence_c)) + + for tuple outer container, use + + >>> tuple(zip(sequence_a, sequence_b, sequence_c)) + + This type of construction will usually not be necessary though, + since it is expected that zipped objects will most often appear in + for-loops. + + Second, allowing the user to specify the inner container + introduces needless complexity and arbitrary decisions. You might + imagine that instead of the default tuple inner container, the + user could prefer a list, or a dictionary, or instances of some + sequence-like class. + + One problem is the API. Should the argument to `inner' be a type + or a template object? For flexibility, the argument should + probably be a type object (i.e. TupleType, ListType, DictType), or + a class. For classes, the implementation could just pass the zip + element to the constructor. But what about built-in types that + don't have constructors? They would have to be special-cased in + the implementation (i.e. what is the constructor for TupleType? + The tuple() built-in). + + Another problem that arises is for zips greater than length two. + Say you had three sequences and you wanted the inner type to be a + dictionary. What would the semantics of the following be? + + >>> zip(sequence_a, sequence_b, sequence_c, inner=DictType) + + Would the key be (element_a, element_b) and the value be + element_c, or would the key be element_a and the value be + (element_b, element_c)? Or should an exception be thrown? + + This suggests that the specification of the inner container type + is needless complexity. It isn't likely that the inner container + will need to be specified very often, and it is easy to roll your + own should you need it. Tuples are chosen for the inner container + type due to their (slight) memory footprint and performance + advantages. + + + Open Issues + + - What should "zip(a)" do? Given + + a = (1, 2, 3); zip(a) + + three outcomes are possible. + + 1) Returns [(1,), (2,), (3,)] + + Pros: no special casing in the implementation or in user + code, and is more consistent with the description of it's + semantics. Cons: this isn't what map(None, a) would return, + and may be counter to user expectations. ! 2) Returns [1, 2, 3] ! Pros: consistency with map(None, a), and simpler code for ! for-loops, e.g. ! for i in zip(a): ! ! instead of ! ! for (i,) in zip(a): ! ! Cons: too much complexity and special casing for what should ! be a relatively rare usage pattern. ! ! 3) Raises TypeError ! ! Pros: None ! ! Cons: needless restriction ! ! Current scoring seems to generally favor outcome 1. ! ! - The name of the built-in `zip' may cause some initial confusion ! with the zip compression algorithm. Other suggestions include ! (but are not limited to!): marry, weave, parallel, lace, braid, ! interlace, permute, furl, tuples, lists, stitch, collate, knit, ! plait, and with. All have disadvantages, and there is no clear ! unanimous choice, therefore the decision was made to go with ! `zip' because the same functionality is available in other ! languages (e.g. Haskell) under the name `zip'[2]. ! ! ! ! References ! ! [1] http://www.python.org/doc/devel/ref/for.html ! [2] http://www.haskell.org/onlinereport/standard-prelude.html#$vzip ! ! TBD: URL to python-dev archives ! ! ! Copyright ! This document has been placed in the public domain. From python-dev@python.org Tue Jul 18 10:09:50 2000 From: python-dev@python.org (Greg Stein) Date: Tue, 18 Jul 2000 02:09:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Demo/imputil importers.py,1.1,1.2 Message-ID: <200007180909.CAA21838@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/imputil In directory slayer.i.sourceforge.net:/tmp/cvs-serv21642/Demo/imputil Modified Files: importers.py Log Message: no changes other than indentation level (now 4) and comment reflow. use "cvs diff -b" to verify. Index: importers.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/imputil/importers.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** importers.py 2000/06/29 11:05:30 1.1 --- importers.py 2000/07/18 09:09:48 1.2 *************** *** 35,88 **** def _timestamp(pathname): ! "Return the file modification time as a Long." ! try: ! s = os.stat(pathname) ! except OSError: ! return None ! return long(s[8]) def _fs_import(dir, modname, fqname): ! "Fetch a module from the filesystem." ! pathname = os.path.join(dir, modname) ! if os.path.isdir(pathname): ! values = { '__pkgdir__' : pathname, '__path__' : [ pathname ] } ! ispkg = 1 ! pathname = os.path.join(pathname, '__init__') ! else: ! values = { } ! ispkg = 0 ! ! # look for dynload modules ! for desc in _c_suffixes: ! file = pathname + desc[0] ! try: ! fp = open(file, desc[1]) ! except IOError: ! pass ! else: ! module = imp.load_module(fqname, fp, file, desc) ! values['__file__'] = file ! return 0, module, values ! ! t_py = _timestamp(pathname + '.py') ! t_pyc = _timestamp(pathname + _suffix) ! if t_py is None and t_pyc is None: ! return None ! code = None ! if t_py is None or (t_pyc is not None and t_pyc >= t_py): ! file = pathname + _suffix ! f = open(file, 'rb') ! if f.read(4) == imp.get_magic(): ! t = struct.unpack('= t_py): ! file = pathname + _suffix ! f = open(file, 'rb') ! if f.read(4) == imp.get_magic(): ! t = struct.unpack('., where ! can be located using a subclass-specific mechanism and the ! is found in the archive using a subclass-specific mechanism. ! ! This class defines two hooks for subclasses: one to locate an archive ! (and possibly return some context for future subfile lookups), and one ! to locate subfiles. ! """ ! ! def get_code(self, parent, modname, fqname): ! if parent: ! # the Importer._finish_import logic ensures that we handle imports ! # under the top level module (package / archive). ! assert parent.__importer__ == self ! ! # if a parent "package" is provided, then we are importing a sub-file ! # from the archive. ! result = self.get_subfile(parent.__archive__, modname) ! if result is None: ! return None ! if isinstance(result, _TupleType): ! assert len(result) == 2 ! return (0,) + result ! return 0, result, {} ! ! # no parent was provided, so the archive should exist somewhere on the ! # default "path". ! archive = self.get_archive(modname) ! if archive is None: ! return None ! return 1, "", {'__archive__':archive} ! ! def get_archive(self, modname): ! """Get an archive of modules. ! ! This method should locate an archive and return a value which can be ! used by get_subfile to load modules from it. The value may be a simple ! pathname, an open file, or a complex object that caches information ! for future imports. ! ! Return None if the archive was not found. """ - raise RuntimeError, "get_archive not implemented" - - def get_subfile(self, archive, modname): - """Get code from a subfile in the specified archive. ! Given the specified archive (as returned by get_archive()), locate ! and return a code object for the specified module name. - A 2-tuple may be returned, consisting of a code object and a dict - of name/values to place into the target module. - Return None if the subfile was not found. - """ - raise RuntimeError, "get_subfile not implemented" - - class PackageArchive(PackageArchiveImporter): ! "PackageArchiveImporter subclass that refers to a specific archive." ! def __init__(self, modname, archive_pathname): ! self.__modname = modname ! self.__path = archive_pathname ! ! def get_archive(self, modname): ! if modname == self.__modname: ! return self.__path ! return None ! # get_subfile is passed the full pathname of the archive --- 106,182 ---- # class PackageArchiveImporter(imputil.Importer): ! """Importer subclass to import from (file) archives. ! This Importer handles imports of the style ., where ! can be located using a subclass-specific mechanism and the ! is found in the archive using a subclass-specific mechanism. ! ! This class defines two hooks for subclasses: one to locate an archive ! (and possibly return some context for future subfile lookups), and one ! to locate subfiles. """ ! def get_code(self, parent, modname, fqname): ! if parent: ! # the Importer._finish_import logic ensures that we handle imports ! # under the top level module (package / archive). ! assert parent.__importer__ == self ! ! # if a parent "package" is provided, then we are importing a ! # sub-file from the archive. ! result = self.get_subfile(parent.__archive__, modname) ! if result is None: ! return None ! if isinstance(result, _TupleType): ! assert len(result) == 2 ! return (0,) + result ! return 0, result, {} ! ! # no parent was provided, so the archive should exist somewhere on the ! # default "path". ! archive = self.get_archive(modname) ! if archive is None: ! return None ! return 1, "", {'__archive__':archive} ! ! def get_archive(self, modname): ! """Get an archive of modules. ! ! This method should locate an archive and return a value which can be ! used by get_subfile to load modules from it. The value may be a simple ! pathname, an open file, or a complex object that caches information ! for future imports. ! ! Return None if the archive was not found. ! """ ! raise RuntimeError, "get_archive not implemented" ! ! def get_subfile(self, archive, modname): ! """Get code from a subfile in the specified archive. ! ! Given the specified archive (as returned by get_archive()), locate ! and return a code object for the specified module name. ! ! A 2-tuple may be returned, consisting of a code object and a dict ! of name/values to place into the target module. ! ! Return None if the subfile was not found. ! """ ! raise RuntimeError, "get_subfile not implemented" class PackageArchive(PackageArchiveImporter): ! "PackageArchiveImporter subclass that refers to a specific archive." ! def __init__(self, modname, archive_pathname): ! self.__modname = modname ! self.__path = archive_pathname ! ! def get_archive(self, modname): ! if modname == self.__modname: ! return self.__path ! return None ! # get_subfile is passed the full pathname of the archive *************** *** 186,209 **** # class DirectoryImporter(imputil.Importer): ! "Importer subclass to emulate the standard importer." ! def __init__(self, dir): ! self.dir = dir ! def get_code(self, parent, modname, fqname): ! if parent: ! dir = parent.__pkgdir__ ! else: ! dir = self.dir ! ! # Return the module (and other info) if found in the specified ! # directory. Otherwise, return None. ! return _fs_import(dir, modname, fqname) ! ! def __repr__(self): ! return '<%s.%s for "%s" at 0x%x>' % (self.__class__.__module__, ! self.__class__.__name__, ! self.dir, ! id(self)) --- 186,209 ---- # class DirectoryImporter(imputil.Importer): ! "Importer subclass to emulate the standard importer." ! def __init__(self, dir): ! self.dir = dir ! def get_code(self, parent, modname, fqname): ! if parent: ! dir = parent.__pkgdir__ ! else: ! dir = self.dir ! ! # Return the module (and other info) if found in the specified ! # directory. Otherwise, return None. ! return _fs_import(dir, modname, fqname) ! ! def __repr__(self): ! return '<%s.%s for "%s" at 0x%x>' % (self.__class__.__module__, ! self.__class__.__name__, ! self.dir, ! id(self)) *************** *** 213,248 **** # class PathImporter(imputil.Importer): ! def __init__(self, path=sys.path): ! self.path = path ! def get_code(self, parent, modname, fqname): ! if parent: ! # we are looking for a module inside of a specific package ! return _fs_import(parent.__pkgdir__, modname, fqname) ! ! # scan sys.path, looking for the requested module ! for dir in self.path: ! if isinstance(dir, _StringType): ! result = _fs_import(dir, modname, fqname) ! if result: ! return result ! # not found ! return None ###################################################################### def _test_dir(): ! "Debug/test function to create DirectoryImporters from sys.path." ! imputil.ImportManager().install() ! path = sys.path[:] ! path.reverse() ! for d in path: ! sys.path.insert(0, DirectoryImporter(d)) ! sys.path.insert(0, imputil.BuiltinImporter()) def _test_revamp(): ! "Debug/test function for the revamped import system." ! imputil.ImportManager().install() ! sys.path.insert(0, PathImporter()) ! sys.path.insert(0, imputil.BuiltinImporter()) --- 213,248 ---- # class PathImporter(imputil.Importer): ! def __init__(self, path=sys.path): ! self.path = path ! def get_code(self, parent, modname, fqname): ! if parent: ! # we are looking for a module inside of a specific package ! return _fs_import(parent.__pkgdir__, modname, fqname) ! ! # scan sys.path, looking for the requested module ! for dir in self.path: ! if isinstance(dir, _StringType): ! result = _fs_import(dir, modname, fqname) ! if result: ! return result ! # not found ! return None ###################################################################### def _test_dir(): ! "Debug/test function to create DirectoryImporters from sys.path." ! imputil.ImportManager().install() ! path = sys.path[:] ! path.reverse() ! for d in path: ! sys.path.insert(0, DirectoryImporter(d)) ! sys.path.insert(0, imputil.BuiltinImporter()) def _test_revamp(): ! "Debug/test function for the revamped import system." ! imputil.ImportManager().install() ! sys.path.insert(0, PathImporter()) ! sys.path.insert(0, imputil.BuiltinImporter()) From python-dev@python.org Tue Jul 18 10:09:50 2000 From: python-dev@python.org (Greg Stein) Date: Tue, 18 Jul 2000 02:09:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib imputil.py,1.13,1.14 httplib.py,1.17,1.18 Message-ID: <200007180909.CAA21834@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv21642/Lib Modified Files: imputil.py httplib.py Log Message: no changes other than indentation level (now 4) and comment reflow. use "cvs diff -b" to verify. Index: imputil.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/imputil.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** imputil.py 2000/06/26 17:31:49 1.13 --- imputil.py 2000/07/18 09:09:47 1.14 *************** *** 19,362 **** class ImportManager: ! "Manage the import process." ! def install(self, namespace=vars(__builtin__)): ! "Install this ImportManager into the specified namespace." ! if isinstance(namespace, _ModuleType): ! namespace = vars(namespace) [...1107 lines suppressed...] ! ImportManager().install() ! sys.path.insert(0, BuiltinImporter()) ###################################################################### --- 584,598 ---- def _print_importers(): ! items = sys.modules.items() ! items.sort() ! for name, module in items: ! if module: ! print name, module.__dict__.get('__importer__', '-- no importer') ! else: ! print name, '-- non-existent module' def _test_revamp(): ! ImportManager().install() ! sys.path.insert(0, BuiltinImporter()) ###################################################################### Index: httplib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/httplib.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** httplib.py 2000/06/26 08:28:01 1.17 --- httplib.py 2000/07/18 09:09:47 1.18 *************** *** 78,84 **** try: ! from cStringIO import StringIO except ImportError: ! from StringIO import StringIO HTTP_PORT = 80 --- 78,84 ---- try: [...1289 lines suppressed...] --- 765,781 ---- if hasattr(socket, 'ssl'): ! host = 'www.c2.net' ! hs = HTTPS() ! hs.connect(host) ! hs.putrequest('GET', selector) ! hs.endheaders() ! status, reason, headers = hs.getreply() ! print 'status =', status ! print 'reason =', reason ! print ! if headers: ! for header in headers.headers: print string.strip(header) ! print ! print hs.getfile().read() From python-dev@python.org Tue Jul 18 11:01:15 2000 From: python-dev@python.org (Thomas Wouters) Date: Tue, 18 Jul 2000 03:01:15 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0204.txt,1.1,1.2 Message-ID: <200007181001.DAA31938@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv29198 Modified Files: pep-0204.txt Log Message: First draft of the range-literals PEP. Not sprinkeled with explicit 'TBD's, and the one TBD in there should be an 'XXX' in my opinion ;) but with a lot of issues under 'Open issues'. Please, comment freely, on anything from specific arguments and spelling errors to style issues and argument-flow. I wrote all this on the train to and from work, listening to UB40 on the way to work, and to my girlfriend complaining about her work and her colleagues on the way home ;) So it might be a bit incoherent in places. One TBD that's going to come up a lot in PEPs, I think: how to wrap long URLs ? I think whoever invents a good way to do that can become a millionaire. Can we define/steal a good, standard way to wrap URLs, please ? Index: pep-0204.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0204.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0204.txt 2000/07/14 03:29:11 1.1 --- pep-0204.txt 2000/07/18 10:01:12 1.2 *************** *** 1,9 **** ! PEP: 203 Title: Range Literals Version: $Revision$ Owner: thomas@xs4all.net (Thomas Wouters) Python-Version: 2.0 ! Status: Incomplete --- 1,269 ---- ! PEP: 204 Title: Range Literals Version: $Revision$ Owner: thomas@xs4all.net (Thomas Wouters) Python-Version: 2.0 ! Status: Draft + + + Introduction + + This PEP describes the `range literal' proposal for Python 2.0. + This PEP tracks the status and ownership of this feature, slated + for introduction in Python 2.0. It contains a description of the + feature and outlines changes necessary to support the feature. + This PEP summarizes discussions held in mailing list forums, and + provides URLs for further information, where appropriate. The CVS + revision history of this file contains the definitive historical + record. + + + + List ranges + + Ranges are sequences of numbers of a fixed stepping, often used in + for-loops. The Python for-loop is designed to iterate over a + sequence directly: + + >>> l = ['a', 'b', 'c', 'd'] + >>> for item in l: + ... print item + a + b + c + d + + However, this solution is not always prudent. Firstly, problems + arise when altering the sequence in the body of the for-loop, + resulting in the for-loop skipping items. Secondly, it is not + possible to iterate over, say, every second element of the + sequence. And thirdly, it is sometimes necessary to process an + element based on its index, which is not readily available in the + above construct. + + For these instances, and others where a range of numbers is + desired, Python provides the `range' builtin function, which + creates a list of numbers. The `range' function takes three + arguments, `start', `end' and `step'. `start' and `step' are + optional, and default to 0 and 1, respectively. + + The `range' function creates a list of numbers, starting at + `start', with a step of `step', up to, but not including `end', so + that `range(10)' produces a list that has exactly 10 items, the + numbers 0 through 9. + + Using the `range' function, the above example would look like + this: + + >>> for i in range(len(l)): + ... print l[i] + a + b + c + d + + Or, to start at the second element of `l' and processing only + every second element from then on: + + >>> for i in range(1, len(l), 2): + ... print l[i] + b + d + + There are several disadvantages with this approach: + + - Clarity of purpose: Adding another functioncall, possibly with + extra arithmatic to determine the desired length and step of the + list, does not improve readability of the code. Also, it is + possible to `shadow' the builtin `range' function by supplying a + local or global variable with the same name, effectively + replacing it. This may or may not be a desired effect. + + - Efficiency: because the `range' function can be overridden, the + Python compiler cannot make assumptions about the for-loop, and + has to maintain a seperate loop counter. + + - Consistency: There already is a syntax that is used to denote + ranges, as shown below. This syntax uses the exact same + arguments, though all optional, in the exact same way. It seems + logical to extend this syntax to ranges, to form `range + literals'. + + + + Slice Indices + + In Python, a sequence can be indexed in one of two ways: + retrieving a single item, or retrieving a range of items. + Retrieving a range of items results in a new object of the same + type as the original sequence, containing zero or more items from + the original sequence. This is done using a `range notation': + + >>> l[2:4] + ['c', 'd'] + + This range notation consists of zero, one or two indices seperated + by a colon. The first index is the `start' index, the second the + `end'. When either is left out, they default to respectively the + start and the end of the sequence. + + There is also an extended range notation, which incorporates + `step' as well. Though this notation is not currently supported + by most builtin types, if it were, it would work as follows: + + >>> l[1:4:2] + ['b', 'd'] + + The third `argument' to the slice syntax is exactly the same as + the `step' argument to range(). The underlying mechanisms of + standard and these extended slices are sufficiently different and + inconsistent that many classes and extensions outside of + mathematical packages do not implement support for the extended + variant, and this should definately be resolved, but this is + beyond the scope of this PEP. + + Extended slices do show, however, that there is already a + perfectly valid and applicable syntax to denote ranges in a way + that solve all of the earlier stated disadvantages of the use of + the range() function: + + - It is clearer, more concise syntax, which has already proven to + be both intuitive and easy to learn. + + - It is consistent with the other use of ranges in Python + (slices.) + + - Because it is built-in syntax, instead of a builtin function, it + cannot be overridden. This means both that a viewer can be + certain about what the code does, and that an optimizer will not + have to worry about range() being `shadowed'. + + + + The Proposed Solution + + The proposed implementation of range-literals combines the syntax + for list literals with the syntax for (extended) slices, to form + range literals: + + >>> [1:10] + [1, 2, 3, 4, 5, 6, 7, 8, 9] + >>> [:5] + [0, 1, 2, 3, 4] + >>> [5:1:-1] + [5, 4, 3, 2] + + There is one minor difference between range literals and the slice + syntax: though it is possible to omit all of `start', `end' and + `step' in slices, it does not make sense to omit `end' in range + literals. In slices, `end' would default to the end of the list, + but this has no meaning in range literals. + + + + Reference Implementation + + The proposed implementation can be found on SourceForge[1]. It + adds a new bytecode, BUILD_RANGE, that takes three arguments from + the stack and builds a list on the bases of those. The list is + pushed back on the stack. + + The use of a new bytecode is necessary to be able to build ranges + based on other calculations, whose outcome is not known at compile + time. + + The code introduces two new functions to listobject.c, which are + currently hovering between private functions and full-fledged API + calls. + + PyObject * PyList_FromRange(long start, long end, long step) + builds a list from start, end and step, returning NULL if an error + occurs. + + long PyList_GetLenOfRange(long start, long end, long step) is a + helper function to determine the length of a range. It was + previously a static function in bltinmodule.c, but is now + necessary in both listobject.c and bltinmodule.c (for xrange). It + is made non-static solely to avoid code duplication. + + + Open issues + + One possible solution to the discrepancy of requiring the `end' + argument in range literals is to allow the range syntax to create + a `generator', rather than a list, such as the `xrange' builtin + function does. However, a generator would not be a list, and it + would be impossible, for instance, to assign to items in the + generator, or append to it. + + The range syntax could conceivably be extended to include tuples, + immutable lists, which could then be safely implemented as + generators. Especially for large number arrays, this may be a + desirable solution: generators require very little in the way of + storage and initialization, and there is only a small performance + impact in calculating and creating the appropriate number on + request. (TBD: is there any at all ? Cursory testing suggests + equal performance even in the case of ranges of length 1.) + + However, even if idea was adopted, would it be wise to `special + case' the second argument, making it optional in one instance of + the syntax, and non-optional in other cases ? + + + Should it be possible to mix range syntax with normal list + literals, creating a single list, like so: + + >>> [5, 6, 1:6, 7, 9] + to create + [5, 6, 1, 2, 3, 4, 5, 7, 9] + + + How should range literals interact with another proposed new + feature, `list comprehensions', PEP-202 ? In specific, should it + be possible to create lists in list comprehensions, like so: + + >>> [x:y for x in (1,2) y in (3, 4)] + + Should this example return a single list with multiple ranges: + [1, 2, 1, 2, 3, 2, 2, 3] + + Or a list of lists, like so: + [[1, 2], [1, 2, 3], [2], [2, 3]] + + However, as the syntax and semantics of list comprehensions are + still subject of hot debate, these issues are probably best + addressed by the `list comprehensions' PEP. + + + Range literals accept objects other than integers: it performs + PyInt_AsLong() on the objects passed in, so as long as the objects + can be coerced into integers, they will be accepted. The + resulting list, however, is always composed of standard integers. + + Should range literals create a list of the passed-in type ? It + might be desirable in the cases of other builtin types, such as + longs and strings: + + >>> [ 1L : 2L<<64 : 2<<32L ] + >>> ["a":"z":"b"] + >>> ["a":"z":2] + + However, this might be too much `magic' to be obvious. It might + also present problems with user-defined classes: even if the base + class can be found and a new instance created, the instance may + require additional arguments to __init__, causing the creation to + fail. + + + The PyList_FromRange() and PyList_GetLenOfRange() functions need + to be classified: are they part of the API, or should they be made + private functions ? + + + References: + + [1] + http://sourceforge.net/patch/?func=detailpatch&patch_id=100902&group_id=5470 From python-dev@python.org Tue Jul 18 22:43:26 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Tue, 18 Jul 2000 14:43:26 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html sf-faq.html,1.4,1.5 Message-ID: <200007182143.OAA02155@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv2080 Modified Files: sf-faq.html Log Message: added Windows section How to install ssh? How to install cvs to use ssh? Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** sf-faq.html 2000/07/17 17:43:37 1.4 --- sf-faq.html 2000/07/18 21:43:23 1.5 *************** *** 42,45 **** --- 42,51 ---- +

    4. Windows

    +
      +
    1. How to install ssh?
    2. +
    3. How to install cvs to use ssh?
    4. +
    +

    A. Appendix

      *************** *** 349,352 **** --- 355,416 ---- can be found in the Appendix of this FAQ.

      + +

      4. Windows

      + +

      4.1.:

      + +

      Q: How to install ssh?

      + +

      A:

      + Download the following file and unzip it to C:\BIN: + +
      + ftp://ftp.cs.hut.fi/pub/ssh/contrib/ssh-1.2.14-win32bin.zip
      + Create a home directory (e.g. C:\HOME\SF_USERNAME) and + C:\ETC and place a passwd file in C:\ETC: + +
      + mkdir C:\HOME
      + mkdir C:\HOME\SF_USERNAME
      + mkdir C:\ETC
      + echo sf_username:x:1:10:Name, + Real:/home/sf_username:/windows/command.com > + C:\ETC\passwd
      + Add the following entries to your environment. This can be automated e.g. by + putting them into AUTOEXEC.BAT on Win9x. + +
      + SET PATH=%PATH%;C:\BIN
      + SET HOME=\HOME\SF_USERNAME
      + SET HOMEPATH=\HOME\SF_USERNAME
      + SET HOMEDRIVE=C:
      + SET USERNAME=sf_username
      + After the environment is updated you should be able to use ssh. Try this: + +
      + ssh -l sf_username shell.sourceforge.net
      + +

      4.2.:

      + +

      Q: How to install cvs to use ssh?

      + +

      A:

      + Download the following file and unzip it to C:\BIN: + +
      + ftp://download.cyclic.com/pub/cvs-1.10/windows/cvs-1.10-win.zip
      + Add the following entries to your environment. This can be automated e.g. by + putting them into AUTOEXEC.BAT on Win9x. + +
      + SET CVS_RSH=ssh
      + SET + CVSROOT=:ext:sf_username@cvs.python.sourceforge.net:/cvsroot/python
      + After the environment is updated you should be able to use cvs/ssh: Try this: + +
      + cvs co python

      A. Appendix

      From python-dev@python.org Wed Jul 19 05:19:57 2000 From: python-dev@python.org (Barry Warsaw) Date: Tue, 18 Jul 2000 21:19:57 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.2,1.3 Message-ID: <200007190419.VAA10225@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv10215 Modified Files: pep-0201.txt Log Message: In the examples section, show how zip() is reversible. Patches to the reference implementation: __getitem__() raises IndexError immediately if no sequences were given. __len__() returns 0 if no sequences were given. __cmp__() new method Added a little more explanation to raise-a-TypeError-for-zip(a) Added `fold' as one of the alternative names proposed. Index: pep-0201.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pep-0201.txt 2000/07/17 18:49:21 1.2 --- pep-0201.txt 2000/07/19 04:19:54 1.3 *************** *** 173,177 **** --- 173,197 ---- [(1, 5, 9, 12), (2, 6, 10, 13), (3, 7, 11, None), (4, 8, None, None)] + Note that when the sequences are of the same length, zip() is + reversible: + >>> a = (1, 2, 3) + >>> b = (4, 5, 6) + >>> x = zip(a, b) + >>> y = zip(*x) # alternatively, apply(zip, x) + >>> z = zip(*y) # alternatively, apply(zip, y) + >>> x + [(1, 4), (2, 5), (3, 6)] + >>> y + [(1, 2, 3), (4, 5, 6)] + >>> z + [(1, 4), (2, 5), (3, 6)] + >>> x == z + 1 + + It is not possible to reverse zip this way when the sequences are + not all the same length. + + Reference Implementation *************** *** 196,199 **** --- 216,221 ---- def __getitem__(self, i): + if not self.__sequences: + raise IndexError ret = [] exhausted = 0 *************** *** 219,222 **** --- 241,246 ---- if shortest < 0 or slen < shortest: shortest = slen + if shortest < 0: + return 0 return shortest longest = 0 *************** *** 227,230 **** --- 251,278 ---- return longest + def __cmp__(self, other): + i = 0 + smore = 1 + omore = 1 + while 1: + try: + si = self[i] + except IndexError: + smore = 0 + try: + oi = other[i] + except IndexError: + omore = 0 + if not smore and not omore: + return 0 + elif not smore: + return -1 + elif not omore: + return 1 + test = cmp(si, oi) + if test: + return test + i = i + 1 + def __str__(self): ret = [] *************** *** 336,340 **** 3) Raises TypeError ! Pros: None Cons: needless restriction --- 384,389 ---- 3) Raises TypeError ! Pros: zip(a) doesn't make much sense and could be confusing ! to explain. Cons: needless restriction *************** *** 346,352 **** (but are not limited to!): marry, weave, parallel, lace, braid, interlace, permute, furl, tuples, lists, stitch, collate, knit, ! plait, and with. All have disadvantages, and there is no clear ! unanimous choice, therefore the decision was made to go with ! `zip' because the same functionality is available in other languages (e.g. Haskell) under the name `zip'[2]. --- 395,401 ---- (but are not limited to!): marry, weave, parallel, lace, braid, interlace, permute, furl, tuples, lists, stitch, collate, knit, ! plait, fold, and with. All have disadvantages, and there is no ! clear unanimous choice, therefore the decision was made to go ! with `zip' because the same functionality is available in other languages (e.g. Haskell) under the name `zip'[2]. From python-dev@python.org Wed Jul 19 10:46:17 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Wed, 19 Jul 2000 02:46:17 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html sf-faq.html,1.5,1.6 Message-ID: <200007190946.CAA06006@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv5970 Modified Files: sf-faq.html Log Message: added Macintosh section. sad thing. Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** sf-faq.html 2000/07/18 21:43:23 1.5 --- sf-faq.html 2000/07/19 09:46:13 1.6 *************** *** 48,51 **** --- 48,56 ----
    +

    5. Macintosh

    +
      +
    1. How to use cvs over ssh?
    2. +
    +

    A. Appendix

      *************** *** 413,416 **** --- 418,432 ----
      cvs co python
      + +

      5. Macintosh

      + +

      5.1.:

      + +

      Q: How to use cvs over ssh?

      + +

      A:

      + As far as we know it is currently quite impossible to use cvs over ssh.
      + Any reports of getting it to work and/or pointers to more info would be + appreciated!

      A. Appendix

      From python-dev@python.org Wed Jul 19 15:34:17 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 19 Jul 2000 07:34:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.154,2.155 Message-ID: <200007191434.HAA10030@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv9966 Modified Files: posixmodule.c Log Message: new method isatty from Thomas Wouters Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.154 retrieving revision 2.155 diff -C2 -r2.154 -r2.155 *** posixmodule.c 2000/07/16 12:04:31 2.154 --- posixmodule.c 2000/07/19 14:34:14 2.155 *************** *** 3245,3249 **** --- 3245,3264 ---- } + static char posix_isatty__doc__[] = + "isatty(fd) -> Boolean\n\ + Return true if the file descriptor 'fd' is an open file descriptor\n\ + connected to a terminal."; + static PyObject * + posix_isatty(self, args) + PyObject *self; + PyObject *args; + { + int fd; + if (!PyArg_ParseTuple(args, "i:isatty", &fd)) + return NULL; + return Py_BuildValue("i", isatty(fd)); + } + #ifdef HAVE_PIPE static char posix_pipe__doc__[] = *************** *** 5039,5042 **** --- 5054,5058 ---- {"fstat", posix_fstat, METH_VARARGS, posix_fstat__doc__}, {"fdopen", posix_fdopen, METH_VARARGS, posix_fdopen__doc__}, + {"isatty", posix_isatty, METH_VARARGS, posix_isatty__doc__}, #ifdef HAVE_PIPE {"pipe", posix_pipe, METH_VARARGS, posix_pipe__doc__}, From python-dev@python.org Wed Jul 19 15:45:42 2000 From: python-dev@python.org (Thomas Wouters) Date: Wed, 19 Jul 2000 07:45:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.155,2.156 Message-ID: <200007191445.HAA12805@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv12710/Modules Modified Files: posixmodule.c Log Message: ANSIfy the just-checked-in isatty() wrapper. Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.155 retrieving revision 2.156 diff -C2 -r2.155 -r2.156 *** posixmodule.c 2000/07/19 14:34:14 2.155 --- posixmodule.c 2000/07/19 14:45:40 2.156 *************** *** 3251,3257 **** static PyObject * ! posix_isatty(self, args) ! PyObject *self; ! PyObject *args; { int fd; --- 3251,3255 ---- static PyObject * ! posix_isatty(PyObject *self, PyObject *args) { int fd; From python-dev@python.org Wed Jul 19 15:51:57 2000 From: python-dev@python.org (Thomas Wouters) Date: Wed, 19 Jul 2000 07:51:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_openpty.py,1.1,1.2 test_pty.py,1.2,1.3 Message-ID: <200007191451.HAA13863@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv13627/Lib/test Modified Files: test_openpty.py test_pty.py Log Message: Enable extra testing now that os.isatty() is in. (Also tests os.isatty ;P) Index: test_openpty.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_openpty.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_openpty.py 2000/07/01 01:13:31 1.1 --- test_openpty.py 2000/07/19 14:51:54 1.2 *************** *** 13,21 **** raise ImportError, "No openpty() available." ! ## # Please uncomment these if os.isatty() is added. ! ## if not os.isatty(master): ! ## raise TestFailed, "Master-end of pty is not a terminal." ! ## if not os.isatty(slave): ! ## raise TestFailed, "Slave-end of pty is not a terminal." os.write(slave, 'Ping!') --- 13,20 ---- raise ImportError, "No openpty() available." ! if not os.isatty(master): ! raise TestFailed, "Master-end of pty is not a terminal." ! if not os.isatty(slave): ! raise TestFailed, "Slave-end of pty is not a terminal." os.write(slave, 'Ping!') Index: test_pty.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_pty.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** test_pty.py 2000/07/16 12:04:31 1.2 --- test_pty.py 2000/07/19 14:51:54 1.3 *************** *** 28,36 **** raise ImportError, "Pseudo-terminals (seemingly) not functional." ! ## # Please uncomment these if os.isatty() is added. ! ## if not os.isatty(master_fd): ! ## raise TestFailed, "master_fd is not a tty" ! ## if not os.isatty(slave_fd): ! ## raise TestFailed, "slave_fd is not a tty" debug("Writing to slave_fd") --- 28,35 ---- raise ImportError, "Pseudo-terminals (seemingly) not functional." ! if not os.isatty(master_fd): ! raise TestFailed, "master_fd is not a tty" ! if not os.isatty(slave_fd): ! raise TestFailed, "slave_fd is not a tty" debug("Writing to slave_fd") From python-dev@python.org Wed Jul 19 17:54:56 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 19 Jul 2000 09:54:56 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules readline.c,2.21,2.22 Message-ID: <200007191654.JAA09432@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv9408 Modified Files: readline.c Log Message: added history file truncation based upon code from Johannes Zellner. Index: readline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** readline.c 2000/07/10 09:53:12 2.21 --- readline.c 2000/07/19 16:54:53 2.22 *************** *** 106,109 **** --- 106,110 ---- } + static int history_length = -1; /* do not truncate history by default */ static char doc_read_history_file[] = "\ read_history_file([filename]) -> None\n\ *************** *** 122,125 **** --- 123,128 ---- return NULL; errno = write_history(s); + if (!errno && history_length >= 0) + history_truncate_file(s, history_length); if (errno) return PyErr_SetFromErrno(PyExc_IOError); *************** *** 135,138 **** --- 138,178 ---- + static char set_history_length_doc[] = "\ + set_history_length(length) -> None\n\ + set the maximal number of items which will be written to\n\ + the history file. A negative length is used to inhibit\n\ + history truncation.\n\ + "; + + static PyObject* + set_history_length(PyObject *self, PyObject *args) + { + int length = history_length; + PyObject* ob; + if (!PyArg_ParseTuple(args, "i:set_history_length", &length)) + return NULL; + history_length = length; + Py_INCREF(Py_None); + return Py_None; + } + + + + static char get_history_length_doc[] = "\ + get_history_length() -> int\n\ + return the current history length value.\n\ + "; + + static PyObject* + get_history_length(PyObject *self, PyObject *args) + { + PyObject* ob; + if (!PyArg_ParseTuple(args, ":get_history_length")) + return NULL; + return Py_BuildValue("i", history_length); + } + + + /* Exported function to specify a word completer in Python */ *************** *** 290,293 **** --- 330,335 ---- {"read_history_file", read_history_file, 1, doc_read_history_file}, {"write_history_file", write_history_file, 1, doc_write_history_file}, + {"set_history_length", set_history_length, 1, set_history_length_doc}, + {"get_history_length", get_history_length, 1, get_history_length_doc}, {"set_completer", set_completer, 1, doc_set_completer}, {"get_begidx", get_begidx, 0, doc_get_begidx}, From python-dev@python.org Wed Jul 19 17:56:28 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 19 Jul 2000 09:56:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libreadline.tex,1.2,1.3 Message-ID: <200007191656.JAA09545@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9535 Modified Files: libreadline.tex Log Message: added documentation for new functions {get,set}_history_length Index: libreadline.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libreadline.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libreadline.tex 2000/07/06 04:51:04 1.2 --- libreadline.tex 2000/07/19 16:56:26 1.3 *************** *** 43,46 **** --- 43,57 ---- \end{funcdesc} + \begin{funcdesc}{get_history_length}{} + Return the desired length of the history file. Negative values imply + unlimited history file size. + \end{funcdesc} + + \begin{funcdesc}{set_history_length}{length} + Set the number of lines to save in the history file. + \func{write_history_file} uses this value to truncate the history file when + saving. Negative values imply unlimited history file size. + \end{funcdesc} + \begin{funcdesc}{set_completer}{\optional{function}} Set or remove the completer function. The completer function is From python-dev@python.org Wed Jul 19 18:09:55 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 19 Jul 2000 10:09:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib posixpath.py,1.33,1.34 Message-ID: <200007191709.KAA17265@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv17257 Modified Files: posixpath.py Log Message: added rewritten normpath from Moshe Zadka that does the right thing with paths containing .. Index: posixpath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/posixpath.py,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -r1.33 -r1.34 *** posixpath.py 2000/07/16 16:52:45 1.33 --- posixpath.py 2000/07/19 17:09:51 1.34 *************** *** 347,374 **** def normpath(path): """Normalize path, eliminating double slashes, etc.""" import string ! # Treat initial slashes specially ! slashes = '' ! while path[:1] == '/': ! slashes = slashes + '/' ! path = path[1:] ! comps = string.splitfields(path, '/') ! i = 0 ! while i < len(comps): ! if comps[i] == '.': ! del comps[i] ! while i < len(comps) and comps[i] == '': ! del comps[i] ! elif comps[i] == '..' and i > 0 and comps[i-1] not in ('', '..'): ! del comps[i-1:i+1] ! i = i-1 ! elif comps[i] == '' and i > 0 and comps[i-1] <> '': ! del comps[i] ! else: ! i = i+1 ! # If the path is now empty, substitute '.' ! if not comps and not slashes: ! comps.append('.') ! return slashes + string.joinfields(comps, '/') --- 347,369 ---- def normpath(path): """Normalize path, eliminating double slashes, etc.""" + if path == '': + return '.' import string ! initial_slash = (path[0] == '/') ! comps = string.split(path, '/') ! new_comps = [] ! for comp in comps: ! if comp in ('', '.'): ! continue ! if (comp != '..' or (not initial_slash and not new_comps) or ! (new_comps and new_comps[-1] == '..')): ! new_comps.append(comp) ! elif new_comps: ! new_comps.pop() ! comps = new_comps ! path = string.join(comps, '/') ! if initial_slash: ! path = '/' + path ! return path or '.' From python-dev@python.org Wed Jul 19 18:14:51 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 19 Jul 2000 10:14:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_support.py,1.5,1.6 Message-ID: <200007191714.KAA17574@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv17566 Modified Files: test_support.py Log Message: make TestFailed a class exception Index: test_support.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_support.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_support.py 1998/06/09 19:20:12 1.5 --- test_support.py 2000/07/19 17:14:48 1.6 *************** *** 1,5 **** # Python test set -- supporting definitions. ! TestFailed = 'test_support -- test failed' # Exception verbose = 1 # Flag set to 0 by regrtest.py --- 1,6 ---- # Python test set -- supporting definitions. ! class TestFailed(Exception): ! pass verbose = 1 # Flag set to 0 by regrtest.py From python-dev@python.org Wed Jul 19 18:19:51 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 19 Jul 2000 10:19:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test README,1.1,1.2 Message-ID: <200007191719.KAA17827@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv17819 Modified Files: README Log Message: restructured a bit and added some more content... Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** README 2000/06/30 06:08:35 1.1 --- README 2000/07/19 17:19:49 1.2 *************** *** 1,40 **** ! Writing Python Test Cases ! ------------------------- Skip Montanaro If you add a new module to Python or modify the functionality of an existing ! module, it is your responsibility to write one or more test cases to test ! that new functionality. The mechanics of the test system are fairly ! straightforward. If you are writing test cases for module zyzzyx, you need ! to create a file in .../Lib/test named test_zyzzyx.py and an expected output ! file in .../Lib/test/output named test_zyzzyx ("..." represents the ! top-level directory in the Python source tree, the directory containing the ! configure script). Generate the initial version of the test output file by ! executing: ! cd .../Lib/test ! python regrtest.py -g test_zyzzyx.py ! Any time you modify test_zyzzyx.py you need to generate a new expected output file. Don't forget to desk check the generated output to make sure it's really what you expected to find! To run a single test after modifying a module, simply run regrtest.py without the -g flag: ! cd .../Lib/test ! python regrtest.py test_zyzzyx.py To run the entire test suite, make the "test" target at the top level: - cd ... make test - Test cases generate output based upon computed values and branches taken in - the code. When executed, regrtest.py compares the actual output generated - by executing the test case with the expected output and reports success or - failure. It stands to reason that if the actual and expected outputs are to - match, they must not contain any machine dependencies. This means - your test cases should not print out absolute machine addresses or floating - point numbers with large numbers of significant digits. Writing good test cases is a skilled task and is too complex to discuss in detail in this short document. Many books have been written on the subject. --- 1,73 ---- ! Writing Python Regression Tests ! ------------------------------- Skip Montanaro + (skip@mojam.com) + + Introduction + If you add a new module to Python or modify the functionality of an existing ! module, you should write one or more test cases to exercise that new ! functionality. The mechanics of how the test system operates are fairly ! straightforward. When a test case is run, the output is compared with the ! expected output that is stored in .../Lib/test/output. If the test runs to ! completion and the actual and expected outputs match, the test succeeds, if ! not, it fails. If an ImportError is raised, the test is not run. ! ! You will be writing unit tests (isolated tests of functions and objects ! defined by the module) using white box techniques. Unlike black box ! testing, where you only have the external interfaces to guide your test case ! writing, in white box testing you can see the code being tested and tailor ! your test cases to exercise it more completely. In particular, you will be ! able to refer to the C and Python code in the CVS repository when writing ! your regression test cases. ! ! ! Executing Test Cases ! ! If you are writing test cases for module spam, you need to create a file ! in .../Lib/test named test_spam.py and an expected output file in ! .../Lib/test/output named test_spam ("..." represents the top-level ! directory in the Python source tree, the directory containing the configure ! script). From the top-level directory, generate the initial version of the ! test output file by executing: ! ./python Lib/test/regrtest.py -g test_spam.py ! Any time you modify test_spam.py you need to generate a new expected output file. Don't forget to desk check the generated output to make sure it's really what you expected to find! To run a single test after modifying a module, simply run regrtest.py without the -g flag: + + ./python Lib/test/regrtest.py test_spam.py + + While debugging a regression test, you can of course execute it + independently of the regression testing framework and see what it prints: ! ./python Lib/test/test_spam.py To run the entire test suite, make the "test" target at the top level: make test + + On non-Unix platforms where make may not be available, you can simply + execute the two runs of regrtest (optimized and non-optimized) directly: + + ./python Lib/test/regrtest.py + ./python -O Lib/test/regrtest.py + + + Test cases generate output based upon values computed by the test code. + When executed, regrtest.py compares the actual output generated by executing + the test case with the expected output and reports success or failure. It + stands to reason that if the actual and expected outputs are to match, they + must not contain any machine dependencies. This means your test cases + should not print out absolute machine addresses (e.g. the return value of + the id() builtin function) or floating point numbers with large numbers of + significant digits (unless you understand what you are doing!). + Test Case Writing Tips + Writing good test cases is a skilled task and is too complex to discuss in detail in this short document. Many books have been written on the subject. *************** *** 47,77 **** or find it used (around $20), I strongly urge you to pick up a copy. - As an author of at least part of a module, you will be writing unit tests - (isolated tests of functions and objects defined by the module) using white - box techniques. (Unlike black box testing, where you only have the external - interfaces to guide your test case writing, in white box testing you can see - the code being tested and tailor your test cases to exercise it more - completely). - The most important goal when writing test cases is to break things. A test ! case that doesn't uncover a bug is less valuable than one that does. In ! designing test cases you should pay attention to the following: ! 1. Your test cases should exercise all the functions and objects defined ! in the module, not just the ones meant to be called by users of your ! module. This may require you to write test code that uses the module ! in ways you don't expect (explicitly calling internal functions, for ! example - see test_atexit.py). ! ! 2. You should consider any boundary values that may tickle exceptional ! conditions (e.g. if you were testing a division module you might well ! want to generate tests with numerators and denominators at the limits ! of floating point and integer numbers on the machine performing the ! tests as well as a denominator of zero). ! ! 3. You should exercise as many paths through the code as possible. This ! may not always be possible, but is a goal to strive for. In ! particular, when considering if statements (or their equivalent), you ! want to create test cases that exercise both the true and false ! branches. For while and for statements, you should create test cases ! that exercise the loop zero, one and multiple times. --- 80,166 ---- or find it used (around $20), I strongly urge you to pick up a copy. The most important goal when writing test cases is to break things. A test ! case that doesn't uncover a bug is much less valuable than one that does. ! In designing test cases you should pay attention to the following: ! ! * Your test cases should exercise all the functions and objects defined ! in the module, not just the ones meant to be called by users of your ! module. This may require you to write test code that uses the module ! in ways you don't expect (explicitly calling internal functions, for ! example - see test_atexit.py). ! ! * You should consider any boundary values that may tickle exceptional ! conditions (e.g. if you were writing regression tests for division, ! you might well want to generate tests with numerators and denominators ! at the limits of floating point and integer numbers on the machine ! performing the tests as well as a denominator of zero). ! ! * You should exercise as many paths through the code as possible. This ! may not always be possible, but is a goal to strive for. In ! particular, when considering if statements (or their equivalent), you ! want to create test cases that exercise both the true and false ! branches. For loops, you should create test cases that exercise the ! loop zero, one and multiple times. ! ! * You should test with obviously invalid input. If you know that a ! function requires an integer input, try calling it with other types of ! objects to see how it responds. ! ! * You should test with obviously out-of-range input. If the domain of a ! function is only defined for positive integers, try calling it with a ! negative integer. ! ! * If you are going to fix a bug that wasn't uncovered by an existing ! test, try to write a test case that exposes the bug (preferably before ! fixing it). ! ! ! Regression Test Writing Rules ! ! Each test case is different. There is no "standard" form for a Python ! regression test case, though there are some general rules: ! ! * If your test case detects a failure, raise TestFailed (found in ! test_support). ! ! * Import everything you'll need as early as possible. ! ! * If you'll be importing objects from a module that is at least ! partially platform-dependent, only import those objects you need for ! the current test case to avoid spurious ImportError exceptions that ! prevent the test from running to completion. ! ! * Print all your test case results using the print statement. For ! non-fatal errors, print an error message (or omit a successful ! completion print) to indicate the failure, but proceed instead of ! raising TestFailed. ! ! ! Miscellaneous ! ! There is a test_support module you can import from your test case. It ! provides the following useful objects: ! ! * TestFailed - raise this exception when your regression test detects a ! failure. ! ! * findfile(file) - you can call this function to locate a file somewhere ! along sys.path or in the Lib/test tree - see test_linuxaudiodev.py for ! an example of its use. ! ! * verbose - you can use this variable to control print output. Many ! modules use it. Search for "verbose" in the test_*.py files to see ! lots of examples. ! ! * fcmp(x,y) - you can call this function to compare two floating point ! numbers when you expect them to only be approximately equal withing a ! fuzz factor (test_support.FUZZ, which defaults to 1e-6). ! ! Python and C statement coverage results are currently available at ! ! http://www.musi-cal.com/~skip/python/Python/dist/src/ ! As of this writing (July, 2000) these results are being generated nightly. ! You can refer to the summaries and the test coverage output files to see ! where coverage is adequate or lacking and write test cases to beef up the ! coverage. From python-dev@python.org Wed Jul 19 18:31:01 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 19 Jul 2000 10:31:01 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libos.tex,1.44,1.45 Message-ID: <200007191731.KAA18467@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv18452 Modified Files: libos.tex Log Message: added doc for isatty() Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -r1.44 -r1.45 *** libos.tex 2000/07/16 19:01:09 1.44 --- libos.tex 2000/07/19 17:30:58 1.45 *************** *** 361,364 **** --- 361,370 ---- \end{funcdesc} + \begin{funcdesc}{isatty}{fd} + Return \code{1} if the file descriptor \var{fd} is open and connected to a + tty(-like) device, else \code{0}. + Availability: \UNIX{} + \end{funcdesc} + \begin{funcdesc}{lseek}{fd, pos, how} Set the current position of file descriptor \var{fd} to position From python-dev@python.org Thu Jul 20 16:15:07 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Thu, 20 Jul 2000 08:15:07 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html sf-faq.html,1.6,1.7 Message-ID: <200007201515.IAA23158@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv23113 Modified Files: sf-faq.html Log Message: added entry about reverting of changes Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** sf-faq.html 2000/07/19 09:46:13 1.6 --- sf-faq.html 2000/07/20 15:15:04 1.7 *************** *** 33,36 **** --- 33,37 ----
    1. Where can I learn more about CVS?
    2. How can I remove a directory from the CVS tree?
    3. +
    4. How to revert changes?
    *************** *** 304,307 **** --- 305,324 ---- cd ..
    cvs update -P + +

    2.6.:

    + +

    Q: How to revert changes?

    + +

    A:

    + The fast (and history-friendly) method for backing out a CVS commit is the use + of the join flag of the update command. You supply the last + version you committed (and probably messed up) with the first and the version + you want to back out to with the second flag. Example given: + +
    + cvs update -j 1.17 -j 1.16 ceval.c cvs update cvs + commit ceval.c
    + This example would create and apply a reverse patch from revision 1.17 to + revision 1.16 of ceval.c.

    3. Patches

    From python-dev@python.org Thu Jul 20 16:17:37 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Thu, 20 Jul 2000 08:17:37 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html sf-faq.html,1.7,1.8 Message-ID: <200007201517.IAA23309@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv23284 Modified Files: sf-faq.html Log Message: forgot some line breaks :-/ Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** sf-faq.html 2000/07/20 15:15:04 1.7 --- sf-faq.html 2000/07/20 15:17:34 1.8 *************** *** 317,322 ****
    ! cvs update -j 1.17 -j 1.16 ceval.c cvs update cvs ! commit ceval.c
    This example would create and apply a reverse patch from revision 1.17 to revision 1.16 of ceval.c. --- 317,324 ----
    ! cvs update -j 1.17 -j 1.16 ceval.c
    ! cvs update
    ! cvs commit ceval.c
    ! This example would create and apply a reverse patch from revision 1.17 to revision 1.16 of ceval.c. From python-dev@python.org Thu Jul 20 23:29:27 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Thu, 20 Jul 2000 15:29:27 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep2html.py,NONE,1.1 Message-ID: <200007202229.PAA15860@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv15791 Added Files: pep2html.py Log Message: converts pep-*.txt to pep-*.html and loads them up with the help of scp it would be nice if you could call it after committing changes on a pep Syntax: python pep2html [sf_username] --- NEW FILE --- #!/usr/bin/env python """ convert PEP's to (X)HTML - courtesy of /F Syntax: pep2html [sf_username] The user name 'sf_username' is used to upload the converted files to the web pages at source forge. """ import cgi, glob, os, re, sys fixpat = re.compile("((http|ftp):[-_a-zA-Z0-9/.+?~:#$]+)|(pep-\d+(.txt)?)|.") def fixanchor(match): text = match.group(0) link = None if text[:5] == "http:" or text[:4] == "ftp:": link = text elif text[:3] == "pep": link = os.path.splitext(text)[0] + ".html" if link: return "%s" % (link, cgi.escape(link)) return cgi.escape(match.group(0)) def fixfile(infile, outfile): # convert plain text pep to minimal XHTML markup fi = open(infile) fo = open(outfile, "w") fo.write("\n") # head header = [] fo.write("\n") while 1: line = fi.readline() if not line or ":" not in line: break key, value = line.split(":", 1) value = value.strip() header.append((key, value)) if key.lower() == "title": fo.write("%s\n" % cgi.escape(value)) fo.write("\n") # body fo.write("\n") fo.write("
    \n")
        for k, v in header:
            fo.write("%s: %s\n" % (cgi.escape(k), cgi.escape(v)))
        title = 0
        while 1:
            line = fi.readline()
            if not line:
                break
            if line[:1] == "\f":
                fo.write("
    \n") title = 1 else: line = fixpat.sub(fixanchor, line) if title: fo.write("

    %s

    \n" % line) else: fo.write(line) title = 0 fo.write("
    \n") fo.write("\n") fo.write("\n") for file in glob.glob("pep-*.txt"): print file, "..." fixfile(file, os.path.splitext(file)[0] + ".html") if len(sys.argv) == 1: username = "" elif len(sys.argv) == 2: username = sys.argv[1]+"@" else: raise "Syntax: "+sys.argv[0]+" [sf_username]" os.system("scp pep-*.html "+username+"shell.sourceforge.net:/home/groups/python/htdocs/peps") From python-dev@python.org Thu Jul 20 23:30:07 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Thu, 20 Jul 2000 15:30:07 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html index.html,1.1,1.2 Message-ID: <200007202230.PAA15925@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv15885 Modified Files: index.html Log Message: added link to PEPs Index: index.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/index.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** index.html 2000/07/14 09:00:06 1.1 --- index.html 2000/07/20 22:30:04 1.2 *************** *** 69,72 **** --- 69,90 ---- + +

    PYTHON ENHANCEMENT PROPOSALS

    + + + + + + + +

    This is the definitive collection of proposed + enhancements for Python. These include:

    +
      +
    • List Comprehension
    • +
    • Augmented Assignment
    • +
    • 2.0 Batteries Included
    • +
    +
    From python-dev@python.org Thu Jul 20 23:44:38 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Thu, 20 Jul 2000 15:44:38 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep2html.py,1.1,1.2 Message-ID: <200007202244.PAA17191@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv17109 Modified Files: pep2html.py Log Message: incorporating changes from /F not including pep-0000.txt -> index.html (a symbolic link does just fine) Index: pep2html.py =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep2html.py 2000/07/20 22:29:24 1.1 --- pep2html.py 2000/07/20 22:44:36 1.2 *************** *** 11,16 **** import cgi, glob, os, re, sys ! fixpat = re.compile("((http|ftp):[-_a-zA-Z0-9/.+?~:#$]+)|(pep-\d+(.txt)?)|.") def fixanchor(match): text = match.group(0) --- 11,22 ---- import cgi, glob, os, re, sys ! # this doesn't validate -- you cannot use
    and

    inside
    ! # tags.  but if I change that, the result doesn't look very nice...
      
    + DTD = ('')
    + 
    + fixpat = re.compile("((http|ftp):[-_a-zA-Z0-9/.+~:?#$=&]+)|(pep-\d+(.txt)?)|.")
    + 
      def fixanchor(match):
          text = match.group(0)
    ***************
    *** 22,26 ****
          if link:
              return "%s" % (link, cgi.escape(link))
    !     return cgi.escape(match.group(0))
      
      def fixfile(infile, outfile):
    --- 28,32 ----
          if link:
              return "%s" % (link, cgi.escape(link))
    !     return cgi.escape(match.group(0)) # really slow, but it works...
      
      def fixfile(infile, outfile):
    ***************
    *** 28,35 ****
          fi = open(infile)
          fo = open(outfile, "w")
    !     fo.write("\n")
          # head
          header = []
          fo.write("\n")
          while 1:
              line = fi.readline()
    --- 34,43 ----
          fi = open(infile)
          fo = open(outfile, "w")
    !     fo.write("%s\n\n" % DTD)
          # head
          header = []
          fo.write("\n")
    +     pep = ""
    +     title = ""
          while 1:
              line = fi.readline()
    ***************
    *** 40,48 ****
              header.append((key, value))
              if key.lower() == "title":
    !             fo.write("%s\n" % cgi.escape(value))
          fo.write("\n")
          # body
          fo.write("\n")
          fo.write("
    \n")
          for k, v in header:
              fo.write("%s: %s\n" % (cgi.escape(k), cgi.escape(v)))
    --- 48,67 ----
              header.append((key, value))
              if key.lower() == "title":
    !             title = value
    !         if key.lower() == "pep":
    !             pep = value
    !     if pep:
    !         title = "PEP " + pep + " -- " + title
    !     if title:
    !         fo.write("%s\n" % cgi.escape(title))
          fo.write("\n")
          # body
          fo.write("\n")
          fo.write("
    \n")
    +     fo.write("[home]")
    +     if os.path.basename(file) != "pep-0000.txt":
    +         fo.write(" [index]")
    +     fo.write("\n
    \n") + # fo.write("\n

    \n")
          for k, v in header:
              fo.write("%s: %s\n" % (cgi.escape(k), cgi.escape(v)))
    ***************
    *** 53,65 ****
                  break
              if line[:1] == "\f":
    !             fo.write("
    \n") title = 1 ! else: line = fixpat.sub(fixanchor, line) if title: ! fo.write("

    %s

    \n" % line) else: fo.write(line) - title = 0 fo.write("
    \n") fo.write("\n") --- 72,89 ---- break if line[:1] == "\f": ! fo.write("\n
    \n") ! # fo.write("\n

    \n")
                  title = 1
    !         elif title >= 0:
                  line = fixpat.sub(fixanchor, line)
                  if title:
    !                 if line.strip() == "Local Variables:":
    !                     title = -1
    !                 else:
    !                     fo.write("

    %s

    \n" % line) ! # fo.write("

    %s

    \n" % line)
    !                     title = 0
                  else:
                      fo.write(line)
          fo.write("
    \n") fo.write("\n") From python-dev@python.org Fri Jul 21 06:20:01 2000 From: python-dev@python.org (Thomas Wouters) Date: Thu, 20 Jul 2000 22:20:01 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib ConfigParser.py,1.20,1.21 Message-ID: <200007210520.WAA30775@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv30737/Lib Modified Files: ConfigParser.py Log Message: Small fixes by Petru Paler (patch #100946) checked in with esr's approval. Index: ConfigParser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ConfigParser.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** ConfigParser.py 2000/07/14 14:28:22 1.20 --- ConfigParser.py 2000/07/21 05:19:59 1.21 *************** *** 338,342 **** fp.write("\n") ! def remove_option(section, option): """Remove an option.""" if not section or section == "DEFAULT": --- 338,342 ---- fp.write("\n") ! def remove_option(self, section, option): """Remove an option.""" if not section or section == "DEFAULT": *************** *** 352,356 **** return existed ! def remove_section(section): """Remove a file section.""" if self.__sections.has_key(section): --- 352,356 ---- return existed ! def remove_section(self, section): """Remove a file section.""" if self.__sections.has_key(section): From python-dev@python.org Fri Jul 21 07:00:20 2000 From: python-dev@python.org (Thomas Wouters) Date: Thu, 20 Jul 2000 23:00:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _codecsmodule.c,2.3,2.4 _cursesmodule.c,2.31,2.32 _localemodule.c,2.12,2.13 _sre.c,2.26,2.27 _tkinter.c,1.107,1.108 almodule.c,1.29,1.30 arraymodule.c,2.48,2.49 audioop.c,1.39,1.40 binascii.c,2.21,2.22 cdmodule.c,1.22,1.23 clmodule.c,2.22,2.23 cmathmodule.c,2.15,2.16 cryptmodule.c,2.7,2.8 dlmodule.c,2.10,2.11 errnomodule.c,2.12,2.13 fcntlmodule.c,2.22,2.23 flmodule.c,1.42,1.43 fmmodule.c,1.15,1.16 getbuildinfo.c,2.5,2.6 getpath.c,1.27,1.28 glmodule.c,2.7,2.8 grpmodule.c,2.12,2.13 imageop.c,2.23,2.24 imgfile.c,1.26,1.27 linuxaudiodev.c,2.4,2.5 mathmodule.c,2.50,2.51 md5module.c,2.19,2.20 mpzmodule.c,2.30,2.31 newmodule.c,2.24,2.25 nismodule.c,2.18,2.19 operator.c,2.15,2.16 pcremodule.c,2.22,2.23 posixmodule.c,2.156,2.157 pwdmodule.c,1.20,1.21 readline.c,2.22,2.23 regexmodule.c,1.38,1.39 regexpr.c,1.32,1.33 resource.c,2.14,2.15 rgbimgmodule.c,2.21,2.22 rotormodule.c,2.27,2.28 selectmodule.c,2.38,2.39 sgimodule.c,1.14,1.15 shamodule.c,2.7,2! .8 signalmodule.c,2.46,2.47 socketmodule.c,1.117,1.118 soundex.c,2.7,2.8 stropmodule.c,2.69,2.70 structmodule.c,2.35,2.36 sunaudiodev.c,1.21,1.22 svmodule.c,2.15,2.16 syslogmodule.c,2.15,2.16 tclNotify.c,2.2,2.3 termios.c,2.12,2.13 threadmodule.c,2.34,2.35 timemodule.c,2.91,2.92 timingmodule.c,2.6,2.7 unicodedata.c,2.2,2.3 xxmodule.c,2.19,2.20 zlibmodule.c,2.33,2.34 Message-ID: <200007210600.XAA01507@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv496 Modified Files: _codecsmodule.c _cursesmodule.c _localemodule.c _sre.c _tkinter.c almodule.c arraymodule.c audioop.c binascii.c cdmodule.c clmodule.c cmathmodule.c cryptmodule.c dlmodule.c errnomodule.c fcntlmodule.c flmodule.c fmmodule.c getbuildinfo.c getpath.c glmodule.c grpmodule.c imageop.c imgfile.c linuxaudiodev.c mathmodule.c md5module.c mpzmodule.c newmodule.c nismodule.c operator.c pcremodule.c posixmodule.c pwdmodule.c readline.c regexmodule.c regexpr.c resource.c rgbimgmodule.c rotormodule.c selectmodule.c sgimodule.c shamodule.c signalmodule.c socketmodule.c soundex.c stropmodule.c structmodule.c sunaudiodev.c svmodule.c syslogmodule.c tclNotify.c termios.c threadmodule.c timemodule.c timingmodule.c unicodedata.c xxmodule.c zlibmodule.c Log Message: Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)', and a couple of functions that were missed in the previous batches. Not terribly tested, but very carefully scrutinized, three times. All these were found by the little findkrc.py that I posted to python-dev, which means there might be more lurking. Cases such as this: long func(a, b) long a; long b; /* flagword */ { and other cases where the last ; in the argument list isn't followed by a newline and an opening curly bracket. Regexps to catch all are welcome, of course ;) Index: _codecsmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_codecsmodule.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** _codecsmodule.c 2000/07/05 11:24:13 2.3 --- _codecsmodule.c 2000/07/21 06:00:06 2.4 *************** *** 625,629 **** DL_EXPORT(void) ! init_codecs() { Py_InitModule("_codecs", _codecs_functions); --- 625,629 ---- DL_EXPORT(void) ! init_codecs(void) { Py_InitModule("_codecs", _codecs_functions); Index: _cursesmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v retrieving revision 2.31 retrieving revision 2.32 diff -C2 -r2.31 -r2.32 *** _cursesmodule.c 2000/07/09 14:35:00 2.31 --- _cursesmodule.c 2000/07/21 06:00:06 2.32 *************** *** 1271,1277 **** static PyObject * ! PyCursesWindow_GetAttr(self, name) ! PyCursesWindowObject *self; ! char *name; { return Py_FindMethod(PyCursesWindow_Methods, (PyObject *)self, name); --- 1271,1275 ---- static PyObject * ! PyCursesWindow_GetAttr(PyCursesWindowObject *self, char *name) { return Py_FindMethod(PyCursesWindow_Methods, (PyObject *)self, name); *************** *** 2162,2166 **** void ! init_curses() { PyObject *m, *d, *v; --- 2160,2164 ---- void ! init_curses(void) { PyObject *m, *d, *v; Index: _localemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_localemodule.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** _localemodule.c 2000/07/15 22:31:45 2.12 --- _localemodule.c 2000/07/21 06:00:07 2.13 *************** *** 401,405 **** DL_EXPORT(void) ! init_locale() { PyObject *m, *d, *x; --- 401,405 ---- DL_EXPORT(void) ! init_locale(void) { PyObject *m, *d, *x; Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.26 retrieving revision 2.27 diff -C2 -r2.26 -r2.27 *** _sre.c 2000/07/12 13:05:32 2.26 --- _sre.c 2000/07/21 06:00:07 2.27 *************** *** 2098,2102 **** __declspec(dllexport) #endif ! init_sre() { /* Patch object types */ --- 2098,2102 ---- __declspec(dllexport) #endif ! init_sre(void) { /* Patch object types */ Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.107 retrieving revision 1.108 diff -C2 -r1.107 -r1.108 *** _tkinter.c 2000/07/13 23:59:35 1.107 --- _tkinter.c 2000/07/21 06:00:07 1.108 *************** *** 1913,1919 **** static PyObject * ! Tkinter_Create(self, args) ! PyObject *self; ! PyObject *args; { char *screenName = NULL; --- 1913,1917 ---- static PyObject * ! Tkinter_Create(PyObject *self, PyObject *args) { char *screenName = NULL; *************** *** 1968,1972 **** static int ! EventHook() { #ifndef MS_WINDOWS --- 1966,1970 ---- static int ! EventHook(void) { #ifndef MS_WINDOWS *************** *** 2027,2031 **** static void ! EnableEventHook() { #ifdef WAIT_FOR_STDIN --- 2025,2029 ---- static void ! EnableEventHook(void) { #ifdef WAIT_FOR_STDIN *************** *** 2040,2044 **** static void ! DisableEventHook() { #ifdef WAIT_FOR_STDIN --- 2038,2042 ---- static void ! DisableEventHook(void) { #ifdef WAIT_FOR_STDIN *************** *** 2072,2076 **** DL_EXPORT(void) ! init_tkinter() { PyObject *m, *d; --- 2070,2074 ---- DL_EXPORT(void) ! init_tkinter(void) { PyObject *m, *d; *************** *** 2219,2223 **** */ static ! mac_addlibresources() { if ( !loaded_from_shlib ) --- 2217,2221 ---- */ static ! mac_addlibresources(void) { if ( !loaded_from_shlib ) Index: almodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/almodule.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** almodule.c 2000/07/12 13:05:33 1.29 --- almodule.c 2000/07/21 06:00:07 1.30 *************** *** 2038,2042 **** void ! inital() { PyObject *m, *d, *x; --- 2038,2042 ---- void ! inital(void) { PyObject *m, *d, *x; Index: arraymodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v retrieving revision 2.48 retrieving revision 2.49 diff -C2 -r2.48 -r2.49 *** arraymodule.c 2000/07/13 21:10:57 2.48 --- arraymodule.c 2000/07/21 06:00:07 2.49 *************** *** 1408,1412 **** DL_EXPORT(void) ! initarray() { PyObject *m, *d; --- 1408,1412 ---- DL_EXPORT(void) ! initarray(void) { PyObject *m, *d; Index: audioop.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/audioop.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** audioop.c 2000/07/10 17:15:07 1.39 --- audioop.c 2000/07/21 06:00:07 1.40 *************** *** 285,292 **** } ! static double _sum2(a, b, len) ! short *a; ! short *b; ! int len; { int i; --- 285,289 ---- } ! static double _sum2(short *a, short *b, int len) { int i; *************** *** 900,905 **** static int ! gcd(a, b) ! int a, b; { while (b > 0) { --- 897,901 ---- static int ! gcd(int a, int b) { while (b > 0) { *************** *** 1345,1349 **** DL_EXPORT(void) ! initaudioop() { PyObject *m, *d; --- 1341,1345 ---- DL_EXPORT(void) ! initaudioop(void) { PyObject *m, *d; Index: binascii.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/binascii.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** binascii.c 2000/07/10 09:49:19 2.21 --- binascii.c 2000/07/21 06:00:07 2.22 *************** *** 900,904 **** DL_EXPORT(void) ! initbinascii() { PyObject *m, *d, *x; --- 900,904 ---- DL_EXPORT(void) ! initbinascii(void) { PyObject *m, *d, *x; Index: cdmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cdmodule.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** cdmodule.c 2000/07/10 17:04:33 1.22 --- cdmodule.c 2000/07/21 06:00:07 1.23 *************** *** 767,771 **** void ! initcd() { PyObject *m, *d; --- 767,771 ---- void ! initcd(void) { PyObject *m, *d; Index: clmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/clmodule.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** clmodule.c 2000/06/30 23:58:05 2.22 --- clmodule.c 2000/07/21 06:00:07 2.23 *************** *** 979,983 **** void ! initcl() { PyObject *m, *d, *x; --- 979,983 ---- void ! initcl(void) { PyObject *m, *d, *x; Index: cmathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cmathmodule.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** cmathmodule.c 2000/07/10 09:31:34 2.15 --- cmathmodule.c 2000/07/21 06:00:07 2.16 *************** *** 317,321 **** static PyObject * ! math_error() { if (errno == EDOM) --- 317,321 ---- static PyObject * ! math_error(void) { if (errno == EDOM) *************** *** 395,399 **** DL_EXPORT(void) ! initcmath() { PyObject *m, *d, *v; --- 395,399 ---- DL_EXPORT(void) ! initcmath(void) { PyObject *m, *d, *v; Index: cryptmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cryptmodule.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** cryptmodule.c 2000/07/10 09:51:17 2.7 --- cryptmodule.c 2000/07/21 06:00:07 2.8 *************** *** 37,41 **** DL_EXPORT(void) ! initcrypt() { Py_InitModule("crypt", crypt_methods); --- 37,41 ---- DL_EXPORT(void) ! initcrypt(void) { Py_InitModule("crypt", crypt_methods); Index: dlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/dlmodule.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** dlmodule.c 2000/07/10 11:56:03 2.10 --- dlmodule.c 2000/07/21 06:00:07 2.11 *************** *** 192,196 **** void ! initdl() { PyObject *m, *d, *x; --- 192,196 ---- void ! initdl(void) { PyObject *m, *d, *x; Index: errnomodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/errnomodule.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** errnomodule.c 2000/07/09 15:14:52 2.12 --- errnomodule.c 2000/07/21 06:00:07 2.13 *************** *** 71,75 **** DL_EXPORT(void) ! initerrno() { PyObject *m, *d, *de; --- 71,75 ---- DL_EXPORT(void) ! initerrno(void) { PyObject *m, *d, *de; Index: fcntlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fcntlmodule.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** fcntlmodule.c 2000/07/10 17:10:26 2.22 --- fcntlmodule.c 2000/07/21 06:00:07 2.23 *************** *** 313,317 **** DL_EXPORT(void) ! initfcntl() { PyObject *m, *d; --- 313,317 ---- DL_EXPORT(void) ! initfcntl(void) { PyObject *m, *d; Index: flmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/flmodule.c,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -r1.42 -r1.43 *** flmodule.c 2000/07/16 12:04:31 1.42 --- flmodule.c 2000/07/21 06:00:07 1.43 *************** *** 2134,2138 **** DL_EXPORT(void) ! initfl() { Py_InitModule("fl", forms_methods); --- 2134,2138 ---- DL_EXPORT(void) ! initfl(void) { Py_InitModule("fl", forms_methods); Index: fmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fmmodule.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** fmmodule.c 2000/07/12 10:43:11 1.15 --- fmmodule.c 2000/07/21 06:00:07 1.16 *************** *** 279,283 **** void ! initfm() { Py_InitModule("fm", fm_methods); --- 279,283 ---- void ! initfm(void) { Py_InitModule("fm", fm_methods); Index: getbuildinfo.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/getbuildinfo.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** getbuildinfo.c 1999/08/27 20:39:21 2.5 --- getbuildinfo.c 2000/07/21 06:00:07 2.6 *************** *** 31,35 **** const char * ! Py_GetBuildInfo() { static char buildinfo[50]; --- 31,35 ---- const char * ! Py_GetBuildInfo(void) { static char buildinfo[50]; Index: getpath.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/getpath.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** getpath.c 2000/07/16 12:04:31 1.27 --- getpath.c 2000/07/21 06:00:07 1.28 *************** *** 348,352 **** static void ! calculate_path() { extern char *Py_GetProgramName(); --- 348,352 ---- static void ! calculate_path(void) { extern char *Py_GetProgramName(); *************** *** 573,577 **** char * ! Py_GetPath() { if (!module_search_path) --- 573,577 ---- char * ! Py_GetPath(void) { if (!module_search_path) *************** *** 581,585 **** char * ! Py_GetPrefix() { if (!module_search_path) --- 581,585 ---- char * ! Py_GetPrefix(void) { if (!module_search_path) *************** *** 589,593 **** char * ! Py_GetExecPrefix() { if (!module_search_path) --- 589,593 ---- char * ! Py_GetExecPrefix(void) { if (!module_search_path) *************** *** 597,601 **** char * ! Py_GetProgramFullPath() { if (!module_search_path) --- 597,601 ---- char * ! Py_GetProgramFullPath(void) { if (!module_search_path) Index: glmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/glmodule.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** glmodule.c 2000/07/10 17:04:33 2.7 --- glmodule.c 2000/07/21 06:00:07 2.8 *************** *** 7634,7638 **** void ! initgl() { (void) Py_InitModule("gl", gl_methods); --- 7634,7638 ---- void ! initgl(void) { (void) Py_InitModule("gl", gl_methods); Index: grpmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/grpmodule.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** grpmodule.c 2000/07/08 16:56:26 2.12 --- grpmodule.c 2000/07/21 06:00:07 2.13 *************** *** 133,137 **** DL_EXPORT(void) ! initgrp() { Py_InitModule3("grp", grp_methods, grp__doc__); --- 133,137 ---- DL_EXPORT(void) ! initgrp(void) { Py_InitModule3("grp", grp_methods, grp__doc__); Index: imageop.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/imageop.c,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** imageop.c 2000/07/10 09:55:32 2.23 --- imageop.c 2000/07/21 06:00:07 2.24 *************** *** 707,711 **** DL_EXPORT(void) ! initimageop() { PyObject *m, *d; --- 707,711 ---- DL_EXPORT(void) ! initimageop(void) { PyObject *m, *d; Index: imgfile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/imgfile.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** imgfile.c 2000/07/16 12:04:31 1.26 --- imgfile.c 2000/07/21 06:00:07 1.27 *************** *** 510,514 **** void ! initimgfile() { PyObject *m, *d; --- 510,514 ---- void ! initimgfile(void) { PyObject *m, *d; Index: linuxaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/linuxaudiodev.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** linuxaudiodev.c 2000/07/11 20:30:05 2.4 --- linuxaudiodev.c 2000/07/21 06:00:07 2.5 *************** *** 385,389 **** void ! initlinuxaudiodev() { PyObject *m, *d, *x; --- 385,389 ---- void ! initlinuxaudiodev(void) { PyObject *m, *d, *x; Index: mathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v retrieving revision 2.50 retrieving revision 2.51 diff -C2 -r2.50 -r2.51 *** mathmodule.c 2000/07/03 22:41:34 2.50 --- mathmodule.c 2000/07/21 06:00:07 2.51 *************** *** 39,43 **** static PyObject * ! math_error() { if (errno == EDOM) --- 39,43 ---- static PyObject * ! math_error(void) { if (errno == EDOM) *************** *** 260,264 **** DL_EXPORT(void) ! initmath() { PyObject *m, *d, *v; --- 260,264 ---- DL_EXPORT(void) ! initmath(void) { PyObject *m, *d, *v; Index: md5module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/md5module.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** md5module.c 2000/07/16 12:04:31 2.19 --- md5module.c 2000/07/21 06:00:07 2.20 *************** *** 32,36 **** static md5object * ! newmd5object() { md5object *md5p; --- 32,36 ---- static md5object * ! newmd5object(void) { md5object *md5p; *************** *** 237,241 **** DL_EXPORT(void) ! initmd5() { PyObject *m, *d; --- 237,241 ---- DL_EXPORT(void) ! initmd5(void) { PyObject *m, *d; Index: mpzmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mpzmodule.c,v retrieving revision 2.30 retrieving revision 2.31 diff -C2 -r2.30 -r2.31 *** mpzmodule.c 2000/07/16 12:04:31 2.30 --- mpzmodule.c 2000/07/21 06:00:07 2.31 *************** *** 95,99 **** static mpzobject * ! newmpzobject() { mpzobject *mpzp; --- 95,99 ---- static mpzobject * ! newmpzobject(void) { mpzobject *mpzp; *************** *** 1633,1638 **** #define MP_TEST_SIZE 4 static const char mp_test_magic[MP_TEST_SIZE] = {'\xAA','\xAA','\xAA','\xAA'}; ! static mp_test_error( location ) ! int *location; { /* assumptions: *alloc returns address divisible by 4, --- 1633,1637 ---- #define MP_TEST_SIZE 4 static const char mp_test_magic[MP_TEST_SIZE] = {'\xAA','\xAA','\xAA','\xAA'}; ! static mp_test_error(int *location) { /* assumptions: *alloc returns address divisible by 4, *************** *** 1717,1721 **** DL_EXPORT(void) ! initmpz() { PyObject *module; --- 1716,1720 ---- DL_EXPORT(void) ! initmpz(void) { PyObject *module; Index: newmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/newmodule.c,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -r2.24 -r2.25 *** newmodule.c 2000/07/10 11:56:03 2.24 --- newmodule.c 2000/07/21 06:00:07 2.25 *************** *** 196,200 **** DL_EXPORT(void) ! initnew() { Py_InitModule4("new", new_methods, new_doc, (PyObject *)NULL, --- 196,200 ---- DL_EXPORT(void) ! initnew(void) { Py_InitModule4("new", new_methods, new_doc, (PyObject *)NULL, Index: nismodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/nismodule.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** nismodule.c 2000/07/10 13:12:27 2.18 --- nismodule.c 2000/07/21 06:00:07 2.19 *************** *** 296,300 **** static nismaplist * ! nis_maplist () { nisresp_maplist *list; --- 296,300 ---- static nismaplist * ! nis_maplist (void) { nisresp_maplist *list; *************** *** 372,376 **** void ! initnis () { PyObject *m, *d; --- 372,376 ---- void ! initnis (void) { PyObject *m, *d; Index: operator.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/operator.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** operator.c 2000/07/08 04:53:48 2.15 --- operator.c 2000/07/21 06:00:07 2.16 *************** *** 248,252 **** DL_EXPORT(void) ! initoperator() { /* Create the module and add the functions */ --- 248,252 ---- DL_EXPORT(void) ! initoperator(void) { /* Create the module and add the functions */ Index: pcremodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pcremodule.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** pcremodule.c 2000/07/10 13:12:27 2.22 --- pcremodule.c 2000/07/21 06:00:07 2.23 *************** *** 630,634 **** DL_EXPORT(void) ! initpcre() { PyObject *m, *d; --- 630,634 ---- DL_EXPORT(void) ! initpcre(void) { PyObject *m, *d; Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.156 retrieving revision 2.157 diff -C2 -r2.156 -r2.157 *** posixmodule.c 2000/07/19 14:45:40 2.156 --- posixmodule.c 2000/07/21 06:00:07 2.157 *************** *** 285,289 **** static PyObject * ! convertenviron() { PyObject *d; --- 285,289 ---- static PyObject * ! convertenviron(void) { PyObject *d; *************** *** 345,349 **** static PyObject * ! posix_error() { return PyErr_SetFromErrno(PyExc_OSError); --- 345,349 ---- static PyObject * ! posix_error(void) { return PyErr_SetFromErrno(PyExc_OSError); *************** *** 1917,1923 **** static PyObject * ! posix_getppid(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, ":getppid")) --- 1917,1921 ---- static PyObject * ! posix_getppid(PyObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":getppid")) *************** *** 2857,2861 **** #if defined(PYCC_VACPP) && defined(PYOS_OS2) static long ! system_uptime() { ULONG value = 0; --- 2855,2859 ---- #if defined(PYCC_VACPP) && defined(PYOS_OS2) static long ! system_uptime(void) { ULONG value = 0; *************** *** 5197,5202 **** static int ! all_ins(d) ! PyObject* d; { #ifdef F_OK --- 5195,5199 ---- static int ! all_ins(PyObject *d) { #ifdef F_OK *************** *** 5296,5300 **** DL_EXPORT(void) ! INITFUNC() { PyObject *m, *d, *v; --- 5293,5297 ---- DL_EXPORT(void) ! INITFUNC(void) { PyObject *m, *d, *v; Index: pwdmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pwdmodule.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** pwdmodule.c 2000/07/10 13:12:27 1.20 --- pwdmodule.c 2000/07/21 06:00:07 1.21 *************** *** 138,142 **** DL_EXPORT(void) ! initpwd() { Py_InitModule4("pwd", pwd_methods, pwd__doc__, --- 138,142 ---- DL_EXPORT(void) ! initpwd(void) { Py_InitModule4("pwd", pwd_methods, pwd__doc__, Index: readline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** readline.c 2000/07/19 16:54:53 2.22 --- readline.c 2000/07/21 06:00:07 2.23 *************** *** 397,401 **** static void ! setup_readline() { rl_readline_name = "python"; --- 397,401 ---- static void ! setup_readline(void) { rl_readline_name = "python"; *************** *** 486,490 **** DL_EXPORT(void) ! initreadline() { PyObject *m; --- 486,490 ---- DL_EXPORT(void) ! initreadline(void) { PyObject *m; Index: regexmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/regexmodule.c,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** regexmodule.c 2000/07/12 00:49:17 1.38 --- regexmodule.c 2000/07/21 06:00:07 1.39 *************** *** 658,662 **** DL_EXPORT(void) ! initregex() { PyObject *m, *d, *v; --- 658,662 ---- DL_EXPORT(void) ! initregex(void) { PyObject *m, *d, *v; Index: regexpr.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/regexpr.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** regexpr.c 2000/07/16 12:04:31 1.32 --- regexpr.c 2000/07/21 06:00:07 1.33 *************** *** 447,451 **** unsigned char re_syntax_table[256]; ! void re_compile_initialize() { int a; --- 447,451 ---- unsigned char re_syntax_table[256]; ! void re_compile_initialize(void) { int a; Index: resource.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/resource.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** resource.c 2000/07/16 12:04:31 2.14 --- resource.c 2000/07/21 06:00:07 2.15 *************** *** 184,188 **** } ! void initresource() { PyObject *m, *d; --- 184,188 ---- } ! void initresource(void) { PyObject *m, *d; Index: rgbimgmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/rgbimgmodule.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** rgbimgmodule.c 2000/07/16 12:04:31 2.21 --- rgbimgmodule.c 2000/07/21 06:00:07 2.22 *************** *** 756,760 **** DL_EXPORT(void) ! initrgbimg() { PyObject *m, *d; --- 756,760 ---- DL_EXPORT(void) ! initrgbimg(void) { PyObject *m, *d; Index: rotormodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/rotormodule.c,v retrieving revision 2.27 retrieving revision 2.28 diff -C2 -r2.27 -r2.28 *** rotormodule.c 2000/07/16 12:04:31 2.27 --- rotormodule.c 2000/07/21 06:00:07 2.28 *************** *** 619,623 **** DL_EXPORT(void) ! initrotor() { (void)Py_InitModule("rotor", rotor_methods); --- 619,623 ---- DL_EXPORT(void) ! initrotor(void) { (void)Py_InitModule("rotor", rotor_methods); Index: selectmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v retrieving revision 2.38 retrieving revision 2.39 diff -C2 -r2.38 -r2.39 *** selectmodule.c 2000/07/13 23:59:35 2.38 --- selectmodule.c 2000/07/21 06:00:07 2.39 *************** *** 338,342 **** DL_EXPORT(void) ! initselect() { PyObject *m, *d; --- 338,342 ---- DL_EXPORT(void) ! initselect(void) { PyObject *m, *d; Index: sgimodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sgimodule.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** sgimodule.c 2000/07/10 12:29:26 1.14 --- sgimodule.c 2000/07/21 06:00:07 1.15 *************** *** 60,64 **** void ! initsgi() { Py_InitModule("sgi", sgi_methods); --- 60,64 ---- void ! initsgi(void) { Py_InitModule("sgi", sgi_methods); Index: shamodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/shamodule.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** shamodule.c 2000/07/08 06:41:03 2.7 --- shamodule.c 2000/07/21 06:00:07 2.8 *************** *** 351,355 **** static SHAobject * ! newSHAobject() { return (SHAobject *)PyObject_New(SHAobject, &SHAtype); --- 351,355 ---- static SHAobject * ! newSHAobject(void) { return (SHAobject *)PyObject_New(SHAobject, &SHAtype); *************** *** 539,543 **** void ! initsha() { PyObject *d, *m; --- 539,543 ---- void ! initsha(void) { PyObject *d, *m; Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** signalmodule.c 2000/07/10 12:04:18 2.46 --- signalmodule.c 2000/07/21 06:00:07 2.47 *************** *** 313,317 **** DL_EXPORT(void) ! initsignal() { PyObject *m, *d, *x; --- 313,317 ---- DL_EXPORT(void) ! initsignal(void) { PyObject *m, *d, *x; *************** *** 554,558 **** static void ! finisignal() { int i; --- 554,558 ---- static void ! finisignal(void) { int i; *************** *** 584,588 **** /* Declared in pyerrors.h */ int ! PyErr_CheckSignals() { int i; --- 584,588 ---- /* Declared in pyerrors.h */ int ! PyErr_CheckSignals(void) { int i; *************** *** 624,628 **** */ void ! PyErr_SetInterrupt() { is_tripped++; --- 624,628 ---- */ void ! PyErr_SetInterrupt(void) { is_tripped++; *************** *** 632,636 **** void ! PyOS_InitInterrupts() { initsignal(); --- 632,636 ---- void ! PyOS_InitInterrupts(void) { initsignal(); *************** *** 639,643 **** void ! PyOS_FiniInterrupts() { finisignal(); --- 639,643 ---- void ! PyOS_FiniInterrupts(void) { finisignal(); *************** *** 645,649 **** int ! PyOS_InterruptOccurred() { if (Handlers[SIGINT].tripped) { --- 645,649 ---- int ! PyOS_InterruptOccurred(void) { if (Handlers[SIGINT].tripped) { *************** *** 659,663 **** void ! PyOS_AfterFork() { #ifdef WITH_THREAD --- 659,663 ---- void ! PyOS_AfterFork(void) { #ifdef WITH_THREAD Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.117 retrieving revision 1.118 diff -C2 -r1.117 -r1.118 *** socketmodule.c 2000/07/11 23:00:12 1.117 --- socketmodule.c 2000/07/21 06:00:07 1.118 *************** *** 229,233 **** static PyObject * ! PySocket_Err() { #ifdef MS_WINDOWS --- 229,233 ---- static PyObject * ! PySocket_Err(void) { #ifdef MS_WINDOWS *************** *** 1438,1444 **** static PyObject * ! gethost_common(h, addr) ! struct hostent *h; ! struct sockaddr_in *addr; { char **pch; --- 1438,1442 ---- static PyObject * ! gethost_common(struct hostent *h, struct sockaddr_in *addr) { char **pch; *************** *** 2186,2190 **** static void ! NTcleanup() { WSACleanup(); --- 2184,2188 ---- static void ! NTcleanup(void) { WSACleanup(); *************** *** 2192,2196 **** static int ! NTinit() { WSADATA WSAData; --- 2190,2194 ---- static int ! NTinit(void) { WSADATA WSAData; *************** *** 2226,2230 **** static void ! OS2cleanup() { /* No cleanup is necessary for OS/2 Sockets */ --- 2224,2228 ---- static void ! OS2cleanup(void) { /* No cleanup is necessary for OS/2 Sockets */ *************** *** 2232,2236 **** static int ! OS2init() { char reason[64]; --- 2230,2234 ---- static int ! OS2init(void) { char reason[64]; Index: soundex.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/soundex.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** soundex.c 2000/02/29 13:59:24 2.7 --- soundex.c 2000/07/21 06:00:07 2.8 *************** *** 168,172 **** */ DL_EXPORT(void) ! initsoundex() { (void) Py_InitModule4("soundex", --- 168,172 ---- */ DL_EXPORT(void) ! initsoundex(void) { (void) Py_InitModule4("soundex", Index: stropmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/stropmodule.c,v retrieving revision 2.69 retrieving revision 2.70 diff -C2 -r2.69 -r2.70 *** stropmodule.c 2000/07/16 12:04:31 2.69 --- stropmodule.c 2000/07/21 06:00:07 2.70 *************** *** 1181,1185 **** DL_EXPORT(void) ! initstrop() { PyObject *m, *d, *s; --- 1181,1185 ---- DL_EXPORT(void) ! initstrop(void) { PyObject *m, *d, *s; Index: structmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/structmodule.c,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** structmodule.c 2000/07/10 12:29:26 2.35 --- structmodule.c 2000/07/21 06:00:07 2.36 *************** *** 1223,1227 **** DL_EXPORT(void) ! initstruct() { PyObject *m, *d; --- 1223,1227 ---- DL_EXPORT(void) ! initstruct(void) { PyObject *m, *d; Index: sunaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sunaudiodev.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** sunaudiodev.c 2000/07/16 12:04:31 1.21 --- sunaudiodev.c 2000/07/21 06:00:07 1.22 *************** *** 483,487 **** void ! initsunaudiodev() { PyObject *m, *d; --- 483,487 ---- void ! initsunaudiodev(void) { PyObject *m, *d; Index: svmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/svmodule.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** svmodule.c 2000/07/10 12:43:58 2.15 --- svmodule.c 2000/07/21 06:00:07 2.16 *************** *** 42,46 **** /* Set a SV-specific error from svideo_errno and return NULL */ static PyObject * ! sv_error() { PyErr_SetString(SvError, svStrerror(svideo_errno)); --- 42,46 ---- /* Set a SV-specific error from svideo_errno and return NULL */ static PyObject * ! sv_error(void) { PyErr_SetString(SvError, svStrerror(svideo_errno)); *************** *** 962,966 **** void ! initsv() { PyObject *m, *d; --- 962,966 ---- void ! initsv(void) { PyObject *m, *d; Index: syslogmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/syslogmodule.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** syslogmodule.c 2000/07/16 12:04:31 2.15 --- syslogmodule.c 2000/07/21 06:00:07 2.16 *************** *** 169,173 **** DL_EXPORT(void) ! initsyslog() { PyObject *m, *d; --- 169,173 ---- DL_EXPORT(void) ! initsyslog(void) { PyObject *m, *d; Index: tclNotify.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/tclNotify.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** tclNotify.c 2000/07/16 12:04:31 2.2 --- tclNotify.c 2000/07/21 06:00:07 2.3 *************** *** 101,105 **** static void ! InitNotifier() { initialized = 1; --- 101,105 ---- static void ! InitNotifier(void) { initialized = 1; *************** *** 508,512 **** int ! Tcl_GetServiceMode() { if (!initialized) { --- 508,512 ---- int ! Tcl_GetServiceMode(void) { if (!initialized) { *************** *** 800,804 **** int ! Tcl_ServiceAll() { int result = 0; --- 800,804 ---- int ! Tcl_ServiceAll(void) { int result = 0; *************** *** 895,899 **** int ! PyTcl_WaitUntilEvent() { int flags = TCL_ALL_EVENTS; --- 895,899 ---- int ! PyTcl_WaitUntilEvent(void) { int flags = TCL_ALL_EVENTS; Index: termios.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/termios.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** termios.c 2000/07/10 12:15:54 2.12 --- termios.c 2000/07/21 06:00:07 2.13 *************** *** 289,293 **** DL_EXPORT(void) ! PyInit_termios() { PyObject *m, *d; --- 289,293 ---- DL_EXPORT(void) ! PyInit_termios(void) { PyObject *m, *d; Index: threadmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/threadmodule.c,v retrieving revision 2.34 retrieving revision 2.35 diff -C2 -r2.34 -r2.35 *** threadmodule.c 2000/07/10 10:03:58 2.34 --- threadmodule.c 2000/07/21 06:00:07 2.35 *************** *** 35,39 **** static lockobject * ! newlockobject() { lockobject *self; --- 35,39 ---- static lockobject * ! newlockobject(void) { lockobject *self; *************** *** 378,382 **** DL_EXPORT(void) ! initthread() { PyObject *m, *d; --- 378,382 ---- DL_EXPORT(void) ! initthread(void) { PyObject *m, *d; Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.91 retrieving revision 2.92 diff -C2 -r2.91 -r2.92 *** timemodule.c 2000/07/10 12:15:54 2.91 --- timemodule.c 2000/07/21 06:00:07 2.92 *************** *** 108,112 **** static void ! initmactimezone() { MachineLocation loc; --- 108,112 ---- static void ! initmactimezone(void) { MachineLocation loc; *************** *** 580,584 **** DL_EXPORT(void) ! inittime() { PyObject *m, *d; --- 580,584 ---- DL_EXPORT(void) ! inittime(void) { PyObject *m, *d; *************** *** 668,672 **** static double ! floattime() { /* There are three ways to get the time: --- 668,672 ---- static double ! floattime(void) { /* There are three ways to get the time: Index: timingmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timingmodule.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** timingmodule.c 2000/07/10 12:04:18 2.6 --- timingmodule.c 2000/07/21 06:00:07 2.7 *************** *** 70,74 **** ! DL_EXPORT(void) inittiming() { (void)Py_InitModule("timing", timing_methods); --- 70,74 ---- ! DL_EXPORT(void) inittiming(void) { (void)Py_InitModule("timing", timing_methods); Index: unicodedata.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/unicodedata.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** unicodedata.c 2000/03/31 17:26:09 2.2 --- unicodedata.c 2000/07/21 06:00:07 2.3 *************** *** 274,278 **** DL_EXPORT(void) ! initunicodedata() { Py_InitModule("unicodedata", unicodedata_functions); --- 274,278 ---- DL_EXPORT(void) ! initunicodedata(void) { Py_InitModule("unicodedata", unicodedata_functions); Index: xxmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/xxmodule.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** xxmodule.c 2000/07/10 11:56:03 2.19 --- xxmodule.c 2000/07/21 06:00:07 2.20 *************** *** 203,207 **** DL_EXPORT(void) ! initxx() { PyObject *m, *d; --- 203,207 ---- DL_EXPORT(void) ! initxx(void) { PyObject *m, *d; Index: zlibmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/zlibmodule.c,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -r2.33 -r2.34 *** zlibmodule.c 2000/07/10 09:57:19 2.33 --- zlibmodule.c 2000/07/21 06:00:07 2.34 *************** *** 830,834 **** DL_EXPORT(void) ! PyInit_zlib() { PyObject *m, *d, *ver; --- 830,834 ---- DL_EXPORT(void) ! PyInit_zlib(void) { PyObject *m, *d, *ver; From python-dev@python.org Fri Jul 21 19:13:18 2000 From: python-dev@python.org (Barry Warsaw) Date: Fri, 21 Jul 2000 11:13:18 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0200.txt,1.1,1.2 Message-ID: <200007211813.LAA12850@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv12832 Modified Files: pep-0200.txt Log Message: Moderate first formatting pass of Jeremy's content for this PEP. Index: pep-0200.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0200.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0200.txt 2000/07/13 06:33:08 1.1 --- pep-0200.txt 2000/07/21 18:13:15 1.2 *************** *** 2,6 **** Title: Python 2.0 Release Schedule Version: $Revision$ ! Owner: bwarsaw@beopen.com (Barry A. Warsaw) Python-Version: 2.0 Status: Incomplete --- 2,6 ---- Title: Python 2.0 Release Schedule Version: $Revision$ ! Owner: Jeremy Hylton Python-Version: 2.0 Status: Incomplete *************** *** 14,17 **** --- 14,74 ---- CVS revision history of this file contains the definitive historical record. + + Accepted and completed + + Accepted and in progress + + * SyntaxError enhancements - Fredrik Lundh + http://www.python.org/pipermail/python-dev/2000-July/012981.html + + * interface to poll system call - Andrew Kuchling + An OO interface to the poll system call will be added to the + select module. + + * Compression of Unicode database - Fredrik Lundh + http://hem.passagen.se/eff/bot.htm#456806 + + * SRE - Fredrik Lundh + The test suite still fails on test_re. + + * snprintf - owner??? + Use snprintf to avoid buffer overflows. Need configure hackery + to discovery if it is available on the current platform and a + default implementation if it is not. + http://www.python.org/pipermail/python-dev/2000-April/010051.html + This function is expected to be part of C9X (check). + + * Support for opcode arguments > 2**16 - Charles Waldman + Source files longer than 32K and sequences with more than 32K + elements both fail because opcode arguments are limited to + 16-bit values. + + * Range literals - Thomas Wouters + Make range(1, 10, 2) == [1:10:2] + + Open: proposed but not accepted or declined + + * List comprehensions - Tim Peters? + Need a coherent proposal. Lots of confusing discussion going + on. + + * Eliminated SET_LINENO opcode - Vladimir Marangozov + Small optimization achieved by using the code object's lnotab + instead of the SET_LINENO instruction. Uses code rewriting + technique (that Guido's growns on) to support debugger, which + uses SET_LINENO. + + http://starship.python.net/~vlad/lineno/ + for (working at the time) patches + + Discussions on python-dev: + + - http://www.python.org/pipermail/python-dev/2000-April/subject.html + Subject: "Why do we need Traceback Objects?" + + - http://www.python.org/pipermail/python-dev/1999-August/002252.html + + Declined + From python-dev@python.org Fri Jul 21 19:29:08 2000 From: python-dev@python.org (Barry Warsaw) Date: Fri, 21 Jul 2000 11:29:08 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0200.txt,1.2,1.3 Message-ID: <200007211829.LAA14359@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv14340 Modified Files: pep-0200.txt Log Message: Added Emacs page breaks Index: pep-0200.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0200.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pep-0200.txt 2000/07/21 18:13:15 1.2 --- pep-0200.txt 2000/07/21 18:29:05 1.3 *************** *** 6,9 **** --- 6,11 ---- Status: Incomplete + + Introduction *************** *** 15,20 **** --- 17,26 ---- historical record. + + Accepted and completed + + Accepted and in progress *************** *** 47,50 **** --- 53,58 ---- Make range(1, 10, 2) == [1:10:2] + + Open: proposed but not accepted or declined *************** *** 69,72 **** --- 77,82 ---- - http://www.python.org/pipermail/python-dev/1999-August/002252.html + + Declined From python-dev@python.org Fri Jul 21 21:03:20 2000 From: python-dev@python.org (Barry Warsaw) Date: Fri, 21 Jul 2000 13:03:20 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.7,1.8 Message-ID: <200007212003.NAA02595@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv2581 Modified Files: pep-0000.txt Log Message: Added PEP 212, Additional Builtin Generators, assigned bwarsaw Added PEP 213, Attribute Access Handlers, assigned prescod Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** pep-0000.txt 2000/07/15 23:26:36 1.7 --- pep-0000.txt 2000/07/21 20:03:17 1.8 *************** *** 31,34 **** --- 31,37 ---- 210 pep-0210.txt Decoupling the Interpreter Loop davida 211 pep-0211.txt Adding New Operators to Python gvwilson + 212 pep-0212.txt Additional Builtin Generators bwarsaw + 213 pep-0213.txt Attribute Access Handlers prescod + From python-dev@python.org Fri Jul 21 21:05:09 2000 From: python-dev@python.org (Barry Warsaw) Date: Fri, 21 Jul 2000 13:05:09 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0213.txt,NONE,1.1 Message-ID: <200007212005.NAA02806@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv2799 Added Files: pep-0213.txt Log Message: PEP 213, Attribute Access Handlers, assigned to Paul Prescod ***** Error reading new file(2, 'No such file or directory') From python-dev@python.org Fri Jul 21 21:43:40 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 21 Jul 2000 13:43:40 -0700 Subject: [Python-checkins] CVS: python/nondist/sandbox - New directory Message-ID: <200007212043.NAA05628@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sandbox In directory slayer.i.sourceforge.net:/tmp/cvs-serv5618/sandbox Log Message: Directory /cvsroot/python/python/nondist/sandbox added to the repository From python-dev@python.org Fri Jul 21 22:14:28 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 21 Jul 2000 14:14:28 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0213.txt,1.1,1.2 Message-ID: <200007212114.OAA21635@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv21578/peps Modified Files: pep-0213.txt Log Message: Added content. First real version of this PEP Index: pep-0213.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0213.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0213.txt 2000/07/21 20:05:07 1.1 --- pep-0213.txt 2000/07/21 21:14:26 1.2 *************** *** 7,10 **** --- 7,201 ---- + Introduction + + It is possible (and even relatively common) in Python code and + in extension modules to "trap" when an instance's client code + attempts to set an attribute and execute code instead. In other + words it is possible to allow users to use attribute assignment/ + retrieval/deletion syntax even though the underlying implementation + is doing some computation rather than directly modifying a + binding. + + This PEP describes a feature that makes it easier, more efficient + and safer to implement these handlers for Python instances. + + Justification + + Scenario 1: + + You have a deployed class that works on an attribute named + "stdout". After a while, you think it would be better to + check that stdout is really an object with a "write" method + at the moment of assignment. Rather than change to a + setstdout method (which would be incompatible with deployed + code) you would rather trap the assignment and check the + object's type. + + Scenario 2: + + You want to be as compatible as possible with an object + model that has a concept of attribute assignment. It could + be the W3C Document Object Model or a particular COM + interface (e.g. the PowerPoint interface). In that case + you may well want attributes in the model to show up as + attributes in the Python interface, even though the + underlying implementation may not use attributes at all. + + Scenario 3: + + A user wants to make an attribute read-only. + + In short, this feature allows programmers to separate the + interface of their module from the underlying implementation + for whatever purpose. Again, this is not a new feature but + merely a new syntax for an existing convention. + + Current Solution + + To make some attributes read-only: + + class foo: + def __setattr__( self, name, val ): + if name=="readonlyattr": + raise TypeError + elif name=="readonlyattr2": + raise TypeError + ... + else: + self.__dict__["name"]=val + + This has the following problems: + + 1. The creator of the method must be intimately aware of whether + somewhere else in the class hiearchy __setattr__ has also been + trapped for any particular purpose. If so, she must specifically + call that method rather than assigning to the dictionary. There + are many different reasons to overload __setattr__ so there is a + decent potential for clashes. For instance object database + implementations often overload setattr for an entirely unrelated + purpose. + + 2. The string-based switch statement forces all attribute handlers + to be specified in one place in the code. They may then dispatch + to task-specific methods (for modularity) but this could cause + performance problems. + + 3. Logic for the setting, getting and deleting must live in + __getattr__, __setattr__ and __delattr__. Once again, this can be + mitigated through an extra level of method call but this is + inefficient. + + Proposed Syntax + + Special methods should declare themselves with declarations of the + following form: + + class x: + def __attr_XXX__(self, op, val ): + if op=="get": + return someComputedValue(self.internal) + elif op=="set": + self.internal=someComputedValue(val) + elif op=="del": + del self.internal + + Client code looks like this: + + fooval=x.foo + x.foo=fooval+5 + del x.foo + + Semantics + + Attribute references of all three kinds should call the method. + The op parameter can be "get"/"set"/"del". Of course this string + will be interned so the actual checks for the string will be + very fast. + + It is disallowed to actually have an attribute named XXX in the + same instance as a method named __attr_XXX__. + + An implementation of __attr_XXX__ takes precedence over an + implementation of __getattr__ based on the principle that + __getattr__ is supposed to be invoked only after finding an + appropriate attribute has failed. + + An implementation of __attr_XXX__ takes precedence over an + implementation of __setattr__ in order to be consistent. The + opposite choice seems fairly feasible also, however. The same + goes for __del_y__. + + Proposed Implementation + + There is a new object type called an attribute access handler. + Objects of this type have the following attributes: + + name (e.g. XXX, not __attr__XXX__ + method (pointer to a method object + + In PyClass_New, methods of + the appropriate form will be detected and converted into objects + (just like unbound method objects). If there are any attribute access + handlers in an instance at all, a flag is set. Let's call + it "I_have_computed_attributes" for now. Derived classes inherit + the flag from base classes. Instances inherit the flag from + classes. + + A get proceeds as usual until just before the object is returned. + In addition to the current check whether the returned object is a + method it would also check whether a returned object is an access + handler. If so, it would invoke the getter method and return + the value. To remove an attribute access handler you could directly + fiddle with the dictionary. + + A set proceeds by checking the "I_have_computed_attributes" flag. If + it is not set, everything proceeds as it does today. If it is set + then we must do a dictionary get on the requested object name. If it + returns an attribute access handler then we call the setter function + with the value. If it returns any other object then we discard the + result and continue as we do today. Note that having an attribute + access handler will mildly affect attribute "setting" performance for + all sets on a particular instance, but no more so than today, using + __setattr__. Gets are more efficient than they are today with + __getattr__. + + The I_have_computed_attributes flag is intended to eliminate the + performance degradation of an extra "get" per "set" for objects not + using this feature. Checking this flag should have miniscule + performance implications for all objects. + + The implementation of delete is analogous to the implementation + of set. + + Caveats + + 1. You might note that I have not proposed any logic to keep + the I_have_computed_attributes flag up to date as attributes + are added and removed from the instance's dictionary. This is + consistent with current Python. If you add a __setattr__ method + to an object after it is in use, that method will not behave as + it would if it were available at "compile" time. The dynamism is + arguably not worth the extra implementation effort. This snippet + demonstrates the current behavior: + + >>> def prn(*args):print args + >>> class a: + ... __setattr__=prn + >>> a().foo=5 + (<__main__.a instance at 882890>, 'foo', 5) + + >>> class b: pass + >>> bi=b() + >>> bi.__setattr__=prn + >>> b.foo=5 + + 2. Assignment to __dict__["XXX"] can overwrite the attribute + access handler for __attr_XXX__. Typically the access handlers will + store information away in private __XXX variables + + 3. An attribute access handler that attempts to call setattr or getattr + on the object itself can cause an infinite loop (as with __getattr__) + Once again, the solution is to use a special (typically private) + variable such as __XXX. Local Variables: From python-dev@python.org Fri Jul 21 22:16:11 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 21 Jul 2000 14:16:11 -0700 Subject: [Python-checkins] CVS: python/nondist/sandbox/doctools - New directory Message-ID: <200007212116.OAA21813@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sandbox/doctools In directory slayer.i.sourceforge.net:/tmp/cvs-serv21807/doctools Log Message: Directory /cvsroot/python/python/nondist/sandbox/doctools added to the repository From python-dev@python.org Fri Jul 21 22:31:30 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 21 Jul 2000 14:31:30 -0700 Subject: [Python-checkins] CVS: python/nondist/sandbox/doctools README,NONE,1.1 htmldoc.py,NONE,1.1 inspect.py,NONE,1.1 onlinehelp.py,NONE,1.1 Message-ID: <200007212131.OAA23245@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sandbox/doctools In directory slayer.i.sourceforge.net:/tmp/cvs-serv23158 Added Files: README htmldoc.py inspect.py onlinehelp.py Log Message: Added for your consideration...comments to Paul Prescod and Ka-Ping Yee. --- NEW FILE --- This directory contains some tools for reading Python documentation, whether inline or in HTML files. These are all proposed additions to the standard library. onlinehelp.py -- onlinehelp for Python. Read the docstring. htmldoc.py -- Builds HTML documentation from docstrings inspect.py -- introspection API used by both of the above --- NEW FILE --- #!/usr/bin/env python """Generate HTML documentation from live Python objects.""" __version__ = "Ka-Ping Yee , 29 May 2000" import sys, string, re, inspect # ---------------------------------------------------- formatting utilities def htmlescape(str): return string.replace(string.replace(str, "&", "&"), "<", "<") def htmlrepr(object): return htmlescape(repr(object)) def preformat(str): str = htmlescape(string.expandtabs(str)) return string.replace(string.replace(str, " ", " "), "\n", "
    \n") def multicolumn(list, format, cols=4): results = [""] rows = (len(list)+cols-1)/cols for col in range(cols): results.append("") results.append("
    " % (100/cols)) for i in range(rows*col, rows*col+rows): if i < len(list): results.append(format(list[i]) + "
    ") results.append("
    ") return results def heading(title, fgcol, bgcol, extras=""): return ["""

    """ % (bgcol, fgcol, title, extras), "

     %s
     %s
    "] def section(title, fgcol, bgcol, contents, width=20, prelude="", marginalia=None, gap="   "): if marginalia is None: marginalia = " " * width results = [] results.append("""

    """ % (bgcol, fgcol, title)) if prelude: results.append(""" """ % (bgcol, marginalia, bgcol, prelude)) results.append(""" """ % (bgcol, marginalia, gap)) # Alas, this horrible hack seems to be the only way to force Netscape # to expand the main cell consistently to the maximum available width. results.append("

     %s
    %s %s
    %s%s" + "  "*100 + "") results.append(contents) results.append("
    ") return results def footer(): return """
    generated with htmldoc by Ka-Ping Yee
    """ # -------------------------------------------------------- automatic markup import re def namelink(name, *dicts): for dict in dicts: if dict.has_key(name): return "%s" % (dict[name], name) return name def classlink(object, modname, *dicts): name = object.__name__ if object.__module__ != modname: name = object.__module__ + "." + name for dict in dicts: if dict.has_key(object): return "%s" % (dict[object], name) return name def modulelink(object): return "%s" % (object.__name__, object.__name__) def markup(text, functions={}, classes={}, methods={}, escape=htmlescape): """Mark up some plain text, given a context of symbols to look for. Each context dictionary maps object names to named anchor identifiers.""" results = [] here = 0 pattern = re.compile("(self\.)?(\w+)") while 1: match = pattern.search(text, here) if not match: break start, end = match.regs[2] found, name = match.group(0), match.group(2) results.append(escape(text[here:start])) if text[end:end+1] == "(": results.append(namelink(name, methods, functions, classes)) elif match.group(1): results.append("%s" % name) else: results.append(namelink(name, classes)) here = end results.append(text[here:]) return string.join(results, "") def getdoc(object): result = inspect.getdoc(object) if not result: try: result = inspect.getcomments(object) except: pass return result and string.rstrip(result) + "\n" or "" # -------------------------------------------------- type-specific routines def document_tree(tree, modname, classes={}): """Produce HTML for a class tree as returned by inspect.getclasstree().""" results = ["

    \n"] for entry in tree: if type(entry) is type(()): c, bases = entry results.append("
    ") results.append(classlink(c, modname, classes)) if bases: parents = [] for base in bases: parents.append(classlink(base, modname, classes)) results.append("(" + string.join(parents, ", ") + ")") results.append("\n
    ") elif type(entry) is type([]): results.append("
    \n") results.append(document_tree(entry, modname, classes)) results.append("
    \n") results.append("
    \n") return results def document_module(object): """Produce HTML documentation for a given module object.""" name = object.__name__ file = inspect.getfile(object) results = [] head = "
     %s" % name if hasattr(object, "__version__"): head = head + " (version: %s)" % htmlescape(object.__version__) results.append(heading(head, "#ffffff", "#7799ee")) cadr = lambda list: list[1] modules = map(cadr, inspect.getmembers(object, inspect.ismodule)) classes, cdict = [], {} for key, value in inspect.getmembers(object, inspect.isclass): if inspect.getfile(value) == file: classes.append(value) cdict[key] = cdict[value] = "#" + key functions, fdict = [], {} for key, value in inspect.getmembers(object, inspect.isroutine): if not inspect.isfunction(value) or inspect.getfile(value) == file: functions.append(value) fdict[key] = "#-" + key if inspect.isfunction(value): fdict[value] = fdict[key] for c in classes: for base in c.__bases__: key, modname = base.__name__, base.__module__ if modname != name and sys.modules.has_key(modname): module = sys.modules[modname] if hasattr(module, key) and getattr(module, key) is base: if not cdict.has_key(key): cdict[key] = cdict[base] = modname + ".html#" + key doc = markup(getdoc(object), fdict, cdict, escape=preformat) if doc: doc = "

    " + doc + "\n\n" else: doc = "

    no doc string\n" results.append(doc) if modules: contents = multicolumn(modules, modulelink) results.append(section("Modules", "#fffff", "#aa55cc", contents)) if classes: contents = document_tree(inspect.getclasstree(classes), name, cdict) for item in classes: contents.append(document_class(item, fdict, cdict)) results.append(section("Classes", "#ffffff", "#ee77aa", contents)) if functions: contents = [] for item in functions: contents.append(document_function(item, fdict, cdict)) results.append(section("Functions", "#ffffff", "#eeaa77", contents)) return results def document_class(object, functions={}, classes={}): """Produce HTML documentation for a given class object.""" name = object.__name__ bases = object.__bases__ results = [] methods, mdict = [], {} for key, value in inspect.getmembers(object, inspect.ismethod): methods.append(value) mdict[key] = mdict[value] = "#" + name + "-" + key if methods: for item in methods: results.append(document_method( item, functions, classes, mdict, name)) title = "class %s" % (name, name) if bases: parents = [] for base in bases: parents.append(classlink(base, object.__module__, classes)) title = title + "(%s)" % string.join(parents, ", ") doc = markup(getdoc(object), functions, classes, mdict, escape=preformat) if doc: doc = "" + doc + "
     
    " else: doc = "no doc string" return section(title, "#000000", "#ffc8d8", results, 10, doc) def document_method(object, functions={}, classes={}, methods={}, clname=""): """Produce HTML documentation for a given method object.""" return document_function( object.im_func, functions, classes, methods, clname) def defaultformat(object): return """=""" + \ htmlrepr(object) + "" def document_function(object, functions={}, classes={}, methods={}, clname=""): """Produce HTML documentation for a given function object.""" try: args, varargs, varkw, defaults = inspect.getargspec(object) argspec = inspect.formatargspec( args, varargs, varkw, defaults, defaultformat=defaultformat) except TypeError: argspec = "(no arg info)" if object.__name__ == "": decl = ["lambda ", argspec[1:-1]] else: anchor = clname + "-" + object.__name__ decl = ["" % anchor, "%s" % object.__name__, argspec, "\n"] doc = markup(getdoc(object), functions, classes, methods, escape=preformat) if doc: doc = string.replace(doc, "
    \n", "

    ") doc = ["
    ", doc, ""] else: doc = "
    no doc string" return ["
    ", decl, doc, "
    "] def document_builtin(object): """Produce HTML documentation for a given built-in function.""" return ("%s" % object.__name__ + "(no arg info)") # --------------------------------------------------- main dispatch routine def document(object): """Generate documentation for a given object.""" if inspect.ismodule(object): results = document_module(object) elif inspect.isclass(object): results = document_class(object) elif inspect.ismethod(object): results = document_method(object) elif inspect.isfunction(object): results = document_function(object) elif inspect.isbuiltin(object): results = document_builtin(object) else: raise TypeError, "don't know how to document this kind of object" return serialize(results) def serialize(list): """Combine a list containing strings and nested lists into a single string. This lets us manipulate lists until the last moment, since rearranging lists is faster than rearranging strings.""" results = [] for item in list: if type(item) is type(""): results.append(item) else: results.append(serialize(item)) return string.join(results, "") if __name__ == "__main__": import os modnames = [] for arg in sys.argv[1:]: if os.path.isdir(arg): for file in os.listdir(arg): if file[-3:] == ".py": modnames.append(file[:-3]) elif file[-9:] == "module.so": modnames.append(file[:-9]) else: if arg[-3:] == ".py": modnames.append(arg[:-3]) else: modnames.append(arg) for modname in modnames: try: module = __import__(modname) except: print "failed to import %s" % modname else: file = open(modname + ".html", "w") file.write( """ %s """ % modname) file.write(document(module)) file.write("") file.close() print "wrote %s.html" % modname --- NEW FILE --- """Get useful information from live Python objects. This module encapsulates the interface provided by the internal special attributes (func_*, co_*, im_*, tb_*, etc.) in a friendlier fashion. It also provides some help for examining source code and class layout. Here are some of the useful functions provided by this module: getdoc(), getcomments() - get documentation on an object getclasstree() - arrange classes so as to represent their hierarchy getfile(), getsourcefile(), getsource() - find an object's source code getargspec(), getargvalues() - get info about function arguments formatargspec(), formatargvalues() - format an argument spec stack(), trace() - get info about frames on the stack or in a traceback """ # I, Ka-Ping Yee, the author of this contribution, hereby grant to anyone and # everyone a nonexclusive, irrevocable, royalty-free, worldwide license to # reproduce, distribute, perform and/or display publicly, prepare derivative # versions, and otherwise use this contribution in any fashion, or any # derivative versions thereof, at no cost to anyone, and to authorize others # to do so. This software is provided "as is", with NO WARRANTY WHATSOEVER, # not even a warranty of merchantability or fitness for any particular purpose. __version__ = "Ka-Ping Yee , 29 May 2000" import sys, types, string, dis, imp # ----------------------------------------------------------- type-checking def ismodule(object): """Is the object a module with the __file__ special attribute?""" return type(object) is types.ModuleType def isclass(object): """Is the object a class with the __module__ special attribute?""" return type(object) is types.ClassType def ismethod(object): """Is the object a method with the im_* set of special attributes?""" return type(object) is types.MethodType def isfunction(object): """Is the object a function with the func_* set of special attributes?""" return type(object) in [types.FunctionType, types.LambdaType] def istraceback(object): """Is the object a traceback with the tb_* set of special attributes?""" return type(object) is types.TracebackType def isframe(object): """Is the object a frame object with the f_* set of special attributes?""" return type(object) is types.FrameType def iscode(object): """Is the object a code object with the co_* set of special attributes?""" return type(object) is types.CodeType def isbuiltin(object): """Is the object a callable function providing no special attributes?""" return type(object) in [types.BuiltinFunctionType, types.BuiltinMethodType] def isroutine(object): """Is the object any of the built-in or user-defined function types?""" return type(object) in [types.FunctionType, types.LambdaType, types.MethodType, types.BuiltinFunctionType, types.BuiltinMethodType] def getmembers(object, predicate=lambda x: 1): """Return all members of an object as (key, value) pairs sorted by key. Optionally, only return members that satisfy a given predicate.""" results = [] for key in object.__dict__.keys(): value = getattr(object, key) if predicate(value): results.append((key, value)) results.sort() return results # -------------------------------------------------- source code extraction def indentsize(line): """Return the indent size, in spaces, at the start of a line of text.""" expline = string.expandtabs(line) return len(expline) - len(string.lstrip(expline)) def getdoc(object): """Get the documentation string for an object.""" if not hasattr(object, "__doc__"): raise TypeError, "arg has no __doc__ attribute" if object.__doc__: lines = string.split(string.expandtabs(object.__doc__), "\n") margin = None for line in lines[1:]: content = len(string.lstrip(line)) if not content: continue indent = len(line) - content if margin is None: margin = indent else: margin = min(margin, indent) if margin is not None: for i in range(1, len(lines)): lines[i] = lines[i][margin:] return string.join(lines, "\n") def getfile(object): """Try to guess which (text or binary) file an object was defined in.""" if ismodule(object): return imp.find_module(object.__name__)[1] if isclass(object): return imp.find_module(object.__module__)[1] if ismethod(object): object = object.im_func if isfunction(object): object = object.func_code if istraceback(object): object = object.tb_frame if isframe(object): object = object.f_code if iscode(object): return object.co_filename raise TypeError, "arg is not a module, class, method, " \ "function, traceback, frame, or code object" def getsourcefile(object): """Try to guess which Python source file an object was defined in.""" filename = getfile(object) if filename[-4:] == ".pyc": filename = filename[:-4] + ".py" return filename def findsource(object): """Find the first line of code corresponding to a given module, class, method, function, traceback, frame, or code object; return the entire contents of the source file and the starting line number. An IOError exception is raised if the source code cannot be retrieved.""" try: file = open(getsourcefile(object)) lines = file.readlines() file.close() except (TypeError, IOError): raise IOError, "could not get source code" if ismodule(object): return lines, 0 if isclass(object): name = object.__name__ matches = (["class", name], ["class", name + ":"]) for i in range(len(lines)): if string.split(lines[i])[:2] in matches: return lines, i else: raise IOError, "could not find class definition" if ismethod(object): object = object.im_func if isfunction(object): object = object.func_code if istraceback(object): object = object.tb_frame if isframe(object): object = object.f_code if iscode(object): try: lnum = object.co_firstlineno except AttributeError: pass else: while lnum > 0: if string.split(lines[lnum])[:1] == ["def"]: break lnum = lnum - 1 return lines, lnum raise IOError, "could not find function definition" def getcomments(object): """Look for preceding lines of comments in an object's source code.""" lines, lnum = findsource(object) if ismodule(object): # Look for a comment block at the top of the file. start = 0 if lines[0][:2] == "#!": start = 1 while start < len(lines) and string.strip(lines[start]) in ["", "#"]: start = start + 1 if lines[start][:1] == "#": end = start while end < len(lines) and lines[end][:1] == "#": end = end + 1 return string.join(lines[start:end], "") else: return None # Look for a preceding block of comments at the same indentation. elif lnum > 0: indent = indentsize(lines[lnum]) end = lnum - 1 if string.strip(lines[end]) == "": while end >= 0 and string.strip(lines[end]) == "": end = end - 1 else: while string.lstrip(lines[end])[:1] != "#" and \ indentsize(lines[end]) == indent: end = end - 1 if end >= 0 and string.lstrip(lines[end])[:1] == "#" and \ indentsize(lines[end]) == indent: comments = [string.lstrip(lines[end])] if end > 0: end = end - 1 comment = string.lstrip(lines[end]) while comment[:1] == "#" and indentsize(lines[end]) == indent: comments[:0] = [comment] end = end - 1 if end < 0: break comment = string.lstrip(lines[end]) return string.join(comments, "") import tokenize class ListReader: """Provide a readline() method to return lines from a list of strings.""" def __init__(self, lines): self.lines = lines self.index = 0 def readline(self): i = self.index if i < len(self.lines): self.index = i + 1 return self.lines[i] else: return "" class EndOfBlock(Exception): pass class BlockFinder: """Provide a tokeneater() method to detect the end of a code block.""" def __init__(self): self.indent = 0 self.started = 0 self.last = 0 def tokeneater(self, type, token, (srow, scol), (erow, ecol), line): if not self.started: if type == tokenize.NAME: self.started = 1 elif type == tokenize.NEWLINE: self.last = srow elif type == tokenize.INDENT: self.indent = self.indent + 1 elif type == tokenize.DEDENT: self.indent = self.indent - 1 if self.indent == 0: raise EndOfBlock, self.last def getblock(lines): """Extract the block of code at the top of the given list of lines.""" try: tokenize.tokenize(ListReader(lines).readline, BlockFinder().tokeneater) except EndOfBlock, eob: return lines[:eob.args[0]] def getsource(object): """Try to get the source code corresponding to a module, class, method, function, traceback, frame, or code object. Return a list of lines of text and the line number of the first line. An IOError exception is raised if the source code cannot be retrieved.""" lines, lnum = findsource(object) if ismodule(object): return lines else: return getblock(lines[lnum:]), lnum # --------------------------------------------------- class tree extraction def walktree(classes, children, parent): """Recursive helper function for getclasstree().""" results = [] classes.sort(lambda a, b: a.__name__ > b.__name__ and 1 or -1) for c in classes: if c.__bases__ and c.__bases__ != (parent,): results.append((c, c.__bases__)) else: results.append((c, None)) if children.has_key(c): results.append(walktree(children[c], children, c)) return results def getclasstree(classes): """Arrange the given list of classes into a hierarchy of nested lists. Where a nested list appears, it contains classes derived from the class whose entry immediately precedes the list. Each entry is a 2-tuple containing a class and a list of bases, where the list of bases only appears if the class inherits in a way not already implied by the tree structure (i.e. it inherits from multiple bases, or inherits from a class not present in the tree). Exactly one entry appears in the returned structure for each class in the given list.""" children = {} roots = [] for c in classes: if c.__bases__: for parent in c.__bases__: if not children.has_key(parent): children[parent] = [] children[parent].append(c) if parent in classes: break elif c not in roots: roots.append(c) for parent in children.keys(): if parent not in classes: roots.append(parent) return walktree(roots, children, None) # ------------------------------------------------ argument list extraction # These constants are from Python's compile.h. CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS = 1, 2, 4, 8 def getargs(co): """Get information about the arguments accepted by a code object. Three things are returned: (args, varargs, varkw), where 'args' is a list of argument names (possibly containing nested lists), and 'varargs' and 'varkw' are the names of the * and ** arguments or None.""" if not iscode(co): raise TypeError, "arg is not a code object" code = co.co_code nargs = co.co_argcount names = co.co_varnames args = list(names[:nargs]) step = 0 # The following acrobatics are for anonymous (tuple) arguments. for i in range(nargs): if args[i][:1] in ["", "."]: stack, remain, count = [], [], [] while step < len(code): op = ord(code[step]) step = step + 1 if op >= dis.HAVE_ARGUMENT: opname = dis.opname[op] value = ord(code[step]) + ord(code[step+1])*2 step = step + 2 if opname == "UNPACK_TUPLE": remain.append(value) count.append(value) elif opname == "STORE_FAST": stack.append(names[value]) remain[-1] = remain[-1] - 1 while remain[-1] == 0: remain.pop() size = count.pop() stack[-size:] = [stack[-size:]] if not remain: break remain[-1] = remain[-1] - 1 if not remain: break args[i] = stack[0] varargs = None if co.co_flags & CO_VARARGS: varargs = co.co_varnames[nargs] nargs = nargs + 1 varkw = None if co.co_flags & CO_VARKEYWORDS: varkw = co.co_varnames[nargs] return args, varargs, varkw def getargspec(func): """Get the names and default values of a function's arguments. A tuple of four things is returned: (args, varargs, varkw, defaults). 'args' is a list of the argument names (it may contain nested lists). 'defaults' is an n-tuple of the default values of the last n arguments. 'varargs' and 'varkw' are the names of the * and ** arguments or None.""" if not isfunction(func): raise TypeError, "arg is not a Python function" args, varargs, varkw = getargs(func.func_code) return args, varargs, varkw, func.func_defaults def getargvalues(frame): """Get information about arguments passed into a particular frame.""" args, varargs, varkw = getargs(frame.f_code) return args, varargs, varkw, frame.f_locals def strtuple(object, convert=str): """Recursively walk a tuple, stringifying each element.""" if type(object) in [type(()), type([])]: results = map(strtuple, object) if len(results) == 1: return "(" + results[0] + ",)" else: return "(" + string.join(results, ", ") + ")" else: return convert(object) def formatargspec(args, varargs=None, varkw=None, defaults=None, argformat=str, defaultformat=lambda x: "=" + repr(x), varargsformat=lambda name: "*" + name, varkwformat=lambda name: "**" + name): """Make a nicely-formatted argument spec from the output of getargspec.""" specs = [] if defaults: firstdefault = len(args) - len(defaults) for i in range(len(args)): spec = strtuple(args[i], argformat) if defaults and i >= firstdefault: spec = spec + defaultformat(defaults[i - firstdefault]) specs.append(spec) if varargs: specs.append(varargsformat(varargs)) if varkw: specs.append(varkwformat(varkw)) return "(" + string.join(specs, ", ") + ")" def formatargvalues(args, varargs=None, varkw=None, locals=None, argformat=str, valueformat=repr, varargsformat=lambda name: "*" + name, varkwformat=lambda name: "**" + name): """Make a nicely-formatted argument spec from the output of getargvalues.""" def convert(name, locals=locals, argformat=argformat, valueformat=valueformat): return argformat(name) + "=" + valueformat(locals[name]) specs = [] for i in range(len(args)): specs.append(strtuple(args[i], convert)) if varargs: specs.append(varargsformat(varargs)) if varkw: specs.append(varkwformat(varkw)) return "(" + string.join(specs, ", ") + ")" # -------------------------------------------------- stack frame extraction def getframe(frame, context=1): """For a given frame or traceback object, return the filename, line number, function name, a given number of lines of context from the source code, and the index of the line within the lines of context.""" if istraceback(frame): frame = frame.tb_frame if not isframe(frame): raise TypeError, "arg is not a frame or traceback object" filename = getsourcefile(frame) if context > 0: start = frame.f_lineno - 1 - context/2 try: lines, lnum = findsource(frame) start = min(start, 1) start = max(start, len(lines) - context) lines = lines[start:start+context] index = frame.f_lineno - 1 - start except: lines = index = None else: lines = index = None return (filename, frame.f_lineno, frame.f_code.co_name, lines, index) def getouterframes(frame, context=1): """Get a list of records for a frame and all higher (calling) frames. Each record contains a frame object, filename, line number, function name, the requested amount of context, and index within the context.""" framelist = [] while frame: framelist.append((frame,) + getframe(frame, context)) frame = frame.f_back return framelist def getinnerframes(traceback, context=1): """Get a list of records for a traceback's frame and all lower frames. Each record contains a frame object, filename, line number, function name, the requested amount of context, and index within the context.""" traceback = traceback.tb_next framelist = [] while traceback: framelist.append((frame,) + getframe(traceback, context)) traceback = traceback.tb_next return framelist def currentframe(): """Return the frame object for the caller's stack frame.""" try: raise "catch me" except: return sys.exc_traceback.tb_frame.f_back def stack(context=1): """Return a list of records for the stack above the caller's frame.""" return getouterframes(currentframe().f_back, context) def trace(context=1): """Return a list of records for the stack below the current exception.""" return getinnerframes(sys.exc_traceback, context) --- NEW FILE --- """ Online help module. This module is experimental and could be removed or radically changed at any time. It is intended specifically for the standard interpreter command line but is intended to be compatible with and useful for other (e.g. GUI, handheld) environments. Help with those other environments is appreciated. Please remember to set PYTHONDOCS to the location of your HTML files: e.g. set PYTHONDOCS=c:\python\docs PYTHONDOCS=/python/docs The docs directory should have a lib subdirectory with "index.html" in it. If it has *.tex then you have the documentation *source* distribution, not the runtime distribution. The module exposes one object: "help". "help" has a repr that does something useful if you just type: >>> from onlinehelp import help >>> help Of course one day the first line will be done automatically by site.py or something like that. help can be used as a function. The function takes the following forms of input: help( "string" ) -- built-in topic or global help( ) -- docstring from object or type help( "doc:filename" ) -- filename from Python documentation Type help to get the rest of the instructions. You can also use the module as a command line program: python onlinehelp.py if """ # I, Paul Prescod, the author of this contribution, hereby grant to anyone and # everyone a nonexclusive, irrevocable, royalty-free, worldwide license to # reproduce, distribute, perform and/or display publicly, prepare derivative # versions, and otherwise use this contribution in any fashion, or any # derivative versions thereof, at no cost to anyone, and to authorize others to # do so. This software is provided "as is", with NO WARRANTY WHATSOEVER, not # even a warranty of merchantability or fitness for any particular purpose. # todo: consider following links: # help( 3 ) -> follows link 3 in the last-displayed doc # help( 4 ) -> follows link 4 in the last-displayed doc # ... # Steal some ideas from hack.py about fetching module globals # and class methods import htmllib # todo: add really basic tr/td support import formatter import os, sys import re prompt="--more-- (enter for more, q to quit) " topics={} # all built-in (non-HTML, non-docstring) topics go in here commands="" # only used at the top level def topLevelCommand( name, description, text ): """ this function is just for use at the top-level to make sure that every advertised top-level topic has a description and every description has text. Maybe we can generalize it later.""" global commands topics[name]=text if description[0]=="[": placeholder="(dummy)" elif description[0]=="<": placeholder="link" else: placeholder="" commands=commands+'help( "%s" ) %s - %s\n' % \ (name, placeholder, description ) topLevelCommand( "intro", "What is Python? Read this first!", """Welcome to Python, the easy to learn, portable, object oriented programming language. [info on how to use help] [info on intepreter]""" ) topLevelCommand( "keywords", "What are the keywords?", "") topLevelCommand( "syntax", "What is the overall syntax?", "[placeholder]") topLevelCommand( "operators", "What operators are available?", "" ) topLevelCommand( "builtins", "What functions, types, etc. are built-in?", "") topLevelCommand( "modules", "What modules are in the standard library?", "") topLevelCommand( "copyright", "Who owns Python?", "[who knows]") topLevelCommand( "moreinfo", "Where is there more information?", "[placeholder]") topLevelCommand( "changes", "What changed in Python 2.0?", "[placeholder]" ) topLevelCommand( "extensions", "What extensions are installed?", "[placeholder]") topLevelCommand( "faq", "What questions are frequently asked?", "[placeholder]") topLevelCommand( "ack", "Who has done work on Python lately?", "[placeholder for list of people who contributed patches]") topics[ "prompt" ]="""""" topics[ "types" ]="""""" topics["everything"]= \ """
    The help function allows you to read help on Python's various 
    functions, objects, instructions and modules. You have two options:
    
    1. Use help( obj ) to browse the help attached to some function, module
    class or other object. e.g. help( dir )
    
    2. Use help( "somestring" ) to browse help on one of the predefined 
    help topics, unassociated with any particular object:
    
    %s
    """ % commands topics[ "keywords" ]=\ """
    "if"       - Conditional execution
    "while"    - Loop while a condition is true
    "for"      - Loop over a sequence of values (often numbers)
    "try"      - Set up an exception handler
    "def"      - Define a named function
    "class"    - Define a class
    "assert"   - Check that some code is working as you expect it to.
    "pass"     - Do nothing
    "del"      - Delete a data value
    "print"    - Print a value
    "return"   - Return information from a function
    "raise"    - Raise an exception
    "break"    - Terminate a loop
    "continue" - Skip to the next loop statement
    "import"   - Import a module
    "global"   - Declare a variable global
    "exec"     - Execute some dynamically generated code
    "lambda"   - Define an unnamed function
    
    For more information, type e.g. help("assert")
    """ topics[ "if" ]="""""" topics[ "while" ]="""""" topics[ "for" ]="""""" topics[ "try" ]="""""" topics[ "def" ]="""""" topics[ "class" ]="""""" topics[ "assert" ]="""""" topics[ "pass" ]="""""" topics[ "del" ]="""""" topics[ "print" ]="""""" topics[ "return" ]="""""" topics[ "raise" ]="""""" topics[ "break" ]="""""" topics[ "continue" ]="""""" topics[ "import" ]="""""" topics[ "global" ]="""""" topics[ "exec" ]="""""" topics[ "lambda" ]="""""" topics[ "me" ]="""Python helps those who help themselves. :) Try help( "intro" ) or help( "faq" )""" envir_var="PYTHONDOCS" class Help: def __init__( self, out, line_length, docdir=None ): self.out=out self.line_length=line_length self.Parser=htmllib.HTMLParser self.Formatter=formatter.AbstractFormatter self.Pager=Pager self.Writer=formatter.DumbWriter self.docdir=docdir def initDocDir( self ): if os.environ.has_key(envir_var): self.docdir=os.environ[envir_var] else: if os.environ.has_key("PYTHONHOME"): pyhome=os.environ["PYTHONHOME"] else: pyhome=os.path.split( sys.executable )[0] self.docdir=os.path.join( pyhome, "doc" ) testfile=os.path.join( os.path.join( self.docdir, "lib" ), "index.html") if not os.path.exists( testfile ): error = \ """Cannot find documentation directory %s. Set the %s environment variable to point to a "doc" directory. It should have a subdirectory "Lib" with a file named "index.html". """ % (self.docdir, envir_var ) raise EnvironmentError, error def __repr__( self ): self( "everything" ) return "" def __call__( self, ob, out=None ): try: self.call( ob, out ) return 1 except (KeyboardInterrupt, EOFError): return 0 def call( self, ob, out ): self.pager=out or self.Pager( self.out, self.line_length ) if type( ob ) in (type(""),type(u"")): if ob.startswith( "<" ): ob=ob[1:] if ob.endswith( ">" ): ob=ob[:-1] self.write( 'Topic: help( "%s" )\n' % ob ) if ob.startswith("doc:"): path=ob[4:] if not self.docdir: self.initDocDir() fullpath=os.path.join( self.docdir, path ) data=open( fullpath ).read() index=ob.rfind( "/" ) self.writeHTML( ob[:index], data ) else: try: info=topics[ob] docrlmatch=re.search( "(]+>)", info.split("\n")[0] ) if docrlmatch: # a first-line redirect self( docrlmatch.group(1) ) else: self.writeHTML( "", info ) except KeyError: glo=__builtins__.__dict__.get( ob, 0 ) if glo: self( glo ) else: sys.stderr.write( "No such topic "+`ob` ) return None else: self.write( 'Topic: help( %s )\n' % ob ) self.writeText( self.getdoc( ob ) ) def getdoc( self, ob ): if hasattr( ob, "__doc__" ): return ob.__doc__ else: type( ob ).__doc__ def writeHTML( self, base, str ): parser=self.Parser(self.Formatter( self.Writer( self ))) parser.feed( str ) # calls self.write automatically for i in range( len( parser.anchorlist) ): self.pager.write( "[%s] %s/%s\n" %(i+1, base,parser.anchorlist[i] )) self.pager.flush() self.out.write( "\n" ) def writeText( self, str ): self.pager.write( str ) self.pager.flush() self.out.write( "\n" ) def write( self, str ): self.pager.write( str ) from cStringIO import StringIO class Pager: numlines=1 def __init__(self, out, pagesize=24, linestart="" ): self.out=out self.pagesize=pagesize self.buf=StringIO() self.linestart=linestart def close(self ): self.flush() def flush(self ): data=self.buf.getvalue().rstrip() # dump trailing ws while data.endswith( "\n|" ): # dump trailing lines data=data[:-2] self.out.write( data ) self.buf=StringIO() def write(self, str ): lines=str.split( "\n" ) self.buf.write( lines[0] ) for line in lines[1:]: self.buf.write( "\n| " ) self.buf.write( line ) if self.numlines and not self.numlines%(self.pagesize): dat=self.buf.getvalue().strip() self.out.write( "| " ) self.out.write( dat ) self.out.write( "\n" ) j=raw_input(prompt) if j and j[0]=="q": raise EOFError self.buf=StringIO() self.numlines=self.numlines+1 help=Help(sys.stdout,24) def test(): rc = 1 rc = rc and help( "everything" ) rc = rc and help( "exec" ) rc = rc and help( "doc:lib/unix.html" ) rc = rc and help( "doc:lib/module-tty.html" ) rc = rc and help( "doc:ref/print.html" ) rc = rc and help( "faq" ) rc = rc and help( dir ) repr( help ) if __name__=="__main__": if len( sys.argv )!=2: print "Usage: %s or %s test" % ( sys.argv[0], sys.argv[0] ) sys.exit(0) elif sys.argv[1]=="test": test() else: help( eval( sys.argv[1] ) ) From python-dev@python.org Fri Jul 21 22:43:11 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 21 Jul 2000 14:43:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-win winreg.py,1.3,1.4 Message-ID: <200007212143.OAA23949@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/plat-win In directory slayer.i.sourceforge.net:/tmp/cvs-serv23894 Modified Files: winreg.py Log Message: Added docstrings Index: winreg.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/plat-win/winreg.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** winreg.py 2000/07/01 20:57:03 1.3 --- winreg.py 2000/07/21 21:43:09 1.4 *************** *** 1,2 **** --- 1,33 ---- + """ + Windows registry support. + + openKey( keyname ) + open existing key object + + >>> key=openKey( r"HKLM\HARDWARE\DESCRIPTION\System" ) + + createKey( keyname ) + create a key if it doesn't already exist + + >>> key=createKey( r"HKLM\SOFTWARE\Python\Test" ) + + deleteKey( keyname ) + delete a key if it exists + Note: deleteKey may not be recursive on all platforms. + + >>> key=createKey( r"HKLM\SOFTWARE\Python\Test" ) + + RemoteKey( machine, top_level_key ): + open a key on another machine. + You can use the returned key as a basis for opens, creates and deletes + on the other machine. + + >>> key=RemoteKey( "somemachine", "HKLM" ) + + For information on the key API, open a key and look at its docstring. + + + """ + import _winreg import sys *************** *** 7,10 **** --- 38,42 ---- class RegType: + "Represents one of the types that can go into the registry" def __init__( self, msname, friendlyname ): self.msname=msname *************** *** 13,16 **** --- 45,49 ---- def __repr__( self ): + "Return a useful representation of the type object" return "" % \ (self.intval, self.msname, self.friendlyname ) *************** *** 50,61 **** --- 83,97 ---- class _DictBase: + "Base class for dictionary-type objects" def __init__( self, key ): self.key=key def clear( self ): + "Clear the list of keys/data values, as in dictionaries" keys=list( self.keys() ) map( self.__delitem__, keys ) def get( self, item, defaultVal=None ): + "Get a key/value by name or index" try: return self.__getitem__( item ) *************** *** 64,67 **** --- 100,104 ---- def has_key( self, item ): + "Check if a key/data value with a particular name exists" try: self.__getitem__( item ) *************** *** 71,74 **** --- 108,112 ---- def keys( self ): + "Get a list of key/data value names" keys=[] try: *************** *** 81,84 **** --- 119,123 ---- def values( self ): + "Get a list of key objects or data values" values=[] # map() doesn't use the IndexError semantics... for i in self: *************** *** 87,90 **** --- 126,130 ---- def items( self ): + "Get pairs of keyname/key object or valuename/value data" return map( None, self.keys(), self.values() ) *************** *** 93,96 **** --- 133,137 ---- def _getName( item, nameFromNum ): + "Helper function -- don't use it directly" if type( item ) == IntType: try: *************** *** 108,111 **** --- 149,153 ---- class RegValuesDict( _DictBase ): + "A dictionary of registry data values" def _nameFromNum( self, i ): return self.key._nameFromNum( i ) *************** *** 125,131 **** valname=_getName( item, self._nameFromNum ) self.key.deleteValue( valname ) - class RegKeysDict( _DictBase ): def _nameFromNum( self, item ): return _winreg.EnumKey( self.key.handle, item ) --- 167,173 ---- valname=_getName( item, self._nameFromNum ) self.key.deleteValue( valname ) class RegKeysDict( _DictBase ): + "A dictionary of registry keys" def _nameFromNum( self, item ): return _winreg.EnumKey( self.key.handle, item ) *************** *** 140,143 **** --- 182,186 ---- def openKey( keyname, samFlags=None ): + "Open a key by name" lst=string.split( keyname, "\\", 1 ) if len( lst )==2: *************** *** 162,170 **** --- 205,221 ---- class RegKey: + "A registry key object" + + def __init__( self, name, handle=None ): + self.name=name + self.handle=handle + def _nameFromNum( self, item ): + "internal" (name,data,datatype)=_winreg.EnumValue( self.handle, item ) return name def __nonzero__(self): + "Is the key open?" if self.handle: return 1 *************** *** 173,176 **** --- 224,228 ---- def __cmp__ (self, other ): + "Compare two keys for equality" if hasattr( other, "handle" ) and hasattr( other, "name" ): return cmp( self.name, other.name ) *************** *** 178,208 **** return cmp( self.handle, other ) - def __init__( self, name, handle=None ): - self.name=name - self.handle=handle - def __repr__( self ): return ""% self.name def close(self ): return _winreg.CloseKey( self.handle ) def getSubkeyNames( self ): return self.getSubkeys().keys() def getValueNames( self ): return self.getValues().keys() def deleteSubkey( self, subkey ): return _winreg.DeleteKey( self.handle, subkey ) def deleteValue( self, valname ): return _winreg.DeleteValue( self.handle, valname ) def createSubkey( self, keyname ): handle=_winreg.CreateKey( self.handle, keyname ) return RegKey( self.name+"\\"+keyname, handle) def openSubkey( self, keyname, samFlags=None ): if samFlags: handle=_winreg.OpenKey( self.handle, keyname, 0, samFlags ) --- 230,263 ---- return cmp( self.handle, other ) def __repr__( self ): return ""% self.name def close(self ): + "Close the key" return _winreg.CloseKey( self.handle ) def getSubkeyNames( self ): + "Get a list of subkey names" return self.getSubkeys().keys() def getValueNames( self ): + "Get a list of value names" return self.getValues().keys() def deleteSubkey( self, subkey ): + "Delete a subkey by name" return _winreg.DeleteKey( self.handle, subkey ) def deleteValue( self, valname ): + "Delete a value by name" return _winreg.DeleteValue( self.handle, valname ) def createSubkey( self, keyname ): + "Create a subkey by name" handle=_winreg.CreateKey( self.handle, keyname ) return RegKey( self.name+"\\"+keyname, handle) def openSubkey( self, keyname, samFlags=None ): + "Open a named subkey" if samFlags: handle=_winreg.OpenKey( self.handle, keyname, 0, samFlags ) *************** *** 212,221 **** --- 267,279 ---- def getSubkeys( self ): + "Get a dictionary-like mapping of subkeys" return RegKeysDict( self ) def getValues( self ): + "Get a dictionary-like mapping of data values" return RegValuesDict( self ) def getValueNameDataAndType( self, valname ): + "Get a data value's name, data and type all at one time" try: if type( valname )==IntType: *************** *** 234,241 **** --- 292,301 ---- def getValueData( self, valname ): + "Get a data value's data." name, data, type=self.getValueNameDataAndType( valname ) return data def setValue( self, valname, data, regtype=None ): + "Set a data value's data (and optionally type)" if regtype: typeint=regtype.intval *************** *** 251,264 **** --- 311,330 ---- def flush(self ): + "Make sure that all changes are written to the registry. " + "Only use this if you know what you are doing. " + "It isn't usually needed." _winreg.FlushKey( self.keyobbj ) def save( self, filename ): + "Save a key to a filename" _winreg.SaveKey( self.keyobj, filename ) def load( self, subkey, filename ): + "Load a key from a filename" return _winreg.RegLoadKey( self.handle, subkey, filename ) class RemoteKey( RegKey ): + "Open a key on a remote machine" def __init__( self, machine, topLevelKey ): assert topLevelKey in _hivenames From python-dev@python.org Fri Jul 21 22:59:32 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 21 Jul 2000 14:59:32 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0213.txt,1.2,1.3 Message-ID: <200007212159.OAA25133@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv25071 Modified Files: pep-0213.txt Log Message: Update suggested by gmcm -- method is stored in dict alongside attribute access handler Index: pep-0213.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0213.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pep-0213.txt 2000/07/21 21:14:26 1.2 --- pep-0213.txt 2000/07/21 21:59:29 1.3 *************** *** 134,144 **** method (pointer to a method object ! In PyClass_New, methods of ! the appropriate form will be detected and converted into objects ! (just like unbound method objects). If there are any attribute access ! handlers in an instance at all, a flag is set. Let's call ! it "I_have_computed_attributes" for now. Derived classes inherit ! the flag from base classes. Instances inherit the flag from ! classes. A get proceeds as usual until just before the object is returned. --- 134,146 ---- method (pointer to a method object ! In PyClass_New, methods of the appropriate form will be detected and ! converted into objects (just like unbound method objects). These are ! stored in the class __dict__ under the name XXX. The original method ! is stored as an unbound method under its original name. ! ! If there are any attribute access handlers in an instance at all, ! a flag is set. Let's call it "I_have_computed_attributes" for ! now. Derived classes inherit the flag from base classes. Instances ! inherit the flag from classes. A get proceeds as usual until just before the object is returned. From python-dev@python.org Fri Jul 21 23:05:51 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 21 Jul 2000 15:05:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/dom minidom.py,1.4,1.5 Message-ID: <200007212205.PAA32747@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv32732 Modified Files: minidom.py Log Message: Added a few docstrings Index: minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/minidom.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** minidom.py 2000/07/04 03:39:33 1.4 --- minidom.py 2000/07/21 22:05:49 1.5 *************** *** 7,10 **** --- 7,14 ---- minidom.py -- a lightweight DOM implementation based on SAX. + parse( "foo.xml" ) + + parseString( "" ) + Todo: ===== *************** *** 441,446 **** --- 445,453 ---- def parse( *args, **kwargs ): + "Parse a file into a DOM by filename or file object" return _doparse( pulldom.parse, args, kwargs ) def parseString( *args, **kwargs ): + "Parse a file into a DOM from a string" return _doparse( pulldom.parseString, args, kwargs ) + From python-dev@python.org Sat Jul 22 03:53:13 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Fri, 21 Jul 2000 19:53:13 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html at.gif,NONE,1.1 py.gif,NONE,1.1 sf.gif,NONE,1.1 index.html,1.2,1.3 Message-ID: <200007220253.TAA12076@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv11882 Modified Files: index.html Added Files: at.gif py.gif sf.gif Log Message: rewrite of python at sf main page according to: - big link to python.org - "keep it simple, schneider-kamp" --- NEW FILE --- GIF89aT 0³çΟ0Ô´)±äKž3œ\Êr€Î–(‰:t‰Ô%Ó«LÂŒ*5! €K»xÝÚ5-T· Åê%Ú—§Ò±¯Æ´‰ó/d‹Ki¦lëÍ“;Œ¬|˜iÇÌBE¼ô#h˜!+¿¼ºtÏÔ{4©ÙãW¤´½RúÓoÉŸ{š û±ålÓûpŽZ§ßç»Y?í·´É„Ÿ3ÿ­úÓ.ZºJ;j}|2:Oì±îœÉöûnžq7~íÞú`_§õžwçñ4TF¿YÕÞAeÅ7P&·Ò~b”Thà]·-¸Ûa7ýå §ÜqŽ螊ý¶a…­Æš}ý÷kÑ•–‘s[ÑX£s3J8PRñ­ècE7âxcNa¸dPJÄŒ5èa):‰}E>ÉâE@^9ÐuMŠyrGD•EeɦåEXUr"ÔÙ›‰=™Y_À¥©á“ èõ(dA`Õ)¥¢‹æ9ßžRþ¥ãB9]º$¡˜iõ¥šë}êX~®T&ž’®)dhªÖ¶Z©ó•ÿQZŠ2˜S á©â¡ú]šZ  eJi†Fš'\ˆÞZŸ«9‰*ÐuZV¬‚£vgžW`;h!Î÷ŸÃFʳ0þ‚•­Å¦Quå—KUùøŸ‰:›´2y`c¼yú¯cø"Xnó:·«™æE[@&ëkQií{^SPGÀ[“–÷bµ-^+o&:i„ ñ(¢X®¡Ø$¿™¡ŒÕ­mÅV~B ¦óĘÑ[ÌxM4IÇ°pÎC¦RÉO!}Ù\5SÆ[–Ñ µÕ›•Ü°\-/·ðÈ\¶œ±ÊZ‹pÖ%/LØgT•ÍÑxÝkí«‚‚t• --- NEW FILE --- GIF89aþ J´¨Q…b*]±‚ L£fœp´ªÕ«X­&ÊdŠ\£&ÈJ¶¬Ù³„j@áÖµK K·.Qp—6p˜WéX»€ ^vi6—RÅ °pª 1“ 2Ÿâo‚¢ËTü<3¨%*ÎnRq æ 7»˜9‘‚]›Ï‰<(ÂßXK)H‰Rø¨áž›sÆå/ä@1*Ã[ëR¼ö%èÙ —gâJ вym`ó¦õ…“ßiÙ8IÙ˲R³- ŸfkÉÒQÿ.¶ª¥+<™ÊZä$†¬¼]ËYѪ¯ÑR°»4ì[!R1ÈÂå;´-,TCÙZ¦,5¸×ý'ëD îÄĈ™;'S‹?ä¢ÏRYb‰DiÊ>-U«´ÌT S6×Íö…ª©±*SV4xͲ‚iÌ@¬)Îõ¨] j ßxÞžÂ9Áêh¦† ßÃåÖ¾“ÖG—R_ð€ ÁÙwàÕÑ , t2XÀÆh5^R‘Œ*³­¿l^3¶Ø ñK!”kÖÓ BX¦ÎÕK¾xz¸n×KYgõk0n˜¿”~3q±E>èÐÓ¤¬ÏªWŸ œÖÕ?ö¢RPŸ L†{€kidá%™˜ÞR7ÏL¾#¯¥¹†;t±/Œa¥ âREyjJ^iÚE‘|VjÑk.óÊå¹g?Ç–Î7>+à ~dψ„¹óDbÊ{îS‡?(‘y7¬65/D®#€ËyÌï ÝqøúçOÿìÿ…ܨª”¶êÏÿþkÿUÐ ±{ê’,J·„â!„“v¨(D¸-T?ˆ-´’pZ(*²)„ñ‚3ñr‚+óÁF 0ƒÒ é’ --- NEW FILE --- GIF89a|        #*'(-1"4&9*:*" "3 7:* $",. *("2":"1+4-5:-*!****"%:'*:*"<:#=::;"-C*-F"2G*2J*7Q2$@2+H:,M22L29Q2>X:5R:6Z:>Z2B^:B^:Fb:Jb:KjB J R Z( B 2b-b4j4o:b:2B)EE8TB>XJ>Vq@yG$rG:wN=BFXJC^]EGRAQRHQZI\BBbBIgBNjJJdJNiBRjBRrJRqJVzJZzRLbRIjZNaTRlSVxR_rRZyZ^}Z`qWFbS`l]hbXvbaxkbuzfr}oxrrrR^‚Rb‚Zb‚ZfŠZjˆbf‡bj‰ldƒjlˆbn–js‚jsŠbr‘jr–jv™jzrm†{o†rsˆx‡rv–r{šzs–z}šyƒy…¦zŠ¥‡aOŠe[Škb—o`”vu›{wŠ{Š‚}˜ž|‚©†}‚†‚Š„Š‚‚žŠ…œ–…žŒœ–––žžžŠ¥Š‹¥‚“®Š“®Š›²–£–“®™’¦ž•¯–š³žœ´–¡¶ž£¸¬“›§²®®®¦£º®¦½¶¦¶¾¾¾¤«À®«Ã¦³Æ®³Ç¶®Å¶³Êµ¼Î¾µÌ¾ºÎ¾ÂÔ¾ÊÖÅ®®Æ¯¶Î¿ÅƺÑÎÎÎÆÁÔÆÌÞÎÃÙÎÌÞÓÆÆÖÍÞÒÓÞÖÎæÖÖæÖÞæÞÒåÞÜéæÙëææçæàîîáîæçöæîõîèöîîûöæööêööö÷öñüþöþþþþüû ZjT(G‰þàÑ£ÏÒ¦O2m:u© DŽxÝÊuÔ ¨z H"‚,"ìˆ ˆÅT¢L¦†”—nÑEYdÿ©E–[lq%z.h™v„5H"Œ„ 'âU§v§"Š(Ɇ"Ê&¥¢á^x¡Åd–fС†àÚ‘F¢zôÇ‘ é4£Í0–v±Eˆ ’®¦$©yYny j·XN›Eÿ]ùÃ?`fo±z‘…­†aF¯G^…È"›4âì°Žh2)ʆ, #Œ Z¡l’H z ÿÁ›rñå4Óó`4™FàÞqhÔI>úh"ã‹¥?|aÒ}hꯇ\„¡hçš"ÒH·ÛþpOñq´"yL|p5haÇ ~gq .€HÇæ‰Øñuì]oÇ›„Br(Àæ͈v„ @÷a/"‰$rÇ<ÀÐÔåNO*‰‰ô ˆÏìªøŠ¥XxqÇùIŸ† „±I,º s 2Ï\M©³tÑ h@ã„F3lH@}à…,L$Š/´À¸ÇDñ _ @D,jQ‹XØÂÅpÆ3¦QžM0X~H RÀ,´6± "ù£Å1ÿŠá fÃÌX„|V®Híâ°ðÅؾŸé,`=˜À 8¡¿bð¢Ï7¶1ˆ6Á®áÆ3– çx£Å p  -ŒÓæÌ…1N¡ƒ –@¨ @¼807†a OáÿÕȆ2B<ÎÂc°=ƒPÎWÄÂr|Ð2RPbdDƒ›˜€ŠÁc¢%°ÁŒeÀ {ž¢ p@0Ü@Ü%ò„”á5 ! [ðâÈ´†MɈ `¼0¥\Ó0Î*0ƒÏ8F``fðæ<ƹEUض„`@€øVÐ>†/qàcB†6˜caà  —b 4@z@2ZU $020 Ï nà%À¹P ð·t½0 uÀŠ )€i €itj ª ‹À1› Â@ Ú  e 2Ð`e Ï!Ä ¹ ­ ¯z ª` ±` p © –§À ÅzŽ˜f ¥¸ } ½PJ×p c°]#p‰•Z ‹ I– Äà ‰içå o ªP©¾ÀX*ž±° v€o;Ð;p¸;0™s”LÒ+¤0 äÊ`ງ5S-’u?°Æ&WàNœI4 .€ ¼2`rfY@¶iË Ïp˜¨p+ D‡`„pfF WÛ…@‡ ÀZ>ØLJÚ ¥  ¬ Ñ    –€9ØÂØ¢{”&ÀñÖ 6ð pàÛ5g%» ®É¦ªp ÆP Š`9 À«r¹²l6Ð =4 ¯ ¨0 ‹=0q1Ó$ƒÒ-M’8„b|a€f1µTÉO™{Zÿ06Õ2 û&¢°›yBµ ^Pn7`l²l 9` DF ˆ< ½; ÐFþ ÜP ¢Üø—  B`9® ÏÀ ÚE|ÐZPÒ„,‰f0(e3†òB‡`)“›p— •ab-°òá7€´H¼` Kp 6 ­{` Fì zÀ—¨;ž „ÀX¹@©ap@嶰:"&­›‰cÛ¨ƒ’=qÀæXó×Ö²o}òë^°;  Ô€Îyî ¦Ð–à‘৬ ¹p=Р˲ ­  ¡ (Ø$v ×MB8d¢*‚ŠÙCåͼÑ>Öò*Ö‚¾Ú¢t`×°åy [@ Ìä ‹… ß±^ë) ¢ƒŒëƒ¢E²ëc‚5×Ò'à •ÿAÉËä @`€@ƒP9³•+4hÑ# 4tŒšc©™0LÖ ΰI¿xÁšL/_´xùá%Ë1\´hq6mŒZ°ÄPAÀaC‡ìºèF : 6 pÀ/wîÄ ÙÊåzÍwX¬`¶hùa\xƒ„±¾÷þ{ù¨éعO')ê/IìþïŒ>òíýÀ¸J+ø¾Øâ ,~H,Û°BïÁ  k7·Æ0H,¬rØC   ,-t0+4v  (ÍøA˜Ã‹4b4 ¤Tî‡ßÂú¡ ­ÿ” ã Ó`ÔŽ;}ô:5ê4ýædʵ/ŠB2|*<úàãŽ<Mã(¼qŒÆÀB‡„²‹ x0#:x@A‚•:è!U;ÀŒ9‡"¤‘D ‘>ðxT50º ôº0ãG;úˆJ‘D¼EdAÀŠÙ>Î5µR¤¸¸ê wãë" 4º¸b—;!%UjQ%–UN9…Q6i$>$Eаr€ t(k; fPn'…p 3ò0#†Yr£™gñ[V!¥à4èô¢‡,®ýª@ðe%–[pÑe_vÞy]t¹¥–ZZQeQ)¸4Ƹê+-² ȇ¯ÿ ÃEV±%k]j‰¥•URñDNAD‘ !

    PYTHON MAIN WEBSITE

    ! ! ! ! ! ! ! !

    On this site you will find all the information about the Python ! language. This includes:

    !
      !
    • Detailed Documentation (Language Specification, Library ! Reference, Tutorials, Information about Extending and ! Embedding)
    • !
    • Downloads (stable releases for your favorite platform, alpha and ! beta releases of new versions)
    • !
    • Special Interest Groups (from Database and Image Processing to ! XML Processing)
    • !
    • News, Announcements and lots of links to other Python ! resources
    • !
    !
    ! !

    PYTHON PROJECT PAGE

    ! ! ! ! ! ! ! !

    Here you will find the busy developers and their resources.

    !
      !
    • access to the current development version via a ! CVS repository
    • !
    • the patch manager where new features and bugfixes can be ! submitted
    • !
    !
    ! !

    PYTHON AT SOURCEFORGE FAQ

    ! ! ! ! ! ! ! !

    If you have questions about Python at SourceForge, you're ! probably right here. Topics include:

    !
      !
    • How to use CVS.
    • !
    • How to make/submit/administrate patches.
    • !
    !
    ! !

    PYTHON ENHANCEMENT PROPOSALS

    ! ! ! ! ! ! ! !

    This is the definitive collection of proposed ! enhancements for Python. These include:

    !
      !
    • List Comprehension
    • !
    • Augmented Assignment
    • !
    • 2.0 Batteries Included
    • !
    !
    ! --- 10,30 ---- !

    PythonatSourceForge

    ! ! Python Project Page - ! CVS repository,  Python Developers and the Patch Manager.
    ! Python Enhancement Proposals - Information on new language ! features
    ! Python at SourceForge FAQ - Tips on CVS, SSH and ! patch submission ! !

    External links

    ! Python Language Website - Documentation, ! Downloads, News and lots of other resources for the Python language.
    ! PythonLabs.com - Python's core development ! team and its plans for Python development.
    !   From python-dev@python.org Sat Jul 22 10:02:54 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Sat, 22 Jul 2000 02:02:54 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0212.txt,NONE,1.1 Message-ID: <200007220902.CAA16494@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv15864 Added Files: pep-0212.txt Log Message: added pep-0212.txt (empty template adapted from 210) --- NEW FILE --- PEP: 212 Title: Additional Builtin Generators Version: $Revision: 1.1 $ Owner: bwarsaw@beopen.com (Barry A. Warsaw) Python-Version: 2.0 Status: Incomplete Local Variables: mode: indented-text indent-tabs-mode: nil End: From python-dev@python.org Sat Jul 22 10:23:05 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Sat, 22 Jul 2000 02:23:05 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html sf-faq.html,1.8,1.9 at.gif,1.1,NONE py.gif,1.1,NONE sf.gif,1.1,NONE Message-ID: <200007220923.CAA28573@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv28538 Modified Files: sf-faq.html Removed Files: at.gif py.gif sf.gif Log Message: removed binary files added FAQ entry about adding binary files Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** sf-faq.html 2000/07/20 15:17:34 1.8 --- sf-faq.html 2000/07/22 09:23:02 1.9 *************** *** 34,37 **** --- 34,38 ----
  • How can I remove a directory from the CVS tree?
  • How to revert changes?
  • +
  • How to add binary files?
  • *************** *** 320,323 **** --- 321,338 ---- cvs update
    cvs commit ceval.c
    + + This example would create and apply a reverse patch from revision 1.17 to + revision 1.16 of ceval.c. + +

    2.7.:

    + +

    Q: How to add binary files?

    + +

    A:

    + You probably want to turn of keyword expansion and line-ending conversion: + +
    + cvs add -kb newfile.bin
    + cvs commit newfile.bin
    This example would create and apply a reverse patch from revision 1.17 to From python-dev@python.org Sat Jul 22 10:25:44 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Sat, 22 Jul 2000 02:25:44 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html at.gif,1.2,1.3 py.gif,1.2,1.3 sf.gif,1.2,1.3 sf-faq.html,1.9,1.10 Message-ID: <200007220925.CAA28989@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv28890 Modified Files: sf-faq.html Added Files: at.gif py.gif sf.gif Log Message: added back binary files with -kb option deleted rogue line from sf-faq.html (copy and paste, I love thee) Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** sf-faq.html 2000/07/22 09:23:02 1.9 --- sf-faq.html 2000/07/22 09:25:41 1.10 *************** *** 336,342 **** cvs commit newfile.bin
    - This example would create and apply a reverse patch from revision 1.17 to - revision 1.16 of ceval.c. -

    3. Patches

    --- 336,339 ---- From python-dev@python.org Sat Jul 22 16:13:26 2000 From: python-dev@python.org (Barry Warsaw) Date: Sat, 22 Jul 2000 08:13:26 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0212.txt,1.1,1.2 Message-ID: <200007221513.IAA13347@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv13336 Modified Files: pep-0212.txt Log Message: A little more, but still pretty incomplete Index: pep-0212.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0212.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0212.txt 2000/07/22 09:02:49 1.1 --- pep-0212.txt 2000/07/22 15:13:23 1.2 *************** *** 8,11 **** --- 8,44 ---- + Introduction + + This PEP describes some proposed additional generator-creating + builtin functions for Python 2.0. This PEP tracks the status and + ownership of this feature, slated for introduction in Python 2.0. + It contains a description of the feature and outlines changes + necessary to support the feature. This PEP summarizes discussions + held in mailing list forums, and provides URLs for further + information, where appropriate. The CVS revision history of this + file contains the definitive historical record. + + + + New functions + + irange() + tuples() + lists() + dict() + + + + Reference Implementation + + + + + Copyright + + This document has been placed in the public domain. + + + Local Variables: mode: indented-text From python-dev@python.org Sat Jul 22 17:34:18 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 09:34:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules pyexpat.c,2.11,2.12 Message-ID: <200007221634.JAA25895@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv25824 Modified Files: pyexpat.c Log Message: Mark Favas's fix for typos in docstrings. Index: pyexpat.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pyexpat.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** pyexpat.c 2000/07/12 04:49:00 2.11 --- pyexpat.c 2000/07/22 16:34:15 2.12 *************** *** 425,429 **** static char xmlparse_Parse__doc__[] = ! "Parse(data[, isfinal]) Parse XML data. `isfinal' should be true at end of input."; --- 425,429 ---- static char xmlparse_Parse__doc__[] = ! "Parse(data[, isfinal])\n\ Parse XML data. `isfinal' should be true at end of input."; *************** *** 501,505 **** static char xmlparse_ParseFile__doc__[] = ! "ParseFile(file) Parse XML data from file-like object."; --- 501,505 ---- static char xmlparse_ParseFile__doc__[] = ! "ParseFile(file)\n\ Parse XML data from file-like object."; *************** *** 556,560 **** static char xmlparse_SetBase__doc__[] = ! "SetBase(base_url) Set the base URL for the parser."; --- 556,560 ---- static char xmlparse_SetBase__doc__[] = ! "SetBase(base_url)\n\ Set the base URL for the parser."; *************** *** 574,578 **** static char xmlparse_GetBase__doc__[] = ! "GetBase() -> url Return base URL string for the parser."; --- 574,578 ---- static char xmlparse_GetBase__doc__[] = ! "GetBase() -> url\n\ Return base URL string for the parser."; From python-dev@python.org Sat Jul 22 17:39:42 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 09:39:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.157,2.158 Message-ID: <200007221639.JAA26211@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv26175/Modules Modified Files: posixmodule.c Log Message: Remove unused helper-function 'posix_strint'. Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.157 retrieving revision 2.158 diff -C2 -r2.157 -r2.158 *** posixmodule.c 2000/07/21 06:00:07 2.157 --- posixmodule.c 2000/07/22 16:39:39 2.158 *************** *** 496,517 **** } - static PyObject * - posix_strint(PyObject *args, char *format, int (*func)(const char *, int)) - { - char *path; - int i; - int res; - if (!PyArg_ParseTuple(args, format, &path, &i)) - return NULL; - Py_BEGIN_ALLOW_THREADS - res = (*func)(path, i); - Py_END_ALLOW_THREADS - if (res < 0) - return posix_error_with_filename(path); - Py_INCREF(Py_None); - return Py_None; - } - - /* pack a system stat C structure into the Python stat tuple (used by posix_stat() and posix_fstat()) */ --- 496,499 ---- From python-dev@python.org Sat Jul 22 17:41:13 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 09:41:13 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules selectmodule.c,2.39,2.40 Message-ID: <200007221641.JAA26362@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv26283/Modules Modified Files: selectmodule.c Log Message: Remove unused variable. Index: selectmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v retrieving revision 2.39 retrieving revision 2.40 diff -C2 -r2.39 -r2.40 *** selectmodule.c 2000/07/21 06:00:07 2.39 --- selectmodule.c 2000/07/22 16:41:08 2.40 *************** *** 89,93 **** for (i = 0; i < len; i++) { - PyObject *meth; SOCKET v; --- 89,92 ---- From python-dev@python.org Sat Jul 22 19:45:08 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 11:45:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python exceptions.c,1.10,1.11 Message-ID: <200007221845.LAA15070@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv14831 Modified Files: exceptions.c Log Message: Fix two instances of empty argument lists, and fix style ('PyObject** x' -> 'PyObject **x') Index: exceptions.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** exceptions.c 2000/07/16 12:04:32 1.10 --- exceptions.c 2000/07/22 18:45:06 1.11 *************** *** 102,106 **** /* Helper function for populating a dictionary with method wrappers. */ static int ! populate_methods(PyObject* klass, PyObject* dict, PyMethodDef* methods) { if (!methods) --- 102,106 ---- /* Helper function for populating a dictionary with method wrappers. */ static int ! populate_methods(PyObject *klass, PyObject *dict, PyMethodDef *methods) { if (!methods) *************** *** 109,114 **** while (methods->ml_name) { /* get a wrapper for the built-in function */ ! PyObject* func = PyCFunction_New(methods, NULL); ! PyObject* meth; int status; --- 109,114 ---- while (methods->ml_name) { /* get a wrapper for the built-in function */ ! PyObject *func = PyCFunction_New(methods, NULL); ! PyObject *meth; int status; *************** *** 140,149 **** /* This function is used to create all subsequent exception classes. */ static int ! make_class(PyObject** klass, PyObject* base, ! char* name, PyMethodDef* methods, ! char* docstr) { ! PyObject* dict = PyDict_New(); ! PyObject* str = NULL; int status = -1; --- 140,149 ---- /* This function is used to create all subsequent exception classes. */ static int ! make_class(PyObject **klass, PyObject *base, ! char *name, PyMethodDef *methods, ! char *docstr) { ! PyObject *dict = PyDict_New(); ! PyObject *str = NULL; int status = -1; *************** *** 180,186 **** /* Use this for *args signatures, otherwise just use PyArg_ParseTuple() */ ! static PyObject* get_self(PyObject* args) { ! PyObject* self = PyTuple_GetItem(args, 0); if (!self) { /* Watch out for being called to early in the bootstrapping process */ --- 180,187 ---- /* Use this for *args signatures, otherwise just use PyArg_ParseTuple() */ ! static PyObject * ! get_self(PyObject *args) { ! PyObject *self = PyTuple_GetItem(args, 0); if (!self) { /* Watch out for being called to early in the bootstrapping process */ *************** *** 216,221 **** ! static PyObject* ! Exception__init__(PyObject* self, PyObject* args) { int status; --- 217,222 ---- ! static PyObject * ! Exception__init__(PyObject *self, PyObject *args) { int status; *************** *** 239,246 **** ! static PyObject* ! Exception__str__(PyObject* self, PyObject* args) { ! PyObject* out; if (!PyArg_ParseTuple(args, "O", &self)) --- 240,247 ---- ! static PyObject * ! Exception__str__(PyObject *self, PyObject *args) { ! PyObject *out; if (!PyArg_ParseTuple(args, "O", &self)) *************** *** 257,261 **** case 1: { ! PyObject* tmp = PySequence_GetItem(args, 0); if (tmp) { out = PyObject_Str(tmp); --- 258,262 ---- case 1: { ! PyObject *tmp = PySequence_GetItem(args, 0); if (tmp) { out = PyObject_Str(tmp); *************** *** 276,284 **** ! static PyObject* ! Exception__getitem__(PyObject* self, PyObject* args) { ! PyObject* out; ! PyObject* index; if (!PyArg_ParseTuple(args, "OO", &self, &index)) --- 277,285 ---- ! static PyObject * ! Exception__getitem__(PyObject *self, PyObject *args) { ! PyObject *out; ! PyObject *index; if (!PyArg_ParseTuple(args, "OO", &self, &index)) *************** *** 306,314 **** static int ! make_Exception(char* modulename) { ! PyObject* dict = PyDict_New(); ! PyObject* str = NULL; ! PyObject* name = NULL; int status = -1; --- 307,315 ---- static int ! make_Exception(char *modulename) { ! PyObject *dict = PyDict_New(); ! PyObject *str = NULL; ! PyObject *name = NULL; int status = -1; *************** *** 366,373 **** ! static PyObject* ! SystemExit__init__(PyObject* self, PyObject* args) { ! PyObject* code; int status; --- 367,374 ---- ! static PyObject * ! SystemExit__init__(PyObject *self, PyObject *args) { ! PyObject *code; int status; *************** *** 431,442 **** ! static PyObject* ! EnvironmentError__init__(PyObject* self, PyObject* args) { ! PyObject* item0 = NULL; ! PyObject* item1 = NULL; ! PyObject* item2 = NULL; ! PyObject* subslice = NULL; ! PyObject* rtnval = NULL; if (!(self = get_self(args))) --- 432,443 ---- ! static PyObject * ! EnvironmentError__init__(PyObject *self, PyObject *args) { ! PyObject *item0 = NULL; ! PyObject *item1 = NULL; ! PyObject *item2 = NULL; ! PyObject *subslice = NULL; ! PyObject *rtnval = NULL; if (!(self = get_self(args))) *************** *** 515,526 **** ! static PyObject* ! EnvironmentError__str__(PyObject* self, PyObject* args) { ! PyObject* originalself = self; ! PyObject* filename; ! PyObject* serrno; ! PyObject* strerror; ! PyObject* rtnval = NULL; if (!PyArg_ParseTuple(args, "O", &self)) --- 516,527 ---- ! static PyObject * ! EnvironmentError__str__(PyObject *self, PyObject *args) { ! PyObject *originalself = self; ! PyObject *filename; ! PyObject *serrno; ! PyObject *strerror; ! PyObject *rtnval = NULL; if (!PyArg_ParseTuple(args, "O", &self)) *************** *** 534,540 **** if (filename != Py_None) { ! PyObject* fmt = PyString_FromString("[Errno %s] %s: %s"); ! PyObject* repr = PyObject_Repr(filename); ! PyObject* tuple = PyTuple_New(3); if (!fmt || !repr || !tuple) { --- 535,541 ---- if (filename != Py_None) { ! PyObject *fmt = PyString_FromString("[Errno %s] %s: %s"); ! PyObject *repr = PyObject_Repr(filename); ! PyObject *tuple = PyTuple_New(3); if (!fmt || !repr || !tuple) { *************** *** 558,563 **** } else if (PyObject_IsTrue(serrno) && PyObject_IsTrue(strerror)) { ! PyObject* fmt = PyString_FromString("[Errno %s] %s"); ! PyObject* tuple = PyTuple_New(2); if (!fmt || !tuple) { --- 559,564 ---- } else if (PyObject_IsTrue(serrno) && PyObject_IsTrue(strerror)) { ! PyObject *fmt = PyString_FromString("[Errno %s] %s"); ! PyObject *tuple = PyTuple_New(2); if (!fmt || !tuple) { *************** *** 644,650 **** static int ! SyntaxError__classinit__(PyObject* klass) { ! PyObject* emptystring = PyString_FromString(""); /* Additional class-creation time initializations */ --- 645,651 ---- static int ! SyntaxError__classinit__(PyObject *klass) { ! PyObject *emptystring = PyString_FromString(""); /* Additional class-creation time initializations */ *************** *** 664,671 **** ! static PyObject* ! SyntaxError__init__(PyObject* self, PyObject* args) { ! PyObject* rtnval = NULL; int lenargs; --- 665,672 ---- ! static PyObject * ! SyntaxError__init__(PyObject *self, PyObject *args) { ! PyObject *rtnval = NULL; int lenargs; *************** *** 681,685 **** lenargs = PySequence_Size(args); if (lenargs >= 1) { ! PyObject* item0 = PySequence_GetItem(args, 0); int status; --- 682,686 ---- lenargs = PySequence_Size(args); if (lenargs >= 1) { ! PyObject *item0 = PySequence_GetItem(args, 0); int status; *************** *** 692,696 **** } if (lenargs == 2) { ! PyObject* info = PySequence_GetItem(args, 1); PyObject *filename, *lineno, *offset, *text; int status = 1; --- 693,697 ---- } if (lenargs == 2) { ! PyObject *info = PySequence_GetItem(args, 1); PyObject *filename, *lineno, *offset, *text; int status = 1; *************** *** 729,737 **** ! static PyObject* ! SyntaxError__str__(PyObject* self, PyObject* args) { ! PyObject* msg; ! PyObject* str; if (!PyArg_ParseTuple(args, "O", &self)) --- 730,738 ---- ! static PyObject * ! SyntaxError__str__(PyObject *self, PyObject *args) { ! PyObject *msg; ! PyObject *str; if (!PyArg_ParseTuple(args, "O", &self)) *************** *** 855,869 **** ! /* mapping between exception names and their PyObject** */ ! static struct ! { ! char* name; ! PyObject** exc; ! PyObject** base; /* NULL == PyExc_StandardError */ ! char* docstr; ! PyMethodDef* methods; ! int (*classinit)(PyObject*); ! } ! exctable[] = { /* * The first three classes MUST appear in exactly this order --- 856,868 ---- ! /* mapping between exception names and their PyObject ** */ ! static struct { ! char *name; ! PyObject **exc; ! PyObject **base; /* NULL == PyExc_StandardError */ ! char *docstr; ! PyMethodDef *methods; ! int (*classinit)(PyObject *); ! } exctable[] = { /* * The first three classes MUST appear in exactly this order *************** *** 929,944 **** __declspec(dllexport) #endif /* WIN32 */ ! init_exceptions() { ! char* modulename = "exceptions"; int modnamesz = strlen(modulename); int i; ! PyObject* me = Py_InitModule(modulename, functions); ! PyObject* mydict = PyModule_GetDict(me); ! PyObject* bltinmod = PyImport_ImportModule("__builtin__"); ! PyObject* bdict = PyModule_GetDict(bltinmod); ! PyObject* doc = PyString_FromString(module__doc__); ! PyObject* args; PyDict_SetItemString(mydict, "__doc__", doc); --- 928,943 ---- __declspec(dllexport) #endif /* WIN32 */ ! init_exceptions(void) { ! char *modulename = "exceptions"; int modnamesz = strlen(modulename); int i; ! PyObject *me = Py_InitModule(modulename, functions); ! PyObject *mydict = PyModule_GetDict(me); ! PyObject *bltinmod = PyImport_ImportModule("__builtin__"); ! PyObject *bdict = PyModule_GetDict(bltinmod); ! PyObject *doc = PyString_FromString(module__doc__); ! PyObject *args; PyDict_SetItemString(mydict, "__doc__", doc); *************** *** 960,965 **** for (i=1; exctable[i].name; i++) { int status; ! char* cname = PyMem_NEW(char, modnamesz+strlen(exctable[i].name)+2); ! PyObject* base; (void)strcpy(cname, modulename); --- 959,964 ---- for (i=1; exctable[i].name; i++) { int status; ! char *cname = PyMem_NEW(char, modnamesz+strlen(exctable[i].name)+2); ! PyObject *base; (void)strcpy(cname, modulename); *************** *** 1015,1019 **** __declspec(dllexport) #endif /* WIN32 */ ! fini_exceptions() { int i; --- 1014,1018 ---- __declspec(dllexport) #endif /* WIN32 */ ! fini_exceptions(void) { int i; From python-dev@python.org Sat Jul 22 19:47:29 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 11:47:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python atof.c,2.5,2.6 bltinmodule.c,2.170,2.171 ceval.c,2.185,2.186 codecs.c,2.10,2.11 compile.c,2.116,2.117 dup2.c,2.3,2.4 dynload_aix.c,2.6,2.7 errors.c,2.49,2.50 frozenmain.c,2.22,2.23 getargs.c,2.41,2.42 getcompiler.c,1.7,1.8 getcopyright.c,1.7,1.8 getcwd.c,1.12,1.13 getmtime.c,2.13,2.14 getopt.c,2.7,2.8 getplatform.c,1.6,1.7 getversion.c,1.12,1.13 hypot.c,2.1,2.2 import.c,2.141,2.142 importdl.c,2.66,2.67 marshal.c,1.52,1.53 memmove.c,2.6,2.7 modsupport.c,2.48,2.49 mystrtoul.c,2.19,2.20 pyfpe.c,2.5,2.6 pystate.c,2.11,2.12 pythonrun.c,2.104,2.105 sigcheck.c,2.6,2.7 strdup.c,2.3,2.4 strerror.c,2.8,2.9 strtod.c,1.9,1.10 structmember.c,2.16,2.17 sysmodule.c,2.69,2.70 thread.c,2.31,2.32 thread_cthread.h,2.11,2.12 thread_foobar.h,2.9,2.10 thread_lwp.h,2.11,2.12 thread_nt.h,2.14,2.15 thread_os2.h,2.8,2.9 thread_pth.h,2.4,2.5 thread_pthread.h,2.27,2.28 thread_sgi.h,2.12,2.13 thread_solaris.h,2.13,2.14 thread_wince.h,2.4,2.5 traceback.c,2.30,2.31 Message-ID: <200007221847.LAA15268@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv15086 Modified Files: atof.c bltinmodule.c ceval.c codecs.c compile.c dup2.c dynload_aix.c errors.c frozenmain.c getargs.c getcompiler.c getcopyright.c getcwd.c getmtime.c getopt.c getplatform.c getversion.c hypot.c import.c importdl.c marshal.c memmove.c modsupport.c mystrtoul.c pyfpe.c pystate.c pythonrun.c sigcheck.c strdup.c strerror.c strtod.c structmember.c sysmodule.c thread.c thread_cthread.h thread_foobar.h thread_lwp.h thread_nt.h thread_os2.h thread_pth.h thread_pthread.h thread_sgi.h thread_solaris.h thread_wince.h traceback.c Log Message: Mass ANSIfication of function definitions. Doesn't cover all 'extern' declarations yet, those come later. Index: atof.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/atof.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** atof.c 2000/06/30 23:58:05 2.5 --- atof.c 2000/07/22 18:47:25 2.6 *************** *** 18,23 **** #include ! double atof(s) ! char *s; { double a = 0.0; --- 18,22 ---- #include ! double atof(char *s) { double a = 0.0; Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.170 retrieving revision 2.171 diff -C2 -r2.170 -r2.171 *** bltinmodule.c 2000/07/12 13:03:02 2.170 --- bltinmodule.c 2000/07/22 18:47:25 2.171 *************** *** 33,39 **** static PyObject * ! builtin___import__(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 33,37 ---- static PyObject * ! builtin___import__(PyObject *self, PyObject *args) { char *name; *************** *** 61,67 **** static PyObject * ! builtin_abs(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 59,63 ---- static PyObject * ! builtin_abs(PyObject *self, PyObject *args) { PyObject *v; *************** *** 79,85 **** static PyObject * ! builtin_apply(self, args) ! PyObject *self; ! PyObject *args; { PyObject *func, *alist = NULL, *kwdict = NULL; --- 75,79 ---- static PyObject * ! builtin_apply(PyObject *self, PyObject *args) { PyObject *func, *alist = NULL, *kwdict = NULL; *************** *** 121,127 **** static PyObject * ! builtin_buffer(self, args) ! PyObject *self; ! PyObject *args; { PyObject *ob; --- 115,119 ---- static PyObject * ! builtin_buffer(PyObject *self, PyObject *args) { PyObject *ob; *************** *** 144,150 **** static PyObject * ! builtin_unicode(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 136,140 ---- static PyObject * ! builtin_unicode(PyObject *self, PyObject *args) { PyObject *v; *************** *** 166,172 **** static PyObject * ! builtin_callable(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 156,160 ---- static PyObject * ! builtin_callable(PyObject *self, PyObject *args) { PyObject *v; *************** *** 185,191 **** static PyObject * ! builtin_filter(self, args) ! PyObject *self; ! PyObject *args; { PyObject *func, *seq, *result; --- 173,177 ---- static PyObject * ! builtin_filter(PyObject *self, PyObject *args) { PyObject *func, *seq, *result; *************** *** 292,298 **** static PyObject * ! builtin_chr(self, args) ! PyObject *self; ! PyObject *args; { long x; --- 278,282 ---- static PyObject * ! builtin_chr(PyObject *self, PyObject *args) { long x; *************** *** 317,323 **** static PyObject * ! builtin_unichr(self, args) ! PyObject *self; ! PyObject *args; { long x; --- 301,305 ---- static PyObject * ! builtin_unichr(PyObject *self, PyObject *args) { long x; *************** *** 342,348 **** static PyObject * ! builtin_cmp(self, args) ! PyObject *self; ! PyObject *args; { PyObject *a, *b; --- 324,328 ---- static PyObject * ! builtin_cmp(PyObject *self, PyObject *args) { PyObject *a, *b; *************** *** 363,369 **** static PyObject * ! builtin_coerce(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v, *w; --- 343,347 ---- static PyObject * ! builtin_coerce(PyObject *self, PyObject *args) { PyObject *v, *w; *************** *** 388,394 **** static PyObject * ! builtin_compile(self, args) ! PyObject *self; ! PyObject *args; { char *str; --- 366,370 ---- static PyObject * ! builtin_compile(PyObject *self, PyObject *args) { char *str; *************** *** 426,431 **** static PyObject * ! complex_from_string(v) ! PyObject *v; { extern double strtod(const char *, char **); --- 402,406 ---- static PyObject * ! complex_from_string(PyObject *v) { extern double strtod(const char *, char **); *************** *** 580,586 **** static PyObject * ! builtin_complex(self, args) ! PyObject *self; ! PyObject *args; { PyObject *r, *i, *tmp; --- 555,559 ---- static PyObject * ! builtin_complex(PyObject *self, PyObject *args) { PyObject *r, *i, *tmp; *************** *** 673,679 **** static PyObject * ! builtin_dir(self, args) ! PyObject *self; ! PyObject *args; { static char *attrlist[] = {"__members__", "__methods__", NULL}; --- 646,650 ---- static PyObject * ! builtin_dir(PyObject *self, PyObject *args) { static char *attrlist[] = {"__members__", "__methods__", NULL}; *************** *** 749,755 **** static PyObject * ! builtin_divmod(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v, *w; --- 720,724 ---- static PyObject * ! builtin_divmod(PyObject *self, PyObject *args) { PyObject *v, *w; *************** *** 767,773 **** static PyObject * ! builtin_eval(self, args) ! PyObject *self; ! PyObject *args; { PyObject *cmd; --- 736,740 ---- static PyObject * ! builtin_eval(PyObject *self, PyObject *args) { PyObject *cmd; *************** *** 821,827 **** static PyObject * ! builtin_execfile(self, args) ! PyObject *self; ! PyObject *args; { char *filename; --- 788,792 ---- static PyObject * ! builtin_execfile(PyObject *self, PyObject *args) { char *filename; *************** *** 870,876 **** static PyObject * ! builtin_getattr(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v, *result, *dflt = NULL; --- 835,839 ---- static PyObject * ! builtin_getattr(PyObject *self, PyObject *args) { PyObject *v, *result, *dflt = NULL; *************** *** 897,903 **** static PyObject * ! builtin_globals(self, args) ! PyObject *self; ! PyObject *args; { PyObject *d; --- 860,864 ---- static PyObject * ! builtin_globals(PyObject *self, PyObject *args) { PyObject *d; *************** *** 917,923 **** static PyObject * ! builtin_hasattr(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 878,882 ---- static PyObject * ! builtin_hasattr(PyObject *self, PyObject *args) { PyObject *v; *************** *** 945,951 **** static PyObject * ! builtin_id(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 904,908 ---- static PyObject * ! builtin_id(PyObject *self, PyObject *args) { PyObject *v; *************** *** 964,970 **** static PyObject * ! builtin_map(self, args) ! PyObject *self; ! PyObject *args; { typedef struct { --- 921,925 ---- static PyObject * ! builtin_map(PyObject *self, PyObject *args) { typedef struct { *************** *** 1131,1137 **** static PyObject * ! builtin_setattr(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1086,1090 ---- static PyObject * ! builtin_setattr(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1155,1161 **** static PyObject * ! builtin_delattr(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1108,1112 ---- static PyObject * ! builtin_delattr(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1178,1184 **** static PyObject * ! builtin_hash(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1129,1133 ---- static PyObject * ! builtin_hash(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1201,1207 **** static PyObject * ! builtin_hex(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1150,1154 ---- static PyObject * ! builtin_hex(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1229,1235 **** static PyObject * ! builtin_input(self, args) ! PyObject *self; ! PyObject *args; { PyObject *line; --- 1176,1180 ---- static PyObject * ! builtin_input(PyObject *self, PyObject *args) { PyObject *line; *************** *** 1264,1270 **** static PyObject * ! builtin_intern(self, args) ! PyObject *self; ! PyObject *args; { PyObject *s; --- 1209,1213 ---- static PyObject * ! builtin_intern(PyObject *self, PyObject *args) { PyObject *s; *************** *** 1286,1292 **** static PyObject * ! builtin_int(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1229,1233 ---- static PyObject * ! builtin_int(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1321,1327 **** static PyObject * ! builtin_long(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1262,1266 ---- static PyObject * ! builtin_long(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1357,1363 **** static PyObject * ! builtin_float(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1296,1300 ---- static PyObject * ! builtin_float(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1377,1383 **** static PyObject * ! builtin_len(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1314,1318 ---- static PyObject * ! builtin_len(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1399,1405 **** static PyObject * ! builtin_list(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1334,1338 ---- static PyObject * ! builtin_list(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1417,1423 **** static PyObject * ! builtin_slice(self, args) ! PyObject *self; ! PyObject *args; { PyObject *start, *stop, *step; --- 1350,1354 ---- static PyObject * ! builtin_slice(PyObject *self, PyObject *args) { PyObject *start, *stop, *step; *************** *** 1444,1450 **** static PyObject * ! builtin_locals(self, args) ! PyObject *self; ! PyObject *args; { PyObject *d; --- 1375,1379 ---- static PyObject * ! builtin_locals(PyObject *self, PyObject *args) { PyObject *d; *************** *** 1464,1470 **** static PyObject * ! min_max(args, sign) ! PyObject *args; ! int sign; { int i; --- 1393,1397 ---- static PyObject * ! min_max(PyObject *args, int sign) { int i; *************** *** 1517,1523 **** static PyObject * ! builtin_min(self, v) ! PyObject *self; ! PyObject *v; { return min_max(v, -1); --- 1444,1448 ---- static PyObject * ! builtin_min(PyObject *self, PyObject *v) { return min_max(v, -1); *************** *** 1533,1539 **** static PyObject * ! builtin_max(self, v) ! PyObject *self; ! PyObject *v; { return min_max(v, 1); --- 1458,1462 ---- static PyObject * ! builtin_max(PyObject *self, PyObject *v) { return min_max(v, 1); *************** *** 1549,1555 **** static PyObject * ! builtin_oct(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1472,1476 ---- static PyObject * ! builtin_oct(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1574,1580 **** static PyObject * ! builtin_open(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 1495,1499 ---- static PyObject * ! builtin_open(PyObject *self, PyObject *args) { char *name; *************** *** 1604,1610 **** static PyObject * ! builtin_ord(self, args) ! PyObject *self; ! PyObject *args; { PyObject *obj; --- 1523,1527 ---- static PyObject * ! builtin_ord(PyObject *self, PyObject *args) { PyObject *obj; *************** *** 1645,1651 **** static PyObject * ! builtin_pow(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v, *w, *z = Py_None; --- 1562,1566 ---- static PyObject * ! builtin_pow(PyObject *self, PyObject *args) { PyObject *v, *w, *z = Py_None; *************** *** 1696,1702 **** static PyObject * ! builtin_range(self, args) ! PyObject *self; ! PyObject *args; { long ilow = 0, ihigh = 0, istep = 1; --- 1611,1615 ---- static PyObject * ! builtin_range(PyObject *self, PyObject *args) { long ilow = 0, ihigh = 0, istep = 1; *************** *** 1758,1764 **** static PyObject * ! builtin_xrange(self, args) ! PyObject *self; ! PyObject *args; { long ilow = 0, ihigh = 0, istep = 1; --- 1671,1675 ---- static PyObject * ! builtin_xrange(PyObject *self, PyObject *args) { long ilow = 0, ihigh = 0, istep = 1; *************** *** 1802,1808 **** static PyObject * ! builtin_raw_input(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v = NULL; --- 1713,1717 ---- static PyObject * ! builtin_raw_input(PyObject *self, PyObject *args) { PyObject *v = NULL; *************** *** 1881,1887 **** static PyObject * ! builtin_reduce(self, args) ! PyObject *self; ! PyObject *args; { PyObject *seq, *func, *result = NULL; --- 1790,1794 ---- static PyObject * ! builtin_reduce(PyObject *self, PyObject *args) { PyObject *seq, *func, *result = NULL; *************** *** 1957,1963 **** static PyObject * ! builtin_reload(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1864,1868 ---- static PyObject * ! builtin_reload(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1975,1981 **** static PyObject * ! builtin_repr(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1880,1884 ---- static PyObject * ! builtin_repr(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1994,2000 **** static PyObject * ! builtin_round(self, args) ! PyObject *self; ! PyObject *args; { double x; --- 1897,1901 ---- static PyObject * ! builtin_round(PyObject *self, PyObject *args) { double x; *************** *** 2032,2038 **** static PyObject * ! builtin_str(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1933,1937 ---- static PyObject * ! builtin_str(PyObject *self, PyObject *args) { PyObject *v; *************** *** 2051,2057 **** static PyObject * ! builtin_tuple(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1950,1954 ---- static PyObject * ! builtin_tuple(PyObject *self, PyObject *args) { PyObject *v; *************** *** 2070,2076 **** static PyObject * ! builtin_type(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1967,1971 ---- static PyObject * ! builtin_type(PyObject *self, PyObject *args) { PyObject *v; *************** *** 2090,2096 **** static PyObject * ! builtin_vars(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v = NULL; --- 1985,1989 ---- static PyObject * ! builtin_vars(PyObject *self, PyObject *args) { PyObject *v = NULL; *************** *** 2127,2135 **** static int ! abstract_issubclass(derived, cls, err, first) ! PyObject *derived; ! PyObject *cls; ! char *err; ! int first; { static PyObject *__bases__ = NULL; --- 2020,2024 ---- static int ! abstract_issubclass(PyObject *derived, PyObject *cls, char *err, int first) { static PyObject *__bases__ = NULL; *************** *** 2178,2184 **** static PyObject * ! builtin_isinstance(self, args) ! PyObject *self; ! PyObject *args; { PyObject *inst; --- 2067,2071 ---- static PyObject * ! builtin_isinstance(PyObject *self, PyObject *args) { PyObject *inst; *************** *** 2239,2245 **** static PyObject * ! builtin_issubclass(self, args) ! PyObject *self; ! PyObject *args; { PyObject *derived; --- 2126,2130 ---- static PyObject * ! builtin_issubclass(PyObject *self, PyObject *args) { PyObject *derived; *************** *** 2337,2341 **** PyObject * ! _PyBuiltin_Init() { PyObject *mod, *dict, *debug; --- 2222,2226 ---- PyObject * ! _PyBuiltin_Init(void) { PyObject *mod, *dict, *debug; *************** *** 2363,2369 **** static PyObject * ! filtertuple(func, tuple) ! PyObject *func; ! PyObject *tuple; { PyObject *result; --- 2248,2252 ---- static PyObject * ! filtertuple(PyObject *func, PyObject *tuple) { PyObject *result; *************** *** 2421,2427 **** static PyObject * ! filterstring(func, strobj) ! PyObject *func; ! PyObject *strobj; { PyObject *result; --- 2304,2308 ---- static PyObject * ! filterstring(PyObject *func, PyObject *strobj) { PyObject *result; Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.185 retrieving revision 2.186 diff -C2 -r2.185 -r2.186 *** ceval.c 2000/07/16 12:04:32 2.185 --- ceval.c 2000/07/22 18:47:25 2.186 *************** *** 100,104 **** void ! PyEval_InitThreads() { if (interpreter_lock) --- 100,104 ---- void ! PyEval_InitThreads(void) { if (interpreter_lock) *************** *** 111,115 **** void ! PyEval_AcquireLock() { PyThread_acquire_lock(interpreter_lock, 1); --- 111,115 ---- void ! PyEval_AcquireLock(void) { PyThread_acquire_lock(interpreter_lock, 1); *************** *** 117,121 **** void ! PyEval_ReleaseLock() { PyThread_release_lock(interpreter_lock); --- 117,121 ---- void ! PyEval_ReleaseLock(void) { PyThread_release_lock(interpreter_lock); *************** *** 123,128 **** void ! PyEval_AcquireThread(tstate) ! PyThreadState *tstate; { if (tstate == NULL) --- 123,127 ---- void ! PyEval_AcquireThread(PyThreadState *tstate) { if (tstate == NULL) *************** *** 135,140 **** void ! PyEval_ReleaseThread(tstate) ! PyThreadState *tstate; { if (tstate == NULL) --- 134,138 ---- void ! PyEval_ReleaseThread(PyThreadState *tstate) { if (tstate == NULL) *************** *** 151,155 **** PyThreadState * ! PyEval_SaveThread() { PyThreadState *tstate = PyThreadState_Swap(NULL); --- 149,153 ---- PyThreadState * ! PyEval_SaveThread(void) { PyThreadState *tstate = PyThreadState_Swap(NULL); *************** *** 164,169 **** void ! PyEval_RestoreThread(tstate) ! PyThreadState *tstate; { if (tstate == NULL) --- 162,166 ---- void ! PyEval_RestoreThread(PyThreadState *tstate) { if (tstate == NULL) *************** *** 222,228 **** int ! Py_AddPendingCall(func, arg) ! int (*func)(ANY *); ! ANY *arg; { static int busy = 0; --- 219,223 ---- int ! Py_AddPendingCall(int (*func)(ANY *), ANY *arg) { static int busy = 0; *************** *** 248,252 **** int ! Py_MakePendingCalls() { static int busy = 0; --- 243,247 ---- int ! Py_MakePendingCalls(void) { static int busy = 0; *************** *** 295,302 **** PyObject * ! PyEval_EvalCode(co, globals, locals) ! PyCodeObject *co; ! PyObject *globals; ! PyObject *locals; { return eval_code2(co, --- 290,294 ---- PyObject * ! PyEval_EvalCode(PyCodeObject *co, PyObject *globals, PyObject *locals) { return eval_code2(co, *************** *** 316,331 **** static PyObject * ! eval_code2(co, globals, locals, ! args, argcount, kws, kwcount, defs, defcount, owner) ! PyCodeObject *co; ! PyObject *globals; ! PyObject *locals; ! PyObject **args; ! int argcount; ! PyObject **kws; /* length: 2*kwcount */ ! int kwcount; ! PyObject **defs; ! int defcount; ! PyObject *owner; { #ifdef DXPAIRS --- 308,314 ---- static PyObject * ! eval_code2(PyCodeObject *co, PyObject *globals, PyObject *locals, ! PyObject **args, int argcount, PyObject **kws, int kwcount, ! PyObject **defs, int defcount, PyObject *owner) { #ifdef DXPAIRS *************** *** 1921,1929 **** static void ! set_exc_info(tstate, type, value, tb) ! PyThreadState *tstate; ! PyObject *type; ! PyObject *value; ! PyObject *tb; { PyFrameObject *frame; --- 1904,1908 ---- static void ! set_exc_info(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyFrameObject *frame; *************** *** 1971,1976 **** static void ! reset_exc_info(tstate) ! PyThreadState *tstate; { PyFrameObject *frame; --- 1950,1954 ---- static void ! reset_exc_info(PyThreadState *tstate) { PyFrameObject *frame; *************** *** 2010,2015 **** This *consumes* a reference count to each of its arguments. */ static enum why_code ! do_raise(type, value, tb) ! PyObject *type, *value, *tb; { if (type == NULL) { --- 1988,1992 ---- This *consumes* a reference count to each of its arguments. */ static enum why_code ! do_raise(PyObject *type, PyObject *value, PyObject *tb) { if (type == NULL) { *************** *** 2110,2117 **** static int ! unpack_sequence(v, argcnt, sp) ! PyObject *v; ! int argcnt; ! PyObject **sp; { int i; --- 2087,2091 ---- static int ! unpack_sequence(PyObject *v, int argcnt, PyObject **sp) { int i; *************** *** 2149,2155 **** #ifdef LLTRACE static int ! prtrace(v, str) ! PyObject *v; ! char *str; { printf("%s ", str); --- 2123,2127 ---- #ifdef LLTRACE static int ! prtrace(PyObject *v, char *str) { printf("%s ", str); *************** *** 2162,2168 **** static void ! call_exc_trace(p_trace, p_newtrace, f) ! PyObject **p_trace, **p_newtrace; ! PyFrameObject *f; { PyObject *type, *value, *traceback, *arg; --- 2134,2138 ---- static void ! call_exc_trace(PyObject **p_trace, PyObject **p_newtrace, PyFrameObject *f) { PyObject *type, *value, *traceback, *arg; *************** *** 2189,2202 **** } static int ! call_trace(p_trace, p_newtrace, f, msg, arg) ! PyObject **p_trace; /* in/out; may not be NULL; ! may not point to NULL variable initially */ ! PyObject **p_newtrace; /* in/out; may be NULL; ! may point to NULL variable; ! may be same variable as p_newtrace */ ! PyFrameObject *f; ! char *msg; ! PyObject *arg; { PyThreadState *tstate = f->f_tstate; --- 2159,2171 ---- } + /* PyObject **p_trace: in/out; may not be NULL; + may not point to NULL variable initially + PyObject **p_newtrace: in/out; may be NULL; + may point to NULL variable; + may be same variable as p_newtrace */ + static int ! call_trace(PyObject **p_trace, PyObject **p_newtrace, PyFrameObject *f, ! char *msg, PyObject *arg) { PyThreadState *tstate = f->f_tstate; *************** *** 2268,2272 **** PyObject * ! PyEval_GetBuiltins() { PyThreadState *tstate = PyThreadState_Get(); --- 2237,2241 ---- PyObject * ! PyEval_GetBuiltins(void) { PyThreadState *tstate = PyThreadState_Get(); *************** *** 2279,2283 **** PyObject * ! PyEval_GetLocals() { PyFrameObject *current_frame = PyThreadState_Get()->frame; --- 2248,2252 ---- PyObject * ! PyEval_GetLocals(void) { PyFrameObject *current_frame = PyThreadState_Get()->frame; *************** *** 2289,2293 **** PyObject * ! PyEval_GetGlobals() { PyFrameObject *current_frame = PyThreadState_Get()->frame; --- 2258,2262 ---- PyObject * ! PyEval_GetGlobals(void) { PyFrameObject *current_frame = PyThreadState_Get()->frame; *************** *** 2299,2303 **** PyObject * ! PyEval_GetFrame() { PyFrameObject *current_frame = PyThreadState_Get()->frame; --- 2268,2272 ---- PyObject * ! PyEval_GetFrame(void) { PyFrameObject *current_frame = PyThreadState_Get()->frame; *************** *** 2306,2310 **** int ! PyEval_GetRestricted() { PyFrameObject *current_frame = PyThreadState_Get()->frame; --- 2275,2279 ---- int ! PyEval_GetRestricted(void) { PyFrameObject *current_frame = PyThreadState_Get()->frame; *************** *** 2313,2317 **** int ! Py_FlushLine() { PyObject *f = PySys_GetObject("stdout"); --- 2282,2286 ---- int ! Py_FlushLine(void) { PyObject *f = PySys_GetObject("stdout"); *************** *** 2331,2337 **** PyObject * ! PyEval_CallObject(func, arg) ! PyObject *func; ! PyObject *arg; { return PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL); --- 2300,2304 ---- PyObject * ! PyEval_CallObject(PyObject *func, PyObject *arg) { return PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL); *************** *** 2341,2348 **** PyObject * ! PyEval_CallObjectWithKeywords(func, arg, kw) ! PyObject *func; ! PyObject *arg; ! PyObject *kw; { ternaryfunc call; --- 2308,2312 ---- PyObject * ! PyEval_CallObjectWithKeywords(PyObject *func, PyObject *arg, PyObject *kw) { ternaryfunc call; *************** *** 2383,2390 **** static PyObject * ! call_builtin(func, arg, kw) ! PyObject *func; ! PyObject *arg; ! PyObject *kw; { if (PyCFunction_Check(func)) { --- 2347,2351 ---- static PyObject * ! call_builtin(PyObject *func, PyObject *arg, PyObject *kw) { if (PyCFunction_Check(func)) { *************** *** 2429,2436 **** static PyObject * ! call_function(func, arg, kw) ! PyObject *func; ! PyObject *arg; ! PyObject *kw; { PyObject *class = NULL; /* == owner */ --- 2390,2394 ---- static PyObject * ! call_function(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *class = NULL; /* == owner */ *************** *** 2550,2555 **** static PyObject * ! loop_subscript(v, w) ! PyObject *v, *w; { PySequenceMethods *sq = v->ob_type->tp_as_sequence; --- 2508,2512 ---- static PyObject * ! loop_subscript(PyObject *v, PyObject *w) { PySequenceMethods *sq = v->ob_type->tp_as_sequence; *************** *** 2573,2579 **** int ! _PyEval_SliceIndex(v, pi) ! PyObject *v; ! int *pi; { if (v != NULL) { --- 2530,2534 ---- int ! _PyEval_SliceIndex(PyObject *v, int *pi) { if (v != NULL) { *************** *** 2628,2633 **** static PyObject * ! apply_slice(u, v, w) /* return u[v:w] */ ! PyObject *u, *v, *w; { int ilow = 0, ihigh = INT_MAX; --- 2583,2587 ---- static PyObject * ! apply_slice(PyObject *u, PyObject *v, PyObject *w) /* return u[v:w] */ { int ilow = 0, ihigh = INT_MAX; *************** *** 2640,2645 **** static int ! assign_slice(u, v, w, x) /* u[v:w] = x */ ! PyObject *u, *v, *w, *x; { int ilow = 0, ihigh = INT_MAX; --- 2594,2598 ---- static int ! assign_slice(PyObject *u, PyObject *v, PyObject *w, PyObject *x) /* u[v:w] = x */ { int ilow = 0, ihigh = INT_MAX; *************** *** 2655,2662 **** static PyObject * ! cmp_outcome(op, v, w) ! int op; ! register PyObject *v; ! register PyObject *w; { register int cmp; --- 2608,2612 ---- static PyObject * ! cmp_outcome(int op, register PyObject *v, register PyObject *w) { register int cmp; *************** *** 2700,2707 **** static int ! import_from(locals, v, name) ! PyObject *locals; ! PyObject *v; ! PyObject *name; { PyObject *w, *x; --- 2650,2654 ---- static int ! import_from(PyObject *locals, PyObject *v, PyObject *name) { PyObject *w, *x; *************** *** 2742,2749 **** static PyObject * ! build_class(methods, bases, name) ! PyObject *methods; /* dictionary */ ! PyObject *bases; /* tuple containing classes */ ! PyObject *name; /* string */ { int i, n; --- 2689,2693 ---- static PyObject * ! build_class(PyObject *methods, PyObject *bases, PyObject *name) { int i, n; *************** *** 2807,2815 **** static int ! exec_statement(f, prog, globals, locals) ! PyFrameObject *f; ! PyObject *prog; ! PyObject *globals; ! PyObject *locals; { int n; --- 2751,2756 ---- static int ! exec_statement(PyFrameObject *f, PyObject *prog, PyObject *globals, ! PyObject *locals) { int n; *************** *** 2875,2881 **** /* Hack for ni.py */ static PyObject * ! find_from_args(f, nexti) ! PyFrameObject *f; ! int nexti; { int opcode; --- 2816,2820 ---- /* Hack for ni.py */ static PyObject * ! find_from_args(PyFrameObject *f, int nexti) { int opcode; *************** *** 2915,2920 **** PyObject * ! getarray(a) ! long a[256]; { int i; --- 2854,2858 ---- PyObject * ! getarray(long a[256]) { int i; *************** *** 2935,2940 **** PyObject * ! _Py_GetDXProfile(self, args) ! PyObject *self, *args; { #ifndef DXPAIRS --- 2873,2877 ---- PyObject * ! _Py_GetDXProfile(PyObject *self, PyObject *args) { #ifndef DXPAIRS Index: codecs.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/codecs.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** codecs.c 2000/07/16 12:04:32 2.10 --- codecs.c 2000/07/22 18:47:25 2.11 *************** *** 37,41 **** static ! int import_encodings() { PyObject *mod; --- 37,41 ---- static ! int import_encodings(void) { PyObject *mod; *************** *** 420,424 **** } ! void _PyCodecRegistry_Init() { if (_PyCodec_SearchPath == NULL) --- 420,424 ---- } ! void _PyCodecRegistry_Init(void) { if (_PyCodec_SearchPath == NULL) *************** *** 431,435 **** } ! void _PyCodecRegistry_Fini() { Py_XDECREF(_PyCodec_SearchPath); --- 431,435 ---- } ! void _PyCodecRegistry_Fini(void) { Py_XDECREF(_PyCodec_SearchPath); Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.116 retrieving revision 2.117 diff -C2 -r2.116 -r2.117 *** compile.c 2000/07/13 06:24:29 2.116 --- compile.c 2000/07/22 18:47:25 2.117 *************** *** 77,83 **** static PyObject * ! code_getattr(co, name) ! PyCodeObject *co; ! char *name; { return PyMember_Get((char *)co, code_memberlist, name); --- 77,81 ---- static PyObject * [...1507 lines suppressed...] static PyCodeObject * ! jcompile(node *n, char *filename, struct compiling *base) { struct compiling sc; *************** *** 3518,3524 **** int ! PyCode_Addr2Line(co, addrq) ! PyCodeObject *co; ! int addrq; { int size = PyString_Size(co->co_lnotab) / 2; --- 3300,3304 ---- int ! PyCode_Addr2Line(PyCodeObject *co, int addrq) { int size = PyString_Size(co->co_lnotab) / 2; Index: dup2.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dup2.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** dup2.c 1994/08/29 10:43:12 2.3 --- dup2.c 2000/07/22 18:47:25 2.4 *************** *** 17,22 **** int ! dup2(fd1, fd2) ! int fd1, fd2; { if (fd1 != fd2) { --- 17,21 ---- int ! dup2(int fd1, int fd2) { if (fd1 != fd2) { Index: dynload_aix.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_aix.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** dynload_aix.c 2000/07/16 12:04:32 2.6 --- dynload_aix.c 2000/07/22 18:47:25 2.7 *************** *** 43,48 **** static int ! aix_getoldmodules(modlistptr) ! void **modlistptr; { register ModulePtr modptr, prevmodptr; --- 43,47 ---- static int ! aix_getoldmodules(void **modlistptr) { register ModulePtr modptr, prevmodptr; *************** *** 116,122 **** static int ! aix_bindnewmodule(newmoduleptr, modlistptr) ! void *newmoduleptr; ! void *modlistptr; { register ModulePtr modptr; --- 115,119 ---- static int ! aix_bindnewmodule(void *newmoduleptr, void *modlistptr) { register ModulePtr modptr; *************** *** 132,137 **** static void ! aix_loaderror(pathname) ! char *pathname; { --- 129,133 ---- static void ! aix_loaderror(char *pathname) { Index: errors.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/errors.c,v retrieving revision 2.49 retrieving revision 2.50 diff -C2 -r2.49 -r2.50 *** errors.c 2000/07/12 17:21:42 2.49 --- errors.c 2000/07/22 18:47:25 2.50 *************** *** 31,38 **** void ! PyErr_Restore(type, value, traceback) ! PyObject *type; ! PyObject *value; ! PyObject *traceback; { PyThreadState *tstate = PyThreadState_GET(); --- 31,35 ---- void ! PyErr_Restore(PyObject *type, PyObject *value, PyObject *traceback) { PyThreadState *tstate = PyThreadState_GET(); *************** *** 61,67 **** void ! PyErr_SetObject(exception, value) ! PyObject *exception; ! PyObject *value; { Py_XINCREF(exception); --- 58,62 ---- void ! PyErr_SetObject(PyObject *exception, PyObject *value) { Py_XINCREF(exception); *************** *** 71,76 **** void ! PyErr_SetNone(exception) ! PyObject *exception; { PyErr_SetObject(exception, (PyObject *)NULL); --- 66,70 ---- void ! PyErr_SetNone(PyObject *exception) { PyErr_SetObject(exception, (PyObject *)NULL); *************** *** 78,84 **** void ! PyErr_SetString(exception, string) ! PyObject *exception; ! const char *string; { PyObject *value = PyString_FromString(string); --- 72,76 ---- void ! PyErr_SetString(PyObject *exception, const char *string) { PyObject *value = PyString_FromString(string); *************** *** 89,93 **** PyObject * ! PyErr_Occurred() { PyThreadState *tstate = PyThreadState_Get(); --- 81,85 ---- PyObject * ! PyErr_Occurred(void) { PyThreadState *tstate = PyThreadState_Get(); *************** *** 98,103 **** int ! PyErr_GivenExceptionMatches(err, exc) ! PyObject *err, *exc; { if (err == NULL || exc == NULL) { --- 90,94 ---- int ! PyErr_GivenExceptionMatches(PyObject *err, PyObject *exc) { if (err == NULL || exc == NULL) { *************** *** 130,135 **** int ! PyErr_ExceptionMatches(exc) ! PyObject *exc; { return PyErr_GivenExceptionMatches(PyErr_Occurred(), exc); --- 121,125 ---- int ! PyErr_ExceptionMatches(PyObject *exc) { return PyErr_GivenExceptionMatches(PyErr_Occurred(), exc); *************** *** 141,148 **** */ void ! PyErr_NormalizeException(exc, val, tb) ! PyObject **exc; ! PyObject **val; ! PyObject **tb; { PyObject *type = *exc; --- 131,135 ---- */ void ! PyErr_NormalizeException(PyObject **exc, PyObject **val, PyObject **tb) { PyObject *type = *exc; *************** *** 214,221 **** void ! PyErr_Fetch(p_type, p_value, p_traceback) ! PyObject **p_type; ! PyObject **p_value; ! PyObject **p_traceback; { PyThreadState *tstate = PyThreadState_Get(); --- 201,205 ---- void ! PyErr_Fetch(PyObject **p_type, PyObject **p_value, PyObject **p_traceback) { PyThreadState *tstate = PyThreadState_Get(); *************** *** 231,235 **** void ! PyErr_Clear() { PyErr_Restore(NULL, NULL, NULL); --- 215,219 ---- void ! PyErr_Clear(void) { PyErr_Restore(NULL, NULL, NULL); *************** *** 239,243 **** int ! PyErr_BadArgument() { PyErr_SetString(PyExc_TypeError, --- 223,227 ---- int ! PyErr_BadArgument(void) { PyErr_SetString(PyExc_TypeError, *************** *** 247,251 **** PyObject * ! PyErr_NoMemory() { /* raise the pre-allocated instance if it still exists */ --- 231,235 ---- PyObject * ! PyErr_NoMemory(void) { /* raise the pre-allocated instance if it still exists */ *************** *** 262,268 **** PyObject * ! PyErr_SetFromErrnoWithFilename(exc, filename) ! PyObject *exc; ! char *filename; { PyObject *v; --- 246,250 ---- PyObject * ! PyErr_SetFromErrnoWithFilename(PyObject *exc, char *filename) { PyObject *v; *************** *** 327,332 **** PyObject * ! PyErr_SetFromErrno(exc) ! PyObject *exc; { return PyErr_SetFromErrnoWithFilename(exc, NULL); --- 309,313 ---- PyObject * ! PyErr_SetFromErrno(PyObject *exc) { return PyErr_SetFromErrnoWithFilename(exc, NULL); *************** *** 336,340 **** /* Windows specific error code handling */ PyObject *PyErr_SetFromWindowsErrWithFilename( ! int ierr, const char *filename) { --- 317,321 ---- /* Windows specific error code handling */ PyObject *PyErr_SetFromWindowsErrWithFilename( ! int ierr, const char *filename) { *************** *** 379,383 **** void ! PyErr_BadInternalCall() { PyErr_SetString(PyExc_SystemError, --- 360,364 ---- void ! PyErr_BadInternalCall(void) { PyErr_SetString(PyExc_SystemError, *************** *** 386,408 **** - #ifdef HAVE_STDARG_PROTOTYPES PyObject * PyErr_Format(PyObject *exception, const char *format, ...) - #else - PyObject * - PyErr_Format(exception, format, va_alist) - PyObject *exception; - const char *format; - va_dcl - #endif { va_list vargs; char buffer[500]; /* Caller is responsible for limiting the format */ - #ifdef HAVE_STDARG_PROTOTYPES va_start(vargs, format); - #else - va_start(vargs); - #endif vsprintf(buffer, format, vargs); --- 367,377 ---- *************** *** 413,420 **** PyObject * ! PyErr_NewException(name, base, dict) ! char *name; /* modulename.classname */ ! PyObject *base; ! PyObject *dict; { char *dot; --- 382,386 ---- PyObject * ! PyErr_NewException(char *name, PyObject *base, PyObject *dict) { char *dot; Index: frozenmain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/frozenmain.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** frozenmain.c 2000/06/30 23:58:06 2.22 --- frozenmain.c 2000/07/22 18:47:25 2.23 *************** *** 31,37 **** int ! Py_FrozenMain(argc, argv) ! int argc; ! char **argv; { char *p; --- 31,35 ---- int ! Py_FrozenMain(int argc, char **argv) { char *p; Index: getargs.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v retrieving revision 2.41 retrieving revision 2.42 diff -C2 -r2.41 -r2.42 *** getargs.c 2000/07/16 12:04:32 2.41 --- getargs.c 2000/07/22 18:47:25 2.42 *************** *** 44,68 **** static char *skipitem(char **, va_list *); - #ifdef HAVE_STDARG_PROTOTYPES - /* VARARGS2 */ int PyArg_Parse(PyObject *args, char *format, ...) - #else - /* VARARGS */ - int PyArg_Parse(va_alist) va_dcl - #endif { int retval; va_list va; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, format); - #else - PyObject *args; - char *format; - - va_start(va); - args = va_arg(va, PyObject *); - format = va_arg(va, char *); - #endif retval = vgetargs1(args, format, &va, 1); va_end(va); --- 44,53 ---- *************** *** 71,95 **** - #ifdef HAVE_STDARG_PROTOTYPES - /* VARARGS2 */ int PyArg_ParseTuple(PyObject *args, char *format, ...) - #else - /* VARARGS */ - int PyArg_ParseTuple(va_alist) va_dcl - #endif { int retval; va_list va; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, format); - #else - PyObject *args; - char *format; - - va_start(va); - args = va_arg(va, PyObject *); - format = va_arg(va, char *); - #endif retval = vgetargs1(args, format, &va, 0); va_end(va); --- 56,65 ---- *************** *** 99,106 **** int ! PyArg_VaParse(args, format, va) ! PyObject *args; ! char *format; ! va_list va; { va_list lva; --- 69,73 ---- int ! PyArg_VaParse(PyObject *args, char *format, va_list va) { va_list lva; *************** *** 117,125 **** static int ! vgetargs1(args, format, p_va, compat) ! PyObject *args; ! char *format; ! va_list *p_va; ! int compat; { char msgbuf[256]; --- 84,88 ---- static int ! vgetargs1(PyObject *args, char *format, va_list *p_va, int compat) { char msgbuf[256]; *************** *** 255,264 **** static void ! seterror(iarg, msg, levels, fname, message) ! int iarg; ! char *msg; ! int *levels; ! char *fname; ! char *message; { char buf[256]; --- 218,222 ---- static void ! seterror(int iarg, char *msg, int *levels, char *fname, char *message) { char buf[256]; *************** *** 310,320 **** static char * ! converttuple(arg, p_format, p_va, levels, msgbuf, toplevel) ! PyObject *arg; ! char **p_format; ! va_list *p_va; ! int *levels; ! char *msgbuf; ! int toplevel; { int level = 0; --- 268,273 ---- static char * ! converttuple(PyObject *arg, char **p_format, va_list *p_va, int *levels, ! char *msgbuf, int toplevel) { int level = 0; *************** *** 379,388 **** static char * ! convertitem(arg, p_format, p_va, levels, msgbuf) ! PyObject *arg; ! char **p_format; ! va_list *p_va; ! int *levels; ! char *msgbuf; { char *msg; --- 332,337 ---- static char * ! convertitem(PyObject *arg, char **p_format, va_list *p_va, int *levels, ! char *msgbuf) { char *msg; *************** *** 410,418 **** static char * ! convertsimple(arg, p_format, p_va, msgbuf) ! PyObject *arg; ! char **p_format; ! va_list *p_va; ! char *msgbuf; { char *msg = convertsimple1(arg, p_format, p_va); --- 359,363 ---- static char * ! convertsimple(PyObject *arg, char **p_format, va_list *p_va, char *msgbuf) { char *msg = convertsimple1(arg, p_format, p_va); *************** *** 437,444 **** static char * ! convertsimple1(arg, p_format, p_va) ! PyObject *arg; ! char **p_format; ! va_list *p_va; { char *format = *p_format; --- 382,386 ---- static char * ! convertsimple1(PyObject *arg, char **p_format, va_list *p_va) { char *format = *p_format; *************** *** 962,993 **** Geoff Philbrick */ - #ifdef HAVE_STDARG_PROTOTYPES - /* VARARGS2 */ int PyArg_ParseTupleAndKeywords(PyObject *args, PyObject *keywords, char *format, char **kwlist, ...) - #else - /* VARARGS */ - int PyArg_ParseTupleAndKeywords(va_alist) va_dcl - #endif { int retval; va_list va; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, kwlist); - #else - PyObject *args; - PyObject *keywords; - char *format; - char **kwlist; - - va_start(va); - args = va_arg(va, PyObject *); - keywords = va_arg(va, PyObject *); - format = va_arg(va, char *); - kwlist = va_arg(va, char **); - #endif retval = vgetargskeywords(args, keywords, format, kwlist, &va); va_end(va); --- 904,916 ---- *************** *** 997,1006 **** static int ! vgetargskeywords(args, keywords, format, kwlist, p_va) ! PyObject *args; ! PyObject *keywords; ! char *format; ! char **kwlist; ! va_list *p_va; { char msgbuf[256]; --- 920,925 ---- static int ! vgetargskeywords(PyObject *args, PyObject *keywords, char *format, ! char **kwlist, va_list *p_va) { char msgbuf[256]; *************** *** 1205,1211 **** static char * ! skipitem(p_format, p_va) ! char **p_format; ! va_list *p_va; { char *format = *p_format; --- 1124,1128 ---- static char * ! skipitem(char **p_format, va_list *p_va) { char *format = *p_format; Index: getcompiler.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getcompiler.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** getcompiler.c 2000/06/30 23:58:06 1.7 --- getcompiler.c 2000/07/22 18:47:25 1.8 *************** *** 32,36 **** const char * ! Py_GetCompiler() { return COMPILER; --- 32,36 ---- const char * ! Py_GetCompiler(void) { return COMPILER; Index: getcopyright.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getcopyright.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** getcopyright.c 2000/06/30 23:50:40 1.7 --- getcopyright.c 2000/07/22 18:47:25 1.8 *************** *** 24,28 **** const char * ! Py_GetCopyright() { return cprt; --- 24,28 ---- const char * ! Py_GetCopyright(void) { return cprt; Index: getcwd.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getcwd.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** getcwd.c 2000/06/30 23:58:06 1.12 --- getcwd.c 2000/07/22 18:47:25 1.13 *************** *** 27,36 **** #endif ! extern char *getwd(); char * ! getcwd(buf, size) ! char *buf; ! int size; { char localbuf[MAXPATHLEN+1]; --- 27,34 ---- #endif ! extern char *getwd(char *); char * ! getcwd(char *buf, int size) { char localbuf[MAXPATHLEN+1]; *************** *** 63,69 **** char * ! getcwd(buf, size) ! char *buf; ! int size; { FILE *fp; --- 61,65 ---- char * ! getcwd(char *buf, int size) { FILE *fp; Index: getmtime.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getmtime.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** getmtime.c 2000/07/01 01:08:11 2.13 --- getmtime.c 2000/07/22 18:47:25 2.14 *************** *** 27,33 **** time_t ! PyOS_GetLastModificationTime(path, fp) ! char *path; ! FILE *fp; { struct stat st; --- 27,31 ---- time_t ! PyOS_GetLastModificationTime(char *path, FILE *fp) { struct stat st; Index: getopt.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getopt.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** getopt.c 1999/09/13 13:45:32 2.7 --- getopt.c 2000/07/22 18:47:25 2.8 *************** *** 42,51 **** #ifndef __BEOS__ ! int getopt(argc,argv,optstring) ! int argc; ! char *argv[]; ! char optstring[]; #else ! int getopt( int argc, char *const *argv, const char *optstring ) #endif { --- 42,48 ---- #ifndef __BEOS__ ! int getopt(int argc, char *argv[], char optstring[]) #else ! int getopt(int argc, char *const *argv, const char *optstring) #endif { Index: getplatform.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getplatform.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** getplatform.c 2000/06/30 23:58:06 1.6 --- getplatform.c 2000/07/22 18:47:25 1.7 *************** *** 16,20 **** const char * ! Py_GetPlatform() { return PLATFORM; --- 16,20 ---- const char * ! Py_GetPlatform(void) { return PLATFORM; Index: getversion.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getversion.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** getversion.c 2000/06/30 23:58:06 1.12 --- getversion.c 2000/07/22 18:47:25 1.13 *************** *** 16,20 **** const char * ! Py_GetVersion() { static char version[250]; --- 16,20 ---- const char * ! Py_GetVersion(void) { static char version[250]; Index: hypot.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/hypot.c,v retrieving revision 2.1 retrieving revision 2.2 diff -C2 -r2.1 -r2.2 *** hypot.c 1996/08/29 18:10:41 2.1 --- hypot.c 2000/07/22 18:47:25 2.2 *************** *** 5,11 **** #include "mymath.h" ! double hypot(x, y) ! double x; ! double y; { double yx; --- 5,9 ---- #include "mymath.h" ! double hypot(double x, double y) { double yx; Index: import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.141 retrieving revision 2.142 diff -C2 -r2.141 -r2.142 *** import.c 2000/07/11 21:59:16 2.141 --- import.c 2000/07/22 18:47:25 2.142 *************** *** 56,60 **** ! extern time_t PyOS_GetLastModificationTime(); /* In getmtime.c */ /* Magic word to reject .pyc files generated by other Python versions */ --- 56,61 ---- ! extern time_t PyOS_GetLastModificationTime(char *, FILE *); ! /* In getmtime.c */ /* Magic word to reject .pyc files generated by other Python versions */ *************** *** 66,70 **** added to the .pyc file header? */ /* New way to come up with the magic number: (YEAR-1995), MONTH, DAY */ ! #define MAGIC (50428 | ((long)'\r'<<16) | ((long)'\n'<<24)) /* Magic word as global; note that _PyImport_Init() can change the --- 67,71 ---- added to the .pyc file header? */ /* New way to come up with the magic number: (YEAR-1995), MONTH, DAY */ ! #define MAGIC (50715 | ((long)'\r'<<16) | ((long)'\n'<<24)) /* Magic word as global; note that _PyImport_Init() can change the *************** *** 92,96 **** void ! _PyImport_Init() { const struct filedescr *scan; --- 93,97 ---- void ! _PyImport_Init(void) { const struct filedescr *scan; *************** *** 132,136 **** void ! _PyImport_Fini() { Py_XDECREF(extensions); --- 133,137 ---- void ! _PyImport_Fini(void) { Py_XDECREF(extensions); *************** *** 152,156 **** static void ! lock_import() { long me = PyThread_get_thread_ident(); --- 153,157 ---- static void ! lock_import(void) { long me = PyThread_get_thread_ident(); *************** *** 173,177 **** static void ! unlock_import() { long me = PyThread_get_thread_ident(); --- 174,178 ---- static void ! unlock_import(void) { long me = PyThread_get_thread_ident(); *************** *** 197,201 **** PyObject * ! PyImport_GetModuleDict() { PyInterpreterState *interp = PyThreadState_Get()->interp; --- 198,202 ---- PyObject * ! PyImport_GetModuleDict(void) { PyInterpreterState *interp = PyThreadState_Get()->interp; *************** *** 225,229 **** void ! PyImport_Cleanup() { int pos, ndone; --- 226,230 ---- void ! PyImport_Cleanup(void) { int pos, ndone; *************** *** 358,362 **** long ! PyImport_GetMagicNumber() { return pyc_magic; --- 359,363 ---- long ! PyImport_GetMagicNumber(void) { return pyc_magic; *************** *** 375,381 **** PyObject * ! _PyImport_FixupExtension(name, filename) ! char *name; ! char *filename; { PyObject *modules, *mod, *dict, *copy; --- 376,380 ---- PyObject * ! _PyImport_FixupExtension(char *name, char *filename) { PyObject *modules, *mod, *dict, *copy; *************** *** 404,410 **** PyObject * ! _PyImport_FindExtension(name, filename) ! char *name; ! char *filename; { PyObject *dict, *mod, *mdict, *result; --- 403,407 ---- PyObject * ! _PyImport_FindExtension(char *name, char *filename) { PyObject *dict, *mod, *mdict, *result; *************** *** 438,443 **** PyObject * ! PyImport_AddModule(name) ! char *name; { PyObject *modules = PyImport_GetModuleDict(); --- 435,439 ---- PyObject * ! PyImport_AddModule(char *name) { PyObject *modules = PyImport_GetModuleDict(); *************** *** 464,470 **** PyObject * ! PyImport_ExecCodeModule(name, co) ! char *name; ! PyObject *co; { return PyImport_ExecCodeModuleEx(name, co, (char *)NULL); --- 460,464 ---- PyObject * ! PyImport_ExecCodeModule(char *name, PyObject *co) { return PyImport_ExecCodeModuleEx(name, co, (char *)NULL); *************** *** 472,479 **** PyObject * ! PyImport_ExecCodeModuleEx(name, co, pathname) ! char *name; ! PyObject *co; ! char *pathname; { PyObject *modules = PyImport_GetModuleDict(); --- 466,470 ---- PyObject * ! PyImport_ExecCodeModuleEx(char *name, PyObject *co, char *pathname) { PyObject *modules = PyImport_GetModuleDict(); *************** *** 528,535 **** static char * ! make_compiled_pathname(pathname, buf, buflen) ! char *pathname; ! char *buf; ! size_t buflen; { size_t len; --- 519,523 ---- static char * ! make_compiled_pathname(char *pathname, char *buf, size_t buflen) { size_t len; *************** *** 553,560 **** static FILE * ! check_compiled_module(pathname, mtime, cpathname) ! char *pathname; ! long mtime; ! char *cpathname; { FILE *fp; --- 541,545 ---- static FILE * ! check_compiled_module(char *pathname, long mtime, char *cpathname) { FILE *fp; *************** *** 588,594 **** static PyCodeObject * ! read_compiled_module(cpathname, fp) ! char *cpathname; ! FILE *fp; { PyObject *co; --- 573,577 ---- static PyCodeObject * ! read_compiled_module(char *cpathname, FILE *fp) { PyObject *co; *************** *** 611,618 **** static PyObject * ! load_compiled_module(name, cpathname, fp) ! char *name; ! char *cpathname; ! FILE *fp; { long magic; --- 594,598 ---- static PyObject * ! load_compiled_module(char *name, char *cpathname, FILE *fp) { long magic; *************** *** 642,648 **** static PyCodeObject * ! parse_source_module(pathname, fp) ! char *pathname; ! FILE *fp; { PyCodeObject *co; --- 622,626 ---- static PyCodeObject * ! parse_source_module(char *pathname, FILE *fp) { PyCodeObject *co; *************** *** 665,672 **** static void ! write_compiled_module(co, cpathname, mtime) ! PyCodeObject *co; ! char *cpathname; ! long mtime; { FILE *fp; --- 643,647 ---- static void ! write_compiled_module(PyCodeObject *co, char *cpathname, long mtime) { FILE *fp; *************** *** 709,716 **** static PyObject * ! load_source_module(name, pathname, fp) ! char *name; ! char *pathname; ! FILE *fp; { time_t mtime; --- 684,688 ---- static PyObject * ! load_source_module(char *name, char *pathname, FILE *fp) { time_t mtime; *************** *** 773,779 **** static PyObject * ! load_package(name, pathname) ! char *name; ! char *pathname; { PyObject *m, *d, *file, *path; --- 745,749 ---- static PyObject * ! load_package(char *name, char *pathname) { PyObject *m, *d, *file, *path; *************** *** 828,833 **** static int ! is_builtin(name) ! char *name; { int i; --- 798,802 ---- static int ! is_builtin(char *name) { int i; *************** *** 859,869 **** static struct filedescr * ! find_module(realname, path, buf, buflen, p_fp) ! char *realname; ! PyObject *path; ! /* Output parameters: */ ! char *buf; ! size_t buflen; ! FILE **p_fp; { int i, npath; --- 828,833 ---- static struct filedescr * ! find_module(char *realname, PyObject *path, char *buf, size_t buflen, ! FILE **p_fp) { int i, npath; *************** *** 1038,1043 **** static int ! allcaps8x3(s) ! char *s; { /* Return 1 if s is an 8.3 filename in ALLCAPS */ --- 1002,1006 ---- static int ! allcaps8x3(char *s) { /* Return 1 if s is an 8.3 filename in ALLCAPS */ *************** *** 1177,1182 **** /* Helper to look for __init__.py or __init__.py[co] in potential package */ static int ! find_init_module(buf) ! char *buf; { size_t save_len = strlen(buf); --- 1140,1144 ---- /* Helper to look for __init__.py or __init__.py[co] in potential package */ static int ! find_init_module(char *buf) { size_t save_len = strlen(buf); *************** *** 1213,1221 **** static PyObject * ! load_module(name, fp, buf, type) ! char *name; ! FILE *fp; ! char *buf; ! int type; { PyObject *modules; --- 1175,1179 ---- static PyObject * ! load_module(char *name, FILE *fp, char *buf, int type) { PyObject *modules; *************** *** 1313,1318 **** static int ! init_builtin(name) ! char *name; { struct _inittab *p; --- 1271,1275 ---- static int ! init_builtin(char *name) { struct _inittab *p; *************** *** 1347,1352 **** static struct _frozen * ! find_frozen(name) ! char *name; { struct _frozen *p; --- 1304,1308 ---- static struct _frozen * ! find_frozen(char *name) { struct _frozen *p; *************** *** 1362,1367 **** static PyObject * ! get_frozen_object(name) ! char *name; { struct _frozen *p = find_frozen(name); --- 1318,1322 ---- static PyObject * ! get_frozen_object(char *name) { struct _frozen *p = find_frozen(name); *************** *** 1386,1391 **** int ! PyImport_ImportFrozenModule(name) ! char *name; { struct _frozen *p = find_frozen(name); --- 1341,1345 ---- int ! PyImport_ImportFrozenModule(char *name) { struct _frozen *p = find_frozen(name); *************** *** 1443,1448 **** PyObject * ! PyImport_ImportModule(name) ! char *name; { static PyObject *fromlist = NULL; --- 1397,1401 ---- PyObject * ! PyImport_ImportModule(char *name) { static PyObject *fromlist = NULL; *************** *** 1467,1475 **** static PyObject * ! import_module_ex(name, globals, locals, fromlist) ! char *name; ! PyObject *globals; ! PyObject *locals; ! PyObject *fromlist; { char buf[MAXPATHLEN+1]; --- 1420,1425 ---- static PyObject * ! import_module_ex(char *name, PyObject *globals, PyObject *locals, ! PyObject *fromlist) { char buf[MAXPATHLEN+1]; *************** *** 1517,1525 **** PyObject * ! PyImport_ImportModuleEx(name, globals, locals, fromlist) ! char *name; ! PyObject *globals; ! PyObject *locals; ! PyObject *fromlist; { PyObject *result; --- 1467,1472 ---- PyObject * ! PyImport_ImportModuleEx(char *name, PyObject *globals, PyObject *locals, ! PyObject *fromlist) { PyObject *result; *************** *** 1531,1538 **** static PyObject * ! get_parent(globals, buf, p_buflen) ! PyObject *globals; ! char *buf; ! int *p_buflen; { static PyObject *namestr = NULL; --- 1478,1482 ---- static PyObject * ! get_parent(PyObject *globals, char *buf, int *p_buflen) { static PyObject *namestr = NULL; *************** *** 1599,1609 **** } static PyObject * ! load_next(mod, altmod, p_name, buf, p_buflen) ! PyObject *mod; ! PyObject *altmod; /* Either None or same as mod */ ! char **p_name; ! char *buf; ! int *p_buflen; { char *name = *p_name; --- 1543,1550 ---- } + /* altmod is either None or same as mod */ static PyObject * ! load_next(PyObject *mod, PyObject *altmod, char **p_name, char *buf, ! int *p_buflen) { char *name = *p_name; *************** *** 1668,1673 **** static int ! mark_miss(name) ! char *name; { PyObject *modules = PyImport_GetModuleDict(); --- 1609,1613 ---- static int ! mark_miss(char *name) { PyObject *modules = PyImport_GetModuleDict(); *************** *** 1676,1685 **** static int ! ensure_fromlist(mod, fromlist, buf, buflen, recursive) ! PyObject *mod; ! PyObject *fromlist; ! char *buf; ! int buflen; ! int recursive; { int i; --- 1616,1621 ---- static int ! ensure_fromlist(PyObject *mod, PyObject *fromlist, char *buf, int buflen, ! int recursive) { int i; *************** *** 1748,1755 **** static PyObject * ! import_submodule(mod, subname, fullname) ! PyObject *mod; /* May be None */ ! char *subname; ! char *fullname; { PyObject *modules = PyImport_GetModuleDict(); --- 1684,1688 ---- static PyObject * ! import_submodule(PyObject *mod, char *subname, char *fullname) { PyObject *modules = PyImport_GetModuleDict(); *************** *** 1810,1815 **** PyObject * ! PyImport_ReloadModule(m) ! PyObject *m; { PyObject *modules = PyImport_GetModuleDict(); --- 1743,1747 ---- PyObject * ! PyImport_ReloadModule(PyObject *m) { PyObject *modules = PyImport_GetModuleDict(); *************** *** 1877,1882 **** PyObject * ! PyImport_Import(module_name) ! PyObject *module_name; { static PyObject *silly_list = NULL; --- 1809,1813 ---- PyObject * ! PyImport_Import(PyObject *module_name) { static PyObject *silly_list = NULL; *************** *** 1954,1960 **** static PyObject * ! imp_get_magic(self, args) ! PyObject *self; ! PyObject *args; { char buf[4]; --- 1885,1889 ---- static PyObject * ! imp_get_magic(PyObject *self, PyObject *args) { char buf[4]; *************** *** 1971,1977 **** static PyObject * ! imp_get_suffixes(self, args) ! PyObject *self; ! PyObject *args; { PyObject *list; --- 1900,1904 ---- static PyObject * ! imp_get_suffixes(PyObject *self, PyObject *args) { PyObject *list; *************** *** 2001,2007 **** static PyObject * ! call_find_module(name, path) ! char *name; ! PyObject *path; /* list or None or NULL */ { extern int fclose(FILE *); --- 1928,1932 ---- static PyObject * ! call_find_module(char *name, PyObject *path) { extern int fclose(FILE *); *************** *** 2035,2041 **** static PyObject * ! imp_find_module(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 1960,1964 ---- static PyObject * ! imp_find_module(PyObject *self, PyObject *args) { char *name; *************** *** 2047,2053 **** static PyObject * ! imp_init_builtin(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 1970,1974 ---- static PyObject * ! imp_init_builtin(PyObject *self, PyObject *args) { char *name; *************** *** 2069,2075 **** static PyObject * ! imp_init_frozen(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 1990,1994 ---- static PyObject * ! imp_init_frozen(PyObject *self, PyObject *args) { char *name; *************** *** 2091,2097 **** static PyObject * ! imp_get_frozen_object(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 2010,2014 ---- static PyObject * ! imp_get_frozen_object(PyObject *self, PyObject *args) { char *name; *************** *** 2103,2109 **** static PyObject * ! imp_is_builtin(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 2020,2024 ---- static PyObject * ! imp_is_builtin(PyObject *self, PyObject *args) { char *name; *************** *** 2114,2120 **** static PyObject * ! imp_is_frozen(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 2029,2033 ---- static PyObject * ! imp_is_frozen(PyObject *self, PyObject *args) { char *name; *************** *** 2127,2134 **** static FILE * ! get_file(pathname, fob, mode) ! char *pathname; ! PyObject *fob; ! char *mode; { FILE *fp; --- 2040,2044 ---- static FILE * ! get_file(char *pathname, PyObject *fob, char *mode) { FILE *fp; *************** *** 2148,2154 **** static PyObject * ! imp_load_compiled(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 2058,2062 ---- static PyObject * ! imp_load_compiled(PyObject *self, PyObject *args) { char *name; *************** *** 2172,2178 **** static PyObject * ! imp_load_dynamic(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 2080,2084 ---- static PyObject * ! imp_load_dynamic(PyObject *self, PyObject *args) { char *name; *************** *** 2196,2202 **** static PyObject * ! imp_load_source(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 2102,2106 ---- static PyObject * ! imp_load_source(PyObject *self, PyObject *args) { char *name; *************** *** 2219,2225 **** #ifdef macintosh static PyObject * ! imp_load_resource(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 2123,2127 ---- #ifdef macintosh static PyObject * ! imp_load_resource(PyObject *self, PyObject *args) { char *name; *************** *** 2235,2241 **** static PyObject * ! imp_load_module(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 2137,2141 ---- static PyObject * ! imp_load_module(PyObject *self, PyObject *args) { char *name; *************** *** 2272,2278 **** static PyObject * ! imp_load_package(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 2172,2176 ---- static PyObject * ! imp_load_package(PyObject *self, PyObject *args) { char *name; *************** *** 2284,2290 **** static PyObject * ! imp_new_module(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 2182,2186 ---- static PyObject * ! imp_new_module(PyObject *self, PyObject *args) { char *name; *************** *** 2357,2364 **** static int ! setint(d, name, value) ! PyObject *d; ! char *name; ! int value; { PyObject *v; --- 2253,2257 ---- static int ! setint(PyObject *d, char *name, int value) { PyObject *v; *************** *** 2372,2376 **** void ! initimp() { PyObject *m, *d; --- 2265,2269 ---- void ! initimp(void) { PyObject *m, *d; *************** *** 2403,2408 **** int ! PyImport_ExtendInittab(newtab) ! struct _inittab *newtab; { static struct _inittab *our_copy = NULL; --- 2296,2300 ---- int ! PyImport_ExtendInittab(struct _inittab *newtab) { static struct _inittab *our_copy = NULL; *************** *** 2436,2442 **** int ! PyImport_AppendInittab(name, initfunc) ! char *name; ! void (*initfunc)(); { struct _inittab newtab[2]; --- 2328,2332 ---- int ! PyImport_AppendInittab(char *name, void (*initfunc)(void)) { struct _inittab newtab[2]; Index: importdl.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/importdl.c,v retrieving revision 2.66 retrieving revision 2.67 diff -C2 -r2.66 -r2.67 *** importdl.c 2000/06/30 23:58:06 2.66 --- importdl.c 2000/07/22 18:47:25 2.67 *************** *** 29,36 **** PyObject * ! _PyImport_LoadDynamicModule(name, pathname, fp) ! char *name; ! char *pathname; ! FILE *fp; { PyObject *m, *d, *s; --- 29,33 ---- PyObject * ! _PyImport_LoadDynamicModule(char *name, char *pathname, FILE *fp) { PyObject *m, *d, *s; Index: marshal.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/marshal.c,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -r1.52 -r1.53 *** marshal.c 2000/07/09 03:09:56 1.52 --- marshal.c 2000/07/22 18:47:25 1.53 *************** *** 56,62 **** static void ! w_more(c, p) ! char c; ! WFILE *p; { int size, newsize; --- 56,60 ---- static void ! w_more(char c, WFILE *p) { int size, newsize; *************** *** 77,84 **** static void ! w_string(s, n, p) ! char *s; ! int n; ! WFILE *p; { if (p->fp != NULL) { --- 75,79 ---- static void ! w_string(char *s, int n, WFILE *p) { if (p->fp != NULL) { *************** *** 94,100 **** static void ! w_short(x, p) ! int x; ! WFILE *p; { w_byte( x & 0xff, p); --- 89,93 ---- static void ! w_short(int x, WFILE *p) { w_byte( x & 0xff, p); *************** *** 103,109 **** static void ! w_long(x, p) ! long x; ! WFILE *p; { w_byte((int)( x & 0xff), p); --- 96,100 ---- static void ! w_long(long x, WFILE *p) { w_byte((int)( x & 0xff), p); *************** *** 115,121 **** #if SIZEOF_LONG > 4 static void ! w_long64(x, p) ! long x; ! WFILE *p; { w_long(x, p); --- 106,110 ---- #if SIZEOF_LONG > 4 static void ! w_long64(long x, WFILE *p) { w_long(x, p); *************** *** 125,131 **** static void ! w_object(v, p) ! PyObject *v; ! WFILE *p; { int i, n; --- 114,118 ---- static void ! w_object(PyObject *v, WFILE *p) { int i, n; *************** *** 287,293 **** void ! PyMarshal_WriteLongToFile(x, fp) ! long x; ! FILE *fp; { WFILE wf; --- 274,278 ---- void ! PyMarshal_WriteLongToFile(long x, FILE *fp) { WFILE wf; *************** *** 299,305 **** void ! PyMarshal_WriteObjectToFile(x, fp) ! PyObject *x; ! FILE *fp; { WFILE wf; --- 284,288 ---- void ! PyMarshal_WriteObjectToFile(PyObject *x, FILE *fp) { WFILE wf; *************** *** 317,324 **** static int ! r_string(s, n, p) ! char *s; ! int n; ! RFILE *p; { if (p->fp != NULL) --- 300,304 ---- static int ! r_string(char *s, int n, RFILE *p) { if (p->fp != NULL) *************** *** 332,337 **** static int ! r_short(p) ! RFILE *p; { register short x; --- 312,316 ---- static int ! r_short(RFILE *p) { register short x; *************** *** 343,348 **** static long ! r_long(p) ! RFILE *p; { register long x; --- 322,326 ---- static long ! r_long(RFILE *p) { register long x; *************** *** 369,374 **** static long ! r_long64(p) ! RFILE *p; { register long x; --- 347,351 ---- static long ! r_long64(RFILE *p) { register long x; *************** *** 389,394 **** static PyObject * ! r_object(p) ! RFILE *p; { PyObject *v, *v2; --- 366,370 ---- static PyObject * ! r_object(RFILE *p) { PyObject *v, *v2; *************** *** 635,640 **** long ! PyMarshal_ReadLongFromFile(fp) ! FILE *fp; { RFILE rf; --- 611,615 ---- long ! PyMarshal_ReadLongFromFile(FILE *fp) { RFILE rf; *************** *** 644,649 **** PyObject * ! PyMarshal_ReadObjectFromFile(fp) ! FILE *fp; { RFILE rf; --- 619,623 ---- PyObject * ! PyMarshal_ReadObjectFromFile(FILE *fp) { RFILE rf; *************** *** 657,663 **** PyObject * ! PyMarshal_ReadObjectFromString(str, len) ! char *str; ! int len; { RFILE rf; --- 631,635 ---- PyObject * ! PyMarshal_ReadObjectFromString(char *str, int len) { RFILE rf; *************** *** 674,679 **** PyObject * ! PyMarshal_WriteObjectToString(x) /* wrs_object() */ ! PyObject *x; { WFILE wf; --- 646,650 ---- PyObject * ! PyMarshal_WriteObjectToString(PyObject *x) /* wrs_object() */ { WFILE wf; *************** *** 704,710 **** static PyObject * ! marshal_dump(self, args) ! PyObject *self; ! PyObject *args; { WFILE wf; --- 675,679 ---- static PyObject * ! marshal_dump(PyObject *self, PyObject *args) { WFILE wf; *************** *** 735,741 **** static PyObject * ! marshal_load(self, args) ! PyObject *self; ! PyObject *args; { RFILE rf; --- 704,708 ---- static PyObject * ! marshal_load(PyObject *self, PyObject *args) { RFILE rf; *************** *** 762,768 **** static PyObject * ! marshal_dumps(self, args) ! PyObject *self; ! PyObject *args; { PyObject *x; --- 729,733 ---- static PyObject * ! marshal_dumps(PyObject *self, PyObject *args) { PyObject *x; *************** *** 773,779 **** static PyObject * ! marshal_loads(self, args) ! PyObject *self; ! PyObject *args; { RFILE rf; --- 738,742 ---- static PyObject * ! marshal_loads(PyObject *self, PyObject *args) { RFILE rf; *************** *** 805,809 **** void ! PyMarshal_Init() { (void) Py_InitModule("marshal", marshal_methods); --- 768,772 ---- void ! PyMarshal_Init(void) { (void) Py_InitModule("marshal", marshal_methods); Index: memmove.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/memmove.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** memmove.c 2000/06/30 23:58:06 2.6 --- memmove.c 2000/07/22 18:47:25 2.7 *************** *** 11,21 **** /* A perhaps slow but I hope correct implementation of memmove */ ! extern char *memcpy(); char * ! memmove(dst, src, n) ! char *dst; ! char *src; ! int n; { char *realdst = dst; --- 11,18 ---- /* A perhaps slow but I hope correct implementation of memmove */ ! extern char *memcpy(char *, char *, int); char * ! memmove(char *dst, char *src, int n) { char *realdst = dst; Index: modsupport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/modsupport.c,v retrieving revision 2.48 retrieving revision 2.49 diff -C2 -r2.48 -r2.49 *** modsupport.c 2000/07/09 03:09:56 2.48 --- modsupport.c 2000/07/22 18:47:25 2.49 *************** *** 43,52 **** PyObject * ! Py_InitModule4(name, methods, doc, passthrough, module_api_version) ! char *name; ! PyMethodDef *methods; ! char *doc; ! PyObject *passthrough; ! int module_api_version; { PyObject *m, *d, *v; --- 43,48 ---- PyObject * ! Py_InitModule4(char *name, PyMethodDef *methods, char *doc, ! PyObject *passthrough, int module_api_version) { PyObject *m, *d, *v; *************** *** 85,92 **** /* Helper for mkvalue() to scan the length of a format */ ! static int countformat(char *format, int endchar); ! static int countformat(format, endchar) ! char *format; ! int endchar; { int count = 0; --- 81,85 ---- /* Helper for mkvalue() to scan the length of a format */ ! static int countformat(char *format, int endchar) { int count = 0; *************** *** 138,146 **** static PyObject * ! do_mkdict(p_format, p_va, endchar, n) ! char **p_format; ! va_list *p_va; ! int endchar; ! int n; { PyObject *d; --- 131,135 ---- static PyObject * ! do_mkdict(char **p_format, va_list *p_va, int endchar, int n) { PyObject *d; *************** *** 184,192 **** static PyObject * ! do_mklist(p_format, p_va, endchar, n) ! char **p_format; ! va_list *p_va; ! int endchar; ! int n; { PyObject *v; --- 173,177 ---- static PyObject * ! do_mklist(char **p_format, va_list *p_va, int endchar, int n) { PyObject *v; *************** *** 225,233 **** static PyObject * ! do_mktuple(p_format, p_va, endchar, n) ! char **p_format; ! va_list *p_va; ! int endchar; ! int n; { PyObject *v; --- 210,214 ---- static PyObject * ! do_mktuple(char **p_format, va_list *p_va, int endchar, int n) { PyObject *v; *************** *** 257,263 **** static PyObject * ! do_mkvalue(p_format, p_va) ! char **p_format; ! va_list *p_va; { for (;;) { --- 238,242 ---- static PyObject * ! do_mkvalue(char **p_format, va_list *p_va) { for (;;) { *************** *** 402,422 **** - #ifdef HAVE_STDARG_PROTOTYPES - /* VARARGS 2 */ PyObject *Py_BuildValue(char *format, ...) - #else - /* VARARGS */ - PyObject *Py_BuildValue(va_alist) va_dcl - #endif { va_list va; PyObject* retval; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, format); - #else - char *format; - va_start(va); - format = va_arg(va, char *); - #endif retval = Py_VaBuildValue(format, va); va_end(va); --- 381,389 ---- *************** *** 425,431 **** PyObject * ! Py_VaBuildValue(format, va) ! char *format; ! va_list va; { char *f = format; --- 392,396 ---- PyObject * ! Py_VaBuildValue(char *format, va_list va) { char *f = format; *************** *** 451,464 **** - #ifdef HAVE_STDARG_PROTOTYPES PyObject * PyEval_CallFunction(PyObject *obj, char *format, ...) - #else - PyObject * - PyEval_CallFunction(obj, format, va_alist) - PyObject *obj; - char *format; - va_dcl - #endif { va_list vargs; --- 416,421 ---- *************** *** 466,474 **** PyObject *res; - #ifdef HAVE_STDARG_PROTOTYPES va_start(vargs, format); - #else - va_start(vargs); - #endif args = Py_VaBuildValue(format, vargs); --- 423,427 ---- *************** *** 485,499 **** - #ifdef HAVE_STDARG_PROTOTYPES PyObject * PyEval_CallMethod(PyObject *obj, char *methodname, char *format, ...) - #else - PyObject * - PyEval_CallMethod(obj, methodname, format, va_alist) - PyObject *obj; - char *methodname; - char *format; - va_dcl - #endif { va_list vargs; --- 438,443 ---- *************** *** 506,514 **** return NULL; - #ifdef HAVE_STDARG_PROTOTYPES va_start(vargs, format); - #else - va_start(vargs); - #endif args = Py_VaBuildValue(format, vargs); --- 450,454 ---- Index: mystrtoul.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/mystrtoul.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** mystrtoul.c 2000/06/30 23:58:06 2.19 --- mystrtoul.c 2000/07/22 18:47:25 2.20 *************** *** 45,52 **** unsigned long ! PyOS_strtoul(str, ptr, base) ! register char * str; ! char ** ptr; ! int base; { register unsigned long result; /* return value of the function */ --- 45,49 ---- unsigned long ! PyOS_strtoul(register char *str, char **ptr, int base) { register unsigned long result; /* return value of the function */ *************** *** 138,145 **** long ! PyOS_strtol(str, ptr, base) ! char * str; ! char ** ptr; ! int base; { long result; --- 135,139 ---- long ! PyOS_strtol(char *str, char **ptr, int base) { long result; Index: pyfpe.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pyfpe.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** pyfpe.c 1998/08/25 17:48:25 2.5 --- pyfpe.c 2000/07/22 18:47:25 2.6 *************** *** 18,23 **** double ! PyFPE_dummy(dummy) ! void *dummy; { return 1.0; --- 18,22 ---- double ! PyFPE_dummy(void *dummy) { return 1.0; Index: pystate.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pystate.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** pystate.c 2000/06/30 23:58:06 2.11 --- pystate.c 2000/07/22 18:47:25 2.12 *************** *** 38,42 **** PyInterpreterState * ! PyInterpreterState_New() { PyInterpreterState *interp = PyMem_NEW(PyInterpreterState, 1); --- 38,42 ---- PyInterpreterState * ! PyInterpreterState_New(void) { PyInterpreterState *interp = PyMem_NEW(PyInterpreterState, 1); *************** *** 59,64 **** void ! PyInterpreterState_Clear(interp) ! PyInterpreterState *interp; { PyThreadState *p; --- 59,63 ---- void ! PyInterpreterState_Clear(PyInterpreterState *interp) { PyThreadState *p; *************** *** 74,79 **** static void ! zapthreads(interp) ! PyInterpreterState *interp; { PyThreadState *p; --- 73,77 ---- static void ! zapthreads(PyInterpreterState *interp) { PyThreadState *p; *************** *** 87,92 **** void ! PyInterpreterState_Delete(interp) ! PyInterpreterState *interp; { PyInterpreterState **p; --- 85,89 ---- void ! PyInterpreterState_Delete(PyInterpreterState *interp) { PyInterpreterState **p; *************** *** 107,112 **** PyThreadState * ! PyThreadState_New(interp) ! PyInterpreterState *interp; { PyThreadState *tstate = PyMem_NEW(PyThreadState, 1); --- 104,108 ---- PyThreadState * ! PyThreadState_New(PyInterpreterState *interp) { PyThreadState *tstate = PyMem_NEW(PyThreadState, 1); *************** *** 144,149 **** void ! PyThreadState_Clear(tstate) ! PyThreadState *tstate; { if (Py_VerboseFlag && tstate->frame != NULL) --- 140,144 ---- void ! PyThreadState_Clear(PyThreadState *tstate) { if (Py_VerboseFlag && tstate->frame != NULL) *************** *** 169,174 **** void ! PyThreadState_Delete(tstate) ! PyThreadState *tstate; { PyInterpreterState *interp; --- 164,168 ---- void ! PyThreadState_Delete(PyThreadState *tstate) { PyInterpreterState *interp; *************** *** 196,200 **** PyThreadState * ! PyThreadState_Get() { if (_PyThreadState_Current == NULL) --- 190,194 ---- PyThreadState * ! PyThreadState_Get(void) { if (_PyThreadState_Current == NULL) *************** *** 206,211 **** PyThreadState * ! PyThreadState_Swap(new) ! PyThreadState *new; { PyThreadState *old = _PyThreadState_Current; --- 200,204 ---- PyThreadState * ! PyThreadState_Swap(PyThreadState *new) { PyThreadState *old = _PyThreadState_Current; *************** *** 223,227 **** PyObject * ! PyThreadState_GetDict() { if (_PyThreadState_Current == NULL) --- 216,220 ---- PyObject * ! PyThreadState_GetDict(void) { if (_PyThreadState_Current == NULL) Index: pythonrun.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v retrieving revision 2.104 retrieving revision 2.105 diff -C2 -r2.104 -r2.105 *** pythonrun.c 2000/07/16 12:04:32 2.104 --- pythonrun.c 2000/07/22 18:47:25 2.105 *************** *** 38,42 **** #include "macglue.h" #endif ! extern char *Py_GetPath(); extern grammar _PyParser_Grammar; /* From graminit.c */ --- 38,42 ---- #include "macglue.h" #endif ! extern char *Py_GetPath(void); extern grammar _PyParser_Grammar; /* From graminit.c */ *************** *** 60,67 **** #endif ! extern void _PyUnicode_Init(); ! extern void _PyUnicode_Fini(); ! extern void _PyCodecRegistry_Init(); ! extern void _PyCodecRegistry_Fini(); --- 60,67 ---- #endif ! extern void _PyUnicode_Init(void); ! extern void _PyUnicode_Fini(void); ! extern void _PyCodecRegistry_Init(void); ! extern void _PyCodecRegistry_Fini(void); *************** *** 79,83 **** int ! Py_IsInitialized() { return initialized; --- 79,83 ---- int ! Py_IsInitialized(void) { return initialized; *************** *** 97,101 **** void ! Py_Initialize() { PyInterpreterState *interp; --- 97,101 ---- void ! Py_Initialize(void) { PyInterpreterState *interp; *************** *** 186,190 **** void ! Py_Finalize() { PyInterpreterState *interp; --- 186,190 ---- void ! Py_Finalize(void) { PyInterpreterState *interp; *************** *** 284,288 **** PyThreadState * ! Py_NewInterpreter() { PyInterpreterState *interp; --- 284,288 ---- PyThreadState * ! Py_NewInterpreter(void) { PyInterpreterState *interp; *************** *** 353,358 **** void ! Py_EndInterpreter(tstate) ! PyThreadState *tstate; { PyInterpreterState *interp = tstate->interp; --- 353,357 ---- void ! Py_EndInterpreter(PyThreadState *tstate) { PyInterpreterState *interp = tstate->interp; *************** *** 374,379 **** void ! Py_SetProgramName(pn) ! char *pn; { if (pn && *pn) --- 373,377 ---- void ! Py_SetProgramName(char *pn) { if (pn && *pn) *************** *** 382,386 **** char * ! Py_GetProgramName() { return progname; --- 380,384 ---- char * ! Py_GetProgramName(void) { return progname; *************** *** 390,395 **** void ! Py_SetPythonHome(home) ! char *home; { default_home = home; --- 388,392 ---- void ! Py_SetPythonHome(char *home) { default_home = home; *************** *** 397,401 **** char * ! Py_GetPythonHome() { char *home = default_home; --- 394,398 ---- char * ! Py_GetPythonHome(void) { char *home = default_home; *************** *** 408,412 **** static void ! initmain() { PyObject *m, *d; --- 405,409 ---- static void ! initmain(void) { PyObject *m, *d; *************** *** 427,431 **** static void ! initsite() { PyObject *m, *f; --- 424,428 ---- static void ! initsite(void) { PyObject *m, *f; *************** *** 452,458 **** int ! PyRun_AnyFile(fp, filename) ! FILE *fp; ! char *filename; { if (filename == NULL) --- 449,453 ---- int ! PyRun_AnyFile(FILE *fp, char *filename) { if (filename == NULL) *************** *** 465,471 **** int ! PyRun_InteractiveLoop(fp, filename) ! FILE *fp; ! char *filename; { PyObject *v; --- 460,464 ---- int ! PyRun_InteractiveLoop(FILE *fp, char *filename) { PyObject *v; *************** *** 496,502 **** int ! PyRun_InteractiveOne(fp, filename) ! FILE *fp; ! char *filename; { PyObject *m, *d, *v, *w; --- 489,493 ---- int ! PyRun_InteractiveOne(FILE *fp, char *filename) { PyObject *m, *d, *v, *w; *************** *** 550,556 **** int ! PyRun_SimpleFile(fp, filename) ! FILE *fp; ! char *filename; { PyObject *m, *d, *v; --- 541,545 ---- int ! PyRun_SimpleFile(FILE *fp, char *filename) { PyObject *m, *d, *v; *************** *** 593,598 **** int ! PyRun_SimpleString(command) ! char *command; { PyObject *m, *d, *v; --- 582,586 ---- int ! PyRun_SimpleString(char *command) { PyObject *m, *d, *v; *************** *** 613,623 **** static int ! parse_syntax_error(err, message, filename, lineno, offset, text) ! PyObject* err; ! PyObject** message; ! char** filename; ! int* lineno; ! int* offset; ! char** text; { long hold; --- 601,606 ---- static int ! parse_syntax_error(PyObject *err, PyObject **message, char **filename, ! int *lineno, int *offset, char **text) { long hold; *************** *** 676,680 **** void ! PyErr_Print() { PyErr_PrintEx(1); --- 659,663 ---- void ! PyErr_Print(void) { PyErr_PrintEx(1); *************** *** 682,687 **** void ! PyErr_PrintEx(set_sys_last_vars) ! int set_sys_last_vars; { int err = 0; --- 665,669 ---- void ! PyErr_PrintEx(int set_sys_last_vars) { int err = 0; *************** *** 854,861 **** PyObject * ! PyRun_String(str, start, globals, locals) ! char *str; ! int start; ! PyObject *globals, *locals; { return run_err_node(PyParser_SimpleParseString(str, start), --- 836,840 ---- PyObject * ! PyRun_String(char *str, int start, PyObject *globals, PyObject *locals) { return run_err_node(PyParser_SimpleParseString(str, start), *************** *** 864,872 **** PyObject * ! PyRun_File(fp, filename, start, globals, locals) ! FILE *fp; ! char *filename; ! int start; ! PyObject *globals, *locals; { return run_err_node(PyParser_SimpleParseFile(fp, filename, start), --- 843,848 ---- PyObject * ! PyRun_File(FILE *fp, char *filename, int start, PyObject *globals, ! PyObject *locals) { return run_err_node(PyParser_SimpleParseFile(fp, filename, start), *************** *** 875,882 **** static PyObject * ! run_err_node(n, filename, globals, locals) ! node *n; ! char *filename; ! PyObject *globals, *locals; { if (n == NULL) --- 851,855 ---- static PyObject * ! run_err_node(node *n, char *filename, PyObject *globals, PyObject *locals) { if (n == NULL) *************** *** 886,893 **** static PyObject * ! run_node(n, filename, globals, locals) ! node *n; ! char *filename; ! PyObject *globals, *locals; { PyCodeObject *co; --- 859,863 ---- static PyObject * ! run_node(node *n, char *filename, PyObject *globals, PyObject *locals) { PyCodeObject *co; *************** *** 903,910 **** static PyObject * ! run_pyc_file(fp, filename, globals, locals) ! FILE *fp; ! char *filename; ! PyObject *globals, *locals; { PyCodeObject *co; --- 873,877 ---- static PyObject * ! run_pyc_file(FILE *fp, char *filename, PyObject *globals, PyObject *locals) { PyCodeObject *co; *************** *** 935,942 **** PyObject * ! Py_CompileString(str, filename, start) ! char *str; ! char *filename; ! int start; { node *n; --- 902,906 ---- PyObject * ! Py_CompileString(char *str, char *filename, int start) { node *n; *************** *** 953,960 **** node * ! PyParser_SimpleParseFile(fp, filename, start) ! FILE *fp; ! char *filename; ! int start; { node *n; --- 917,921 ---- node * ! PyParser_SimpleParseFile(FILE *fp, char *filename, int start) { node *n; *************** *** 970,976 **** node * ! PyParser_SimpleParseString(str, start) ! char *str; ! int start; { node *n; --- 931,935 ---- node * ! PyParser_SimpleParseString(char *str, int start) { node *n; *************** *** 985,990 **** static void ! err_input(err) ! perrdetail *err; { PyObject *v, *w, *errtype; --- 944,948 ---- static void ! err_input(perrdetail *err) { PyObject *v, *w, *errtype; *************** *** 1054,1059 **** void ! Py_FatalError(msg) ! char *msg; { fprintf(stderr, "Fatal Python error: %s\n", msg); --- 1012,1016 ---- void ! Py_FatalError(char *msg) { fprintf(stderr, "Fatal Python error: %s\n", msg); *************** *** 1080,1088 **** #define NEXITFUNCS 32 ! static void (*exitfuncs[NEXITFUNCS])(); static int nexitfuncs = 0; ! int Py_AtExit(func) ! void (*func)(void); { if (nexitfuncs >= NEXITFUNCS) --- 1037,1044 ---- #define NEXITFUNCS 32 ! static void (*exitfuncs[NEXITFUNCS])(void); static int nexitfuncs = 0; ! int Py_AtExit(void (*func)(void)) { if (nexitfuncs >= NEXITFUNCS) *************** *** 1093,1097 **** static void ! call_sys_exitfunc() { PyObject *exitfunc = PySys_GetObject("exitfunc"); --- 1049,1053 ---- static void ! call_sys_exitfunc(void) { PyObject *exitfunc = PySys_GetObject("exitfunc"); *************** *** 1116,1120 **** static void ! call_ll_exitfuncs() { while (nexitfuncs > 0) --- 1072,1076 ---- static void ! call_ll_exitfuncs(void) { while (nexitfuncs > 0) *************** *** 1126,1131 **** void ! Py_Exit(sts) ! int sts; { Py_Finalize(); --- 1082,1086 ---- void ! Py_Exit(int sts) { Py_Finalize(); *************** *** 1139,1143 **** static void ! initsigs() { #ifdef HAVE_SIGNAL_H --- 1094,1098 ---- static void ! initsigs(void) { #ifdef HAVE_SIGNAL_H *************** *** 1153,1158 **** int ! _Py_AskYesNo(prompt) ! char *prompt; { char buf[256]; --- 1108,1112 ---- int ! _Py_AskYesNo(char *prompt) { char buf[256]; *************** *** 1171,1176 **** int ! isatty(fd) ! int fd; { return fd == fileno(stdin); --- 1125,1129 ---- int ! isatty(int fd) { return fd == fileno(stdin); *************** *** 1186,1192 **** */ int ! Py_FdIsInteractive(fp, filename) ! FILE *fp; ! char *filename; { if (isatty((int)fileno(fp))) --- 1139,1143 ---- */ int ! Py_FdIsInteractive(FILE *fp, char *filename) { if (isatty((int)fileno(fp))) Index: sigcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/sigcheck.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** sigcheck.c 2000/06/30 23:58:06 2.6 --- sigcheck.c 2000/07/22 18:47:25 2.7 *************** *** 20,24 **** /* ARGSUSED */ int ! PyErr_CheckSignals() { if (!PyOS_InterruptOccurred()) --- 20,24 ---- /* ARGSUSED */ int ! PyErr_CheckSignals(void) { if (!PyOS_InterruptOccurred()) Index: strdup.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/strdup.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** strdup.c 1999/01/27 17:53:11 2.3 --- strdup.c 2000/07/22 18:47:25 2.4 *************** *** 4,9 **** char * ! strdup(str) ! const char *str; { if (str != NULL) { --- 4,8 ---- char * ! strdup(const char *str) { if (str != NULL) { Index: strerror.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/strerror.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** strerror.c 2000/06/30 23:58:06 2.8 --- strerror.c 2000/07/22 18:47:25 2.9 *************** *** 18,23 **** char * ! strerror(err) ! int err; { static char buf[20]; --- 18,22 ---- char * ! strerror(int err) { static char buf[20]; Index: strtod.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/strtod.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** strtod.c 2000/07/16 12:04:32 1.9 --- strtod.c 2000/07/22 18:47:25 1.10 *************** *** 53,57 **** static double HUGE = 1.7976931348623157e308; ! extern double atof(); /* Only called when result known to be ok */ #ifndef DONT_HAVE_ERRNO_H --- 53,57 ---- static double HUGE = 1.7976931348623157e308; ! extern double atof(const char *); /* Only called when result known to be ok */ #ifndef DONT_HAVE_ERRNO_H *************** *** 60,67 **** extern int errno; ! double strtod(str, ptr) ! char *str; ! char **ptr; ! { int sign, scale, dotseen; int esign, expt; --- 60,65 ---- extern int errno; ! double strtod(char *str, char **ptr) ! { int sign, scale, dotseen; int esign, expt; *************** *** 156,158 **** errno = 0; return atof(buffer)*sign; ! } --- 154,156 ---- errno = 0; return atof(buffer)*sign; ! } Index: structmember.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/structmember.c,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** structmember.c 2000/06/30 23:58:06 2.16 --- structmember.c 2000/07/22 18:47:25 2.17 *************** *** 16,21 **** static PyObject * ! listmembers(mlist) ! struct memberlist *mlist; { int i, n; --- 16,20 ---- static PyObject * ! listmembers(struct memberlist *mlist) { int i, n; *************** *** 40,47 **** PyObject * ! PyMember_Get(addr, mlist, name) ! char *addr; ! struct memberlist *mlist; ! char *name; { struct memberlist *l; --- 39,43 ---- PyObject * ! PyMember_Get(char *addr, struct memberlist *mlist, char *name) { struct memberlist *l; *************** *** 140,148 **** int ! PyMember_Set(addr, mlist, name, v) ! char *addr; ! struct memberlist *mlist; ! char *name; ! PyObject *v; { struct memberlist *l; --- 136,140 ---- int ! PyMember_Set(char *addr, struct memberlist *mlist, char *name, PyObject *v) { struct memberlist *l; Index: sysmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v retrieving revision 2.69 retrieving revision 2.70 diff -C2 -r2.69 -r2.70 *** sysmodule.c 2000/07/09 03:09:56 2.69 --- sysmodule.c 2000/07/22 18:47:25 2.70 *************** *** 39,44 **** PyObject * ! PySys_GetObject(name) ! char *name; { PyThreadState *tstate = PyThreadState_Get(); --- 39,43 ---- PyObject * ! PySys_GetObject(char *name) { PyThreadState *tstate = PyThreadState_Get(); *************** *** 50,56 **** FILE * ! PySys_GetFile(name, def) ! char *name; ! FILE *def; { FILE *fp = NULL; --- 49,53 ---- FILE * ! PySys_GetFile(char *name, FILE *def) { FILE *fp = NULL; *************** *** 64,70 **** int ! PySys_SetObject(name, v) ! char *name; ! PyObject *v; { PyThreadState *tstate = PyThreadState_Get(); --- 61,65 ---- int ! PySys_SetObject(char *name, PyObject *v) { PyThreadState *tstate = PyThreadState_Get(); *************** *** 81,87 **** static PyObject * ! sys_exc_info(self, args) ! PyObject *self; ! PyObject *args; { PyThreadState *tstate; --- 76,80 ---- static PyObject * ! sys_exc_info(PyObject *self, PyObject *args) { PyThreadState *tstate; *************** *** 104,110 **** static PyObject * ! sys_exit(self, args) ! PyObject *self; ! PyObject *args; { /* Raise SystemExit so callers may catch it or clean up. */ --- 97,101 ---- static PyObject * ! sys_exit(PyObject *self, PyObject *args) { /* Raise SystemExit so callers may catch it or clean up. */ *************** *** 123,129 **** static PyObject * ! sys_getdefaultencoding(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, ":getdefaultencoding")) --- 114,118 ---- static PyObject * ! sys_getdefaultencoding(PyObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":getdefaultencoding")) *************** *** 139,145 **** static PyObject * ! sys_setdefaultencoding(self, args) ! PyObject *self; ! PyObject *args; { char *encoding; --- 128,132 ---- static PyObject * ! sys_setdefaultencoding(PyObject *self, PyObject *args) { char *encoding; *************** *** 158,164 **** static PyObject * ! sys_settrace(self, args) ! PyObject *self; ! PyObject *args; { PyThreadState *tstate = PyThreadState_Get(); --- 145,149 ---- static PyObject * ! sys_settrace(PyObject *self, PyObject *args) { PyThreadState *tstate = PyThreadState_Get(); *************** *** 180,186 **** static PyObject * ! sys_setprofile(self, args) ! PyObject *self; ! PyObject *args; { PyThreadState *tstate = PyThreadState_Get(); --- 165,169 ---- static PyObject * ! sys_setprofile(PyObject *self, PyObject *args) { PyThreadState *tstate = PyThreadState_Get(); *************** *** 202,208 **** static PyObject * ! sys_setcheckinterval(self, args) ! PyObject *self; ! PyObject *args; { PyThreadState *tstate = PyThreadState_Get(); --- 185,189 ---- static PyObject * ! sys_setcheckinterval(PyObject *self, PyObject *args) { PyThreadState *tstate = PyThreadState_Get(); *************** *** 224,230 **** static PyObject * ! sys_mdebug(self, args) ! PyObject *self; ! PyObject *args; { int flag; --- 205,209 ---- static PyObject * ! sys_mdebug(PyObject *self, PyObject *args) { int flag; *************** *** 238,244 **** static PyObject * ! sys_getrefcount(self, args) ! PyObject *self; ! PyObject *args; { PyObject *arg; --- 217,221 ---- static PyObject * ! sys_getrefcount(PyObject *self, PyObject *args) { PyObject *arg; *************** *** 268,273 **** #ifdef COUNT_ALLOCS static PyObject * ! sys_getcounts(self, args) ! PyObject *self, *args; { extern PyObject *get_counts(void); --- 245,249 ---- #ifdef COUNT_ALLOCS static PyObject * ! sys_getcounts(PyObject *self, PyObject *args) { extern PyObject *get_counts(void); *************** *** 316,320 **** static PyObject * ! list_builtin_module_names() { PyObject *list = PyList_New(0); --- 292,296 ---- static PyObject * ! list_builtin_module_names(void) { PyObject *list = PyList_New(0); *************** *** 408,412 **** PyObject * ! _PySys_Init() { extern int fclose(FILE *); --- 384,388 ---- PyObject * ! _PySys_Init(void) { extern int fclose(FILE *); *************** *** 496,502 **** static PyObject * ! makepathobject(path, delim) ! char *path; ! int delim; { int i, n; --- 472,476 ---- static PyObject * ! makepathobject(char *path, int delim) { int i, n; *************** *** 531,536 **** void ! PySys_SetPath(path) ! char *path; { PyObject *v; --- 505,509 ---- void ! PySys_SetPath(char *path) { PyObject *v; *************** *** 543,549 **** static PyObject * ! makeargvobject(argc, argv) ! int argc; ! char **argv; { PyObject *av; --- 516,520 ---- static PyObject * ! makeargvobject(int argc, char **argv) { PyObject *av; *************** *** 571,577 **** void ! PySys_SetArgv(argc, argv) ! int argc; ! char **argv; { PyObject *av = makeargvobject(argc, argv); --- 542,546 ---- void ! PySys_SetArgv(int argc, char **argv) { PyObject *av = makeargvobject(argc, argv); *************** *** 675,683 **** static void ! mywrite(name, fp, format, va) ! char *name; ! FILE *fp; ! const char *format; ! va_list va; { PyObject *file; --- 644,648 ---- static void ! mywrite(char *name, FILE *fp, const char *format, va_list va) { PyObject *file; *************** *** 701,720 **** void - #ifdef HAVE_STDARG_PROTOTYPES PySys_WriteStdout(const char *format, ...) - #else - PySys_WriteStdout(va_alist) - va_dcl - #endif { va_list va; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, format); - #else - char *format; - va_start(va); - format = va_arg(va, char *); - #endif mywrite("stdout", stdout, format, va); va_end(va); --- 666,674 ---- *************** *** 722,741 **** void - #ifdef HAVE_STDARG_PROTOTYPES PySys_WriteStderr(const char *format, ...) - #else - PySys_WriteStderr(va_alist) - va_dcl - #endif { va_list va; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, format); - #else - char *format; - va_start(va); - format = va_arg(va, char *); - #endif mywrite("stderr", stderr, format, va); va_end(va); --- 676,684 ---- Index: thread.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread.c,v retrieving revision 2.31 retrieving revision 2.32 diff -C2 -r2.31 -r2.32 *** thread.c 2000/06/30 23:58:06 2.31 --- thread.c 2000/07/22 18:47:25 2.32 *************** *** 30,34 **** #else #ifdef Py_DEBUG ! extern char *getenv(); #endif #endif --- 30,34 ---- #else #ifdef Py_DEBUG ! extern char *getenv(const char *); #endif #endif *************** *** 74,88 **** #endif /* _POSIX_THREADS */ - #ifdef __STDC__ - #define _P(args) args - #define _P0() (void) - #define _P1(v,t) (t) - #define _P2(v1,t1,v2,t2) (t1,t2) - #else - #define _P(args) () - #define _P0() () - #define _P1(v,t) (v) t; - #define _P2(v1,t1,v2,t2) (v1,v2) t1; t2; - #endif /* __STDC__ */ #ifdef Py_DEBUG --- 74,77 ---- *************** *** 99,103 **** static void PyThread__init_thread(); /* Forward */ ! void PyThread_init_thread _P0() { #ifdef Py_DEBUG --- 88,92 ---- static void PyThread__init_thread(); /* Forward */ ! void PyThread_init_thread(void) { #ifdef Py_DEBUG Index: thread_cthread.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_cthread.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** thread_cthread.h 2000/06/30 23:58:06 2.11 --- thread_cthread.h 2000/07/22 18:47:25 2.12 *************** *** 15,19 **** * Initialization. */ ! static void PyThread__init_thread _P0() { cthread_init(); --- 15,20 ---- * Initialization. */ ! static void ! PyThread__init_thread(void) { cthread_init(); *************** *** 23,27 **** * Thread support. */ ! int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) { int success = 0; /* init not needed when SOLARIS_THREADS and */ --- 24,29 ---- * Thread support. */ ! int ! PyThread_start_new_thread(func, void (*func)(void *), void *arg) { int success = 0; /* init not needed when SOLARIS_THREADS and */ *************** *** 38,42 **** } ! long PyThread_get_thread_ident _P0() { if (!initialized) --- 40,45 ---- } ! long ! PyThread_get_thread_ident(void) { if (!initialized) *************** *** 45,49 **** } ! static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); --- 48,53 ---- } ! static void ! do_PyThread_exit_thread(int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); *************** *** 56,65 **** } ! void PyThread_exit_thread _P0() { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread _P0() { do_PyThread_exit_thread(1); --- 60,71 ---- } ! void ! PyThread_exit_thread(void) { do_PyThread_exit_thread(0); } ! void ! PyThread__exit_thread(void) { do_PyThread_exit_thread(1); *************** *** 67,71 **** #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog _P2(status, int status, no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); --- 73,78 ---- #ifndef NO_EXIT_PROG ! static ! void do_PyThread_exit_prog(int status, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); *************** *** 81,90 **** } ! void PyThread_exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 1); --- 88,99 ---- } ! void ! PyThread_exit_prog(int status) { do_PyThread_exit_prog(status, 0); } ! void ! PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); *************** *** 95,99 **** * Lock support. */ ! PyThread_type_lock PyThread_allocate_lock _P0() { mutex_t lock; --- 104,109 ---- * Lock support. */ ! PyThread_type_lock ! PyThread_allocate_lock(void) { mutex_t lock; *************** *** 113,117 **** } ! void PyThread_free_lock _P1(lock, PyThread_type_lock lock) { dprintf(("PyThread_free_lock(%p) called\n", lock)); --- 123,128 ---- } ! void ! PyThread_free_lock(PyThread_type_lock lock) { dprintf(("PyThread_free_lock(%p) called\n", lock)); *************** *** 119,123 **** } ! int PyThread_acquire_lock _P2(lock, PyThread_type_lock lock, waitflag, int waitflag) { int success = FALSE; --- 130,135 ---- } ! int ! PyThread_acquire_lock(PyThread_type_lock lock, int waitflag) { int success = FALSE; *************** *** 134,138 **** } ! void PyThread_release_lock _P1(lock, PyThread_type_lock lock) { dprintf(("PyThread_release_lock(%p) called\n", lock)); --- 146,151 ---- } ! void ! PyThread_release_lock(PyThread_type_lock lock) { dprintf(("PyThread_release_lock(%p) called\n", lock)); *************** *** 154,158 **** * */ ! PyThread_type_sema PyThread_allocate_sema _P1(value, int value) { char *sema = 0; --- 167,172 ---- * */ ! PyThread_type_sema ! PyThread_allocate_sema(int value) { char *sema = 0; *************** *** 165,174 **** } ! void PyThread_free_sema _P1(sema, PyThread_type_sema sema) { dprintf(("PyThread_free_sema(%p) called\n", sema)); } ! int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag) { dprintf(("PyThread_down_sema(%p, %d) called\n", sema, waitflag)); --- 179,190 ---- } ! void ! PyThread_free_sema(PyThread_type_sema sema) { dprintf(("PyThread_free_sema(%p) called\n", sema)); } ! int ! PyThread_down_sema(PyThread_type_sema sema, int waitflag) { dprintf(("PyThread_down_sema(%p, %d) called\n", sema, waitflag)); *************** *** 177,181 **** } ! void PyThread_up_sema _P1(sema, PyThread_type_sema sema) { dprintf(("PyThread_up_sema(%p)\n", sema)); --- 193,198 ---- } ! void ! PyThread_up_sema(PyThread_type_sema sema) { dprintf(("PyThread_up_sema(%p)\n", sema)); Index: thread_foobar.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_foobar.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** thread_foobar.h 2000/06/30 23:58:06 2.9 --- thread_foobar.h 2000/07/22 18:47:25 2.10 *************** *** 12,16 **** * Initialization. */ ! static void PyThread__init_thread _P0() { } --- 12,17 ---- * Initialization. */ ! static void ! PyThread__init_thread(void) { } *************** *** 19,23 **** * Thread support. */ ! int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) { int success = 0; /* init not needed when SOLARIS_THREADS and */ --- 20,25 ---- * Thread support. */ ! int ! PyThread_start_new_thread(void (*func)(void *), void *arg) { int success = 0; /* init not needed when SOLARIS_THREADS and */ *************** *** 30,34 **** } ! long PyThread_get_thread_ident _P0() { if (!initialized) --- 32,37 ---- } ! long ! PyThread_get_thread_ident(void) { if (!initialized) *************** *** 36,40 **** } ! static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); --- 39,44 ---- } ! static ! void do_PyThread_exit_thread(int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); *************** *** 46,55 **** } ! void PyThread_exit_thread _P0() { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread _P0() { do_PyThread_exit_thread(1); --- 50,61 ---- } ! void ! PyThread_exit_thread(void) { do_PyThread_exit_thread(0); } ! void ! PyThread__exit_thread(void) { do_PyThread_exit_thread(1); *************** *** 57,61 **** #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog _P2(status, int status, no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); --- 63,68 ---- #ifndef NO_EXIT_PROG ! static ! void do_PyThread_exit_prog(int status, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); *************** *** 67,76 **** } ! void PyThread_exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 1); --- 74,85 ---- } ! void ! PyThread_exit_prog(int status) { do_PyThread_exit_prog(status, 0); } ! void ! PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); *************** *** 81,85 **** * Lock support. */ ! PyThread_type_lock PyThread_allocate_lock _P0() { --- 90,95 ---- * Lock support. */ ! PyThread_type_lock ! PyThread_allocate_lock(void) { *************** *** 92,101 **** } ! void PyThread_free_lock _P1(lock, PyThread_type_lock lock) { dprintf(("PyThread_free_lock(%p) called\n", lock)); } ! int PyThread_acquire_lock _P2(lock, PyThread_type_lock lock, waitflag, int waitflag) { int success; --- 102,113 ---- } ! void ! PyThread_free_lock(PyThread_type_lock lock) { dprintf(("PyThread_free_lock(%p) called\n", lock)); } ! int ! PyThread_acquire_lock(PyThread_type_lock lock, int waitflag) { int success; *************** *** 106,110 **** } ! void PyThread_release_lock _P1(lock, PyThread_type_lock lock) { dprintf(("PyThread_release_lock(%p) called\n", lock)); --- 118,123 ---- } ! void ! PyThread_release_lock(PyThread_type_lock lock) { dprintf(("PyThread_release_lock(%p) called\n", lock)); *************** *** 114,118 **** * Semaphore support. */ ! PyThread_type_sema PyThread_allocate_sema _P1(value, int value) { dprintf(("PyThread_allocate_sema called\n")); --- 127,132 ---- * Semaphore support. */ ! PyThread_type_sema ! PyThread_allocate_sema(int value) { dprintf(("PyThread_allocate_sema called\n")); *************** *** 124,133 **** } ! void PyThread_free_sema _P1(sema, PyThread_type_sema sema) { dprintf(("PyThread_free_sema(%p) called\n", sema)); } ! int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag) { dprintf(("PyThread_down_sema(%p, %d) called\n", sema, waitflag)); --- 138,149 ---- } ! void ! PyThread_free_sema(PyThread_type_sema sema) { dprintf(("PyThread_free_sema(%p) called\n", sema)); } ! int ! PyThread_down_sema(PyThread_type_sema sema, int waitflag) { dprintf(("PyThread_down_sema(%p, %d) called\n", sema, waitflag)); *************** *** 136,140 **** } ! void PyThread_up_sema _P1(sema, PyThread_type_sema sema) { dprintf(("PyThread_up_sema(%p)\n", sema)); --- 152,157 ---- } ! void ! PyThread_up_sema(PyThread_type_sema sema) { dprintf(("PyThread_up_sema(%p)\n", sema)); Index: thread_lwp.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_lwp.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** thread_lwp.h 2000/07/16 12:04:32 2.11 --- thread_lwp.h 2000/07/22 18:47:25 2.12 *************** *** 26,30 **** * Initialization. */ ! static void PyThread__init_thread _P0() { lwp_setstkcache(STACKSIZE, NSTACKS); --- 26,30 ---- * Initialization. */ ! static void PyThread__init_thread(void) { lwp_setstkcache(STACKSIZE, NSTACKS); *************** *** 36,40 **** ! int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) { thread_t tid; --- 36,40 ---- ! int PyThread_start_new_thread(void (*func)(void *), void *arg) { thread_t tid; *************** *** 47,51 **** } ! long PyThread_get_thread_ident _P0() { thread_t tid; --- 47,51 ---- } ! long PyThread_get_thread_ident(void) { thread_t tid; *************** *** 57,61 **** } ! static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); --- 57,61 ---- } ! static void do_PyThread_exit_thread(int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); *************** *** 68,77 **** } ! void PyThread_exit_thread _P0() { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread _P0() { do_PyThread_exit_thread(1); --- 68,77 ---- } ! void PyThread_exit_thread(void) { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread(void) { do_PyThread_exit_thread(1); *************** *** 79,83 **** #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog _P2(status, int status, no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); --- 79,83 ---- #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog(int status, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); *************** *** 90,99 **** } ! void PyThread_exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 1); --- 90,99 ---- } ! void PyThread_exit_prog(int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); *************** *** 104,108 **** * Lock support. */ ! PyThread_type_lock PyThread_allocate_lock _P0() { struct lock *lock; --- 104,108 ---- * Lock support. */ ! PyThread_type_lock PyThread_allocate_lock(void) { struct lock *lock; *************** *** 121,125 **** } ! void PyThread_free_lock _P1(lock, PyThread_type_lock lock) { dprintf(("PyThread_free_lock(%p) called\n", lock)); --- 121,125 ---- } ! void PyThread_free_lock(PyThread_type_lock lock) { dprintf(("PyThread_free_lock(%p) called\n", lock)); *************** *** 128,132 **** } ! int PyThread_acquire_lock _P2(lock, PyThread_type_lock lock, waitflag, int waitflag) { int success; --- 128,132 ---- } ! int PyThread_acquire_lock(PyThread_type_lock lock, int waitflag) { int success; *************** *** 149,153 **** } ! void PyThread_release_lock _P1(lock, PyThread_type_lock lock) { dprintf(("PyThread_release_lock(%p) called\n", lock)); --- 149,153 ---- } ! void PyThread_release_lock(PyThread_type_lock lock) { dprintf(("PyThread_release_lock(%p) called\n", lock)); *************** *** 161,165 **** * Semaphore support. */ ! PyThread_type_sema PyThread_allocate_sema _P1(value, int value) { PyThread_type_sema sema = 0; --- 161,165 ---- * Semaphore support. */ ! PyThread_type_sema PyThread_allocate_sema(int value) { PyThread_type_sema sema = 0; *************** *** 172,181 **** } ! void PyThread_free_sema _P1(sema, PyThread_type_sema sema) { dprintf(("PyThread_free_sema(%p) called\n", sema)); } ! int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag) { dprintf(("PyThread_down_sema(%p, %d) called\n", sema, waitflag)); --- 172,181 ---- } ! void PyThread_free_sema(PyThread_type_sema sema) { dprintf(("PyThread_free_sema(%p) called\n", sema)); } ! int PyThread_down_sema(PyThread_type_sema sema, int waitflag) { dprintf(("PyThread_down_sema(%p, %d) called\n", sema, waitflag)); *************** *** 184,188 **** } ! void PyThread_up_sema _P1(sema, PyThread_type_sema sema) { dprintf(("PyThread_up_sema(%p)\n", sema)); --- 184,188 ---- } ! void PyThread_up_sema(PyThread_type_sema sema) { dprintf(("PyThread_up_sema(%p)\n", sema)); Index: thread_nt.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_nt.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** thread_nt.h 2000/06/30 23:58:06 2.14 --- thread_nt.h 2000/07/22 18:47:25 2.15 *************** *** 123,127 **** } ! PNRMUTEX AllocNonRecursiveMutex() { PNRMUTEX mutex = (PNRMUTEX)malloc(sizeof(NRMUTEX)) ; --- 123,127 ---- } ! PNRMUTEX AllocNonRecursiveMutex(void) { PNRMUTEX mutex = (PNRMUTEX)malloc(sizeof(NRMUTEX)) ; *************** *** 232,236 **** } ! void PyThread__exit_prog _P1(int status) { do_PyThread_exit_prog(status, 1); --- 232,236 ---- } ! void PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); Index: thread_os2.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_os2.h,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** thread_os2.h 2000/07/16 12:04:32 2.8 --- thread_os2.h 2000/07/22 18:47:25 2.9 *************** *** 30,34 **** * Initialization of the C package, should not be needed. */ ! static void PyThread__init_thread(void) { } --- 30,35 ---- * Initialization of the C package, should not be needed. */ ! static void ! PyThread__init_thread(void) { } *************** *** 37,41 **** * Thread support. */ ! int PyThread_start_new_thread(void (*func)(void *), void *arg) { int aThread; --- 38,43 ---- * Thread support. */ ! int ! PyThread_start_new_thread(void (*func)(void *), void *arg) { int aThread; *************** *** 53,57 **** } ! long PyThread_get_thread_ident(void) { PPIB pib; --- 55,60 ---- } ! long ! PyThread_get_thread_ident(void) { PPIB pib; *************** *** 65,69 **** } ! static void do_PyThread_exit_thread(int no_cleanup) { dprintf(("%ld: PyThread_exit_thread called\n", PyThread_get_thread_ident())); --- 68,73 ---- } ! static void ! do_PyThread_exit_thread(int no_cleanup) { dprintf(("%ld: PyThread_exit_thread called\n", PyThread_get_thread_ident())); *************** *** 76,85 **** } ! void PyThread_exit_thread(void) { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread(void) { do_PyThread_exit_thread(1); --- 80,91 ---- } ! void ! PyThread_exit_thread(void) { do_PyThread_exit_thread(0); } ! void ! PyThread__exit_thread(void) { do_PyThread_exit_thread(1); *************** *** 87,91 **** #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog(int status, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); --- 93,98 ---- #ifndef NO_EXIT_PROG ! static void ! do_PyThread_exit_prog(int status, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); *************** *** 97,106 **** } ! void PyThread_exit_prog(int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog _P1(int status) { do_PyThread_exit_prog(status, 1); --- 104,115 ---- } ! void ! PyThread_exit_prog(int status) { do_PyThread_exit_prog(status, 0); } ! void ! PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); *************** *** 113,117 **** * tell whether a thread already own the lock or not. */ ! PyThread_type_lock PyThread_allocate_lock(void) { HMTX aLock; --- 122,127 ---- * tell whether a thread already own the lock or not. */ ! PyThread_type_lock ! PyThread_allocate_lock(void) { HMTX aLock; *************** *** 132,136 **** } ! void PyThread_free_lock(PyThread_type_lock aLock) { dprintf(("%ld: PyThread_free_lock(%p) called\n", PyThread_get_thread_ident(),aLock)); --- 142,147 ---- } ! void ! PyThread_free_lock(PyThread_type_lock aLock) { dprintf(("%ld: PyThread_free_lock(%p) called\n", PyThread_get_thread_ident(),aLock)); *************** *** 145,149 **** * if the lock has already been acquired by this thread! */ ! int PyThread_acquire_lock(PyThread_type_lock aLock, int waitflag) { int success = 1; --- 156,161 ---- * if the lock has already been acquired by this thread! */ ! int ! PyThread_acquire_lock(PyThread_type_lock aLock, int waitflag) { int success = 1; *************** *** 173,177 **** } ! void PyThread_release_lock(PyThread_type_lock aLock) { dprintf(("%ld: PyThread_release_lock(%p) called\n", PyThread_get_thread_ident(),aLock)); --- 185,190 ---- } ! void ! PyThread_release_lock(PyThread_type_lock aLock) { dprintf(("%ld: PyThread_release_lock(%p) called\n", PyThread_get_thread_ident(),aLock)); *************** *** 186,205 **** * Semaphore support. */ ! PyThread_type_sema PyThread_allocate_sema(int value) { return (PyThread_type_sema) 0; } ! void PyThread_free_sema(PyThread_type_sema aSemaphore) { } ! int PyThread_down_sema(PyThread_type_sema aSemaphore, int waitflag) { return -1; } ! void PyThread_up_sema(PyThread_type_sema aSemaphore) { dprintf(("%ld: PyThread_up_sema(%p)\n", PyThread_get_thread_ident(), aSemaphore)); --- 199,222 ---- * Semaphore support. */ ! PyThread_type_sema ! PyThread_allocate_sema(int value) { return (PyThread_type_sema) 0; } ! void ! PyThread_free_sema(PyThread_type_sema aSemaphore) { } ! int ! PyThread_down_sema(PyThread_type_sema aSemaphore, int waitflag) { return -1; } ! void ! PyThread_up_sema(PyThread_type_sema aSemaphore) { dprintf(("%ld: PyThread_up_sema(%p)\n", PyThread_get_thread_ident(), aSemaphore)); Index: thread_pth.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_pth.h,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** thread_pth.h 2000/06/30 23:58:06 2.4 --- thread_pth.h 2000/07/22 18:47:25 2.5 *************** *** 44,48 **** */ ! static void PyThread__init_thread _P0() { pth_init(); --- 44,48 ---- */ ! static void PyThread__init_thread(void) { pth_init(); *************** *** 54,58 **** ! int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) { pth_t th; --- 54,58 ---- ! int PyThread_start_new_thread(void (*func)(void *), void *arg) { pth_t th; *************** *** 63,67 **** th = pth_spawn(PTH_ATTR_DEFAULT, ! (void* (*)_P((void *)))func, (void *)arg ); --- 63,67 ---- th = pth_spawn(PTH_ATTR_DEFAULT, ! (void* (*)(void *))func, (void *)arg ); *************** *** 70,74 **** } ! long PyThread_get_thread_ident _P0() { volatile pth_t threadid; --- 70,74 ---- } ! long PyThread_get_thread_ident(void) { volatile pth_t threadid; *************** *** 80,84 **** } ! static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); --- 80,84 ---- } ! static void do_PyThread_exit_thread(int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); *************** *** 91,100 **** } ! void PyThread_exit_thread _P0() { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread _P0() { do_PyThread_exit_thread(1); --- 91,100 ---- } ! void PyThread_exit_thread(void) { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread(void) { do_PyThread_exit_thread(1); *************** *** 102,106 **** #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog _P2(status, int status, no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); --- 102,106 ---- #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog(int status, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); *************** *** 112,121 **** } ! void PyThread_exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 1); --- 112,121 ---- } ! void PyThread_exit_prog(int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); *************** *** 126,130 **** * Lock support. */ ! PyThread_type_lock PyThread_allocate_lock _P0() { pth_lock *lock; --- 126,130 ---- * Lock support. */ ! PyThread_type_lock PyThread_allocate_lock(void) { pth_lock *lock; *************** *** 152,156 **** } ! void PyThread_free_lock _P1(lock, PyThread_type_lock lock) { pth_lock *thelock = (pth_lock *)lock; --- 152,156 ---- } ! void PyThread_free_lock(PyThread_type_lock lock) { pth_lock *thelock = (pth_lock *)lock; *************** *** 162,166 **** } ! int PyThread_acquire_lock _P2(lock, PyThread_type_lock lock, waitflag, int waitflag) { int success; --- 162,166 ---- } ! int PyThread_acquire_lock(PyThread_type_lock lock, int waitflag) { int success; *************** *** 199,203 **** } ! void PyThread_release_lock _P1(lock, PyThread_type_lock lock) { pth_lock *thelock = (pth_lock *)lock; --- 199,203 ---- } ! void PyThread_release_lock(PyThread_type_lock lock) { pth_lock *thelock = (pth_lock *)lock; *************** *** 229,233 **** }; ! PyThread_type_sema PyThread_allocate_sema _P1(value, int value) { struct semaphore *sema; --- 229,233 ---- }; ! PyThread_type_sema PyThread_allocate_sema(int value) { struct semaphore *sema; *************** *** 254,258 **** } ! void PyThread_free_sema _P1(sema, PyThread_type_sema sema) { int status, error = 0; --- 254,258 ---- } ! void PyThread_free_sema(PyThread_type_sema sema) { int status, error = 0; *************** *** 263,267 **** } ! int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag) { int status, error = 0, success; --- 263,267 ---- } ! int PyThread_down_sema(PyThread_type_sema sema, int waitflag) { int status, error = 0, success; *************** *** 292,296 **** } ! void PyThread_up_sema _P1(sema, PyThread_type_sema sema) { int status, error = 0; --- 292,296 ---- } ! void PyThread_up_sema(PyThread_type_sema sema) { int status, error = 0; Index: thread_pthread.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_pthread.h,v retrieving revision 2.27 retrieving revision 2.28 diff -C2 -r2.27 -r2.28 *** thread_pthread.h 2000/06/30 23:58:06 2.27 --- thread_pthread.h 2000/07/22 18:47:25 2.28 *************** *** 101,109 **** #ifdef _HAVE_BSDI ! static void _noop() { } ! static void PyThread__init_thread _P0() { /* DO AN INIT BY STARTING THE THREAD */ --- 101,111 ---- #ifdef _HAVE_BSDI ! static ! void _noop(void) { } ! static void ! PyThread__init_thread(void) { /* DO AN INIT BY STARTING THE THREAD */ *************** *** 116,120 **** #else /* !_HAVE_BSDI */ ! static void PyThread__init_thread _P0() { #if defined(_AIX) && defined(__GNUC__) --- 118,123 ---- #else /* !_HAVE_BSDI */ ! static void ! PyThread__init_thread(void) { #if defined(_AIX) && defined(__GNUC__) *************** *** 130,134 **** ! int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) { pthread_t th; --- 133,138 ---- ! int ! PyThread_start_new_thread(void (*func)(void *), void *arg) { pthread_t th; *************** *** 145,149 **** #elif defined(PY_PTHREAD_D6) pthread_attr_default, ! (void* (*)_P((void *)))func, arg #elif defined(PY_PTHREAD_D7) --- 149,153 ---- #elif defined(PY_PTHREAD_D6) pthread_attr_default, ! (void* (*)(void *))func, arg #elif defined(PY_PTHREAD_D7) *************** *** 153,157 **** #elif defined(PY_PTHREAD_STD) (pthread_attr_t*)NULL, ! (void* (*)_P((void *)))func, (void *)arg #endif --- 157,161 ---- #elif defined(PY_PTHREAD_STD) (pthread_attr_t*)NULL, ! (void* (*)(void *))func, (void *)arg #endif *************** *** 168,172 **** } ! long PyThread_get_thread_ident _P0() { volatile pthread_t threadid; --- 172,177 ---- } ! long ! PyThread_get_thread_ident(void) { volatile pthread_t threadid; *************** *** 178,182 **** } ! static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); --- 183,188 ---- } ! static void ! do_PyThread_exit_thread(int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); *************** *** 189,198 **** } ! void PyThread_exit_thread _P0() { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread _P0() { do_PyThread_exit_thread(1); --- 195,206 ---- } ! void ! PyThread_exit_thread(void) { do_PyThread_exit_thread(0); } ! void ! PyThread__exit_thread(void) { do_PyThread_exit_thread(1); *************** *** 200,204 **** #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog _P2(status, int status, no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); --- 208,213 ---- #ifndef NO_EXIT_PROG ! static void ! do_PyThread_exit_prog(int status, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); *************** *** 210,219 **** } ! void PyThread_exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 1); --- 219,230 ---- } ! void ! PyThread_exit_prog(int status) { do_PyThread_exit_prog(status, 0); } ! void ! PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); *************** *** 224,228 **** * Lock support. */ ! PyThread_type_lock PyThread_allocate_lock _P0() { pthread_lock *lock; --- 235,240 ---- * Lock support. */ ! PyThread_type_lock ! PyThread_allocate_lock(void) { pthread_lock *lock; *************** *** 256,260 **** } ! void PyThread_free_lock _P1(lock, PyThread_type_lock lock) { pthread_lock *thelock = (pthread_lock *)lock; --- 268,273 ---- } ! void ! PyThread_free_lock(PyThread_type_lock lock) { pthread_lock *thelock = (pthread_lock *)lock; *************** *** 272,276 **** } ! int PyThread_acquire_lock _P2(lock, PyThread_type_lock lock, waitflag, int waitflag) { int success; --- 285,290 ---- } ! int ! PyThread_acquire_lock(PyThread_type_lock lock, int waitflag) { int success; *************** *** 309,313 **** } ! void PyThread_release_lock _P1(lock, PyThread_type_lock lock) { pthread_lock *thelock = (pthread_lock *)lock; --- 323,328 ---- } ! void ! PyThread_release_lock(PyThread_type_lock lock) { pthread_lock *thelock = (pthread_lock *)lock; *************** *** 339,343 **** }; ! PyThread_type_sema PyThread_allocate_sema _P1(value, int value) { struct semaphore *sema; --- 354,359 ---- }; ! PyThread_type_sema ! PyThread_allocate_sema(int value) { struct semaphore *sema; *************** *** 366,370 **** } ! void PyThread_free_sema _P1(sema, PyThread_type_sema sema) { int status, error = 0; --- 382,387 ---- } ! void ! PyThread_free_sema(PyThread_type_sema sema) { int status, error = 0; *************** *** 379,383 **** } ! int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag) { int status, error = 0, success; --- 396,401 ---- } ! int ! PyThread_down_sema(PyThread_type_sema sema, int waitflag) { int status, error = 0, success; *************** *** 408,412 **** } ! void PyThread_up_sema _P1(sema, PyThread_type_sema sema) { int status, error = 0; --- 426,431 ---- } ! void ! PyThread_up_sema(PyThread_type_sema sema) { int status, error = 0; Index: thread_sgi.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_sgi.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** thread_sgi.h 2000/06/30 23:58:06 2.12 --- thread_sgi.h 2000/07/22 18:47:25 2.13 *************** *** 48,52 **** * well (because of an PyThread_exit_prog()) or whether we should continue on. */ ! static void exit_sig _P0() { d2printf(("exit_sig called\n")); --- 48,52 ---- * well (because of an PyThread_exit_prog()) or whether we should continue on. */ ! static void exit_sig(void) { d2printf(("exit_sig called\n")); *************** *** 69,73 **** * done from the library, we do as if an PyThread_exit_prog() was intended. */ ! static void maybe_exit _P0() { dprintf(("maybe_exit called\n")); --- 69,73 ---- * done from the library, we do as if an PyThread_exit_prog() was intended. */ ! static void maybe_exit(void) { dprintf(("maybe_exit called\n")); *************** *** 83,87 **** * Initialization. */ ! static void PyThread__init_thread _P0() { #ifndef NO_EXIT_PROG --- 83,87 ---- * Initialization. */ ! static void PyThread__init_thread(void) { #ifndef NO_EXIT_PROG *************** *** 144,148 **** */ ! static void clean_threads _P0() { int i, j; --- 144,148 ---- */ ! static void clean_threads(void) { int i, j; *************** *** 178,182 **** } ! int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) { #ifdef USE_DL --- 178,182 ---- } ! int PyThread_start_new_thread(void (*func)(void *), void *arg) { #ifdef USE_DL *************** *** 236,245 **** } ! long PyThread_get_thread_ident _P0() { return getpid(); } ! static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); --- 236,245 ---- } ! long PyThread_get_thread_ident(void) { return getpid(); } ! static void do_PyThread_exit_thread(int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); *************** *** 306,315 **** } ! void PyThread_exit_thread _P0() { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread _P0() { do_PyThread_exit_thread(1); --- 306,315 ---- } ! void PyThread_exit_thread(void) { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread(void) { do_PyThread_exit_thread(1); *************** *** 317,321 **** #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog _P2(status, int status, no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); --- 317,321 ---- #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog(int status, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); *************** *** 330,339 **** } ! void PyThread_exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 1); --- 330,339 ---- } ! void PyThread_exit_prog(int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); *************** *** 344,348 **** * Lock support. */ ! PyThread_type_lock PyThread_allocate_lock _P0() { ulock_t lock; --- 344,348 ---- * Lock support. */ ! PyThread_type_lock PyThread_allocate_lock(void) { ulock_t lock; *************** *** 359,363 **** } ! void PyThread_free_lock _P1(lock, PyThread_type_lock lock) { dprintf(("PyThread_free_lock(%p) called\n", lock)); --- 359,363 ---- } ! void PyThread_free_lock(PyThread_type_lock lock) { dprintf(("PyThread_free_lock(%p) called\n", lock)); *************** *** 365,369 **** } ! int PyThread_acquire_lock _P2(lock, PyThread_type_lock lock, waitflag, int waitflag) { int success; --- 365,369 ---- } ! int PyThread_acquire_lock(PyThread_type_lock lock, int waitflag) { int success; *************** *** 381,385 **** } ! void PyThread_release_lock _P1(lock, PyThread_type_lock lock) { dprintf(("PyThread_release_lock(%p) called\n", lock)); --- 381,385 ---- } ! void PyThread_release_lock(PyThread_type_lock lock) { dprintf(("PyThread_release_lock(%p) called\n", lock)); *************** *** 391,395 **** * Semaphore support. */ ! PyThread_type_sema PyThread_allocate_sema _P1(value, int value) { usema_t *sema; --- 391,395 ---- * Semaphore support. */ ! PyThread_type_sema PyThread_allocate_sema(int value) { usema_t *sema; *************** *** 404,408 **** } ! void PyThread_free_sema _P1(sema, PyThread_type_sema sema) { dprintf(("PyThread_free_sema(%p) called\n", sema)); --- 404,408 ---- } ! void PyThread_free_sema(PyThread_type_sema sema) { dprintf(("PyThread_free_sema(%p) called\n", sema)); *************** *** 410,414 **** } ! int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag) { int success; --- 410,414 ---- } ! int PyThread_down_sema(PyThread_type_sema sema, int waitflag) { int success; *************** *** 425,429 **** } ! void PyThread_up_sema _P1(sema, PyThread_type_sema sema) { dprintf(("PyThread_up_sema(%p)\n", sema)); --- 425,429 ---- } ! void PyThread_up_sema(PyThread_type_sema sema) { dprintf(("PyThread_up_sema(%p)\n", sema)); *************** *** 447,451 **** static PyThread_type_lock keymutex = NULL; ! static struct key *find_key _P2(key, int key, value, void *value) { struct key *p; --- 447,451 ---- static PyThread_type_lock keymutex = NULL; ! static struct key *find_key(int key, void *value) { struct key *p; *************** *** 470,474 **** } ! int PyThread_create_key _P0() { if (keymutex == NULL) --- 470,474 ---- } ! int PyThread_create_key(void) { if (keymutex == NULL) *************** *** 477,481 **** } ! void PyThread_delete_key _P1(key, int key) { struct key *p, **q; --- 477,481 ---- } ! void PyThread_delete_key(int key) { struct key *p, **q; *************** *** 494,498 **** } ! int PyThread_set_key_value _P2(key, int key, value, void *value) { struct key *p = find_key(key, value); --- 494,498 ---- } ! int PyThread_set_key_value(int key, void *value) { struct key *p = find_key(key, value); *************** *** 503,507 **** } ! void *PyThread_get_key_value _P1(key, int key) { struct key *p = find_key(key, NULL); --- 503,507 ---- } ! void *PyThread_get_key_value(int key) { struct key *p = find_key(key, NULL); Index: thread_solaris.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_solaris.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** thread_solaris.h 2000/06/30 23:58:06 2.13 --- thread_solaris.h 2000/07/22 18:47:25 2.14 *************** *** 20,24 **** * Initialization. */ ! static void PyThread__init_thread _P0() { } --- 20,24 ---- * Initialization. */ ! static void PyThread__init_thread(void) { } *************** *** 28,38 **** */ struct func_arg { ! void (*func) _P((void *)); void *arg; }; ! static void *new_func _P1(funcarg, void *funcarg) { ! void (*func) _P((void *)); void *arg; --- 28,39 ---- */ struct func_arg { ! void (*func)(void *); void *arg; }; ! static void * ! new_func(void *funcarg) { ! void (*func)(void *); void *arg; *************** *** 45,49 **** ! int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) { struct func_arg *funcarg; --- 46,51 ---- ! int ! PyThread_start_new_thread(void (*func)(void *), void *arg) { struct func_arg *funcarg; *************** *** 66,70 **** } ! long PyThread_get_thread_ident _P0() { if (!initialized) --- 68,73 ---- } ! long ! PyThread_get_thread_ident(void) { if (!initialized) *************** *** 73,77 **** } ! static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); --- 76,81 ---- } ! static void ! do_PyThread_exit_thread(int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); *************** *** 84,93 **** } ! void PyThread_exit_thread _P0() { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread _P0() { do_PyThread_exit_thread(1); --- 88,99 ---- } ! void ! PyThread_exit_thread(void) { do_PyThread_exit_thread(0); } ! void ! PyThread__exit_thread(void) { do_PyThread_exit_thread(1); *************** *** 95,99 **** #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog _P2(status, int status, no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); --- 101,106 ---- #ifndef NO_EXIT_PROG ! static void ! do_PyThread_exit_prog(int status, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); *************** *** 109,118 **** } ! void PyThread_exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 1); --- 116,127 ---- } ! void ! PyThread_exit_prog(int status) { do_PyThread_exit_prog(status, 0); } ! void ! PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); *************** *** 123,127 **** * Lock support. */ ! PyThread_type_lock PyThread_allocate_lock _P0() { mutex_t *lock; --- 132,137 ---- * Lock support. */ ! PyThread_type_lock ! PyThread_allocate_lock(void) { mutex_t *lock; *************** *** 141,145 **** } ! void PyThread_free_lock _P1(lock, PyThread_type_lock lock) { dprintf(("PyThread_free_lock(%p) called\n", lock)); --- 151,156 ---- } ! void ! PyThread_free_lock(PyThread_type_lock lock) { dprintf(("PyThread_free_lock(%p) called\n", lock)); *************** *** 148,152 **** } ! int PyThread_acquire_lock _P2(lock, PyThread_type_lock lock, waitflag, int waitflag) { int success; --- 159,164 ---- } ! int ! PyThread_acquire_lock(PyThread_type_lock lock, int waitflag) { int success; *************** *** 165,169 **** } ! void PyThread_release_lock _P1(lock, PyThread_type_lock lock) { dprintf(("PyThread_release_lock(%p) called\n", lock)); --- 177,182 ---- } ! void ! PyThread_release_lock(PyThread_type_lock lock) { dprintf(("PyThread_release_lock(%p) called\n", lock)); *************** *** 175,179 **** * Semaphore support. */ ! PyThread_type_sema PyThread_allocate_sema _P1(value, int value) { sema_t *sema; --- 188,193 ---- * Semaphore support. */ ! PyThread_type_sema ! PyThread_allocate_sema(int value) { sema_t *sema; *************** *** 192,196 **** } ! void PyThread_free_sema _P1(sema, PyThread_type_sema sema) { dprintf(("PyThread_free_sema(%p) called\n", sema)); --- 206,211 ---- } ! void ! PyThread_free_sema(PyThread_type_sema sema) { dprintf(("PyThread_free_sema(%p) called\n", sema)); *************** *** 200,204 **** } ! int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag) { int success; --- 215,220 ---- } ! int ! PyThread_down_sema(PyThread_type_sema sema, int waitflag) { int success; *************** *** 221,225 **** } ! void PyThread_up_sema _P1(sema, PyThread_type_sema sema) { dprintf(("PyThread_up_sema(%p)\n", sema)); --- 237,242 ---- } ! void ! PyThread_up_sema(PyThread_type_sema sema) { dprintf(("PyThread_up_sema(%p)\n", sema)); Index: thread_wince.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_wince.h,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** thread_wince.h 2000/06/30 23:58:06 2.4 --- thread_wince.h 2000/07/22 18:47:25 2.5 *************** *** 100,104 **** } ! void PyThread__exit_prog _P1(int status) { do_PyThread_exit_prog(status, 1); --- 100,104 ---- } ! void PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); Index: traceback.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/traceback.c,v retrieving revision 2.30 retrieving revision 2.31 diff -C2 -r2.30 -r2.31 *** traceback.c 2000/06/30 23:58:06 2.30 --- traceback.c 2000/07/22 18:47:25 2.31 *************** *** 37,43 **** static PyObject * ! tb_getattr(tb, name) ! tracebackobject *tb; ! char *name; { return PyMember_Get((char *)tb, tb_memberlist, name); --- 37,41 ---- static PyObject * ! tb_getattr(tracebackobject *tb, char *name) { return PyMember_Get((char *)tb, tb_memberlist, name); *************** *** 45,50 **** static void ! tb_dealloc(tb) ! tracebackobject *tb; { Py_TRASHCAN_SAFE_BEGIN(tb) --- 43,47 ---- static void ! tb_dealloc(tracebackobject *tb) { Py_TRASHCAN_SAFE_BEGIN(tb) *************** *** 76,83 **** static tracebackobject * ! newtracebackobject(next, frame, lasti, lineno) ! tracebackobject *next; ! PyFrameObject *frame; ! int lasti, lineno; { tracebackobject *tb; --- 73,78 ---- static tracebackobject * ! newtracebackobject(tracebackobject *next, PyFrameObject *frame, int lasti, ! int lineno) { tracebackobject *tb; *************** *** 100,105 **** int ! PyTraceBack_Here(frame) ! PyFrameObject *frame; { PyThreadState *tstate = frame->f_tstate; --- 95,99 ---- int ! PyTraceBack_Here(PyFrameObject *frame) { PyThreadState *tstate = frame->f_tstate; *************** *** 115,123 **** static int ! tb_displayline(f, filename, lineno, name) ! PyObject *f; ! char *filename; ! int lineno; ! char *name; { int err = 0; --- 109,113 ---- static int ! tb_displayline(PyObject *f, char *filename, int lineno, char *name) { int err = 0; *************** *** 207,214 **** static int ! tb_printinternal(tb, f, limit) ! tracebackobject *tb; ! PyObject *f; ! int limit; { int err = 0; --- 197,201 ---- static int ! tb_printinternal(tracebackobject *tb, PyObject *f, int limit) { int err = 0; *************** *** 239,245 **** int ! PyTraceBack_Print(v, f) ! PyObject *v; ! PyObject *f; { int err; --- 226,230 ---- int ! PyTraceBack_Print(PyObject *v, PyObject *f) { int err; From python-dev@python.org Sat Jul 22 19:51:38 2000 From: python-dev@python.org (Paul Prescod) Date: Sat, 22 Jul 2000 11:51:38 -0700 Subject: [Python-checkins] CVS: python/nondist/sandbox/doctools textdoc.py,NONE,1.1 README,1.1,1.2 htmldoc.py,1.1,1.2 onlinehelp.py,1.1,1.2 Message-ID: <200007221851.LAA15489@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sandbox/doctools In directory slayer.i.sourceforge.net:/tmp/cvs-serv15410 Modified Files: README htmldoc.py onlinehelp.py Added Files: textdoc.py Log Message: Better support for module documentation. Extracts classes, funcs, etc. automatically. --- NEW FILE --- #!/usr/bin/env python """Generate text documentation from Python objects. This module uses Ka-Ping Yee's inspect module to generate text documentation given a python object. It borrows heavily from Ka-Ping Yee's htmldoc. Further details of those modules can be found at http://www.lfw.org/python/. Use: import textdoc,cgi print textdoc.document(cgi) # document an entire module print textdoc.document(cgi.FieldStorage) # document a class print textdoc.document(cgi.initlog) # document a function print textdoc.document(len) # document a builtin contact: richard_chamberlain@ntlworld.com """ # I, Richard Chamberlain, the author of this contribution, hereby grant to anyone # and everyone a nonexclusive, irrevocable, royalty-free, worldwide license to # reproduce, distribute, perform and/or display publicly, prepare derivative # versions, and otherwise use this contribution in any fashion, or any # derivative versions thereof, at no cost to anyone, and to authorize others # to do so. This software is provided "as is", with NO WARRANTY WHATSOEVER, # not even a warranty of merchantability or fitness for any particular purpose. __version__ = "22 July 2000" import inspect,string def _getdoc(object): """Returns doc string for a given object.""" result='' doc = inspect.getdoc(object) if not doc: try: doc = inspect.getcomments(object) except: pass if doc: for line in string.split(doc,'\n'): result=result+'\t'+line+'\n' if result=='': result='\tno doc string' return result and string.rstrip(result) + "\n" or "" def _tab(str,_tab=2): """Increase the indent on all but the first line""" result=[] lines=string.split(str,'\t') result.append(lines[0]) for line in lines[1:]: result.append(('\t')*_tab+line) result=string.join(result) return result def _document_module(object): """Produce text documentation for a given module.""" results=[] name=object.__name__ if hasattr(object,"__version__"): name=name+" (version: %s)\n" % object.__version__ else: name=name+" \n" results.append(name) doc=_getdoc(object) results.append(doc) cadr = lambda list: list[0] # Get the modules modules = map(cadr,inspect.getmembers(object, inspect.ismodule)) if modules: results.append('\nModules:\n\n') results.append(string.join(modules,', ')) # Get the classes classes=inspect.getmembers(object,inspect.isclass) if classes: results.append('\n\nClasses:\n\n') for aclass in classes: results.append(_document_class(aclass[1])) results.append('\n') functions=inspect.getmembers(object,inspect.isroutine) if functions: results.append('Module Functions:\n\n') for function in functions: results.append(_document_function(function[1])) return results def _document_class(object): """Produce text documentation for a given class object.""" name = object.__name__ bases = object.__bases__ results = [] title = "class %s" % name if bases: parents = [] for base in bases: parents.append(base.__name__) title = title + "(%s)" % string.join(parents, ", ") results.append(title+":\n\n") doc=_getdoc(object) results.append(doc) functions=inspect.getmembers(object,inspect.isroutine) if functions: results.append('\n\tMethods:\n\n') for function in functions: results.append("\t"+_tab(document(function[1]))) return results def _document_method(object): """Produce text documentation for a given method.""" return _document_function(object.im_func) def defaultFormat(object): rep=repr( obj ) match=re.match( r"<(.+?) at ......>", rep ) if match: return "<"+match.group(1)+">" else: return rep def _document_function(object): """Produce text documentation for a given function.""" try: args, varargs, varkw, defaults = inspect.getargspec(object) argspec = inspect.formatargspec( args, varargs, varkw, defaults) except TypeError: argspec = "(no arg info)" if object.__name__ == "": decl = ["lambda ", argspec[1:-1]] else: decl = [object.__name__, argspec, "\n"] doc = _getdoc(object) return [decl, doc+"\n"] def _document_builtin(object): """Produce text documentation for a given builtin.""" results=[] results.append(object.__name__+'\n') doc=_getdoc(object) results.append('\n'+doc) return results def document(object): """Generate documentation for a given object.""" if inspect.ismodule(object): results = _document_module(object) elif inspect.isclass(object): results = _document_class(object) elif inspect.ismethod(object): results = _document_method(object) elif inspect.isfunction(object): results = _document_function(object) elif inspect.isbuiltin(object): results = _document_builtin(object) else: raise TypeError, "don't know how to document this kind of object" return _serialise(results) def _serialise(list): """Combine a list containing strings and nested lists into a single string. This lets us manipulate lists until the last moment, since rearranging lists is faster than rearranging strings.""" results = [] if list==None: return "" for item in list: if type(item) is type(""): results.append(item) else: results.append(_serialise(item)) return string.join(results, "") if __name__=='__main__': # Test Code import Tkinter,cgi,calendar print document(Tkinter) # Try a module with classes print document(calendar) # Module without classes print document(cgi.FieldStorage) # Just a class print document(inspect.getdoc) # a method print document(len) # a builtin Index: README =================================================================== RCS file: /cvsroot/python/python/nondist/sandbox/doctools/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** README 2000/07/21 21:31:27 1.1 --- README 2000/07/22 18:51:36 1.2 *************** *** 4,7 **** onlinehelp.py -- onlinehelp for Python. Read the docstring. - htmldoc.py -- Builds HTML documentation from docstrings inspect.py -- introspection API used by both of the above --- 4,8 ---- onlinehelp.py -- onlinehelp for Python. Read the docstring. inspect.py -- introspection API used by both of the above + htmldoc.py -- Builds HTML documentation from docstrings + textdoc.py -- Builds raw text documentation from docstrings Index: htmldoc.py =================================================================== RCS file: /cvsroot/python/python/nondist/sandbox/doctools/htmldoc.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** htmldoc.py 2000/07/21 21:31:27 1.1 --- htmldoc.py 2000/07/22 18:51:36 1.2 *************** *** 10,15 **** return string.replace(string.replace(str, "&", "&"), "<", "<") def htmlrepr(object): ! return htmlescape(repr(object)) def preformat(str): --- 10,27 ---- return string.replace(string.replace(str, "&", "&"), "<", "<") + + # added by prescod + # physical addresses produced by repr were defeating diff and they are + # ugly anyhow + def smartRepr( obj ): + rep=repr( obj ) + match=re.match( r"<(.+?) at ......>", rep ) + if match: + return "<"+match.group(1)+">" + else: + return rep + def htmlrepr(object): ! return htmlescape(smartRepr(object)) def preformat(str): Index: onlinehelp.py =================================================================== RCS file: /cvsroot/python/python/nondist/sandbox/doctools/onlinehelp.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** onlinehelp.py 2000/07/21 21:31:27 1.1 --- onlinehelp.py 2000/07/22 18:51:36 1.2 *************** *** 41,44 **** --- 41,49 ---- python onlinehelp.py if + + Security warning: this module will attempt to import modules with the same + names as requested topics. Don't use the modules if you + are not confident that everything in your pythonpath is + from a trusted source. """ *************** *** 64,67 **** --- 69,73 ---- import os, sys import re + import textdoc, types prompt="--more-- (enter for more, q to quit) " *************** *** 213,216 **** --- 219,233 ---- envir_var="PYTHONDOCS" + def my_import(name): + try: + mod = __import__(name) + except ImportError: + return None + + components = name.split('.') + for comp in components[1:]: + mod = getattr(mod, comp) + return mod + class Help: def __init__( self, out, line_length, docdir=None ): *************** *** 257,301 **** def call( self, ob, out ): self.pager=out or self.Pager( self.out, self.line_length ) ! if type( ob ) in (type(""),type(u"")): ! if ob.startswith( "<" ): ! ob=ob[1:] ! if ob.endswith( ">" ): ! ob=ob[:-1] ! ! self.write( 'Topic: help( "%s" )\n' % ob ) ! ! if ob.startswith("doc:"): ! path=ob[4:] ! if not self.docdir: ! self.initDocDir() ! fullpath=os.path.join( self.docdir, path ) ! data=open( fullpath ).read() ! index=ob.rfind( "/" ) ! self.writeHTML( ob[:index], data ) else: ! try: ! info=topics[ob] ! docrlmatch=re.search( "(]+>)", info.split("\n")[0] ) ! if docrlmatch: # a first-line redirect ! self( docrlmatch.group(1) ) ! else: ! self.writeHTML( "", info ) ! except KeyError: ! glo=__builtins__.__dict__.get( ob, 0 ) ! if glo: ! self( glo ) ! else: ! sys.stderr.write( "No such topic "+`ob` ) ! return None else: ! self.write( 'Topic: help( %s )\n' % ob ) ! self.writeText( self.getdoc( ob ) ) ! def getdoc( self, ob ): ! if hasattr( ob, "__doc__" ): ! return ob.__doc__ else: ! type( ob ).__doc__ --- 274,374 ---- def call( self, ob, out ): self.pager=out or self.Pager( self.out, self.line_length ) + + if type( ob ) in (types.StringType,types.UnicodeType): #string ! # doc form of URL ! if ob.startswith("doc:") or ob.startswith( "" ! if docrl.startswith( "<" ): ! docrl=docrl[1:] ! if docrl.endswith( ">" ): ! docrl=ob[:-1] ! ! path=docrl[4:] ! if not self.docdir: ! self.initDocDir() ! ! fullpath=os.path.join( self.docdir, path ) ! data=open( fullpath ).read() ! index=docrl.rfind( "/" ) ! ! self.write( 'Topic: help( "%s" )\n' % docrl ) ! self.writeHTML( ob[:index], data ) ! ! def matchDocrlPattern( self, info ): ! firstline=info.split("\n")[0] ! docrlmatch=re.search( "<(doc:[^>]+)>", firstline ) ! if docrlmatch: ! return docrlmatch.group( 1 ) ! else: ! return None ! def handleTopic( self, topic ): ! # otherwise a topic ! info=topics.get(topic, 0 ) ! if info: ! match=self.matchDocrlPattern( info ) ! if match: # a first-line redirect ! self.handledocrl( match ) else: ! self.write( 'Topic: help( "%s" )\n' % topic ) ! self.writeHTML( "", info ) ! return None ! ! # try again -- this time in builtins ! glo=__builtins__.__dict__.get( topic, 0 ) ! if glo: ! self.handleObject( glo ) ! return None ! ! # try again -- this time as a module ! mod=my_import( topic ) ! if mod: ! print mod ! self.handleObject( mod ) ! return None ! ! # try again -- this time as an attribute OF a module ! ### FIXME/XXX/TODO: this code is not finished yet! ! parts=string.split( topic, "." ) ! for i in range( len( parts ), -1, -1 ): ! if i: ! front=string.join( parts[:i], "." ) ! mod=my_import( front ) ! if mod: ! self.handleObject( mod ) ! return None ! ! sys.stderr.write( "No such topic "+`topic` ) ! return None ! ! def handleObject( self, ob ): ! docstr=self.getdocstring( ob ) ! ! if docstr: ! match=self.matchDocrlPattern( docstr ) ! else: ! match=None ! ! if match: # a first-line redirect ! self.handledocrl( match ) ! else: ! text=textdoc.document( ob ) ! self.write( 'Topic: help( %s )\n' % ob ) ! self.writeText( text ) ! ! def getdocstring( self, ob ): ! # todo: use inspect.py instead ! if hasattr( ob, "__doc__" ): ! return ob.__doc__ ! else: ! return type( ob ).__doc__ *************** *** 374,377 **** test() else: ! help( eval( sys.argv[1] ) ) --- 447,450 ---- test() else: ! help( sys.argv[1] ) From python-dev@python.org Sat Jul 22 20:20:57 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 12:20:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser acceler.c,2.15,2.16 bitset.c,2.9,2.10 firstsets.c,2.10,2.11 grammar.c,2.16,2.17 grammar1.c,2.10,2.11 intrcheck.c,2.33,2.34 listnode.c,2.12,2.13 metagrammar.c,2.9,2.10 myreadline.c,2.22,2.23 node.c,2.11,2.12 parser.c,2.15,2.16 parsetok.c,2.22,2.23 pgen.c,2.16,2.17 pgenmain.c,2.20,2.21 printgrammar.c,2.11,2.12 tokenizer.c,2.46,2.47 Message-ID: <200007221920.MAA24453@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv24210 Modified Files: acceler.c bitset.c firstsets.c grammar.c grammar1.c intrcheck.c listnode.c metagrammar.c myreadline.c node.c parser.c parsetok.c pgen.c pgenmain.c printgrammar.c tokenizer.c Log Message: Mass ANSIfication. Work around intrcheck.c's desire to pass 'PyErr_CheckSignals' to 'Py_AddPendingCall' by providing a (static) wrapper function that has the right number of arguments. Index: acceler.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/acceler.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** acceler.c 2000/07/09 03:09:56 2.15 --- acceler.c 2000/07/22 19:20:54 2.16 *************** *** 31,36 **** void ! PyGrammar_AddAccelerators(g) ! grammar *g; { dfa *d; --- 31,35 ---- void ! PyGrammar_AddAccelerators(grammar *g) { dfa *d; *************** *** 49,54 **** void ! PyGrammar_RemoveAccelerators(g) ! grammar *g; { dfa *d; --- 48,52 ---- void ! PyGrammar_RemoveAccelerators(grammar *g) { dfa *d; *************** *** 69,75 **** static void ! fixdfa(g, d) ! grammar *g; ! dfa *d; { state *s; --- 67,71 ---- static void ! fixdfa(grammar *g, dfa *d) { state *s; *************** *** 81,87 **** static void ! fixstate(g, s) ! grammar *g; ! state *s; { arc *a; --- 77,81 ---- static void ! fixstate(grammar *g, state *s) { arc *a; Index: bitset.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/bitset.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** bitset.c 2000/06/30 23:58:05 2.9 --- bitset.c 2000/07/22 19:20:54 2.10 *************** *** 15,20 **** bitset ! newbitset(nbits) ! int nbits; { int nbytes = NBYTES(nbits); --- 15,19 ---- bitset ! newbitset(int nbits) { int nbytes = NBYTES(nbits); *************** *** 31,36 **** void ! delbitset(ss) ! bitset ss; { PyMem_DEL(ss); --- 30,34 ---- void ! delbitset(bitset ss) { PyMem_DEL(ss); *************** *** 38,44 **** int ! addbit(ss, ibit) ! bitset ss; ! int ibit; { int ibyte = BIT2BYTE(ibit); --- 36,40 ---- int ! addbit(bitset ss, int ibit) { int ibyte = BIT2BYTE(ibit); *************** *** 53,59 **** #if 0 /* Now a macro */ int ! testbit(ss, ibit) ! bitset ss; ! int ibit; { return (ss[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0; --- 49,53 ---- #if 0 /* Now a macro */ int ! testbit(bitset ss, int ibit) { return (ss[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0; *************** *** 62,68 **** int ! samebitset(ss1, ss2, nbits) ! bitset ss1, ss2; ! int nbits; { int i; --- 56,60 ---- int ! samebitset(bitset ss1, bitset ss2, int nbits) { int i; *************** *** 75,81 **** void ! mergebitset(ss1, ss2, nbits) ! bitset ss1, ss2; ! int nbits; { int i; --- 67,71 ---- void ! mergebitset(bitset ss1, bitset ss2, int nbits) { int i; Index: firstsets.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/firstsets.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** firstsets.c 2000/07/09 03:09:56 2.10 --- firstsets.c 2000/07/22 19:20:54 2.11 *************** *** 21,26 **** void ! addfirstsets(g) ! grammar *g; { int i; --- 21,25 ---- void ! addfirstsets(grammar *g) { int i; *************** *** 36,42 **** static void ! calcfirstset(g, d) ! grammar *g; ! dfa *d; { int i, j; --- 35,39 ---- static void ! calcfirstset(grammar *g, dfa *d) { int i, j; Index: grammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/grammar.c,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** grammar.c 2000/07/09 03:09:56 2.16 --- grammar.c 2000/07/22 19:20:54 2.17 *************** *** 22,27 **** grammar * ! newgrammar(start) ! int start; { grammar *g; --- 22,26 ---- grammar * ! newgrammar(int start) { grammar *g; *************** *** 40,47 **** dfa * ! adddfa(g, type, name) ! grammar *g; ! int type; ! char *name; { dfa *d; --- 39,43 ---- dfa * ! adddfa(grammar *g, int type, char *name) { dfa *d; *************** *** 61,66 **** int ! addstate(d) ! dfa *d; { state *s; --- 57,61 ---- int ! addstate(dfa *d) { state *s; *************** *** 80,86 **** void ! addarc(d, from, to, lbl) ! dfa *d; ! int lbl; { state *s; --- 75,79 ---- void ! addarc(dfa *d, int from, int to, int lbl) { state *s; *************** *** 100,107 **** int ! addlabel(ll, type, str) ! labellist *ll; ! int type; ! char *str; { int i; --- 93,97 ---- int ! addlabel(labellist *ll, int type, char *str) { int i; *************** *** 125,132 **** int ! findlabel(ll, type, str) ! labellist *ll; ! int type; ! char *str; { int i; --- 115,119 ---- int ! findlabel(labellist *ll, int type, char *str) { int i; *************** *** 146,151 **** void ! translatelabels(g) ! grammar *g; { int i; --- 133,137 ---- void ! translatelabels(grammar *g) { int i; *************** *** 160,166 **** static void ! translabel(g, lb) ! grammar *g; ! label *lb; { int i; --- 146,150 ---- static void ! translabel(grammar *g, label *lb) { int i; Index: grammar1.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/grammar1.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** grammar1.c 2000/06/30 23:58:05 2.10 --- grammar1.c 2000/07/22 19:20:54 2.11 *************** *** 19,25 **** dfa * ! PyGrammar_FindDFA(g, type) ! grammar *g; ! register int type; { register dfa *d; --- 19,23 ---- dfa * ! PyGrammar_FindDFA(grammar *g, register int type) { register dfa *d; *************** *** 43,48 **** char * ! PyGrammar_LabelRepr(lb) ! label *lb; { static char buf[100]; --- 41,45 ---- char * ! PyGrammar_LabelRepr(label *lb) { static char buf[100]; Index: intrcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/intrcheck.c,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -r2.33 -r2.34 *** intrcheck.c 2000/07/09 03:09:56 2.33 --- intrcheck.c 2000/07/22 19:20:54 2.34 *************** *** 31,45 **** void ! PyOS_InitInterrupts() { } void ! PyOS_FiniInterrupts() { } int ! PyOS_InterruptOccurred() { _wyield(); --- 31,45 ---- void ! PyOS_InitInterrupts(void) { } void ! PyOS_FiniInterrupts(void) { } int ! PyOS_InterruptOccurred(void) { _wyield(); *************** *** 67,71 **** void ! PyOS_InitInterrupts() { _go32_want_ctrl_break(1 /* TRUE */); --- 67,71 ---- void ! PyOS_InitInterrupts(void) { _go32_want_ctrl_break(1 /* TRUE */); *************** *** 73,82 **** void ! PyOS_FiniInterrupts() { } int ! PyOS_InterruptOccurred() { return _go32_was_ctrl_break_hit(); --- 73,82 ---- void ! PyOS_FiniInterrupts(void) { } int ! PyOS_InterruptOccurred(void) { return _go32_was_ctrl_break_hit(); *************** *** 88,102 **** void ! PyOS_InitInterrupts() { } void ! PyOS_FiniInterrupts() { } int ! PyOS_InterruptOccurred() { int interrupted = 0; --- 88,102 ---- void ! PyOS_InitInterrupts(void) { } void ! PyOS_FiniInterrupts(void) { } int ! PyOS_InterruptOccurred(void) { int interrupted = 0; *************** *** 137,155 **** void ! PyErr_SetInterrupt() { interrupted = 1; } ! extern int PyErr_CheckSignals(); ! /* ARGSUSED */ static RETSIGTYPE ! #if defined(_M_IX86) && !defined(__QNX__) ! intcatcher(int sig) /* So the C compiler shuts up */ ! #else /* _M_IX86 */ ! intcatcher(sig) ! int sig; /* Not used by required by interface */ ! #endif /* _M_IX86 */ { extern void Py_Exit(int); --- 137,155 ---- void ! PyErr_SetInterrupt(void) { interrupted = 1; } ! extern int PyErr_CheckSignals(void); ! static int ! checksignals_witharg(void * arg) ! { ! return PyErr_CheckSignals(); ! } ! static RETSIGTYPE ! intcatcher(int sig) { extern void Py_Exit(int); *************** *** 168,178 **** } signal(SIGINT, intcatcher); ! Py_AddPendingCall(PyErr_CheckSignals, NULL); } ! static RETSIGTYPE (*old_siginthandler)() = SIG_DFL; void ! PyOS_InitInterrupts() { if ((old_siginthandler = signal(SIGINT, SIG_IGN)) != SIG_IGN) --- 168,178 ---- } signal(SIGINT, intcatcher); ! Py_AddPendingCall(checksignals_witharg, NULL); } ! static RETSIGTYPE (*old_siginthandler)(int) = SIG_DFL; void ! PyOS_InitInterrupts(void) { if ((old_siginthandler = signal(SIGINT, SIG_IGN)) != SIG_IGN) *************** *** 190,194 **** void ! PyOS_FiniInterrupts() { signal(SIGINT, old_siginthandler); --- 190,194 ---- void ! PyOS_FiniInterrupts(void) { signal(SIGINT, old_siginthandler); *************** *** 196,200 **** int ! PyOS_InterruptOccurred() { if (!interrupted) --- 196,200 ---- int ! PyOS_InterruptOccurred(void) { if (!interrupted) *************** *** 207,211 **** void ! PyOS_AfterFork() { } --- 207,211 ---- void ! PyOS_AfterFork(void) { } Index: listnode.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/listnode.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** listnode.c 2000/07/09 03:09:56 2.12 --- listnode.c 2000/07/22 19:20:54 2.13 *************** *** 20,25 **** void ! PyNode_ListTree(n) ! node *n; { listnode(stdout, n); --- 20,24 ---- void ! PyNode_ListTree(node *n) { listnode(stdout, n); *************** *** 29,35 **** static void ! listnode(fp, n) ! FILE *fp; ! node *n; { level = 0; --- 28,32 ---- static void ! listnode(FILE *fp, node *n) { level = 0; *************** *** 39,45 **** static void ! list1node(fp, n) ! FILE *fp; ! node *n; { if (n == 0) --- 36,40 ---- static void ! list1node(FILE *fp, node *n) { if (n == 0) Index: metagrammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/metagrammar.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** metagrammar.c 2000/06/30 23:58:05 2.9 --- metagrammar.c 2000/07/22 19:20:54 2.10 *************** *** 157,161 **** grammar * ! meta_grammar() { return &_PyParser_Grammar; --- 157,161 ---- grammar * ! meta_grammar(void) { return &_PyParser_Grammar; Index: myreadline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/myreadline.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** myreadline.c 2000/07/09 03:09:56 2.22 --- myreadline.c 2000/07/22 19:20:54 2.23 *************** *** 24,28 **** #endif ! int (*PyOS_InputHook)() = NULL; /* This function restarts a fgets() after an EINTR error occurred --- 24,28 ---- #endif ! int (*PyOS_InputHook)(void) = NULL; /* This function restarts a fgets() after an EINTR error occurred *************** *** 30,37 **** static int ! my_fgets(buf, len, fp) ! char *buf; ! int len; ! FILE *fp; { char *p; --- 30,34 ---- static int ! my_fgets(char *buf, int len, FILE *fp) { char *p; *************** *** 66,71 **** char * ! PyOS_StdioReadline(prompt) ! char *prompt; { size_t n; --- 63,67 ---- char * ! PyOS_StdioReadline(char *prompt) { size_t n; *************** *** 125,130 **** char * ! PyOS_Readline(prompt) ! char *prompt; { char *rv; --- 121,125 ---- char * ! PyOS_Readline(char *prompt) { char *rv; Index: node.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/node.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** node.c 2000/07/09 03:09:56 2.11 --- node.c 2000/07/22 19:20:54 2.12 *************** *** 18,23 **** node * ! PyNode_New(type) ! int type; { node *n = PyMem_NEW(node, 1); --- 18,22 ---- node * ! PyNode_New(int type) { node *n = PyMem_NEW(node, 1); *************** *** 36,44 **** int ! PyNode_AddChild(n1, type, str, lineno) ! register node *n1; ! int type; ! char *str; ! int lineno; { register int nch = n1->n_nchildren; --- 35,39 ---- int ! PyNode_AddChild(register node *n1, int type, char *str, int lineno) { register int nch = n1->n_nchildren; *************** *** 69,74 **** void ! PyNode_Free(n) ! node *n; { if (n != NULL) { --- 64,68 ---- void ! PyNode_Free(node *n) { if (n != NULL) { *************** *** 79,84 **** static void ! freechildren(n) ! node *n; { int i; --- 73,77 ---- static void ! freechildren(node *n) { int i; Index: parser.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parser.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** parser.c 2000/07/11 17:52:59 2.15 --- parser.c 2000/07/22 19:20:54 2.16 *************** *** 37,42 **** static void ! s_reset(s) ! stack *s; { s->s_top = &s->s_base[MAXSTACK]; --- 37,41 ---- static void ! s_reset(stack *s) { s->s_top = &s->s_base[MAXSTACK]; *************** *** 45,55 **** #define s_empty(s) ((s)->s_top == &(s)->s_base[MAXSTACK]) - static int s_push(stack *, dfa *, node *); - static int ! s_push(s, d, parent) ! register stack *s; ! dfa *d; ! node *parent; { register stackentry *top; --- 44,49 ---- #define s_empty(s) ((s)->s_top == &(s)->s_base[MAXSTACK]) static int ! s_push(register stack *s, dfa *d, node *parent) { register stackentry *top; *************** *** 67,75 **** #ifdef Py_DEBUG - static void s_pop(stack *); - static void ! s_pop(s) ! register stack *s; { if (s_empty(s)) --- 61,66 ---- #ifdef Py_DEBUG static void ! s_pop(register stack *s) { if (s_empty(s)) *************** *** 88,94 **** parser_state * ! PyParser_New(g, start) ! grammar *g; ! int start; { parser_state *ps; --- 79,83 ---- parser_state * ! PyParser_New(grammar *g, int start) { parser_state *ps; *************** *** 111,116 **** void ! PyParser_Delete(ps) ! parser_state *ps; { /* NB If you want to save the parse tree, --- 100,104 ---- void ! PyParser_Delete(parser_state *ps) { /* NB If you want to save the parse tree, *************** *** 123,135 **** /* PARSER STACK OPERATIONS */ - static int shift(stack *, int, char *, int, int); - static int ! shift(s, type, str, newstate, lineno) ! register stack *s; ! int type; ! char *str; ! int newstate; ! int lineno; { int err; --- 111,116 ---- /* PARSER STACK OPERATIONS */ static int ! shift(register stack *s, int type, char *str, int newstate, int lineno) { int err; *************** *** 142,154 **** } - static int push(stack *, int, dfa *, int, int); - static int ! push(s, type, d, newstate, lineno) ! register stack *s; ! int type; ! dfa *d; ! int newstate; ! int lineno; { int err; --- 123,128 ---- } static int ! push(register stack *s, int type, dfa *d, int newstate, int lineno) { int err; *************** *** 166,176 **** /* PARSER PROPER */ - static int classify(grammar *, int, char *); - static int ! classify(g, type, str) ! grammar *g; ! register int type; ! char *str; { register int n = g->g_ll.ll_nlabels; --- 140,145 ---- /* PARSER PROPER */ static int ! classify(grammar *g, int type, char *str) { register int n = g->g_ll.ll_nlabels; *************** *** 206,215 **** int ! PyParser_AddToken(ps, type, str, lineno, expected_ret) ! register parser_state *ps; ! register int type; ! char *str; ! int lineno; ! int *expected_ret; { register int ilabel; --- 175,180 ---- int ! PyParser_AddToken(register parser_state *ps, register int type, char *str, ! int lineno, int *expected_ret) { register int ilabel; *************** *** 306,312 **** void ! dumptree(g, n) ! grammar *g; ! node *n; { int i; --- 271,275 ---- void ! dumptree(grammar *g, node *n) { int i; *************** *** 332,338 **** void ! showtree(g, n) ! grammar *g; ! node *n; { int i; --- 295,299 ---- void ! showtree(grammar *g, node *n) { int i; *************** *** 355,360 **** void ! printtree(ps) ! parser_state *ps; { if (Py_DebugFlag) { --- 316,320 ---- void ! printtree(parser_state *ps) { if (Py_DebugFlag) { Index: parsetok.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parsetok.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** parsetok.c 2000/07/11 17:52:59 2.22 --- parsetok.c 2000/07/22 19:20:54 2.23 *************** *** 28,36 **** node * ! PyParser_ParseString(s, g, start, err_ret) ! char *s; ! grammar *g; ! int start; ! perrdetail *err_ret; { struct tok_state *tok; --- 28,32 ---- node * ! PyParser_ParseString(char *s, grammar *g, int start, perrdetail *err_ret) { struct tok_state *tok; *************** *** 61,71 **** node * ! PyParser_ParseFile(fp, filename, g, start, ps1, ps2, err_ret) ! FILE *fp; ! char *filename; ! grammar *g; ! int start; ! char *ps1, *ps2; ! perrdetail *err_ret; { struct tok_state *tok; --- 57,62 ---- node * ! PyParser_ParseFile(FILE *fp, char *filename, grammar *g, int start, ! char *ps1, char *ps2, perrdetail *err_ret) { struct tok_state *tok; *************** *** 96,104 **** static node * ! parsetok(tok, g, start, err_ret) ! struct tok_state *tok; ! grammar *g; ! int start; ! perrdetail *err_ret; { parser_state *ps; --- 87,91 ---- static node * ! parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret) { parser_state *ps; Index: pgen.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgen.c,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** pgen.c 2000/07/16 12:04:32 2.16 --- pgen.c 2000/07/22 19:20:54 2.17 *************** *** 56,61 **** static int ! addnfastate(nf) ! nfa *nf; { nfastate *st; --- 56,60 ---- static int ! addnfastate(nfa *nf) { nfastate *st; *************** *** 71,77 **** static void ! addnfaarc(nf, from, to, lbl) ! nfa *nf; ! int from, to, lbl; { nfastate *st; --- 70,74 ---- static void ! addnfaarc(nfa *nf, int from, int to, int lbl) { nfastate *st; *************** *** 88,93 **** static nfa * ! newnfa(name) ! char *name; { nfa *nf; --- 85,89 ---- static nfa * ! newnfa(char *name) { nfa *nf; *************** *** 115,119 **** static nfagrammar * ! newnfagrammar() { nfagrammar *gr; --- 111,115 ---- static nfagrammar * ! newnfagrammar(void) { nfagrammar *gr; *************** *** 131,137 **** static nfa * ! addnfa(gr, name) ! nfagrammar *gr; ! char *name; { nfa *nf; --- 127,131 ---- static nfa * ! addnfa(nfagrammar *gr, char *name) { nfa *nf; *************** *** 161,166 **** static nfagrammar * ! metacompile(n) ! node *n; { nfagrammar *gr; --- 155,159 ---- static nfagrammar * ! metacompile(node *n) { nfagrammar *gr; *************** *** 180,186 **** static void ! compile_rule(gr, n) ! nfagrammar *gr; ! node *n; { nfa *nf; --- 173,177 ---- static void ! compile_rule(nfagrammar *gr, node *n) { nfa *nf; *************** *** 201,209 **** static void ! compile_rhs(ll, nf, n, pa, pb) ! labellist *ll; ! nfa *nf; ! node *n; ! int *pa, *pb; { int i; --- 192,196 ---- static void ! compile_rhs(labellist *ll, nfa *nf, node *n, int *pa, int *pb) { int i; *************** *** 238,246 **** static void ! compile_alt(ll, nf, n, pa, pb) ! labellist *ll; ! nfa *nf; ! node *n; ! int *pa, *pb; { int i; --- 225,229 ---- static void ! compile_alt(labellist *ll, nfa *nf, node *n, int *pa, int *pb) { int i; *************** *** 269,277 **** static void ! compile_item(ll, nf, n, pa, pb) ! labellist *ll; ! nfa *nf; ! node *n; ! int *pa, *pb; { int i; --- 252,256 ---- static void ! compile_item(labellist *ll, nfa *nf, node *n, int *pa, int *pb) { int i; *************** *** 310,318 **** static void ! compile_atom(ll, nf, n, pa, pb) ! labellist *ll; ! nfa *nf; ! node *n; ! int *pa, *pb; { int i; --- 289,293 ---- static void ! compile_atom(labellist *ll, nfa *nf, node *n, int *pa, int *pb) { int i; *************** *** 340,347 **** static void ! dumpstate(ll, nf, istate) ! labellist *ll; ! nfa *nf; ! int istate; { nfastate *st; --- 315,319 ---- static void ! dumpstate(labellist *ll, nfa *nf, int istate) { nfastate *st; *************** *** 366,372 **** static void ! dumpnfa(ll, nf) ! labellist *ll; ! nfa *nf; { int i; --- 338,342 ---- static void ! dumpnfa(labellist *ll, nfa *nf) { int i; *************** *** 382,389 **** static void ! addclosure(ss, nf, istate) ! bitset ss; ! nfa *nf; ! int istate; { if (addbit(ss, istate)) { --- 352,356 ---- static void ! addclosure(bitset ss, nfa *nf, int istate) { if (addbit(ss, istate)) { *************** *** 427,434 **** static void ! makedfa(gr, nf, d) ! nfagrammar *gr; ! nfa *nf; ! dfa *d; { int nbits = nf->nf_nstates; --- 394,398 ---- static void ! makedfa(nfagrammar *gr, nfa *nf, dfa *d) { int nbits = nf->nf_nstates; *************** *** 534,543 **** static void ! printssdfa(xx_nstates, xx_state, nbits, ll, msg) ! int xx_nstates; ! ss_state *xx_state; ! int nbits; ! labellist *ll; ! char *msg; { int i, ibit, iarc; --- 498,503 ---- static void ! printssdfa(int xx_nstates, ss_state *xx_state, int nbits, ! labellist *ll, char *msg) { int i, ibit, iarc; *************** *** 580,585 **** static int ! samestate(s1, s2) ! ss_state *s1, *s2; { int i; --- 540,544 ---- static int ! samestate(ss_state *s1, ss_state *s2) { int i; *************** *** 596,603 **** static void ! renamestates(xx_nstates, xx_state, from, to) ! int xx_nstates; ! ss_state *xx_state; ! int from, to; { int i, j; --- 555,559 ---- static void ! renamestates(int xx_nstates, ss_state *xx_state, int from, int to) { int i, j; *************** *** 616,622 **** static void ! simplify(xx_nstates, xx_state) ! int xx_nstates; ! ss_state *xx_state; { int changes; --- 572,576 ---- static void ! simplify(int xx_nstates, ss_state *xx_state) { int changes; *************** *** 649,656 **** static void ! convert(d, xx_nstates, xx_state) ! dfa *d; ! int xx_nstates; ! ss_state *xx_state; { int i, j; --- 603,607 ---- static void ! convert(dfa *d, int xx_nstates, ss_state *xx_state) { int i, j; *************** *** 686,691 **** static grammar * ! maketables(gr) ! nfagrammar *gr; { int i; --- 637,641 ---- static grammar * ! maketables(nfagrammar *gr) { int i; *************** *** 715,720 **** grammar * ! pgen(n) ! node *n; { nfagrammar *gr; --- 665,669 ---- grammar * ! pgen(node *n) { nfagrammar *gr; Index: pgenmain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgenmain.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** pgenmain.c 2000/07/09 03:09:56 2.20 --- pgenmain.c 2000/07/22 19:20:54 2.21 *************** *** 40,45 **** void ! Py_Exit(sts) ! int sts; { exit(sts); --- 40,44 ---- void ! Py_Exit(int sts) { exit(sts); *************** *** 47,53 **** int ! main(argc, argv) ! int argc; ! char **argv; { grammar *g; --- 46,50 ---- int ! main(int argc, char **argv) { grammar *g; *************** *** 86,91 **** grammar * ! getgrammar(filename) ! char *filename; { FILE *fp; --- 83,87 ---- grammar * ! getgrammar(char *filename) { FILE *fp; *************** *** 133,137 **** #ifdef THINK_C char * ! askfile() { char buf[256]; --- 129,133 ---- #ifdef THINK_C char * ! askfile(void) { char buf[256]; *************** *** 152,157 **** void ! Py_FatalError(msg) ! char *msg; { fprintf(stderr, "pgen: FATAL ERROR: %s\n", msg); --- 148,152 ---- void ! Py_FatalError(char *msg) { fprintf(stderr, "pgen: FATAL ERROR: %s\n", msg); *************** *** 162,167 **** /* ARGSUSED */ int ! guesstabsize(path) ! char *path; { return 4; --- 157,161 ---- /* ARGSUSED */ int ! guesstabsize(char *path) { return 4; *************** *** 172,177 **** char * ! PyOS_Readline(prompt) ! char *prompt; { size_t n = 1000; --- 166,170 ---- char * ! PyOS_Readline(char *prompt) { size_t n = 1000; *************** *** 192,218 **** } - #ifdef HAVE_STDARG_PROTOTYPES #include - #else - #include - #endif void - #ifdef HAVE_STDARG_PROTOTYPES PySys_WriteStderr(const char *format, ...) - #else - PySys_WriteStderr(va_alist) - va_dcl - #endif { va_list va; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, format); - #else - char *format; - va_start(va); - format = va_arg(va, char *); - #endif vfprintf(stderr, format, va); va_end(va); --- 185,196 ---- Index: printgrammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/printgrammar.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** printgrammar.c 2000/07/09 03:09:56 2.11 --- printgrammar.c 2000/07/22 19:20:54 2.12 *************** *** 21,27 **** void ! printgrammar(g, fp) ! grammar *g; ! FILE *fp; { fprintf(fp, "#include \"pgenheaders.h\"\n"); --- 21,25 ---- void ! printgrammar(grammar *g, FILE *fp) { fprintf(fp, "#include \"pgenheaders.h\"\n"); *************** *** 38,44 **** void ! printnonterminals(g, fp) ! grammar *g; ! FILE *fp; { dfa *d; --- 36,40 ---- void ! printnonterminals(grammar *g, FILE *fp) { dfa *d; *************** *** 51,58 **** static void ! printarcs(i, d, fp) ! int i; ! dfa *d; ! FILE *fp; { arc *a; --- 47,51 ---- static void ! printarcs(int i, dfa *d, FILE *fp) { arc *a; *************** *** 72,78 **** static void ! printstates(g, fp) ! grammar *g; ! FILE *fp; { state *s; --- 65,69 ---- static void ! printstates(grammar *g, FILE *fp) { state *s; *************** *** 94,100 **** static void ! printdfas(g, fp) ! grammar *g; ! FILE *fp; { dfa *d; --- 85,89 ---- static void ! printdfas(grammar *g, FILE *fp) { dfa *d; *************** *** 116,122 **** static void ! printlabels(g, fp) ! grammar *g; ! FILE *fp; { label *l; --- 105,109 ---- static void ! printlabels(grammar *g, FILE *fp) { label *l; Index: tokenizer.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/tokenizer.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** tokenizer.c 2000/07/11 17:52:59 2.46 --- tokenizer.c 2000/07/22 19:20:54 2.47 *************** *** 89,93 **** static struct tok_state * ! tok_new() { struct tok_state *tok = PyMem_NEW(struct tok_state, 1); --- 89,93 ---- static struct tok_state * ! tok_new(void) { struct tok_state *tok = PyMem_NEW(struct tok_state, 1); *************** *** 117,122 **** struct tok_state * ! PyTokenizer_FromString(str) ! char *str; { struct tok_state *tok = tok_new(); --- 117,121 ---- struct tok_state * ! PyTokenizer_FromString(char *str) { struct tok_state *tok = tok_new(); *************** *** 131,137 **** struct tok_state * ! PyTokenizer_FromFile(fp, ps1, ps2) ! FILE *fp; ! char *ps1, *ps2; { struct tok_state *tok = tok_new(); --- 130,134 ---- struct tok_state * ! PyTokenizer_FromFile(FILE *fp, char *ps1, char *ps2) { struct tok_state *tok = tok_new(); *************** *** 154,159 **** void ! PyTokenizer_Free(tok) ! struct tok_state *tok; { if (tok->fp != NULL && tok->buf != NULL) --- 151,155 ---- void ! PyTokenizer_Free(struct tok_state *tok) { if (tok->fp != NULL && tok->buf != NULL) *************** *** 166,171 **** static int ! tok_nextc(tok) ! register struct tok_state *tok; { for (;;) { --- 162,166 ---- static int ! tok_nextc(register struct tok_state *tok) { for (;;) { *************** *** 322,328 **** static void ! tok_backup(tok, c) ! register struct tok_state *tok; ! register int c; { if (c != EOF) { --- 317,321 ---- static void ! tok_backup(register struct tok_state *tok, register int c) { if (c != EOF) { *************** *** 338,343 **** int ! PyToken_OneChar(c) ! int c; { switch (c) { --- 331,335 ---- int ! PyToken_OneChar(int c) { switch (c) { *************** *** 371,376 **** int ! PyToken_TwoChars(c1, c2) ! int c1, c2; { switch (c1) { --- 363,367 ---- int ! PyToken_TwoChars(int c1, int c2) { switch (c1) { *************** *** 409,414 **** static int ! indenterror(tok) ! struct tok_state *tok; { if (tok->alterror) { --- 400,404 ---- static int ! indenterror(struct tok_state *tok) { if (tok->alterror) { *************** *** 429,435 **** int ! PyTokenizer_Get(tok, p_start, p_end) ! register struct tok_state *tok; /* In/out: tokenizer state */ ! char **p_start, **p_end; /* Out: point to start/end of token */ { register int c; --- 419,424 ---- int ! PyTokenizer_Get(register struct tok_state *tok, char **p_start, ! char **p_end) { register int c; *************** *** 813,819 **** void ! tok_dump(type, start, end) ! int type; ! char *start, *end; { printf("%s", _PyParser_TokenNames[type]); --- 802,806 ---- void ! tok_dump(int type, char *start, char *end) { printf("%s", _PyParser_TokenNames[type]); From python-dev@python.org Sat Jul 22 20:25:54 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 12:25:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Demo/pysvr pysvr.c,1.7,1.8 Message-ID: <200007221925.MAA24809@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/pysvr In directory slayer.i.sourceforge.net:/tmp/cvs-serv24717/Demo/pysvr Modified Files: pysvr.c Log Message: Miscelaneous ANSIfications. I'm assuming here 'main' should take (int, char**) and return an int even on PC platforms. If not, please fix PC/utils/makesrc.c ;-P Index: pysvr.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/pysvr/pysvr.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** pysvr.c 1999/10/05 22:16:07 1.7 --- pysvr.c 2000/07/22 19:25:51 1.8 *************** *** 35,39 **** extern int optind; extern char *optarg; ! extern int getopt(); struct workorder { --- 35,39 ---- extern int optind; extern char *optarg; ! extern int getopt(int, char **, char *); struct workorder { *************** *** 98,102 **** static void ! usage() { fprintf(stderr, usage_line, progname); --- 98,102 ---- static void ! usage(void) { fprintf(stderr, usage_line, progname); *************** *** 221,225 **** static void ! init_python() { if (gtstate) --- 221,225 ---- static void ! init_python(void) { if (gtstate) *************** *** 269,273 **** static void ! oprogname() { int save = errno; --- 269,273 ---- static void ! oprogname(void) { int save = errno; *************** *** 365,369 **** static void ! ps() { char buffer[100]; --- 365,369 ---- static void ! ps(void) { char buffer[100]; From python-dev@python.org Sat Jul 22 20:25:54 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 12:25:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Demo/embed demo.c,1.4,1.5 Message-ID: <200007221925.MAA24806@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/embed In directory slayer.i.sourceforge.net:/tmp/cvs-serv24717/Demo/embed Modified Files: demo.c Log Message: Miscelaneous ANSIfications. I'm assuming here 'main' should take (int, char**) and return an int even on PC platforms. If not, please fix PC/utils/makesrc.c ;-P Index: demo.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/embed/demo.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** demo.c 1999/03/09 17:07:24 1.4 --- demo.c 2000/07/22 19:25:50 1.5 *************** *** 3,11 **** #include "Python.h" ! void initxyzzy(); /* Forward */ ! main(argc, argv) ! int argc; ! char **argv; { /* Pass argv[0] to the Python interpreter */ --- 3,9 ---- #include "Python.h" ! void initxyzzy(void); /* Forward */ ! main(int argc, char **argv) { /* Pass argv[0] to the Python interpreter */ *************** *** 47,54 **** /* A static module */ static PyObject * ! xyzzy_foo(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { if (!PyArg_ParseTuple(args, "")) --- 45,51 ---- /* A static module */ + /* 'self' is not used */ static PyObject * ! xyzzy_foo(PyObject *self, PyObjecT *args) { if (!PyArg_ParseTuple(args, "")) *************** *** 63,67 **** void ! initxyzzy() { PyImport_AddModule("xyzzy"); --- 60,64 ---- void ! initxyzzy(void) { PyImport_AddModule("xyzzy"); From python-dev@python.org Sat Jul 22 20:25:54 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 12:25:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include cStringIO.h,2.13,2.14 Message-ID: <200007221925.MAA24815@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv24717/Include Modified Files: cStringIO.h Log Message: Miscelaneous ANSIfications. I'm assuming here 'main' should take (int, char**) and return an int even on PC platforms. If not, please fix PC/utils/makesrc.c ;-P Index: cStringIO.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/cStringIO.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** cStringIO.h 2000/07/16 12:04:30 2.13 --- cStringIO.h 2000/07/22 19:25:51 2.14 *************** *** 108,114 **** static void * ! xxxPyCObject_Import(module_name, name) ! char *module_name; ! char *name; { PyObject *m, *c; --- 108,112 ---- static void * ! xxxPyCObject_Import(char *module_name, char *name) { PyObject *m, *c; From python-dev@python.org Sat Jul 22 20:25:54 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 12:25:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/perfecthash perfhash.c,1.1,1.2 Message-ID: <200007221925.MAA24839@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/perfecthash In directory slayer.i.sourceforge.net:/tmp/cvs-serv24717/Tools/perfecthash Modified Files: perfhash.c Log Message: Miscelaneous ANSIfications. I'm assuming here 'main' should take (int, char**) and return an int even on PC platforms. If not, please fix PC/utils/makesrc.c ;-P Index: perfhash.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/perfecthash/perfhash.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** perfhash.c 2000/06/28 16:48:05 1.1 --- perfhash.c 2000/07/22 19:25:51 1.2 *************** *** 62,66 **** _declspec(dllexport) #endif ! void initperfhash() { PyObject *m; --- 62,66 ---- _declspec(dllexport) #endif ! void initperfhash(void) { PyObject *m; From python-dev@python.org Sat Jul 22 20:25:54 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 12:25:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects dictobject.c,2.60,2.61 unicodeobject.c,2.51,2.52 Message-ID: <200007221925.MAA24828@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv24717/Objects Modified Files: dictobject.c unicodeobject.c Log Message: Miscelaneous ANSIfications. I'm assuming here 'main' should take (int, char**) and return an int even on PC platforms. If not, please fix PC/utils/makesrc.c ;-P Index: dictobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/dictobject.c,v retrieving revision 2.60 retrieving revision 2.61 diff -C2 -r2.60 -r2.61 *** dictobject.c 2000/07/16 12:04:31 2.60 --- dictobject.c 2000/07/22 19:25:51 2.61 *************** *** 93,97 **** PyObject * ! PyDict_New() { register dictobject *mp; --- 93,97 ---- PyObject * ! PyDict_New(void) { register dictobject *mp; Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.51 retrieving revision 2.52 diff -C2 -r2.51 -r2.52 *** unicodeobject.c 2000/07/17 18:23:13 2.51 --- unicodeobject.c 2000/07/22 19:25:51 2.52 *************** *** 555,559 **** } ! const char *PyUnicode_GetDefaultEncoding() { return unicode_default_encoding; --- 555,559 ---- } ! const char *PyUnicode_GetDefaultEncoding(void) { return unicode_default_encoding; *************** *** 4531,4538 **** static PyObject * ! getnextarg(args, arglen, p_argidx) ! PyObject *args; ! int arglen; ! int *p_argidx; { int argidx = *p_argidx; --- 4531,4535 ---- static PyObject * ! getnextarg(PyObject *args, int arglen, int *p_argidx) { int argidx = *p_argidx; *************** *** 4556,4564 **** static - #ifdef HAVE_STDARG_PROTOTYPES int usprintf(register Py_UNICODE *buffer, char *format, ...) - #else - int usprintf(va_alist) va_dcl - #endif { register int i; --- 4553,4557 ---- *************** *** 4566,4579 **** va_list va; char *charbuffer; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, format); - #else - Py_UNICODE *args; - char *format; - - va_start(va); - buffer = va_arg(va, Py_UNICODE *); - format = va_arg(va, char *); - #endif /* First, format the string as char array, then expand to Py_UNICODE --- 4559,4563 ---- *************** *** 5122,5126 **** /* Initialize the Unicode implementation */ ! void _PyUnicode_Init() { /* Doublecheck the configuration... */ --- 5106,5110 ---- /* Initialize the Unicode implementation */ ! void _PyUnicode_Init(void) { /* Doublecheck the configuration... */ *************** *** 5139,5143 **** void ! _PyUnicode_Fini() { PyUnicodeObject *u = unicode_freelist; --- 5123,5127 ---- void ! _PyUnicode_Fini(void) { PyUnicodeObject *u = unicode_freelist; From python-dev@python.org Sat Jul 22 20:25:54 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 12:25:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC/utils makesrc.c,1.1,1.2 Message-ID: <200007221925.MAA24841@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC/utils In directory slayer.i.sourceforge.net:/tmp/cvs-serv24717/PC/utils Modified Files: makesrc.c Log Message: Miscelaneous ANSIfications. I'm assuming here 'main' should take (int, char**) and return an int even on PC platforms. If not, please fix PC/utils/makesrc.c ;-P Index: makesrc.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/utils/makesrc.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** makesrc.c 1996/06/28 19:10:43 1.1 --- makesrc.c 2000/07/22 19:25:51 1.2 *************** *** 8,12 **** char *usage = "You must be in the \"pc\" directory.\n"; char *list[] = {"..\\Include", "..\\Modules", "..\\Objects", "..\\Parser", "..\\Python", ".", 0}; ! main() { DIR *dpath; --- 8,14 ---- char *usage = "You must be in the \"pc\" directory.\n"; char *list[] = {"..\\Include", "..\\Modules", "..\\Objects", "..\\Parser", "..\\Python", ".", 0}; ! ! int ! main(int argc, char ** argv) { DIR *dpath; *************** *** 65,67 **** } return 0; ! } --- 67,69 ---- } return 0; ! } From python-dev@python.org Sat Jul 22 20:25:54 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 12:25:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC/example_nt example.c,1.1,1.2 Message-ID: <200007221925.MAA24832@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC/example_nt In directory slayer.i.sourceforge.net:/tmp/cvs-serv24717/PC/example_nt Modified Files: example.c Log Message: Miscelaneous ANSIfications. I'm assuming here 'main' should take (int, char**) and return an int even on PC platforms. If not, please fix PC/utils/makesrc.c ;-P Index: example.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/example_nt/example.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** example.c 1996/09/06 21:16:16 1.1 --- example.c 2000/07/22 19:25:51 1.2 *************** *** 2,7 **** static PyObject * ! ex_foo(self, args) ! PyObject *self, *args; { printf("Hello, world\n"); --- 2,6 ---- static PyObject * ! ex_foo(PyObject *self, PyObject *args) { printf("Hello, world\n"); *************** *** 16,20 **** void ! initexample() { Py_InitModule("example", example_methods); --- 15,19 ---- void ! initexample(void) { Py_InitModule("example", example_methods); From python-dev@python.org Sat Jul 22 20:25:55 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 12:25:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC config.c,1.26,1.27 frozen_dllmain.c,1.1,1.2 getpathp.c,1.17,1.18 winsound.c,1.2,1.3 Message-ID: <200007221925.MAA24855@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv24717/PC Modified Files: config.c frozen_dllmain.c getpathp.c winsound.c Log Message: Miscelaneous ANSIfications. I'm assuming here 'main' should take (int, char**) and return an int even on PC platforms. If not, please fix PC/utils/makesrc.c ;-P Index: config.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/config.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** config.c 2000/07/12 12:11:36 1.26 --- config.c 2000/07/22 19:25:51 1.27 *************** *** 16,61 **** #include "Python.h" ! extern void initarray(); #ifndef MS_WIN64 ! extern void initaudioop(); ! extern void initbinascii(); #endif ! extern void initcmath(); ! extern void initerrno(); #ifdef WITH_CYCLE_GC ! extern void initgc(); #endif #ifndef MS_WIN64 ! extern void initimageop(); #endif ! extern void initmath(); ! extern void initmd5(); ! extern void initnew(); ! extern void initnt(); ! extern void initoperator(); ! extern void initregex(); #ifndef MS_WIN64 ! extern void initrgbimg(); #endif ! extern void initrotor(); ! extern void initsignal(); ! extern void initsha(); ! extern void initstrop(); ! extern void initstruct(); ! extern void inittime(); ! extern void initthread(); ! extern void initcStringIO(); ! extern void initcPickle(); ! extern void initpcre(); #ifdef WIN32 ! extern void initmsvcrt(); ! extern void init_locale(); #endif ! extern void init_codecs(); /* -- ADDMODULE MARKER 1 -- */ ! extern void PyMarshal_Init(); ! extern void initimp(); struct _inittab _PyImport_Inittab[] = { --- 16,61 ---- #include "Python.h" ! extern void initarray(void); #ifndef MS_WIN64 ! extern void initaudioop(void); ! extern void initbinascii(void); #endif ! extern void initcmath(void); ! extern void initerrno(void); #ifdef WITH_CYCLE_GC ! extern void initgc(void); #endif #ifndef MS_WIN64 ! extern void initimageop(void); #endif ! extern void initmath(void); ! extern void initmd5(void); ! extern void initnew(void); ! extern void initnt(void); ! extern void initoperator(void); ! extern void initregex(void); #ifndef MS_WIN64 ! extern void initrgbimg(void); #endif ! extern void initrotor(void); ! extern void initsignal(void); ! extern void initsha(void); ! extern void initstrop(void); ! extern void initstruct(void); ! extern void inittime(void); ! extern void initthread(void); ! extern void initcStringIO(void); ! extern void initcPickle(void); ! extern void initpcre(void); #ifdef WIN32 ! extern void initmsvcrt(void); ! extern void init_locale(void); #endif ! extern void init_codecs(void); /* -- ADDMODULE MARKER 1 -- */ ! extern void PyMarshal_Init(void); ! extern void initimp(void); struct _inittab _PyImport_Inittab[] = { Index: frozen_dllmain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/frozen_dllmain.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** frozen_dllmain.c 1998/03/20 17:34:26 1.1 --- frozen_dllmain.c 2000/07/22 19:25:51 1.2 *************** *** 61,65 **** modules are initialized correctly */ ! void PyWinFreeze_ExeInit() { char **modName; --- 61,65 ---- modules are initialized correctly */ ! void PyWinFreeze_ExeInit(void) { char **modName; *************** *** 74,78 **** modules are cleaned up */ ! void PyWinFreeze_ExeTerm() { // Must go backwards --- 74,78 ---- modules are cleaned up */ ! void PyWinFreeze_ExeTerm(void) { // Must go backwards Index: getpathp.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/getpathp.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** getpathp.c 2000/06/30 23:58:05 1.17 --- getpathp.c 2000/07/22 19:25:51 1.18 *************** *** 99,104 **** static int ! is_sep(ch) /* determine if "ch" is a separator character */ ! char ch; { #ifdef ALTSEP --- 99,103 ---- static int ! is_sep(char ch) /* determine if "ch" is a separator character */ { #ifdef ALTSEP *************** *** 111,116 **** static void ! reduce(dir) ! char *dir; { size_t i = strlen(dir); --- 110,114 ---- static void ! reduce(char *dir) { size_t i = strlen(dir); *************** *** 122,127 **** static int ! exists(filename) ! char *filename; { struct stat buf; --- 120,124 ---- static int ! exists(char *filename) { struct stat buf; *************** *** 131,136 **** static int ! ismodule(filename) /* Is module -- check for .pyc/.pyo too */ ! char *filename; { if (exists(filename)) --- 128,132 ---- static int ! ismodule(char *filename) /* Is module -- check for .pyc/.pyo too */ { if (exists(filename)) *************** *** 148,154 **** static void ! join(buffer, stuff) ! char *buffer; ! char *stuff; { size_t n, k; --- 144,148 ---- static void ! join(char *buffer, char *stuff) { size_t n, k; *************** *** 169,174 **** static int ! gotlandmark(landmark) ! char *landmark; { int n, ok; --- 163,167 ---- static int ! gotlandmark(char *landmark) { int n, ok; *************** *** 183,189 **** static int ! search_for_prefix(argv0_path, landmark) ! char *argv0_path; ! char *landmark; { /* Search from argv0_path, until landmark is found */ --- 176,180 ---- static int ! search_for_prefix(char *argv0_path, char *landmark) { /* Search from argv0_path, until landmark is found */ *************** *** 344,348 **** static void ! get_progpath() { extern char *Py_GetProgramName(); --- 335,339 ---- static void ! get_progpath(void) { extern char *Py_GetProgramName(); *************** *** 404,408 **** static void ! calculate_path() { char argv0_path[MAXPATHLEN+1]; --- 395,399 ---- static void ! calculate_path(void) { char argv0_path[MAXPATHLEN+1]; *************** *** 566,570 **** char * ! Py_GetPath() { if (!module_search_path) --- 557,561 ---- char * ! Py_GetPath(void) { if (!module_search_path) *************** *** 574,578 **** char * ! Py_GetPrefix() { if (!module_search_path) --- 565,569 ---- char * ! Py_GetPrefix(void) { if (!module_search_path) *************** *** 582,586 **** char * ! Py_GetExecPrefix() { return Py_GetPrefix(); --- 573,577 ---- char * ! Py_GetExecPrefix(void) { return Py_GetPrefix(); *************** *** 588,592 **** char * ! Py_GetProgramFullPath() { if (!module_search_path) --- 579,583 ---- char * ! Py_GetProgramFullPath(void) { if (!module_search_path) Index: winsound.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/winsound.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** winsound.c 1999/10/01 14:29:17 1.2 --- winsound.c 2000/07/22 19:25:51 1.3 *************** *** 141,145 **** DL_EXPORT(void) ! initwinsound() { PyObject *module=Py_InitModule3("winsound", sound_methods, sound_module_doc); --- 141,145 ---- DL_EXPORT(void) ! initwinsound(void) { PyObject *module=Py_InitModule3("winsound", sound_methods, sound_module_doc); From python-dev@python.org Sat Jul 22 20:25:55 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 12:25:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC/os2vacpp config.c,1.5,1.6 getpathp.c,1.7,1.8 Message-ID: <200007221925.MAA24842@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC/os2vacpp In directory slayer.i.sourceforge.net:/tmp/cvs-serv24717/PC/os2vacpp Modified Files: config.c getpathp.c Log Message: Miscelaneous ANSIfications. I'm assuming here 'main' should take (int, char**) and return an int even on PC platforms. If not, please fix PC/utils/makesrc.c ;-P Index: config.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/os2vacpp/config.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** config.c 2000/06/30 23:58:05 1.5 --- config.c 2000/07/22 19:25:51 1.6 *************** *** 16,54 **** #include "Python.h" ! extern void initarray(); ! extern void initaudioop(); ! extern void initbinascii(); ! extern void initcmath(); ! extern void initerrno(); ! extern void initimageop(); ! extern void initmath(); ! extern void initmd5(); ! extern void initnew(); ! extern void initnt(); ! extern void initos2(); ! extern void initoperator(); ! extern void initposix(); ! extern void initregex(); ! extern void initrgbimg(); ! extern void initrotor(); ! extern void initsignal(); ! extern void initselect(); ! extern void init_socket(); ! extern void initsoundex(); ! extern void initstrop(); ! extern void initstruct(); ! extern void inittime(); ! extern void initthread(); ! extern void initcStringIO(); ! extern void initcPickle(); ! extern void initpcre(); #ifdef WIN32 ! extern void initmsvcrt(); #endif /* -- ADDMODULE MARKER 1 -- */ ! extern void PyMarshal_Init(); ! extern void initimp(); struct _inittab _PyImport_Inittab[] = { --- 16,54 ---- #include "Python.h" ! extern void initarray(void); ! extern void initaudioop(void); ! extern void initbinascii(void); ! extern void initcmath(void); ! extern void initerrno(void); ! extern void initimageop(void); ! extern void initmath(void); ! extern void initmd5(void); ! extern void initnew(void); ! extern void initnt(void); ! extern void initos2(void); ! extern void initoperator(void); ! extern void initposix(void); ! extern void initregex(void); ! extern void initrgbimg(void); ! extern void initrotor(void); ! extern void initsignal(void); ! extern void initselect(void); ! extern void init_socket(void); ! extern void initsoundex(void); ! extern void initstrop(void); ! extern void initstruct(void); ! extern void inittime(void); ! extern void initthread(void); ! extern void initcStringIO(void); ! extern void initcPickle(void); ! extern void initpcre(void); #ifdef WIN32 ! extern void initmsvcrt(void); #endif /* -- ADDMODULE MARKER 1 -- */ ! extern void PyMarshal_Init(void); ! extern void initimp(void); struct _inittab _PyImport_Inittab[] = { Index: getpathp.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/os2vacpp/getpathp.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** getpathp.c 2000/06/30 23:58:05 1.7 --- getpathp.c 2000/07/22 19:25:51 1.8 *************** *** 65,70 **** static int ! is_sep(ch) /* determine if "ch" is a separator character */ ! char ch; { #ifdef ALTSEP --- 65,69 ---- static int ! is_sep(char ch) /* determine if "ch" is a separator character */ { #ifdef ALTSEP *************** *** 77,82 **** static void ! reduce(dir) ! char *dir; { int i = strlen(dir); --- 76,80 ---- static void ! reduce(char *dir) { int i = strlen(dir); *************** *** 88,93 **** static int ! exists(filename) ! char *filename; { struct stat buf; --- 86,90 ---- static int ! exists(char *filename) { struct stat buf; *************** *** 97,103 **** static void ! join(buffer, stuff) ! char *buffer; ! char *stuff; { int n, k; --- 94,98 ---- static void ! join(char *buffer, char *stuff) { int n, k; *************** *** 118,124 **** static int ! search_for_prefix(argv0_path, landmark) ! char *argv0_path; ! char *landmark; { int n; --- 113,117 ---- static int ! search_for_prefix(char *argv0_path, char *landmark) { int n; *************** *** 248,252 **** static void ! get_progpath() { extern char *Py_GetProgramName(); --- 241,245 ---- static void ! get_progpath(void) { extern char *Py_GetProgramName(); *************** *** 300,304 **** static void ! calculate_path() { char argv0_path[MAXPATHLEN+1]; --- 293,297 ---- static void ! calculate_path(void) { char argv0_path[MAXPATHLEN+1]; *************** *** 452,456 **** char * ! Py_GetPath() { if (!module_search_path) --- 445,449 ---- char * ! Py_GetPath(void) { if (!module_search_path) *************** *** 461,465 **** char * ! Py_GetPrefix() { if (!module_search_path) --- 454,458 ---- char * ! Py_GetPrefix(void) { if (!module_search_path) *************** *** 470,474 **** char * ! Py_GetExecPrefix() { if (!module_search_path) --- 463,467 ---- char * ! Py_GetExecPrefix(void) { if (!module_search_path) *************** *** 479,483 **** char * ! Py_GetProgramFullPath() { if (!module_search_path) --- 472,476 ---- char * ! Py_GetProgramFullPath(void) { if (!module_search_path) From python-dev@python.org Sat Jul 22 20:27:46 2000 From: python-dev@python.org (Paul Prescod) Date: Sat, 22 Jul 2000 12:27:46 -0700 Subject: [Python-checkins] CVS: python/nondist/sandbox/doctools onlinehelp.py,1.2,1.3 Message-ID: <200007221927.MAA25065@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sandbox/doctools In directory slayer.i.sourceforge.net:/tmp/cvs-serv25027 Modified Files: onlinehelp.py Log Message: Better introspection. (sorry for the checkin flurry) Index: onlinehelp.py =================================================================== RCS file: /cvsroot/python/python/nondist/sandbox/doctools/onlinehelp.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** onlinehelp.py 2000/07/22 18:51:36 1.2 --- onlinehelp.py 2000/07/22 19:27:43 1.3 *************** *** 70,73 **** --- 70,74 ---- import re import textdoc, types + import __builtin__ prompt="--more-- (enter for more, q to quit) " *************** *** 230,233 **** --- 231,236 ---- return mod + hack_const="__paul_prescod_hack_constant__" + class Help: def __init__( self, out, line_length, docdir=None ): *************** *** 324,328 **** # try again -- this time in builtins ! glo=__builtins__.__dict__.get( topic, 0 ) if glo: self.handleObject( glo ) --- 327,331 ---- # try again -- this time in builtins ! glo=__builtin__.__dict__.get( topic, 0 ) if glo: self.handleObject( glo ) *************** *** 338,349 **** # try again -- this time as an attribute OF a module ### FIXME/XXX/TODO: this code is not finished yet! ! parts=string.split( topic, "." ) ! for i in range( len( parts ), -1, -1 ): ! if i: ! front=string.join( parts[:i], "." ) mod=my_import( front ) if mod: ! self.handleObject( mod ) ! return None sys.stderr.write( "No such topic "+`topic` ) --- 341,361 ---- # try again -- this time as an attribute OF a module ### FIXME/XXX/TODO: this code is not finished yet! ! parts=topic.split( "." ) ! for i in range( len( parts )+1, 0, -1 ): ! dot="." ! front=dot.join( parts[:i] ) mod=my_import( front ) if mod: ! rest=parts[i:] ! obj=mod ! while rest: # try a getattr of a getattr of a getattr ... ! first,rest=rest[0],rest[1:] ! obj=getattr( obj, first, hack_const ) ! if obj==hack_const: # failed! ! break ! ! if obj!=hack_const: # success! ! self.handleObject( obj ) ! return None sys.stderr.write( "No such topic "+`topic` ) From python-dev@python.org Sun Jul 23 00:30:05 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 16:30:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include ceval.h,2.34,2.35 import.h,2.25,2.26 modsupport.h,2.32,2.33 pgenheaders.h,2.20,2.21 sysmodule.h,2.20,2.21 unicodeobject.h,2.15,2.16 Message-ID: <200007222330.QAA09843@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv9681 Modified Files: ceval.h import.h modsupport.h pgenheaders.h sysmodule.h unicodeobject.h Log Message: ANSIfications: fix empty arglists, and remove the checks for 'HAVE_STDARG_PROTOTYPES' (consider it true, remove false branch) Index: ceval.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/ceval.h,v retrieving revision 2.34 retrieving revision 2.35 diff -C2 -r2.34 -r2.35 *** ceval.h 2000/07/08 23:37:28 2.34 --- ceval.h 2000/07/22 23:30:03 2.35 *************** *** 28,40 **** PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL) - #ifdef HAVE_STDARG_PROTOTYPES DL_IMPORT(PyObject *) PyEval_CallFunction(PyObject *obj, char *format, ...); DL_IMPORT(PyObject *) PyEval_CallMethod(PyObject *obj, char *methodname, char *format, ...); - #else - /* Better to have no prototypes at all for varargs functions in this case */ - DL_IMPORT(PyObject *) PyEval_CallFunction(); - DL_IMPORT(PyObject *) PyEval_CallMethod(); - #endif DL_IMPORT(PyObject *) PyEval_GetBuiltins(void); --- 28,34 ---- Index: import.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/import.h,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** import.h 2000/07/08 23:37:28 2.25 --- import.h 2000/07/22 23:30:03 2.26 *************** *** 36,45 **** struct _inittab { char *name; ! void (*initfunc)(); }; extern DL_IMPORT(struct _inittab *) PyImport_Inittab; ! extern DL_IMPORT(int) PyImport_AppendInittab(char *name, void (*initfunc)()); extern DL_IMPORT(int) PyImport_ExtendInittab(struct _inittab *newtab); --- 36,45 ---- struct _inittab { char *name; ! void (*initfunc)(void); }; extern DL_IMPORT(struct _inittab *) PyImport_Inittab; ! extern DL_IMPORT(int) PyImport_AppendInittab(char *name, void (*initfunc)(void)); extern DL_IMPORT(int) PyImport_ExtendInittab(struct _inittab *newtab); Index: modsupport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/modsupport.h,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -r2.32 -r2.33 *** modsupport.h 2000/07/16 12:04:30 2.32 --- modsupport.h 2000/07/22 23:30:03 2.33 *************** *** 17,22 **** /* Module support interface */ - #ifdef HAVE_STDARG_PROTOTYPES - #include --- 17,20 ---- *************** *** 26,40 **** char *, char **, ...); extern DL_IMPORT(PyObject *) Py_BuildValue(char *, ...); - - #else - - #include - - /* Better to have no prototypes at all for varargs functions in this case */ - extern DL_IMPORT(int) PyArg_Parse(); - extern DL_IMPORT(int) PyArg_ParseTuple(); - extern DL_IMPORT(PyObject *) Py_BuildValue(); - - #endif extern DL_IMPORT(int) PyArg_VaParse(PyObject *, char *, va_list); --- 24,27 ---- Index: pgenheaders.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pgenheaders.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** pgenheaders.h 2000/06/30 23:58:04 2.20 --- pgenheaders.h 2000/07/22 23:30:03 2.21 *************** *** 36,47 **** #include "pydebug.h" - #ifdef HAVE_STDARG_PROTOTYPES DL_IMPORT(void) PySys_WriteStdout(const char *format, ...); DL_IMPORT(void) PySys_WriteStderr(const char *format, ...); - #else - /* Better to have no prototypes at all for varargs functions in this case */ - DL_IMPORT(void) PySys_WriteStdout(); - DL_IMPORT(void) PySys_WriteStderr(); - #endif #define addarc _Py_addarc --- 36,41 ---- Index: sysmodule.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/sysmodule.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** sysmodule.h 2000/07/09 00:55:06 2.20 --- sysmodule.h 2000/07/22 23:30:03 2.21 *************** *** 23,34 **** DL_IMPORT(void) PySys_SetPath(char *); - #ifdef HAVE_STDARG_PROTOTYPES DL_IMPORT(void) PySys_WriteStdout(const char *format, ...); DL_IMPORT(void) PySys_WriteStderr(const char *format, ...); - #else - /* Better to have no prototypes at all for varargs functions in this case */ - DL_IMPORT(void) PySys_WriteStdout(); - DL_IMPORT(void) PySys_WriteStderr(); - #endif extern DL_IMPORT(PyObject *) _PySys_TraceFunc, *_PySys_ProfileFunc; --- 23,28 ---- Index: unicodeobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/unicodeobject.h,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** unicodeobject.h 2000/07/16 12:04:30 2.15 --- unicodeobject.h 2000/07/22 23:30:03 2.16 *************** *** 377,381 **** */ ! extern DL_IMPORT(const char*) PyUnicode_GetDefaultEncoding(); /* Sets the currently active default encoding. --- 377,381 ---- */ ! extern DL_IMPORT(const char*) PyUnicode_GetDefaultEncoding(void); /* Sets the currently active default encoding. From python-dev@python.org Sun Jul 23 00:33:24 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 16:33:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser intrcheck.c,2.34,2.35 Message-ID: <200007222333.QAA09998@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv9902 Modified Files: intrcheck.c Log Message: Remember to return something if RETSIGTYPE is not 'void'. Do we still need to worry about systems that have signal-handlers return 'int' ? Not all of the code does, though nothing will break because of it. Index: intrcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/intrcheck.c,v retrieving revision 2.34 retrieving revision 2.35 diff -C2 -r2.34 -r2.35 *** intrcheck.c 2000/07/22 19:20:54 2.34 --- intrcheck.c 2000/07/22 23:33:22 2.35 *************** *** 169,172 **** --- 169,175 ---- signal(SIGINT, intcatcher); Py_AddPendingCall(checksignals_witharg, NULL); + #if RETSIGTYPE != void + return 0; + #endif } From python-dev@python.org Sun Jul 23 00:38:04 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 16:38:04 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python dynload_aix.c,2.7,2.8 dynload_dl.c,2.4,2.5 frozenmain.c,2.23,2.24 import.c,2.142,2.143 thread_lwp.h,2.12,2.13 Message-ID: <200007222338.QAA10244@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv10119 Modified Files: dynload_aix.c dynload_dl.c frozenmain.c import.c thread_lwp.h Log Message: ANSIfy as many declarations as possible. Index: dynload_aix.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_aix.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** dynload_aix.c 2000/07/22 18:47:25 2.7 --- dynload_aix.c 2000/07/22 23:38:01 2.8 *************** *** 29,33 **** ! extern char *Py_GetProgramName(); typedef struct Module { --- 29,33 ---- ! extern char *Py_GetProgramName(void); typedef struct Module { Index: dynload_dl.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_dl.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** dynload_dl.c 2000/06/30 23:58:06 2.4 --- dynload_dl.c 2000/07/22 23:38:01 2.5 *************** *** 17,21 **** ! extern char *Py_GetProgramName(); const struct filedescr _PyImport_DynLoadFiletab[] = { --- 17,21 ---- ! extern char *Py_GetProgramName(void); const struct filedescr _PyImport_DynLoadFiletab[] = { Index: frozenmain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/frozenmain.c,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** frozenmain.c 2000/07/22 18:47:25 2.23 --- frozenmain.c 2000/07/22 23:38:01 2.24 *************** *** 14,20 **** #ifdef MS_WIN32 ! extern void PyWinFreeze_ExeInit(); ! extern void PyWinFreeze_ExeTerm(); ! extern int PyInitFrozenExtensions(); #endif --- 14,20 ---- #ifdef MS_WIN32 ! extern void PyWinFreeze_ExeInit(void); ! extern void PyWinFreeze_ExeTerm(void); ! extern int PyInitFrozenExtensions(void); #endif Index: import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.142 retrieving revision 2.143 diff -C2 -r2.142 -r2.143 *** import.c 2000/07/22 18:47:25 2.142 --- import.c 2000/07/22 23:38:01 2.143 *************** *** 818,822 **** #ifdef MS_COREDLL ! extern FILE *PyWin_FindRegisteredModule(); #endif --- 818,823 ---- #ifdef MS_COREDLL ! extern FILE *PyWin_FindRegisteredModule(const char *, struct filedescr **, ! char *, int); #endif Index: thread_lwp.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_lwp.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** thread_lwp.h 2000/07/22 18:47:25 2.12 --- thread_lwp.h 2000/07/22 23:38:01 2.13 *************** *** 107,111 **** { struct lock *lock; ! extern char *malloc(); dprintf(("PyThread_allocate_lock called\n")); --- 107,111 ---- { struct lock *lock; ! extern char *malloc(size_t); dprintf(("PyThread_allocate_lock called\n")); From python-dev@python.org Sun Jul 23 00:49:33 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 16:49:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules signalmodule.c,2.47,2.48 Message-ID: <200007222349.QAA11106@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv10920 Modified Files: signalmodule.c Log Message: Further ANSIfication of functionpointers and declarations. Also, make sure to return something if RETSIGTYPE isn't void, in functions that are defined to return RETSIGTYPE. Work around an argumentlist mismatch ('void' vs. 'void *') by using a static wrapper function. Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.47 retrieving revision 2.48 diff -C2 -r2.47 -r2.48 *** signalmodule.c 2000/07/21 06:00:07 2.47 --- signalmodule.c 2000/07/22 23:49:30 2.48 *************** *** 27,31 **** #ifndef SIG_ERR ! #define SIG_ERR ((RETSIGTYPE (*)())-1) #endif --- 27,31 ---- #ifndef SIG_ERR ! #define SIG_ERR ((RETSIGTYPE (*)(int))-1) #endif *************** *** 93,97 **** static PyObject *IntHandler; ! static RETSIGTYPE (*old_siginthandler)() = SIG_DFL; --- 93,97 ---- static PyObject *IntHandler; ! static RETSIGTYPE (*old_siginthandler)(int) = SIG_DFL; *************** *** 111,114 **** --- 111,121 ---- + + static int + checksignals_witharg(void * unused) + { + return PyErr_CheckSignals(); + } + static RETSIGTYPE signal_handler(int sig_num) *************** *** 120,125 **** is_tripped++; Handlers[sig_num].tripped = 1; ! Py_AddPendingCall( ! (int (*)(ANY *))PyErr_CheckSignals, NULL); #ifdef WITH_THREAD } --- 127,131 ---- is_tripped++; Handlers[sig_num].tripped = 1; ! Py_AddPendingCall(checksignals_witharg, NULL); #ifdef WITH_THREAD } *************** *** 136,141 **** #ifdef HAVE_SIGINTERRUPT siginterrupt(sig_num, 1); #endif - (void)signal(sig_num, &signal_handler); } --- 142,150 ---- #ifdef HAVE_SIGINTERRUPT siginterrupt(sig_num, 1); + #endif + signal(sig_num, signal_handler); + #if RETSIGTYPE != void + return 0; #endif } *************** *** 192,196 **** int sig_num; PyObject *old_handler; ! RETSIGTYPE (*func)(); if (!PyArg_Parse(args, "(iO)", &sig_num, &obj)) return NULL; --- 201,205 ---- int sig_num; PyObject *old_handler; ! RETSIGTYPE (*func)(int); if (!PyArg_Parse(args, "(iO)", &sig_num, &obj)) return NULL; *************** *** 349,353 **** Handlers[0].tripped = 0; for (i = 1; i < NSIG; i++) { ! RETSIGTYPE (*t)(); #ifdef HAVE_SIGACTION struct sigaction act; --- 358,362 ---- Handlers[0].tripped = 0; for (i = 1; i < NSIG; i++) { ! RETSIGTYPE (*t)(int); #ifdef HAVE_SIGACTION struct sigaction act; From python-dev@python.org Sun Jul 23 00:51:22 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 16:51:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules readline.c,2.23,2.24 Message-ID: <200007222351.QAA11217@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv11168 Modified Files: readline.c Log Message: ANSIfication of function-pointers and declarations. Also, make sure to return something if RETSIGTYPE is not void, in functions that are defined as returning RETSIGTYPE. Index: readline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** readline.c 2000/07/21 06:00:07 2.23 --- readline.c 2000/07/22 23:51:19 2.24 *************** *** 39,43 **** /* Pointers needed from outside (but not declared in a header file). */ ! extern int (*PyOS_InputHook)(); extern char *(*PyOS_ReadlineFunctionPointer)(char *); --- 39,43 ---- /* Pointers needed from outside (but not declared in a header file). */ ! extern int (*PyOS_InputHook)(void); extern char *(*PyOS_ReadlineFunctionPointer)(char *); *************** *** 432,435 **** --- 432,438 ---- { longjmp(jbuf, 1); + #if RETSIGTYPE != void + return 0; + #endif } *************** *** 442,446 **** size_t n; char *p, *q; ! RETSIGTYPE (*old_inthandler)(); old_inthandler = signal(SIGINT, onintr); if (setjmp(jbuf)) { --- 445,449 ---- size_t n; char *p, *q; ! RETSIGTYPE (*old_inthandler)(int); old_inthandler = signal(SIGINT, onintr); if (setjmp(jbuf)) { From python-dev@python.org Sun Jul 23 00:56:10 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 16:56:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules cPickle.c,2.45,2.46 Message-ID: <200007222356.QAA11525@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv11278 Modified Files: cPickle.c Log Message: ANSIfication: add proper prototypes to function-pointers and declarations. Also, fix a bug found by said declarations, where a string was defined as unsigned char*, but used as signed. Index: cPickle.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** cPickle.c 2000/07/12 13:05:33 2.45 --- cPickle.c 2000/07/22 23:56:07 2.46 *************** *** 311,315 **** } ! typedef struct { PyObject_HEAD FILE *fp; --- 311,315 ---- } ! typedef struct Picklerobject { PyObject_HEAD FILE *fp; *************** *** 322,326 **** int bin; int fast; /* Fast mode doesn't save in memo, don't use if circ ref */ ! int (*write_func)(); char *write_buf; int buf_size; --- 322,326 ---- int bin; int fast; /* Fast mode doesn't save in memo, don't use if circ ref */ ! int (*write_func)(struct Picklerobject *, char *, int); char *write_buf; int buf_size; *************** *** 330,334 **** staticforward PyTypeObject Picklertype; ! typedef struct { PyObject_HEAD FILE *fp; --- 330,334 ---- staticforward PyTypeObject Picklertype; ! typedef struct Unpicklerobject { PyObject_HEAD FILE *fp; *************** *** 345,350 **** int num_marks; int marks_size; ! int (*read_func)(); ! int (*readline_func)(); int buf_size; char *buf; --- 345,350 ---- int num_marks; int marks_size; ! int (*read_func)(struct Unpicklerobject *, char **, int); ! int (*readline_func)(struct Unpicklerobject *, char **); int buf_size; char *buf; *************** *** 370,392 **** static PyObject * ! #ifdef HAVE_STDARG_PROTOTYPES ! /* VARARGS 2 */ ! cPickle_ErrFormat(PyObject *ErrType, char *stringformat, char *format, ...) { ! #else ! /* VARARGS */ ! cPickle_ErrFormat(va_alist) va_dcl { ! #endif va_list va; PyObject *args=0, *retval=0; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, format); - #else - PyObject *ErrType; - char *stringformat, *format; - va_start(va); - ErrType = va_arg(va, PyObject *); - stringformat = va_arg(va, char *); - format = va_arg(va, char *); - #endif if (format) args = Py_VaBuildValue(format, va); --- 370,378 ---- static PyObject * ! cPickle_ErrFormat(PyObject *ErrType, char *stringformat, char *format, ...) ! { va_list va; PyObject *args=0, *retval=0; va_start(va, format); if (format) args = Py_VaBuildValue(format, va); *************** *** 3204,3208 **** load_long_binget(Unpicklerobject *self) { PyObject *py_key = 0, *value = 0; ! unsigned char c, *s; long key; int rc; --- 3190,3195 ---- load_long_binget(Unpicklerobject *self) { PyObject *py_key = 0, *value = 0; ! unsigned char c; ! char *s; long key; int rc; *************** *** 3255,3259 **** load_binput(Unpicklerobject *self) { PyObject *py_key = 0, *value = 0; ! unsigned char key, *s; int len; --- 3242,3247 ---- load_binput(Unpicklerobject *self) { PyObject *py_key = 0, *value = 0; ! unsigned char key; ! char *s; int len; *************** *** 3275,3279 **** PyObject *py_key = 0, *value = 0; long key; ! unsigned char c, *s; int len; --- 3263,3268 ---- PyObject *py_key = 0, *value = 0; long key; ! unsigned char c; ! char *s; int len; From python-dev@python.org Sun Jul 23 00:57:58 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 16:57:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules cryptmodule.c,2.8,2.9 flmodule.c,1.43,1.44 getpath.c,1.28,1.29 nismodule.c,2.19,2.20 parsermodule.c,2.47,2.48 posixmodule.c,2.158,2.159 python.c,2.5,2.6 selectmodule.c,2.40,2.41 socketmodule.c,1.118,1.119 timemodule.c,2.92,2.93 Message-ID: <200007222357.QAA11642@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv11549 Modified Files: cryptmodule.c flmodule.c getpath.c nismodule.c parsermodule.c posixmodule.c python.c selectmodule.c socketmodule.c timemodule.c Log Message: Even more ANSIfication: fix as many function pointers and declarations as possible. Index: cryptmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cryptmodule.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** cryptmodule.c 2000/07/21 06:00:07 2.8 --- cryptmodule.c 2000/07/22 23:57:55 2.9 *************** *** 13,17 **** { char *word, *salt; ! extern char * crypt(); if (!PyArg_Parse(args, "(ss)", &word, &salt)) { --- 13,17 ---- { char *word, *salt; ! extern char * crypt(const char *, const char *); if (!PyArg_Parse(args, "(ss)", &word, &salt)) { Index: flmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/flmodule.c,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -r1.43 -r1.44 *** flmodule.c 2000/07/21 06:00:07 1.43 --- flmodule.c 2000/07/22 23:57:55 1.44 *************** *** 1673,1677 **** static PyObject * ! forms_do_or_check_forms(PyObject *dummy, PyObject *args, FL_OBJECT *(*func)()) { FL_OBJECT *generic; --- 1673,1677 ---- static PyObject * ! forms_do_or_check_forms(PyObject *dummy, PyObject *args, FL_OBJECT *(*func)(void)) { FL_OBJECT *generic; *************** *** 1752,1756 **** #ifdef UNUSED static PyObject * ! fl_call(void (*func)(), PyObject *args) { if (!PyArg_NoArgs(args)) --- 1752,1756 ---- #ifdef UNUSED static PyObject * ! fl_call(void (*func)(void), PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 2059,2063 **** static PyObject * ! forms_file_selector_func(PyObject *args, char *(*func)()) { char *str; --- 2059,2063 ---- static PyObject * ! forms_file_selector_func(PyObject *args, char *(*func)(void)) { char *str; Index: getpath.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/getpath.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** getpath.c 2000/07/21 06:00:07 1.28 --- getpath.c 2000/07/22 23:57:55 1.29 *************** *** 350,354 **** calculate_path(void) { ! extern char *Py_GetProgramName(); static char delimiter[2] = {DELIM, '\0'}; --- 350,354 ---- calculate_path(void) { ! extern char *Py_GetProgramName(void); static char delimiter[2] = {DELIM, '\0'}; Index: nismodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/nismodule.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** nismodule.c 2000/07/21 06:00:07 2.19 --- nismodule.c 2000/07/22 23:57:55 2.20 *************** *** 21,25 **** #ifdef __sgi /* This is missing from rpcsvc/ypclnt.h */ ! extern int yp_get_default_domain(); #endif --- 21,25 ---- #ifdef __sgi /* This is missing from rpcsvc/ypclnt.h */ ! extern int yp_get_default_domain(char **); #endif Index: parsermodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v retrieving revision 2.47 retrieving revision 2.48 diff -C2 -r2.47 -r2.48 *** parsermodule.c 2000/07/16 12:04:31 2.47 --- parsermodule.c 2000/07/22 23:57:55 2.48 *************** *** 964,968 **** */ static int ! validate_repeating_list(node *tree, int ntype, int (*vfunc)(), const char *const name) { --- 964,968 ---- */ static int ! validate_repeating_list(node *tree, int ntype, int (*vfunc)(node *), const char *const name) { Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.158 retrieving revision 2.159 diff -C2 -r2.158 -r2.159 *** posixmodule.c 2000/07/22 16:39:39 2.158 --- posixmodule.c 2000/07/22 23:57:55 2.159 *************** *** 131,139 **** #ifdef HAVE_UNISTD_H /* XXX These are for SunOS4.1.3 but shouldn't hurt elsewhere */ ! extern int rename(); ! extern int pclose(); ! extern int lstat(); ! extern int symlink(); ! extern int fsync(); #else /* !HAVE_UNISTD_H */ #if defined(PYCC_VACPP) --- 131,139 ---- #ifdef HAVE_UNISTD_H /* XXX These are for SunOS4.1.3 but shouldn't hurt elsewhere */ ! extern int rename(const char *, const char *); ! extern int pclose(FILE *); ! extern int lstat(const char *, struct stat *); ! extern int symlink(const char *, const char *); ! extern int fsync(int fd); #else /* !HAVE_UNISTD_H */ #if defined(PYCC_VACPP) Index: python.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/python.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** python.c 2000/07/09 20:35:15 2.5 --- python.c 2000/07/22 23:57:55 2.6 *************** *** 3,7 **** #include "Python.h" ! extern DL_EXPORT(int) Py_Main(); int --- 3,7 ---- #include "Python.h" ! extern DL_EXPORT(int) Py_Main(int, char **); int Index: selectmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v retrieving revision 2.40 retrieving revision 2.41 diff -C2 -r2.40 -r2.41 *** selectmodule.c 2000/07/22 16:41:08 2.40 --- selectmodule.c 2000/07/22 23:57:55 2.41 *************** *** 28,32 **** #ifdef __sgi /* This is missing from unistd.h */ ! extern void bzero(); #endif --- 28,32 ---- #ifdef __sgi /* This is missing from unistd.h */ ! extern void bzero(void *, int); #endif Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.118 retrieving revision 1.119 diff -C2 -r1.118 -r1.119 *** socketmodule.c 2000/07/21 06:00:07 1.118 --- socketmodule.c 2000/07/22 23:57:55 1.119 *************** *** 112,116 **** #if !defined(MS_WINDOWS) && !defined(PYOS_OS2) && !defined(__BEOS__) ! extern int gethostname(); /* For Solaris, at least */ #endif --- 112,116 ---- #if !defined(MS_WINDOWS) && !defined(PYOS_OS2) && !defined(__BEOS__) ! extern int gethostname(char *, size_t); /* For Solaris, at least */ #endif Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.92 retrieving revision 2.93 diff -C2 -r2.92 -r2.93 *** timemodule.c 2000/07/21 06:00:07 2.92 --- timemodule.c 2000/07/22 23:57:55 2.93 *************** *** 50,54 **** #include #if !defined(MS_WINDOWS) && !defined(PYOS_OS2) ! extern int ftime(); #endif /* MS_WINDOWS */ #endif /* HAVE_FTIME */ --- 50,54 ---- #include #if !defined(MS_WINDOWS) && !defined(PYOS_OS2) ! extern int ftime(struct timeb *); #endif /* MS_WINDOWS */ #endif /* HAVE_FTIME */ *************** *** 385,389 **** #if 0 ! extern char *strptime(); /* Enable this if it's not declared in */ #endif --- 385,390 ---- #if 0 ! /* Enable this if it's not declared in */ ! extern char *strptime(const char *, const char *, struct tm *); #endif From python-dev@python.org Sun Jul 23 00:59:35 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 16:59:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.42,2.43 Message-ID: <200007222359.QAA11836@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv11697/Objects Modified Files: abstract.c Log Message: ANSIfication: remove very-old-varargs code, fix function declarations so they include prototypes. Index: abstract.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v retrieving revision 2.42 retrieving revision 2.43 diff -C2 -r2.42 -r2.43 *** abstract.c 2000/07/17 09:22:55 2.42 --- abstract.c 2000/07/22 23:59:32 2.43 *************** *** 299,304 **** PyNumber_Or(PyObject *v, PyObject *w) { - extern int PyNumber_Coerce(); - BINOP(v, w, "__or__", "__ror__", PyNumber_Or); if (v->ob_type->tp_as_number != NULL) { --- 299,302 ---- *************** *** 320,325 **** PyNumber_Xor(PyObject *v, PyObject *w) { - extern int PyNumber_Coerce(); - BINOP(v, w, "__xor__", "__rxor__", PyNumber_Xor); if (v->ob_type->tp_as_number != NULL) { --- 318,321 ---- *************** *** 1392,1414 **** PyObject * - #ifdef HAVE_STDARG_PROTOTYPES - /* VARARGS 2 */ PyObject_CallFunction(PyObject *callable, char *format, ...) - #else - /* VARARGS */ - PyObject_CallFunction(va_alist) va_dcl - #endif { va_list va; PyObject *args, *retval; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, format); - #else - PyObject *callable; - char *format; - va_start(va); - callable = va_arg(va, PyObject *); - format = va_arg(va, char *); - #endif if (callable == NULL) { --- 1388,1396 ---- *************** *** 1445,1469 **** PyObject * - #ifdef HAVE_STDARG_PROTOTYPES - /* VARARGS 2 */ PyObject_CallMethod(PyObject *o, char *name, char *format, ...) - #else - /* VARARGS */ - PyObject_CallMethod(va_alist) va_dcl - #endif { va_list va; PyObject *args, *func = 0, *retval; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, format); - #else - PyObject *o; - char *name; - char *format; - va_start(va); - o = va_arg(va, PyObject *); - name = va_arg(va, char *); - format = va_arg(va, char *); - #endif if (o == NULL || name == NULL) { --- 1427,1435 ---- From python-dev@python.org Sun Jul 23 00:59:35 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 16:59:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC WinMain.c,1.5,1.6 getpathp.c,1.18,1.19 Message-ID: <200007222359.QAA11849@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv11697/PC Modified Files: WinMain.c getpathp.c Log Message: ANSIfication: remove very-old-varargs code, fix function declarations so they include prototypes. Index: WinMain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/WinMain.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** WinMain.c 2000/07/08 20:49:58 1.5 --- WinMain.c 2000/07/22 23:59:33 1.6 *************** *** 6,10 **** #include "Python.h" ! extern int Py_Main(); int WINAPI WinMain( --- 6,10 ---- #include "Python.h" ! extern int Py_Main(int, char **); int WINAPI WinMain( Index: getpathp.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/getpathp.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** getpathp.c 2000/07/22 19:25:51 1.18 --- getpathp.c 2000/07/22 23:59:33 1.19 *************** *** 337,341 **** get_progpath(void) { ! extern char *Py_GetProgramName(); char *path = getenv("PATH"); char *prog = Py_GetProgramName(); --- 337,341 ---- get_progpath(void) { ! extern char *Py_GetProgramName(void); char *path = getenv("PATH"); char *prog = Py_GetProgramName(); From python-dev@python.org Sun Jul 23 00:59:35 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 16:59:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC/os2vacpp getpathp.c,1.8,1.9 Message-ID: <200007222359.QAA11846@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC/os2vacpp In directory slayer.i.sourceforge.net:/tmp/cvs-serv11697/PC/os2vacpp Modified Files: getpathp.c Log Message: ANSIfication: remove very-old-varargs code, fix function declarations so they include prototypes. Index: getpathp.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/os2vacpp/getpathp.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** getpathp.c 2000/07/22 19:25:51 1.8 --- getpathp.c 2000/07/22 23:59:33 1.9 *************** *** 17,21 **** #ifdef MS_WIN32 #include ! extern BOOL PyWin_IsWin32s(); #endif --- 17,21 ---- #ifdef MS_WIN32 #include ! extern BOOL PyWin_IsWin32s(void); #endif *************** *** 243,247 **** get_progpath(void) { ! extern char *Py_GetProgramName(); char *path = getenv("PATH"); char *prog = Py_GetProgramName(); --- 243,247 ---- get_progpath(void) { ! extern char *Py_GetProgramName(void); char *path = getenv("PATH"); char *prog = Py_GetProgramName(); From python-dev@python.org Sun Jul 23 01:02:18 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 17:02:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules config.c.in,1.70,1.71 makesetup,1.25,1.26 Message-ID: <200007230002.RAA18895@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv17423 Modified Files: config.c.in makesetup Log Message: Fix prototypes generated by makesetup, so they include '(void)' rather than empty argumentlists. Index: config.c.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/config.c.in,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -r1.70 -r1.71 *** config.c.in 2000/07/12 12:09:05 1.70 --- config.c.in 2000/07/23 00:02:15 1.71 *************** *** 21,26 **** /* -- ADDMODULE MARKER 1 -- */ ! extern void PyMarshal_Init(); ! extern void initimp(); struct _inittab _PyImport_Inittab[] = { --- 21,26 ---- /* -- ADDMODULE MARKER 1 -- */ ! extern void PyMarshal_Init(void); ! extern void initimp(void); struct _inittab _PyImport_Inittab[] = { Index: makesetup =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/makesetup,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** makesetup 2000/07/07 16:21:31 1.25 --- makesetup 2000/07/23 00:02:15 1.26 *************** *** 24,28 **** # - insert an identifying comment at the start # - for each mentioned in Setup before *noconfig*: ! # + insert 'extern void init();' before MARKER 1 # + insert '{"", initmodule},' before MARKER 2 # --- 24,28 ---- # - insert an identifying comment at the start # - for each mentioned in Setup before *noconfig*: ! # + insert 'extern void init(void);' before MARKER 1 # + insert '{"", initmodule},' before MARKER 2 # *************** *** 235,239 **** for mod in $MODS do ! EXTDECLS="${EXTDECLS}extern void init$mod();$NL" INITBITS="${INITBITS} {\"$mod\", init$mod},$NL" done --- 235,239 ---- for mod in $MODS do ! EXTDECLS="${EXTDECLS}extern void init$mod(void);$NL" INITBITS="${INITBITS} {\"$mod\", init$mod},$NL" done From python-dev@python.org Sun Jul 23 10:20:11 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 23 Jul 2000 02:20:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python import.c,2.143,2.144 Message-ID: <200007230920.CAA31410@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv31316/Python Modified Files: import.c Log Message: Oops. One of last nights ANSIfication patches accidentily upped the bytecode MAGIC number. When updating it next time, be sure it's higher than 50715 * constants. (Shouldn't be a problem if everyone keeps to the proper algorithm.) Index: import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.143 retrieving revision 2.144 diff -C2 -r2.143 -r2.144 *** import.c 2000/07/22 23:38:01 2.143 --- import.c 2000/07/23 09:20:08 2.144 *************** *** 67,71 **** added to the .pyc file header? */ /* New way to come up with the magic number: (YEAR-1995), MONTH, DAY */ ! #define MAGIC (50715 | ((long)'\r'<<16) | ((long)'\n'<<24)) /* Magic word as global; note that _PyImport_Init() can change the --- 67,71 ---- added to the .pyc file header? */ /* New way to come up with the magic number: (YEAR-1995), MONTH, DAY */ ! #define MAGIC (50428 | ((long)'\r'<<16) | ((long)'\n'<<24)) /* Magic word as global; note that _PyImport_Init() can change the From python-dev@python.org Sun Jul 23 17:19:11 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Sun, 23 Jul 2000 09:19:11 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html at.gif,1.3,1.4 Message-ID: <200007231619.JAA07642@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv7606 Modified Files: at.gif Log Message: changed at graphics to one proposed by Vladimir (<- thanx a lot!) Index: at.gif =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/at.gif,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 Binary files /tmp/cvsE4aNBG and /tmp/cvsGyJy5c differ From python-dev@python.org Sun Jul 23 19:10:20 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 23 Jul 2000 11:10:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules signalmodule.c,2.48,2.49 Message-ID: <200007231810.LAA29198@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv28920/python/dist/src/Modules Modified Files: signalmodule.c Log Message: Recent ANSIfication introduced a couple instances of #if RETSIGTYPE != void That isn't C, and MSVC properly refuses to compile it. Introduced new Py_RETURN_FROM_SIGNAL_HANDLER macro in pyport.h to expand to the correct thing based on RETSIGTYPE. However, only void is ANSI! Do we still have platforms that return int? The Unix config mess appears to #define RETSIGTYPE by magic without being asked to, so I assume it's "a problem" across Unices still. Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.48 retrieving revision 2.49 diff -C2 -r2.48 -r2.49 *** signalmodule.c 2000/07/22 23:49:30 2.48 --- signalmodule.c 2000/07/23 18:10:18 2.49 *************** *** 144,150 **** #endif signal(sig_num, signal_handler); ! #if RETSIGTYPE != void ! return 0; ! #endif } --- 144,148 ---- #endif signal(sig_num, signal_handler); ! Py_RETURN_FROM_SIGNAL_HANDLER(0); } From python-dev@python.org Sun Jul 23 19:10:20 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 23 Jul 2000 11:10:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include pyport.h,2.2,2.3 Message-ID: <200007231810.LAA29197@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv28920/python/dist/src/Include Modified Files: pyport.h Log Message: Recent ANSIfication introduced a couple instances of #if RETSIGTYPE != void That isn't C, and MSVC properly refuses to compile it. Introduced new Py_RETURN_FROM_SIGNAL_HANDLER macro in pyport.h to expand to the correct thing based on RETSIGTYPE. However, only void is ANSI! Do we still have platforms that return int? The Unix config mess appears to #define RETSIGTYPE by magic without being asked to, so I assume it's "a problem" across Unices still. Index: pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** pyport.h 2000/07/10 04:59:49 2.2 --- pyport.h 2000/07/23 18:10:16 2.3 *************** *** 12,16 **** /************************************************************************** Symbols and macros to supply platform-independent interfaces to basic ! C-language operations whose spellings vary across platforms. Please try to make documentation here as clear as possible: by definition, --- 12,16 ---- /************************************************************************** Symbols and macros to supply platform-independent interfaces to basic ! C language & library operations whose spellings vary across platforms. Please try to make documentation here as clear as possible: by definition, *************** *** 23,26 **** --- 23,31 ---- signed integral type and i < 0. Used in: Py_ARITHMETIC_RIGHT_SHIFT + + RETSIGTYPE + Meaning: Expands to void or int, depending on what the platform wants + signal handlers to return. Note that only void is ANSI! + Used in: Py_RETURN_FROM_SIGNAL_HANDLER **************************************************************************/ *************** *** 50,53 **** --- 55,77 ---- #define Py_ARITHMETIC_RIGHT_SHIFT(TYPE, I, J) ((I) >> (J)) #endif + + /* Py_FORCE_EXPANSION + * "Simply" returns its argument. However, macro expansions within the + * argument are evaluated. This unfortunate trickery is needed to get + * token-pasting to work as desired in some cases. + */ + #define Py_FORCE_EXPANSION(X) X + + /* Py_RETURN_FROM_SIGNAL_HANDLER + * The return from a signal handler varies depending on whether RETSIGTYPE + * is int or void. The macro Py_RETURN_FROM_SIGNAL_HANDLER(VALUE) expands + * to + * return VALUE + * if RETSIGTYPE is int, else to nothing if RETSIGTYPE is void. + */ + #define int_PySIGRETURN(VALUE) return VALUE + #define void_PySIGRETURN(VALUE) + #define Py_RETURN_FROM_SIGNAL_HANDLER(VALUE) \ + Py_FORCE_EXPANSION(RETSIGTYPE) ## _PySIGRETURN(VALUE) #ifdef __cplusplus From python-dev@python.org Sun Jul 23 19:10:20 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 23 Jul 2000 11:10:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser intrcheck.c,2.35,2.36 Message-ID: <200007231810.LAA29200@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv28920/python/dist/src/Parser Modified Files: intrcheck.c Log Message: Recent ANSIfication introduced a couple instances of #if RETSIGTYPE != void That isn't C, and MSVC properly refuses to compile it. Introduced new Py_RETURN_FROM_SIGNAL_HANDLER macro in pyport.h to expand to the correct thing based on RETSIGTYPE. However, only void is ANSI! Do we still have platforms that return int? The Unix config mess appears to #define RETSIGTYPE by magic without being asked to, so I assume it's "a problem" across Unices still. Index: intrcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/intrcheck.c,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** intrcheck.c 2000/07/22 23:33:22 2.35 --- intrcheck.c 2000/07/23 18:10:18 2.36 *************** *** 169,175 **** signal(SIGINT, intcatcher); Py_AddPendingCall(checksignals_witharg, NULL); ! #if RETSIGTYPE != void ! return 0; ! #endif } --- 169,173 ---- signal(SIGINT, intcatcher); Py_AddPendingCall(checksignals_witharg, NULL); ! Py_RETURN_FROM_SIGNAL_HANDLER(0); } From python-dev@python.org Sun Jul 23 19:24:09 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 23 Jul 2000 11:24:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python marshal.c,1.53,1.54 Message-ID: <200007231824.LAA30162@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv29896/Python Modified Files: marshal.c Log Message: -- changed w_more to take an integer instead of a char (this is what the callers expect). Index: marshal.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/marshal.c,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -r1.53 -r1.54 *** marshal.c 2000/07/22 18:47:25 1.53 --- marshal.c 2000/07/23 18:24:06 1.54 *************** *** 56,60 **** static void ! w_more(char c, WFILE *p) { int size, newsize; --- 56,60 ---- static void ! w_more(int c, WFILE *p) { int size, newsize; *************** *** 70,74 **** p->end = PyString_AS_STRING((PyStringObject *)p->str) + newsize; ! *p->ptr++ = c; } } --- 70,74 ---- p->end = PyString_AS_STRING((PyStringObject *)p->str) + newsize; ! *p->ptr++ = (char) c; } } From python-dev@python.org Sun Jul 23 19:33:57 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 23 Jul 2000 11:33:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules signalmodule.c,2.49,2.50 Message-ID: <200007231833.LAA30730@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv30688/python/dist/src/modules Modified Files: signalmodule.c Log Message: Missed a return from a signal handler -- thanks to /F for pointing it out! Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.49 retrieving revision 2.50 diff -C2 -r2.49 -r2.50 *** signalmodule.c 2000/07/23 18:10:18 2.49 --- signalmodule.c 2000/07/23 18:33:52 2.50 *************** *** 137,141 **** Don't clear the 'func' field as it is our pointer to the Python handler... */ ! return; } #endif --- 137,141 ---- Don't clear the 'func' field as it is our pointer to the Python handler... */ ! Py_RETURN_FROM_SIGNAL_HANDLER(0); } #endif From python-dev@python.org Sun Jul 23 20:28:37 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 23 Jul 2000 12:28:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include Python.h,2.23,2.24 pyport.h,2.3,2.4 Message-ID: <200007231928.MAA08886@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv8641/python/dist/src/Include Modified Files: Python.h pyport.h Log Message: Included assert.h in Python.h -- it's absurd that this basic tool of good C practice hasn't been available to everything all along. Added Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) macro to pyport.h; this just casts VALUE from type WIDE to type NARROW, but assert-fails if Py_DEBUG is defined and info is lost due to casting. Replaced a line in Fredrik's fix to marshal.c to use the new macro. Index: Python.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** Python.h 2000/07/12 17:26:09 2.23 --- Python.h 2000/07/23 19:28:34 2.24 *************** *** 32,36 **** #include "patchlevel.h" #include "config.h" - #include "pyport.h" /* config.h may or may not define DL_IMPORT */ --- 32,35 ---- *************** *** 52,55 **** --- 51,57 ---- #include #endif + #include + + #include "pyport.h" #include "myproto.h" Index: pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** pyport.h 2000/07/23 18:10:16 2.3 --- pyport.h 2000/07/23 19:28:34 2.4 *************** *** 28,31 **** --- 28,35 ---- signal handlers to return. Note that only void is ANSI! Used in: Py_RETURN_FROM_SIGNAL_HANDLER + + Py_DEBUG + Meaning: Extra checks compiled in for debug mode. + Used in: Py_SAFE_DOWNCAST **************************************************************************/ *************** *** 74,77 **** --- 78,94 ---- #define Py_RETURN_FROM_SIGNAL_HANDLER(VALUE) \ Py_FORCE_EXPANSION(RETSIGTYPE) ## _PySIGRETURN(VALUE) + + /* Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) + * Cast VALUE to type NARROW from type WIDE. In Py_DEBUG mode, this + * assert-fails if any information is lost. + * Caution: + * VALUE may be evaluated more than once. + */ + #ifdef Py_DEBUG + #define Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) \ + (assert((WIDE)(NARROW)(VALUE) == (VALUE)), (NARROW)(VALUE)) + #else + #define Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) (NARROW)(VALUE) + #endif #ifdef __cplusplus From python-dev@python.org Sun Jul 23 20:28:37 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 23 Jul 2000 12:28:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python marshal.c,1.54,1.55 Message-ID: <200007231928.MAA08887@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv8641/python/dist/src/Python Modified Files: marshal.c Log Message: Included assert.h in Python.h -- it's absurd that this basic tool of good C practice hasn't been available to everything all along. Added Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) macro to pyport.h; this just casts VALUE from type WIDE to type NARROW, but assert-fails if Py_DEBUG is defined and info is lost due to casting. Replaced a line in Fredrik's fix to marshal.c to use the new macro. Index: marshal.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/marshal.c,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -r1.54 -r1.55 *** marshal.c 2000/07/23 18:24:06 1.54 --- marshal.c 2000/07/23 19:28:35 1.55 *************** *** 70,74 **** p->end = PyString_AS_STRING((PyStringObject *)p->str) + newsize; ! *p->ptr++ = (char) c; } } --- 70,74 ---- p->end = PyString_AS_STRING((PyStringObject *)p->str) + newsize; ! *p->ptr++ = Py_SAFE_DOWNCAST(c, int, char); } } From python-dev@python.org Sun Jul 23 20:47:15 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 23 Jul 2000 12:47:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.159,2.160 Message-ID: <200007231947.MAA10033@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv9617/Modules Modified Files: posixmodule.c Log Message: -- added code to the new Windows popen functions to make close return the exit code. Only works on Windows NT/2000, due to limitations in the Win9X shell. (based on patch #100941 by David Bolen) Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.159 retrieving revision 2.160 diff -C2 -r2.159 -r2.160 *** posixmodule.c 2000/07/22 23:57:55 2.159 --- posixmodule.c 2000/07/23 19:47:12 2.160 *************** *** 2118,2121 **** --- 2118,2122 ---- * Written by Bill Tutt . Minor tweaks * and 2.0 integration by Fredrik Lundh + * Return code handling by David Bolen. */ *************** *** 2131,2135 **** --- 2132,2145 ---- static PyObject *_PyPopen(char *, int, int); + static int _PyPclose(FILE *file); + /* + * Internal dictionary mapping popen* file pointers to process handles, + * in order to maintain a link to the process handle until the file is + * closed, at which point the process exit code is returned to the caller. + */ + static PyObject *_PyPopenProcs = NULL; + + /* popen that works from a GUI. * *************** *** 2286,2290 **** static int ! _PyPopenCreateProcess(char *cmdstring, HANDLE hStdin, HANDLE hStdout, --- 2296,2300 ---- static int ! _PyPopenCreateProcess(char *cmdstring, FILE *file, HANDLE hStdin, HANDLE hStdout, *************** *** 2362,2367 **** &piProcInfo) ) { /* Close the handles now so anyone waiting is woken. */ - CloseHandle(piProcInfo.hProcess); CloseHandle(piProcInfo.hThread); return TRUE; } --- 2372,2397 ---- &piProcInfo) ) { /* Close the handles now so anyone waiting is woken. */ CloseHandle(piProcInfo.hThread); + + /* + * Try to insert our process handle into the internal + * dictionary so we can find it later when trying + * to close this file. + */ + if (!_PyPopenProcs) + _PyPopenProcs = PyDict_New(); + if (_PyPopenProcs) { + PyObject *hProcessObj, *fileObj; + + hProcessObj = PyLong_FromVoidPtr(piProcInfo.hProcess); + fileObj = PyLong_FromVoidPtr(file); + + if (!hProcessObj || !fileObj || + PyDict_SetItem(_PyPopenProcs, + fileObj, hProcessObj) < 0) { + /* Insert failure - close handle to prevent leak */ + CloseHandle(piProcInfo.hProcess); + } + } return TRUE; } *************** *** 2440,2444 **** fd1 = _open_osfhandle((long)hChildStdinWrDup, mode); f1 = _fdopen(fd1, "w"); ! f = PyFile_FromFile(f1, cmdstring, "w", fclose); PyFile_SetBufSize(f, 0); /* We don't care about these pipes anymore, so close them. */ --- 2470,2474 ---- fd1 = _open_osfhandle((long)hChildStdinWrDup, mode); f1 = _fdopen(fd1, "w"); ! f = PyFile_FromFile(f1, cmdstring, "w", _PyPclose); PyFile_SetBufSize(f, 0); /* We don't care about these pipes anymore, so close them. */ *************** *** 2451,2455 **** fd1 = _open_osfhandle((long)hChildStdoutRdDup, mode); f1 = _fdopen(fd1, "r"); ! f = PyFile_FromFile(f1, cmdstring, "r", fclose); PyFile_SetBufSize(f, 0); /* We don't care about these pipes anymore, so close them. */ --- 2481,2485 ---- fd1 = _open_osfhandle((long)hChildStdoutRdDup, mode); f1 = _fdopen(fd1, "r"); ! f = PyFile_FromFile(f1, cmdstring, "r", _PyPclose); PyFile_SetBufSize(f, 0); /* We don't care about these pipes anymore, so close them. */ *************** *** 2462,2466 **** fd1 = _open_osfhandle((long)hChildStdoutRdDup, mode); f1 = _fdopen(fd1, "rb"); ! f = PyFile_FromFile(f1, cmdstring, "rb", fclose); PyFile_SetBufSize(f, 0); /* We don't care about these pipes anymore, so close them. */ --- 2492,2496 ---- fd1 = _open_osfhandle((long)hChildStdoutRdDup, mode); f1 = _fdopen(fd1, "rb"); ! f = PyFile_FromFile(f1, cmdstring, "rb", _PyPclose); PyFile_SetBufSize(f, 0); /* We don't care about these pipes anymore, so close them. */ *************** *** 2473,2477 **** fd1 = _open_osfhandle((long)hChildStdinWrDup, mode); f1 = _fdopen(fd1, "wb"); ! f = PyFile_FromFile(f1, cmdstring, "wb", fclose); PyFile_SetBufSize(f, 0); /* We don't care about these pipes anymore, so close them. */ --- 2503,2507 ---- fd1 = _open_osfhandle((long)hChildStdinWrDup, mode); f1 = _fdopen(fd1, "wb"); ! f = PyFile_FromFile(f1, cmdstring, "wb", _PyPclose); PyFile_SetBufSize(f, 0); /* We don't care about these pipes anymore, so close them. */ *************** *** 2500,2504 **** fd2 = _open_osfhandle((long)hChildStdoutRdDup, mode); f2 = _fdopen(fd2, m1); ! p1 = PyFile_FromFile(f1, cmdstring, m2, fclose); PyFile_SetBufSize(p1, 0); p2 = PyFile_FromFile(f2, cmdstring, m1, fclose); --- 2530,2534 ---- fd2 = _open_osfhandle((long)hChildStdoutRdDup, mode); f2 = _fdopen(fd2, m1); ! p1 = PyFile_FromFile(f1, cmdstring, m2, _PyPclose); PyFile_SetBufSize(p1, 0); p2 = PyFile_FromFile(f2, cmdstring, m1, fclose); *************** *** 2531,2535 **** fd3 = _open_osfhandle((long)hChildStderrRdDup, mode); f3 = _fdopen(fd3, m1); ! p1 = PyFile_FromFile(f1, cmdstring, m2, fclose); p2 = PyFile_FromFile(f2, cmdstring, m1, fclose); p3 = PyFile_FromFile(f3, cmdstring, m1, fclose); --- 2561,2565 ---- fd3 = _open_osfhandle((long)hChildStderrRdDup, mode); f3 = _fdopen(fd3, m1); ! p1 = PyFile_FromFile(f1, cmdstring, m2, _PyPclose); p2 = PyFile_FromFile(f2, cmdstring, m1, fclose); p3 = PyFile_FromFile(f3, cmdstring, m1, fclose); *************** *** 2544,2547 **** --- 2574,2578 ---- if (n == POPEN_4) { if (!_PyPopenCreateProcess(cmdstring, + f1, hChildStdinRd, hChildStdoutWr, *************** *** 2551,2554 **** --- 2582,2586 ---- else { if (!_PyPopenCreateProcess(cmdstring, + f1, hChildStdinRd, hChildStdoutWr, *************** *** 2573,2576 **** --- 2605,2658 ---- return f; + } + + /* + * Wrapper for fclose() to use for popen* files, so we can retrieve the + * exit code for the child process and return as a result of the close. + */ + static int _PyPclose(FILE *file) + { + int result = 0; + DWORD exit_code; + HANDLE hProcess; + PyObject *hProcessObj, *fileObj; + + if (_PyPopenProcs) { + fileObj = PyLong_FromVoidPtr(file); + if (fileObj) { + hProcessObj = PyDict_GetItem(_PyPopenProcs, fileObj); + if (hProcessObj) { + hProcess = PyLong_AsVoidPtr(hProcessObj); + if (GetExitCodeProcess(hProcess, &exit_code)) { + /* Possible truncation here in 16-bit environments, but + * real exit codes are just the lower byte in any event. + */ + result = exit_code; + if (result == STILL_ACTIVE) + result = 0; /* Minimize confusion */ + } else { + /* No good way to bubble up an error, so instead we just + * return the Windows last error shifted above standard + * exit codes. This will truncate in 16-bits but should + * be fine in 32 and at least distinguishes the problem. + */ + result = (GetLastError() << 8); + } + + /* Free up the native handle at this point */ + CloseHandle(hProcess); + + /* Remove from dictionary and flush dictionary if empty */ + PyDict_DelItem(_PyPopenProcs, fileObj); + if (PyDict_Size(_PyPopenProcs) == 0) { + Py_DECREF(_PyPopenProcs); + _PyPopenProcs = NULL; + } + } /* if hProcessObj */ + } /* if fileObj */ + } /* if _PyPopenProcs */ + + fclose(file); + return result; } #else From python-dev@python.org Sun Jul 23 22:18:11 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 23 Jul 2000 14:18:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include pyport.h,2.4,2.5 Message-ID: <200007232118.OAA04639@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv4368/python/dist/src/Include Modified Files: pyport.h Log Message: Removed all instances of RETSIGTYPE from the source code: signal handlers "return void", according to ANSI C. Removed the new Py_RETURN_FROM_SIGNAL_HANDLER macro. Left RETSIGTYPE in the config stuff, because it's not clear to me that others aren't relying on it (e.g., extension modules). Index: pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** pyport.h 2000/07/23 19:28:34 2.4 --- pyport.h 2000/07/23 21:18:08 2.5 *************** *** 24,32 **** Used in: Py_ARITHMETIC_RIGHT_SHIFT - RETSIGTYPE - Meaning: Expands to void or int, depending on what the platform wants - signal handlers to return. Note that only void is ANSI! - Used in: Py_RETURN_FROM_SIGNAL_HANDLER - Py_DEBUG Meaning: Extra checks compiled in for debug mode. --- 24,27 ---- *************** *** 66,81 **** */ #define Py_FORCE_EXPANSION(X) X - - /* Py_RETURN_FROM_SIGNAL_HANDLER - * The return from a signal handler varies depending on whether RETSIGTYPE - * is int or void. The macro Py_RETURN_FROM_SIGNAL_HANDLER(VALUE) expands - * to - * return VALUE - * if RETSIGTYPE is int, else to nothing if RETSIGTYPE is void. - */ - #define int_PySIGRETURN(VALUE) return VALUE - #define void_PySIGRETURN(VALUE) - #define Py_RETURN_FROM_SIGNAL_HANDLER(VALUE) \ - Py_FORCE_EXPANSION(RETSIGTYPE) ## _PySIGRETURN(VALUE) /* Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) --- 61,64 ---- From python-dev@python.org Sun Jul 23 22:18:11 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 23 Jul 2000 14:18:11 -0700 Subject: [Python-checkins] CVS: python/dist/src README,1.88,1.89 Message-ID: <200007232118.OAA04635@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv4368/python/dist/src Modified Files: README Log Message: Removed all instances of RETSIGTYPE from the source code: signal handlers "return void", according to ANSI C. Removed the new Py_RETURN_FROM_SIGNAL_HANDLER macro. Left RETSIGTYPE in the config stuff, because it's not clear to me that others aren't relying on it (e.g., extension modules). Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -r1.88 -r1.89 *** README 2000/07/01 00:34:39 1.88 --- README 2000/07/23 21:18:08 1.89 *************** *** 653,659 **** configuration of your system. Most symbols must simply be defined as 1 only if the corresponding feature is present and can be left alone ! otherwise; however RETSIGTYPE must always be defined, either as int or ! as void, and the *_t type symbols must be defined as some variant of ! int if they need to be defined at all. --- 653,658 ---- configuration of your system. Most symbols must simply be defined as 1 only if the corresponding feature is present and can be left alone ! otherwise; however the *_t type symbols must be defined as some variant ! of int if they need to be defined at all. From python-dev@python.org Sun Jul 23 22:18:11 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 23 Jul 2000 14:18:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser intrcheck.c,2.36,2.37 Message-ID: <200007232118.OAA04648@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv4368/python/dist/src/Parser Modified Files: intrcheck.c Log Message: Removed all instances of RETSIGTYPE from the source code: signal handlers "return void", according to ANSI C. Removed the new Py_RETURN_FROM_SIGNAL_HANDLER macro. Left RETSIGTYPE in the config stuff, because it's not clear to me that others aren't relying on it (e.g., extension modules). Index: intrcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/intrcheck.c,v retrieving revision 2.36 retrieving revision 2.37 diff -C2 -r2.36 -r2.37 *** intrcheck.c 2000/07/23 18:10:18 2.36 --- intrcheck.c 2000/07/23 21:18:09 2.37 *************** *** 150,154 **** } ! static RETSIGTYPE intcatcher(int sig) { --- 150,154 ---- } ! static void intcatcher(int sig) { *************** *** 169,176 **** signal(SIGINT, intcatcher); Py_AddPendingCall(checksignals_witharg, NULL); - Py_RETURN_FROM_SIGNAL_HANDLER(0); } ! static RETSIGTYPE (*old_siginthandler)(int) = SIG_DFL; void --- 169,175 ---- signal(SIGINT, intcatcher); Py_AddPendingCall(checksignals_witharg, NULL); } ! static void (*old_siginthandler)(int) = SIG_DFL; void From python-dev@python.org Sun Jul 23 22:18:11 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 23 Jul 2000 14:18:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules fpectlmodule.c,2.9,2.10 readline.c,2.24,2.25 signalmodule.c,2.50,2.51 Message-ID: <200007232118.OAB04649@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv4368/python/dist/src/Modules Modified Files: fpectlmodule.c readline.c signalmodule.c Log Message: Removed all instances of RETSIGTYPE from the source code: signal handlers "return void", according to ANSI C. Removed the new Py_RETURN_FROM_SIGNAL_HANDLER macro. Left RETSIGTYPE in the config stuff, because it's not clear to me that others aren't relying on it (e.g., extension modules). Index: fpectlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fpectlmodule.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** fpectlmodule.c 1999/04/19 16:50:26 2.9 --- fpectlmodule.c 2000/07/23 21:18:09 2.10 *************** *** 78,82 **** #endif ! typedef RETSIGTYPE Sigfunc(int); static Sigfunc sigfpe_handler; static void fpe_reset(Sigfunc *); --- 78,82 ---- #endif ! typedef void Sigfunc(int); static Sigfunc sigfpe_handler; static void fpe_reset(Sigfunc *); Index: readline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -r2.24 -r2.25 *** readline.c 2000/07/22 23:51:19 2.24 --- readline.c 2000/07/23 21:18:09 2.25 *************** *** 428,438 **** /* ARGSUSED */ ! static RETSIGTYPE onintr(int sig) { longjmp(jbuf, 1); - #if RETSIGTYPE != void - return 0; - #endif } --- 428,435 ---- /* ARGSUSED */ ! static void onintr(int sig) { longjmp(jbuf, 1); } *************** *** 445,449 **** size_t n; char *p, *q; ! RETSIGTYPE (*old_inthandler)(int); old_inthandler = signal(SIGINT, onintr); if (setjmp(jbuf)) { --- 442,446 ---- size_t n; char *p, *q; ! void (*old_inthandler)(int); old_inthandler = signal(SIGINT, onintr); if (setjmp(jbuf)) { Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.50 retrieving revision 2.51 diff -C2 -r2.50 -r2.51 *** signalmodule.c 2000/07/23 18:33:52 2.50 --- signalmodule.c 2000/07/23 21:18:09 2.51 *************** *** 27,31 **** #ifndef SIG_ERR ! #define SIG_ERR ((RETSIGTYPE (*)(int))-1) #endif --- 27,31 ---- #ifndef SIG_ERR ! #define SIG_ERR ((void (*)(int))-1) #endif *************** *** 93,97 **** static PyObject *IntHandler; ! static RETSIGTYPE (*old_siginthandler)(int) = SIG_DFL; --- 93,97 ---- static PyObject *IntHandler; ! static void (*old_siginthandler)(int) = SIG_DFL; *************** *** 118,122 **** } ! static RETSIGTYPE signal_handler(int sig_num) { --- 118,122 ---- } ! static void signal_handler(int sig_num) { *************** *** 137,141 **** Don't clear the 'func' field as it is our pointer to the Python handler... */ ! Py_RETURN_FROM_SIGNAL_HANDLER(0); } #endif --- 137,141 ---- Don't clear the 'func' field as it is our pointer to the Python handler... */ ! return; } #endif *************** *** 144,148 **** #endif signal(sig_num, signal_handler); - Py_RETURN_FROM_SIGNAL_HANDLER(0); } --- 144,147 ---- *************** *** 199,203 **** int sig_num; PyObject *old_handler; ! RETSIGTYPE (*func)(int); if (!PyArg_Parse(args, "(iO)", &sig_num, &obj)) return NULL; --- 198,202 ---- int sig_num; PyObject *old_handler; ! void (*func)(int); if (!PyArg_Parse(args, "(iO)", &sig_num, &obj)) return NULL; *************** *** 356,360 **** Handlers[0].tripped = 0; for (i = 1; i < NSIG; i++) { ! RETSIGTYPE (*t)(int); #ifdef HAVE_SIGACTION struct sigaction act; --- 355,359 ---- Handlers[0].tripped = 0; for (i = 1; i < NSIG; i++) { ! void (*t)(int); #ifdef HAVE_SIGACTION struct sigaction act; From python-dev@python.org Sun Jul 23 22:46:21 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 23 Jul 2000 14:46:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.27,2.28 sre.h,2.14,2.15 Message-ID: <200007232146.OAA06487@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6140/Modules Modified Files: _sre.c sre.h Log Message: -- SRE 0.9.6 sync. this includes: + added "regs" attribute + fixed "pos" and "endpos" attributes + reset "lastindex" and "lastgroup" in scanner methods + removed (?P#id) syntax; the "lastindex" and "lastgroup" attributes are now always set + removed string module dependencies in sre_parse + better debugging support in sre_parse + various tweaks to build under 1.5.2 Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.27 retrieving revision 2.28 diff -C2 -r2.27 -r2.28 *** _sre.c 2000/07/21 06:00:07 2.27 --- _sre.c 2000/07/23 21:46:17 2.28 *************** *** 1,4 **** ! /* -*- Mode: C; tab-width: 4 -*- ! * * Secret Labs' Regular Expression Engine * --- 1,3 ---- ! /* * Secret Labs' Regular Expression Engine * *************** *** 6,27 **** [...3493 lines suppressed...] *** 2100,2108 **** init_sre(void) { ! /* Patch object types */ ! Pattern_Type.ob_type = Match_Type.ob_type = Scanner_Type.ob_type = &PyType_Type; ! Py_InitModule("_" MODULE, _functions); } --- 2193,2201 ---- init_sre(void) { ! /* Patch object types */ ! Pattern_Type.ob_type = Match_Type.ob_type = Scanner_Type.ob_type = &PyType_Type; ! Py_InitModule("_" MODULE, _functions); } Index: sre.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sre.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** sre.h 2000/07/03 21:31:48 2.14 --- sre.h 2000/07/23 21:46:17 2.15 *************** *** 1,3 **** --- 1,4 ---- /* + * * Secret Labs' Regular Expression Engine * *************** *** 34,37 **** --- 35,39 ---- PyObject_VAR_HEAD PyObject* string; /* link to the target string */ + PyObject* regs; /* cached list of matching spans */ PatternObject* pattern; /* link to the regex (pattern) object */ int pos, endpos; /* current target slice */ *************** *** 61,64 **** --- 63,69 ---- void* start; /* start of current slice */ void* end; /* end of original string */ + /* attributes for the match object */ + PyObject* string; + int pos, endpos; /* character size */ int charsize; *************** *** 79,83 **** PyObject_HEAD PyObject* pattern; - PyObject* string; SRE_STATE state; } ScannerObject; --- 84,87 ---- From python-dev@python.org Sun Jul 23 22:46:21 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 23 Jul 2000 14:46:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_sre,1.6,1.7 Message-ID: <200007232146.OAA06486@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv6140/Lib/test/output Modified Files: test_sre Log Message: -- SRE 0.9.6 sync. this includes: + added "regs" attribute + fixed "pos" and "endpos" attributes + reset "lastindex" and "lastgroup" in scanner methods + removed (?P#id) syntax; the "lastindex" and "lastgroup" attributes are now always set + removed string module dependencies in sre_parse + better debugging support in sre_parse + various tweaks to build under 1.5.2 Index: test_sre =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_sre,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** test_sre 2000/07/03 21:31:48 1.6 --- test_sre 2000/07/23 21:46:17 1.7 *************** *** 2,4 **** --- 2,6 ---- === Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A') === Failed incorrectly ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a') + === grouping error ('(a)(b)c|ab', 'ab', 0, 'found+"-"+g1+"-"+g2', 'ab-None-None') 'ab-None-b' should be 'ab-None-None' + === grouping error ('(a)+b|aac', 'aac', 0, 'found+"-"+g1', 'aac-None') 'aac-a' should be 'aac-None' === Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A') From python-dev@python.org Sun Jul 23 22:46:21 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 23 Jul 2000 14:46:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre.py,1.20,1.21 sre_compile.py,1.25,1.26 sre_constants.py,1.17,1.18 sre_parse.py,1.25,1.26 Message-ID: <200007232146.OAA06488@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv6140/Lib Modified Files: sre.py sre_compile.py sre_constants.py sre_parse.py Log Message: -- SRE 0.9.6 sync. this includes: + added "regs" attribute + fixed "pos" and "endpos" attributes + reset "lastindex" and "lastgroup" in scanner methods + removed (?P#id) syntax; the "lastindex" and "lastgroup" attributes are now always set + removed string module dependencies in sre_parse + better debugging support in sre_parse + various tweaks to build under 1.5.2 Index: sre.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** sre.py 2000/07/02 22:59:57 1.20 --- sre.py 2000/07/23 21:46:17 1.21 *************** *** 11,17 **** --- 11,21 ---- # + # FIXME: change all FIXME's to XXX ;-) + import sre_compile import sre_parse + import string + # flags I = IGNORECASE = sre_compile.SRE_FLAG_IGNORECASE *************** *** 54,57 **** --- 58,64 ---- return _compile(pattern, flags) + def purge(): + _cache.clear() + def template(pattern, flags=0): return _compile(pattern, flags|T) *************** *** 66,70 **** else: s[i] = "\\" + c ! return pattern[:0].join(s) # -------------------------------------------------------------------- --- 73,77 ---- else: s[i] = "\\" + c ! return _join(s, pattern) # -------------------------------------------------------------------- *************** *** 74,81 **** _MAXCACHE = 100 def _compile(pattern, flags=0): # internal: compile pattern tp = type(pattern) ! if tp not in (type(""), type(u"")): return pattern key = (tp, pattern, flags) --- 81,92 ---- _MAXCACHE = 100 + def _join(seq, sep): + # internal: join into string having the same type as sep + return string.join(seq, sep[:0]) + def _compile(pattern, flags=0): # internal: compile pattern tp = type(pattern) ! if tp not in sre_compile.STRING_TYPES: return pattern key = (tp, pattern, flags) *************** *** 90,97 **** return p - def purge(): - # clear pattern cache - _cache.clear() - def _sub(pattern, template, string, count=0): # internal: pattern.sub implementation hook --- 101,104 ---- *************** *** 121,125 **** n = n + 1 append(string[i:]) ! return string[:0].join(s), n def _split(pattern, string, maxsplit=0): --- 128,132 ---- n = n + 1 append(string[i:]) ! return _join(s, string[:0]), n def _split(pattern, string, maxsplit=0): *************** *** 162,170 **** class Scanner: def __init__(self, lexicon): self.lexicon = lexicon p = [] for phrase, action in lexicon: ! p.append("(?:%s)(?P#%d)" % (phrase, len(p))) ! self.scanner = _compile("|".join(p)) def scan(self, string): result = [] --- 169,185 ---- class Scanner: def __init__(self, lexicon): + from sre_constants import BRANCH, SUBPATTERN, INDEX self.lexicon = lexicon + # combine phrases into a compound pattern p = [] + s = sre_parse.Pattern() for phrase, action in lexicon: ! p.append(sre_parse.SubPattern(s, [ ! (SUBPATTERN, (None, sre_parse.parse(phrase))), ! (INDEX, len(p)) ! ])) ! p = sre_parse.SubPattern(s, [(BRANCH, (None, p))]) ! s.groups = len(p) ! self.scanner = sre_compile.compile(p) def scan(self, string): result = [] Index: sre_compile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** sre_compile.py 2000/07/05 21:14:15 1.25 --- sre_compile.py 2000/07/23 21:46:17 1.26 *************** *** 198,205 **** emit(ATCODES[av]) elif op is BRANCH: - emit(OPCODES[op]) tail = [] for av in av[1]: skip = len(code); emit(0) _compile(code, av, flags) emit(OPCODES[JUMP]) --- 198,206 ---- emit(ATCODES[av]) elif op is BRANCH: tail = [] for av in av[1]: + emit(OPCODES[op]) skip = len(code); emit(0) + emit(MAXCODE) # save mark _compile(code, av, flags) emit(OPCODES[JUMP]) *************** *** 287,295 **** code[skip] = len(code) - skip def compile(p, flags=0): # internal: convert pattern list to internal format # compile, as necessary ! if type(p) in (type(""), type(u"")): import sre_parse pattern = p --- 288,303 ---- code[skip] = len(code) - skip + STRING_TYPES = [type("")] + + try: + STRING_TYPES.append(type(unicode(""))) + except NameError: + pass + def compile(p, flags=0): # internal: convert pattern list to internal format # compile, as necessary ! if type(p) in STRING_TYPES: import sre_parse pattern = p *************** *** 308,311 **** --- 316,321 ---- code.append(OPCODES[SUCCESS]) + + # print code # FIXME: get rid of this limitation! Index: sre_constants.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_constants.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** sre_constants.py 2000/07/16 12:04:30 1.17 --- sre_constants.py 2000/07/23 21:46:17 1.18 *************** *** 173,177 **** SRE_FLAG_TEMPLATE = 1 # template mode (disable backtracking) SRE_FLAG_IGNORECASE = 2 # case insensitive ! SRE_FLAG_LOCALE = 4 # honor system locale SRE_FLAG_MULTILINE = 8 # treat target as multiline string SRE_FLAG_DOTALL = 16 # treat target as a single string --- 173,177 ---- SRE_FLAG_TEMPLATE = 1 # template mode (disable backtracking) SRE_FLAG_IGNORECASE = 2 # case insensitive ! SRE_FLAG_LOCALE = 4 # honour system locale SRE_FLAG_MULTILINE = 8 # treat target as multiline string SRE_FLAG_DOTALL = 16 # treat target as a single string Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** sre_parse.py 2000/07/03 21:31:48 1.25 --- sre_parse.py 2000/07/23 21:46:17 1.26 *************** *** 26,35 **** REPEAT_CHARS = "*+?{" ! DIGITS = tuple(string.digits) OCTDIGITS = tuple("01234567") HEXDIGITS = tuple("0123456789abcdefABCDEF") ! WHITESPACE = tuple(string.whitespace) ESCAPES = { --- 26,35 ---- REPEAT_CHARS = "*+?{" ! DIGITS = tuple("012345689") OCTDIGITS = tuple("01234567") HEXDIGITS = tuple("0123456789abcdefABCDEF") ! WHITESPACE = tuple(" \t\n\r\v\f") ESCAPES = { *************** *** 69,73 **** } ! class State: def __init__(self): self.flags = 0 --- 69,74 ---- } ! class Pattern: ! # master pattern object. keeps track of global attributes def __init__(self): self.flags = 0 *************** *** 89,92 **** --- 90,120 ---- self.data = data self.width = None + def dump(self, level=0): + nl = 1 + for op, av in self.data: + print level*" " + op,; nl = 0 + if op == "in": + # member sublanguage + print; nl = 1 + for op, a in av: + print (level+1)*" " + op, a + elif op == "branch": + print; nl = 1 + i = 0 + for a in av[1]: + if i > 0: + print level*" " + "or" + a.dump(level+1); nl = 1 + i = i + 1 + elif type(av) in (type(()), type([])): + for a in av: + if isinstance(a, SubPattern): + if not nl: print + a.dump(level+1); nl = 1 + else: + print a, ; nl = 0 + else: + print av, ; nl = 0 + if not nl: print def __repr__(self): return repr(self.data) *************** *** 256,264 **** raise error, "bogus escape: %s" % repr(escape) ! def _branch(pattern, items): ! # form a branch operator from a set of items ! subpattern = SubPattern(pattern) # check if all items share a common prefix while 1: --- 284,307 ---- raise error, "bogus escape: %s" % repr(escape) ! def _parse_sub(source, state, nested=1): ! # parse an alternation: a|b|c ! items = [] ! while 1: ! items.append(_parse(source, state)) ! if source.match("|"): ! continue ! if not nested: ! break ! if not source.next or source.match(")"): ! break ! else: ! raise error, "pattern not properly closed" + if len(items) == 1: + return items[0] + + subpattern = SubPattern(state) + # check if all items share a common prefix while 1: *************** *** 286,290 **** else: # we can store this as a character set instead of a ! # branch (FIXME: use a range if possible) set = [] for item in items: --- 329,333 ---- else: # we can store this as a character set instead of a ! # branch (the compiler may optimize this even more) set = [] for item in items: *************** *** 297,302 **** def _parse(source, state): ! ! # parse regular expression pattern into an operator list. subpattern = SubPattern(state) --- 340,344 ---- def _parse(source, state): ! # parse a simple pattern subpattern = SubPattern(state) *************** *** 452,471 **** raise error, "unknown group name" subpattern.append((GROUPREF, gid)) - elif source.match("#"): - index = "" - while 1: - char = source.get() - if char is None: - raise error, "unterminated index" - if char == ")": - break - index = index + char - try: - index = int(index) - if index < 0 or index > MAXREPEAT: - raise ValueError - except ValueError: - raise error, "illegal index" - subpattern.append((INDEX, index)) continue else: --- 494,497 ---- *************** *** 492,511 **** dir = -1 # lookbehind char = source.get() ! b = [] ! while 1: ! p = _parse(source, state) ! if source.next == ")": ! if b: ! b.append(p) ! p = _branch(state, b) ! if char == "=": ! subpattern.append((ASSERT, (dir, p))) ! else: ! subpattern.append((ASSERT_NOT, (dir, p))) ! break ! elif source.match("|"): ! b.append(p) ! else: ! raise error, "pattern not properly closed" else: # flags --- 518,527 ---- dir = -1 # lookbehind char = source.get() ! p = _parse_sub(source, state) ! if char == "=": ! subpattern.append((ASSERT, (dir, p))) ! else: ! subpattern.append((ASSERT_NOT, (dir, p))) ! continue else: # flags *************** *** 514,518 **** if group: # parse group contents - b = [] if group == 2: # anonymous group --- 530,533 ---- *************** *** 520,537 **** else: group = state.getgroup(name) ! while 1: ! p = _parse(source, state) ! if group is not None: ! p.append((INDEX, group)) ! if source.match(")"): ! if b: ! b.append(p) ! p = _branch(state, b) ! subpattern.append((SUBPATTERN, (group, p))) ! break ! elif source.match("|"): ! b.append(p) ! else: ! raise error, "group not properly closed" else: while 1: --- 535,542 ---- else: group = state.getgroup(name) ! p = _parse_sub(source, state) ! subpattern.append((SUBPATTERN, (group, p))) ! if group is not None: ! p.append((INDEX, group)) else: while 1: *************** *** 556,579 **** return subpattern ! def parse(pattern, flags=0): # parse 're' pattern into list of (opcode, argument) tuples ! source = Tokenizer(pattern) ! state = State() ! state.flags = flags ! b = [] ! while 1: ! p = _parse(source, state) ! tail = source.get() ! if tail == "|": ! b.append(p) ! elif tail == ")": ! raise error, "unbalanced parenthesis" ! elif tail is None: ! if b: ! b.append(p) ! p = _branch(state, b) ! break ! else: ! raise error, "bogus characters at end of regular expression" return p --- 561,582 ---- return subpattern ! def parse(str, flags=0): # parse 're' pattern into list of (opcode, argument) tuples ! ! source = Tokenizer(str) ! ! pattern = Pattern() ! pattern.flags = flags ! ! p = _parse_sub(source, pattern, 0) ! ! tail = source.get() ! if tail == ")": ! raise error, "unbalanced parenthesis" ! elif tail: ! raise error, "bogus characters at end of regular expression" ! ! # p.dump() ! return p *************** *** 657,659 **** raise error, "empty group" a(s) ! return sep.join(p) --- 660,662 ---- raise error, "empty group" a(s) ! return string.join(p, sep) From python-dev@python.org Sun Jul 23 23:10:02 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 23 Jul 2000 15:10:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects classobject.c,2.101,2.102 Message-ID: <200007232210.PAA15085@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv15042 Modified Files: classobject.c Log Message: ANSIfy functions that were hiding inside a macro. Index: classobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/classobject.c,v retrieving revision 2.101 retrieving revision 2.102 diff -C2 -r2.101 -r2.102 *** classobject.c 2000/07/16 12:04:31 2.101 --- classobject.c 2000/07/23 22:09:59 2.102 *************** *** 1315,1319 **** #define UNARY(funcname, methodname) \ ! static PyObject *funcname(self) PyInstanceObject *self; { \ static PyObject *o; \ if (o == NULL) o = PyString_InternFromString(methodname); \ --- 1315,1319 ---- #define UNARY(funcname, methodname) \ ! static PyObject *funcname(PyInstanceObject *self) { \ static PyObject *o; \ if (o == NULL) o = PyString_InternFromString(methodname); \ From python-dev@python.org Sun Jul 23 23:21:35 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 23 Jul 2000 15:21:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.171,2.172 Message-ID: <200007232221.PAA15801@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv15788/Python Modified Files: bltinmodule.c Log Message: Another missed ansification. Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.171 retrieving revision 2.172 diff -C2 -r2.171 -r2.172 *** bltinmodule.c 2000/07/22 18:47:25 2.171 --- bltinmodule.c 2000/07/23 22:21:32 2.172 *************** *** 1583,1590 **** */ static long ! get_len_of_range(lo, hi, step) ! long lo; ! long hi; ! long step; /* must be > 0 */ { /* ------------------------------------------------------------- --- 1583,1587 ---- */ static long ! get_len_of_range(long lo, long hi, long step) { /* ------------------------------------------------------------- From python-dev@python.org Mon Jul 24 02:45:15 2000 From: python-dev@python.org (Mark Hammond) Date: Sun, 23 Jul 2000 18:45:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.119,1.120 Message-ID: <200007240145.SAA17195@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv17167 Modified Files: socketmodule.c Log Message: Patch #100926 - Better error messages for socket exceptions on Windows. [Slight style differences from posted patch] Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.119 retrieving revision 1.120 diff -C2 -r1.119 -r1.120 *** socketmodule.c 2000/07/22 23:57:55 1.119 --- socketmodule.c 2000/07/24 01:45:11 1.120 *************** *** 232,238 **** { #ifdef MS_WINDOWS ! if (WSAGetLastError()) { PyObject *v; ! v = Py_BuildValue("(is)", WSAGetLastError(), "winsock error"); if (v != NULL) { PyErr_SetObject(PySocket_Error, v); --- 232,314 ---- { #ifdef MS_WINDOWS ! int err_no = WSAGetLastError(); ! if (err_no) { ! static struct { int no; const char *msg; } *msgp, msgs[] = { ! { WSAEINTR, "Interrupted system call" }, ! { WSAEBADF, "Bad file descriptor" }, ! { WSAEACCES, "Permission denied" }, ! { WSAEFAULT, "Bad address" }, ! { WSAEINVAL, "Invalid argument" }, ! { WSAEMFILE, "Too many open files" }, ! { WSAEWOULDBLOCK, ! "The socket operation could not complete " ! "without blocking" }, ! { WSAEINPROGRESS, "Operation now in progress" }, ! { WSAEALREADY, "Operation already in progress" }, ! { WSAENOTSOCK, "Socket operation on non-socket" }, ! { WSAEDESTADDRREQ, "Destination address required" }, ! { WSAEMSGSIZE, "Message too long" }, ! { WSAEPROTOTYPE, "Protocol wrong type for socket" }, ! { WSAENOPROTOOPT, "Protocol not available" }, ! { WSAEPROTONOSUPPORT, "Protocol not supported" }, ! { WSAESOCKTNOSUPPORT, "Socket type not supported" }, ! { WSAEOPNOTSUPP, "Operation not supported" }, ! { WSAEPFNOSUPPORT, "Protocol family not supported" }, ! { WSAEAFNOSUPPORT, "Address family not supported" }, ! { WSAEADDRINUSE, "Address already in use" }, ! { WSAEADDRNOTAVAIL, ! "Can't assign requested address" }, ! { WSAENETDOWN, "Network is down" }, ! { WSAENETUNREACH, "Network is unreachable" }, ! { WSAENETRESET, ! "Network dropped connection on reset" }, ! { WSAECONNABORTED, ! "Software caused connection abort" }, ! { WSAECONNRESET, "Connection reset by peer" }, ! { WSAENOBUFS, "No buffer space available" }, ! { WSAEISCONN, "Socket is already connected" }, ! { WSAENOTCONN, "Socket is not connected" }, ! { WSAESHUTDOWN, "Can't send after socket shutdown" }, ! { WSAETOOMANYREFS, ! "Too many references: can't splice" }, ! { WSAETIMEDOUT, "Operation timed out" }, ! { WSAECONNREFUSED, "Connection refused" }, ! { WSAELOOP, "Too many levels of symbolic links" }, ! { WSAENAMETOOLONG, "File name too long" }, ! { WSAEHOSTDOWN, "Host is down" }, ! { WSAEHOSTUNREACH, "No route to host" }, ! { WSAENOTEMPTY, "Directory not empty" }, ! { WSAEPROCLIM, "Too many processes" }, ! { WSAEUSERS, "Too many users" }, ! { WSAEDQUOT, "Disc quota exceeded" }, ! { WSAESTALE, "Stale NFS file handle" }, ! { WSAEREMOTE, "Too many levels of remote in path" }, ! { WSASYSNOTREADY, ! "Network subsystem is unvailable" }, ! { WSAVERNOTSUPPORTED, ! "WinSock version is not supported" }, ! { WSANOTINITIALISED, ! "Successful WSAStartup() not yet performed" }, ! { WSAEDISCON, "Graceful shutdown in progress" }, ! /* Resolver errors */ ! { WSAHOST_NOT_FOUND, "No such host is known" }, ! { WSATRY_AGAIN, "Host not found, or server failed" }, ! { WSANO_RECOVERY, ! "Unexpected server error encountered" }, ! { WSANO_DATA, "Valid name without requested data" }, ! { WSANO_ADDRESS, "No address, look for MX record" }, ! { 0, NULL } ! }; PyObject *v; ! const char *msg = "winsock error"; ! ! for (msgp = msgs; msgp->msg; msgp++) { ! if (err_no == msgp->no) { ! msg = msgp->msg; ! break; ! } ! } ! ! v = Py_BuildValue("(is)", err_no, msg); if (v != NULL) { PyErr_SetObject(PySocket_Error, v); From python-dev@python.org Mon Jul 24 04:28:43 2000 From: python-dev@python.org (Eric S. Raymond) Date: Sun, 23 Jul 2000 20:28:43 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcurses.tex,1.8,1.9 Message-ID: <200007240328.UAA11716@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv11569 Modified Files: libcurses.tex Log Message: First round of curses documentation improvements; correct errors, flesh out entry point descriptions. Index: libcurses.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** libcurses.tex 2000/07/16 19:01:09 1.8 --- libcurses.tex 2000/07/24 03:28:40 1.9 *************** *** 1,7 **** \section{\module{curses} --- ! Terminal independent console handling} \declaremodule{extension}{curses} \sectionauthor{Moshe Zadka}{mzadka@geocities.com} \modulesynopsis{An interface to the curses library.} --- 1,8 ---- \section{\module{curses} --- ! Screen painting and input handling for character-cell terminals} \declaremodule{extension}{curses} \sectionauthor{Moshe Zadka}{mzadka@geocities.com} + \sectionauthor{Eric Raymond}{esr@thyrsus.com} \modulesynopsis{An interface to the curses library.} *************** *** 11,17 **** While curses is most widely used in the \UNIX{} environment, versions ! are available for DOS, OS/2, and possibly other systems as well. The ! extension module has not been tested with all available versions of ! curses. \begin{seealso} --- 12,19 ---- While curses is most widely used in the \UNIX{} environment, versions ! are available for DOS, OS/2, and possibly other systems as well. This ! extension module is designed to match the API of ncurses, an ! open-source curses library hosted on Linux and the BSD variants of ! Unix. \begin{seealso} *************** *** 19,22 **** --- 21,26 ---- characters, regardless of your locale settings.} + \seemodule{curses.textbox}{Editable text widget for curses supporting + Emacs-like bindings.} \seetext{Tutorial material on using curses with Python is available on the Python Web site as Andrew Kuchling's *************** *** 41,49 **** \begin{funcdesc}{baudrate}{} ! Returns the output speed of the terminal in bits per second. \end{funcdesc} \begin{funcdesc}{beep}{} ! Emit a short sound. \end{funcdesc} --- 45,57 ---- \begin{funcdesc}{baudrate}{} ! Returns the output speed of the terminal in bits per second. On ! software terminal emulators it will have a fixed high value. ! Included for historical reasons; in former times, it was used to ! write output loops for time delays and occasionally to change ! interfaces depending on the line speed. \end{funcdesc} \begin{funcdesc}{beep}{} ! Emit a short attention sound. \end{funcdesc} *************** *** 54,58 **** \begin{funcdesc}{cbreak}{} ! Enter cbreak mode. \end{funcdesc} --- 62,71 ---- \begin{funcdesc}{cbreak}{} ! Enter cbreak mode. In cbreak mode (sometimes called ``rare'' mode) ! normal tty line buffering is turned off and characters are available ! to be read one by one. However, unlike raw mode, special characters ! (interrupt, quit, suspend, and flow control) retain their effects on ! the tty driver and calling program. Calling first \function{raw()} ! then \function{cbreak()} leaves the terminal in cbreak mode. \end{funcdesc} *************** *** 76,80 **** invisible, normal, or very visible. If the terminal supports the visibility requested, the previous cursor state is returned; ! otherwise, an exception is raised. \end{funcdesc} --- 89,94 ---- invisible, normal, or very visible. If the terminal supports the visibility requested, the previous cursor state is returned; ! otherwise, an exception is raised. On many terminals, the ``visible'' ! mode is an underline cursor and the ``very visible'' mode is a block cursor. \end{funcdesc} *************** *** 99,107 **** \begin{funcdesc}{doupdate}{} ! Update the screen. \end{funcdesc} \begin{funcdesc}{echo}{} ! Enter echo mode. \end{funcdesc} --- 113,134 ---- \begin{funcdesc}{doupdate}{} ! Update the physical screen. The curses library keeps two data ! structures, one representing the current physical screen contents ! and a virtual screen representing the desired next state. The ! \function{doupdate()} ground updates the physical screen to match the ! virtual screen. ! ! The virtual screen may be updated by a \method{noutrefresh()} call ! after write operations such as \method{addstr()} have been performed ! on a window. The normal \method{refresh()} call is simply ! \method{noutrefresh()} followed by \function{doupdate()}; if you have ! to update multiple windows, you can speed performance and perhaps ! reduce screen flicker by issuing \method{noutrefresh()} calls on ! all windows, followed by a single \function{doupdate()}. \end{funcdesc} \begin{funcdesc}{echo}{} ! Enter echo mode. In echo mode, each character input is echoed to the ! screen as it is entered. \end{funcdesc} *************** *** 111,132 **** \begin{funcdesc}{erasechar}{} ! Returns the user's current erase character. \end{funcdesc} \begin{funcdesc}{filter}{} ! The \function{filter()} routine, if used, must be called before ! \function{initscr()} is called. ! ! The effect is that, during those calls, LINES is set to 1; the ! capabilities clear, cup, cud, cud1, cuu1, cuu, vpa are disabled; and ! the home string is set to the value of cr. \end{funcdesc} \begin{funcdesc}{flash}{} ! Flash the screen. \end{funcdesc} \begin{funcdesc}{flushinp}{} ! Flush all input buffers. \end{funcdesc} --- 138,165 ---- \begin{funcdesc}{erasechar}{} ! Returns the user's current erase character. Under Unix operating ! systems this is a property of the controlling tty of the curses ! program, and is not set by the curses library itself. \end{funcdesc} \begin{funcdesc}{filter}{} ! The \function{filter()} routine, if used, must be called before ! \function{initscr()} is called. The effect is that, during those ! calls, LINES is set to 1; the capabilities clear, cup, cud, cud1, ! cuu1, cuu, vpa are disabled; and the home string is set to the value of cr. ! The effect is that the cursor is confined to the current line, and so ! are screen updates. This may be used for enabling cgaracter-at-a-time ! line editing without touching the rest of the screen. \end{funcdesc} \begin{funcdesc}{flash}{} ! Flash the screen. That is, change it to reverse-video and then change ! it back in a short interval. Some people prefer such as `visible bell' ! to the audible attention signal produced by \function{beep()}. \end{funcdesc} \begin{funcdesc}{flushinp}{} ! Flush all input buffers. This throws away any typeahead that has ! been typed by the user and has not yet been processed by the program. \end{funcdesc} *************** *** 164,168 **** \begin{funcdesc}{has_colors}{} ! Returns true if the terminal can manipulate colors; otherwise, it returns false. \end{funcdesc} --- 197,201 ---- \begin{funcdesc}{has_colors}{} ! Returns true if the terminal can display colors; otherwise, it returns false. \end{funcdesc} *************** *** 170,174 **** \begin{funcdesc}{has_ic}{} Returns true if the terminal has insert- and delete- character ! capabilities. \end{funcdesc} --- 203,208 ---- \begin{funcdesc}{has_ic}{} Returns true if the terminal has insert- and delete- character ! capabilities. This function is included for historical reasons only, ! as all modern software terminal emulators have such capabilities. \end{funcdesc} *************** *** 176,180 **** Returns true if the terminal has insert- and delete-line capabilities, or can simulate them using ! scrolling regions. \end{funcdesc} --- 210,215 ---- Returns true if the terminal has insert- and delete-line capabilities, or can simulate them using ! scrolling regions. This function is included for historical reasons only, ! as all modern software terminal emulators have such capabilities. \end{funcdesc} *************** *** 189,193 **** However, after blocking for \var{tenths} tenths of seconds, an exception is raised if nothing has been typed. The value of ! \var{tenths} must be a number between 1 and 255. Use nocbreak to leave half-delay mode. \end{funcdesc} --- 224,228 ---- However, after blocking for \var{tenths} tenths of seconds, an exception is raised if nothing has been typed. The value of ! \var{tenths} must be a number between 1 and 255. Use \function{nocbreak()} to leave half-delay mode. \end{funcdesc} *************** *** 200,204 **** value between 0 and 1000. When \function{init_color()} is used, all occurrences of that color on the screen immediately change to the new ! definition. \end{funcdesc} --- 235,240 ---- value between 0 and 1000. When \function{init_color()} is used, all occurrences of that color on the screen immediately change to the new ! definition. This function is a no-op on most terminals; it is active ! only if \function{can_change_color()} returns 1. \end{funcdesc} *************** *** 220,236 **** \begin{funcdesc}{isendwin}{} ! Returns true if \function{endwin()} has been called. \end{funcdesc} \begin{funcdesc}{keyname}{k} ! Return the name of the key numbered \var{k}. \end{funcdesc} \begin{funcdesc}{killchar}{} ! Returns the user's current line kill character. \end{funcdesc} \begin{funcdesc}{longname}{} ! Returns a string containing a verbose description of the current terminal. The maximum length of a verbose description is 128 characters. It is defined only after the call to --- 256,280 ---- \begin{funcdesc}{isendwin}{} ! Returns true if \function{endwin()} has been called (that is, the ! curses library has been deinitialized). \end{funcdesc} \begin{funcdesc}{keyname}{k} ! Return the name of the key numbered \var{k}. The name of a key ! generating printable ASCII character is the key's character. The name ! of a control-key combination is a two-character string consisting of a ! caret followed by the corresponding printable ASCII character. The ! name of an alt-key combination (128-255) is a string consisting of the ! prefix `M-' followed by the name of the corresponding ASCII character. \end{funcdesc} \begin{funcdesc}{killchar}{} ! Returns the user's current line kill character. Under Unix operating ! systems this is a property of the controlling tty of the curses ! program, and is not set by the curses library itself. \end{funcdesc} \begin{funcdesc}{longname}{} ! Returns a string containing the terminfo long name field describing the current terminal. The maximum length of a verbose description is 128 characters. It is defined only after the call to *************** *** 239,243 **** \begin{funcdesc}{meta}{yes} ! If \var{yes} is 1, allow 8-bit characters. If \var{yes} is 0, allow only 7-bit chars. \end{funcdesc} --- 283,287 ---- \begin{funcdesc}{meta}{yes} ! If \var{yes} is 1, allow 8-bit characters to be input. If \var{yes} is 0, allow only 7-bit chars. \end{funcdesc} *************** *** 264,281 **** given number of lines and columns. A pad is returned as a window object. - - A pad is like a window, - except that it is not restricted by the screen size, and is not - necessarily associated with a particular part of the screen. - Pads can be used when a large window is needed, and only a part - of the window will be on the screen at one time. Automatic - refreshes of pads (e.g., from scrolling or echoing of - input) do not occur. It is not legal to call wrefresh - with a pad as an argument; the routines prefresh or - pnoutrefresh should be called instead. Note that these - routines require additional parameters to specify the part of - the pad to be displayed and the location on the screen to be - used for the display. \end{funcdesc} --- 308,324 ---- given number of lines and columns. A pad is returned as a window object. + A pad is like a window, except that it is not restricted by the screen + size, and is not necessarily associated with a particular part of the + screen. Pads can be used when a large window is needed, and only a + part of the window will be on the screen at one time. Automatic + refreshes of pads (e.g., from scrolling or echoing of input) do not + occur. The \method{refresh()} and \method{noutrefresh()} methods of a + pad require 6 arguments to specify the part of the pad to be + displayed and the location on the screen to be used for the display. + The arguments are pminrow, pmincol, sminrow, smincol, smaxrow, + smaxcol; the p arguments refer to the upper left corner of the the pad + region to be displayed and the s arguments define a clipping box on + the screen within which the pad region is to be displayed. \end{funcdesc} *************** *** 290,319 **** \begin{funcdesc}{nl}{} ! Enter nl mode. \end{funcdesc} \begin{funcdesc}{nocbreak}{} ! Leave cbreak mode. \end{funcdesc} \begin{funcdesc}{noecho}{} ! Leave echo mode. \end{funcdesc} \begin{funcdesc}{nonl}{} ! Leave nl mode. \end{funcdesc} \begin{funcdesc}{noqiflush}{} ! When the noqiflush routine is used, normal flush of input and ! output queues associated with the INTR, QUIT and SUSP ! characters will not be done. You may want to call ! \function{noqiflush()} in a signal handler if you want output ! to continue as though the interrupt had not occurred, after the ! handler exits. \end{funcdesc} \begin{funcdesc}{noraw}{} ! Leave raw mode. \end{funcdesc} --- 333,370 ---- \begin{funcdesc}{nl}{} ! Enter newline mode. This mode translates the return key into newline ! on input, and translates newline into return and line-feed on output. ! Newline mode is initially on. \end{funcdesc} \begin{funcdesc}{nocbreak}{} ! Leave cbreak mode. Return to normal ``cooked'' mode with line buffering. \end{funcdesc} \begin{funcdesc}{noecho}{} ! Leave echo mode. Echoing of input characters is turned off, \end{funcdesc} \begin{funcdesc}{nonl}{} ! Leave newline mode. Disable translation of return into newline on ! input, and disable low-level translation of newline into ! newline/return on output (but this does not change the behavior of ! addch('\n') which always does the equivalent of return and line feed ! on the virtual screen). With translation off, curses can sometimes speed ! up vertical motion a little; also, it will be able to detect the ! return key on input \end{funcdesc} \begin{funcdesc}{noqiflush}{} ! When the noqiflush routine is used, normal flush of input and ! output queues associated with the INTR, QUIT and SUSP ! characters will not be done. You may want to call ! \function{noqiflush()} in a signal handler if you want output ! to continue as though the interrupt had not occurred, after the ! handler exits. \end{funcdesc} \begin{funcdesc}{noraw}{} ! Leave raw mode. Return to normal ``cooked'' mode with line buffering. \end{funcdesc} *************** *** 330,335 **** \begin{funcdesc}{putp}{string} ! Equivalent to \code{tputs(str, 1, putchar)}. Note that the output of putp always ! goes to standard output. \end{funcdesc} --- 381,387 ---- \begin{funcdesc}{putp}{string} ! Equivalent to \code{tputs(str, 1, putchar)}; emits the value of a ! specified terminfo capability for the current terminal. Note that the ! output of putp always goes to standard output. \end{funcdesc} *************** *** 342,346 **** \begin{funcdesc}{raw}{} ! Enter raw mode. \end{funcdesc} --- 394,401 ---- \begin{funcdesc}{raw}{} ! Enter raw mode. In raw mode, normal line buffering and ! processing of interrupt, quit, suspend, and flow control keys are ! turned off; characters are presented to curses input functions one ! by one. \end{funcdesc} *************** *** 434,437 **** --- 489,493 ---- \ASCII{} code), rather then a Python character (a string of length 1). (This note is true whenever the documentation mentions a character.) + The builtin \function{ord()} is handy for conveying strings to codes. Paint character \var{ch} at \code{(\var{y}, \var{x})} with attributes *************** *** 453,465 **** \begin{methoddesc}{attroff}{attr} ! Turn off attribute \var{attr}. \end{methoddesc} \begin{methoddesc}{attron}{attr} ! Turn on attribute \var{attr}. \end{methoddesc} \begin{methoddesc}{attrset}{attr} ! Set the attributes to \var{attr}. \end{methoddesc} --- 509,524 ---- \begin{methoddesc}{attroff}{attr} ! Remove attribute \var{attr} from the ``background'' set applied to all ! writes to the current window. \end{methoddesc} \begin{methoddesc}{attron}{attr} ! Add attribute \var{attr} from the ``background'' set applied to all ! writes to the current window. \end{methoddesc} \begin{methoddesc}{attrset}{attr} ! Set the ``background'' set of attributes to \var{attr}. This set is ! initially 0 (no attributes). \end{methoddesc} *************** *** 521,525 **** \begin{methoddesc}{clear}{} ! Like \method{erase()}, but also causes the whole screen to be repainted upon next call to \method{refresh()}. \end{methoddesc} --- 580,584 ---- \begin{methoddesc}{clear}{} ! Like \method{erase()}, but also causes the whole window to be repainted upon next call to \method{refresh()}. \end{methoddesc} *************** *** 527,535 **** \begin{methoddesc}{clearok}{yes} If \var{yes} is 1, the next call to \method{refresh()} ! will clear the screen completely. \end{methoddesc} \begin{methoddesc}{clrtobot}{} ! Erase from cursor to the end of the screen: all lines below the cursor are deleted, and then the equivalent of \method{clrtoeol()} is performed. \end{methoddesc} --- 586,594 ---- \begin{methoddesc}{clearok}{yes} If \var{yes} is 1, the next call to \method{refresh()} ! will clear the window completely. \end{methoddesc} \begin{methoddesc}{clrtobot}{} ! Erase from cursor to the end of the window: all lines below the cursor are deleted, and then the equivalent of \method{clrtoeol()} is performed. \end{methoddesc} *************** *** 563,567 **** \begin{methoddesc}{echochar}{ch\optional{, attr}} Add character \var{ch} with attribute \var{attr}, and immediately ! call \method{refresh}. \end{methoddesc} --- 622,626 ---- \begin{methoddesc}{echochar}{ch\optional{, attr}} Add character \var{ch} with attribute \var{attr}, and immediately ! call \method{refresh} on the window. \end{methoddesc} *************** *** 612,616 **** \begin{methoddesc}{getyx}{} ! Return a tuple \code{(\var{y}, \var{x})} of current cursor position. \end{methoddesc} --- 671,676 ---- \begin{methoddesc}{getyx}{} ! Return a tuple \code{(\var{y}, \var{x})} of current cursor position ! relative to the window's upper-left corner. \end{methoddesc} *************** *** 713,723 **** \begin{methoddesc}{leaveok}{yes} ! If \var{yes} is 1, ! cursor is left where it is, instead of being at ``cursor position.'' ! This reduces cursor movement where possible. If possible it will be made ! invisible. ! If \var{yes} is 0, cursor will always be at ! ``cursor position'' after an update. \end{methoddesc} --- 773,782 ---- \begin{methoddesc}{leaveok}{yes} ! If \var{yes} is 1, cursor is left where it is on update, instead of ! being at ``cursor position.'' This reduces cursor movement where ! possible. If possible the cursor will be made invisible. ! If \var{yes} is 0, cursor will always be at ``cursor position'' after ! an update. \end{methoddesc} *************** *** 793,803 **** \begin{methoddesc}{scrollok}{flag} Controls what happens when the cursor of a window is moved off the ! edge of the window or scrolling region, either as a result of a ! newline action on the bottom line, or typing the last character ! of the last line. If \var{flag} is false, the cursor is left ! on the bottom line. If \var{flag} is true, the window is ! scrolled up one line. Note that in order to get the physical ! scrolling effect on the terminal, it is also necessary to call ! \method{idlok()}. \end{methoddesc} --- 852,862 ---- \begin{methoddesc}{scrollok}{flag} Controls what happens when the cursor of a window is moved off the ! edge of the window or scrolling region, either as a result of a ! newline action on the bottom line, or typing the last character ! of the last line. If \var{flag} is false, the cursor is left ! on the bottom line. If \var{flag} is true, the window is ! scrolled up one line. Note that in order to get the physical ! scrolling effect on the terminal, it is also necessary to call ! \method{idlok()}. \end{methoddesc} *************** *** 808,812 **** \begin{methoddesc}{standend}{} ! Turn off all attributes. \end{methoddesc} --- 867,872 ---- \begin{methoddesc}{standend}{} ! Turn off the standout attribute. On some terminals this has the ! side effect of turning off all attributes. \end{methoddesc} *************** *** 1005,1036 **** \begin{tableii}{c|l}{code}{ACS code}{Meaning} \lineii{ACS_BBSS}{} ! \lineii{ACS_BLOCK}{} ! \lineii{ACS_BOARD}{} \lineii{ACS_BSBS}{} \lineii{ACS_BSSB}{} \lineii{ACS_BSSS}{} ! \lineii{ACS_BTEE}{} ! \lineii{ACS_BULLET}{} ! \lineii{ACS_CKBOARD}{} ! \lineii{ACS_DARROW}{} ! \lineii{ACS_DEGREE}{} ! \lineii{ACS_DIAMOND}{} ! \lineii{ACS_GEQUAL}{ (Not available with SGI curses)} ! \lineii{ACS_HLINE}{} ! \lineii{ACS_LANTERN}{} ! \lineii{ACS_LARROW}{} ! \lineii{ACS_LEQUAL}{ (Not available with SGI curses)} ! \lineii{ACS_LLCORNER}{} ! \lineii{ACS_LRCORNER}{} ! \lineii{ACS_LTEE}{} ! \lineii{ACS_NEQUAL}{ (Not available with SGI curses)} ! \lineii{ACS_PI}{ (Not available with SGI curses)} ! \lineii{ACS_PLMINUS}{} ! \lineii{ACS_PLUS}{} ! \lineii{ACS_RARROW}{} ! \lineii{ACS_RTEE}{} ! \lineii{ACS_S1}{} ! \lineii{ACS_S3}{ (Not available with SGI curses)} ! \lineii{ACS_S9}{} \lineii{ACS_SBBS}{} \lineii{ACS_SBSB}{} --- 1065,1097 ---- \begin{tableii}{c|l}{code}{ACS code}{Meaning} \lineii{ACS_BBSS}{} ! \lineii{ACS_BLOCK}{solid square block} ! \lineii{ACS_BOARD}{board of squares} \lineii{ACS_BSBS}{} \lineii{ACS_BSSB}{} \lineii{ACS_BSSS}{} ! \lineii{ACS_BTEE}{bottom tee} ! \lineii{ACS_BULLET}{bullet} ! \lineii{ACS_CKBOARD}{checker board (stipple)} ! \lineii{ACS_DARROW}{arrow pointing down} ! \lineii{ACS_DEGREE}{degree symbol} ! \lineii{ACS_DIAMOND}{diamond} ! \lineii{ACS_GEQUAL}{greater-than-or-equal-to} ! \lineii{ACS_HLINE}{horizontal line} ! \lineii{ACS_LANTERN}{lantern symbol} ! \lineii{ACS_LARROW}{left arrow} ! \lineii{ACS_LEQUAL}{less-than-or-equal-to} ! \lineii{ACS_LLCORNER}{lower left-hand corner} ! \lineii{ACS_LRCORNER}{lower right-hand corner} ! \lineii{ACS_LTEE}{left tee} ! \lineii{ACS_NEQUAL}{not-equal sign} ! \lineii{ACS_PI}{letter pi} ! \lineii{ACS_PLMINUS}{plus-or-minus sign} ! \lineii{ACS_PLUS}{plus sign} ! \lineii{ACS_RARROW}{right arrow} ! \lineii{ACS_RTEE}{right tee} ! \lineii{ACS_S1}{scan line 1} ! \lineii{ACS_S3}{scan line 3} ! \lineii{ACS_S7}{scan line 7} ! \lineii{ACS_S9}{scan line 9} \lineii{ACS_SBBS}{} \lineii{ACS_SBSB}{} *************** *** 1040,1049 **** \lineii{ACS_SSSB}{} \lineii{ACS_SSSS}{} ! \lineii{ACS_STERLING}{ (Not available with SGI curses)} ! \lineii{ACS_TTEE}{} ! \lineii{ACS_UARROW}{} ! \lineii{ACS_ULCORNER}{} ! \lineii{ACS_URCORNER}{} ! \lineii{ACS_VLINE}{} \end{tableii} --- 1101,1110 ---- \lineii{ACS_SSSB}{} \lineii{ACS_SSSS}{} ! \lineii{ACS_STERLING}{pound sterling} ! \lineii{ACS_TTEE}{top tee} ! \lineii{ACS_UARROW}{up arrow} ! \lineii{ACS_ULCORNER}{upper left corner} ! \lineii{ACS_URCORNER}{upper right corner} ! \lineii{ACS_VLINE}{vertical line} \end{tableii} From python-dev@python.org Mon Jul 24 07:55:03 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 23 Jul 2000 23:55:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_support.py,1.6,1.7 Message-ID: <200007240655.XAA10377@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv10365/Lib/test Modified Files: test_support.py Log Message: Restore TestSkipped exception; appears to have disappeared in last checkin. Make both TextFailed and TestSkipped subclasses of Error, which derives from Exception. Docstrings have been added for the exceptions and module. Index: test_support.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_support.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** test_support.py 2000/07/19 17:14:48 1.6 --- test_support.py 2000/07/24 06:55:00 1.7 *************** *** 1,8 **** ! # Python test set -- supporting definitions. - class TestFailed(Exception): - pass verbose = 1 # Flag set to 0 by regrtest.py def unload(name): --- 1,25 ---- ! """Supporting definitions for the Python regression test.""" + class Error(Exception): + """Base class for regression test exceptions.""" + + class TestFailed(Error): + """Test failed.""" + + class TestSkipped(Error): + """Test skipped. + + This can be raised to indicate that a test was deliberatly + skipped, but not because a feature wasn't available. For + example, if some resource can't be used, such as the network + appears to be unavailable, this should be raised instead of + TestFailed. + + """ + + verbose = 1 # Flag set to 0 by regrtest.py + use_large_resources = 1 # Flag set to 0 by regrtest.py def unload(name): From python-dev@python.org Mon Jul 24 11:58:34 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 03:58:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include grammar.h,2.13,2.14 Message-ID: <200007241058.DAA31711@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv31592/Include Modified Files: grammar.h Log Message: Remove function-less prototype (old function that was removed ?) that happens to be a C++ reserved word, too. Index: grammar.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/grammar.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** grammar.h 2000/07/09 00:20:36 2.13 --- grammar.h 2000/07/24 10:58:31 2.14 *************** *** 83,87 **** void addarc(dfa *d, int from, int to, int lbl); dfa *PyGrammar_FindDFA(grammar *g, int type); - char *typename(grammar *g, int lbl); int addlabel(labellist *ll, int type, char *str); --- 83,86 ---- From python-dev@python.org Mon Jul 24 12:09:40 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 04:09:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules cmathmodule.c,2.16,2.17 Message-ID: <200007241109.EAA02817@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2752 Modified Files: cmathmodule.c Log Message: From python-dev@python.org Mon Jul 24 12:16:14 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 13:16:14 +0200 Subject: [Python-checkins] CVS: python/dist/src/Modules cmathmodule.c,2.16,2.17 In-Reply-To: <200007241109.EAA02817@slayer.i.sourceforge.net>; from twouters@users.sourceforge.net on Mon, Jul 24, 2000 at 04:09:40AM -0700 References: <200007241109.EAA02817@slayer.i.sourceforge.net> Message-ID: <20000724131614.A266@xs4all.nl> On Mon, Jul 24, 2000 at 04:09:40AM -0700, Thomas Wouters wrote: > Update of /cvsroot/python/python/dist/src/Modules > In directory slayer.i.sourceforge.net:/tmp/cvs-serv2752 > > Modified Files: > cmathmodule.c > Log Message: Sorry, something went wrong with checking in (bungled the log message, wanted to check on something, tried to cancel it, broke off the sync-mail instead ;P) The log message should have been: 'fix more sneakily hiding prototype-less function declarations.' And the diff this: Index: cmathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cmathmodule.c,v retrieving revision 2.16 retrieving revision 2.17 diff -c -c -r2.16 -r2.17 *** cmathmodule.c 2000/07/21 06:00:07 2.16 --- cmathmodule.c 2000/07/24 11:09:37 2.17 *************** *** 36,44 **** #endif /* forward declarations */ ! staticforward Py_complex c_log(); ! staticforward Py_complex c_prodi(); ! staticforward Py_complex c_sqrt(); static Py_complex c_acos(Py_complex x) --- 36,44 ---- #endif /* forward declarations */ ! staticforward Py_complex c_log(Py_Complex); ! staticforward Py_complex c_prodi(Py_Complex); ! staticforward Py_complex c_sqrt(Py_Complex); static Py_complex c_acos(Py_complex x) That's when I wondered whether I had the capitalization right, and I started bungling ;) -- Thomas Wouters Hi! I'm a .signature virus! copy me into your .signature file to help me spread! From python-dev@python.org Mon Jul 24 12:17:43 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 04:17:43 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules cmathmodule.c,2.17,2.18 Message-ID: <200007241117.EAA06519@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6160 Modified Files: cmathmodule.c Log Message: Fix typo in previous patch. Index: cmathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cmathmodule.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** cmathmodule.c 2000/07/24 11:09:37 2.17 --- cmathmodule.c 2000/07/24 11:17:40 2.18 *************** *** 37,43 **** /* forward declarations */ ! staticforward Py_complex c_log(Py_Complex); ! staticforward Py_complex c_prodi(Py_Complex); ! staticforward Py_complex c_sqrt(Py_Complex); --- 37,43 ---- /* forward declarations */ ! staticforward Py_complex c_log(Py_complex); ! staticforward Py_complex c_prodi(Py_complex); ! staticforward Py_complex c_sqrt(Py_complex); From python-dev@python.org Mon Jul 24 12:26:29 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 04:26:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules timemodule.c,2.93,2.94 Message-ID: <200007241126.EAA11550@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv11290 Modified Files: timemodule.c Log Message: ANSIfy yet another hidden function definition. Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.93 retrieving revision 2.94 diff -C2 -r2.93 -r2.94 *** timemodule.c 2000/07/22 23:57:55 2.93 --- timemodule.c 2000/07/24 11:26:25 2.94 *************** *** 710,719 **** static int - #ifdef MPW floatsleep(double secs) - #else - floatsleep(secs) - double secs; - #endif /* MPW */ { /* XXX Should test for MS_WIN32 first! */ --- 710,714 ---- From python-dev@python.org Mon Jul 24 12:36:50 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 04:36:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules cPickle.c,2.46,2.47 Message-ID: <200007241136.EAA13366@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv13358 Modified Files: cPickle.c Log Message: ... and yet more ANSIfications... Index: cPickle.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** cPickle.c 2000/07/22 23:56:07 2.46 --- cPickle.c 2000/07/24 11:36:47 2.47 *************** *** 135,141 **** *copy_reg_str, *dispatch_table_str, *safe_constructors_str, *empty_str; - static int save(); - static int put2(); - #ifndef PyList_SET_ITEM #define PyList_SET_ITEM(op, i, v) (((PyListObject *)(op))->ob_item[i] = (v)) --- 135,138 ---- *************** *** 354,357 **** --- 351,358 ---- staticforward PyTypeObject Unpicklertype; + + /* Forward decls that need the above structs */ + static int save(Picklerobject *, PyObject *, int); + static int put2(Picklerobject *, PyObject *); int From python-dev@python.org Mon Jul 24 15:39:52 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 07:39:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python thread.c,2.32,2.33 Message-ID: <200007241439.HAA22848@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv22818/Python Modified Files: thread.c Log Message: Prototype yet another forward declaration. Index: thread.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread.c,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -r2.32 -r2.33 *** thread.c 2000/07/22 18:47:25 2.32 --- thread.c 2000/07/24 14:39:50 2.33 *************** *** 86,90 **** static int initialized; ! static void PyThread__init_thread(); /* Forward */ void PyThread_init_thread(void) --- 86,90 ---- static int initialized; ! static void PyThread__init_thread(void); /* Forward */ void PyThread_init_thread(void) From python-dev@python.org Mon Jul 24 15:43:38 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 07:43:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules bsddbmodule.c,1.22,1.23 _tkinter.c,1.108,1.109 cPickle.c,2.47,2.48 cStringIO.c,2.23,2.24 dbmmodule.c,2.20,2.21 gdbmmodule.c,2.25,2.26 sunaudiodev.c,1.22,1.23 timemodule.c,2.94,2.95 Message-ID: <200007241443.HAA23137@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv23116 Modified Files: bsddbmodule.c _tkinter.c cPickle.c cStringIO.c dbmmodule.c gdbmmodule.c sunaudiodev.c timemodule.c Log Message: ANSIfy some more forward declarations. Index: bsddbmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/bsddbmodule.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** bsddbmodule.c 2000/07/10 17:06:38 1.22 --- bsddbmodule.c 2000/07/24 14:43:34 1.23 *************** *** 787,791 **** DL_EXPORT(void) ! initbsddb() { PyObject *m, *d; --- 787,791 ---- DL_EXPORT(void) ! initbsddb(void) { PyObject *m, *d; Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -r1.108 -r1.109 *** _tkinter.c 2000/07/21 06:00:07 1.108 --- _tkinter.c 2000/07/24 14:43:34 1.109 *************** *** 434,439 **** */ ! static void EnableEventHook(); /* Forward */ ! static void DisableEventHook(); /* Forward */ static TkappObject * --- 434,439 ---- */ ! static void EnableEventHook(void); /* Forward */ ! static void DisableEventHook(void); /* Forward */ static TkappObject * Index: cPickle.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v retrieving revision 2.47 retrieving revision 2.48 diff -C2 -r2.47 -r2.48 *** cPickle.c 2000/07/24 11:36:47 2.47 --- cPickle.c 2000/07/24 14:43:34 2.48 *************** *** 181,185 **** static PyObject * ! Pdata_New() { Pdata *self; --- 181,185 ---- static PyObject * ! Pdata_New(void) { Pdata *self; *************** *** 194,198 **** static int ! stackUnderflow() { PyErr_SetString(UnpicklingError, "unpickling stack underflow"); return -1; --- 194,198 ---- static int ! stackUnderflow(void) { PyErr_SetString(UnpicklingError, "unpickling stack underflow"); return -1; *************** *** 2419,2423 **** static int ! bad_readline() { PyErr_SetString(UnpicklingError, "pickle data was truncated"); return -1; --- 2419,2423 ---- static int ! bad_readline(void) { PyErr_SetString(UnpicklingError, "pickle data was truncated"); return -1; *************** *** 4517,4521 **** #endif DL_EXPORT(void) ! initcPickle() { PyObject *m, *d, *v; char *rev="1.71"; --- 4517,4521 ---- #endif DL_EXPORT(void) ! initcPickle(void) { PyObject *m, *d, *v; char *rev="1.71"; Index: cStringIO.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cStringIO.c,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** cStringIO.c 2000/07/16 12:04:31 2.23 --- cStringIO.c 2000/07/24 14:43:35 2.24 *************** *** 640,644 **** #endif DL_EXPORT(void) ! initcStringIO() { PyObject *m, *d, *v; --- 640,644 ---- #endif DL_EXPORT(void) ! initcStringIO(void) { PyObject *m, *d, *v; Index: dbmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/dbmmodule.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** dbmmodule.c 2000/07/10 17:06:38 2.20 --- dbmmodule.c 2000/07/24 14:43:35 2.21 *************** *** 273,277 **** DL_EXPORT(void) ! initdbm() { PyObject *m, *d; --- 273,277 ---- DL_EXPORT(void) ! initdbm(void) { PyObject *m, *d; Index: gdbmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gdbmmodule.c,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** gdbmmodule.c 2000/07/08 05:00:07 2.25 --- gdbmmodule.c 2000/07/24 14:43:35 2.26 *************** *** 475,479 **** DL_EXPORT(void) ! initgdbm() { PyObject *m, *d; --- 475,479 ---- DL_EXPORT(void) ! initgdbm(void) { PyObject *m, *d; Index: sunaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sunaudiodev.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** sunaudiodev.c 2000/07/21 06:00:07 1.22 --- sunaudiodev.c 2000/07/24 14:43:35 1.23 *************** *** 52,56 **** staticforward PyTypeObject Sadtype; staticforward PyTypeObject Sadstatustype; ! static sadstatusobject *sads_alloc(); /* Forward */ static PyObject *SunAudioError; --- 52,56 ---- staticforward PyTypeObject Sadtype; staticforward PyTypeObject Sadstatustype; ! static sadstatusobject *sads_alloc(void); /* Forward */ static PyObject *SunAudioError; *************** *** 365,369 **** static sadstatusobject * ! sads_alloc() { return PyObject_New(sadstatusobject, &Sadstatustype); } --- 365,369 ---- static sadstatusobject * ! sads_alloc(void) { return PyObject_New(sadstatusobject, &Sadstatustype); } Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.94 retrieving revision 2.95 diff -C2 -r2.94 -r2.95 *** timemodule.c 2000/07/24 11:26:25 2.94 --- timemodule.c 2000/07/24 14:43:35 2.95 *************** *** 92,96 **** /* Forward declarations */ static int floatsleep(double); ! static double floattime(); /* For Y2K check */ --- 92,96 ---- /* Forward declarations */ static int floatsleep(double); ! static double floattime(double); /* For Y2K check */ From python-dev@python.org Mon Jul 24 16:26:42 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 08:26:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules timemodule.c,2.95,2.96 Message-ID: <200007241526.IAA06892@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6847/Modules Modified Files: timemodule.c Log Message: Fix floattime prototype ((void), not (double)) Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.95 retrieving revision 2.96 diff -C2 -r2.95 -r2.96 *** timemodule.c 2000/07/24 14:43:35 2.95 --- timemodule.c 2000/07/24 15:26:39 2.96 *************** *** 92,96 **** /* Forward declarations */ static int floatsleep(double); ! static double floattime(double); /* For Y2K check */ --- 92,96 ---- /* Forward declarations */ static int floatsleep(double); ! static double floattime(void); /* For Y2K check */ From python-dev@python.org Mon Jul 24 16:49:11 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 08:49:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules parsermodule.c,2.48,2.49 Message-ID: <200007241549.IAA08137@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8108/Modules Modified Files: parsermodule.c Log Message: ANSIfy a bit more. Index: parsermodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v retrieving revision 2.48 retrieving revision 2.49 diff -C2 -r2.48 -r2.49 *** parsermodule.c 2000/07/22 23:57:55 2.48 --- parsermodule.c 2000/07/24 15:49:08 2.49 *************** *** 2634,2638 **** DL_EXPORT(void) ! initparser() { PyObject* module; --- 2634,2638 ---- DL_EXPORT(void) ! initparser(void) { PyObject* module; From python-dev@python.org Mon Jul 24 17:02:03 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 24 Jul 2000 09:02:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/freeze README,1.7,1.8 win32.html,1.1,1.2 Message-ID: <200007241602.JAA14867@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/freeze In directory slayer.i.sourceforge.net:/tmp/cvs-serv12925 Modified Files: README win32.html Log Message: change some occurence of python15.dll to python20.dll closes patch #100956 Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/freeze/README,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** README 1998/08/25 14:06:50 1.7 --- README 2000/07/24 16:02:00 1.8 *************** *** 144,148 **** WARNING: the resulting executable is not self-contained; it requires ! the Python DLL, currently PYTHON15.DLL (it does not require the standard library of .py files though). It may also require one or more extension modules loaded from .DLL or .PYD files; the module --- 144,148 ---- WARNING: the resulting executable is not self-contained; it requires ! the Python DLL, currently PYTHON20.DLL (it does not require the standard library of .py files though). It may also require one or more extension modules loaded from .DLL or .PYD files; the module *************** *** 158,166 **** In order for this to work, you must have built Python using the VC++ (Developer Studio) 5.0 compiler. The provided project builds ! python15.lib in the subdirectory pcbuild\Release of thje Python source tree, and this is where the generated Makefile expects it to be. If this is not the case, you can edit the Makefile or (probably better) winmakemakefile.py (e.g., if you are using the 4.2 compiler, the ! python15.lib file is generated in the subdirectory vc40 of the Python source tree). --- 158,166 ---- In order for this to work, you must have built Python using the VC++ (Developer Studio) 5.0 compiler. The provided project builds ! python20.lib in the subdirectory pcbuild\Release of thje Python source tree, and this is where the generated Makefile expects it to be. If this is not the case, you can edit the Makefile or (probably better) winmakemakefile.py (e.g., if you are using the 4.2 compiler, the ! python20.lib file is generated in the subdirectory vc40 of the Python source tree). Index: win32.html =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/freeze/win32.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** win32.html 1998/05/19 20:18:37 1.1 --- win32.html 2000/07/24 16:02:00 1.2 *************** *** 18,26 ****

    The person freezing the program has control over what external DLLs are required by a frozen program. The following dependencies are supported:

    Minimal frozen programs

    !

    These programs freeze only .py files in your program. All external DLLs are required at run-time. This includes all .pyd/.dll modules used by your program, Python15.dll, and msvcrt.dll.

    A small Python program would typically create a .EXE around 300kb.

    Frozen Extension programs

    Note: For Python1.5.1, you must get a patch from Guido to import.c for this to work.

    !

    These programs also freeze in the sources from all .pyd and .dll files used at runtime. This means the resulting .EXE is only dependent on Python15.dll and msvcrt.dll.

    A small Python program using win32api, win32con and one or 2 other win32 extensions would typically create a .EXE around 400kb.

    Completely frozen programs

    --- 18,26 ----

    The person freezing the program has control over what external DLLs are required by a frozen program. The following dependencies are supported:

    Minimal frozen programs

    !

    These programs freeze only .py files in your program. All external DLLs are required at run-time. This includes all .pyd/.dll modules used by your program, Python20.dll, and msvcrt.dll.

    A small Python program would typically create a .EXE around 300kb.

    Frozen Extension programs

    Note: For Python1.5.1, you must get a patch from Guido to import.c for this to work.

    !

    These programs also freeze in the sources from all .pyd and .dll files used at runtime. This means the resulting .EXE is only dependent on Python20.dll and msvcrt.dll.

    A small Python program using win32api, win32con and one or 2 other win32 extensions would typically create a .EXE around 400kb.

    Completely frozen programs

    *************** *** 110,114 ****

    This is a standard Python demo in the Win32 extensions. It can be found in the "win32\demos\service" directory.

    Command Line used

    !

    This will create a native NT Service EXE, dependent only on the main Python15.dll. All other modules are built-in to the final .EXE

    --- 110,114 ----

    This is a standard Python demo in the Win32 extensions. It can be found in the "win32\demos\service" directory.

    Command Line used

    !

    This will create a native NT Service EXE, dependent only on the main Python20.dll. All other modules are built-in to the final .EXE

    From python-dev@python.org Mon Jul 24 17:06:25 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 09:06:25 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.160,2.161 resource.c,2.15,2.16 socketmodule.c,1.120,1.121 Message-ID: <200007241606.JAA16200@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8962/Modules Modified Files: posixmodule.c resource.c socketmodule.c Log Message: Create a new section of pyport.h to hold all external function declarations for systems that are missing those declarations from system include files. Start by moving a pointy-haired ones from their previous locations to the new section. (The gethostname() one, for instance, breaks on several systems, because some define it as (char *, size_t) and some as (char *, int).) I purposely decided not to include the summary of used #defines like Tim did in the first section of pyport.h. In my opinion, the number of #defines likedly to be used by this section would make such an overview unwieldy. I would suggest documenting the non-obvious ones, though. Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.160 retrieving revision 2.161 diff -C2 -r2.160 -r2.161 *** posixmodule.c 2000/07/23 19:47:12 2.160 --- posixmodule.c 2000/07/24 16:06:23 2.161 *************** *** 129,140 **** #endif ! #ifdef HAVE_UNISTD_H ! /* XXX These are for SunOS4.1.3 but shouldn't hurt elsewhere */ ! extern int rename(const char *, const char *); ! extern int pclose(FILE *); ! extern int lstat(const char *, struct stat *); ! extern int symlink(const char *, const char *); ! extern int fsync(int fd); ! #else /* !HAVE_UNISTD_H */ #if defined(PYCC_VACPP) extern int mkdir(char *); --- 129,133 ---- #endif ! #ifndef HAVE_UNISTD_H #if defined(PYCC_VACPP) extern int mkdir(char *); *************** *** 722,727 **** does not force update of metadata."; - extern int fdatasync(int); /* Prototype just in case */ - static PyObject * posix_fdatasync(PyObject *self, PyObject *args) --- 715,718 ---- *************** *** 1681,1690 **** #ifdef HAVE_LIBUTIL_H #include - #else - /* BSDI does not supply a prototype for the 'openpty' and 'forkpty' - functions, even though they are included in libutil. */ - #include - extern int openpty(int *, int *, char *, struct termios *, struct winsize *); - extern int forkpty(int *, char *, struct termios *, struct winsize *); #endif /* HAVE_LIBUTIL_H */ #endif /* HAVE_PTY_H */ --- 1672,1675 ---- *************** *** 1702,1707 **** #ifndef HAVE_OPENPTY char * slave_name; - /* SGI apparently needs this forward declaration */ - extern char * _getpty(int *, int, mode_t, int); #endif --- 1687,1690 ---- *************** *** 1720,1724 **** if (slave_fd < 0) return posix_error(); ! #endif /* defined(HAVE_OPENPTY) */ return Py_BuildValue("(ii)", master_fd, slave_fd); --- 1703,1707 ---- if (slave_fd < 0) return posix_error(); ! #endif /* HAVE_OPENPTY */ return Py_BuildValue("(ii)", master_fd, slave_fd); *************** *** 3287,3291 **** posix_fdopen(PyObject *self, PyObject *args) { - extern int fclose(FILE *); int fd; char *mode = "r"; --- 3270,3273 ---- Index: resource.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/resource.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** resource.c 2000/07/21 06:00:07 2.15 --- resource.c 2000/07/24 16:06:23 2.16 *************** *** 23,30 **** when the header files declare it different. Worse, on some Linuxes, getpagesize() returns a size_t... */ - #ifndef linux - int getrusage(); - int getpagesize(); - #endif #define doubletime(TV) ((double)(TV).tv_sec + (TV).tv_usec * 0.000001) --- 23,26 ---- Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.120 retrieving revision 1.121 diff -C2 -r1.120 -r1.121 *** socketmodule.c 2000/07/24 01:45:11 1.120 --- socketmodule.c 2000/07/24 16:06:23 1.121 *************** *** 111,118 **** #endif - #if !defined(MS_WINDOWS) && !defined(PYOS_OS2) && !defined(__BEOS__) - extern int gethostname(char *, size_t); /* For Solaris, at least */ - #endif - #if defined(PYCC_VACPP) #include --- 111,114 ---- *************** *** 130,138 **** #endif - #if defined(__BEOS__) - /* It's in the libs, but not the headers... - [cjh] */ - int shutdown( int, int ); - #endif - #include #include "mytime.h" --- 126,129 ---- *************** *** 2408,2414 **** DL_EXPORT(void) #if defined(MS_WINDOWS) || defined(PYOS_OS2) || defined(__BEOS__) ! init_socket() #else ! initsocket() #endif { --- 2399,2405 ---- DL_EXPORT(void) #if defined(MS_WINDOWS) || defined(PYOS_OS2) || defined(__BEOS__) ! init_socket(void) #else ! initsocket(void) #endif { From python-dev@python.org Mon Jul 24 17:06:26 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 09:06:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include pyport.h,2.5,2.6 Message-ID: <200007241606.JAA16201@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv8962/Include Modified Files: pyport.h Log Message: Create a new section of pyport.h to hold all external function declarations for systems that are missing those declarations from system include files. Start by moving a pointy-haired ones from their previous locations to the new section. (The gethostname() one, for instance, breaks on several systems, because some define it as (char *, size_t) and some as (char *, int).) I purposely decided not to include the summary of used #defines like Tim did in the first section of pyport.h. In my opinion, the number of #defines likedly to be used by this section would make such an overview unwieldy. I would suggest documenting the non-obvious ones, though. Index: pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** pyport.h 2000/07/23 21:18:08 2.5 --- pyport.h 2000/07/24 16:06:23 2.6 *************** *** 75,78 **** --- 75,140 ---- #endif + + + /************************************************************************** + Prototypes that are missing from the standard include files on some systems + (and possibly only some versions of such systems.) + + Please be conservative with adding new ones, document them and enclose them + in platform-specific #ifdefs. + **************************************************************************/ + + #ifdef SOLARIS + /* Unchecked */ + extern int gethostname(char *, int); + #endif + + #ifdef __BEOS__ + /* Unchecked */ + /* It's in the libs, but not the headers... - [cjh] */ + int shutdown( int, int ); + #endif + + #ifdef HAVE__GETPTY + /* Unchecked */ + extern char * _getpty(int *, int, mode_t, int); + #endif + + #if defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) + #if !defined(HAVE_PTY_H) && !defined(HAVE_LIBUTIL_H) + /* BSDI does not supply a prototype for the 'openpty' and 'forkpty' + functions, even though they are included in libutil. */ + #include + extern int openpty(int *, int *, char *, struct termios *, struct winsize *); + extern int forkpty(int *, char *, struct termios *, struct winsize *); + #endif /* !defined(HAVE_PTY_H) && !defined(HAVE_LIBUTIL_H) */ + #endif /* defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) */ + + + /* These are pulled from various places. It isn't obvious on what platforms + they are necessary, nor what the exact prototype should look like (which + is likely to vary between platforms!) If you find you need one of these + declarations, please move them to a platform-specific block and include + proper prototypes. */ + #if 0 + + /* From Modules/resource.c */ + extern int getrusage(); + extern int getpagesize(); + + /* From Python/sysmodule.c and Modules/posixmodule.c */ + extern int fclose(FILE *); + + /* From Modules/posixmodule.c */ + extern int fdatasync(int); + /* XXX These are supposedly for SunOS4.1.3 but "shouldn't hurt elsewhere" */ + extern int rename(const char *, const char *); + extern int pclose(FILE *); + extern int lstat(const char *, struct stat *); + extern int symlink(const char *, const char *); + extern int fsync(int fd); + + #endif /* 0 */ + #ifdef __cplusplus } From python-dev@python.org Mon Jul 24 17:06:25 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 09:06:25 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python sysmodule.c,2.70,2.71 Message-ID: <200007241606.JAA16199@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv8962/Python Modified Files: sysmodule.c Log Message: Create a new section of pyport.h to hold all external function declarations for systems that are missing those declarations from system include files. Start by moving a pointy-haired ones from their previous locations to the new section. (The gethostname() one, for instance, breaks on several systems, because some define it as (char *, size_t) and some as (char *, int).) I purposely decided not to include the summary of used #defines like Tim did in the first section of pyport.h. In my opinion, the number of #defines likedly to be used by this section would make such an overview unwieldy. I would suggest documenting the non-obvious ones, though. Index: sysmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v retrieving revision 2.70 retrieving revision 2.71 diff -C2 -r2.70 -r2.71 *** sysmodule.c 2000/07/22 18:47:25 2.70 --- sysmodule.c 2000/07/24 16:06:23 2.71 *************** *** 386,390 **** _PySys_Init(void) { - extern int fclose(FILE *); PyObject *m, *v, *sysdict; PyObject *sysin, *sysout, *syserr; --- 386,389 ---- From python-dev@python.org Mon Jul 24 17:26:37 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 09:26:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.121,1.122 Message-ID: <200007241626.JAA17570@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv17514/Modules Modified Files: socketmodule.c Log Message: Remove unused variable and what looks like an ancient relic of an old version of SSLeay (now known as OpenSSL.) Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.121 retrieving revision 1.122 diff -C2 -r1.121 -r1.122 *** socketmodule.c 2000/07/24 16:06:23 1.121 --- socketmodule.c 2000/07/24 16:26:35 1.122 *************** *** 1978,1988 **** { SSLObject *self; - char *str; - - #if 0 - meth=SSLv23_client_method(); - meth=SSLv3_client_method(); - meth=SSLv2_client_method(); - #endif self = PyObject_New(SSLObject, &SSL_Type); /* Create new object */ --- 1978,1981 ---- From python-dev@python.org Mon Jul 24 18:38:01 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 24 Jul 2000 10:38:01 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.8,1.9 Message-ID: <200007241738.KAA28560@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv28548 Modified Files: pep-0000.txt Log Message: Added PEP 214, Extended Print Statement, owned by bwarsaw Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** pep-0000.txt 2000/07/21 20:03:17 1.8 --- pep-0000.txt 2000/07/24 17:37:59 1.9 *************** *** 33,36 **** --- 33,37 ---- 212 pep-0212.txt Additional Builtin Generators bwarsaw 213 pep-0213.txt Attribute Access Handlers prescod + 214 pep-0214.txt Extended Print Statement bwarsaw From python-dev@python.org Mon Jul 24 18:38:37 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 24 Jul 2000 10:38:37 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0214.txt,NONE,1.1 Message-ID: <200007241738.KAA28596@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv28587 Added Files: pep-0214.txt Log Message: PEP 214, Extended Print Statement, owned by bwarsaw ***** Error reading new file(2, 'No such file or directory') From python-dev@python.org Mon Jul 24 18:40:03 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 24 Jul 2000 10:40:03 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.3,1.4 Message-ID: <200007241740.KAA28746@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv28717 Modified Files: pep-0201.txt Log Message: Added a few more open issues: - what should "zip()" do (i.e. zip with no arguments). - should zip() be included in the builtins? - the padtuple proposal Index: pep-0201.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** pep-0201.txt 2000/07/19 04:19:54 1.3 --- pep-0201.txt 2000/07/24 17:40:00 1.4 *************** *** 126,130 **** nor will zip() ever raise an exception with lists of different lengths. To accomplish either behavior, the sequences must be ! checked and processed before the call to zip(). --- 126,131 ---- nor will zip() ever raise an exception with lists of different lengths. To accomplish either behavior, the sequences must be ! checked and processed before the call to zip() -- but see the Open ! Issues below for more discussion. *************** *** 391,394 **** --- 392,403 ---- Current scoring seems to generally favor outcome 1. + - What should "zip()" do? + + Along similar lines, zip() with no arguments (or zip() with just + a pad argument) can have ambiguous semantics. Should this + return no elements or an infinite number? For these reaons, + raising a TypeError exception in this case makes the most + sense. + - The name of the built-in `zip' may cause some initial confusion with the zip compression algorithm. Other suggestions include *************** *** 399,402 **** --- 408,429 ---- with `zip' because the same functionality is available in other languages (e.g. Haskell) under the name `zip'[2]. + + - Should zip() be including in the builtins module or should it be + in a separate generators module (possibly with other candidate + functions like irange())? + + - Padding short sequences with different values. A suggestion has + been made to allow a `padtuple' (probably better called `pads' + or `padseq') argument similar to `pad'. This sequence must have + a length equal to the number of sequences given. It is a + sequence of the individual pad values to use for each sequence, + should it be shorter than the maximum length. + + One problem is what to do if `padtuple' itself isn't of the + right length? A TypeError seems to be the only choice here. + + How does `pad' and `padtuple' interact? Perhaps if padtuple + were too short, it could use pad as a fallback. padtuple would + always override pad if both were given. From python-dev@python.org Mon Jul 24 20:01:57 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 24 Jul 2000 12:01:57 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0215.txt,NONE,1.1 Message-ID: <200007241901.MAA12167@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv12050 Added Files: pep-0215.txt Log Message: Added PEP 215, String Interpolation, owned by ping ***** Error reading new file(2, 'No such file or directory') From python-dev@python.org Mon Jul 24 20:01:29 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 24 Jul 2000 12:01:29 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.9,1.10 Message-ID: <200007241901.MAA11170@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv10948 Modified Files: pep-0000.txt Log Message: Added PEP 215, String Interpolation, owned by ping Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** pep-0000.txt 2000/07/24 17:37:59 1.9 --- pep-0000.txt 2000/07/24 19:01:22 1.10 *************** *** 34,37 **** --- 34,38 ---- 213 pep-0213.txt Attribute Access Handlers prescod 214 pep-0214.txt Extended Print Statement bwarsaw + 215 pep-0215.txt String Interpolation ping From python-dev@python.org Mon Jul 24 20:19:46 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 24 Jul 2000 12:19:46 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html index.html,1.3,1.4 Message-ID: <200007241919.MAA17242@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv17232 Modified Files: index.html Log Message: Added trailing / to URLs pointing to directories -- saves a roundtrip and avoids showing seen links as unseen. Index: index.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/index.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** index.html 2000/07/22 02:53:10 1.3 --- index.html 2000/07/24 19:19:43 1.4 *************** *** 15,21 **** alt="SourceForge" border="0" height="79" width="124" />

    ! Python Project Page - CVS repository,  Python Developers and the Patch Manager.
    ! Python Enhancement Proposals - Information on new language features
    Python at SourceForge FAQ - Tips on CVS, SSH and --- 15,21 ---- alt="SourceForge" border="0" height="79" width="124" /> ! Python Project Page - CVS repository,  Python Developers and the Patch Manager.
    ! Python Enhancement Proposals - Information on new language features
    Python at SourceForge FAQ - Tips on CVS, SSH and From python-dev@python.org Mon Jul 24 20:33:52 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 24 Jul 2000 12:33:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcodecs.tex,1.2,1.3 Message-ID: <200007241933.MAA18322@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv18311/lib Modified Files: libcodecs.tex Log Message: Fix small typos and markup consistency nits. Index: libcodecs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcodecs.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libcodecs.tex 2000/04/06 16:09:59 1.2 --- libcodecs.tex 2000/07/24 19:33:49 1.3 *************** *** 66,76 **** also defines these utility functions: ! \begin{funcdesc}{open}{filename, mode\optional{, encoding=None\optional{, errors='strict'\optional{, buffering=1}}}} Open an encoded file using the given \var{mode} and return a wrapped version providing transparent encoding/decoding. \strong{Note:} The wrapped version will only accept the object format ! defined by the codecs, i.e. Unicode objects for most builtin ! codecs. Output is also codec dependent and will usually by Unicode as well. --- 66,77 ---- also defines these utility functions: ! \begin{funcdesc}{open}{filename, mode\optional{, encoding\optional{, ! errors\optional{, buffering}}}} Open an encoded file using the given \var{mode} and return a wrapped version providing transparent encoding/decoding. \strong{Note:} The wrapped version will only accept the object format ! defined by the codecs, i.e.\ Unicode objects for most built-in ! codecs. Output is also codec-dependent and will usually be Unicode as well. *************** *** 79,84 **** \var{errors} may be given to define the error handling. It defaults ! to 'strict' which causes a \exception{ValueError} to be raised in case ! an encoding error occurs. \var{buffering} has the same meaning as for the built-in --- 80,85 ---- \var{errors} may be given to define the error handling. It defaults ! to \code{'strict'} which causes a \exception{ValueError} to be raised ! in case an encoding error occurs. \var{buffering} has the same meaning as for the built-in *************** *** 86,91 **** \end{funcdesc} ! \begin{funcdesc}{EncodedFile}{file, input\optional{, output=None\optional{, errors='strict'}}} ! Return a wrapped version of file which provides transparent encoding translation. --- 87,92 ---- \end{funcdesc} ! \begin{funcdesc}{EncodedFile}{file, input\optional{, ! output\optional{, errors}}} Return a wrapped version of file which provides transparent encoding translation. *************** *** 93,103 **** Strings written to the wrapped file are interpreted according to the given \var{input} encoding and then written to the original file as ! string using the \var{output} encoding. The intermediate encoding will usually be Unicode but depends on the specified codecs. ! If \var{output} is not given, it defaults to input. \var{errors} may be given to define the error handling. It defaults to ! 'strict' which causes \exception{ValueError} to be raised in case an encoding error occurs. \end{funcdesc} --- 94,104 ---- Strings written to the wrapped file are interpreted according to the given \var{input} encoding and then written to the original file as ! strings using the \var{output} encoding. The intermediate encoding will usually be Unicode but depends on the specified codecs. ! If \var{output} is not given, it defaults to \var{input}. \var{errors} may be given to define the error handling. It defaults to ! \code{'strict'}, which causes \exception{ValueError} to be raised in case an encoding error occurs. \end{funcdesc} From python-dev@python.org Mon Jul 24 20:35:54 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 24 Jul 2000 12:35:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcurses.tex,1.9,1.10 Message-ID: <200007241935.MAA18556@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv18548/lib Modified Files: libcurses.tex Log Message: Fix small typos and markup consistency nits. Index: libcurses.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** libcurses.tex 2000/07/24 03:28:40 1.9 --- libcurses.tex 2000/07/24 19:35:52 1.10 *************** *** 22,26 **** settings.} \seemodule{curses.textbox}{Editable text widget for curses supporting ! Emacs-like bindings.} \seetext{Tutorial material on using curses with Python is available on the Python Web site as Andrew Kuchling's --- 22,26 ---- settings.} \seemodule{curses.textbox}{Editable text widget for curses supporting ! Emacs-like bindings.} \seetext{Tutorial material on using curses with Python is available on the Python Web site as Andrew Kuchling's *************** *** 350,357 **** input, and disable low-level translation of newline into newline/return on output (but this does not change the behavior of ! addch('\n') which always does the equivalent of return and line feed ! on the virtual screen). With translation off, curses can sometimes speed ! up vertical motion a little; also, it will be able to detect the ! return key on input \end{funcdesc} --- 350,357 ---- input, and disable low-level translation of newline into newline/return on output (but this does not change the behavior of ! \code{addch('\e n')}, which always does the equivalent of return and ! line feed on the virtual screen). With translation off, curses can ! sometimes speed up vertical motion a little; also, it will be able to ! detect the return key on input. \end{funcdesc} From python-dev@python.org Mon Jul 24 23:35:13 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 24 Jul 2000 15:35:13 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_re,1.10,1.11 Message-ID: <200007242235.PAA28623@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv28481/Lib/test/output Modified Files: test_re Log Message: -- updated to include known problems in SRE 0.9.6 (cf. test/output/test_sre) Index: test_re =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_re,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** test_re 1997/07/17 22:37:07 1.10 --- test_re 2000/07/24 22:35:11 1.11 *************** *** 1,415 **** test_re ! ('abc', 'abc', 0, 'found', 'abc') ! ('abc', 'xbc', 1) ! ('abc', 'axc', 1) ! ('abc', 'abx', 1) ! ('abc', 'xabcy', 0, 'found', 'abc') ! ('abc', 'ababc', 0, 'found', 'abc') ! ('ab*c', 'abc', 0, 'found', 'abc') ! ('ab*bc', 'abc', 0, 'found', 'abc') ! ('ab*bc', 'abbc', 0, 'found', 'abbc') ! ('ab*bc', 'abbbbc', 0, 'found', 'abbbbc') ! ('ab+bc', 'abbc', 0, 'found', 'abbc') ! ('ab+bc', 'abc', 1) ! ('ab+bc', 'abq', 1) ! ('ab+bc', 'abbbbc', 0, 'found', 'abbbbc') ! ('ab?bc', 'abbc', 0, 'found', 'abbc') ! ('ab?bc', 'abc', 0, 'found', 'abc') ! ('ab?bc', 'abbbbc', 1) ! ('ab?c', 'abc', 0, 'found', 'abc') ! ('^abc$', 'abc', 0, 'found', 'abc') ! ('^abc$', 'abcc', 1) ! ('^abc', 'abcc', 0, 'found', 'abc') ! ('^abc$', 'aabc', 1) ! ('abc$', 'aabc', 0, 'found', 'abc') ! ('^', 'abc', 0, 'found+"-"', '-') ! ('$', 'abc', 0, 'found+"-"', '-') ! ('a.c', 'abc', 0, 'found', 'abc') ! ('a.c', 'axc', 0, 'found', 'axc') ! ('a.*c', 'axyzc', 0, 'found', 'axyzc') ! ('a.*c', 'axyzd', 1) ! ('a[bc]d', 'abc', 1) ! ('a[bc]d', 'abd', 0, 'found', 'abd') ! ('a[b-d]e', 'abd', 1) ! ('a[b-d]e', 'ace', 0, 'found', 'ace') ! ('a[b-d]', 'aac', 0, 'found', 'ac') ! ('a[-b]', 'a-', 0, 'found', 'a-') ! ('a[\\-b]', 'a-', 0, 'found', 'a-') ! ('a[b-]', 'a-', 2) ! ('a[]b', '-', 2) ! ('a[', '-', 2) ! ('a\\', '-', 2) ! ('abc)', '-', 2) ! ('(abc', '-', 2) ! ('a]', 'a]', 0, 'found', 'a]') ! ('a[]]b', 'a]b', 0, 'found', 'a]b') ! ('a[\\]]b', 'a]b', 0, 'found', 'a]b') ! ('a[^bc]d', 'aed', 0, 'found', 'aed') ! ('a[^bc]d', 'abd', 1) ! ('a[^-b]c', 'adc', 0, 'found', 'adc') ! ('a[^-b]c', 'a-c', 1) ! ('a[^]b]c', 'a]c', 1) ! ('a[^]b]c', 'adc', 0, 'found', 'adc') ! ('\\ba\\b', 'a-', 0, '"-"', '-') ! ('\\ba\\b', '-a', 0, '"-"', '-') ! ('\\ba\\b', '-a-', 0, '"-"', '-') ! ('\\by\\b', 'xy', 1) ! ('\\by\\b', 'yz', 1) ! ('\\by\\b', 'xyz', 1) ! ('ab|cd', 'abc', 0, 'found', 'ab') ! ('ab|cd', 'abcd', 0, 'found', 'ab') ! ('()ef', 'def', 0, 'found+"-"+g1', 'ef-') ! ('$b', 'b', 1) ! ('a\\(b', 'a(b', 0, 'found+"-"+g1', 'a(b-Error') ! ('a\\(*b', 'ab', 0, 'found', 'ab') ! ('a\\(*b', 'a((b', 0, 'found', 'a((b') ! ('a\\\\b', 'a\\b', 0, 'found', 'a\\b') ! ('((a))', 'abc', 0, 'found+"-"+g1+"-"+g2', 'a-a-a') ! ('(a)b(c)', 'abc', 0, 'found+"-"+g1+"-"+g2', 'abc-a-c') ! ('a+b+c', 'aabbabc', 0, 'found', 'abc') ! ('(a+|b)*', 'ab', 0, 'found+"-"+g1', 'ab-b') ! ('(a+|b)+', 'ab', 0, 'found+"-"+g1', 'ab-b') ! ('(a+|b)?', 'ab', 0, 'found+"-"+g1', 'a-a') ! (')(', '-', 2) ! ('[^ab]*', 'cde', 0, 'found', 'cde') ! ('abc', '', 1) ! ('a*', '', 0, 'found', '') ! ('a|b|c|d|e', 'e', 0, 'found', 'e') ! ('(a|b|c|d|e)f', 'ef', 0, 'found+"-"+g1', 'ef-e') ! ('abcd*efg', 'abcdefg', 0, 'found', 'abcdefg') ! ('ab*', 'xabyabbbz', 0, 'found', 'ab') ! ('ab*', 'xayabbbz', 0, 'found', 'a') ! ('(ab|cd)e', 'abcde', 0, 'found+"-"+g1', 'cde-cd') ! ('[abhgefdc]ij', 'hij', 0, 'found', 'hij') ! ('^(ab|cd)e', 'abcde', 1, 'xg1y', 'xy') ! ('(abc|)ef', 'abcdef', 0, 'found+"-"+g1', 'ef-') ! ('(a|b)c*d', 'abcd', 0, 'found+"-"+g1', 'bcd-b') ! ('(ab|ab*)bc', 'abc', 0, 'found+"-"+g1', 'abc-a') ! ('a([bc]*)c*', 'abc', 0, 'found+"-"+g1', 'abc-bc') ! ('a([bc]*)(c*d)', 'abcd', 0, 'found+"-"+g1+"-"+g2', 'abcd-bc-d') ! ('a([bc]+)(c*d)', 'abcd', 0, 'found+"-"+g1+"-"+g2', 'abcd-bc-d') ! ('a([bc]*)(c+d)', 'abcd', 0, 'found+"-"+g1+"-"+g2', 'abcd-b-cd') ! ('a[bcd]*dcdcde', 'adcdcde', 0, 'found', 'adcdcde') ! ('a[bcd]+dcdcde', 'adcdcde', 1) ! ('(ab|a)b*c', 'abc', 0, 'found+"-"+g1', 'abc-ab') ! ('((a)(b)c)(d)', 'abcd', 0, 'g1+"-"+g2+"-"+g3+"-"+g4', 'abc-a-b-d') ! ('[a-zA-Z_][a-zA-Z0-9_]*', 'alpha', 0, 'found', 'alpha') ! ('^a(bc+|b[eh])g|.h$', 'abh', 0, 'found+"-"+g1', 'bh-None') ! ('(bc+d$|ef*g.|h?i(j|k))', 'effgz', 0, 'found+"-"+g1+"-"+g2', 'effgz-effgz-None') ! ('(bc+d$|ef*g.|h?i(j|k))', 'ij', 0, 'found+"-"+g1+"-"+g2', 'ij-ij-j') ! ('(bc+d$|ef*g.|h?i(j|k))', 'effg', 1) ! ('(bc+d$|ef*g.|h?i(j|k))', 'bcdd', 1) ! ('(bc+d$|ef*g.|h?i(j|k))', 'reffgz', 0, 'found+"-"+g1+"-"+g2', 'effgz-effgz-None') ! ('(((((((((a)))))))))', 'a', 0, 'found', 'a') ! ('multiple words of text', 'uh-uh', 1) ! ('multiple words', 'multiple words, yeah', 0, 'found', 'multiple words') ! ('(.*)c(.*)', 'abcde', 0, 'found+"-"+g1+"-"+g2', 'abcde-ab-de') ! ('\\((.*), (.*)\\)', '(a, b)', 0, 'g2+"-"+g1', 'b-a') ! ('[k]', 'ab', 1) ! ('a[-]?c', 'ac', 0, 'found', 'ac') ! ('(abc)\\1', 'abcabc', 0, 'g1', 'abc') ! ('([a-c]*)\\1', 'abcabc', 0, 'g1', 'abc') ! ('^(.+)?B', 'AB', 0, 'g1', 'A') ! ('(a+).\\1$', 'aaaaa', 0, 'found+"-"+g1', 'aaaaa-aa') ! ('^(a+).\\1$', 'aaaa', 1) ! ('(abc)\\1', 'abcabc', 0, 'found+"-"+g1', 'abcabc-abc') ! ('([a-c]+)\\1', 'abcabc', 0, 'found+"-"+g1', 'abcabc-abc') ! ('(a)\\1', 'aa', 0, 'found+"-"+g1', 'aa-a') ! ('(a+)\\1', 'aa', 0, 'found+"-"+g1', 'aa-a') ! ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a') ! ('(a).+\\1', 'aba', 0, 'found+"-"+g1', 'aba-a') ! ('(a)ba*\\1', 'aba', 0, 'found+"-"+g1', 'aba-a') ! ('(aa|a)a\\1$', 'aaa', 0, 'found+"-"+g1', 'aaa-a') ! ('(a|aa)a\\1$', 'aaa', 0, 'found+"-"+g1', 'aaa-a') ! ('(a+)a\\1$', 'aaa', 0, 'found+"-"+g1', 'aaa-a') ! ('([abc]*)\\1', 'abcabc', 0, 'found+"-"+g1', 'abcabc-abc') ! ('(a)(b)c|ab', 'ab', 0, 'found+"-"+g1+"-"+g2', 'ab-None-None') ! ('(a)+x', 'aaax', 0, 'found+"-"+g1', 'aaax-a') ! ('([ac])+x', 'aacx', 0, 'found+"-"+g1', 'aacx-c') ! ('([^/]*/)*sub1/', 'd:msgs/tdir/sub1/trial/away.cpp', 0, 'found+"-"+g1', 'd:msgs/tdir/sub1/-tdir/') ! ('([^.]*)\\.([^:]*):[T ]+(.*)', 'track1.title:TBlah blah blah', 0, 'found+"-"+g1+"-"+g2+"-"+g3', 'track1.title:TBlah blah blah-track1-title-Blah blah blah') ! ('([^N]*N)+', 'abNNxyzN', 0, 'found+"-"+g1', 'abNNxyzN-xyzN') ! ('([^N]*N)+', 'abNNxyz', 0, 'found+"-"+g1', 'abNN-N') ! ('([abc]*)x', 'abcx', 0, 'found+"-"+g1', 'abcx-abc') ! ('([abc]*)x', 'abc', 1) ! ('([xyz]*)x', 'abcx', 0, 'found+"-"+g1', 'x-') ! ('(a)+b|aac', 'aac', 0, 'found+"-"+g1', 'aac-None') ! ('(?Paaa)a', 'aaaa', 2) ! ('(?Paaa)a', 'aaaa', 0, 'found+"-"+id', 'aaaa-aaa') ! ('(?Paa)(?P=id)', 'aaaa', 0, 'found+"-"+id', 'aaaa-aa') ! ('(?Paa)(?P=xd)', 'aaaa', 2) ! ('\\1', 'a', 2) ! ('\\09', '\0009', 0, 'found', '\0009') ! ('\\141', 'a', 0, 'found', 'a') ! ('(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\\119', 'abcdefghijklk9', 0, 'found+"-"+g11', 'abcdefghijklk9-k') ! ('abc', 'abc', 0, 'found', 'abc') ! ('abc', 'xbc', 1) ! ('abc', 'axc', 1) ! ('abc', 'abx', 1) ! ('abc', 'xabcy', 0, 'found', 'abc') ! ('abc', 'ababc', 0, 'found', 'abc') ! ('ab*c', 'abc', 0, 'found', 'abc') ! ('ab*bc', 'abc', 0, 'found', 'abc') ! ('ab*bc', 'abbc', 0, 'found', 'abbc') ! ('ab*bc', 'abbbbc', 0, 'found', 'abbbbc') ! ('ab{0,}bc', 'abbbbc', 0, 'found', 'abbbbc') ! ('ab+bc', 'abbc', 0, 'found', 'abbc') ! ('ab+bc', 'abc', 1) ! ('ab+bc', 'abq', 1) ! ('ab{1,}bc', 'abq', 1) ! ('ab+bc', 'abbbbc', 0, 'found', 'abbbbc') ! ('ab{1,}bc', 'abbbbc', 0, 'found', 'abbbbc') ! ('ab{1,3}bc', 'abbbbc', 0, 'found', 'abbbbc') ! ('ab{3,4}bc', 'abbbbc', 0, 'found', 'abbbbc') ! ('ab{4,5}bc', 'abbbbc', 1) ! ('ab?bc', 'abbc', 0, 'found', 'abbc') ! ('ab?bc', 'abc', 0, 'found', 'abc') ! ('ab{0,1}bc', 'abc', 0, 'found', 'abc') ! ('ab?bc', 'abbbbc', 1) ! ('ab?c', 'abc', 0, 'found', 'abc') ! ('ab{0,1}c', 'abc', 0, 'found', 'abc') ! ('^abc$', 'abc', 0, 'found', 'abc') ! ('^abc$', 'abcc', 1) ! ('^abc', 'abcc', 0, 'found', 'abc') ! ('^abc$', 'aabc', 1) ! ('abc$', 'aabc', 0, 'found', 'abc') ! ('^', 'abc', 0, 'found', '') ! ('$', 'abc', 0, 'found', '') ! ('a.c', 'abc', 0, 'found', 'abc') ! ('a.c', 'axc', 0, 'found', 'axc') ! ('a.*c', 'axyzc', 0, 'found', 'axyzc') ! ('a.*c', 'axyzd', 1) ! ('a[bc]d', 'abc', 1) ! ('a[bc]d', 'abd', 0, 'found', 'abd') ! ('a[b-d]e', 'abd', 1) ! ('a[b-d]e', 'ace', 0, 'found', 'ace') ! ('a[b-d]', 'aac', 0, 'found', 'ac') ! ('a[-b]', 'a-', 0, 'found', 'a-') ! ('a[b-]', 'a-', 0, 'found', 'a-') ! ('a[b-a]', '-', 2) ! ('a[]b', '-', 2) ! ('a[', '-', 2) ! ('a]', 'a]', 0, 'found', 'a]') ! ('a[]]b', 'a]b', 0, 'found', 'a]b') ! ('a[^bc]d', 'aed', 0, 'found', 'aed') ! ('a[^bc]d', 'abd', 1) ! ('a[^-b]c', 'adc', 0, 'found', 'adc') ! ('a[^-b]c', 'a-c', 1) ! ('a[^]b]c', 'a]c', 1) ! ('a[^]b]c', 'adc', 0, 'found', 'adc') ! ('ab|cd', 'abc', 0, 'found', 'ab') ! ('ab|cd', 'abcd', 0, 'found', 'ab') ! ('()ef', 'def', 0, 'found+"-"+g1', 'ef-') ! ('*a', '-', 2) ! ('(*)b', '-', 2) ! ('$b', 'b', 1) ! ('a\\', '-', 2) ! ('a\\(b', 'a(b', 0, 'found+"-"+g1', 'a(b-Error') ! ('a\\(*b', 'ab', 0, 'found', 'ab') ! ('a\\(*b', 'a((b', 0, 'found', 'a((b') ! ('a\\\\b', 'a\\b', 0, 'found', 'a\\b') ! ('abc)', '-', 2) ! ('(abc', '-', 2) ! ('((a))', 'abc', 0, 'found+"-"+g1+"-"+g2', 'a-a-a') ! ('(a)b(c)', 'abc', 0, 'found+"-"+g1+"-"+g2', 'abc-a-c') ! ('a+b+c', 'aabbabc', 0, 'found', 'abc') ! ('a{1,}b{1,}c', 'aabbabc', 0, 'found', 'abc') ! ('a**', '-', 2) ! ('a.+?c', 'abcabc', 0, 'found', 'abc') ! ('(a+|b)*', 'ab', 0, 'found+"-"+g1', 'ab-b') ! ('(a+|b){0,}', 'ab', 0, 'found+"-"+g1', 'ab-b') ! ('(a+|b)+', 'ab', 0, 'found+"-"+g1', 'ab-b') ! ('(a+|b){1,}', 'ab', 0, 'found+"-"+g1', 'ab-b') ! ('(a+|b)?', 'ab', 0, 'found+"-"+g1', 'a-a') ! ('(a+|b){0,1}', 'ab', 0, 'found+"-"+g1', 'a-a') ! (')(', '-', 2) ! ('[^ab]*', 'cde', 0, 'found', 'cde') ! ('abc', '', 1) ! ('a*', '', 0, 'found', '') ! ('([abc])*d', 'abbbcd', 0, 'found+"-"+g1', 'abbbcd-c') ! ('([abc])*bcd', 'abcd', 0, 'found+"-"+g1', 'abcd-a') ! ('a|b|c|d|e', 'e', 0, 'found', 'e') ! ('(a|b|c|d|e)f', 'ef', 0, 'found+"-"+g1', 'ef-e') ! ('abcd*efg', 'abcdefg', 0, 'found', 'abcdefg') ! ('ab*', 'xabyabbbz', 0, 'found', 'ab') ! ('ab*', 'xayabbbz', 0, 'found', 'a') ! ('(ab|cd)e', 'abcde', 0, 'found+"-"+g1', 'cde-cd') ! ('[abhgefdc]ij', 'hij', 0, 'found', 'hij') ! ('^(ab|cd)e', 'abcde', 1) ! ('(abc|)ef', 'abcdef', 0, 'found+"-"+g1', 'ef-') ! ('(a|b)c*d', 'abcd', 0, 'found+"-"+g1', 'bcd-b') ! ('(ab|ab*)bc', 'abc', 0, 'found+"-"+g1', 'abc-a') ! ('a([bc]*)c*', 'abc', 0, 'found+"-"+g1', 'abc-bc') ! ('a([bc]*)(c*d)', 'abcd', 0, 'found+"-"+g1+"-"+g2', 'abcd-bc-d') ! ('a([bc]+)(c*d)', 'abcd', 0, 'found+"-"+g1+"-"+g2', 'abcd-bc-d') ! ('a([bc]*)(c+d)', 'abcd', 0, 'found+"-"+g1+"-"+g2', 'abcd-b-cd') ! ('a[bcd]*dcdcde', 'adcdcde', 0, 'found', 'adcdcde') ! ('a[bcd]+dcdcde', 'adcdcde', 1) ! ('(ab|a)b*c', 'abc', 0, 'found+"-"+g1', 'abc-ab') ! ('((a)(b)c)(d)', 'abcd', 0, 'g1+"-"+g2+"-"+g3+"-"+g4', 'abc-a-b-d') ! ('[a-zA-Z_][a-zA-Z0-9_]*', 'alpha', 0, 'found', 'alpha') ! ('^a(bc+|b[eh])g|.h$', 'abh', 0, 'found+"-"+g1', 'bh-None') ! ('(bc+d$|ef*g.|h?i(j|k))', 'effgz', 0, 'found+"-"+g1+"-"+g2', 'effgz-effgz-None') ! ('(bc+d$|ef*g.|h?i(j|k))', 'ij', 0, 'found+"-"+g1+"-"+g2', 'ij-ij-j') ! ('(bc+d$|ef*g.|h?i(j|k))', 'effg', 1) ! ('(bc+d$|ef*g.|h?i(j|k))', 'bcdd', 1) ! ('(bc+d$|ef*g.|h?i(j|k))', 'reffgz', 0, 'found+"-"+g1+"-"+g2', 'effgz-effgz-None') ! ('((((((((((a))))))))))', 'a', 0, 'g10', 'a') ! ('((((((((((a))))))))))\\10', 'aa', 0, 'found', 'aa') ! ('((((((((((a))))))))))\\41', '', 2) ! ('(((((((((a)))))))))', 'a', 0, 'found', 'a') ! ('multiple words of text', 'uh-uh', 1) ! ('multiple words', 'multiple words, yeah', 0, 'found', 'multiple words') ! ('(.*)c(.*)', 'abcde', 0, 'found+"-"+g1+"-"+g2', 'abcde-ab-de') ! ('\\((.*), (.*)\\)', '(a, b)', 0, 'g2+"-"+g1', 'b-a') ! ('[k]', 'ab', 1) ! ('a[-]?c', 'ac', 0, 'found', 'ac') ! ('(abc)\\1', 'abcabc', 0, 'g1', 'abc') ! ('([a-c]*)\\1', 'abcabc', 0, 'g1', 'abc') ! ('(?i)abc', 'ABC', 0, 'found', 'ABC') ! ('(?i)abc', 'XBC', 1) ! ('(?i)abc', 'AXC', 1) ! ('(?i)abc', 'ABX', 1) ! ('(?i)abc', 'XABCY', 0, 'found', 'ABC') ! ('(?i)abc', 'ABABC', 0, 'found', 'ABC') ! ('(?i)ab*c', 'ABC', 0, 'found', 'ABC') ! ('(?i)ab*bc', 'ABC', 0, 'found', 'ABC') ! ('(?i)ab*bc', 'ABBC', 0, 'found', 'ABBC') ! ('(?i)ab*?bc', 'ABBBBC', 0, 'found', 'ABBBBC') ! ('(?i)ab{0,}?bc', 'ABBBBC', 0, 'found', 'ABBBBC') ! ('(?i)ab+?bc', 'ABBC', 0, 'found', 'ABBC') ! ('(?i)ab+bc', 'ABC', 1) ! ('(?i)ab+bc', 'ABQ', 1) ! ('(?i)ab{1,}bc', 'ABQ', 1) ! ('(?i)ab+bc', 'ABBBBC', 0, 'found', 'ABBBBC') ! ('(?i)ab{1,}?bc', 'ABBBBC', 0, 'found', 'ABBBBC') ! ('(?i)ab{1,3}?bc', 'ABBBBC', 0, 'found', 'ABBBBC') ! ('(?i)ab{3,4}?bc', 'ABBBBC', 0, 'found', 'ABBBBC') ! ('(?i)ab{4,5}?bc', 'ABBBBC', 1) ! ('(?i)ab??bc', 'ABBC', 0, 'found', 'ABBC') ! ('(?i)ab??bc', 'ABC', 0, 'found', 'ABC') ! ('(?i)ab{0,1}?bc', 'ABC', 0, 'found', 'ABC') ! ('(?i)ab??bc', 'ABBBBC', 1) ! ('(?i)ab??c', 'ABC', 0, 'found', 'ABC') ! ('(?i)ab{0,1}?c', 'ABC', 0, 'found', 'ABC') ! ('(?i)^abc$', 'ABC', 0, 'found', 'ABC') ! ('(?i)^abc$', 'ABCC', 1) ! ('(?i)^abc', 'ABCC', 0, 'found', 'ABC') ! ('(?i)^abc$', 'AABC', 1) ! ('(?i)abc$', 'AABC', 0, 'found', 'ABC') ! ('(?i)^', 'ABC', 0, 'found', '') ! ('(?i)$', 'ABC', 0, 'found', '') ! ('(?i)a.c', 'ABC', 0, 'found', 'ABC') ! ('(?i)a.c', 'AXC', 0, 'found', 'AXC') ! ('(?i)a.*?c', 'AXYZC', 0, 'found', 'AXYZC') ! ('(?i)a.*c', 'AXYZD', 1) ! ('(?i)a[bc]d', 'ABC', 1) ! ('(?i)a[bc]d', 'ABD', 0, 'found', 'ABD') ! ('(?i)a[b-d]e', 'ABD', 1) ! ('(?i)a[b-d]e', 'ACE', 0, 'found', 'ACE') ! ('(?i)a[b-d]', 'AAC', 0, 'found', 'AC') ! ('(?i)a[-b]', 'A-', 0, 'found', 'A-') ! ('(?i)a[b-]', 'A-', 0, 'found', 'A-') ! ('(?i)a[b-a]', '-', 2) ! ('(?i)a[]b', '-', 2) ! ('(?i)a[', '-', 2) ! ('(?i)a]', 'A]', 0, 'found', 'A]') ! ('(?i)a[]]b', 'A]B', 0, 'found', 'A]B') ! ('(?i)a[^bc]d', 'AED', 0, 'found', 'AED') ! ('(?i)a[^bc]d', 'ABD', 1) ! ('(?i)a[^-b]c', 'ADC', 0, 'found', 'ADC') ! ('(?i)a[^-b]c', 'A-C', 1) ! ('(?i)a[^]b]c', 'A]C', 1) ! ('(?i)a[^]b]c', 'ADC', 0, 'found', 'ADC') ! ('(?i)ab|cd', 'ABC', 0, 'found', 'AB') ! ('(?i)ab|cd', 'ABCD', 0, 'found', 'AB') ! ('(?i)()ef', 'DEF', 0, 'found+"-"+g1', 'EF-') ! ('(?i)*a', '-', 2) ! ('(?i)(*)b', '-', 2) ! ('(?i)$b', 'B', 1) ! ('(?i)a\\', '-', 2) ! ('(?i)a\\(b', 'A(B', 0, 'found+"-"+g1', 'A(B-Error') ! ('(?i)a\\(*b', 'AB', 0, 'found', 'AB') ! ('(?i)a\\(*b', 'A((B', 0, 'found', 'A((B') ! ('(?i)a\\\\b', 'A\\B', 0, 'found', 'A\\B') ! ('(?i)abc)', '-', 2) ! ('(?i)(abc', '-', 2) ! ('(?i)((a))', 'ABC', 0, 'found+"-"+g1+"-"+g2', 'A-A-A') ! ('(?i)(a)b(c)', 'ABC', 0, 'found+"-"+g1+"-"+g2', 'ABC-A-C') ! ('(?i)a+b+c', 'AABBABC', 0, 'found', 'ABC') ! ('(?i)a{1,}b{1,}c', 'AABBABC', 0, 'found', 'ABC') ! ('(?i)a**', '-', 2) ! ('(?i)a.+?c', 'ABCABC', 0, 'found', 'ABC') ! ('(?i)a.*?c', 'ABCABC', 0, 'found', 'ABC') ! ('(?i)a.{0,5}?c', 'ABCABC', 0, 'found', 'ABC') ! ('(?i)(a+|b)*', 'AB', 0, 'found+"-"+g1', 'AB-B') ! ('(?i)(a+|b){0,}', 'AB', 0, 'found+"-"+g1', 'AB-B') ! ('(?i)(a+|b)+', 'AB', 0, 'found+"-"+g1', 'AB-B') ! ('(?i)(a+|b){1,}', 'AB', 0, 'found+"-"+g1', 'AB-B') ! ('(?i)(a+|b)?', 'AB', 0, 'found+"-"+g1', 'A-A') ! ('(?i)(a+|b){0,1}', 'AB', 0, 'found+"-"+g1', 'A-A') ! ('(?i)(a+|b){0,1}?', 'AB', 0, 'found+"-"+g1', '-None') ! ('(?i))(', '-', 2) ! ('(?i)[^ab]*', 'CDE', 0, 'found', 'CDE') ! ('(?i)abc', '', 1) ! ('(?i)a*', '', 0, 'found', '') ! ('(?i)([abc])*d', 'ABBBCD', 0, 'found+"-"+g1', 'ABBBCD-C') ! ('(?i)([abc])*bcd', 'ABCD', 0, 'found+"-"+g1', 'ABCD-A') ! ('(?i)a|b|c|d|e', 'E', 0, 'found', 'E') ! ('(?i)(a|b|c|d|e)f', 'EF', 0, 'found+"-"+g1', 'EF-E') ! ('(?i)abcd*efg', 'ABCDEFG', 0, 'found', 'ABCDEFG') ! ('(?i)ab*', 'XABYABBBZ', 0, 'found', 'AB') ! ('(?i)ab*', 'XAYABBBZ', 0, 'found', 'A') ! ('(?i)(ab|cd)e', 'ABCDE', 0, 'found+"-"+g1', 'CDE-CD') ! ('(?i)[abhgefdc]ij', 'HIJ', 0, 'found', 'HIJ') ! ('(?i)^(ab|cd)e', 'ABCDE', 1) ! ('(?i)(abc|)ef', 'ABCDEF', 0, 'found+"-"+g1', 'EF-') ! ('(?i)(a|b)c*d', 'ABCD', 0, 'found+"-"+g1', 'BCD-B') ! ('(?i)(ab|ab*)bc', 'ABC', 0, 'found+"-"+g1', 'ABC-A') ! ('(?i)a([bc]*)c*', 'ABC', 0, 'found+"-"+g1', 'ABC-BC') ! ('(?i)a([bc]*)(c*d)', 'ABCD', 0, 'found+"-"+g1+"-"+g2', 'ABCD-BC-D') ! ('(?i)a([bc]+)(c*d)', 'ABCD', 0, 'found+"-"+g1+"-"+g2', 'ABCD-BC-D') ! ('(?i)a([bc]*)(c+d)', 'ABCD', 0, 'found+"-"+g1+"-"+g2', 'ABCD-B-CD') ! ('(?i)a[bcd]*dcdcde', 'ADCDCDE', 0, 'found', 'ADCDCDE') ! ('(?i)a[bcd]+dcdcde', 'ADCDCDE', 1) ! ('(?i)(ab|a)b*c', 'ABC', 0, 'found+"-"+g1', 'ABC-AB') ! ('(?i)((a)(b)c)(d)', 'ABCD', 0, 'g1+"-"+g2+"-"+g3+"-"+g4', 'ABC-A-B-D') ! ('(?i)[a-zA-Z_][a-zA-Z0-9_]*', 'ALPHA', 0, 'found', 'ALPHA') ! ('(?i)^a(bc+|b[eh])g|.h$', 'ABH', 0, 'found+"-"+g1', 'BH-None') ! ('(?i)(bc+d$|ef*g.|h?i(j|k))', 'EFFGZ', 0, 'found+"-"+g1+"-"+g2', 'EFFGZ-EFFGZ-None') ! ('(?i)(bc+d$|ef*g.|h?i(j|k))', 'IJ', 0, 'found+"-"+g1+"-"+g2', 'IJ-IJ-J') ! ('(?i)(bc+d$|ef*g.|h?i(j|k))', 'EFFG', 1) ! ('(?i)(bc+d$|ef*g.|h?i(j|k))', 'BCDD', 1) ! ('(?i)(bc+d$|ef*g.|h?i(j|k))', 'REFFGZ', 0, 'found+"-"+g1+"-"+g2', 'EFFGZ-EFFGZ-None') ! ('(?i)((((((((((a))))))))))', 'A', 0, 'g10', 'A') ! ('(?i)((((((((((a))))))))))\\10', 'AA', 0, 'found', 'AA') ! ('(?i)((((((((((a))))))))))\\41', '', 2) ! ('(?i)(((((((((a)))))))))', 'A', 0, 'found', 'A') ! ('(?i)(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))', 'A', 0, 'g1', 'A') ! ('(?i)(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))', 'C', 0, 'g1', 'C') ! ('(?i)multiple words of text', 'UH-UH', 1) ! ('(?i)multiple words', 'MULTIPLE WORDS, YEAH', 0, 'found', 'MULTIPLE WORDS') ! ('(?i)(.*)c(.*)', 'ABCDE', 0, 'found+"-"+g1+"-"+g2', 'ABCDE-AB-DE') ! ('(?i)\\((.*), (.*)\\)', '(A, B)', 0, 'g2+"-"+g1', 'B-A') ! ('(?i)[k]', 'AB', 1) ! ('(?i)a[-]?c', 'AC', 0, 'found', 'AC') ! ('(?i)(abc)\\1', 'ABCABC', 0, 'g1', 'ABC') ! ('(?i)([a-c]*)\\1', 'ABCABC', 0, 'g1', 'ABC') ! ('a(?:b|c|d)(.)', 'ace', 0, 'g1', 'e') ! ('a(?:b|c|d)*(.)', 'ace', 0, 'g1', 'e') ! ('a(?:b|c|d)+?(.)', 'ace', 0, 'g1', 'e') ! ('a(?:b|(c|e){1,2}?|d)+?(.)', 'ace', 0, 'g1 + g2', 'ce') ! ('^(.+)?B', 'AB', 0, 'g1', 'A') ! ('w(?# comment', 'w', 2) ! ('w(?# comment 1)xy(?# comment 2)z', 'wxyz', 0, 'found', 'wxyz') ! ('w(?i)', 'W', 2) ! ('(?x)w# comment 1\012 x y\012\011# comment 2\012\011z', 'wxyz', 0, 'found', 'wxyz') ! ('^abc', 'jkl\012abc\012xyz', 1) ! ('(?m)^abc', 'jkl\012abc\012xyz', 0, 'found', 'abc') ! ('(?m)abc$', 'jkl\012xyzabc\012123', 0, 'found', 'abc') ! ('a.b', 'a\012b', 1) ! ('(?s)a.b', 'a\012b', 0, 'found', 'a\012b') ! ('\\w+', '--ab_cd0123--', 0, 'found', 'ab_cd0123') ! ('\\D+', '1234abc5678', 0, 'found', 'abc') ! ('[\\da-fA-F]+', '123abc', 0, 'found', '123abc') ! ('[\\d-x]', '-', 2) --- 1,12 ---- test_re ! === Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A') ! === Fails on case-insensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A') ! === Fails on locale-sensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A') ! === Failed incorrectly ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a') ! === Fails on case-insensitive match ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a') ! === Fails on locale-sensitive match ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a') ! === grouping error ('(a)(b)c|ab', 'ab', 0, 'found+"-"+g1+"-"+g2', 'ab-None-None') 'ab-None-b' should be 'ab-None-None' ! === grouping error ('(a)+b|aac', 'aac', 0, 'found+"-"+g1', 'aac-None') 'aac-a' should be 'aac-None' ! === Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A') ! === Fails on case-insensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A') ! === Fails on locale-sensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A') From python-dev@python.org Tue Jul 25 00:03:37 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 24 Jul 2000 16:03:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools mkhowto,1.9,1.10 Message-ID: <200007242303.QAA05260@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory slayer.i.sourceforge.net:/tmp/cvs-serv5251/tools Modified Files: mkhowto Log Message: Only use one initialization file for LaTeX2HTML; more recent versions only use the last one specified on the command line instead of all of them. Smaller changes to reflect updated support. Index: mkhowto =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkhowto,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** mkhowto 2000/06/29 23:01:40 1.9 --- mkhowto 2000/07/24 23:03:32 1.10 *************** *** 331,335 **** os.mkdir(builddir) args = [LATEX2HTML_BINARY, - "-init_file", L2H_INIT_FILE, "-init_file", self.l2h_aux_init_file, "-dir", builddir, --- 331,334 ---- *************** *** 363,369 **** def write_l2h_aux_init_file(self): fp = open(self.l2h_aux_init_file, "w") ! fp.write("# auxillary init file for latex2html\n" "# generated by mkhowto\n" "$NO_AUTO_LINK = 1;\n" ) options = self.options --- 362,372 ---- def write_l2h_aux_init_file(self): fp = open(self.l2h_aux_init_file, "w") ! fp.write(open(L2H_INIT_FILE).read()) ! fp.write("\n" ! "# auxillary init file for latex2html\n" "# generated by mkhowto\n" + "push (@INC, '%s');\n" "$NO_AUTO_LINK = 1;\n" + % os.path.dirname(L2H_INIT_FILE) ) options = self.options *************** *** 374,379 **** l2hoption(fp, "MAX_LINK_DEPTH", options.max_link_depth) l2hoption(fp, "MAX_SPLIT_DEPTH", options.max_split_depth) - # this line needed in case $IMAGE_TYPE changed - fp.write("adjust_icon_information();\n") fp.write("1;\n") fp.close() --- 377,380 ---- From python-dev@python.org Tue Jul 25 00:54:52 2000 From: python-dev@python.org (A.M. Kuchling) Date: Mon, 24 Jul 2000 16:54:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.32,2.33 Message-ID: <200007242354.QAA08816@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8754 Modified Files: _cursesmodule.c Log Message: Bug report and partial patch from Michael Deegan : reversed tests resulted in an exception when you supplied the correct number of arguments Index: _cursesmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -r2.32 -r2.33 *** _cursesmodule.c 2000/07/21 06:00:06 2.32 --- _cursesmodule.c 2000/07/24 23:54:49 2.33 *************** *** 1438,1442 **** PyCursesInitialisedColor ! if (ARG_COUNT(args)!=1) { PyErr_SetString(PyExc_TypeError, "color_pair requires 1 argument"); return NULL; --- 1438,1442 ---- PyCursesInitialisedColor ! if (ARG_COUNT(args) != 1) { PyErr_SetString(PyExc_TypeError, "color_pair requires 1 argument"); return NULL; *************** *** 1453,1457 **** PyCursesInitialised ! if (ARG_COUNT(args)==1) { PyErr_SetString(PyExc_TypeError, "curs_set requires 1 argument"); return NULL; --- 1453,1457 ---- PyCursesInitialised ! if (ARG_COUNT(args)!=1) { PyErr_SetString(PyExc_TypeError, "curs_set requires 1 argument"); return NULL; *************** *** 1473,1477 **** PyCursesInitialised ! if (ARG_COUNT(args)==1) { PyErr_SetString(PyExc_TypeError, "delay_output requires 1 argument"); return NULL; --- 1473,1477 ---- PyCursesInitialised ! if (ARG_COUNT(args) != 1) { PyErr_SetString(PyExc_TypeError, "delay_output requires 1 argument"); return NULL; *************** *** 1638,1642 **** PyCursesInitialisedColor ! if (ARG_COUNT(args) == 3) { PyErr_SetString(PyExc_TypeError, "init_pair requires 3 arguments"); return NULL; --- 1638,1642 ---- PyCursesInitialisedColor ! if (ARG_COUNT(args) != 3) { PyErr_SetString(PyExc_TypeError, "init_pair requires 3 arguments"); return NULL; From python-dev@python.org Tue Jul 25 01:51:34 2000 From: python-dev@python.org (A.M. Kuchling) Date: Mon, 24 Jul 2000 17:51:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_select.py,1.9,1.10 Message-ID: <200007250051.RAA19916@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv19907 Modified Files: test_select.py Log Message: Made an error message slightly more useful if select() returns something goofy Index: test_select.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_select.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** test_select.py 2000/07/11 15:15:30 1.9 --- test_select.py 2000/07/25 00:51:31 1.10 *************** *** 57,61 **** break continue ! print 'Heh?' p.close() --- 57,61 ---- break continue ! print 'Unexpected return values from select():', rfd, wfd, xfd p.close() From python-dev@python.org Tue Jul 25 03:13:45 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 24 Jul 2000 19:13:45 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.10,1.11 Message-ID: <200007250213.TAA07245@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv7237 Modified Files: pep-0000.txt Log Message: Abscond with PEP-0160 for the 1.6 release schedule. Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** pep-0000.txt 2000/07/24 19:01:22 1.10 --- pep-0000.txt 2000/07/25 02:13:43 1.11 *************** *** 19,22 **** --- 19,24 ---- 1 pep-0001.txt PEP Guidelines bwarsaw, jhylton + 160 pep-0160.txt Python 1.6 Release Schedule fdrake + 200 pep-0200.txt Python 2.0 Release Schedule jhylton 201 pep-0201.txt Parallel Iteration bwarsaw From python-dev@python.org Tue Jul 25 03:26:41 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 24 Jul 2000 19:26:41 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.11,1.12 Message-ID: <200007250226.TAA07962@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv7950 Modified Files: pep-0000.txt Log Message: Minor formatting cleanup; columns should line up with headers. Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** pep-0000.txt 2000/07/25 02:13:43 1.11 --- pep-0000.txt 2000/07/25 02:26:38 1.12 *************** *** 14,40 **** Index ! num filename title owner ! --- ----------- ----- ----- ! 0 pep-0000.txt Index of Python Enhance Proposals bwarsaw ! 1 pep-0001.txt PEP Guidelines bwarsaw, jhylton ! 160 pep-0160.txt Python 1.6 Release Schedule fdrake ! 200 pep-0200.txt Python 2.0 Release Schedule jhylton ! 201 pep-0201.txt Parallel Iteration bwarsaw ! 202 pep-0202.txt List Comprehensions tim_one ! 203 pep-0203.txt Augmented Assignments twouters ! 204 pep-0204.txt Range Literals twouters ! 205 pep-0205.txt Weak References fdrake ! 206 pep-0206.txt 2.0 Batteries Included moshez ! 207 pep-0207.txt Rich Comparisons davida ! 208 pep-0208.txt Reworking the Coercion Model davida ! 209 pep-0209.txt Adding Multidimensional Arrays davida ! 210 pep-0210.txt Decoupling the Interpreter Loop davida ! 211 pep-0211.txt Adding New Operators to Python gvwilson ! 212 pep-0212.txt Additional Builtin Generators bwarsaw ! 213 pep-0213.txt Attribute Access Handlers prescod ! 214 pep-0214.txt Extended Print Statement bwarsaw ! 215 pep-0215.txt String Interpolation ping --- 14,40 ---- Index ! num filename title owner ! --- ------------ ----- ----- ! 0 pep-0000.txt Index of Python Enhance Proposals bwarsaw ! 1 pep-0001.txt PEP Guidelines bwarsaw, jhylton ! 160 pep-0160.txt Python 1.6 Release Schedule fdrake ! 200 pep-0200.txt Python 2.0 Release Schedule jhylton ! 201 pep-0201.txt Parallel Iteration bwarsaw ! 202 pep-0202.txt List Comprehensions tim_one ! 203 pep-0203.txt Augmented Assignments twouters ! 204 pep-0204.txt Range Literals twouters ! 205 pep-0205.txt Weak References fdrake ! 206 pep-0206.txt 2.0 Batteries Included moshez ! 207 pep-0207.txt Rich Comparisons davida ! 208 pep-0208.txt Reworking the Coercion Model davida ! 209 pep-0209.txt Adding Multidimensional Arrays davida ! 210 pep-0210.txt Decoupling the Interpreter Loop davida ! 211 pep-0211.txt Adding New Operators to Python gvwilson ! 212 pep-0212.txt Additional Builtin Generators bwarsaw ! 213 pep-0213.txt Attribute Access Handlers prescod ! 214 pep-0214.txt Extended Print Statement bwarsaw ! 215 pep-0215.txt String Interpolation ping From python-dev@python.org Tue Jul 25 04:25:17 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 24 Jul 2000 20:25:17 -0700 Subject: [Python-checkins] CVS: python/nondist/peps .cvsignore,NONE,1.1 Message-ID: <200007250325.UAA25237@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv25231 Added Files: .cvsignore Log Message: Tell CVS to ignore generated HTML files. --- NEW FILE --- pep-????.html From python-dev@python.org Tue Jul 25 04:38:55 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 24 Jul 2000 20:38:55 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0160.txt,NONE,1.1 Message-ID: <200007250338.UAA26063@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv26056 Added Files: pep-0160.txt Log Message: Start of 1.6 release schedule. --- NEW FILE --- PEP: 160 Title: Python 1.6 Release Schedule Version: $Revision: 1.1 $ Owner: fdrake@beopen.com (Fred L. Drake, Jr.) Python-Version: 2.0 Status: Incomplete Introduction This PEP describes the Python 1.6 release schedule, tracking the status and ownership of the major new features, summarizes discussions held in mailing list forums, and provides URLs for further information, patches, and other outstanding issues. The CVS revision history of this file contains the definitive historical record. Schedule August 1 1.6 beta 1 release. August 15 1.6 final release. Features A number of features are required for Python 1.6 in order to fulfill the various promises that have been made. The following are required to be fully operational, documented, and forward compatible with the plans for Python 2.0: * Unicode support: The Unicode object defined for Python 2.0 must be provided, including all methods and codec support. Local Variables: mode: indented-text indent-tabs-mode: nil End: From python-dev@python.org Tue Jul 25 04:51:46 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 24 Jul 2000 20:51:46 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep2html.py,1.2,1.3 Message-ID: <200007250351.UAA26810@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv26749 Modified Files: pep2html.py Log Message: Revise the generated HTML to be a little nicer, but still pretty simple. Also add a -n option to suppress installing the generated HTML at SourceForge to allow local use. Index: pep2html.py =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pep2html.py 2000/07/20 22:44:36 1.2 --- pep2html.py 2000/07/25 03:51:44 1.3 *************** *** 3,10 **** convert PEP's to (X)HTML - courtesy of /F ! Syntax: pep2html [sf_username] The user name 'sf_username' is used to upload the converted files to the web pages at source forge. """ --- 3,14 ---- convert PEP's to (X)HTML - courtesy of /F ! Syntax: pep2html [-n] [sf_username] The user name 'sf_username' is used to upload the converted files to the web pages at source forge. + + If -n is given, the script doesn't actually try to install the + generated HTML at SourceForge. + """ *************** *** 14,31 **** # tags. but if I change that, the result doesn't look very nice... ! DTD = ('') fixpat = re.compile("((http|ftp):[-_a-zA-Z0-9/.+~:?#$=&]+)|(pep-\d+(.txt)?)|.") ! def fixanchor(match): text = match.group(0) link = None if text[:5] == "http:" or text[:4] == "ftp:": link = text ! elif text[:3] == "pep": link = os.path.splitext(text)[0] + ".html" if link: ! return "%s" % (link, cgi.escape(link)) return cgi.escape(match.group(0)) # really slow, but it works... --- 18,35 ---- # tags. but if I change that, the result doesn't look very nice... ! DTD = ('') fixpat = re.compile("((http|ftp):[-_a-zA-Z0-9/.+~:?#$=&]+)|(pep-\d+(.txt)?)|.") ! def fixanchor(current, match): text = match.group(0) link = None if text[:5] == "http:" or text[:4] == "ftp:": link = text ! elif text[:4] == "pep-" and text != current: link = os.path.splitext(text)[0] + ".html" if link: ! return "%s" % (link, cgi.escape(text)) return cgi.escape(match.group(0)) # really slow, but it works... *************** *** 34,41 **** fi = open(infile) fo = open(outfile, "w") ! fo.write("%s\n\n" % DTD) # head header = [] - fo.write("\n") pep = "" title = "" --- 38,44 ---- fi = open(infile) fo = open(outfile, "w") ! fo.write(DTD + "\n\n\n") # head header = [] pep = "" title = "" *************** *** 58,70 **** # body fo.write("\n") ! fo.write("
    \n")
    !     fo.write("[home]")
    !     if os.path.basename(file) != "pep-0000.txt":
    !         fo.write(" [index]")
    !     fo.write("\n
    \n") ! # fo.write("\n

    \n")
          for k, v in header:
    !         fo.write("%s: %s\n" % (cgi.escape(k), cgi.escape(v)))
          title = 0
          while 1:
              line = fi.readline()
    --- 61,73 ----
          # body
          fo.write("\n")
    !     fo.write("[home]\n")
    !     if os.path.basename(infile) != "pep-0000.txt":
    !         fo.write("[index]\n")
    !     fo.write("
    \n\n") for k, v in header: ! fo.write(" \n" ! % (cgi.escape(k), cgi.escape(v))) title = 0 + fo.write("
    %s:%s
    \n
    ")
          while 1:
              line = fi.readline()
    ***************
    *** 72,87 ****
                  break
              if line[:1] == "\f":
    !             fo.write("\n
    \n") # fo.write("\n

    \n")
                  title = 1
    !         elif title >= 0:
    !             line = fixpat.sub(fixanchor, line)
                  if title:
                      if line.strip() == "Local Variables:":
    !                     title = -1
    !                 else:
    !                     fo.write("

    %s

    \n" % line) ! # fo.write("

    %s

    \n" % line)
    !                     title = 0
                  else:
                      fo.write(line)
    --- 75,89 ----
                  break
              if line[:1] == "\f":
    !             fo.write("
    ") # fo.write("\n

    \n")
                  title = 1
    !         else:
    !             line = fixpat.sub(lambda x, c=infile: fixanchor(c, x), line)
                  if title:
                      if line.strip() == "Local Variables:":
    !                     break
    !                 fo.write("
    \n

    %s

    \n
    " % line.strip())
    !                 # fo.write("

    %s

    \n" % line)
    !                 title = 0
                  else:
                      fo.write(line)
    ***************
    *** 89,103 ****
          fo.write("\n")
          fo.write("\n")
      
    ! for file in glob.glob("pep-*.txt"):
    !     print file, "..."
    !     fixfile(file, os.path.splitext(file)[0] + ".html")
    ! 
    ! if len(sys.argv) == 1:
    !     username = ""
    ! elif len(sys.argv) == 2:
    !     username = sys.argv[1]+"@"
    ! else:
    !     raise "Syntax: "+sys.argv[0]+" [sf_username]"
    !     
    ! os.system("scp pep-*.html "+username+"shell.sourceforge.net:/home/groups/python/htdocs/peps")
    --- 91,118 ----
          fo.write("\n")
          fo.write("\n")
    + 
    + 
    + def main():
    +     update = 1
    +     for file in glob.glob("pep-*.txt"):
    +         print file, "..."
    +         fixfile(file, os.path.splitext(file)[0] + ".html")
    + 
    +     if len(sys.argv) > 1 and sys.argv[1] == "-n":
    +         update = 0
    +         del sys.argv[1]
    + 
    +     if len(sys.argv) == 1:
    +         username = ""
    +     elif len(sys.argv) == 2:
    +         username = sys.argv[1]+"@"
    +     else:
    +         raise "Syntax: "+sys.argv[0]+" [-n] [sf_username]"
    + 
    +     if update:
    +         os.system("scp pep-*.html " + username
    +                   + "shell.sourceforge.net:/home/groups/python/htdocs/peps")
    + 
      
    ! if __name__ == "__main__":
    !     main()
    
    
    
    From python-dev@python.org  Tue Jul 25 05:01:00 2000
    From: python-dev@python.org (Fred L. Drake)
    Date: Mon, 24 Jul 2000 21:01:00 -0700
    Subject: [Python-checkins] CVS: python/nondist/peps pep-0160.txt,1.1,1.2
    Message-ID: <200007250401.VAA30357@slayer.i.sourceforge.net>
    
    Update of /cvsroot/python/python/nondist/peps
    In directory slayer.i.sourceforge.net:/tmp/cvs-serv30219
    
    Modified Files:
    	pep-0160.txt 
    Log Message:
    
    Add statement that this in the public domain.
    
    
    Index: pep-0160.txt
    ===================================================================
    RCS file: /cvsroot/python/python/nondist/peps/pep-0160.txt,v
    retrieving revision 1.1
    retrieving revision 1.2
    diff -C2 -r1.1 -r1.2
    *** pep-0160.txt	2000/07/25 03:38:53	1.1
    --- pep-0160.txt	2000/07/25 04:00:57	1.2
    ***************
    *** 33,36 ****
    --- 33,41 ----
      
      
    + 
    + Copyright
    + 
    +     This document has been placed in the public domain.
    + 
      
      
    
    
    
    From python-dev@python.org  Tue Jul 25 05:12:30 2000
    From: python-dev@python.org (Peter Schneider-Kamp)
    Date: Mon, 24 Jul 2000 21:12:30 -0700
    Subject: [Python-checkins] CVS: python/nondist/peps pep2html.py,1.3,1.4
    Message-ID: <200007250412.VAA02888@slayer.i.sourceforge.net>
    
    Update of /cvsroot/python/python/nondist/peps
    In directory slayer.i.sourceforge.net:/tmp/cvs-serv2859
    
    Modified Files:
    	pep2html.py 
    Log Message:
    
    try to change rights of peps to rw-rw-r--
    
    
    
    Index: pep2html.py
    ===================================================================
    RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v
    retrieving revision 1.3
    retrieving revision 1.4
    diff -C2 -r1.3 -r1.4
    *** pep2html.py	2000/07/25 03:51:44	1.3
    --- pep2html.py	2000/07/25 04:12:28	1.4
    ***************
    *** 18,21 ****
    --- 18,24 ----
      # tags.  but if I change that, the result doesn't look very nice...
      
    + HOST = "shell.sourceforge.net" # host for update
    + HDIR = "/home/groups/python/htdocs/peps" # target host directory
    + 
      DTD = ('')
    ***************
    *** 91,94 ****
    --- 94,99 ----
          fo.write("\n")
          fo.write("\n")
    +     fo.close()
    +     os.chmod(outfile, 0664)
      
      
    ***************
    *** 111,116 ****
      
          if update:
    !         os.system("scp pep-*.html " + username
    !                   + "shell.sourceforge.net:/home/groups/python/htdocs/peps")
      
      
    --- 116,121 ----
      
          if update:
    !         os.system("scp pep-*.html " + username + HOST + ":" + HDIR)
    !         os.system("ssh " + username + HOST + " chmod 664 " + HDIR + "/*")
      
      
    
    
    
    From python-dev@python.org  Tue Jul 25 11:40:01 2000
    From: python-dev@python.org (Peter Schneider-Kamp)
    Date: Tue, 25 Jul 2000 03:40:01 -0700
    Subject: [Python-checkins] CVS: python/nondist/sf-html sf-faq.html,1.10,1.11
    Message-ID: <200007251040.DAA18313@slayer.i.sourceforge.net>
    
    Update of /cvsroot/python/python/nondist/sf-html
    In directory slayer.i.sourceforge.net:/tmp/cvs-serv18260
    
    Modified Files:
    	sf-faq.html 
    Log Message:
    
    mention jitterbug in FAQ
    
    
    
    Index: sf-faq.html
    ===================================================================
    RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v
    retrieving revision 1.10
    retrieving revision 1.11
    diff -C2 -r1.10 -r1.11
    *** sf-faq.html	2000/07/22 09:25:41	1.10
    --- sf-faq.html	2000/07/25 10:39:58	1.11
    ***************
    *** 55,58 ****
    --- 55,64 ----
      
      
    + 

    6. Bug Reporting

    +
      +
    1. Where can I submit/view bugs for Python?
    2. +
    3. How do I use jitterbug?
    4. +
    +

    A. Appendix

      *************** *** 320,325 **** cvs update -j 1.17 -j 1.16 ceval.c
      cvs update
      ! cvs commit ceval.c
      ! This example would create and apply a reverse patch from revision 1.17 to revision 1.16 of ceval.c. --- 326,331 ---- cvs update -j 1.17 -j 1.16 ceval.c
      cvs update
      ! cvs commit ceval.c
      ! This example would create and apply a reverse patch from revision 1.17 to revision 1.16 of ceval.c. *************** *** 334,339 ****
      cvs add -kb newfile.bin
      ! cvs commit newfile.bin
      !

      3. Patches

      --- 340,346 ----
      cvs add -kb newfile.bin
      ! cvs commit newfile.bin
      !
      !

      3. Patches

      *************** *** 460,463 **** --- 467,499 ---- Any reports of getting it to work and/or pointers to more info would be appreciated! + +

      6. Bugs

      + +

      6.1.:

      + +

      Q: Where can I submit/view bugs for Python?

      + +

      A:

      + As of now [25-Jul-200] the Python project does not use SourceForge's bug + tracking facility. This may change when there is a way to import the existing + jitterbug database. The jitterbug database can be accessed through the + following interface: + +
      + http://www.python.org/python-bugs
      + +

      6.1.:

      + +

      Q: How do I use jitterbug?

      + +

      A:

      + To get the list of open bugs click on open (hidden between the second + last and the last horizontal ruler). + +

      To get a list of the bugs which are related to some area, enter an + appropriate regular expression and press "Select Messages". Then select + open (or whatever category you would like to view) as described + above.

      A. Appendix

      From python-dev@python.org Tue Jul 25 13:37:44 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 25 Jul 2000 05:37:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.33,2.34 Message-ID: <200007251237.FAA22232@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv21909 Modified Files: _cursesmodule.c Log Message: Modified version of patch #100963 from Mark Favas: has_key() is an ncurses extension, so it's made conditional depending on STRICT_SYSV_CURSES Index: _cursesmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -r2.33 -r2.34 *** _cursesmodule.c 2000/07/24 23:54:49 2.33 --- _cursesmodule.c 2000/07/25 12:37:41 2.34 *************** *** 44,48 **** #ifdef __osf__ #define _XOPEN_SOURCE_EXTENDED /* Define macro for OSF/1 */ ! #define STRICT_SYSV_CURSES #endif --- 44,48 ---- #ifdef __osf__ #define _XOPEN_SOURCE_EXTENDED /* Define macro for OSF/1 */ ! #define STRICT_SYSV_CURSES /* Don't use ncurses extensions */ #endif *************** *** 54,58 **** #if defined(__sgi__) || defined(__sun__) ! #define STRICT_SYSV_CURSES typedef chtype attr_t; /* No attr_t type is available */ #endif --- 54,58 ---- #if defined(__sgi__) || defined(__sun__) ! #define STRICT_SYSV_CURSES /* Don't use ncurses extensions */ typedef chtype attr_t; /* No attr_t type is available */ #endif *************** *** 1591,1595 **** } ! #if !defined(__sgi__) && !defined(__sun__) /* No has_key! */ static PyObject * PyCurses_has_key(PyObject *self, PyObject *args) --- 1591,1595 ---- } ! #ifndef STRICT_SYSV_CURSES /* No has_key! */ static PyObject * PyCurses_has_key(PyObject *self, PyObject *args) *************** *** 1608,1612 **** return Py_True; } ! #endif static PyObject * --- 1608,1612 ---- return Py_True; } ! #endif /* STRICT_SYSV_CURSES */ static PyObject * *************** *** 2112,2116 **** {"has_ic", (PyCFunction)PyCurses_has_ic}, {"has_il", (PyCFunction)PyCurses_has_il}, ! #if !defined(__sgi__) && !defined(__sun__) {"has_key", (PyCFunction)PyCurses_has_key}, #endif --- 2112,2116 ---- {"has_ic", (PyCFunction)PyCurses_has_ic}, {"has_il", (PyCFunction)PyCurses_has_il}, ! #ifndef STRICT_SYSV_CURSES {"has_key", (PyCFunction)PyCurses_has_key}, #endif From python-dev@python.org Tue Jul 25 13:56:40 2000 From: python-dev@python.org (Thomas Wouters) Date: Tue, 25 Jul 2000 05:56:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser intrcheck.c,2.37,2.38 Message-ID: <200007251256.FAA23522@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv23253/Parser Modified Files: intrcheck.c Log Message: Use 'void' directly instead of the ANY #define, now that all code is ANSI C. Leave the actual #define in for API compatibility. Index: intrcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/intrcheck.c,v retrieving revision 2.37 retrieving revision 2.38 diff -C2 -r2.37 -r2.38 *** intrcheck.c 2000/07/23 21:18:09 2.37 --- intrcheck.c 2000/07/25 12:56:38 2.38 *************** *** 19,27 **** #include "myproto.h" - #include "mymalloc.h" /* For ANY */ #include "intrcheck.h" /* Copied here from ceval.h -- can't include that file. */ ! int Py_AddPendingCall(int (*func)(ANY *), ANY *arg); --- 19,26 ---- #include "myproto.h" #include "intrcheck.h" /* Copied here from ceval.h -- can't include that file. */ ! int Py_AddPendingCall(int (*func)(void *), void *arg); From python-dev@python.org Tue Jul 25 13:56:40 2000 From: python-dev@python.org (Thomas Wouters) Date: Tue, 25 Jul 2000 05:56:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include ceval.h,2.35,2.36 mymalloc.h,2.23,2.24 objimpl.h,2.22,2.23 Message-ID: <200007251256.FAA23513@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv23253/Include Modified Files: ceval.h mymalloc.h objimpl.h Log Message: Use 'void' directly instead of the ANY #define, now that all code is ANSI C. Leave the actual #define in for API compatibility. Index: ceval.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/ceval.h,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** ceval.h 2000/07/22 23:30:03 2.35 --- ceval.h 2000/07/25 12:56:37 2.36 *************** *** 41,45 **** DL_IMPORT(int) Py_FlushLine(void); ! DL_IMPORT(int) Py_AddPendingCall(int (*func)(ANY *), ANY *arg); DL_IMPORT(int) Py_MakePendingCalls(void); --- 41,45 ---- DL_IMPORT(int) Py_FlushLine(void); ! DL_IMPORT(int) Py_AddPendingCall(int (*func)(void *), void *arg); DL_IMPORT(int) Py_MakePendingCalls(void); Index: mymalloc.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mymalloc.h,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** mymalloc.h 2000/07/12 17:21:41 2.23 --- mymalloc.h 2000/07/25 12:56:37 2.24 *************** *** 13,35 **** /* Lowest-level memory allocation interface */ ! #ifdef macintosh ! #define ANY void ! #endif ! ! #ifdef __STDC__ ! #define ANY void ! #endif ! ! #ifdef __TURBOC__ ! #define ANY void ! #endif ! ! #ifdef __GNUC__ ! #define ANY void ! #endif ! ! #ifndef ANY ! #define ANY char ! #endif #ifdef HAVE_STDLIB_H --- 13,17 ---- /* Lowest-level memory allocation interface */ ! #define ANY void /* For API compatibility only. Obsolete, do not use. */ #ifdef HAVE_STDLIB_H *************** *** 50,54 **** #ifndef NULL ! #define NULL ((ANY *)0) #endif --- 32,36 ---- #ifndef NULL ! #define NULL ((void *)0) #endif *************** *** 88,98 **** #undef PyCore_FREE_PROTO #define PyCore_MALLOC_PROTO (size_t) ! #define PyCore_REALLOC_PROTO (ANY *, size_t) ! #define PyCore_FREE_PROTO (ANY *) #endif #ifdef NEED_TO_DECLARE_MALLOC_AND_FRIEND ! extern ANY *PyCore_MALLOC_FUNC PyCore_MALLOC_PROTO; ! extern ANY *PyCore_REALLOC_FUNC PyCore_REALLOC_PROTO; extern void PyCore_FREE_FUNC PyCore_FREE_PROTO; #endif --- 70,80 ---- #undef PyCore_FREE_PROTO #define PyCore_MALLOC_PROTO (size_t) ! #define PyCore_REALLOC_PROTO (void *, size_t) ! #define PyCore_FREE_PROTO (void *) #endif #ifdef NEED_TO_DECLARE_MALLOC_AND_FRIEND ! extern void *PyCore_MALLOC_FUNC PyCore_MALLOC_PROTO; ! extern void *PyCore_REALLOC_FUNC PyCore_REALLOC_PROTO; extern void PyCore_FREE_FUNC PyCore_FREE_PROTO; #endif *************** *** 135,141 **** doesn't. Returned pointers must be checked for NULL explicitly. No action is performed on failure. */ ! extern DL_IMPORT(ANY *) PyMem_Malloc(size_t); ! extern DL_IMPORT(ANY *) PyMem_Realloc(ANY *, size_t); ! extern DL_IMPORT(void) PyMem_Free(ANY *); /* Starting from Python 1.6, the wrappers Py_{Malloc,Realloc,Free} are --- 117,123 ---- doesn't. Returned pointers must be checked for NULL explicitly. No action is performed on failure. */ ! extern DL_IMPORT(void *) PyMem_Malloc(size_t); ! extern DL_IMPORT(void *) PyMem_Realloc(void *, size_t); ! extern DL_IMPORT(void) PyMem_Free(void *); /* Starting from Python 1.6, the wrappers Py_{Malloc,Realloc,Free} are *************** *** 144,149 **** /* Macros */ #define PyMem_MALLOC(n) PyCore_MALLOC(n) ! #define PyMem_REALLOC(p, n) PyCore_REALLOC((ANY *)(p), (n)) ! #define PyMem_FREE(p) PyCore_FREE((ANY *)(p)) /* --- 126,131 ---- /* Macros */ #define PyMem_MALLOC(n) PyCore_MALLOC(n) ! #define PyMem_REALLOC(p, n) PyCore_REALLOC((void *)(p), (n)) ! #define PyMem_FREE(p) PyCore_FREE((void *)(p)) /* Index: objimpl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/objimpl.h,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** objimpl.h 2000/07/10 04:30:56 2.22 --- objimpl.h 2000/07/25 12:56:37 2.23 *************** *** 102,107 **** #ifdef NEED_TO_DECLARE_OBJECT_MALLOC_AND_FRIEND ! extern ANY *PyCore_OBJECT_MALLOC_FUNC PyCore_OBJECT_MALLOC_PROTO; ! extern ANY *PyCore_OBJECT_REALLOC_FUNC PyCore_OBJECT_REALLOC_PROTO; extern void PyCore_OBJECT_FREE_FUNC PyCore_OBJECT_FREE_PROTO; #endif --- 102,107 ---- #ifdef NEED_TO_DECLARE_OBJECT_MALLOC_AND_FRIEND ! extern void *PyCore_OBJECT_MALLOC_FUNC PyCore_OBJECT_MALLOC_PROTO; ! extern void *PyCore_OBJECT_REALLOC_FUNC PyCore_OBJECT_REALLOC_PROTO; extern void PyCore_OBJECT_FREE_FUNC PyCore_OBJECT_FREE_PROTO; #endif *************** *** 138,149 **** bytes returns a non-NULL pointer. Returned pointers must be checked for NULL explicitly; no action is performed on failure. */ ! extern DL_IMPORT(ANY *) PyObject_Malloc(size_t); ! extern DL_IMPORT(ANY *) PyObject_Realloc(ANY *, size_t); ! extern DL_IMPORT(void) PyObject_Free(ANY *); /* Macros */ #define PyObject_MALLOC(n) PyCore_OBJECT_MALLOC(n) ! #define PyObject_REALLOC(op, n) PyCore_OBJECT_REALLOC((ANY *)(op), (n)) ! #define PyObject_FREE(op) PyCore_OBJECT_FREE((ANY *)(op)) /* --- 138,149 ---- bytes returns a non-NULL pointer. Returned pointers must be checked for NULL explicitly; no action is performed on failure. */ ! extern DL_IMPORT(void *) PyObject_Malloc(size_t); ! extern DL_IMPORT(void *) PyObject_Realloc(void *, size_t); ! extern DL_IMPORT(void) PyObject_Free(void *); /* Macros */ #define PyObject_MALLOC(n) PyCore_OBJECT_MALLOC(n) ! #define PyObject_REALLOC(op, n) PyCore_OBJECT_REALLOC((void *)(op), (n)) ! #define PyObject_FREE(op) PyCore_OBJECT_FREE((void *)(op)) /* From python-dev@python.org Tue Jul 25 13:56:40 2000 From: python-dev@python.org (Thomas Wouters) Date: Tue, 25 Jul 2000 05:56:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.186,2.187 Message-ID: <200007251256.FAA23530@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv23253/Python Modified Files: ceval.c Log Message: Use 'void' directly instead of the ANY #define, now that all code is ANSI C. Leave the actual #define in for API compatibility. Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.186 retrieving revision 2.187 diff -C2 -r2.186 -r2.187 *** ceval.c 2000/07/22 18:47:25 2.186 --- ceval.c 2000/07/25 12:56:38 2.187 *************** *** 211,216 **** #define NPENDINGCALLS 32 static struct { ! int (*func)(ANY *); ! ANY *arg; } pendingcalls[NPENDINGCALLS]; static volatile int pendingfirst = 0; --- 211,216 ---- #define NPENDINGCALLS 32 static struct { ! int (*func)(void *); ! void *arg; } pendingcalls[NPENDINGCALLS]; static volatile int pendingfirst = 0; *************** *** 219,223 **** int ! Py_AddPendingCall(int (*func)(ANY *), ANY *arg) { static int busy = 0; --- 219,223 ---- int ! Py_AddPendingCall(int (*func)(void *), void *arg) { static int busy = 0; *************** *** 256,261 **** for (;;) { int i; ! int (*func)(ANY *); ! ANY *arg; i = pendingfirst; if (i == pendinglast) --- 256,261 ---- for (;;) { int i; ! int (*func)(void *); ! void *arg; i = pendingfirst; if (i == pendinglast) From python-dev@python.org Tue Jul 25 13:56:40 2000 From: python-dev@python.org (Thomas Wouters) Date: Tue, 25 Jul 2000 05:56:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects listobject.c,2.82,2.83 object.c,2.89,2.90 Message-ID: <200007251256.FAA23523@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv23253/Objects Modified Files: listobject.c object.c Log Message: Use 'void' directly instead of the ANY #define, now that all code is ANSI C. Leave the actual #define in for API compatibility. Index: listobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v retrieving revision 2.82 retrieving revision 2.83 diff -C2 -r2.82 -r2.83 *** listobject.c 2000/07/15 03:31:31 2.82 --- listobject.c 2000/07/25 12:56:38 2.83 *************** *** 1259,1264 **** return NULL; p = ((PyTupleObject *)w)->ob_item; ! memcpy((ANY *)p, ! (ANY *)((PyListObject *)v)->ob_item, n*sizeof(PyObject *)); while (--n >= 0) { --- 1259,1264 ---- return NULL; p = ((PyTupleObject *)w)->ob_item; ! memcpy((void *)p, ! (void *)((PyListObject *)v)->ob_item, n*sizeof(PyObject *)); while (--n >= 0) { Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.89 retrieving revision 2.90 diff -C2 -r2.89 -r2.90 *** object.c 2000/07/16 12:04:31 2.89 --- object.c 2000/07/25 12:56:38 2.90 *************** *** 963,967 **** /* Python's malloc wrappers (see mymalloc.h) */ ! ANY * PyMem_Malloc(size_t nbytes) { --- 963,967 ---- /* Python's malloc wrappers (see mymalloc.h) */ ! void * PyMem_Malloc(size_t nbytes) { *************** *** 973,978 **** } ! ANY * ! PyMem_Realloc(ANY *p, size_t nbytes) { #if _PyMem_EXTRA > 0 --- 973,978 ---- } ! void * ! PyMem_Realloc(void *p, size_t nbytes) { #if _PyMem_EXTRA > 0 *************** *** 984,988 **** void ! PyMem_Free(ANY *p) { PyMem_FREE(p); --- 984,988 ---- void ! PyMem_Free(void *p) { PyMem_FREE(p); *************** *** 992,996 **** /* Python's object malloc wrappers (see objimpl.h) */ ! ANY * PyObject_Malloc(size_t nbytes) { --- 992,996 ---- /* Python's object malloc wrappers (see objimpl.h) */ ! void * PyObject_Malloc(size_t nbytes) { *************** *** 998,1003 **** } ! ANY * ! PyObject_Realloc(ANY *p, size_t nbytes) { return PyObject_REALLOC(p, nbytes); --- 998,1003 ---- } ! void * ! PyObject_Realloc(void *p, size_t nbytes) { return PyObject_REALLOC(p, nbytes); *************** *** 1005,1009 **** void ! PyObject_Free(ANY *p) { PyObject_FREE(p); --- 1005,1009 ---- void ! PyObject_Free(void *p) { PyObject_FREE(p); From python-dev@python.org Tue Jul 25 13:56:40 2000 From: python-dev@python.org (Thomas Wouters) Date: Tue, 25 Jul 2000 05:56:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules dlmodule.c,2.11,2.12 signalmodule.c,2.51,2.52 socketmodule.c,1.122,1.123 timemodule.c,2.96,2.97 Message-ID: <200007251256.FAA23528@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv23253/Modules Modified Files: dlmodule.c signalmodule.c socketmodule.c timemodule.c Log Message: Use 'void' directly instead of the ANY #define, now that all code is ANSI C. Leave the actual #define in for API compatibility. Index: dlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/dlmodule.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** dlmodule.c 2000/07/21 06:00:07 2.11 --- dlmodule.c 2000/07/25 12:56:37 2.12 *************** *** 19,23 **** #endif ! typedef ANY *PyUnivPtr; typedef struct { PyObject_HEAD --- 19,23 ---- #endif ! typedef void *PyUnivPtr; typedef struct { PyObject_HEAD Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.51 retrieving revision 2.52 diff -C2 -r2.51 -r2.52 *** signalmodule.c 2000/07/23 21:18:09 2.51 --- signalmodule.c 2000/07/25 12:56:37 2.52 *************** *** 634,638 **** is_tripped++; Handlers[SIGINT].tripped = 1; ! Py_AddPendingCall((int (*)(ANY *))PyErr_CheckSignals, NULL); } --- 634,638 ---- is_tripped++; Handlers[SIGINT].tripped = 1; ! Py_AddPendingCall((int (*)(void *))PyErr_CheckSignals, NULL); } Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.122 retrieving revision 1.123 diff -C2 -r1.122 -r1.123 *** socketmodule.c 2000/07/24 16:26:35 1.122 --- socketmodule.c 2000/07/25 12:56:37 1.123 *************** *** 800,804 **** return NULL; } ! res = setsockopt(s->sock_fd, level, optname, (ANY *)buf, buflen); if (res < 0) return PySocket_Err(); --- 800,804 ---- return NULL; } ! res = setsockopt(s->sock_fd, level, optname, (void *)buf, buflen); if (res < 0) return PySocket_Err(); *************** *** 842,846 **** socklen_t flagsize = sizeof flag; res = getsockopt(s->sock_fd, level, optname, ! (ANY *)&flag, &flagsize); if (res < 0) return PySocket_Err(); --- 842,846 ---- socklen_t flagsize = sizeof flag; res = getsockopt(s->sock_fd, level, optname, ! (void *)&flag, &flagsize); if (res < 0) return PySocket_Err(); *************** *** 856,860 **** return NULL; res = getsockopt(s->sock_fd, level, optname, ! (ANY *)PyString_AsString(buf), &buflen); if (res < 0) { Py_DECREF(buf); --- 856,860 ---- return NULL; res = getsockopt(s->sock_fd, level, optname, ! (void *)PyString_AsString(buf), &buflen); if (res < 0) { Py_DECREF(buf); *************** *** 1231,1235 **** (struct sockaddr *)addrbuf, &addrlen #else ! (ANY *)addrbuf, &addrlen #endif #else --- 1231,1235 ---- (struct sockaddr *)addrbuf, &addrlen #else ! (void *)addrbuf, &addrlen #endif #else Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.96 retrieving revision 2.97 diff -C2 -r2.96 -r2.97 *** timemodule.c 2000/07/24 15:26:39 2.96 --- timemodule.c 2000/07/25 12:56:37 2.97 *************** *** 294,298 **** { int y; ! memset((ANY *) p, '\0', sizeof(struct tm)); if (!PyArg_Parse(args, "(iiiiiiiii)", --- 294,298 ---- { int y; ! memset((void *) p, '\0', sizeof(struct tm)); if (!PyArg_Parse(args, "(iiiiiiiii)", *************** *** 344,348 **** size_t i; ! memset((ANY *) &buf, '\0', sizeof(buf)); if (!PyArg_ParseTuple(args, "sO:strftime", &fmt, &tup) --- 344,348 ---- size_t i; ! memset((void *) &buf, '\0', sizeof(buf)); if (!PyArg_ParseTuple(args, "sO:strftime", &fmt, &tup) *************** *** 399,403 **** if (!PyArg_ParseTuple(args, "s|s:strptime", &buf, &fmt)) return NULL; ! memset((ANY *) &tm, '\0', sizeof(tm)); s = strptime(buf, fmt, &tm); if (s == NULL) { --- 399,403 ---- if (!PyArg_ParseTuple(args, "s|s:strptime", &buf, &fmt)) return NULL; ! memset((void *) &tm, '\0', sizeof(tm)); s = strptime(buf, fmt, &tm); if (s == NULL) { From python-dev@python.org Tue Jul 25 15:11:23 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 25 Jul 2000 07:11:23 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0200.txt,1.3,1.4 Message-ID: <200007251411.HAA10739@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv10717 Modified Files: pep-0200.txt Log Message: add tentative release schedule and contributor guidelines Index: pep-0200.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0200.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** pep-0200.txt 2000/07/21 18:29:05 1.3 --- pep-0200.txt 2000/07/25 14:11:19 1.4 *************** *** 7,11 **** - Introduction --- 7,10 ---- *************** *** 17,26 **** historical record. ! Accepted and completed - Accepted and in progress --- 16,80 ---- historical record. + Tentative Release Schedule ! Aug. 14: All 2.0 PEPs finished / feature freeze ! Aug. 28: 2.0 beta 1 ! Sep. 29: 2.0 final ! ! Guidelines for submitting patches and making changes ! ! Use good sense when committing changes. You should know what we mean ! by good sense or we wouldn't have given you commit privileges <0.5 ! wink>. Some specific examples of good sense include: ! ! - Do whatever the dictator tells you. ! ! - Discuss any controversial changes on python-dev first. If you ! get a lot of +1 votes and no -1 votes, make the change. If you ! get a some -1 votes, think twice; consider asking Guido what he ! thinks. ! ! - If the change is to code you contributed, it probably makes ! sense for you to fix it. ! ! - If the change affects code someone else wrote, it probably makes ! sense to ask him or her first. ! ! - You can use the SF Patch Manager to submit a patch and assign it ! to someone for review. ! ! Any significant new feature must be described in a PEP and approved ! before it is checked in. ! ! Any significant code addition, such as a new module or large patch, ! must include test cases for the regression test and documentation. A ! patch should not be checked in until the tests and documentation are ! ready. ! ! If you fix a bug, you should write a test case that would have caught ! the bug. ! ! If you commit a patch from the SF Patch Manager or fix a bug from the ! Jitterbug database, be sure to reference the patch/bug number in the ! CVS log message. Also be sure to change the status in the patch ! manager or bug database (if you have access to the bug database). ! ! It is not acceptable for any checked in code to cause the regression ! test to fail. If a checkin causes a failure, it must be fixed within ! 24 hours or it will be backed out. ! ! All contributed C code must be ANSI C. If possible check it with two ! different compilers, e.g. gcc and MSVC. ! ! All contributed Python code must follow Guido's Python style guide. ! http://www.python.org/doc/essays/styleguide.html ! ! It is understood that any code contributed will be released under an ! Open Source license. Do not contribute code if it can't be released ! this way. ! Accepted and completed Accepted and in progress *************** *** 38,47 **** The test suite still fails on test_re. ! * snprintf - owner??? Use snprintf to avoid buffer overflows. Need configure hackery to discovery if it is available on the current platform and a default implementation if it is not. http://www.python.org/pipermail/python-dev/2000-April/010051.html - This function is expected to be part of C9X (check). * Support for opcode arguments > 2**16 - Charles Waldman --- 92,100 ---- The test suite still fails on test_re. ! * PyErr_SafeFormat / snprintf - owner??? Use snprintf to avoid buffer overflows. Need configure hackery to discovery if it is available on the current platform and a default implementation if it is not. http://www.python.org/pipermail/python-dev/2000-April/010051.html * Support for opcode arguments > 2**16 - Charles Waldman *************** *** 54,58 **** - Open: proposed but not accepted or declined --- 107,110 ---- *************** *** 78,82 **** - Declined --- 130,133 ---- From python-dev@python.org Tue Jul 25 15:34:40 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 25 Jul 2000 07:34:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib base64.py,1.9,1.10 Message-ID: <200007251434.HAA12721@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv12615/Lib Modified Files: base64.py Log Message: a couple of nits from Patch #100933 Index: base64.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/base64.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** base64.py 2000/02/02 15:10:14 1.9 --- base64.py 2000/07/25 14:34:38 1.10 *************** *** 54,61 **** sys.stdout = sys.stderr print msg ! print """usage: basd64 [-d] [-e] [-u] [-t] [file|-] -d, -u: decode -e: encode (default) ! -t: decode string 'Aladdin:open sesame'""" sys.exit(2) func = encode --- 54,61 ---- sys.stdout = sys.stderr print msg ! print """usage: %s [-d|-e|-u|-t] [file|-] -d, -u: decode -e: encode (default) ! -t: encode and decode string 'Aladdin:open sesame'"""%sys.argv[0] sys.exit(2) func = encode From python-dev@python.org Tue Jul 25 16:07:31 2000 From: python-dev@python.org (Skip Montanaro) Date: Tue, 25 Jul 2000 08:07:31 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0202.txt,1.2,1.3 Message-ID: <200007251507.IAA24153@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv24082 Modified Files: pep-0202.txt Log Message: some content to start things off (maybe someone else will add to it...) Index: pep-0202.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0202.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pep-0202.txt 2000/07/14 03:29:52 1.2 --- pep-0202.txt 2000/07/25 15:07:28 1.3 *************** *** 7,10 **** --- 7,118 ---- + Introduction + + This PEP describes a proposed syntactical extension to Python, list + comprehensions. + + + + The Proposed Solution + + It is proposed to allow conditional construction of list literals using + for and if clauses. They would nest in the same way for loops and if + statements nest now. + + + + Rationale + + List comprehensions provide a more concise way to create lists in + situations where map() and filter() and/or nested loops would currently + be used. + + + Examples + + >>> print [i for i in range(10)] + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + + >>> print [i for i in range(20) if i%2 == 0] + [0, 2, 4, 6, 8, 10, 12, 14, 16, 18] + + >>> nums = [1,2,3,4] + >>> fruit = ["Apples", "Peaches", "Pears", "Bananas"] + >>> print [i,f for i in nums for f in fruit] + [(1, 'Apples'), (1, 'Peaches'), (1, 'Pears'), (1, 'Bananas'), + (2, 'Apples'), (2, 'Peaches'), (2, 'Pears'), (2, 'Bananas'), + (3, 'Apples'), (3, 'Peaches'), (3, 'Pears'), (3, 'Bananas'), + (4, 'Apples'), (4, 'Peaches'), (4, 'Pears'), (4, 'Bananas')] + >>> print [i,f for i in nums for f in fruit if f[0] == "P"] + [(1, 'Peaches'), (1, 'Pears'), + (2, 'Peaches'), (2, 'Pears'), + (3, 'Peaches'), (3, 'Pears'), + (4, 'Peaches'), (4, 'Pears')] + >>> print [i,f for i in nums for f in fruit if f[0] == "P" if i%2 == 1] + [(1, 'Peaches'), (1, 'Pears'), (3, 'Peaches'), (3, 'Pears')] + >>> def zip(*args): + ... return apply(map, (None,)+args) + ... + >>> print [i for i in zip(nums,fruit) if i[0]%2==0] + [(2, 'Peaches'), (4, 'Bananas')] + + + Reference Implementation + + Please refer to + + https://sourceforge.net/patch/?func=detailpatch&patch_id=100654&group_id=5470 + + for a patch that adds list comprehensions to Python. + + + + Open Issues + + Syntax + + Several people proposed connecting or separating syntax between the + various clauses, for example, requiring a semicolon between them to + set them apart: + + [i,f; for i in nums; for f in fruit; if f[0]=="P"; if i%2==1] + + To minimize strain on the Python parser, Guido has suggested + requiring parentheses around the initial tuple: + + [(i,f) for i in nums for f in fruit if f[0]=="P" if i%2==1] + + Semantics + + The semantics of multiple for clauses is not obvious to many + people. Currently, it nests, so that + + [i,f for i in nums for f in fruit] + + is functionally equivalent to + + tmp = [] + for i in nums: + for f in fruit: + tmp.append((i,f)) + + Other people would read it as if it executed + + map(None, nums, fruit) + + It's not clear that this is necessary. The newly proposed zip() + builtin takes care of that case. + + Stability of the Implementation + + The current reference implementation is simply an adaptation of Greg + Ewing's original demonstration of the concept. Other than tracking + changes to the source code to keep it a valid patch, reindenting the + code and switching to function prototypes, nothing has been done to + it. This obviously raises some questions about how stable the code + is. It has not had a lot of exercise, though the patch does include + a few test cases. + + Local Variables: mode: indented-text From python-dev@python.org Tue Jul 25 16:16:43 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 25 Jul 2000 08:16:43 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib os.py,1.35,1.36 Message-ID: <200007251516.IAA30230@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv30223 Modified Files: os.py Log Message: makedirs(), removedirs(): If the tail of the path is empty, do a second split so the logic does not fail in corner cases. This closes bug #407. Index: os.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/os.py,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** os.py 2000/07/16 12:04:30 1.35 --- os.py 2000/07/25 15:16:40 1.36 *************** *** 127,130 **** --- 127,132 ---- """ head, tail = path.split(name) + if not tail: + head, tail = path.split(head) if head and tail and not path.exists(head): makedirs(head, mode) *************** *** 144,147 **** --- 146,151 ---- rmdir(name) head, tail = path.split(name) + if not tail: + head, tail = path.split(head) while head and tail: try: From python-dev@python.org Tue Jul 25 17:43:25 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 25 Jul 2000 09:43:25 -0700 Subject: [Python-checkins] CVS: python/nondist/src/Compiler demo.py,NONE,1.1 Message-ID: <200007251643.JAA11252@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/src/Compiler In directory slayer.i.sourceforge.net:/tmp/cvs-serv11241 Added Files: demo.py Log Message: This script demonstrates use of the visitor interface of the compiler package. --- NEW FILE --- #! /usr/bin/env python """Print names of all methods defined in module This script demonstrates use of the visitor interface of the compiler package. """ import compiler class MethodFinder: """Print the names of all the methods Each visit method takes two arguments, the node and its current scope. The scope is the name of the current class or None. """ def visitClass(self, node, scope=None): self.visit(node.code, node.name) def visitFunction(self, node, scope=None): if scope is not None: print "%s.%s" % (scope, node.name) self.visit(node.code, None) def main(files): mf = MethodFinder() for file in files: f = open(file) buf = f.read() f.close() ast = compiler.parse(buf) compiler.walk(ast, mf) if __name__ == "__main__": import sys main(sys.argv[1:]) From python-dev@python.org Tue Jul 25 18:59:11 2000 From: python-dev@python.org (Barry Warsaw) Date: Tue, 25 Jul 2000 10:59:11 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0001.txt,1.1,1.2 Message-ID: <200007251759.KAA23775@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv23767 Modified Files: pep-0001.txt Log Message: Fleshed out the bulk of the guidelines, after internal discussion among the PEP authors and the BDFL. Index: pep-0001.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0001.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0001.txt 2000/07/13 06:33:08 1.1 --- pep-0001.txt 2000/07/25 17:59:08 1.2 *************** *** 1,7 **** PEP: 1 ! Title: PEP Guidelines Version: $Revision$ ! Owner: bwarsaw@beopen.com (Barry A. Warsaw) ! Status: Incomplete --- 1,207 ---- PEP: 1 ! Title: PEP Purpose and Guidelines Version: $Revision$ ! Author: bwarsaw@beopen.com (Barry A. Warsaw), ! jeremy@beopen.com (Jeremy Hylton) ! Status: Draft ! Type: Informational ! Created: 13-Jun-2000 ! Post-History: ! ! ! What is a PEP? ! ! PEP standards for Python Enhancement Proposal. A PEP is a design ! document providing information to the Python community, or ! describing a new feature for Python. The PEP should provide a ! concise technical specification of the feature and a rationale for ! the feature. ! ! We intend PEPs to be the primary mechanisms for proposing new ! features, for collecting community input on an issue, and for ! documenting the design decisions that have gone into Python. The ! PEP author is responsible for building consensus within the ! community and documenting dissenting opinions. ! ! Because the PEPs are maintained as plain text files under CVS ! control, their revision history is the historical record of the ! feature proposal. ! ! ! Kinds of PEPs ! ! There are two kinds of PEPs. A standards track PEP describes a ! new feature for Python. An informational PEP describes a Python ! design issue, or provides general guidelines or information to the ! Python community, but does not propose a new feature. ! ! ! PEP Workflow ! ! The PEP editor, Barry Warsaw , assigns numbers ! for each PEP and changes its status. ! ! When a new feature is introduced on python-dev, a brief high-level ! discussion should be conducted, not on the merits of the proposal, ! but on whether the idea is significant enough to warrant a PEP. ! Should consensus on PEP-ability be reached, a champion must be ! identified. The champion offers to take the discussion off-line ! and specifies a location (e.g. egroups, python.org, Roundup). ! ! The champion then emails the PEP editor describing the proposal ! and its title. If the PEP editor approves, he will assign the PEP ! a number, label it as standards track or informational, give it ! status 'draft', and create and check-in an initial template for ! the PEP. The PEP editor will not unreasonably deny a PEP. ! Reasons for denying PEP status include duplication of effort, ! being technically unsound, or not in keeping with the Python ! philosophy; the BDFL (Benevolent Dictator for Life, Guido van ! Rossum ) is the final arbitrator of the latter. ! ! Discussion concerning a PEP should initially be kept out of the ! python-dev and python-list mailing lists. Instead, comments ! should be sent to, and collected by, the PEP owner, who has the ! responsibility to incorporate these comments into the document. ! ! The authors of the PEP are then responsible for writing the PEP ! and marshaling community support for it. The structure of a PEP ! is described in detail below. The PEP consists of two parts, a ! design document and a reference implementation. The PEP should be ! reviewed and accepted before a reference implementation is begun, ! unless a reference implementation will aid people in studying the ! PEP. A Standards Track PEP must include an implementation - in ! the form of code, patch, or URL to same - before it can be ! considered Final. ! ! PEP authors are responsible for collecting community feedback on a ! PEP before submitting it for review. A PEP that has not been ! discussed on python-list and python-dev will not be accepted for ! review. However, wherever possible, long open-ended discussions ! on public mailing lists should be avoided. A better strategy is ! to encourage public feedback directly to the PEP author, who ! collects and integrates the comments back into the PEP. ! ! Once the authors have completed a PEP, they must inform the PEP ! editor that it is ready for review. PEPs are reviewed by the BDFL ! and his chosen consultants, who may accept or reject a PEP or send ! it back to the author(s) for revision. ! ! Once a PEP has been accepted, the reference implementation must be ! completed. When the reference implementation is complete and ! accepted by the BDFL, the status will be changed to `Final.' ! ! A PEP can also be assigned status `Deferred.' The PEP author or ! editor can assign the PEP this status when no progress is being ! made on the PEP. Once a PEP is deferred, the PEP editor can ! re-assign it to draft status. ! ! A PEP can also be `Rejected'. Perhaps after all is said and done ! it was not a good idea. It is still important to have a record of ! this fact. ! ! PEP work flow is as follows: ! ! Draft -> Accepted -> Final ! ^ ! +----> Rejected ! v ! Deferred ! ! ! What belongs in a successful PEP? ! ! Each PEP should have the following parts: ! ! 1. Title -- a short, descriptive title ! ! 2. Author(s) -- names and contact info for each author ! ! 3. Abstract -- a short (~200 word) description of the technical issue ! being addressed ! ! 4. Copyright/public domain -- Each PEP must either be explicitly ! labelled in the public domain or the Open Publication ! License[1]. ! ! 5. Specification -- The technical specification should describe ! the syntax and semantics of any new language feature. The ! specification should be detailed enough to allow competing, ! interoperable implementations for any of the current Python ! platforms (CPython, JPython, Python .NET). ! ! 6. Rationale -- The rationale fleshes out the specification by ! describing what motivated the design and why particular design ! decisions were made. It should describe alternate designs that ! were considered and related work, e.g. how the feature is ! supported in other languages. ! ! The rationale should provide evidence of consensus within the ! community and discuss important objections or concerns raised ! during discussion. ! ! 7. Reference Implementation -- The reference implementation must ! be completed before any PEP is given status 'final,' but it ! need not be completed before the PEP is accepted. It is better ! to finish the specification and rationale first and reach ! consensus on it before writing code. ! ! The final implementation must include test code and ! documentation appropriate for either the Python language ! reference or the standard library reference. ! ! ! PEP Style ! ! PEPs are written in plain ASCII text, and should adhere to a ! rigid style. There is a Python script that parses this style and ! converts the plain text PEP to HTML for viewing on the web. ! ! Each PEP begins with an RFC822 style header section. Required ! headers are as follows, and must appear in this order: ! ! PEP: ! Title: ! Version: ! Author: ! Status: ! Type: ! Created: ! Post-History: ! ! Standards track PEPs should additionally have a Python-Version: ! header which indicates the version of Python that the feature will ! be released with. ! ! While a PEP is in private discussions (usually during the initial ! Draft phase), a Discussions-To: header will indicate the mailing ! list or URL where the PEP is being discussed. ! ! PEP heading should begin in column zero and should be capitalized. ! The body of each section should be indented 4 spaces. Code ! samples inside body sections should be indented a further 4 ! spaces, and other indentation can be used as required to make the ! text readable. You should use two blank lines between the last ! line of a section's body and the next section heading. ! ! No tabs should appear in the document at all. A PEP should ! include the Emacs stanza included by example in this PEP to aid ! Emacs editors. ! ! A PEP must contain a Copyright heading, and it is strongly ! recommended to put the PEP in the public domain. ! ! You should footnote any URLs in the body of the PEP, and a PEP ! should include a References section with those URLs expanded. ! ! ! Copyright ! ! This document has been placed in the public domain. ! ! ! References ! ! [1] http://www.opencontent.org/openpub/ ! From python-dev@python.org Tue Jul 25 20:27:20 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 25 Jul 2000 12:27:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/doc doc.tex,1.22,1.23 Message-ID: <200007251927.MAA12305@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv12293 Modified Files: doc.tex Log Message: Add entries for the distutils documents to the directories table. Index: doc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/doc/doc.tex,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** doc.tex 2000/07/06 05:24:41 1.22 --- doc.tex 2000/07/25 19:27:17 1.23 *************** *** 99,104 **** --- 99,106 ---- \begin{tableii}{p{.75in}|p{3in}}{filenq}{Directory}{Document Title} \lineii{api/}{\citetitle[../api/api.html]{The Python/C API}} + \lineii{dist/}{\citetitle[../dist/dist.html]{Distributing Python Modules}} \lineii{doc/}{\citetitle[../doc/doc.html]{Documenting Python}} \lineii{ext/}{\citetitle[../ext/ext.html]{Extending and Embedding the Python Interpreter}} + \lineii{inst/}{\citetitle[../inst/inst.html]{Installing Python Modules}} \lineii{lib/}{\citetitle[../lib/lib.html]{Python Library Reference}} \lineii{mac/}{\citetitle[../mac/mac.html]{Macintosh Module Reference}} From python-dev@python.org Tue Jul 25 21:49:01 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 25 Jul 2000 13:49:01 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0160.txt,1.2,1.3 Message-ID: <200007252049.NAA26447@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv26434 Modified Files: pep-0160.txt Log Message: More explanation of feature requirements and mechanics of construction. Index: pep-0160.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0160.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pep-0160.txt 2000/07/25 04:00:57 1.2 --- pep-0160.txt 2000/07/25 20:48:58 1.3 *************** *** 1,19 **** ! PEP: 160 ! Title: Python 1.6 Release Schedule ! Version: $Revision$ ! Owner: fdrake@beopen.com (Fred L. Drake, Jr.) ! Python-Version: 2.0 ! Status: Incomplete Introduction ! This PEP describes the Python 1.6 release schedule, tracking the ! status and ownership of the major new features, summarizes ! discussions held in mailing list forums, and provides URLs for ! further information, patches, and other outstanding issues. The ! CVS revision history of this file contains the definitive ! historical record. Schedule --- 1,19 ---- ! PEP: 160 ! Title: Python 1.6 Release Schedule ! Version: $Revision$ ! Owner: Fred L. Drake, Jr. ! Python-Version: 1.6 ! Status: Incomplete Introduction ! This PEP describes the Python 1.6 release schedule. The CVS ! revision history of this file contains the definitive historical ! record. + This release will be produced by BeOpen PythonLabs staff for the + Corporation for National Research Initiatives (CNRI). + Schedule *************** *** 32,35 **** --- 32,52 ---- be provided, including all methods and codec support. + * SRE: Fredrik Lundh's new regular expression engine will be used + to provide support for both 8-bit strings and Unicode strings. + It must pass the regression test used for the pcre-based version + of the re module. + + + Mechanism + + The release will be created as a branch from the development tree + rooted at CNRI's close of business on 16 May 2000. Patches + required from more recent checkins will be merged in by moving the + branch tag on individual files whenever possible in order to + reduce mailing list clutter and avoid divergent and incompatible + implementations. + + Patches and features will be merged to the extent required to pass + regression tests in effect on 16 May 2000. *************** *** 37,41 **** This document has been placed in the public domain. - --- 54,57 ---- From python-dev@python.org Tue Jul 25 22:51:58 2000 From: python-dev@python.org (Barry Warsaw) Date: Tue, 25 Jul 2000 14:51:58 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.4,1.5 Message-ID: <200007252151.OAA12672@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv12662 Modified Files: pep-0201.txt Log Message: In a compromise with JHy, and to be more consistent with the style now documented in PEP1, remove the Emacs page breaks. Also, Owner: -> Author:, added Created: and Post-History: headers Changed "Standard For-Loops" section to "Motivation" and shortened considerably; readers already know how for-loops work in Python. Added notes about Guido's veto of lazy evaluation. Index: pep-0201.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** pep-0201.txt 2000/07/24 17:40:00 1.4 --- pep-0201.txt 2000/07/25 21:51:55 1.5 *************** *** 2,11 **** Title: Parallel Iteration Version: $Revision$ ! Owner: bwarsaw@beopen.com (Barry A. Warsaw) Python-Version: 2.0 Status: Draft - Introduction --- 2,12 ---- Title: Parallel Iteration Version: $Revision$ ! Author: bwarsaw@beopen.com (Barry A. Warsaw) Python-Version: 2.0 Status: Draft + Created: 13-Jul-2000 + Post-History: Introduction *************** *** 20,59 **** ! ! Standard For-Loops ! Motivation for this feature has its roots in a concept described ! as `parallel for loops'. A standard for-loop in Python iterates ! over every element in the sequence until the sequence is ! exhausted. A `break' statement inside the loop suite causes an ! explicit loop exit. For-loops also have else: clauses which get ! executed when the loop exits normally (i.e. not by execution of a ! break). ! ! For-loops can iterate over built-in types such as lists and ! tuples, but they can also iterate over instance types that conform ! to an informal sequence protocol. This protocol states that the ! instance should implement the __getitem__() method, expecting a ! monotonically increasing index starting at 0, and this method ! should raise an IndexError when the sequence is exhausted. This ! protocol is currently undocumented -- a defect in Python's ! documentation hopefully soon corrected. - For-loops are described in the Python language reference - manual[1]. - An example for-loop: - - >>> for i in (1, 2, 3): print i - ... - 1 - 2 - 3 - - In this example, the variable `i' is called the `target', and is - assigned the next element of the list, each time through the loop. - - - Parallel For-Loops --- 21,37 ---- ! Motivation ! Standard for-loops in Python iterate over every element in a ! sequence until the sequence is exhausted[1]. However, for-loops ! iterate over only a single sequence, and it is often desirable to ! loop over more than one sequence, in a lock-step, "Chinese Menu" ! type of way. ! ! The common idioms used to accomplish this are unintuitive and ! inflexible. This PEP proposes a standard way of performing such ! iterations by introducing a new builtin function called `zip'. Parallel For-Loops *************** *** 71,80 **** (2, 5) (3, 6) - - Here, map() returns a list of N-tuples, where N is the number of - sequences in map()'s argument list (after the initial `None'). - Each tuple is constructed of the i-th elements from each of the - argument lists, specifically in this example: - >>> map(None, a, b) [(1, 4), (2, 5), (3, 6)] --- 49,52 ---- *************** *** 107,111 **** - The Proposed Solution --- 79,82 ---- *************** *** 130,134 **** - Lazy Execution --- 101,104 ---- *************** *** 139,144 **** on demand. ! Examples --- 109,115 ---- on demand. + Guido is strongly opposed to lazy execution. See Open Issues. ! Examples *************** *** 195,199 **** - Reference Implementation --- 166,169 ---- *************** *** 293,297 **** - Rejected Elaborations --- 263,266 ---- *************** *** 353,359 **** - Open Issues - What should "zip(a)" do? Given --- 322,331 ---- Open Issues + - Guido opposes lazy evaluation for zip(). He believes zip() + should return a real list, with an xzip() lazy evaluator added + later if necessary. + - What should "zip(a)" do? Given *************** *** 428,432 **** - References --- 400,403 ---- *************** *** 436,440 **** TBD: URL to python-dev archives - Copyright --- 407,410 ---- From python-dev@python.org Tue Jul 25 23:00:08 2000 From: python-dev@python.org (Barry Warsaw) Date: Tue, 25 Jul 2000 15:00:08 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.5,1.6 Message-ID: <200007252200.PAA13379@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv13321 Modified Files: pep-0201.txt Log Message: Added Paul's latest crop of names to the list of proposed alternatives in Open Issues. Index: pep-0201.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** pep-0201.txt 2000/07/25 21:51:55 1.5 --- pep-0201.txt 2000/07/25 22:00:05 1.6 *************** *** 376,383 **** (but are not limited to!): marry, weave, parallel, lace, braid, interlace, permute, furl, tuples, lists, stitch, collate, knit, ! plait, fold, and with. All have disadvantages, and there is no ! clear unanimous choice, therefore the decision was made to go ! with `zip' because the same functionality is available in other ! languages (e.g. Haskell) under the name `zip'[2]. - Should zip() be including in the builtins module or should it be --- 376,386 ---- (but are not limited to!): marry, weave, parallel, lace, braid, interlace, permute, furl, tuples, lists, stitch, collate, knit, ! plait, fold, with, mktuples, maketuples, totuples, gentuples, ! tupleorama. ! ! All have disadvantages, and there is no clear unanimous choice, ! therefore the decision was made to go with `zip' because the ! same functionality is available in other languages ! (e.g. Haskell) under the name `zip'[2]. - Should zip() be including in the builtins module or should it be From python-dev@python.org Tue Jul 25 23:15:47 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Tue, 25 Jul 2000 15:15:47 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_compile,NONE,1.1 Message-ID: <200007252215.PAA21715@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv21660/output Added Files: test_compile Log Message: added test case for fixed duplicate arguments bug in Python/compile.c --- NEW FILE --- test_compile From python-dev@python.org Tue Jul 25 23:15:47 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Tue, 25 Jul 2000 15:15:47 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_compile.py,NONE,1.1 Message-ID: <200007252215.PAA21712@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv21660 Added Files: test_compile.py Log Message: added test case for fixed duplicate arguments bug in Python/compile.c --- NEW FILE --- from test_support import verbose, TestFailed if verbose: print 'Running test on duplicate arguments' try: exec('def f(a, a): pass') raise TestFailed, "duplicate arguments" except SyntaxError: pass try: exec('def f(a = 0, a = 1): pass') raise TestFailed, "duplicate keyword arguments" except SyntaxError: pass From python-dev@python.org Wed Jul 26 03:57:23 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 25 Jul 2000 19:57:23 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.34,2.35 Message-ID: <200007260257.TAA03232@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv3159 Modified Files: _cursesmodule.c Log Message: Added wrappers for tiget{flag,num,str}, for querying terminfo capabilities Index: _cursesmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v retrieving revision 2.34 retrieving revision 2.35 diff -C2 -r2.34 -r2.35 *** _cursesmodule.c 2000/07/25 12:37:41 2.34 --- _cursesmodule.c 2000/07/26 02:57:20 2.35 *************** *** 2005,2008 **** --- 2005,2052 ---- static PyObject * + PyCurses_tigetflag(PyObject *self, PyObject *args) + { + char *capname; + + PyCursesInitialised; + + if (!PyArg_ParseTuple(args, "z", &capname)) + return NULL; + + return PyInt_FromLong( (long) tigetflag( capname ) ); + } + + static PyObject * + PyCurses_tigetnum(PyObject *self, PyObject *args) + { + char *capname; + + PyCursesInitialised; + + if (!PyArg_ParseTuple(args, "z", &capname)) + return NULL; + + return PyInt_FromLong( (long) tigetnum( capname ) ); + } + + static PyObject * + PyCurses_tigetstr(PyObject *self, PyObject *args) + { + char *capname; + + PyCursesInitialised; + + if (!PyArg_ParseTuple(args, "z", &capname)) + return NULL; + + capname = tigetstr( capname ); + if (capname == 0 || capname == (char*) -1) { + Py_INCREF(Py_None); + return Py_None; + } + return PyString_FromString( capname ); + } + + static PyObject * PyCurses_TypeAhead(PyObject *self, PyObject *args) { *************** *** 2150,2153 **** --- 2194,2200 ---- {"termattrs", (PyCFunction)PyCurses_termattrs}, {"termname", (PyCFunction)PyCurses_termname}, + {"tigetflag", (PyCFunction)PyCurses_tigetflag, METH_VARARGS}, + {"tigetnum", (PyCFunction)PyCurses_tigetnum, METH_VARARGS}, + {"tigetstr", (PyCFunction)PyCurses_tigetstr, METH_VARARGS}, {"typeahead", (PyCFunction)PyCurses_TypeAhead}, {"unctrl", (PyCFunction)PyCurses_UnCtrl}, From python-dev@python.org Wed Jul 26 03:59:15 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 25 Jul 2000 19:59:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcurses.tex,1.10,1.11 Message-ID: <200007260259.TAA03402@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv3372 Modified Files: libcurses.tex Log Message: Document tiget{flag,num,str} Index: libcurses.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** libcurses.tex 2000/07/24 19:35:52 1.10 --- libcurses.tex 2000/07/26 02:59:13 1.11 *************** *** 439,442 **** --- 439,463 ---- \end{funcdesc} + \begin{funcdesc}{tigetflag}{capname} + Returns the value of the Boolean capability corresponding to the + terminfo capability name \var{capname}. The value -1 is returned if + \var{capname} is not a Boolean capability, or 0 if it is canceled or + absent from the terminal description. + \end{funcdesc} + + \begin{funcdesc}{tigetnum}{capname} + Returns the value of the numeric capability corresponding to the + terminfo capability name \var{capname}. The value -2 is returned if + \var{capname} is not a numeric capability, or -1 if it is canceled or absent + from the terminal description. + \end{funcdesc} + + \begin{funcdesc}{tigetstr}{capname} + Returns the value of the string capability corresponding to the + terminfo capability name \var{capname}. \code{None} is returned if + \var{capname} is not a string capability, or is canceled or absent + from the terminal description. + \end{funcdesc} + \begin{funcdesc}{typeahead}{fd} Specifies that the file descriptor \var{fd} be used for typeahead From python-dev@python.org Wed Jul 26 04:56:09 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 25 Jul 2000 20:56:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/perfecthash GenUCNHash.py,1.4,1.5 perfect_hash.py,1.2,1.3 perfhash.c,1.2,1.3 Message-ID: <200007260356.UAA19987@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/perfecthash In directory slayer.i.sourceforge.net:/tmp/cvs-serv19915/Tools/perfecthash Modified Files: GenUCNHash.py perfect_hash.py perfhash.c Log Message: Fix UCNs machine with >= 32bit longs originally submitted by Bill Tutt Note: This code is actually going to be replaced in 2.0 by /F's new database. Until then, this patch keeps the test suite working. Index: GenUCNHash.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/perfecthash/GenUCNHash.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** GenUCNHash.py 2000/07/07 17:53:54 1.4 --- GenUCNHash.py 2000/07/26 03:56:06 1.5 *************** *** 13,18 **** # These variables determine which hash function is tried first. # Yields a multiple of 1.7875 for UnicodeData.txt on 2000/06/24/ ! f1Seed = 1694245428 ! f2Seed = -1917331657 # Maximum allowed multipler, if this isn't None then instead of continually --- 13,18 ---- # These variables determine which hash function is tried first. # Yields a multiple of 1.7875 for UnicodeData.txt on 2000/06/24/ ! f1Seed = 0x64fc2234 ! f2Seed = 0x8db7d737 # Maximum allowed multipler, if this isn't None then instead of continually Index: perfect_hash.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/perfecthash/perfect_hash.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** perfect_hash.py 2000/06/30 09:56:00 1.2 --- perfect_hash.py 2000/07/26 03:56:06 1.3 *************** *** 74,80 **** if self.caseInsensitive: key = string.upper(key) ! x = perfhash.hash(self.seed, len(self.junk), key) % self.N ! #h = hash(self.junk + key) % self.N ! #assert x == h return x --- 74,78 ---- if self.caseInsensitive: key = string.upper(key) ! x = perfhash.hash(self.seed, len(self.junk), key, self.N) return x *************** *** 83,96 **** register int len; register unsigned char *p; ! register long x; len = cch; p = (unsigned char *) key; ! x = %(junkSeed)d; while (--len >= 0) ! x = (1000003*x) ^ """ % \ { "lenJunk" : len(self.junk), ! "junkSeed" : self.seed, } --- 81,100 ---- register int len; register unsigned char *p; ! register unsigned long x; len = cch; p = (unsigned char *) key; ! x = %(junkSeed)s; while (--len >= 0) ! { ! /* (1000003 * x) ^ toupper(*(p++)) ! * translated to handle > 32 bit longs ! */ ! x = (0xf4243 * x); ! x = x & 0xFFFFFFFF; ! x = x ^ """ % \ { "lenJunk" : len(self.junk), ! "junkSeed" : hex(self.seed), } *************** *** 100,117 **** s = s + "*(p++);" s = s + """ x ^= cch + %(lenJunk)d; ! if (x == -1) ! x = -2; ! x %%= k_cHashElements; ! /* ensure the returned value is positive so we mimic Python's %% operator */ ! if (x < 0) ! x += k_cHashElements; return x; } """ % { "lenJunk" : len(self.junk), ! "junkSeed" : self.seed, } return s - WHITE, GREY, BLACK = 0,1,2 class Graph: --- 104,130 ---- s = s + "*(p++);" s = s + """ + } x ^= cch + %(lenJunk)d; ! if (x == 0xFFFFFFFF) ! x = 0xfffffffe; ! if (x & 0x80000000) ! { ! /* Emulate 32-bit signed (2's complement) modulo operation */ ! x = (~x & 0xFFFFFFFF) + 1; ! x %%= k_cHashElements; ! if (x != 0) ! { ! x = x + (~k_cHashElements & 0xFFFFFFFF) + 1; ! x = (~x & 0xFFFFFFFF) + 1; ! } ! } ! else ! x %%= k_cHashElements; return x; } """ % { "lenJunk" : len(self.junk), ! "junkSeed" : hex(self.seed), } return s WHITE, GREY, BLACK = 0,1,2 class Graph: *************** *** 140,145 **** if vertex1 > vertex2: vertex1, vertex2 = vertex2, vertex1 ! # if self.edges.has_key( (vertex1, vertex2) ): ! # raise ValueError, 'Collision: vertices already connected' self.edges[ (vertex1, vertex2) ] = value --- 153,158 ---- if vertex1 > vertex2: vertex1, vertex2 = vertex2, vertex1 ! if self.edges.has_key( (vertex1, vertex2) ): ! raise ValueError, 'Collision: vertices already connected' self.edges[ (vertex1, vertex2) ] = value *************** *** 342,347 **** code = code + """ ! static const %s G[k_cHashElements]; ! static const %s %s[k_cKeys]; """ % (self.type, dataArrayType, dataArrayName) --- 355,360 ---- code = code + """ ! staticforward const %s G[k_cHashElements]; ! staticforward const %s %s[k_cKeys]; """ % (self.type, dataArrayType, dataArrayName) *************** *** 554,558 **** for k, v in keys: h1 = f1(k) ; h2 = f2(k) ! G.connect( h1,h2, v) # Check if the resulting graph is acyclic; if it is, --- 567,571 ---- for k, v in keys: h1 = f1(k) ; h2 = f2(k) ! G.connect( h1, h2, v) # Check if the resulting graph is acyclic; if it is, *************** *** 599,605 **** sys.stderr.write('\nIn order to regenerate this hash function, \n') sys.stderr.write('you need to pass these following values back in:\n') ! sys.stderr.write('f1 seed: %s\n' % repr(f1.seed)) ! sys.stderr.write('f2 seed: %s\n' % repr(f2.seed)) sys.stderr.write('initial multipler: %s\n' % c) return PerfectHash(cchMaxKey, f1, f2, G, N, len(keys), maxHashValue) --- 612,619 ---- sys.stderr.write('\nIn order to regenerate this hash function, \n') sys.stderr.write('you need to pass these following values back in:\n') ! sys.stderr.write('f1 seed: %s\n' % hex(f1.seed)) ! sys.stderr.write('f2 seed: %s\n' % hex(f2.seed)) sys.stderr.write('initial multipler: %s\n' % c) return PerfectHash(cchMaxKey, f1, f2, G, N, len(keys), maxHashValue) + Index: perfhash.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/perfecthash/perfhash.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** perfhash.c 2000/07/22 19:25:51 1.2 --- perfhash.c 2000/07/26 03:56:06 1.3 *************** *** 6,14 **** register int len; register unsigned char *p; ! register long x; ! long lSeed; unsigned long cchSeed; ! if (!PyArg_ParseTuple(args, "iiO:hash", &lSeed, &cchSeed, &a)) return NULL; if (!PyString_Check(a)) --- 6,16 ---- register int len; register unsigned char *p; ! register unsigned long x; ! unsigned long ulSeed; unsigned long cchSeed; + unsigned long cHashElements; ! if (!PyArg_ParseTuple(args, "llOl:hash", ! &ulSeed, &cchSeed, &a, &cHashElements)) return NULL; if (!PyString_Check(a)) *************** *** 20,30 **** len = a->ob_size; p = (unsigned char *) a->ob_sval; ! x = lSeed; while (--len >= 0) ! x = (1000003*x) ^ *p++; x ^= a->ob_size + cchSeed; ! if (x == -1) ! x = -2; ! return PyInt_FromLong(x); } --- 22,54 ---- len = a->ob_size; p = (unsigned char *) a->ob_sval; ! x = ulSeed; while (--len >= 0) ! { ! /* (1000003 * x) ^ *p++ ! * translated to handle > 32 bit longs ! */ ! x = (0xf4243 * x); ! x = x & 0xFFFFFFFF; ! x = x ^ *p++; ! } x ^= a->ob_size + cchSeed; ! if (x == 0xFFFFFFFF) ! x = 0xfffffffe; ! if (x & 0x80000000) ! { ! /* Emulate Python 32-bit signed (2's complement) ! * modulo operation ! */ ! x = (~x & 0xFFFFFFFF) + 1; ! x %= cHashElements; ! if (x != 0) ! { ! x = x + (~cHashElements & 0xFFFFFFFF) + 1; ! x = (~x & 0xFFFFFFFF) + 1; ! } ! } ! else ! x %= cHashElements; ! return PyInt_FromLong((long)x); } *************** *** 34,38 **** register int len; register unsigned char *p; ! register long x; if (!PyString_Check(args)) --- 58,62 ---- register int len; register unsigned char *p; ! register unsigned long x; if (!PyString_Check(args)) *************** *** 46,53 **** len = a->ob_size; p = (unsigned char *) a->ob_sval; ! x = *p << 7; while (--len >= 0) ! x = (1000003*x) ^ *p++; ! return PyInt_FromLong(x); } --- 70,84 ---- len = a->ob_size; p = (unsigned char *) a->ob_sval; ! x = (*p << 7) & 0xFFFFFFFF; while (--len >= 0) ! { ! /* (1000003 * x) ^ *p++ ! * translated to handle > 32 bit longs ! */ ! x = (0xf4243 * x); ! x = x & 0xFFFFFFFF; ! x = x ^ *p++; ! } ! return PyInt_FromLong((long)x); } *************** *** 69,72 **** NULL, NULL, PYTHON_API_VERSION); if ( m == NULL ) ! Py_FatalError("can't initialize module hashModule"); } --- 100,114 ---- NULL, NULL, PYTHON_API_VERSION); if ( m == NULL ) ! Py_FatalError("can't initialize module perfhash"); } + + + + + + + + + + + From python-dev@python.org Wed Jul 26 04:56:09 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 25 Jul 2000 20:56:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules ucnhash.c,1.2,1.3 Message-ID: <200007260356.UAA19984@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv19915/Modules Modified Files: ucnhash.c Log Message: Fix UCNs machine with >= 32bit longs originally submitted by Bill Tutt Note: This code is actually going to be replaced in 2.0 by /F's new database. Until then, this patch keeps the test suite working. Index: ucnhash.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/ucnhash.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ucnhash.c 2000/06/29 00:06:39 1.2 --- ucnhash.c 2000/07/26 03:56:06 1.3 *************** *** 12,16 **** * http://starship.python.net/crew/amk/python/code/perfect-hash.html * ! * Generated on: Wed Jun 28 03:34:07 2000 */ --- 12,16 ---- * http://starship.python.net/crew/amk/python/code/perfect-hash.html * ! * Generated on: Fri Jul 14 08:00:58 2000 */ *************** *** 27,44 **** register int len; register unsigned char *p; ! register long x; len = cch; p = (unsigned char *) key; ! x = 1694245428; while (--len >= 0) ! x = (1000003*x) ^ toupper(*(p++)); x ^= cch + 10; ! if (x == -1) ! x = -2; ! x %= k_cHashElements; ! /* ensure the returned value is positive so we mimic Python's % operator */ ! if (x < 0) ! x += k_cHashElements; return x; } --- 27,60 ---- register int len; register unsigned char *p; ! register unsigned long x; len = cch; p = (unsigned char *) key; ! x = 0x64fc2234; while (--len >= 0) ! { ! /* (1000003 * x) ^ toupper(*(p++)) ! * translated to handle > 32 bit longs ! */ ! x = (0xf4243 * x); ! x = x & 0xFFFFFFFF; ! x = x ^ toupper(*(p++)); ! } x ^= cch + 10; ! if (x == 0xFFFFFFFF) ! x = 0xfffffffe; ! if (x & 0x80000000) ! { ! /* Emulate 32-bit signed (2's complement) modulo operation */ ! x = (~x & 0xFFFFFFFF) + 1; ! x %= k_cHashElements; ! if (x != 0) ! { ! x = x + (~k_cHashElements & 0xFFFFFFFF) + 1; ! x = (~x & 0xFFFFFFFF) + 1; ! } ! } ! else ! x %= k_cHashElements; return x; } *************** *** 49,66 **** register int len; register unsigned char *p; ! register long x; len = cch; p = (unsigned char *) key; ! x = -1917331657; while (--len >= 0) ! x = (1000003*x) ^ toupper(*(p++)); x ^= cch + 10; ! if (x == -1) ! x = -2; ! x %= k_cHashElements; ! /* ensure the returned value is positive so we mimic Python's % operator */ ! if (x < 0) ! x += k_cHashElements; return x; } --- 65,98 ---- register int len; register unsigned char *p; ! register unsigned long x; len = cch; p = (unsigned char *) key; ! x = 0x8db7d737; while (--len >= 0) ! { ! /* (1000003 * x) ^ toupper(*(p++)) ! * translated to handle > 32 bit longs ! */ ! x = (0xf4243 * x); ! x = x & 0xFFFFFFFF; ! x = x ^ toupper(*(p++)); ! } x ^= cch + 10; ! if (x == 0xFFFFFFFF) ! x = 0xfffffffe; ! if (x & 0x80000000) ! { ! /* Emulate 32-bit signed (2's complement) modulo operation */ ! x = (~x & 0xFFFFFFFF) + 1; ! x %= k_cHashElements; ! if (x != 0) ! { ! x = x + (~k_cHashElements & 0xFFFFFFFF) + 1; ! x = (~x & 0xFFFFFFFF) + 1; ! } ! } ! else ! x %= k_cHashElements; return x; } From python-dev@python.org Wed Jul 26 05:11:25 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 25 Jul 2000 21:11:25 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0204.txt,1.2,1.3 Message-ID: <200007260411.VAA27894@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv27887 Modified Files: pep-0204.txt Log Message: Do not start non-heading content on the first character of the line (after the header). Index: pep-0204.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0204.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pep-0204.txt 2000/07/18 10:01:12 1.2 --- pep-0204.txt 2000/07/26 04:11:22 1.3 *************** *** 264,269 **** References: ! [1] ! http://sourceforge.net/patch/?func=detailpatch&patch_id=100902&group_id=5470 --- 264,268 ---- References: ! [1] http://sourceforge.net/patch/?func=detailpatch&patch_id=100902&group_id=5470 From python-dev@python.org Wed Jul 26 05:12:44 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 25 Jul 2000 21:12:44 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0200.txt,1.4,1.5 Message-ID: <200007260412.VAA27930@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv27923 Modified Files: pep-0200.txt Log Message: Do not start non-heading content on the first character of the line (after the header). Index: pep-0200.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0200.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** pep-0200.txt 2000/07/25 14:11:19 1.4 --- pep-0200.txt 2000/07/26 04:12:42 1.5 *************** *** 18,30 **** Tentative Release Schedule ! Aug. 14: All 2.0 PEPs finished / feature freeze ! Aug. 28: 2.0 beta 1 ! Sep. 29: 2.0 final Guidelines for submitting patches and making changes ! Use good sense when committing changes. You should know what we mean ! by good sense or we wouldn't have given you commit privileges <0.5 ! wink>. Some specific examples of good sense include: - Do whatever the dictator tells you. --- 18,30 ---- Tentative Release Schedule ! Aug. 14: All 2.0 PEPs finished / feature freeze ! Aug. 28: 2.0 beta 1 ! Sep. 29: 2.0 final Guidelines for submitting patches and making changes ! Use good sense when committing changes. You should know what we ! mean by good sense or we wouldn't have given you commit privileges ! <0.5 wink>. Some specific examples of good sense include: - Do whatever the dictator tells you. *************** *** 44,76 **** to someone for review. ! Any significant new feature must be described in a PEP and approved ! before it is checked in. ! Any significant code addition, such as a new module or large patch, ! must include test cases for the regression test and documentation. A ! patch should not be checked in until the tests and documentation are ! ready. ! ! If you fix a bug, you should write a test case that would have caught ! the bug. ! ! If you commit a patch from the SF Patch Manager or fix a bug from the ! Jitterbug database, be sure to reference the patch/bug number in the ! CVS log message. Also be sure to change the status in the patch ! manager or bug database (if you have access to the bug database). ! ! It is not acceptable for any checked in code to cause the regression ! test to fail. If a checkin causes a failure, it must be fixed within ! 24 hours or it will be backed out. ! ! All contributed C code must be ANSI C. If possible check it with two ! different compilers, e.g. gcc and MSVC. ! ! All contributed Python code must follow Guido's Python style guide. ! http://www.python.org/doc/essays/styleguide.html ! ! It is understood that any code contributed will be released under an ! Open Source license. Do not contribute code if it can't be released ! this way. Accepted and completed --- 44,77 ---- to someone for review. ! Any significant new feature must be described in a PEP and ! approved before it is checked in. ! Any significant code addition, such as a new module or large ! patch, must include test cases for the regression test and ! documentation. A patch should not be checked in until the tests ! and documentation are ready. ! ! If you fix a bug, you should write a test case that would have ! caught the bug. ! ! If you commit a patch from the SF Patch Manager or fix a bug from ! the Jitterbug database, be sure to reference the patch/bug number ! in the CVS log message. Also be sure to change the status in the ! patch manager or bug database (if you have access to the bug ! database). ! ! It is not acceptable for any checked in code to cause the ! regression test to fail. If a checkin causes a failure, it must ! be fixed within 24 hours or it will be backed out. ! ! All contributed C code must be ANSI C. If possible check it with ! two different compilers, e.g. gcc and MSVC. ! ! All contributed Python code must follow Guido's Python style ! guide. http://www.python.org/doc/essays/styleguide.html ! ! It is understood that any code contributed will be released under ! an Open Source license. Do not contribute code if it can't be ! released this way. Accepted and completed *************** *** 116,120 **** Small optimization achieved by using the code object's lnotab instead of the SET_LINENO instruction. Uses code rewriting ! technique (that Guido's growns on) to support debugger, which uses SET_LINENO. --- 117,121 ---- Small optimization achieved by using the code object's lnotab instead of the SET_LINENO instruction. Uses code rewriting ! technique (that Guido's frowns on) to support debugger, which uses SET_LINENO. From python-dev@python.org Wed Jul 26 05:14:32 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 25 Jul 2000 21:14:32 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep2html.py,1.4,1.5 Message-ID: <200007260414.VAA28076@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv28069 Modified Files: pep2html.py Log Message: If form-feeds are not going to be used to indicate what can be marked as a header, use a non-white character in the first column. This looks a little cleaner. Index: pep2html.py =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** pep2html.py 2000/07/25 04:12:28 1.4 --- pep2html.py 2000/07/26 04:14:30 1.5 *************** *** 60,97 **** title = "PEP " + pep + " -- " + title if title: ! fo.write("%s\n" % cgi.escape(title)) fo.write("\n") # body ! fo.write("\n") ! fo.write("[home]\n") if os.path.basename(infile) != "pep-0000.txt": ! fo.write("[index]\n") ! fo.write("
      \n\n") for k, v in header: fo.write(" \n" % (cgi.escape(k), cgi.escape(v))) title = 0 ! fo.write("
      %s:%s
      \n
      ")
            while 1:
                line = fi.readline()
                if not line:
                    break
      !         if line[:1] == "\f":
      !             fo.write("
      ") ! # fo.write("\n

      \n")
      !             title = 1
      !         else:
      !             line = fixpat.sub(lambda x, c=infile: fixanchor(c, x), line)
      !             if title:
                        if line.strip() == "Local Variables:":
                            break
                        fo.write("
      \n

      %s

      \n
      " % line.strip())
      -                 # fo.write("

      %s

      \n" % line)
                        title = 0
                    else:
                        fo.write(line)
      !     fo.write("
      \n") ! fo.write("\n") ! fo.write("\n") fo.close() os.chmod(outfile, 0664) --- 60,92 ---- title = "PEP " + pep + " -- " + title if title: ! fo.write(" %s\n" % cgi.escape(title)) fo.write("\n") # body ! fo.write('\n') ! fo.write('[home]\n') if os.path.basename(infile) != "pep-0000.txt": ! fo.write('[index]\n') ! fo.write('
      \n\n') for k, v in header: fo.write(" \n" % (cgi.escape(k), cgi.escape(v))) title = 0 ! fo.write("
      %s:%s
      \n
      \n
      ")
            while 1:
                line = fi.readline()
                if not line:
                    break
      !         if line[0] != "\f":
      !             if line[0].strip():
                        if line.strip() == "Local Variables:":
                            break
                        fo.write("
      \n

      %s

      \n
      " % line.strip())
                        title = 0
                    else:
      +                 line = fixpat.sub(lambda x, c=infile: fixanchor(c, x), line)
                        fo.write(line)
      !     fo.write("
      \n" ! "\n" ! "\n") fo.close() os.chmod(outfile, 0664) From python-dev@python.org Wed Jul 26 05:22:05 2000 From: python-dev@python.org (Barry Warsaw) Date: Tue, 25 Jul 2000 21:22:05 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.6,1.7 Message-ID: <200007260422.VAA28428@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv28413 Modified Files: pep-0201.txt Log Message: Fixed reference [1] to point to the current documentation, not the devel copy (thanks to Fred Drake, Dr. Docs!) Index: pep-0201.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** pep-0201.txt 2000/07/25 22:00:05 1.6 --- pep-0201.txt 2000/07/26 04:22:03 1.7 *************** *** 405,409 **** References ! [1] http://www.python.org/doc/devel/ref/for.html [2] http://www.haskell.org/onlinereport/standard-prelude.html#$vzip --- 405,409 ---- References ! [1] http://www.python.org/doc/current/ref/for.html [2] http://www.haskell.org/onlinereport/standard-prelude.html#$vzip From python-dev@python.org Wed Jul 26 08:04:41 2000 From: python-dev@python.org (Mark Hammond) Date: Wed, 26 Jul 2000 00:04:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib urllib.py,1.97,1.98 Message-ID: <200007260704.AAA26532@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv26517 Modified Files: urllib.py Log Message: Patch #100873 - Use registry to find proxies for urllib on Win32 Note that this patch looks worse than it is - an existing function (getproxies() for all platforms other than Win/Mac) has been moved, renamed and indentation changed, but the body of that function is identical. Windows now allows the environment variables to override the registry. Index: urllib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/urllib.py,v retrieving revision 1.97 retrieving revision 1.98 diff -C2 -r1.97 -r1.98 *** urllib.py 2000/07/16 12:04:30 1.97 --- urllib.py 2000/07/26 07:04:38 1.98 *************** *** 1030,1033 **** --- 1030,1049 ---- # Proxy handling + def getproxies_environment(): + """Return a dictionary of scheme -> proxy server URL mappings. + + Scan the environment for variables named _proxy; + this seems to be the standard convention. If you need a + different way, you can pass a proxies dictionary to the + [Fancy]URLopener constructor. + + """ + proxies = {} + for name, value in os.environ.items(): + name = string.lower(name) + if value and name[-6:] == '_proxy': + proxies[name[:-6]] = value + return proxies + if os.name == 'mac': def getproxies(): *************** *** 1060,1080 **** # Gopher: XXXX To be done. return proxies ! ! else: ! def getproxies(): """Return a dictionary of scheme -> proxy server URL mappings. ! ! Scan the environment for variables named _proxy; ! this seems to be the standard convention. If you need a ! different way, you can pass a proxies dictionary to the ! [Fancy]URLopener constructor. ! """ proxies = {} ! for name, value in os.environ.items(): ! name = string.lower(name) ! if value and name[-6:] == '_proxy': ! proxies[name[:-6]] = value return proxies --- 1076,1128 ---- # Gopher: XXXX To be done. return proxies ! ! elif os.name == 'nt': ! def getproxies_registry(): """Return a dictionary of scheme -> proxy server URL mappings. ! ! Win32 uses the registry to store proxies. ! """ proxies = {} ! try: ! import _winreg ! except ImportError: ! # Std module, so should be around - but you never know! ! return proxies ! try: ! internetSettings = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, ! 'Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings') ! proxyEnable = _winreg.QueryValueEx(internetSettings, ! 'ProxyEnable')[0] ! if proxyEnable: ! # Returned as Unicode but problems if not converted to ASCII ! proxyServer = str(_winreg.QueryValueEx(internetSettings, ! 'ProxyServer')[0]) ! if ';' in proxyServer: # Per-protocol settings ! for p in proxyServer.split(';'): ! protocol, address = p.split('=') ! proxies[protocol] = '%s://%s' % (protocol, address) ! else: # Use one setting for all protocols ! proxies['http'] = 'http://%s' % proxyServer ! proxies['ftp'] = 'ftp://%s' % proxyServer ! internetSettings.Close() ! except (WindowsError, ValueError, TypeError): ! # Either registry key not found etc, or the value in an ! # unexpected format. ! # proxies already set up to be empty so nothing to do ! pass return proxies + + def getproxies(): + """Return a dictionary of scheme -> proxy server URL mappings. + + Returns settings gathered from the environment, if specified, + or the registry. + + """ + return getproxies_environment() or getproxies_registry() + else: + # By default use environment variables + getproxies = getproxies_environment From python-dev@python.org Wed Jul 26 16:46:32 2000 From: python-dev@python.org (Sjoerd Mullender) Date: Wed, 26 Jul 2000 08:46:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include pyport.h,2.6,2.7 Message-ID: <200007261546.IAA23261@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv23229 Modified Files: pyport.h Log Message: Make mode_t available for the declaration of _getpty(). Index: pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** pyport.h 2000/07/24 16:06:23 2.6 --- pyport.h 2000/07/26 15:46:29 2.7 *************** *** 97,101 **** #ifdef HAVE__GETPTY ! /* Unchecked */ extern char * _getpty(int *, int, mode_t, int); #endif --- 97,101 ---- #ifdef HAVE__GETPTY ! #include /* we need to import mode_t */ extern char * _getpty(int *, int, mode_t, int); #endif From python-dev@python.org Wed Jul 26 18:29:15 2000 From: python-dev@python.org (Fredrik Lundh) Date: Wed, 26 Jul 2000 10:29:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.161,2.162 Message-ID: <200007261729.KAA13886@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv13581/Modules Modified Files: posixmodule.c Log Message: - changed windows pclose to make sure we don't return before the underlying process has terminated (bug fix from David Bolen) Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.161 retrieving revision 2.162 diff -C2 -r2.161 -r2.162 *** posixmodule.c 2000/07/24 16:06:23 2.161 --- posixmodule.c 2000/07/26 17:29:12 2.162 *************** *** 2596,2604 **** static int _PyPclose(FILE *file) { ! int result = 0; DWORD exit_code; HANDLE hProcess; PyObject *hProcessObj, *fileObj; if (_PyPopenProcs) { fileObj = PyLong_FromVoidPtr(file); --- 2596,2609 ---- static int _PyPclose(FILE *file) { ! int result; DWORD exit_code; HANDLE hProcess; PyObject *hProcessObj, *fileObj; + /* Close the file handle first, to ensure it can't block the + * child from exiting when we wait for it below. + */ + result = fclose(file); + if (_PyPopenProcs) { fileObj = PyLong_FromVoidPtr(file); *************** *** 2607,2624 **** if (hProcessObj) { hProcess = PyLong_AsVoidPtr(hProcessObj); ! if (GetExitCodeProcess(hProcess, &exit_code)) { /* Possible truncation here in 16-bit environments, but * real exit codes are just the lower byte in any event. */ result = exit_code; - if (result == STILL_ACTIVE) - result = 0; /* Minimize confusion */ } else { ! /* No good way to bubble up an error, so instead we just ! * return the Windows last error shifted above standard ! * exit codes. This will truncate in 16-bits but should ! * be fine in 32 and at least distinguishes the problem. */ ! result = (GetLastError() << 8); } --- 2612,2636 ---- if (hProcessObj) { hProcess = PyLong_AsVoidPtr(hProcessObj); ! if (result != EOF && ! WaitForSingleObject(hProcess, INFINITE) != WAIT_FAILED && ! GetExitCodeProcess(hProcess, &exit_code)) { /* Possible truncation here in 16-bit environments, but * real exit codes are just the lower byte in any event. */ result = exit_code; } else { ! /* Indicate failure - this will cause the file object ! * to raise an I/O error and translate the last Win32 ! * error code from errno. We do have a problem with ! * last errors that overlap the normal errno table, ! * but that's a consistent problem with the file object. */ ! if (result != EOF) { ! /* If the error wasn't from the fclose(), then ! * set errno for the file object error handling. ! */ ! errno = GetLastError(); ! } ! result = -1; } *************** *** 2636,2640 **** } /* if _PyPopenProcs */ - fclose(file); return result; } --- 2648,2651 ---- From python-dev@python.org Wed Jul 26 19:36:31 2000 From: python-dev@python.org (A.M. Kuchling) Date: Wed, 26 Jul 2000 11:36:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.35,2.36 Message-ID: <200007261836.LAA26227@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv26195 Modified Files: _cursesmodule.c Log Message: Comment out a debugging print (spotted by Michael Deegan) Index: _cursesmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** _cursesmodule.c 2000/07/26 02:57:20 2.35 --- _cursesmodule.c 2000/07/26 18:36:27 2.36 *************** *** 1097,1101 **** } ! printf("Subwin: %i %i %i %i \n", nlines, ncols, begin_y, begin_x); if (self->win->_flags & _ISPAD) win = subpad(self->win, nlines, ncols, begin_y, begin_x); --- 1097,1101 ---- } ! /* printf("Subwin: %i %i %i %i \n", nlines, ncols, begin_y, begin_x); */ if (self->win->_flags & _ISPAD) win = subpad(self->win, nlines, ncols, begin_y, begin_x); From python-dev@python.org Thu Jul 27 02:21:58 2000 From: python-dev@python.org (Greg Ward) Date: Wed, 26 Jul 2000 18:21:58 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command build_ext.py,1.56,1.57 Message-ID: <200007270121.SAA16077@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv16064/command Modified Files: build_ext.py Log Message: Typo fix from David Ascher. Index: build_ext.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/build_ext.py,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -r1.56 -r1.57 *** build_ext.py 2000/07/14 13:35:07 1.56 --- build_ext.py 2000/07/27 01:21:54 1.57 *************** *** 293,297 **** for macro in macros: if not (type(macro) is TupleType and ! 1 <= len(macros) <= 2): raise DistutilsSetupError, \ ("'macros' element of build info dict " --- 293,297 ---- for macro in macros: if not (type(macro) is TupleType and ! 1 <= len(macro) <= 2): raise DistutilsSetupError, \ ("'macros' element of build info dict " From python-dev@python.org Thu Jul 27 02:23:23 2000 From: python-dev@python.org (Greg Ward) Date: Wed, 26 Jul 2000 18:23:23 -0700 Subject: [Python-checkins] CVS: distutils/distutils unixccompiler.py,1.28,1.29 Message-ID: <200007270123.SAA16180@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv16170 Modified Files: unixccompiler.py Log Message: Fix to call 'library_filename()' instead of the non-existent 'shared_library_filename()'. Index: unixccompiler.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/unixccompiler.py,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** unixccompiler.py 2000/06/28 01:29:09 1.28 --- unixccompiler.py 2000/07/27 01:23:19 1.29 *************** *** 206,210 **** self.link_shared_object ( objects, ! self.shared_library_filename (output_libname), output_dir, libraries, --- 206,210 ---- self.link_shared_object ( objects, ! self.library_filename (output_libname, lib_type='shared'), output_dir, libraries, *************** *** 321,326 **** for dir in dirs: ! shared = os.path.join (dir, self.shared_library_filename (lib)) ! static = os.path.join (dir, self.library_filename (lib)) # We're second-guessing the linker here, with not much hard --- 321,328 ---- for dir in dirs: ! shared = os.path.join ( ! dir, self.library_filename (lib, lib_type='shared')) ! static = os.path.join ( ! dir, self.library_filename (lib, lib_type='static')) # We're second-guessing the linker here, with not much hard From python-dev@python.org Thu Jul 27 02:58:48 2000 From: python-dev@python.org (Greg Ward) Date: Wed, 26 Jul 2000 18:58:48 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command sdist.py,1.37,1.38 Message-ID: <200007270158.SAA18478@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv18468 Modified Files: sdist.py Log Message: Remove unused 'search_dir()' method. Comment tweak. Index: sdist.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/sdist.py,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -r1.37 -r1.38 *** sdist.py 2000/07/05 03:06:46 1.37 --- sdist.py 2000/07/27 01:58:45 1.38 *************** *** 320,343 **** - def search_dir (self, dir, pattern=None): - """Recursively find files under 'dir' matching 'pattern' (a string - containing a Unix-style glob pattern). If 'pattern' is None, find - all files under 'dir'. Return the list of found filenames. - """ - allfiles = findall (dir) - if pattern is None: - return allfiles - - pattern_re = translate_pattern (pattern) - files = [] - for file in allfiles: - if pattern_re.match (os.path.basename (file)): - files.append (file) - - return files - - # search_dir () - - def recursive_exclude_pattern (self, dir, pattern=None): """Remove filenames from 'self.files' that are under 'dir' and --- 320,323 ---- *************** *** 718,722 **** for name in names: ! if dir != os.curdir: # avoid the dreaded "./" syndrome fullname = os.path.join (dir, name) else: --- 698,702 ---- for name in names: ! if dir != os.curdir: # avoid leading "./" fullname = os.path.join (dir, name) else: From python-dev@python.org Thu Jul 27 03:13:23 2000 From: python-dev@python.org (Greg Ward) Date: Wed, 26 Jul 2000 19:13:23 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command bdist_rpm.py,1.13,1.14 build_ext.py,1.57,1.58 build_scripts.py,1.3,1.4 install_data.py,1.10,1.11 Message-ID: <200007270213.TAA26481@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv26443/command Modified Files: bdist_rpm.py build_ext.py build_scripts.py install_data.py Log Message: Fixed a grab-bag of typos spotted by Rob Hooft. Index: bdist_rpm.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/bdist_rpm.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** bdist_rpm.py 2000/06/08 14:21:23 1.13 --- bdist_rpm.py 2000/07/27 02:13:20 1.14 *************** *** 401,405 **** for (rpm_opt, attr, default) in script_options: ! # Insert contents of file refered to, if no file is refered to # use 'default' as contents of script val = getattr(self, attr) --- 401,405 ---- for (rpm_opt, attr, default) in script_options: ! # Insert contents of file referred to, if no file is refered to # use 'default' as contents of script val = getattr(self, attr) Index: build_ext.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/build_ext.py,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -r1.57 -r1.58 *** build_ext.py 2000/07/27 01:21:54 1.57 --- build_ext.py 2000/07/27 02:13:20 1.58 *************** *** 395,399 **** # guess it's useful) # The environment variable should take precedence, and ! # any sensible compiler will give precendence to later # command line args. Hence we combine them in order: extra_args = ext.extra_compile_args or [] --- 395,399 ---- # guess it's useful) # The environment variable should take precedence, and ! # any sensible compiler will give precedence to later # command line args. Hence we combine them in order: extra_args = ext.extra_compile_args or [] Index: build_scripts.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/build_scripts.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** build_scripts.py 2000/05/25 20:05:52 1.3 --- build_scripts.py 2000/07/27 02:13:20 1.4 *************** *** 47,51 **** Python script in the Unix way (first line matches 'first_line_re', ie. starts with "\#!" and contains "python"), then adjust the first ! line to refer to the current Python intepreter as we copy. """ outfiles = [] --- 47,51 ---- Python script in the Unix way (first line matches 'first_line_re', ie. starts with "\#!" and contains "python"), then adjust the first ! line to refer to the current Python interpreter as we copy. """ outfiles = [] Index: install_data.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/install_data.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** install_data.py 2000/06/24 17:36:24 1.10 --- install_data.py 2000/07/27 02:13:20 1.11 *************** *** 19,23 **** user_options = [ ('install-dir=', 'd', ! "base directory for installating data files " "(default: installation base dir)"), ('root=', None, --- 19,23 ---- user_options = [ ('install-dir=', 'd', ! "base directory for installing data files " "(default: installation base dir)"), ('root=', None, From python-dev@python.org Thu Jul 27 03:13:33 2000 From: python-dev@python.org (Greg Ward) Date: Wed, 26 Jul 2000 19:13:33 -0700 Subject: [Python-checkins] CVS: distutils/distutils ccompiler.py,1.29,1.30 cmd.py,1.19,1.20 cygwinccompiler.py,1.2,1.3 util.py,1.38,1.39 dist.py,1.32,1.33 Message-ID: <200007270213.TAA26480@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv26443 Modified Files: ccompiler.py cmd.py cygwinccompiler.py util.py dist.py Log Message: Fixed a grab-bag of typos spotted by Rob Hooft. Index: ccompiler.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/ccompiler.py,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** ccompiler.py 2000/07/07 20:41:20 1.29 --- ccompiler.py 2000/07/27 02:13:19 1.30 *************** *** 305,309 **** def add_link_object (self, object): """Add 'object' to the list of object files (or analogues, such as ! explictly named library files or the output of "resource compilers") to be included in every link driven by this compiler object. --- 305,309 ---- def add_link_object (self, object): """Add 'object' to the list of object files (or analogues, such as ! explicitly named library files or the output of "resource compilers") to be included in every link driven by this compiler object. Index: cmd.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/cmd.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** cmd.py 2000/06/28 14:48:01 1.19 --- cmd.py 2000/07/27 02:13:19 1.20 *************** *** 56,60 **** # "not defined, check self.distribution's copy", while 0 or 1 mean # false and true (duh). Note that this means figuring out the real ! # value of each flag is a touch complicatd -- hence "self.verbose" # (etc.) will be handled by __getattr__, below. self._verbose = None --- 56,60 ---- # "not defined, check self.distribution's copy", while 0 or 1 mean # false and true (duh). Note that this means figuring out the real ! # value of each flag is a touch complicated -- hence "self.verbose" # (etc.) will be handled by __getattr__, below. self._verbose = None Index: cygwinccompiler.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/cygwinccompiler.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** cygwinccompiler.py 2000/06/29 22:57:55 1.2 --- cygwinccompiler.py 2000/07/27 02:13:19 1.3 *************** *** 146,150 **** # who wants symbols and a many times larger output file ! # should explicitely switch the debug mode on # otherwise we let dllwrap strip the output file # (On my machine unstripped_file = stripped_file + 254KB --- 146,150 ---- # who wants symbols and a many times larger output file ! # should explicitly switch the debug mode on # otherwise we let dllwrap strip the output file # (On my machine unstripped_file = stripped_file + 254KB Index: util.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/util.py,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** util.py 2000/06/28 14:48:01 1.38 --- util.py 2000/07/27 02:13:19 1.39 *************** *** 106,110 **** options, etc. Currently this includes: HOME - user's home directory (Unix only) ! PLAT - desription of the current platform, including hardware and OS (see 'get_platform()') """ --- 106,110 ---- options, etc. Currently this includes: HOME - user's home directory (Unix only) ! PLAT - description of the current platform, including hardware and OS (see 'get_platform()') """ *************** *** 126,130 **** def subst_vars (str, local_vars): """Perform shell/Perl-style variable substitution on 'string'. ! Every occurence of '$' followed by a name, or a name enclosed in braces, is considered a variable. Every variable is substituted by the value found in the 'local_vars' dictionary, or in 'os.environ' --- 126,130 ---- def subst_vars (str, local_vars): """Perform shell/Perl-style variable substitution on 'string'. ! Every occurrence of '$' followed by a name, or a name enclosed in braces, is considered a variable. Every variable is substituted by the value found in the 'local_vars' dictionary, or in 'os.environ' Index: dist.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/dist.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** dist.py 2000/07/07 20:45:21 1.32 --- dist.py 2000/07/27 02:13:19 1.33 *************** *** 168,172 **** # been instantiated -- a false value will be inserted when the # command object is created, and replaced with a true value when ! # the command is succesfully run. Thus it's probably best to use # '.get()' rather than a straight lookup. self.have_run = {} --- 168,172 ---- # been instantiated -- a false value will be inserted when the # command object is created, and replaced with a true value when ! # the command is successfully run. Thus it's probably best to use # '.get()' rather than a straight lookup. self.have_run = {} *************** *** 678,682 **** def get_command_obj (self, command, create=1): """Return the command object for 'command'. Normally this object ! is cached on a previous call to 'get_command_obj()'; if no comand object for 'command' is in the cache, then we either create and return it (if 'create' is true) or return None. --- 678,682 ---- def get_command_obj (self, command, create=1): """Return the command object for 'command'. Normally this object ! is cached on a previous call to 'get_command_obj()'; if no command object for 'command' is in the cache, then we either create and return it (if 'create' is true) or return None. From python-dev@python.org Thu Jul 27 03:17:42 2000 From: python-dev@python.org (Greg Ward) Date: Wed, 26 Jul 2000 19:17:42 -0700 Subject: [Python-checkins] CVS: distutils setup.py,1.17,1.18 Message-ID: <200007270217.TAA26717@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv26702 Modified Files: setup.py Log Message: Bump version to 0.9.1pre. Index: setup.py =================================================================== RCS file: /cvsroot/python/distutils/setup.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** setup.py 2000/06/30 02:54:36 1.17 --- setup.py 2000/07/27 02:17:39 1.18 *************** *** 12,16 **** setup (name = "Distutils", ! version = "0.9", description = "Python Distribution Utilities", author = "Greg Ward", --- 12,16 ---- setup (name = "Distutils", ! version = "0.9.1pre", description = "Python Distribution Utilities", author = "Greg Ward", From python-dev@python.org Thu Jul 27 03:17:42 2000 From: python-dev@python.org (Greg Ward) Date: Wed, 26 Jul 2000 19:17:42 -0700 Subject: [Python-checkins] CVS: distutils/distutils __init__.py,1.8,1.9 Message-ID: <200007270217.TAA26718@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv26702/distutils Modified Files: __init__.py Log Message: Bump version to 0.9.1pre. Index: __init__.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/__init__.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** __init__.py 2000/06/30 02:54:36 1.8 --- __init__.py 2000/07/27 02:17:40 1.9 *************** *** 11,13 **** __revision__ = "$Id$" ! __version__ = "0.9" --- 11,13 ---- __revision__ = "$Id$" ! __version__ = "0.9.1pre" From python-dev@python.org Thu Jul 27 04:03:42 2000 From: python-dev@python.org (Jeremy Hylton) Date: Wed, 26 Jul 2000 20:03:42 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0200.txt,1.5,1.6 Message-ID: <200007270303.UAA01220@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv881 Modified Files: pep-0200.txt Log Message: add sterner warning about test case problems note error in dictionary comparison that raises exception Index: pep-0200.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0200.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** pep-0200.txt 2000/07/26 04:12:42 1.5 --- pep-0200.txt 2000/07/27 03:03:39 1.6 *************** *** 75,78 **** --- 75,98 ---- released this way. + Failing test cases need to get fixed + + We need to resolve errors in the regression test suite quickly. + Changes should not be committed to the CVS tree unless the + regression test runs cleanly with the changes applied. If it + fails, there may be bugs lurking in the code. (There may be bugs + anyway, but that's another matter.) If the test cases are known + to fail, they serve no useful purpose. + + The current test suite runs correctly on my Linux box (July 26). + Heard reports that test_fork1 fails on some Linux boxes and that + test_winreg and test_winreg32 fail on Windows. + + Open items -- should be done/fixed + + Decoding errors when comparing strings. There is a dictionary bug + that prevents objects from being accessible when an exception is + raised during hashing or comparison. + + Accepted and completed From python-dev@python.org Thu Jul 27 08:42:45 2000 From: python-dev@python.org (Fredrik Lundh) Date: Thu, 27 Jul 2000 00:42:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_popen2.py,1.1,1.2 Message-ID: <200007270742.AAA24391@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv24366 Modified Files: test_popen2.py Log Message: -- changed test to work on platforms which have os.popen but no os.fork Index: test_popen2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_popen2.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_popen2.py 1999/03/11 13:26:18 1.1 --- test_popen2.py 2000/07/27 07:42:43 1.2 *************** *** 6,14 **** # popen2 contains its own testing routine # which is especially useful to see if open files ! # like stdin can be read successfully by a forked # subprocess. def main(): ! from os import fork # skips test through ImportError import popen2 popen2._test() --- 6,20 ---- # popen2 contains its own testing routine # which is especially useful to see if open files ! # like stdin can be read successfully by a forked # subprocess. def main(): ! try: ! from os import popen ! except ImportError: ! # if we don't have os.popen, check that ! # we have os.fork. if not, skip the test ! # (by raising an ImportError) ! from os import fork import popen2 popen2._test() From python-dev@python.org Thu Jul 27 12:58:06 2000 From: python-dev@python.org (A.M. Kuchling) Date: Thu, 27 Jul 2000 04:58:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.36,2.37 Message-ID: <200007271158.EAA25932@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv25763 Modified Files: _cursesmodule.c Log Message: Added list of missing functions as a comment Index: _cursesmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v retrieving revision 2.36 retrieving revision 2.37 diff -C2 -r2.36 -r2.37 *** _cursesmodule.c 2000/07/26 18:36:27 2.36 --- _cursesmodule.c 2000/07/27 11:58:01 2.37 *************** *** 34,37 **** --- 34,63 ---- /* CVS: $Id$ */ + /* + + A number of SysV or ncurses functions don't have wrappers yet; if you need + a given function, add it and send a patch. Here's a list of currently + unsupported functions: + + addchnstr addchstr chgat color_set copywin define_key + del_curterm delscreen dupwin inchnstr inchstr innstr keyok + mcprint mvaddchnstr mvaddchstr mvchgat mvcur mvinchnstr + mvinchstr mvinnstr mmvwaddchnstr mvwaddchstr mvwchgat + mvwgetnstr mvwinchnstr mvwinchstr mvwinnstr napms newterm + overlay overwrite resetty resizeterm restartterm ripoffline + savetty scr_dump scr_init scr_restore scr_set scrl set_curterm + set_term setterm setupterm tgetent tgetflag tgetnum tgetstr + tgoto timeout tparm tputs tputs typeahead use_default_colors + vidattr vidputs waddchnstr waddchstr wchgat wcolor_set + winchnstr winchstr winnstr wmouse_trafo wredrawln wscrl + wtimeout + + Low-priority: + slk_attr slk_attr_off slk_attr_on slk_attr_set slk_attroff + slk_attron slk_attrset slk_clear slk_color slk_init slk_label + slk_noutrefresh slk_refresh slk_restore slk_set slk_touch + + */ + /* Release Number */ From python-dev@python.org Thu Jul 27 19:44:47 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 27 Jul 2000 11:44:47 -0700 Subject: [Python-checkins] CVS: python/nondist/peps style.css,NONE,1.1 pep2html.py,1.5,1.6 Message-ID: <200007271844.LAA26996@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv26987 Modified Files: pep2html.py Added Files: style.css Log Message: Further presentation adjustments, use a style sheet for some things. --- NEW FILE --- .navigation { background: #99ccff; border: thin solid #ffffff; width: 100%; padding: 4pt; } .header th:after { content: " " } Index: pep2html.py =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** pep2html.py 2000/07/26 04:14:30 1.5 --- pep2html.py 2000/07/27 18:44:44 1.6 *************** *** 60,76 **** title = "PEP " + pep + " -- " + title if title: ! fo.write(" %s\n" % cgi.escape(title)) fo.write("\n") # body ! fo.write('\n') ! fo.write('[home]\n') if os.path.basename(infile) != "pep-0000.txt": ! fo.write('[index]\n') ! fo.write('
      \n\n') for k, v in header: fo.write(" \n" % (cgi.escape(k), cgi.escape(v))) title = 0 ! fo.write("
      %s:%s
      \n
      \n
      ")
            while 1:
                line = fi.readline()
      --- 60,81 ----
                title = "PEP " + pep + " -- " + title
            if title:
      !         fo.write("  %s\n"
      !                  '  \n'
      !                  % cgi.escape(title))
            fo.write("\n")
            # body
      !     fo.write('\n'
      !              '\n'
      !              '
      \n\n') for k, v in header: fo.write(" \n" % (cgi.escape(k), cgi.escape(v))) title = 0 ! fo.write("
      %s:%s
      \n
      \n
      \n" ! "
      ")
            while 1:
                line = fi.readline()
      ***************
      *** 111,115 ****
        
            if update:
      !         os.system("scp pep-*.html " + username + HOST + ":" + HDIR)
                os.system("ssh " + username + HOST + " chmod 664 " + HDIR + "/*")
        
      --- 116,120 ----
        
            if update:
      !         os.system("scp pep-*.html style.css " + username + HOST + ":" + HDIR)
                os.system("ssh " + username + HOST + " chmod 664 " + HDIR + "/*")
        
      
      
      
      From python-dev@python.org  Thu Jul 27 19:46:32 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Thu, 27 Jul 2000 11:46:32 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0160.txt,1.3,1.4
      Message-ID: <200007271846.LAA27298@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv27282
      
      Modified Files:
      	pep-0160.txt 
      Log Message:
      
      Identify the branch tag for the Python 1.6 release.
      Remove the ugly form-feed characters some people use with Emacs.
      
      
      Index: pep-0160.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0160.txt,v
      retrieving revision 1.3
      retrieving revision 1.4
      diff -C2 -r1.3 -r1.4
      *** pep-0160.txt	2000/07/25 20:48:58	1.3
      --- pep-0160.txt	2000/07/27 18:46:29	1.4
      ***************
      *** 6,10 ****
        Status:         Incomplete
        
      - 
        Introduction
        
      --- 6,9 ----
      ***************
      *** 16,25 ****
            Corporation for National Research Initiatives (CNRI).
        
      - 
        Schedule
            August 1     1.6 beta 1 release.
            August 15    1.6 final release.
        
      - 
        Features
        
      --- 15,22 ----
      ***************
      *** 37,41 ****
              of the re module.
        
      - 
        Mechanism
        
      --- 34,37 ----
      ***************
      *** 47,59 ****
            implementations.
        
            Patches and features will be merged to the extent required to pass
            regression tests in effect on 16 May 2000.
        
      - 
        Copyright
        
            This document has been placed in the public domain.
        
      - 
        Local Variables:
        mode: indented-text
      --- 43,55 ----
            implementations.
        
      +     The branch tag is "cnri-16-start".
      + 
            Patches and features will be merged to the extent required to pass
            regression tests in effect on 16 May 2000.
        
        Copyright
        
            This document has been placed in the public domain.
        
        Local Variables:
        mode: indented-text
      
      
      
      From python-dev@python.org  Thu Jul 27 20:15:22 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Thu, 27 Jul 2000 12:15:22 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.7,1.8
      Message-ID: <200007271915.MAA04678@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv4670
      
      Modified Files:
      	pep-0201.txt 
      Log Message:
      Updated based on Guido's recent pronouncements on the Open Issues.
      There are now no more open issues.
      
      
      Index: pep-0201.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v
      retrieving revision 1.7
      retrieving revision 1.8
      diff -C2 -r1.7 -r1.8
      *** pep-0201.txt	2000/07/26 04:22:03	1.7
      --- pep-0201.txt	2000/07/27 19:15:20	1.8
      ***************
      *** 85,115 ****
            function is to be called `zip' and has the following signature:
        
      !     zip(seqa, [seqb, [...]], [pad=])
        
            zip() takes one or more sequences and weaves their elements
            together, just as map(None, ...) does with sequences of equal
      !     length.  The optional keyword argument `pad', if supplied, is a
      !     value used to pad all shorter sequences to the length of the
      !     longest sequence.  If `pad' is omitted, then weaving stops when
      !     the shortest sequence is exhausted.
      ! 
      !     It is not possible to pad short lists with different pad values,
      !     nor will zip() ever raise an exception with lists of different
      !     lengths.  To accomplish either behavior, the sequences must be
      !     checked and processed before the call to zip() -- but see the Open
      !     Issues below for more discussion.
      ! 
      ! 
      ! Lazy Execution
      ! 
      !     For performance purposes, zip() does not construct the list of
      !     tuples immediately.  Instead it instantiates an object that
      !     implements a __getitem__() method and conforms to the informal
      !     for-loop protocol.  This method constructs the individual tuples
      !     on demand.
        
      -     Guido is strongly opposed to lazy execution.  See Open Issues.
        
        
        Examples
        
      --- 85,101 ----
            function is to be called `zip' and has the following signature:
        
      !     zip(seqa, [seqb, [...]])
        
            zip() takes one or more sequences and weaves their elements
            together, just as map(None, ...) does with sequences of equal
      !     length.  The weaving stops when the shortest sequence is
      !     exhausted.
        
        
      + Return Value
        
      +     zip() returns a real Python list, the same way map() does.
      + 
      + 
        Examples
        
      ***************
      *** 128,148 ****
            [(1, 12), (2, 13)]
        
      -     >>> zip(a, d, pad=0)
      -     [(1, 12), (2, 13), (3, 0), (4, 0)]
      -     
      -     >>> zip(a, d, pid=0)
      -     Traceback (most recent call last):
      -       File "", line 1, in ?
      -       File "/usr/tmp/python-iKAOxR", line 11, in zip
      -     TypeError: unexpected keyword arguments
      -     
            >>> zip(a, b, c, d)
            [(1, 5, 9, 12), (2, 6, 10, 13)]
        
      -     >>> zip(a, b, c, d, pad=None)
      -     [(1, 5, 9, 12), (2, 6, 10, 13), (3, 7, 11, None), (4, 8, None, None)]
      -     >>> map(None, a, b, c, d)
      -     [(1, 5, 9, 12), (2, 6, 10, 13), (3, 7, 11, None), (4, 8, None, None)]
      - 
            Note that when the sequences are of the same length, zip() is
            reversible:
      --- 114,120 ----
      ***************
      *** 172,404 ****
            replaced by equivalent C code.
        
      !     class _Zipper:
      !         def __init__(self, args, kws):
      !             # Defaults
      !             self.__padgiven = 0
      !             if kws.has_key('pad'):
      !                 self.__padgiven = 1
      !                 self.__pad = kws['pad']
      !                 del kws['pad']
      !             # Assert no unknown arguments are left
      !             if kws:
      !                 raise TypeError('unexpected keyword arguments')
      !             self.__sequences = args
      !             self.__seqlen = len(args)
      ! 
      !         def __getitem__(self, i):
      !             if not self.__sequences:
      !                 raise IndexError
      !             ret = []
      !             exhausted = 0
      !             for s in self.__sequences:
      !                 try:
      !                     ret.append(s[i])
      !                 except IndexError:
      !                     if not self.__padgiven:
      !                         raise
      !                     exhausted = exhausted + 1
      !                     if exhausted == self.__seqlen:
      !                         raise
      !                     ret.append(self.__pad)
      !             return tuple(ret)
      ! 
      !         def __len__(self):
      !             # If we're padding, then len is the length of the longest sequence,
      !             # otherwise it's the length of the shortest sequence.
      !             if not self.__padgiven:
      !                 shortest = -1
      !                 for s in self.__sequences:
      !                     slen = len(s)
      !                     if shortest < 0 or slen < shortest:
      !                         shortest = slen
      !                 if shortest < 0:
      !                     return 0
      !                 return shortest
      !             longest = 0
      !             for s in self.__sequences:
      !                 slen = len(s)
      !                 if slen > longest:
      !                     longest = slen
      !             return longest
      ! 
      !         def __cmp__(self, other):
      !             i = 0
      !             smore = 1
      !             omore = 1
      !             while 1:
      !                 try:
      !                     si = self[i]
      !                 except IndexError:
      !                     smore = 0
      !                 try:
      !                     oi = other[i]
      !                 except IndexError:
      !                     omore = 0
      !                 if not smore and not omore:
      !                     return 0
      !                 elif not smore:
      !                     return -1
      !                 elif not omore:
      !                     return 1
      !                 test = cmp(si, oi)
      !                 if test:
      !                     return test
      !                 i = i + 1
      ! 
      !         def __str__(self):
      !             ret = []
      !             i = 0
      !             while 1:
      !                 try:
      !                     ret.append(self[i])
      !                 except IndexError:
      !                     break
      !                 i = i + 1
      !             return str(ret)
      !         __repr__ = __str__
      ! 
      ! 
      !     def zip(*args, **kws):
      !         return _Zipper(args, kws)
      ! 
      ! 
      ! Rejected Elaborations
      ! 
      !     Some people have suggested that the user be able to specify the
      !     type of the inner and outer containers for the zipped sequence.
      !     This would be specified by additional keyword arguments to zip(),
      !     named `inner' and `outer'.
      ! 
      !     This elaboration is rejected for several reasons.  First, there
      !     really is no outer container, even though there appears to be an
      !     outer list container the example above.  This is simply an
      !     artifact of the repr() of the zipped object.  User code can do its
      !     own looping over the zipped object via __getitem__(), and build
      !     any type of outer container for the fully evaluated, concrete
      !     sequence.  For example, to build a zipped object with lists as an
      !     outer container, use
      ! 
      !         >>> list(zip(sequence_a, sequence_b, sequence_c))
      ! 
      !     for tuple outer container, use
      !     
      !         >>> tuple(zip(sequence_a, sequence_b, sequence_c))
      ! 
      !     This type of construction will usually not be necessary though,
      !     since it is expected that zipped objects will most often appear in
      !     for-loops.
      ! 
      !     Second, allowing the user to specify the inner container
      !     introduces needless complexity and arbitrary decisions.  You might
      !     imagine that instead of the default tuple inner container, the
      !     user could prefer a list, or a dictionary, or instances of some
      !     sequence-like class.
      ! 
      !     One problem is the API.  Should the argument to `inner' be a type
      !     or a template object?  For flexibility, the argument should
      !     probably be a type object (i.e. TupleType, ListType, DictType), or
      !     a class.  For classes, the implementation could just pass the zip
      !     element to the constructor.  But what about built-in types that
      !     don't have constructors?  They would have to be special-cased in
      !     the implementation (i.e. what is the constructor for TupleType?
      !     The tuple() built-in).
      ! 
      !     Another problem that arises is for zips greater than length two.
      !     Say you had three sequences and you wanted the inner type to be a
      !     dictionary.  What would the semantics of the following be?
      ! 
      !         >>> zip(sequence_a, sequence_b, sequence_c, inner=DictType)
      ! 
      !     Would the key be (element_a, element_b) and the value be
      !     element_c, or would the key be element_a and the value be
      !     (element_b, element_c)?  Or should an exception be thrown?
      ! 
      !     This suggests that the specification of the inner container type
      !     is needless complexity.  It isn't likely that the inner container
      !     will need to be specified very often, and it is easy to roll your
      !     own should you need it.  Tuples are chosen for the inner container
      !     type due to their (slight) memory footprint and performance
      !     advantages.
      ! 
      ! 
      ! Open Issues
      ! 
      !     - Guido opposes lazy evaluation for zip().  He believes zip()
      !       should return a real list, with an xzip() lazy evaluator added
      !       later if necessary.
      ! 
      !     - What should "zip(a)" do?  Given
      ! 
      !       a = (1, 2, 3); zip(a)
      ! 
      !       three outcomes are possible.
      ! 
      !       1) Returns [(1,), (2,), (3,)]
      ! 
      !          Pros: no special casing in the implementation or in user
      !          code, and is more consistent with the description of it's
      !          semantics.  Cons: this isn't what map(None, a) would return,
      !          and may be counter to user expectations.
      ! 
      !       2) Returns [1, 2, 3]
      ! 
      !          Pros: consistency with map(None, a), and simpler code for
      !          for-loops, e.g.
      ! 
      !          for i in zip(a):
      ! 
      !          instead of
      ! 
      !          for (i,) in zip(a):
      ! 
      !          Cons: too much complexity and special casing for what should
      !          be a relatively rare usage pattern.
      ! 
      !       3) Raises TypeError
      ! 
      !          Pros: zip(a) doesn't make much sense and could be confusing
      !          to explain.
      ! 
      !          Cons: needless restriction
      ! 
      !       Current scoring seems to generally favor outcome 1.
      ! 
      !     - What should "zip()" do?
      ! 
      !       Along similar lines, zip() with no arguments (or zip() with just
      !       a pad argument) can have ambiguous semantics.  Should this
      !       return no elements or an infinite number?  For these reaons,
      !       raising a TypeError exception in this case makes the most
      !       sense.
      ! 
      !     - The name of the built-in `zip' may cause some initial confusion
      !       with the zip compression algorithm.  Other suggestions include
      !       (but are not limited to!): marry, weave, parallel, lace, braid,
      !       interlace, permute, furl, tuples, lists, stitch, collate, knit,
      !       plait, fold, with, mktuples, maketuples, totuples, gentuples,
      !       tupleorama.
      ! 
      !       All have disadvantages, and there is no clear unanimous choice,
      !       therefore the decision was made to go with `zip' because the
      !       same functionality is available in other languages
      !       (e.g. Haskell) under the name `zip'[2].
      ! 
      !     - Should zip() be including in the builtins module or should it be
      !       in a separate generators module (possibly with other candidate
      !       functions like irange())?
      ! 
      !     - Padding short sequences with different values.  A suggestion has
      !       been made to allow a `padtuple' (probably better called `pads'
      !       or `padseq') argument similar to `pad'.  This sequence must have
      !       a length equal to the number of sequences given.  It is a
      !       sequence of the individual pad values to use for each sequence,
      !       should it be shorter than the maximum length.
      ! 
      !       One problem is what to do if `padtuple' itself isn't of the
      !       right length?  A TypeError seems to be the only choice here.
      ! 
      !       How does `pad' and `padtuple' interact?  Perhaps if padtuple
      !       were too short, it could use pad as a fallback.  padtuple would
      !       always override pad if both were given.
        
        
      --- 144,201 ----
            replaced by equivalent C code.
        
      !     def zip(*args):
      !         if not args:
      !             raise TypeError('zip() expects one or more sequence arguments')
      !         ret = []
      !         # find the length of the shortest sequence
      !         shortest = min(*map(len, args))
      !         for i in range(shortest):
      !             item = []
      !             for s in args:
      !                 item.append(s[i])
      !             ret.append(tuple(item))
      !         return ret
      ! 
      ! 
      ! BDFL Pronouncements
      ! 
      !     Note: the BDFL refers to Guido van Rossum, Python's Benevolent
      !     Dictator For Life.
      ! 
      !     - The function's name.  An earlier version of this PEP included an
      !       open issue listing 20+ proposed alternative names to zip().  In
      !       the face of no overwhelmingly better choice, the BDFL strongly
      !       prefers zip() due to it's Haskell[2] heritage.  See version 1.7
      !       of this PEP for the list of alteratives.
      ! 
      !     - zip() shall be a built-in function.
      ! 
      !     - Optional padding.  An earlier version of this PEP proposed an
      !       optional `pad' keyword argument, which would be used when the
      !       argument sequences were not the same length.  This is similar
      !       behavior to the map(None, ...) semantics except that the user
      !       would be able to specify pad object.  This has been rejected by
      !       the BDFL in favor of always truncating to the shortest sequence.
      ! 
      !     - Lazy evaluation.  An earlier version of this PEP proposed that
      !       zip() return a built-in object that performed lazy evaluation
      !       using __getitem__() protocol.  This has been strongly rejected
      !       by the BDFL in favor of returning a real Python list.  If lazy
      !       evaluation is desired in the future, the BDFL suggests an xzip()
      !       function be added.
      ! 
      !     - zip() with no arguments.  the BDFL strongly prefers this raise a
      !       TypeError exception.
      ! 
      !     - zip() with one argument.  the BDFL strongly prefers that this
      !       return a list of 1-tuples.
      ! 
      !     - Inner and outer container control.  An earlier version of this
      !       PEP contains a rather lengthy discussion on a feature that some
      !       people wanted, namely the ability to control what the inner and
      !       outer container types were (they are tuples and list
      !       respectively in this version of the PEP).  Given the simplified
      !       API and implementation, this elaboration is rejected.  For a
      !       more detailed analysis, see version 1.7 of this PEP.
        
        
      ***************
      *** 409,412 ****
      --- 206,210 ----
        
            TBD: URL to python-dev archives
      + 
        
        Copyright
      
      
      
      From python-dev@python.org  Thu Jul 27 20:17:17 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Thu, 27 Jul 2000 12:17:17 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.8,1.9
      Message-ID: <200007271917.MAA04872@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv4860
      
      Modified Files:
      	pep-0201.txt 
      Log Message:
      small typo
      
      
      Index: pep-0201.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v
      retrieving revision 1.8
      retrieving revision 1.9
      diff -C2 -r1.8 -r1.9
      *** pep-0201.txt	2000/07/27 19:15:20	1.8
      --- pep-0201.txt	2000/07/27 19:17:15	1.9
      ***************
      *** 141,146 ****
        
            Here is a reference implementation, in Python of the zip()
      !     built-in function and helper class.  These would ultimately be
      !     replaced by equivalent C code.
        
            def zip(*args):
      --- 141,146 ----
        
            Here is a reference implementation, in Python of the zip()
      !     built-in function.  These would ultimately be replaced by
      !     equivalent C code.
        
            def zip(*args):
      
      
      
      From python-dev@python.org  Thu Jul 27 20:17:38 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Thu, 27 Jul 2000 12:17:38 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.9,1.10
      Message-ID: <200007271917.MAA04901@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv4893
      
      Modified Files:
      	pep-0201.txt 
      Log Message:
      added Post-History entry
      
      
      Index: pep-0201.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v
      retrieving revision 1.9
      retrieving revision 1.10
      diff -C2 -r1.9 -r1.10
      *** pep-0201.txt	2000/07/27 19:17:15	1.9
      --- pep-0201.txt	2000/07/27 19:17:36	1.10
      ***************
      *** 6,10 ****
        Status: Draft
        Created: 13-Jul-2000
      ! Post-History:
        
        
      --- 6,10 ----
        Status: Draft
        Created: 13-Jul-2000
      ! Post-History: 27-Jul-2000
        
        
      
      
      
      From python-dev@python.org  Thu Jul 27 20:19:02 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Thu, 27 Jul 2000 12:19:02 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep2html.py,1.6,1.7
      Message-ID: <200007271919.MAA04974@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv4962
      
      Modified Files:
      	pep2html.py 
      Log Message:
      
      Handle RFC822-style continuation lines.  One of these appeared in PEP-0001.
      
      
      Index: pep2html.py
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v
      retrieving revision 1.6
      retrieving revision 1.7
      diff -C2 -r1.6 -r1.7
      *** pep2html.py	2000/07/27 18:44:44	1.6
      --- pep2html.py	2000/07/27 19:18:59	1.7
      ***************
      *** 48,59 ****
            while 1:
                line = fi.readline()
      !         if not line or ":" not in line:
                    break
      !         key, value = line.split(":", 1)
      !         value = value.strip()
      !         header.append((key, value))
                if key.lower() == "title":
                    title = value
      !         if key.lower() == "pep":
                    pep = value
            if pep:
      --- 48,67 ----
            while 1:
                line = fi.readline()
      !         if not line.strip():
                    break
      !         if line[0].strip():
      !             if ":" not in line:
      !                 break
      !             key, value = line.split(":", 1)
      !             value = value.strip()
      !             header.append((key, value))
      !         else:
      !             # continuation line
      !             key, value = header[-1]
      !             value = value + line
      !             header[-1] = key, value
                if key.lower() == "title":
                    title = value
      !         elif key.lower() == "pep":
                    pep = value
            if pep:
      
      
      
      From python-dev@python.org  Thu Jul 27 21:13:42 2000
      From: python-dev@python.org (Guido van Rossum)
      Date: Thu, 27 Jul 2000 13:13:42 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0202.txt,1.3,1.4
      Message-ID: <200007272013.NAA17596@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv17584
      
      Modified Files:
      	pep-0202.txt 
      Log Message:
      BDFL pronouncements.
      Got rid of ^L.
      
      
      Index: pep-0202.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0202.txt,v
      retrieving revision 1.3
      retrieving revision 1.4
      diff -C2 -r1.3 -r1.4
      *** pep-0202.txt	2000/07/25 15:07:28	1.3
      --- pep-0202.txt	2000/07/27 20:13:39	1.4
      ***************
      *** 6,10 ****
        Status: Incomplete
        
      ! 
        Introduction
        
      --- 6,10 ----
        Status: Incomplete
        
      ! 
        Introduction
        
      ***************
      *** 12,17 ****
            comprehensions. 
        
        
      - 
        The Proposed Solution
        
      --- 12,17 ----
            comprehensions. 
        
      + 
        
        The Proposed Solution
        
      ***************
      *** 20,25 ****
            statements nest now.
            
        
      - 
        Rationale
        
      --- 20,25 ----
            statements nest now.
            
      + 
        
        Rationale
        
      ***************
      *** 28,32 ****
            be used.
        
      ! 
        Examples
        
      --- 28,32 ----
            be used.
        
      ! 
        Examples
        
      ***************
      *** 39,53 ****
            >>> nums = [1,2,3,4]
            >>> fruit = ["Apples", "Peaches", "Pears", "Bananas"]
      !     >>> print [i,f for i in nums for f in fruit]
            [(1, 'Apples'), (1, 'Peaches'), (1, 'Pears'), (1, 'Bananas'),
             (2, 'Apples'), (2, 'Peaches'), (2, 'Pears'), (2, 'Bananas'),
             (3, 'Apples'), (3, 'Peaches'), (3, 'Pears'), (3, 'Bananas'),
             (4, 'Apples'), (4, 'Peaches'), (4, 'Pears'), (4, 'Bananas')]
      !     >>> print [i,f for i in nums for f in fruit if f[0] == "P"]
            [(1, 'Peaches'), (1, 'Pears'),
             (2, 'Peaches'), (2, 'Pears'),
             (3, 'Peaches'), (3, 'Pears'),
             (4, 'Peaches'), (4, 'Pears')]
      !     >>> print [i,f for i in nums for f in fruit if f[0] == "P" if i%2 == 1]
            [(1, 'Peaches'), (1, 'Pears'), (3, 'Peaches'), (3, 'Pears')]
            >>> def zip(*args):
      --- 39,53 ----
            >>> nums = [1,2,3,4]
            >>> fruit = ["Apples", "Peaches", "Pears", "Bananas"]
      !     >>> print [(i,f) for i in nums for f in fruit]
            [(1, 'Apples'), (1, 'Peaches'), (1, 'Pears'), (1, 'Bananas'),
             (2, 'Apples'), (2, 'Peaches'), (2, 'Pears'), (2, 'Bananas'),
             (3, 'Apples'), (3, 'Peaches'), (3, 'Pears'), (3, 'Bananas'),
             (4, 'Apples'), (4, 'Peaches'), (4, 'Pears'), (4, 'Bananas')]
      !     >>> print [(i,f) for i in nums for f in fruit if f[0] == "P"]
            [(1, 'Peaches'), (1, 'Pears'),
             (2, 'Peaches'), (2, 'Pears'),
             (3, 'Peaches'), (3, 'Pears'),
             (4, 'Peaches'), (4, 'Pears')]
      !     >>> print [(i,f) for i in nums for f in fruit if f[0] == "P" if i%2 == 1]
            [(1, 'Peaches'), (1, 'Pears'), (3, 'Peaches'), (3, 'Pears')]
            >>> def zip(*args):
      ***************
      *** 56,61 ****
            >>> print [i for i in zip(nums,fruit) if i[0]%2==0]
            [(2, 'Peaches'), (4, 'Bananas')]
        
      - 
        Reference Implementation
        
      --- 56,61 ----
            >>> print [i for i in zip(nums,fruit) if i[0]%2==0]
            [(2, 'Peaches'), (4, 'Bananas')]
      + 
        
        Reference Implementation
        
      ***************
      *** 66,71 ****
            for a patch that adds list comprehensions to Python.
        
        
      ! 
        Open Issues
        
      --- 66,84 ----
            for a patch that adds list comprehensions to Python.
        
      + 
      + BDFL Pronouncements
        
      !     Note: the BDFL refers to Guido van Rossum, Python's Benevolent
      !     Dictator For Life.
      ! 
      !     - The syntax proposed above is the Right One.
      ! 
      !     - The form [x, y for ...] should be disallowed; one should be
      !     required to write [(x, y) for ...].
      ! 
      !     - The form [... for x... for y...] nests, with the last index
      !     varying fastest, just like nested for loops.
      ! 
      ! 
        Open Issues
        
      ***************
      *** 113,118 ****
                is.  It has not had a lot of exercise, though the patch does include
                a few test cases.
        
      - 
        Local Variables:
        mode: indented-text
      --- 126,131 ----
                is.  It has not had a lot of exercise, though the patch does include
                a few test cases.
      + 
        
        Local Variables:
        mode: indented-text
      
      
      
      From python-dev@python.org  Thu Jul 27 21:31:18 2000
      From: python-dev@python.org (Skip Montanaro)
      Date: Thu, 27 Jul 2000 13:31:18 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Grammar .cvsignore,NONE,1.1
      Message-ID: <200007272031.NAA19336@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Grammar
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv19326
      
      Added Files:
      	.cvsignore 
      Log Message:
      added .cvsignore so cvs doesn't complain about the generated graminit.h and
      graminit.c files.
      
      
      --- NEW FILE ---
      graminit.h
      graminit.c
      
      
      
      From python-dev@python.org  Thu Jul 27 21:55:15 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Thu, 27 Jul 2000 13:55:15 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Doc/tut tut.tex,1.110,1.111
      Message-ID: <200007272055.NAA21726@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Doc/tut
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv21713/tut
      
      Modified Files:
      	tut.tex 
      Log Message:
      
      Rip out the information about the PSA, since the fate of that is not
      certain.
      
      Update the information about the mailing list, using the python.org
      address instead of cwi.nl, and point to the pipermail archives.  Also
      update the daily average message count (at the risk of scaring people
      off), using the mail archive at http://www.egroups.com/group/python-list
      for the first half of 2000 for statistical information.
      
      
      Index: tut.tex
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v
      retrieving revision 1.110
      retrieving revision 1.111
      diff -C2 -r1.110 -r1.111
      *** tut.tex	2000/07/16 19:05:38	1.110
      --- tut.tex	2000/07/27 20:55:12	1.111
      ***************
      *** 3868,3872 ****
        you an idea of what's available.
        
      ! The major Python Web site is \url{http://www.python.org}; it contains
        code, documentation, and pointers to Python-related pages around the
        Web.  This web site is mirrored in various places around the
      --- 3868,3872 ----
        you an idea of what's available.
        
      ! The major Python Web site is \url{http://www.python.org/}; it contains
        code, documentation, and pointers to Python-related pages around the
        Web.  This web site is mirrored in various places around the
      ***************
      *** 3879,3900 ****
        For Python-related questions and problem reports, you can post to the
        newsgroup \newsgroup{comp.lang.python}, or send them to the mailing
      ! list at \email{python-list@cwi.nl}.  The newsgroup and mailing list
        are gatewayed, so messages posted to one will automatically be
      ! forwarded to the other.  There are around 35--45 postings a day,
        % Postings figure based on average of last six months activity as
      ! % reported by www.findmail.com; Oct. '97 - Mar. '98:  7480 msgs / 182
      ! % days = 41.1 msgs / day.
        asking (and answering) questions, suggesting new features, and
        announcing new modules.  Before posting, be sure to check the list of
        Frequently Asked Questions (also called the FAQ), at
        \url{http://www.python.org/doc/FAQ.html}, or look for it in the
      ! \file{Misc/} directory of the Python source distribution.  The FAQ
      ! answers many of the questions that come up again and again, and may
      ! already contain the solution for your problem.
      ! 
      ! You can support the Python community by joining the Python Software
      ! Activity, which runs the python.org web, ftp and email servers, and
      ! organizes Python workshops.  See \url{http://www.python.org/psa/} for
      ! information on how to join.
        
        
      --- 3879,3896 ----
        For Python-related questions and problem reports, you can post to the
        newsgroup \newsgroup{comp.lang.python}, or send them to the mailing
      ! list at \email{python-list@python.org}.  The newsgroup and mailing list
        are gatewayed, so messages posted to one will automatically be
      ! forwarded to the other.  There are around 120 postings a day,
        % Postings figure based on average of last six months activity as
      ! % reported by www.egroups.com; Jan. 2000 - June 2000: 21272 msgs / 182
      ! % days = 116.9 msgs / day and steadily increasing.
        asking (and answering) questions, suggesting new features, and
        announcing new modules.  Before posting, be sure to check the list of
        Frequently Asked Questions (also called the FAQ), at
        \url{http://www.python.org/doc/FAQ.html}, or look for it in the
      ! \file{Misc/} directory of the Python source distribution.  Mailing
      ! list archives are available at \url{http://www.python.org/pipermail/}.
      ! The FAQ answers many of the questions that come up again and again,
      ! and may already contain the solution for your problem.
        
        
      
      
      
      From python-dev@python.org  Thu Jul 27 21:59:01 2000
      From: python-dev@python.org (Jeremy Hylton)
      Date: Thu, 27 Jul 2000 13:59:01 -0700
      Subject: [Python-checkins] CVS: python/dist/src configure.in,1.138,1.139
      Message-ID: <200007272059.NAA22146@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv22111
      
      Modified Files:
      	configure.in 
      Log Message:
      Gregor Hoffleit: Don't link with the libieee library if it's not necessary
      
      
      Index: configure.in
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/configure.in,v
      retrieving revision 1.138
      retrieving revision 1.139
      diff -C2 -r1.138 -r1.139
      *** configure.in	2000/07/14 14:28:32	1.138
      --- configure.in	2000/07/27 20:58:58	1.139
      ***************
      *** 1012,1016 ****
        
        # Linux requires this for correct f.p. operations
      ! AC_CHECK_LIB(ieee, __fpu_control)
        
        # Check for --with-fpectl
      --- 1012,1019 ----
        
        # Linux requires this for correct f.p. operations
      ! AC_CHECK_FUNC(__fpu_control,
      !   [],
      !   [AC_CHECK_LIB(ieee, __fpu_control)
      ! ])
        
        # Check for --with-fpectl
      
      
      
      From python-dev@python.org  Thu Jul 27 22:03:07 2000
      From: python-dev@python.org (Jeremy Hylton)
      Date: Thu, 27 Jul 2000 14:03:07 -0700
      Subject: [Python-checkins] CVS: python/dist/src configure,1.129,1.130
      Message-ID: <200007272103.OAA29775@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv25091
      
      Modified Files:
      	configure 
      Log Message:
      Gregor Hoffleit: Don't link with the libieee library if it's not necessary
      
      
      Index: configure
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/configure,v
      retrieving revision 1.129
      retrieving revision 1.130
      diff -C2 -r1.129 -r1.130
      *** configure	2000/07/14 14:28:30	1.129
      --- configure	2000/07/27 21:03:04	1.130
      ***************
      *** 1,5 ****
        #! /bin/sh
        
      ! # From configure.in Revision: 1.137 
        
        # Guess values for system-dependent variables and create Makefiles.
      --- 1,5 ----
        #! /bin/sh
        
      ! # From configure.in Revision: 1.139 
        
        # Guess values for system-dependent variables and create Makefiles.
      ***************
      *** 5050,5055 ****
        
        # Linux requires this for correct f.p. operations
        echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
      ! echo "configure:5054: checking for __fpu_control in -lieee" >&5
        ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
        if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
      --- 5050,5101 ----
        
        # Linux requires this for correct f.p. operations
      + echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
      + echo "configure:5054: checking for __fpu_control" >&5
      + if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
      +   echo $ac_n "(cached) $ac_c" 1>&6
      + else
      +   cat > conftest.$ac_ext <
      + /* Override any gcc2 internal prototype to avoid an error.  */
      + /* We use char because int might match the return type of a gcc2
      +     builtin and then its argument prototype would still apply.  */
      + char __fpu_control();
      + 
      + int main() {
      + 
      + /* 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___fpu_control) || defined (__stub_____fpu_control)
      + choke me
      + #else
      + __fpu_control();
      + #endif
      + 
      + ; return 0; }
      + EOF
      + if { (eval echo configure:5082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
      +   rm -rf conftest*
      +   eval "ac_cv_func___fpu_control=yes"
      + else
      +   echo "configure: failed program was:" >&5
      +   cat conftest.$ac_ext >&5
      +   rm -rf conftest*
      +   eval "ac_cv_func___fpu_control=no"
      + fi
      + rm -f conftest*
      + fi
      + 
      + if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
      +   echo "$ac_t""yes" 1>&6
      +   :
      + else
      +   echo "$ac_t""no" 1>&6
        echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
      ! echo "configure:5100: checking for __fpu_control in -lieee" >&5
        ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
        if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
      ***************
      *** 5059,5063 ****
        LIBS="-lieee  $LIBS"
        cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
          rm -rf conftest*
          eval "ac_cv_lib_$ac_lib_var=yes"
      --- 5116,5120 ----
        ; return 0; }
        EOF
      ! if { (eval echo configure:5119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
          rm -rf conftest*
          eval "ac_cv_lib_$ac_lib_var=yes"
      ***************
      *** 5098,5104 ****
        
        
        # Check for --with-fpectl
        echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
      ! echo "configure:5103: checking for --with-fpectl" >&5
        # Check whether --with-fpectl or --without-fpectl was given.
        if test "${with_fpectl+set}" = set; then
      --- 5144,5153 ----
        
        
      + fi
      + 
      + 
        # Check for --with-fpectl
        echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
      ! echo "configure:5152: checking for --with-fpectl" >&5
        # Check whether --with-fpectl or --without-fpectl was given.
        if test "${with_fpectl+set}" = set; then
      ***************
      *** 5125,5129 ****
        esac
        echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
      ! echo "configure:5128: checking for --with-libm=STRING" >&5
        # Check whether --with-libm or --without-libm was given.
        if test "${with_libm+set}" = set; then
      --- 5174,5178 ----
        esac
        echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
      ! echo "configure:5177: checking for --with-libm=STRING" >&5
        # Check whether --with-libm or --without-libm was given.
        if test "${with_libm+set}" = set; then
      ***************
      *** 5146,5150 ****
        
        echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
      ! echo "configure:5149: checking for --with-libc=STRING" >&5
        # Check whether --with-libc or --without-libc was given.
        if test "${with_libc+set}" = set; then
      --- 5195,5199 ----
        
        echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
      ! echo "configure:5198: checking for --with-libc=STRING" >&5
        # Check whether --with-libc or --without-libc was given.
        if test "${with_libc+set}" = set; then
      ***************
      *** 5170,5179 ****
        do
        echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
      ! echo "configure:5173: checking for $ac_func" >&5
        if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <&6
      ! echo "configure:5222: checking for $ac_func" >&5
        if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
          rm -rf conftest*
          eval "ac_cv_func_$ac_func=yes"
      --- 5247,5251 ----
        ; return 0; }
        EOF
      ! if { (eval echo configure:5250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
          rm -rf conftest*
          eval "ac_cv_func_$ac_func=yes"
      ***************
      *** 5225,5234 ****
        do
        echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
      ! echo "configure:5228: checking for $ac_func" >&5
        if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <&6
      ! echo "configure:5277: checking for $ac_func" >&5
        if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
          rm -rf conftest*
          eval "ac_cv_func_$ac_func=yes"
      --- 5302,5306 ----
        ; return 0; }
        EOF
      ! if { (eval echo configure:5305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
          rm -rf conftest*
          eval "ac_cv_func_$ac_func=yes"
      ***************
      *** 5287,5296 ****
        do
        echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
      ! echo "configure:5290: checking for $ac_func" >&5
        if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <&6
      ! echo "configure:5339: checking for $ac_func" >&5
        if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
          rm -rf conftest*
          eval "ac_cv_func_$ac_func=yes"
      --- 5364,5368 ----
        ; return 0; }
        EOF
      ! if { (eval echo configure:5367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
          rm -rf conftest*
          eval "ac_cv_func_$ac_func=yes"
      ***************
      *** 5343,5347 ****
        # check for getopt
        echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
      ! echo "configure:5346: checking for genuine getopt" >&5
        if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
      --- 5392,5396 ----
        # check for getopt
        echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
      ! echo "configure:5395: checking for genuine getopt" >&5
        if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
      ***************
      *** 5351,5355 ****
        else
          cat > conftest.$ac_ext <
      --- 5400,5404 ----
        else
          cat > conftest.$ac_ext <
      ***************
      *** 5363,5367 ****
        }
        EOF
      ! if { (eval echo configure:5366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
        then
          ac_cv_func_getopt=yes
      --- 5412,5416 ----
        }
        EOF
      ! if { (eval echo configure:5415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
        then
          ac_cv_func_getopt=yes
      ***************
      *** 5381,5385 ****
        # check whether malloc(0) returns NULL or not
        echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
      ! echo "configure:5384: checking what malloc(0) returns" >&5
        if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
      --- 5430,5434 ----
        # check whether malloc(0) returns NULL or not
        echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
      ! echo "configure:5433: checking what malloc(0) returns" >&5
        if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
      ***************
      *** 5389,5393 ****
        else
          cat > conftest.$ac_ext <
      --- 5438,5442 ----
        else
          cat > conftest.$ac_ext <
      ***************
      *** 5408,5412 ****
        }
        EOF
      ! if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
        then
          ac_cv_malloc_zero=nonnull
      --- 5457,5461 ----
        }
        EOF
      ! if { (eval echo configure:5460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
        then
          ac_cv_malloc_zero=nonnull
      ***************
      *** 5434,5448 ****
        ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
        echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
      ! echo "configure:5437: checking for wchar.h" >&5
        if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <
        EOF
        ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
      ! { (eval echo configure:5447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
        ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
        if test -z "$ac_err"; then
      --- 5483,5497 ----
        ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
        echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
      ! echo "configure:5486: checking for wchar.h" >&5
        if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <
        EOF
        ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
      ! { (eval echo configure:5496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
        ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
        if test -z "$ac_err"; then
      ***************
      *** 5474,5483 ****
        usable_wchar_t="unkown"
        echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
      ! echo "configure:5477: checking for usable wchar_t" >&5
        if test "$cross_compiling" = yes; then
            { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
        else
          cat > conftest.$ac_ext <&6
      ! echo "configure:5526: checking for usable wchar_t" >&5
        if test "$cross_compiling" = yes; then
            { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
        else
          cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
        then
          cat >> confdefs.h <<\EOF
      --- 5542,5546 ----
        
        EOF
      ! if { (eval echo configure:5545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
        then
          cat >> confdefs.h <<\EOF
      ***************
      *** 5512,5516 ****
        # check for endianness
        echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
      ! echo "configure:5515: checking whether byte ordering is bigendian" >&5
        if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
      --- 5561,5565 ----
        # check for endianness
        echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
      ! echo "configure:5564: checking whether byte ordering is bigendian" >&5
        if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
      ***************
      *** 5519,5523 ****
        # See if sys/param.h defines the BYTE_ORDER macro.
        cat > conftest.$ac_ext <
      --- 5568,5572 ----
        # See if sys/param.h defines the BYTE_ORDER macro.
        cat > conftest.$ac_ext <
      ***************
      *** 5530,5538 ****
        ; return 0; }
        EOF
      ! if { (eval echo configure:5533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
          rm -rf conftest*
          # It does; now see whether it defined to BIG_ENDIAN or not.
        cat > conftest.$ac_ext <
      --- 5579,5587 ----
        ; return 0; }
        EOF
      ! if { (eval echo configure:5582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
          rm -rf conftest*
          # It does; now see whether it defined to BIG_ENDIAN or not.
        cat > conftest.$ac_ext <
      ***************
      *** 5545,5549 ****
        ; return 0; }
        EOF
      ! if { (eval echo configure:5548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
          rm -rf conftest*
          ac_cv_c_bigendian=yes
      --- 5594,5598 ----
        ; return 0; }
        EOF
      ! if { (eval echo configure:5597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
          rm -rf conftest*
          ac_cv_c_bigendian=yes
      ***************
      *** 5565,5569 ****
        else
          cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
        then
          ac_cv_c_bigendian=no
      --- 5627,5631 ----
        }
        EOF
      ! if { (eval echo configure:5630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
        then
          ac_cv_c_bigendian=no
      ***************
      *** 5605,5609 ****
        # or fills with zeros (like the Cray J90, according to Tim Peters).
        echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
      ! echo "configure:5608: checking whether right shift extends the sign bit" >&5
        if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
      --- 5654,5658 ----
        # or fills with zeros (like the Cray J90, according to Tim Peters).
        echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
      ! echo "configure:5657: checking whether right shift extends the sign bit" >&5
        if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
      ***************
      *** 5614,5618 ****
        else
          cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
        then
          ac_cv_rshift_extends_sign=yes
      --- 5672,5676 ----
        
        EOF
      ! if { (eval echo configure:5675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
        then
          ac_cv_rshift_extends_sign=yes
      ***************
      *** 5655,5664 ****
        EOF
        echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
      ! echo "configure:5658: checking for socklen_t" >&5
        if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <
      --- 5704,5713 ----
        EOF
        echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
      ! echo "configure:5707: checking for socklen_t" >&5
        if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <
      
      
      
      From python-dev@python.org  Thu Jul 27 22:10:06 2000
      From: python-dev@python.org (Eric S. Raymond)
      Date: Thu, 27 Jul 2000 14:10:06 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcurses.tex,1.11,1.12
      Message-ID: <200007272110.OAA30336@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Doc/lib
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv30177
      
      Modified Files:
      	libcurses.tex 
      Log Message:
      Second round of curses documentation improvements.  Completes and extends 
      documentation for function keys, special characters. 
      
      
      Index: libcurses.tex
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v
      retrieving revision 1.11
      retrieving revision 1.12
      diff -C2 -r1.11 -r1.12
      *** libcurses.tex	2000/07/26 02:59:13	1.11
      --- libcurses.tex	2000/07/27 21:10:02	1.12
      ***************
      *** 549,556 ****
        character position in that window:
        \begin{itemize}
      ! \item  The attribute of every character in the window  is
      !               changed to the new background attribute.
      ! 
      ! \item    Wherever  the  former background character appears,
        it is changed to the new background character.
        \end{itemize}
      --- 549,557 ----
        character position in that window:
        \begin{itemize}
      ! \item  
      ! The attribute of every character in the window  is
      ! changed to the new background attribute.
      ! \item
      ! Wherever  the  former background character appears,
        it is changed to the new background character.
        \end{itemize}
      ***************
      *** 978,982 ****
        
        Keys are referred to by integer constants with names starting with 
      ! \code{KEY_}.   The exact names available are system dependent.
        
        % XXX this table is far too large!
      --- 979,983 ----
        
        Keys are referred to by integer constants with names starting with 
      ! \code{KEY_}.   The exact keycaps available are system dependent.
        
        % XXX this table is far too large!
      ***************
      *** 1080,1094 ****
        \end{tableii}
        
        The following table lists characters from the alternate character set.
        \strong{Note:} These are available only after \function{initscr()} has 
        been called.
        
        \begin{tableii}{c|l}{code}{ACS code}{Meaning}
      !   \lineii{ACS_BBSS}{}
          \lineii{ACS_BLOCK}{solid square block}
          \lineii{ACS_BOARD}{board of squares}
      !   \lineii{ACS_BSBS}{}
      !   \lineii{ACS_BSSB}{}
      !   \lineii{ACS_BSSS}{}
          \lineii{ACS_BTEE}{bottom tee}
          \lineii{ACS_BULLET}{bullet}
      --- 1081,1115 ----
        \end{tableii}
        
      + On VT100s and their software emulations such as X terminal emulators,
      + there are normally at least four function keys (KEY_F1, KEY_F2,
      + KEY_F3, KEY_F4) available and the arrow keys mapped to KEY_UP,
      + KEY_DOWN, KEY_LEFT and KEY_RIGHT in the obvious way. If your machine has a PC
      + keybboard, it is safe to expect arrow keys and twelve function keys; also,
      + the following keypad mappings are standard:
      + 
      + \begin{tableii}{c|l}{code}{Keycap}{code}
      +    \lineii{Insert}{KEY_IC}
      +    \lineii{Delete}{KEY_DC}
      +    \lineii{Home}{KEY_HOME}
      +    \lineii{End}{KEY_END}
      +    \lineii{Page Up}{KEY_NPAGE}
      +    \lineii{Page Down}{KEY_PPAGE}
      + \end{tableii}
      + 
        The following table lists characters from the alternate character set.
      + These are inherited from the VT100 terminal, and will generally be 
      + available on software emulations such as X terminals.  When there
      + is no graphic available, curses falls back on a crude printable ASCII
      + approximation.
        \strong{Note:} These are available only after \function{initscr()} has 
        been called.
        
        \begin{tableii}{c|l}{code}{ACS code}{Meaning}
      !   \lineii{ACS_BBSS}{alternate name for upper right corner}
          \lineii{ACS_BLOCK}{solid square block}
          \lineii{ACS_BOARD}{board of squares}
      !   \lineii{ACS_BSBS}{alternate name for horizontal line}
      !   \lineii{ACS_BSSB}{alternate name for upper left corner}
      !   \lineii{ACS_BSSS}{alternate name for top tee}
          \lineii{ACS_BTEE}{bottom tee}
          \lineii{ACS_BULLET}{bullet}
      ***************
      *** 1108,1112 ****
          \lineii{ACS_PI}{letter pi}
          \lineii{ACS_PLMINUS}{plus-or-minus sign}
      !   \lineii{ACS_PLUS}{plus sign}
          \lineii{ACS_RARROW}{right arrow}
          \lineii{ACS_RTEE}{right tee}
      --- 1129,1133 ----
          \lineii{ACS_PI}{letter pi}
          \lineii{ACS_PLMINUS}{plus-or-minus sign}
      !   \lineii{ACS_PLUS}{big plus sign}
          \lineii{ACS_RARROW}{right arrow}
          \lineii{ACS_RTEE}{right tee}
      ***************
      *** 1115,1125 ****
          \lineii{ACS_S7}{scan line 7}
          \lineii{ACS_S9}{scan line 9}
      !   \lineii{ACS_SBBS}{}
      !   \lineii{ACS_SBSB}{}
      !   \lineii{ACS_SBSS}{}
      !   \lineii{ACS_SSBB}{}
      !   \lineii{ACS_SSBS}{}
      !   \lineii{ACS_SSSB}{}
      !   \lineii{ACS_SSSS}{}
          \lineii{ACS_STERLING}{pound sterling}
          \lineii{ACS_TTEE}{top tee}
      --- 1136,1146 ----
          \lineii{ACS_S7}{scan line 7}
          \lineii{ACS_S9}{scan line 9}
      !   \lineii{ACS_SBBS}{alternate name for lower right corner}
      !   \lineii{ACS_SBSB}{alternate name for vertical line}
      !   \lineii{ACS_SBSS}{alternate name for right tee}
      !   \lineii{ACS_SSBB}{alternate name for lower left corner}
      !   \lineii{ACS_SSBS}{alternate name for bottom tee}
      !   \lineii{ACS_SSSB}{alternate name for left tee}
      !   \lineii{ACS_SSSS}{alternate name for crossover or big plus}
          \lineii{ACS_STERLING}{pound sterling}
          \lineii{ACS_TTEE}{top tee}
      
      
      
      From python-dev@python.org  Thu Jul 27 22:23:31 2000
      From: python-dev@python.org (Jeremy Hylton)
      Date: Thu, 27 Jul 2000 14:23:31 -0700
      Subject: [Python-checkins] CVS: python/dist/src configure.in,1.139,1.140 configure,1.130,1.131
      Message-ID: <200007272123.OAA31515@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv31476
      
      Modified Files:
      	configure.in configure 
      Log Message:
      Gregor Hoffleit: don't link with libnet on non-BeOS systems
      
      
      Index: configure.in
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/configure.in,v
      retrieving revision 1.139
      retrieving revision 1.140
      diff -C2 -r1.139 -r1.140
      *** configure.in	2000/07/27 20:58:58	1.139
      --- configure.in	2000/07/27 21:23:28	1.140
      ***************
      *** 625,628 ****
      --- 625,632 ----
        AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
        AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
      + ;;
      + esac
      + case "$ac_sys_system" in
      + BeOS*)
        AC_CHECK_LIB(net, socket, [LIBS="-lnet $LIBS"], [], $LIBS) # BeOS
        ;;
      
      Index: configure
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/configure,v
      retrieving revision 1.130
      retrieving revision 1.131
      diff -C2 -r1.130 -r1.131
      *** configure	2000/07/27 21:03:04	1.130
      --- configure	2000/07/27 21:23:28	1.131
      ***************
      *** 2795,2800 ****
        fi
         # SVR4 sockets
        echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
      ! echo "configure:2799: checking for socket in -lnet" >&5
        ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
        if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
      --- 2795,2804 ----
        fi
         # SVR4 sockets
      + ;;
      [...2260 lines suppressed...]
        echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
      ! echo "configure:5707: checking for socklen_t" >&5
        if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <
      --- 5708,5717 ----
        EOF
        echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
      ! echo "configure:5711: checking for socklen_t" >&5
        if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <
      
      
      
      From python-dev@python.org  Fri Jul 28 00:26:31 2000
      From: python-dev@python.org (Trent Mick)
      Date: Thu, 27 Jul 2000 16:26:31 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_winreg,1.1,1.2
      Message-ID: <200007272326.QAA23239@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Lib/test/output
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv21305
      
      Modified Files:
      	test_winreg 
      Log Message:
      Remove erroneous empty trailing line. (cause test_winreg.py failure)
      
      
      Index: test_winreg
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_winreg,v
      retrieving revision 1.1
      retrieving revision 1.2
      diff -C2 -r1.1 -r1.2
      *** test_winreg	2000/03/28 20:36:51	1.1
      --- test_winreg	2000/07/27 23:26:28	1.2
      ***************
      *** 2,4 ****
        Local registry tests worked
        Remote registry calls can be tested using 'test_winreg.py --remote \\machine_name'
      - 
      --- 2,3 ----
      
      
      
      From python-dev@python.org  Fri Jul 28 04:42:43 2000
      From: python-dev@python.org (Mark Hammond)
      Date: Thu, 27 Jul 2000 20:42:43 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-win winreg.py,1.4,1.5
      Message-ID: <200007280342.UAA12244@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Lib/plat-win
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv12231
      
      Modified Files:
      	winreg.py 
      Log Message:
      Fix a type in the docstrings, and make the module Unicode aware.
      
      Index: winreg.py
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Lib/plat-win/winreg.py,v
      retrieving revision 1.4
      retrieving revision 1.5
      diff -C2 -r1.4 -r1.5
      *** winreg.py	2000/07/21 21:43:09	1.4
      --- winreg.py	2000/07/28 03:42:40	1.5
      ***************
      *** 16,20 ****
            Note: deleteKey may not be recursive on all platforms.
        
      ! >>> key=createKey( r"HKLM\SOFTWARE\Python\Test" )
        
        RemoteKey( machine, top_level_key ): 
      --- 16,20 ----
            Note: deleteKey may not be recursive on all platforms.
        
      ! >>> key=deleteKey( r"HKLM\SOFTWARE\Python\Test" )
        
        RemoteKey( machine, top_level_key ): 
      ***************
      *** 140,144 ****
                    raise IndexError, item
        
      !     elif type( item )==StringType: 
                keyname=item
            else:
      --- 140,144 ----
                    raise IndexError, item
        
      !     elif type( item ) in [StringType, UnicodeType]: 
                keyname=item
            else:
      ***************
      *** 301,311 ****
                    typeint=regtype.intval
                else:
      !             if type( data )==StringType:
                        typeint=_winreg.REG_SZ
                    elif type( data )==IntType:
                        typeint=_winreg.REG_DWORD
                    elif type( data )==array.ArrayType:
                        typeint=_winreg.REG_BINARY
      -                 data=data.tostring()
                _winreg.SetValueEx( self.handle, valname, 0, typeint, data )
        
      --- 301,315 ----
                    typeint=regtype.intval
                else:
      !             if type( data ) in [StringType, UnicodeType]:
                        typeint=_winreg.REG_SZ
      +             elif type( data )==ListType:
      +                  # XXX - _winreg currently only supports lists
      +                  # Also, probably should check each element is
      +                  # string/unicode.
      +                  typeint = _winreg.REG_MULTI_SZ
                    elif type( data )==IntType:
                        typeint=_winreg.REG_DWORD
                    elif type( data )==array.ArrayType:
                        typeint=_winreg.REG_BINARY
                _winreg.SetValueEx( self.handle, valname, 0, typeint, data )
        
      
      
      
      From python-dev@python.org  Fri Jul 28 04:44:43 2000
      From: python-dev@python.org (Mark Hammond)
      Date: Thu, 27 Jul 2000 20:44:43 -0700
      Subject: [Python-checkins] CVS: python/dist/src/PC _winreg.c,1.7,1.8
      Message-ID: <200007280344.UAA12335@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/PC
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv12325
      
      Modified Files:
      	_winreg.c 
      Log Message:
      Allow any object supporting the buffer protocol to be written as a binary object.
      
      Index: _winreg.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/PC/_winreg.c,v
      retrieving revision 1.7
      retrieving revision 1.8
      diff -C2 -r1.7 -r1.8
      *** _winreg.c	2000/07/16 12:04:32	1.7
      --- _winreg.c	2000/07/28 03:44:41	1.8
      ***************
      *** 831,837 ****
        				*retDataSize = 0;
        			else {
      ! 				if (!PyString_Check(value))
      ! 					return 0;
      ! 				*retDataSize = PyString_Size(value);
        				*retDataBuf = (BYTE *)PyMem_NEW(char,
        								*retDataSize);
      --- 831,844 ----
        				*retDataSize = 0;
        			else {
      ! 				void *src_buf;
      ! 				PyBufferProcs *pb = value->ob_type->tp_as_buffer;
      ! 				if (pb==NULL) {
      ! 					PyErr_Format(PyExc_TypeError, 
      ! 						"Objects of type '%s' can not "
      ! 						"be used as binary registry values", 
      ! 						value->ob_type->tp_name);
      ! 					return FALSE;
      ! 				}
      ! 				*retDataSize = (*pb->bf_getreadbuffer)(value, 0, &src_buf);
        				*retDataBuf = (BYTE *)PyMem_NEW(char,
        								*retDataSize);
      ***************
      *** 840,847 ****
        					return FALSE;
        				}
      ! 				memcpy(*retDataBuf,
      ! 				       PyString_AS_STRING(
      ! 				       		(PyStringObject *)value),
      ! 				       *retDataSize);
        			}
        			break;
      --- 847,851 ----
        					return FALSE;
        				}
      ! 				memcpy(*retDataBuf, src_buf, *retDataSize);
        			}
        			break;
      
      
      
      From python-dev@python.org  Fri Jul 28 04:45:34 2000
      From: python-dev@python.org (Mark Hammond)
      Date: Thu, 27 Jul 2000 20:45:34 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_winreg2.py,1.1,1.2
      Message-ID: <200007280345.UAA12378@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Lib/test
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv12371
      
      Modified Files:
      	test_winreg2.py 
      Log Message:
      Was quite broken and incomplete.  Now passes the test suite, but is still incomplete.
      
      Index: test_winreg2.py
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Lib/test/test_winreg2.py,v
      retrieving revision 1.1
      retrieving revision 1.2
      diff -C2 -r1.1 -r1.2
      *** test_winreg2.py	2000/06/30 19:36:23	1.1
      --- test_winreg2.py	2000/07/28 03:45:32	1.2
      ***************
      *** 2,5 ****
      --- 2,6 ----
        import sys, traceback
        import time
      + import array
        
        def testHives():
      ***************
      *** 128,131 ****
      --- 129,139 ----
            assert not hives["HKCU"].getValues().has_key( "Blah" )
        
      +     # Ensure Unicode works as we expect
      +     hives["HKCU"].setValue( u"Blah", u"abc" )
      +     assert hives["HKCU"].getValueData( "Blah" )=="abc"
      +     assert hives["HKCU"].getValues().has_key( u"Blah" )
      +     del hives["HKCU"].getValues()[ u"Blah" ]
      +     assert not hives["HKCU"].getValues().has_key( u"Blah" )
      + 
        def testDeleteValue():
            hives["HKCU"].setValue( "Blah", "abc" )
      ***************
      *** 176,181 ****
            assert key.getValues()[ "abcd" ][1]==5
            key.deleteValue( "abcd" )
      !     key.deleteKey( "HKLM\\Software\\a\\b")
      !     key.deleteKey( "HKLM\\Software\\a")
        
        def testSetBinaryValue(): 
      --- 184,189 ----
            assert key.getValues()[ "abcd" ][1]==5
            key.deleteValue( "abcd" )
      !     deleteKey( "HKLM\\Software\\a\\b")
      !     deleteKey( "HKLM\\Software\\a")
        
        def testSetBinaryValue(): 
      ***************
      *** 184,190 ****
            key.setValue( "abcde", array.array( 'c', "PPPPPPPPPPPPPPP"), 
                               regtypes["REG_BINARY"] )
      !     assert key.getValues()["abcd"]==key.getValues()["abcde"]
      !     key.deleteKey( "HKLM\\Software\\a\\b")
      !     key.deleteKey( "HKLM\\Software\\a")
        
        def testSetNone(): pass
      --- 192,199 ----
            key.setValue( "abcde", array.array( 'c', "PPPPPPPPPPPPPPP"), 
                               regtypes["REG_BINARY"] )
      !     assert key.getValues()["abcd"][1]==key.getValues()["abcde"][1]
      !     key = None # Remove our reference.
      !     deleteKey( "HKLM\\Software\\a\\b")
      !     deleteKey( "HKLM\\Software\\a")
        
        def testSetNone(): pass
      
      
      
      From python-dev@python.org  Fri Jul 28 06:48:28 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Thu, 27 Jul 2000 22:48:28 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.10,1.11
      Message-ID: <200007280548.WAA02083@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv2074
      
      Modified Files:
      	pep-0201.txt 
      Log Message:
      Parallel => Lockstep everywhere.
      
      Replaced the reference implementation with one that's closer to what
      the C code will actually look like; i.e. it obeys the iteration
      protocol.
      
      Other grammar and spelling fixes.
      
      
      Index: pep-0201.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v
      retrieving revision 1.10
      retrieving revision 1.11
      diff -C2 -r1.10 -r1.11
      *** pep-0201.txt	2000/07/27 19:17:36	1.10
      --- pep-0201.txt	2000/07/28 05:48:25	1.11
      ***************
      *** 1,4 ****
        PEP: 201
      ! Title: Parallel Iteration
        Version: $Revision$
        Author: bwarsaw@beopen.com (Barry A. Warsaw)
      --- 1,4 ----
        PEP: 201
      ! Title: Lockstep Iteration
        Version: $Revision$
        Author: bwarsaw@beopen.com (Barry A. Warsaw)
      ***************
      *** 11,22 ****
        Introduction
        
      !     This PEP describes the `parallel iteration' proposal for Python
      !     2.0, previously known as `parallel for loops'.  This PEP tracks
      !     the status and ownership of this feature, slated for introduction
      !     in Python 2.0.  It contains a description of the feature and
      !     outlines changes necessary to support the feature.  This PEP
      !     summarizes discussions held in mailing list forums, and provides
      !     URLs for further information, where appropriate.  The CVS revision
      !     history of this file contains the definitive historical record.
        
        
      --- 11,22 ----
        Introduction
        
      !     This PEP describes the `lockstep iteration' proposal for Python
      !     2.0.  This PEP tracks the status and ownership of this feature,
      !     slated for introduction in Python 2.0.  It contains a description
      !     of the feature and outlines changes necessary to support the
      !     feature.  This PEP summarizes discussions held in mailing list
      !     forums, and provides URLs for further information, where
      !     appropriate.  The CVS revision history of this file contains the
      !     definitive historical record.
        
        
      ***************
      *** 34,40 ****
        
        
      ! Parallel For-Loops
        
      !     Parallel for-loops are non-nested iterations over two or more
            sequences, such that at each pass through the loop, one element
            from each sequence is taken to compose the target.  This behavior
      --- 34,40 ----
        
        
      ! Lockstep For-Loops
        
      !     Lockstep for-loops are non-nested iterations over two or more
            sequences, such that at each pass through the loop, one element
            from each sequence is taken to compose the target.  This behavior
      ***************
      *** 71,78 ****
        
            For these reasons, several proposals were floated in the Python
      !     2.0 beta time frame for providing a better spelling of parallel
            for-loops.  The initial proposals centered around syntactic
            changes to the for statement, but conflicts and problems with the
      !     syntax were unresolvable, especially when parallel for-loops were
            combined with another proposed feature called `list
            comprehensions' (see pep-0202.txt).
      --- 71,78 ----
        
            For these reasons, several proposals were floated in the Python
      !     2.0 beta time frame for providing a better spelling of lockstep
            for-loops.  The initial proposals centered around syntactic
            changes to the for statement, but conflicts and problems with the
      !     syntax were unresolvable, especially when lockstep for-loops were
            combined with another proposed feature called `list
            comprehensions' (see pep-0202.txt).
      ***************
      *** 141,146 ****
        
            Here is a reference implementation, in Python of the zip()
      !     built-in function.  These would ultimately be replaced by
      !     equivalent C code.
        
            def zip(*args):
      --- 141,146 ----
        
            Here is a reference implementation, in Python of the zip()
      !     built-in function.  This will be replaced with a C implementation
      !     after final approval.
        
            def zip(*args):
      ***************
      *** 148,159 ****
                    raise TypeError('zip() expects one or more sequence arguments')
                ret = []
      !         # find the length of the shortest sequence
      !         shortest = min(*map(len, args))
      !         for i in range(shortest):
      !             item = []
      !             for s in args:
      !                 item.append(s[i])
      !             ret.append(tuple(item))
      !         return ret
        
        
      --- 148,161 ----
                    raise TypeError('zip() expects one or more sequence arguments')
                ret = []
      !         i = 0
      !         try:
      !             while 1:
      !                 item = []
      !                 for s in args:
      !                     item.append(s[i])
      !                 ret.append(tuple(item))
      !                 i = i + 1
      !         except IndexError:
      !             return ret
        
        
      ***************
      *** 166,171 ****
              open issue listing 20+ proposed alternative names to zip().  In
              the face of no overwhelmingly better choice, the BDFL strongly
      !       prefers zip() due to it's Haskell[2] heritage.  See version 1.7
      !       of this PEP for the list of alteratives.
        
            - zip() shall be a built-in function.
      --- 168,173 ----
              open issue listing 20+ proposed alternative names to zip().  In
              the face of no overwhelmingly better choice, the BDFL strongly
      !       prefers zip() due to its Haskell[2] heritage.  See version 1.7
      !       of this PEP for the list of alternatives.
        
            - zip() shall be a built-in function.
      
      
      
      From python-dev@python.org  Fri Jul 28 06:48:58 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Thu, 27 Jul 2000 22:48:58 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.12,1.13
      Message-ID: <200007280548.WAA02117@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv2109
      
      Modified Files:
      	pep-0000.txt 
      Log Message:
      PEP 201 renamed "Lockstep Iteration"
      
      
      Index: pep-0000.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v
      retrieving revision 1.12
      retrieving revision 1.13
      diff -C2 -r1.12 -r1.13
      *** pep-0000.txt	2000/07/25 02:26:38	1.12
      --- pep-0000.txt	2000/07/28 05:48:56	1.13
      ***************
      *** 1,3 ****
      ! PEP: 0
        Title: Index of Python Enhancement Proposals (PEPs)
        Version: $Revision$
      --- 1,3 ----
      ! yPEP: 0
        Title: Index of Python Enhancement Proposals (PEPs)
        Version: $Revision$
      ***************
      *** 22,26 ****
        
             200  pep-0200.txt  Python 2.0 Release Schedule          jhylton  
      !      201  pep-0201.txt  Parallel Iteration                   bwarsaw
             202  pep-0202.txt  List Comprehensions                  tim_one
             203  pep-0203.txt  Augmented Assignments                twouters
      --- 22,26 ----
        
             200  pep-0200.txt  Python 2.0 Release Schedule          jhylton  
      !      201  pep-0201.txt  Lockstep Iteration                   bwarsaw
             202  pep-0202.txt  List Comprehensions                  tim_one
             203  pep-0203.txt  Augmented Assignments                twouters
      
      
      
      From python-dev@python.org  Fri Jul 28 06:49:35 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Thu, 27 Jul 2000 22:49:35 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.13,1.14
      Message-ID: <200007280549.WAA02159@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv2151
      
      Modified Files:
      	pep-0000.txt 
      Log Message:
      minor typo
      
      
      Index: pep-0000.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v
      retrieving revision 1.13
      retrieving revision 1.14
      diff -C2 -r1.13 -r1.14
      *** pep-0000.txt	2000/07/28 05:48:56	1.13
      --- pep-0000.txt	2000/07/28 05:49:32	1.14
      ***************
      *** 1,3 ****
      ! yPEP: 0
        Title: Index of Python Enhancement Proposals (PEPs)
        Version: $Revision$
      --- 1,3 ----
      ! PEP: 0
        Title: Index of Python Enhancement Proposals (PEPs)
        Version: $Revision$
      
      
      
      From python-dev@python.org  Fri Jul 28 07:40:13 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Thu, 27 Jul 2000 23:40:13 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep2html.py,1.7,1.8
      Message-ID: <200007280640.XAA12959@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv12950
      
      Modified Files:
      	pep2html.py 
      Log Message:
      Moved "Local Variables:" string farther away from the end of the file,
      so Emacs doesn't think this actually indicates the beginning of a
      local variable section!
      
      
      Index: pep2html.py
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v
      retrieving revision 1.7
      retrieving revision 1.8
      diff -C2 -r1.7 -r1.8
      *** pep2html.py	2000/07/27 19:18:59	1.7
      --- pep2html.py	2000/07/28 06:40:10	1.8
      ***************
      *** 20,23 ****
      --- 20,24 ----
        HOST = "shell.sourceforge.net" # host for update
        HDIR = "/home/groups/python/htdocs/peps" # target host directory
      + LOCALVARS = "Local Variables:"
        
        DTD = ('\n

      %s

      \n
      " % line.strip())
      --- 93,97 ----
                if line[0] != "\f":
                    if line[0].strip():
      !                 if line.strip() == LOCALVARS:
                            break
                        fo.write("
      \n

      %s

      \n
      " % line.strip())
      
      
      
      From python-dev@python.org  Fri Jul 28 11:34:51 2000
      From: python-dev@python.org (Guido van Rossum)
      Date: Fri, 28 Jul 2000 03:34:51 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Tools/freeze makeconfig.py,1.2,1.3
      Message-ID: <200007281034.DAA29333@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Tools/freeze
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv29325
      
      Modified Files:
      	makeconfig.py 
      Log Message:
      Add the exceptions module to the 'never' list -- it is built in.
      
      
      Index: makeconfig.py
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Tools/freeze/makeconfig.py,v
      retrieving revision 1.2
      retrieving revision 1.3
      diff -C2 -r1.2 -r1.3
      *** makeconfig.py	1999/09/30 14:12:44	1.2
      --- makeconfig.py	2000/07/28 10:34:48	1.3
      ***************
      *** 4,8 ****
        # Write the config.c file
        
      ! never = ['marshal', '__main__', '__builtin__', 'sys']
        
        def makeconfig(infp, outfp, modules, with_ifdef=0):
      --- 4,8 ----
        # Write the config.c file
        
      ! never = ['marshal', '__main__', '__builtin__', 'sys', 'exceptions']
        
        def makeconfig(infp, outfp, modules, with_ifdef=0):
      
      
      
      From python-dev@python.org  Fri Jul 28 14:51:29 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Fri, 28 Jul 2000 06:51:29 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Doc/lib liburllib.tex,1.23,1.24
      Message-ID: <200007281351.GAA18778@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Doc/lib
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv18766/lib
      
      Modified Files:
      	liburllib.tex 
      Log Message:
      
      Finally fixed the much-reported bug about "~" in a couple of example.
      This time, it was reported by Skip.
      
      
      Index: liburllib.tex
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/lib/liburllib.tex,v
      retrieving revision 1.23
      retrieving revision 1.24
      diff -C2 -r1.23 -r1.24
      *** liburllib.tex	2000/07/16 19:01:10	1.23
      --- liburllib.tex	2000/07/28 13:51:27	1.24
      ***************
      *** 129,133 ****
        that should not be quoted --- its default value is \code{'/'}.
        
      ! Example: \code{quote('/\~connolly/')} yields \code{'/\%7econnolly/'}.
        \end{funcdesc}
        
      --- 129,133 ----
        that should not be quoted --- its default value is \code{'/'}.
        
      ! Example: \code{quote('/\~{}connolly/')} yields \code{'/\%7econnolly/'}.
        \end{funcdesc}
        
      ***************
      *** 141,145 ****
        Replace \samp{\%xx} escapes by their single-character equivalent.
        
      ! Example: \code{unquote('/\%7Econnolly/')} yields \code{'/\~connolly/'}.
        \end{funcdesc}
        
      --- 141,145 ----
        Replace \samp{\%xx} escapes by their single-character equivalent.
        
      ! Example: \code{unquote('/\%7Econnolly/')} yields \code{'/\~{}connolly/'}.
        \end{funcdesc}
        
      
      
      
      From python-dev@python.org  Sat Jul 29 06:15:58 2000
      From: python-dev@python.org (Moshe Zadka)
      Date: Fri, 28 Jul 2000 22:15:58 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Lib SimpleHTTPServer.py,1.10,1.11
      Message-ID: <200007290515.WAA25057@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Lib
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv24997
      
      Modified Files:
      	SimpleHTTPServer.py 
      Log Message:
      Using shutil's function to copy data between file objects instead
      of rolling our own.
      
      Note:
      This is my first sourceforge checkin. If you see anything funny about
      this patch, please let me know.
      
      
      Index: SimpleHTTPServer.py
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Lib/SimpleHTTPServer.py,v
      retrieving revision 1.10
      retrieving revision 1.11
      diff -C2 -r1.10 -r1.11
      *** SimpleHTTPServer.py	2000/05/21 16:25:29	1.10
      --- SimpleHTTPServer.py	2000/07/29 05:15:56	1.11
      ***************
      *** 16,19 ****
      --- 16,20 ----
        import urllib
        import cgi
      + import shutil
        from StringIO import StringIO
        
      ***************
      *** 152,161 ****
        
                """
      ! 
      !         BLOCKSIZE = 8192
      !         while 1:
      !             data = source.read(BLOCKSIZE)
      !             if not data: break
      !             outputfile.write(data)
        
            def guess_type(self, path):
      --- 153,157 ----
        
                """
      !         shutil.copyfileobj(source, outputfile)
        
            def guess_type(self, path):
      
      
      
      From python-dev@python.org  Sat Jul 29 06:31:43 2000
      From: python-dev@python.org (Moshe Zadka)
      Date: Fri, 28 Jul 2000 22:31:43 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Lib whichdb.py,1.6,1.7
      Message-ID: <200007290531.WAA25830@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Lib
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv25787
      
      Modified Files:
      	whichdb.py 
      Log Message:
      Added support to recognize Python's internal "dumbdbm" database.
      This closes bug 200 on Jitterbug.
      
      
      Index: whichdb.py
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Lib/whichdb.py,v
      retrieving revision 1.6
      retrieving revision 1.7
      diff -C2 -r1.6 -r1.7
      *** whichdb.py	2000/02/10 17:17:14	1.6
      --- whichdb.py	2000/07/29 05:31:40	1.7
      ***************
      *** 26,29 ****
      --- 26,41 ----
                pass
        
      +     # Check for dumbdbm next -- this has a .dir and and a .dat file
      +         f = open(filename + ".dat", "rb")
      +         f.close()
      +         f = open(filename + ".dir", "rb")
      +         try:
      +             if f.read(1) in ["'", '"']:
      +                 return "dumbdbm"
      +         finally:
      +             f.close()
      +     except IOError:
      +         pass
      + 
            # See if the file exists, return None if not
            try:
      
      
      
      From python-dev@python.org  Sat Jul 29 08:05:44 2000
      From: python-dev@python.org (Moshe Zadka)
      Date: Sat, 29 Jul 2000 00:05:44 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0206.txt,1.5,1.6
      Message-ID: <200007290705.AAA11960@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv11914
      
      Modified Files:
      	pep-0206.txt 
      Log Message:
      -- Removed those pesky ^L's
      -- Added line about piddle
      
      
      
      Index: pep-0206.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0206.txt,v
      retrieving revision 1.5
      retrieving revision 1.6
      diff -C2 -r1.5 -r1.6
      *** pep-0206.txt	2000/07/15 23:52:40	1.5
      --- pep-0206.txt	2000/07/29 07:05:41	1.6
      ***************
      *** 7,11 ****
        
        
      - 
        Introduction
        
      --- 7,10 ----
      ***************
      *** 17,21 ****
        
        
      - 
        Batteries Included Philosophy
        
      --- 16,19 ----
      ***************
      *** 36,40 ****
        
        
      - 
        The Proposed Solution
        
      --- 34,37 ----
      ***************
      *** 65,69 ****
            ncurses -- ftp://dickey.his.com/ncurses/ncurses.tar.gz
        
      !     TBD, the following three:
        
            NumPy -- http://download.sourceforge.net/numpy/Numerical-15.3.tgz
      --- 62,66 ----
            ncurses -- ftp://dickey.his.com/ncurses/ncurses.tar.gz
        
      !     TBD, the following:
        
            NumPy -- http://download.sourceforge.net/numpy/Numerical-15.3.tgz
      ***************
      *** 71,75 ****
            BLT -- ftp://ftp.tcltk.com/aa004735/pub/blt/BLT2.4u.tar.gz
        
      ! 
        Connection to Distutils
        
      --- 68,75 ----
            BLT -- ftp://ftp.tcltk.com/aa004735/pub/blt/BLT2.4u.tar.gz
        
      !     Still waiting for information on last-known-good version:
      ! 
      !     piddle -- http://sourceforge.net/project/filelist.php?group_id=1074
      ! 
        Connection to Distutils
        
      ***************
      *** 86,90 ****
        
        
      - 
        Software covered by the GNU Public License
        
      --- 86,89 ----
      ***************
      *** 100,104 ****
        
        
      - 
        Open Issues
        
      --- 99,102 ----
      ***************
      *** 113,117 ****
        
        
      - 
        Local Variables:
        mode: indented-text
      --- 111,114 ----
      
      
      
      From python-dev@python.org  Sat Jul 29 11:11:23 2000
      From: python-dev@python.org (Moshe Zadka)
      Date: Sat, 29 Jul 2000 03:11:23 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0206.txt,1.6,1.7
      Message-ID: <200007291011.DAA17529@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv16339
      
      Modified Files:
      	pep-0206.txt 
      Log Message:
      Changed status of piddle, based on Janko's input.
      
      
      Index: pep-0206.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0206.txt,v
      retrieving revision 1.6
      retrieving revision 1.7
      diff -C2 -r1.6 -r1.7
      *** pep-0206.txt	2000/07/29 07:05:41	1.6
      --- pep-0206.txt	2000/07/29 10:11:19	1.7
      ***************
      *** 67,74 ****
            Pmw --  ftp://ftp.dscpl.com.au/pub/pmw/Pmw.0.8.4.tar.gz
            BLT -- ftp://ftp.tcltk.com/aa004735/pub/blt/BLT2.4u.tar.gz
        
      -     Still waiting for information on last-known-good version:
      - 
      -     piddle -- http://sourceforge.net/project/filelist.php?group_id=1074
        
        Connection to Distutils
      --- 67,72 ----
            Pmw --  ftp://ftp.dscpl.com.au/pub/pmw/Pmw.0.8.4.tar.gz
            BLT -- ftp://ftp.tcltk.com/aa004735/pub/blt/BLT2.4u.tar.gz
      +     piddle -- http://download.sourceforge.net/piddle/piddle-1.0b7.tgz
        
        
        Connection to Distutils
      
      
      
      From python-dev@python.org  Sat Jul 29 14:24:42 2000
      From: python-dev@python.org (A.M. Kuchling)
      Date: Sat, 29 Jul 2000 06:24:42 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Tools/perfecthash GenUCNHash.py,1.5,NONE perfect_hash.py,1.3,NONE perfhash.c,1.3,NONE
      Message-ID: <200007291324.GAA09833@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Tools/perfecthash
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv9732
      
      Removed Files:
      	GenUCNHash.py perfect_hash.py perfhash.c 
      Log Message:
      Removed Tools/perfecthash, per python-dev discussion
      
      
      
      
      
      
      
      From python-dev@python.org  Sat Jul 29 21:15:28 2000
      From: python-dev@python.org (A.M. Kuchling)
      Date: Sat, 29 Jul 2000 13:15:28 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Lib gzip.py,1.18,1.19
      Message-ID: <200007292015.NAA28361@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Lib
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv28353
      
      Modified Files:
      	gzip.py 
      Log Message:
      SF patch #100740: Add optional size arguments to .readline() and
      .readlines() methods.  Inspired by a patch from Wolfgang Grafen,
      though this version of the patch was completely rewritten from his
      code.
      
      
      Index: gzip.py
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Lib/gzip.py,v
      retrieving revision 1.18
      retrieving revision 1.19
      diff -C2 -r1.18 -r1.19
      *** gzip.py	2000/05/08 16:59:59	1.18
      --- gzip.py	2000/07/29 20:15:26	1.19
      ***************
      *** 6,13 ****
        # based on Andrew Kuchling's minigzip.py distributed with the zlib module
        
      ! import time
      ! import string
        import zlib
      - import struct
        import __builtin__
        
      --- 6,11 ----
        # based on Andrew Kuchling's minigzip.py distributed with the zlib module
        
      ! import string, struct, sys, time
        import zlib
        import __builtin__
        
      ***************
      *** 176,180 ****
         	
                if self._new_member:
      !             # If the _new_member flag is set, we have to 
                    # 
                    # First, check if we're at the end of the file;
      --- 174,179 ----
         	
                if self._new_member:
      !             # If the _new_member flag is set, we have to
      !             # jump to the next member, if there is one.
                    # 
                    # First, check if we're at the end of the file;
      ***************
      *** 274,298 ****
                return 0
        
      !     def readline(self):
                bufs = []
      !         readsize = 100
                while 1:
                    c = self.read(readsize)
                    i = string.find(c, '\n')
                    if i >= 0 or c == '':
      !                 bufs.append(c[:i+1])
      !                 self._unread(c[i+1:])
      !                 return string.join(bufs, '')
                    bufs.append(c)
      !             readsize = readsize * 2
        
      !     def readlines(self, ignored=None):
      !         buf = self.read()
      !         lines = string.split(buf, '\n')
      !         for i in range(len(lines)-1):
      !             lines[i] = lines[i] + '\n'
      !         if lines and not lines[-1]:
      !             del lines[-1]
      !         return lines
        
            def writelines(self, L):
      --- 273,316 ----
                return 0
        
      !     def readline(self, size=-1):
      !         if size < 0: size = sys.maxint
                bufs = []
      !         orig_size = size
      !         readsize = min(100, size)    # Read from the file in small chunks
                while 1:
      +             if size == 0:
      +                 return string.join(bufs, '') # Return resulting line
      + 
                    c = self.read(readsize)
                    i = string.find(c, '\n')
      +             if size is not None:
      +                 # We set i=size to break out of the loop under two
      +                 # conditions: 1) there's no newline, and the chunk is 
      +                 # larger than size, or 2) there is a newline, but the
      +                 # resulting line would be longer than 'size'.
      +                 if i==-1 and len(c) > size: i=size-1
      +                 elif size <= i: i = size -1
      + 
                    if i >= 0 or c == '':
      !                 bufs.append(c[:i+1])    # Add portion of last chunk
      !                 self._unread(c[i+1:])   # Push back rest of chunk
      !                 return string.join(bufs, '') # Return resulting line
      ! 
      !             # Append chunk to list, decrease 'size',
                    bufs.append(c)
      !             size = size - len(c)
      !             readsize = min(size, readsize * 2)
      !             
      !     def readlines(self, sizehint=0):
      !         # Negative numbers result in reading all the lines
      !         if sizehint <= 0: sizehint = sys.maxint
      !         L = []
      !         while sizehint > 0:
      !             line = self.readline()
      !             if line == "": break
      !             L.append( line )
      !             sizehint = sizehint - len(line)
        
      !         return L
        
            def writelines(self, L):
      
      
      
      From python-dev@python.org  Sat Jul 29 21:18:37 2000
      From: python-dev@python.org (A.M. Kuchling)
      Date: Sat, 29 Jul 2000 13:18:37 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_gzip.py,1.2,1.3
      Message-ID: <200007292018.NAA28600@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Lib/test
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv28586
      
      Modified Files:
      	test_gzip.py 
      Log Message:
      Exercise .readline() and .readlines().  More data is written to the
      test file, too, so the methods have more work to do.
      
      
      Index: test_gzip.py
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Lib/test/test_gzip.py,v
      retrieving revision 1.2
      retrieving revision 1.3
      diff -C2 -r1.2 -r1.3
      *** test_gzip.py	1999/04/07 19:00:58	1.2
      --- test_gzip.py	2000/07/29 20:18:34	1.3
      ***************
      *** 17,30 ****
        """
        
      ! f = gzip.GzipFile(filename, 'wb') ; f.write(data1) ; f.close()
        
        f = gzip.GzipFile(filename, 'rb') ; d = f.read() ; f.close()
      ! assert d == data1
        
        # Append to the previous file
      ! f = gzip.GzipFile(filename, 'ab') ; f.write(data2) ; f.close()
        
        f = gzip.GzipFile(filename, 'rb') ; d = f.read() ; f.close()
      ! assert d == data1+data2
        
        os.unlink( filename )
      --- 17,54 ----
        """
        
      ! f = gzip.GzipFile(filename, 'wb') ; f.write(data1 * 50) ; f.close()
        
        f = gzip.GzipFile(filename, 'rb') ; d = f.read() ; f.close()
      ! assert d == data1*50
        
        # Append to the previous file
      ! f = gzip.GzipFile(filename, 'ab') ; f.write(data2 * 15) ; f.close()
        
        f = gzip.GzipFile(filename, 'rb') ; d = f.read() ; f.close()
      ! assert d == (data1*50) + (data2*15)
      ! 
      ! # Try .readline() with varying line lengths
      ! 
      ! f = gzip.GzipFile(filename, 'rb')
      ! line_length = 0
      ! while 1:
      !     L = f.readline( line_length )
      !     if L == "" and line_length != 0: break
      !     assert len(L) <= line_length
      !     line_length = (line_length + 1) % 50
      ! f.close()
      ! 
      ! # Try .readlines() 
      ! 
      ! f = gzip.GzipFile(filename, 'rb')
      ! L = f.readlines()
      ! f.close()
      ! 
      ! f = gzip.GzipFile(filename, 'rb')
      ! while 1:
      !     L = f.readlines(150)
      !     if L == []: break    
      ! f.close()
      ! 
        
        os.unlink( filename )
      
      
      
      From python-dev@python.org  Sun Jul 30 01:04:21 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 17:04:21 -0700
      Subject: [Python-checkins] CVS: distutils/distutils filelist.py,NONE,1.1
      Message-ID: <200007300004.RAA14089@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv14077
      
      Added Files:
      	filelist.py 
      Log Message:
      Provides the FileList class for building a list of filenames by exploring
      the filesystem, and filtering the list by applying various patterns.
      
      Initial revision (almost) as supplied in a patch by Rene Liebscher; I
      just renamed the class from Template to FileList, and the module
      accordingly.
      
      ***** Error reading new file(2, 'No such file or directory')
      
      
      From python-dev@python.org  Sun Jul 30 01:08:16 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 17:08:16 -0700
      Subject: [Python-checkins] CVS: distutils/distutils filelist.py,1.1,1.2
      Message-ID: <200007300008.RAA14383@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv14375
      
      Modified Files:
      	filelist.py 
      Log Message:
      Added class docstring and ditched inappropriate class attrs.
      Indentation/whitspace fixes.
      
      Index: filelist.py
      ===================================================================
      RCS file: /cvsroot/python/distutils/distutils/filelist.py,v
      retrieving revision 1.1
      retrieving revision 1.2
      diff -C2 -r1.1 -r1.2
      *** filelist.py	2000/07/30 00:04:17	1.1
      --- filelist.py	2000/07/30 00:08:13	1.2
      ***************
      *** 20,33 ****
        class FileList:
        
      !     files = None # reference to files list to mainpulate
      !     allfiles = None # list of all files, if None will be filled
      !                     # at first use from directory self.dir
      !     dir = None # directory from which files will be taken
      !                # to fill self.allfiles if it was not set otherwise
      ! 
      !     # next both functions (callable objects) can be set by the user
      !     # warn: warning function
      !     # debug_print: debug function  
        
            def __init__(self, 
                         files=[], 
      --- 20,37 ----
        class FileList:
        
      !     """A list of files built by on exploring the filesystem and filtered by
      !     applying various patterns to what we find there.
        
      +     Instance attributes:
      +       dir
      +         directory from which files will be taken -- only used if
      +         'allfiles' not supplied to constructor
      +       files
      +         list of filenames currently being built/filtered/manipulated
      +       allfiles
      +         complete list of files under consideration (ie. without any
      +         filtering applied)
      +     """
      + 
            def __init__(self, 
                         files=[], 
      ***************
      *** 43,53 ****
                self.files = files
                self.dir = dir
                self.allfiles = allfiles 
      -              # if None, it will be filled, when used for first time
        
        
            # standard warning and debug functions, if no other given
            def __warn (self, msg):
      !         sys.stderr.write ("warning: template: %s\n" % msg)
                
            def __debug_print (self, msg):
      --- 47,58 ----
                self.files = files
                self.dir = dir
      + 
      +         # if None, 'allfiles' will be filled when used for first time
                self.allfiles = allfiles 
        
        
            # standard warning and debug functions, if no other given
            def __warn (self, msg):
      !         sys.stderr.write ("warning: %s\n" % msg)
                
            def __debug_print (self, msg):
      ***************
      *** 60,185 ****
        
            
      !     def process_line(self, line):    
        
      !             words = string.split (line)
      !             action = words[0]
        
      !             # First, check that the right number of words are present
      !             # for the given action (which is the first word)
      !             if action in ('include','exclude',
      !                           'global-include','global-exclude'):
      !                 if len (words) < 2:
      !                     self.warn \
      !                         ("invalid template line: " +
      !                          "'%s' expects   ..." %
      !                          action)
      !                     return
        
      !                 pattern_list = map(convert_path, words[1:])
        
      !             elif action in ('recursive-include','recursive-exclude'):
      !                 if len (words) < 3:
      !                     self.warn \
      !                         ("invalid template line: " +
      !                          "'%s' expects    ..." %
      !                          action)
      !                     return
        
      !                 dir = convert_path(words[1])
      !                 pattern_list = map (convert_path, words[2:])
        
      !             elif action in ('graft','prune'):
      !                 if len (words) != 2:
      !                     self.warn \
      !                         ("invalid template line: " +
      !                          "'%s' expects a single " %
      !                          action)
      !                     return
      ! 
      !                 dir_pattern = convert_path (words[1])
      ! 
      !             else:
      !                 self.warn ("invalid template line: " +
      !                                "unknown action '%s'" % action)
                        return
        
      !             # OK, now we know that the action is valid and we have the
      !             # right number of words on the line for that action -- so we
      !             # can proceed with minimal error-checking.  Also, we have
      !             # defined either (pattern), (dir and pattern), or
      !             # (dir_pattern) -- so we don't have to spend any time
      !             # digging stuff up out of 'words'.
      ! 
      !             if action == 'include':
      !                 self.debug_print("include " + string.join(pattern_list))
      !                 for pattern in pattern_list:
      !                     if not self.select_pattern (pattern, anchor=1):
      !                         self.warn ("no files found matching '%s'" %
      !                                        pattern)
      ! 
      !             elif action == 'exclude':
      !                 self.debug_print("exclude " + string.join(pattern_list))
      !                 for pattern in pattern_list:
      !                     if not self.exclude_pattern (pattern, anchor=1):
      !                         self.warn (
      !                             "no previously-included files found matching '%s'"%
      !                             pattern)
      ! 
      !             elif action == 'global-include':
      !                 self.debug_print("global-include " + string.join(pattern_list))
      !                 for pattern in pattern_list:
      !                     if not self.select_pattern (pattern, anchor=0):
      !                         self.warn (("no files found matching '%s' " +
      !                                         "anywhere in distribution") %
      !                                        pattern)
      ! 
      !             elif action == 'global-exclude':
      !                 self.debug_print("global-exclude " + string.join(pattern_list))
      !                 for pattern in pattern_list:
      !                     if not self.exclude_pattern (pattern, anchor=0):
      !                         self.warn \
      !                             (("no previously-included files matching '%s' " +
      !                               "found anywhere in distribution") %
      !                              pattern)
      ! 
      !             elif action == 'recursive-include':
      !                 self.debug_print("recursive-include %s %s" %
      !                                  (dir, string.join(pattern_list)))
      !                 for pattern in pattern_list:
      !                     if not self.select_pattern (pattern, prefix=dir):
      !                         self.warn (("no files found matching '%s' " +
      !                                         "under directory '%s'") %
      !                                        (pattern, dir))
      ! 
      !             elif action == 'recursive-exclude':
      !                 self.debug_print("recursive-exclude %s %s" %
      !                                  (dir, string.join(pattern_list)))
      !                 for pattern in pattern_list:
      !                     if not self.exclude_pattern(pattern, prefix=dir):
      !                         self.warn \
      !                             (("no previously-included files matching '%s' " +
      !                               "found under directory '%s'") %
      !                              (pattern, dir))
      ! 
      !             elif action == 'graft':
      !                 self.debug_print("graft " + dir_pattern)
      !                 if not self.select_pattern(None, prefix=dir_pattern):
      !                     self.warn ("no directories found matching '%s'" %
      !                                    dir_pattern)
      ! 
      !             elif action == 'prune':
      !                 self.debug_print("prune " + dir_pattern)
      !                 if not self.exclude_pattern(None, prefix=dir_pattern):
                            self.warn \
      !                         (("no previously-included directories found " +
      !                           "matching '%s'") %
      !                          dir_pattern)
      !             else:
      !                 raise RuntimeError, \
      !                       "this cannot happen: invalid action '%s'" % action
        
            # process_line ()
      - 
      - 
        
        
      --- 65,188 ----
        
            
      !     def process_line (self, line):    
        
      !         words = string.split (line)
      !         action = words[0]
        
      !         # First, check that the right number of words are present
      !         # for the given action (which is the first word)
      !         if action in ('include','exclude',
      !                       'global-include','global-exclude'):
      !             if len (words) < 2:
      !                 self.warn \
      !                     ("invalid template line: " +
      !                      "'%s' expects   ..." %
      !                      action)
      !                 return
        
      !             pattern_list = map(convert_path, words[1:])
        
      !         elif action in ('recursive-include','recursive-exclude'):
      !             if len (words) < 3:
      !                 self.warn \
      !                     ("invalid template line: " +
      !                      "'%s' expects    ..." %
      !                      action)
      !                 return
        
      !             dir = convert_path(words[1])
      !             pattern_list = map (convert_path, words[2:])
        
      !         elif action in ('graft','prune'):
      !             if len (words) != 2:
      !                 self.warn \
      !                     ("invalid template line: " +
      !                      "'%s' expects a single " %
      !                      action)
                        return
      + 
      +             dir_pattern = convert_path (words[1])
        
      !         else:
      !             self.warn ("invalid template line: " +
      !                            "unknown action '%s'" % action)
      !             return
      ! 
      !         # OK, now we know that the action is valid and we have the
      !         # right number of words on the line for that action -- so we
      !         # can proceed with minimal error-checking.  Also, we have
      !         # defined either (pattern), (dir and pattern), or
      !         # (dir_pattern) -- so we don't have to spend any time
      !         # digging stuff up out of 'words'.
      ! 
      !         if action == 'include':
      !             self.debug_print("include " + string.join(pattern_list))
      !             for pattern in pattern_list:
      !                 if not self.select_pattern (pattern, anchor=1):
      !                     self.warn ("no files found matching '%s'" %
      !                                    pattern)
      ! 
      !         elif action == 'exclude':
      !             self.debug_print("exclude " + string.join(pattern_list))
      !             for pattern in pattern_list:
      !                 if not self.exclude_pattern (pattern, anchor=1):
      !                     self.warn (
      !                         "no previously-included files found matching '%s'"%
      !                         pattern)
      ! 
      !         elif action == 'global-include':
      !             self.debug_print("global-include " + string.join(pattern_list))
      !             for pattern in pattern_list:
      !                 if not self.select_pattern (pattern, anchor=0):
      !                     self.warn (("no files found matching '%s' " +
      !                                     "anywhere in distribution") %
      !                                    pattern)
      ! 
      !         elif action == 'global-exclude':
      !             self.debug_print("global-exclude " + string.join(pattern_list))
      !             for pattern in pattern_list:
      !                 if not self.exclude_pattern (pattern, anchor=0):
      !                     self.warn \
      !                         (("no previously-included files matching '%s' " +
      !                           "found anywhere in distribution") %
      !                          pattern)
      ! 
      !         elif action == 'recursive-include':
      !             self.debug_print("recursive-include %s %s" %
      !                              (dir, string.join(pattern_list)))
      !             for pattern in pattern_list:
      !                 if not self.select_pattern (pattern, prefix=dir):
      !                     self.warn (("no files found matching '%s' " +
      !                                     "under directory '%s'") %
      !                                    (pattern, dir))
      ! 
      !         elif action == 'recursive-exclude':
      !             self.debug_print("recursive-exclude %s %s" %
      !                              (dir, string.join(pattern_list)))
      !             for pattern in pattern_list:
      !                 if not self.exclude_pattern(pattern, prefix=dir):
                            self.warn \
      !                         (("no previously-included files matching '%s' " +
      !                           "found under directory '%s'") %
      !                          (pattern, dir))
      ! 
      !         elif action == 'graft':
      !             self.debug_print("graft " + dir_pattern)
      !             if not self.select_pattern(None, prefix=dir_pattern):
      !                 self.warn ("no directories found matching '%s'" %
      !                                dir_pattern)
      ! 
      !         elif action == 'prune':
      !             self.debug_print("prune " + dir_pattern)
      !             if not self.exclude_pattern(None, prefix=dir_pattern):
      !                 self.warn \
      !                     (("no previously-included directories found " +
      !                       "matching '%s'") %
      !                      dir_pattern)
      !         else:
      !             raise RuntimeError, \
      !                   "this cannot happen: invalid action '%s'" % action
        
            # process_line ()
        
        
      
      
      
      From python-dev@python.org  Sun Jul 30 01:21:39 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 17:21:39 -0700
      Subject: [Python-checkins] CVS: distutils/distutils filelist.py,1.2,1.3
      Message-ID: <200007300021.RAA15051@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv15041
      
      Modified Files:
      	filelist.py 
      Log Message:
      Renamed 'process_line()' to 'process_template_line()', and factored out
      '_parse_template_line()'.
      
      Index: filelist.py
      ===================================================================
      RCS file: /cvsroot/python/distutils/distutils/filelist.py,v
      retrieving revision 1.2
      retrieving revision 1.3
      diff -C2 -r1.2 -r1.3
      *** filelist.py	2000/07/30 00:08:13	1.2
      --- filelist.py	2000/07/30 00:21:36	1.3
      ***************
      *** 17,20 ****
      --- 17,21 ----
        from glob import glob
        from distutils.util import convert_path
      + from distutils.errors import DistutilsTemplateError, DistutilsInternalError
        
        class FileList:
      ***************
      *** 65,188 ****
        
            
      !     def process_line (self, line):    
      ! 
                words = string.split (line)
                action = words[0]
        
      !         # First, check that the right number of words are present
      !         # for the given action (which is the first word)
      !         if action in ('include','exclude',
      !                       'global-include','global-exclude'):
                    if len (words) < 2:
      !                 self.warn \
      !                     ("invalid template line: " +
      !                      "'%s' expects   ..." %
      !                      action)
      !                 return
        
      !             pattern_list = map(convert_path, words[1:])
        
      !         elif action in ('recursive-include','recursive-exclude'):
                    if len (words) < 3:
      !                 self.warn \
      !                     ("invalid template line: " +
      !                      "'%s' expects    ..." %
      !                      action)
      !                 return
        
                    dir = convert_path(words[1])
      !             pattern_list = map (convert_path, words[2:])
        
      !         elif action in ('graft','prune'):
                    if len (words) != 2:
      !                 self.warn \
      !                     ("invalid template line: " +
      !                      "'%s' expects a single " %
      !                      action)
      !                 return
        
      !             dir_pattern = convert_path (words[1])
        
                else:
      !             self.warn ("invalid template line: " +
      !                            "unknown action '%s'" % action)
      !             return
        
                # OK, now we know that the action is valid and we have the
                # right number of words on the line for that action -- so we
      !         # can proceed with minimal error-checking.  Also, we have
      !         # defined either (pattern), (dir and pattern), or
      !         # (dir_pattern) -- so we don't have to spend any time
      !         # digging stuff up out of 'words'.
      ! 
                if action == 'include':
      !             self.debug_print("include " + string.join(pattern_list))
      !             for pattern in pattern_list:
                        if not self.select_pattern (pattern, anchor=1):
      !                     self.warn ("no files found matching '%s'" %
      !                                    pattern)
        
                elif action == 'exclude':
      !             self.debug_print("exclude " + string.join(pattern_list))
      !             for pattern in pattern_list:
                        if not self.exclude_pattern (pattern, anchor=1):
      !                     self.warn (
                                "no previously-included files found matching '%s'"%
                                pattern)
        
                elif action == 'global-include':
      !             self.debug_print("global-include " + string.join(pattern_list))
      !             for pattern in pattern_list:
                        if not self.select_pattern (pattern, anchor=0):
                            self.warn (("no files found matching '%s' " +
      !                                     "anywhere in distribution") %
      !                                    pattern)
        
                elif action == 'global-exclude':
      !             self.debug_print("global-exclude " + string.join(pattern_list))
      !             for pattern in pattern_list:
                        if not self.exclude_pattern (pattern, anchor=0):
      !                     self.warn \
      !                         (("no previously-included files matching '%s' " +
      !                           "found anywhere in distribution") %
      !                          pattern)
        
                elif action == 'recursive-include':
                    self.debug_print("recursive-include %s %s" %
      !                              (dir, string.join(pattern_list)))
      !             for pattern in pattern_list:
                        if not self.select_pattern (pattern, prefix=dir):
                            self.warn (("no files found matching '%s' " +
      !                                     "under directory '%s'") %
      !                                    (pattern, dir))
        
                elif action == 'recursive-exclude':
                    self.debug_print("recursive-exclude %s %s" %
      !                              (dir, string.join(pattern_list)))
      !             for pattern in pattern_list:
                        if not self.exclude_pattern(pattern, prefix=dir):
      !                     self.warn \
      !                         (("no previously-included files matching '%s' " +
      !                           "found under directory '%s'") %
      !                          (pattern, dir))
        
                elif action == 'graft':
                    self.debug_print("graft " + dir_pattern)
                    if not self.select_pattern(None, prefix=dir_pattern):
      !                 self.warn ("no directories found matching '%s'" %
      !                                dir_pattern)
        
                elif action == 'prune':
                    self.debug_print("prune " + dir_pattern)
                    if not self.exclude_pattern(None, prefix=dir_pattern):
      !                 self.warn \
      !                     (("no previously-included directories found " +
      !                       "matching '%s'") %
      !                      dir_pattern)
                else:
      !             raise RuntimeError, \
                          "this cannot happen: invalid action '%s'" % action
        
      !     # process_line ()
        
        
      --- 66,182 ----
        
            
      !     def _parse_template_line (self, line):
                words = string.split (line)
                action = words[0]
      + 
      +         patterns = dir = dir_pattern = None
        
      !         if action in ('include', 'exclude',
      !                       'global-include', 'global-exclude'):
                    if len (words) < 2:
      !                 raise DistutilsTemplateError, \
      !                       "'%s' expects   ..." % action
        
      !             patterns = map(convert_path, words[1:])
        
      !         elif action in ('recursive-include', 'recursive-exclude'):
                    if len (words) < 3:
      !                 raise DistutilsTemplateError, \
      !                       "'%s' expects    ..." % action
        
                    dir = convert_path(words[1])
      !             patterns = map(convert_path, words[2:])
        
      !         elif action in ('graft', 'prune'):
                    if len (words) != 2:
      !                 raise DistutilsTemplateError, \
      !                      "'%s' expects a single " % action
        
      !             dir_pattern = convert_path(words[1])
        
                else:
      !             raise DistutilsTemplateError, "unknown action '%s'" % action
      ! 
      !         return (action, pattern, dir, dir_pattern)
      ! 
      !     # _parse_template_line ()
      !     
      ! 
      !     def process_template_line (self, line):    
        
      +         # Parse the line: split it up, make sure the right number of words
      +         # are there, and return the relevant words.  'action' is always
      +         # defined: it's the first word of the line.  Which of the other
      +         # three are defined depends on the action; it'll be either
      +         # patterns, (dir and patterns), or (dir_pattern).
      +         (action, patterns, dir, dir_pattern) = self._parse_template_line(line)
      + 
                # OK, now we know that the action is valid and we have the
                # right number of words on the line for that action -- so we
      !         # can proceed with minimal error-checking.
                if action == 'include':
      !             self.debug_print("include " + string.join(patterns))
      !             for pattern in patterns:
                        if not self.select_pattern (pattern, anchor=1):
      !                     self.warn("no files found matching '%s'" % pattern)
        
                elif action == 'exclude':
      !             self.debug_print("exclude " + string.join(patterns))
      !             for pattern in patterns:
                        if not self.exclude_pattern (pattern, anchor=1):
      !                     self.warn(
                                "no previously-included files found matching '%s'"%
                                pattern)
        
                elif action == 'global-include':
      !             self.debug_print("global-include " + string.join(patterns))
      !             for pattern in patterns:
                        if not self.select_pattern (pattern, anchor=0):
                            self.warn (("no files found matching '%s' " +
      !                                 "anywhere in distribution") %
      !                                pattern)
        
                elif action == 'global-exclude':
      !             self.debug_print("global-exclude " + string.join(patterns))
      !             for pattern in patterns:
                        if not self.exclude_pattern (pattern, anchor=0):
      !                     self.warn(("no previously-included files matching '%s' " +
      !                                "found anywhere in distribution") %
      !                               pattern)
        
                elif action == 'recursive-include':
                    self.debug_print("recursive-include %s %s" %
      !                              (dir, string.join(patterns)))
      !             for pattern in patterns:
                        if not self.select_pattern (pattern, prefix=dir):
                            self.warn (("no files found matching '%s' " +
      !                                 "under directory '%s'") %
      !                                (pattern, dir))
        
                elif action == 'recursive-exclude':
                    self.debug_print("recursive-exclude %s %s" %
      !                              (dir, string.join(patterns)))
      !             for pattern in patterns:
                        if not self.exclude_pattern(pattern, prefix=dir):
      !                     self.warn(("no previously-included files matching '%s' " +
      !                                "found under directory '%s'") %
      !                               (pattern, dir))
        
                elif action == 'graft':
                    self.debug_print("graft " + dir_pattern)
                    if not self.select_pattern(None, prefix=dir_pattern):
      !                 self.warn ("no directories found matching '%s'" % dir_pattern)
        
                elif action == 'prune':
                    self.debug_print("prune " + dir_pattern)
                    if not self.exclude_pattern(None, prefix=dir_pattern):
      !                 self.warn(("no previously-included directories found " +
      !                            "matching '%s'") %
      !                           dir_pattern)
                else:
      !             raise DistutilsInternalError, \
                          "this cannot happen: invalid action '%s'" % action
        
      !     # process_template_line ()
        
        
      
      
      
      From python-dev@python.org  Sun Jul 30 01:36:27 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 17:36:27 -0700
      Subject: [Python-checkins] CVS: distutils/distutils filelist.py,1.3,1.4
      Message-ID: <200007300036.RAA15856@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv15846
      
      Modified Files:
      	filelist.py 
      Log Message:
      Renamed 'select_pattern()' to 'include_pattern()'.
      Other cosmetic/doc/comment tweaks.
      
      Index: filelist.py
      ===================================================================
      RCS file: /cvsroot/python/distutils/distutils/filelist.py,v
      retrieving revision 1.3
      retrieving revision 1.4
      diff -C2 -r1.3 -r1.4
      *** filelist.py	2000/07/30 00:21:36	1.3
      --- filelist.py	2000/07/30 00:36:25	1.4
      ***************
      *** 106,110 ****
        
                # Parse the line: split it up, make sure the right number of words
      !         # are there, and return the relevant words.  'action' is always
                # defined: it's the first word of the line.  Which of the other
                # three are defined depends on the action; it'll be either
      --- 106,110 ----
        
                # Parse the line: split it up, make sure the right number of words
      !         # is there, and return the relevant words.  'action' is always
                # defined: it's the first word of the line.  Which of the other
                # three are defined depends on the action; it'll be either
      ***************
      *** 118,122 ****
                    self.debug_print("include " + string.join(patterns))
                    for pattern in patterns:
      !                 if not self.select_pattern (pattern, anchor=1):
                            self.warn("no files found matching '%s'" % pattern)
        
      --- 118,122 ----
                    self.debug_print("include " + string.join(patterns))
                    for pattern in patterns:
      !                 if not self.include_pattern (pattern, anchor=1):
                            self.warn("no files found matching '%s'" % pattern)
        
      ***************
      *** 132,136 ****
                    self.debug_print("global-include " + string.join(patterns))
                    for pattern in patterns:
      !                 if not self.select_pattern (pattern, anchor=0):
                            self.warn (("no files found matching '%s' " +
                                        "anywhere in distribution") %
      --- 132,136 ----
                    self.debug_print("global-include " + string.join(patterns))
                    for pattern in patterns:
      !                 if not self.include_pattern (pattern, anchor=0):
                            self.warn (("no files found matching '%s' " +
                                        "anywhere in distribution") %
      ***************
      *** 149,153 ****
                                     (dir, string.join(patterns)))
                    for pattern in patterns:
      !                 if not self.select_pattern (pattern, prefix=dir):
                            self.warn (("no files found matching '%s' " +
                                        "under directory '%s'") %
      --- 149,153 ----
                                     (dir, string.join(patterns)))
                    for pattern in patterns:
      !                 if not self.include_pattern (pattern, prefix=dir):
                            self.warn (("no files found matching '%s' " +
                                        "under directory '%s'") %
      ***************
      *** 165,169 ****
                elif action == 'graft':
                    self.debug_print("graft " + dir_pattern)
      !             if not self.select_pattern(None, prefix=dir_pattern):
                        self.warn ("no directories found matching '%s'" % dir_pattern)
        
      --- 165,169 ----
                elif action == 'graft':
                    self.debug_print("graft " + dir_pattern)
      !             if not self.include_pattern(None, prefix=dir_pattern):
                        self.warn ("no directories found matching '%s'" % dir_pattern)
        
      ***************
      *** 181,193 ****
        
        
      !     def select_pattern (self, pattern,
                                anchor=1, prefix=None, is_regex=0):
      -         """Select strings (presumably filenames) from 'files' that match
      -         'pattern', a Unix-style wildcard (glob) pattern.  Patterns are not
      -         quite the same as implemented by the 'fnmatch' module: '*' and '?'
      -         match non-special characters, where "special" is platform-dependent:
      -         slash on Unix, colon, slash, and backslash on DOS/Windows, and colon on
      -         Mac OS.
        
                If 'anchor' is true (the default), then the pattern match is more
                stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
      --- 181,194 ----
        
        
      !     def include_pattern (self, pattern,
                                anchor=1, prefix=None, is_regex=0):
        
      +         """Select strings (presumably filenames) from 'self.files' that
      +         match 'pattern', a Unix-style wildcard (glob) pattern.  Patterns
      +         are not quite the same as implemented by the 'fnmatch' module: '*'
      +         and '?'  match non-special characters, where "special" is platform-
      +         dependent: slash on Unix; colon, slash, and backslash on
      +         DOS/Windows; and colon on Mac OS.
      + 
                If 'anchor' is true (the default), then the pattern match is more
                stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
      ***************
      *** 209,213 ****
                files_found = 0
                pattern_re = translate_pattern (pattern, anchor, prefix, is_regex)
      !         self.debug_print("select_pattern: applying regex r'%s'" %
                                 pattern_re.pattern)
        
      --- 210,214 ----
                files_found = 0
                pattern_re = translate_pattern (pattern, anchor, prefix, is_regex)
      !         self.debug_print("include_pattern: applying regex r'%s'" %
                                 pattern_re.pattern)
        
      ***************
      *** 223,227 ****
                return files_found
        
      !     # select_pattern ()
        
        
      --- 224,228 ----
                return files_found
        
      !     # include_pattern ()
        
        
      ***************
      *** 230,234 ****
                """Remove strings (presumably filenames) from 'files' that match
                'pattern'.  Other parameters are the same as for
      !         'select_pattern()', above.  
                The list 'self.files' is modified in place.
                Return 1 if files are found.
      --- 231,235 ----
                """Remove strings (presumably filenames) from 'files' that match
                'pattern'.  Other parameters are the same as for
      !         'include_pattern()', above.  
                The list 'self.files' is modified in place.
                Return 1 if files are found.
      
      
      
      From python-dev@python.org  Sun Jul 30 01:37:06 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 17:37:06 -0700
      Subject: [Python-checkins] CVS: distutils/distutils filelist.py,1.4,1.5
      Message-ID: <200007300037.RAA15906@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv15884
      
      Modified Files:
      	filelist.py 
      Log Message:
      Ditched the unused 'recursive_exclude_pattern()' method.
      
      Index: filelist.py
      ===================================================================
      RCS file: /cvsroot/python/distutils/distutils/filelist.py,v
      retrieving revision 1.4
      retrieving revision 1.5
      diff -C2 -r1.4 -r1.5
      *** filelist.py	2000/07/30 00:36:25	1.4
      --- filelist.py	2000/07/30 00:37:04	1.5
      ***************
      *** 249,276 ****
            # exclude_pattern ()
        
      - 
      -     def recursive_exclude_pattern (self, dir, pattern=None):
      -         """Remove filenames from 'self.files' that are under 'dir' and
      -         whose basenames match 'pattern'.
      -         Return 1 if files are found.
      -         """
      -         files_found = 0
      -         self.debug_print("recursive_exclude_pattern: dir=%s, pattern=%s" %
      -                          (dir, pattern))
      -         if pattern is None:
      -             pattern_re = None
      -         else:
      -             pattern_re = translate_pattern (pattern)
      - 
      -         for i in range (len (self.files)-1, -1, -1):
      -             (cur_dir, cur_base) = os.path.split (self.files[i])
      -             if (cur_dir == dir and
      -                 (pattern_re is None or pattern_re.match (cur_base))):
      -                 self.debug_print("removing %s" % self.files[i])
      -                 del self.files[i]
      -                 files_found = 1
      -     
      -         return files_found
      - 
        # class FileList
        
      --- 249,252 ----
      
      
      
      From python-dev@python.org  Sun Jul 30 02:03:34 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 18:03:34 -0700
      Subject: [Python-checkins] CVS: distutils/distutils errors.py,1.9,1.10
      Message-ID: <200007300103.SAA25177@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv25165
      
      Modified Files:
      	errors.py 
      Log Message:
      Added DistutilsTemplateError.
      
      Index: errors.py
      ===================================================================
      RCS file: /cvsroot/python/distutils/distutils/errors.py,v
      retrieving revision 1.9
      retrieving revision 1.10
      diff -C2 -r1.9 -r1.10
      *** errors.py	2000/06/25 02:12:14	1.9
      --- errors.py	2000/07/30 01:03:31	1.10
      ***************
      *** 74,77 ****
      --- 74,80 ----
            pass
        
      + class DistutilsTemplateError (DistutilsError):
      +     """Syntax error in a file list template."""
      + 
        
        # Exception classes used by the CCompiler implementation classes
      
      
      
      From python-dev@python.org  Sun Jul 30 02:04:26 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 18:04:26 -0700
      Subject: [Python-checkins] CVS: distutils/distutils filelist.py,1.5,1.6
      Message-ID: <200007300104.SAA25268@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv25221
      
      Modified Files:
      	filelist.py 
      Log Message:
      Typo fix.
      
      Index: filelist.py
      ===================================================================
      RCS file: /cvsroot/python/distutils/distutils/filelist.py,v
      retrieving revision 1.5
      retrieving revision 1.6
      diff -C2 -r1.5 -r1.6
      *** filelist.py	2000/07/30 00:37:04	1.5
      --- filelist.py	2000/07/30 01:04:22	1.6
      ***************
      *** 98,102 ****
                    raise DistutilsTemplateError, "unknown action '%s'" % action
        
      !         return (action, pattern, dir, dir_pattern)
        
            # _parse_template_line ()
      --- 98,102 ----
                    raise DistutilsTemplateError, "unknown action '%s'" % action
        
      !         return (action, patterns, dir, dir_pattern)
        
            # _parse_template_line ()
      
      
      
      From python-dev@python.org  Sun Jul 30 02:05:04 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 18:05:04 -0700
      Subject: [Python-checkins] CVS: distutils/distutils/command sdist.py,1.38,1.39
      Message-ID: <200007300105.SAA25316@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils/command
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv25287
      
      Modified Files:
      	sdist.py 
      Log Message:
      The other half of Rene Liebscher's patch to add the Template class,
      which I renamed to FileList: remove all the file-list-generation code from
      the sdist command and adapt it to use the new FileList class instead.
      
      Index: sdist.py
      ===================================================================
      RCS file: /cvsroot/python/distutils/distutils/command/sdist.py,v
      retrieving revision 1.38
      retrieving revision 1.39
      diff -C2 -r1.38 -r1.39
      *** sdist.py	2000/07/27 01:58:45	1.38
      --- sdist.py	2000/07/30 01:05:02	1.39
      ***************
      *** 7,20 ****
        __revision__ = "$Id$"
        
      ! import sys, os, string, re
      ! import fnmatch
        from types import *
        from glob import glob
        from distutils.core import Command
        from distutils.util import \
      !      convert_path, create_tree, remove_tree, newer, write_file, \
             check_archive_formats
        from distutils.text_file import TextFile
        from distutils.errors import DistutilsExecError, DistutilsOptionError
        
        
      --- 7,20 ----
        __revision__ = "$Id$"
        
      ! import sys, os, string
        from types import *
        from glob import glob
        from distutils.core import Command
        from distutils.util import \
      !      create_tree, remove_tree, newer, write_file, \
             check_archive_formats
        from distutils.text_file import TextFile
        from distutils.errors import DistutilsExecError, DistutilsOptionError
      + from distutils.filelist import FileList
        
        
      ***************
      *** 320,342 ****
            
        
      -     def recursive_exclude_pattern (self, dir, pattern=None):
      -         """Remove filenames from 'self.files' that are under 'dir' and
      -         whose basenames match 'pattern'.
      -         """
      -         self.debug_print("recursive_exclude_pattern: dir=%s, pattern=%s" %
      -                          (dir, pattern))
      -         if pattern is None:
      -             pattern_re = None
      -         else:
      -             pattern_re = translate_pattern (pattern)
      - 
      -         for i in range (len (self.files)-1, -1, -1):
      -             (cur_dir, cur_base) = os.path.split (self.files[i])
      -             if (cur_dir == dir and
      -                 (pattern_re is None or pattern_re.match (cur_base))):
      -                 self.debug_print("removing %s" % self.files[i])
      -                 del self.files[i]
      - 
      - 
            def read_template (self):
                """Read and parse the manifest template file named by
      --- 320,323 ----
      ***************
      *** 357,507 ****
                                     collapse_ws=1)
        
      !         all_files = findall ()
        
                while 1:
      - 
                    line = template.readline()
                    if line is None:            # end of file
                        break
      - 
      -             words = string.split (line)
      -             action = words[0]
        
      !             # First, check that the right number of words are present
      !             # for the given action (which is the first word)
      !             if action in ('include','exclude',
      !                           'global-include','global-exclude'):
      !                 if len (words) < 2:
      !                     template.warn \
      !                         ("invalid manifest template line: " +
      !                          "'%s' expects   ..." %
      !                          action)
      !                     continue
      ! 
      !                 pattern_list = map(convert_path, words[1:])
      ! 
      !             elif action in ('recursive-include','recursive-exclude'):
      !                 if len (words) < 3:
      !                     template.warn \
      !                         ("invalid manifest template line: " +
      !                          "'%s' expects    ..." %
      !                          action)
      !                     continue
      ! 
      !                 dir = convert_path(words[1])
      !                 pattern_list = map (convert_path, words[2:])
      ! 
      !             elif action in ('graft','prune'):
      !                 if len (words) != 2:
      !                     template.warn \
      !                         ("invalid manifest template line: " +
      !                          "'%s' expects a single " %
      !                          action)
      !                     continue
        
      -                 dir_pattern = convert_path (words[1])
      - 
      -             else:
      -                 template.warn ("invalid manifest template line: " +
      -                                "unknown action '%s'" % action)
      -                 continue
      - 
      -             # OK, now we know that the action is valid and we have the
      -             # right number of words on the line for that action -- so we
      -             # can proceed with minimal error-checking.  Also, we have
      -             # defined either (pattern), (dir and pattern), or
      -             # (dir_pattern) -- so we don't have to spend any time
      -             # digging stuff up out of 'words'.
      - 
      -             if action == 'include':
      -                 self.debug_print("include " + string.join(pattern_list))
      -                 for pattern in pattern_list:
      -                     files = self.select_pattern (all_files, pattern, anchor=1)
      -                     if not files:
      -                         template.warn ("no files found matching '%s'" %
      -                                        pattern)
      -                     else:
      -                         self.files.extend (files)
      - 
      -             elif action == 'exclude':
      -                 self.debug_print("exclude " + string.join(pattern_list))
      -                 for pattern in pattern_list:
      -                     num = self.exclude_pattern (self.files, pattern, anchor=1)
      -                     if num == 0:
      -                         template.warn (
      -                             "no previously-included files found matching '%s'"%
      -                             pattern)
      - 
      -             elif action == 'global-include':
      -                 self.debug_print("global-include " + string.join(pattern_list))
      -                 for pattern in pattern_list:
      -                     files = self.select_pattern (all_files, pattern, anchor=0)
      -                     if not files:
      -                         template.warn (("no files found matching '%s' " +
      -                                         "anywhere in distribution") %
      -                                        pattern)
      -                     else:
      -                         self.files.extend (files)
      - 
      -             elif action == 'global-exclude':
      -                 self.debug_print("global-exclude " + string.join(pattern_list))
      -                 for pattern in pattern_list:
      -                     num = self.exclude_pattern (self.files, pattern, anchor=0)
      -                     if num == 0:
      -                         template.warn \
      -                             (("no previously-included files matching '%s' " +
      -                               "found anywhere in distribution") %
      -                              pattern)
      - 
      -             elif action == 'recursive-include':
      -                 self.debug_print("recursive-include %s %s" %
      -                                  (dir, string.join(pattern_list)))
      -                 for pattern in pattern_list:
      -                     files = self.select_pattern (
      -                         all_files, pattern, prefix=dir)
      -                     if not files:
      -                         template.warn (("no files found matching '%s' " +
      -                                         "under directory '%s'") %
      -                                        (pattern, dir))
      -                     else:
      -                         self.files.extend (files)
      - 
      -             elif action == 'recursive-exclude':
      -                 self.debug_print("recursive-exclude %s %s" %
      -                                  (dir, string.join(pattern_list)))
      -                 for pattern in pattern_list:
      -                     num = self.exclude_pattern(
      -                         self.files, pattern, prefix=dir)
      -                     if num == 0:
      -                         template.warn \
      -                             (("no previously-included files matching '%s' " +
      -                               "found under directory '%s'") %
      -                              (pattern, dir))
      - 
      -             elif action == 'graft':
      -                 self.debug_print("graft " + dir_pattern)
      -                 files = self.select_pattern(
      -                     all_files, None, prefix=dir_pattern)
      -                 if not files:
      -                     template.warn ("no directories found matching '%s'" %
      -                                    dir_pattern)
      -                 else:
      -                     self.files.extend (files)
      - 
      -             elif action == 'prune':
      -                 self.debug_print("prune " + dir_pattern)
      -                 num = self.exclude_pattern(
      -                     self.files, None, prefix=dir_pattern)
      -                 if num == 0:
      -                     template.warn \
      -                         (("no previously-included directories found " +
      -                           "matching '%s'") %
      -                          dir_pattern)
      -             else:
      -                 raise RuntimeError, \
      -                       "this cannot happen: invalid action '%s'" % action
      - 
      -         # while loop over lines of template file
      - 
            # read_template ()
        
      --- 338,353 ----
                                     collapse_ws=1)
        
      !         # if we give Template() a list, it modifies this list
      !         filelist = FileList(files=self.files,
      !                             warn=self.warn,
      !                             debug_print=self.debug_print)
        
                while 1:
                    line = template.readline()
                    if line is None:            # end of file
                        break
        
      !             filelist.process_template_line(line)
        
            # read_template ()
        
      ***************
      *** 517,581 ****
                build = self.get_finalized_command('build')
                base_dir = self.distribution.get_fullname()
      -         self.exclude_pattern (self.files, None, prefix=build.build_base)
      -         self.exclude_pattern (self.files, None, prefix=base_dir)
      -         self.exclude_pattern (self.files, r'/(RCS|CVS)/.*', is_regex=1)
      - 
      - 
      -     def select_pattern (self, files, pattern,
      -                         anchor=1, prefix=None, is_regex=0):
      -         """Select strings (presumably filenames) from 'files' that match
      -         'pattern', a Unix-style wildcard (glob) pattern.  Patterns are not
      -         quite the same as implemented by the 'fnmatch' module: '*' and '?'
      -         match non-special characters, where "special" is platform-dependent:
      -         slash on Unix, colon, slash, and backslash on DOS/Windows, and colon on
      -         Mac OS.
      - 
      -         If 'anchor' is true (the default), then the pattern match is more
      -         stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
      -         'anchor' is false, both of these will match.
      - 
      -         If 'prefix' is supplied, then only filenames starting with 'prefix'
      -         (itself a pattern) and ending with 'pattern', with anything in between
      -         them, will match.  'anchor' is ignored in this case.
      - 
      -         If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
      -         'pattern' is assumed to be either a string containing a regex or a
      -         regex object -- no translation is done, the regex is just compiled
      -         and used as-is.
      - 
      -         Return the list of matching strings, possibly empty.
      -         """
      -         matches = []
      -         pattern_re = translate_pattern (pattern, anchor, prefix, is_regex)
      -         self.debug_print("select_pattern: applying regex r'%s'" %
      -                          pattern_re.pattern)
      -         for name in files:
      -             if pattern_re.search (name):
      -                 matches.append (name)
      -                 self.debug_print(" adding " + name)
      - 
      -         return matches
      - 
      -     # select_pattern ()
      - 
      - 
      -     def exclude_pattern (self, files, pattern,
      -                          anchor=1, prefix=None, is_regex=0):
      -         """Remove strings (presumably filenames) from 'files' that match
      -         'pattern'.  Other parameters are the same as for
      -         'select_pattern()', above.  The list 'files' is modified in place.
      -         """
        
      !         pattern_re = translate_pattern (pattern, anchor, prefix, is_regex)
      !         self.debug_print("exclude_pattern: applying regex r'%s'" %
      !                          pattern_re.pattern)
      !         for i in range (len(files)-1, -1, -1):
      !             if pattern_re.search (files[i]):
      !                 self.debug_print(" removing " + files[i])
      !                 del files[i]
        
      -     # exclude_pattern ()
        
      - 
            def write_manifest (self):
                """Write the file list in 'self.files' (presumably as filled in by
      --- 363,376 ----
                build = self.get_finalized_command('build')
                base_dir = self.distribution.get_fullname()
        
      !         # if we give FileList a list, it modifies this list
      !         filelist = FileList(files=self.files,
      !                             warn=self.warn,
      !                             debug_print=self.debug_print)
      !         filelist.exclude_pattern(None, prefix=build.build_base)
      !         filelist.exclude_pattern(None, prefix=base_dir)
      !         filelist.exclude_pattern(r'/(RCS|CVS)/.*', is_regex=1)
        
        
            def write_manifest (self):
                """Write the file list in 'self.files' (presumably as filled in by
      ***************
      *** 677,763 ****
        
        # class sdist
      - 
      - 
      - # ----------------------------------------------------------------------
      - # Utility functions
      - 
      - def findall (dir = os.curdir):
      -     """Find all files under 'dir' and return the list of full filenames
      -     (relative to 'dir').
      -     """
      -     from stat import ST_MODE, S_ISREG, S_ISDIR, S_ISLNK
      - 
      -     list = []
      -     stack = [dir]
      -     pop = stack.pop
      -     push = stack.append
      - 
      -     while stack:
      -         dir = pop()
      -         names = os.listdir (dir)
      - 
      -         for name in names:
      -             if dir != os.curdir:        # avoid leading "./"
      -                 fullname = os.path.join (dir, name)
      -             else:
      -                 fullname = name
      - 
      -             # Avoid excess stat calls -- just one will do, thank you!
      -             stat = os.stat(fullname)
      -             mode = stat[ST_MODE]
      -             if S_ISREG(mode):
      -                 list.append (fullname)
      -             elif S_ISDIR(mode) and not S_ISLNK(mode):
      -                 push (fullname)
      - 
      -     return list
      - 
      - 
      - def glob_to_re (pattern):
      -     """Translate a shell-like glob pattern to a regular expression; return
      -     a string containing the regex.  Differs from 'fnmatch.translate()' in
      -     that '*' does not match "special characters" (which are
      -     platform-specific).
      -     """
      -     pattern_re = fnmatch.translate (pattern)
      - 
      -     # '?' and '*' in the glob pattern become '.' and '.*' in the RE, which
      -     # IMHO is wrong -- '?' and '*' aren't supposed to match slash in Unix,
      -     # and by extension they shouldn't match such "special characters" under
      -     # any OS.  So change all non-escaped dots in the RE to match any
      -     # character except the special characters.
      -     # XXX currently the "special characters" are just slash -- i.e. this is
      -     # Unix-only.
      -     pattern_re = re.sub (r'(^|[^\\])\.', r'\1[^/]', pattern_re)
      -     return pattern_re
      - 
      - # glob_to_re ()
      - 
      - 
      - def translate_pattern (pattern, anchor=1, prefix=None, is_regex=0):
      -     """Translate a shell-like wildcard pattern to a compiled regular
      -     expression.  Return the compiled regex.  If 'is_regex' true,
      -     then 'pattern' is directly compiled to a regex (if it's a string)
      -     or just returned as-is (assumes it's a regex object).
      -     """
      -     if is_regex:
      -         if type(pattern) is StringType:
      -             return re.compile(pattern)
      -         else:
      -             return pattern
      - 
      -     if pattern:
      -         pattern_re = glob_to_re (pattern)
      -     else:
      -         pattern_re = ''
      -         
      -     if prefix is not None:
      -         prefix_re = (glob_to_re (prefix))[0:-1] # ditch trailing $
      -         pattern_re = "^" + os.path.join (prefix_re, ".*" + pattern_re)
      -     else:                               # no prefix -- respect anchor flag
      -         if anchor:
      -             pattern_re = "^" + pattern_re
      -         
      -     return re.compile (pattern_re)
      - 
      - # translate_pattern ()
      --- 472,473 ----
      
      
      
      From python-dev@python.org  Sun Jul 30 02:30:34 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 18:30:34 -0700
      Subject: [Python-checkins] CVS: distutils/distutils/command sdist.py,1.39,1.40
      Message-ID: <200007300130.SAA26822@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils/command
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv26799
      
      Modified Files:
      	sdist.py 
      Log Message:
      Replaced 'self.files' with 'self.filelist': now we carry around a FileList
      instance instead of a list of filenames.  Simplifies the "sdist" command
      only a bit, but should allow greater simplification of FileList.
      
      Index: sdist.py
      ===================================================================
      RCS file: /cvsroot/python/distutils/distutils/command/sdist.py,v
      retrieving revision 1.39
      retrieving revision 1.40
      diff -C2 -r1.39 -r1.40
      *** sdist.py	2000/07/30 01:05:02	1.39
      --- sdist.py	2000/07/30 01:30:31	1.40
      ***************
      *** 129,134 ****
            def run (self):
        
      !         # 'files' is the list of files that will make up the manifest
      !         self.files = []
                
                # Ensure that all required meta-data is given; warn if not (but
      --- 129,135 ----
            def run (self):
        
      !         # 'filelist' contains the list of files that will make up the
      !         # manifest
      !         self.filelist = FileList()
                
                # Ensure that all required meta-data is given; warn if not (but
      ***************
      *** 138,142 ****
                # Do whatever it takes to get the list of files to process
                # (process the manifest template, read an existing manifest,
      !         # whatever).  File list is put into 'self.files'.
                self.get_file_list ()
        
      --- 139,143 ----
                # Do whatever it takes to get the list of files to process
                # (process the manifest template, read an existing manifest,
      !         # whatever).  File list is accumulated in 'self.filelist'.
                self.get_file_list ()
        
      ***************
      *** 185,189 ****
            def get_file_list (self):
                """Figure out the list of files to include in the source
      !         distribution, and put it in 'self.files'.  This might involve
                reading the manifest template (and writing the manifest), or just
                reading the manifest, or just using the default file set -- it all
      --- 186,190 ----
            def get_file_list (self):
                """Figure out the list of files to include in the source
      !         distribution, and put it in 'self.filelist'.  This might involve
                reading the manifest template (and writing the manifest), or just
                reading the manifest, or just using the default file set -- it all
      ***************
      *** 193,199 ****
                # If we have a manifest template, see if it's newer than the
                # manifest; if so, we'll regenerate the manifest.
      !         template_exists = os.path.isfile (self.template)
                if template_exists:
      !             template_newer = newer (self.template, self.manifest)
        
                # The contents of the manifest file almost certainly depend on the
      --- 194,200 ----
                # If we have a manifest template, see if it's newer than the
                # manifest; if so, we'll regenerate the manifest.
      !         template_exists = os.path.isfile(self.template)
                if template_exists:
      !             template_newer = newer(self.template, self.manifest)
        
                # The contents of the manifest file almost certainly depend on the
      ***************
      *** 223,237 ****
        
                    if not template_exists:
      !                 self.warn (("manifest template '%s' does not exist " +
      !                             "(using default file list)") %
      !                            self.template)
        
                    # Add default file set to 'files'
                    if self.use_defaults:
      !                 self.add_defaults ()
        
                    # Read manifest template if it exists
                    if template_exists:
      !                 self.read_template ()
        
                    # Prune away any directories that don't belong in the source
      --- 224,238 ----
        
                    if not template_exists:
      !                 self.warn(("manifest template '%s' does not exist " +
      !                            "(using default file list)") %
      !                           self.template)
        
                    # Add default file set to 'files'
                    if self.use_defaults:
      !                 self.add_defaults()
        
                    # Read manifest template if it exists
                    if template_exists:
      !                 self.read_template()
        
                    # Prune away any directories that don't belong in the source
      ***************
      *** 242,263 ****
                    # File list now complete -- sort it so that higher-level files
                    # come first
      !             sortable_files = map (os.path.split, self.files)
      !             sortable_files.sort ()
      !             self.files = []
      !             for sort_tuple in sortable_files:
      !                 self.files.append (apply (os.path.join, sort_tuple))
        
                    # Remove duplicates from the file list
      !             for i in range (len(self.files)-1, 0, -1):
      !                 if self.files[i] == self.files[i-1]:
      !                     del self.files[i]
        
                    # And write complete file list (including default file set) to
                    # the manifest.
      !             self.write_manifest ()
        
                # Don't regenerate the manifest, just read it in.
                else:
      !             self.read_manifest ()
        
            # get_file_list ()
      --- 243,258 ----
                    # File list now complete -- sort it so that higher-level files
                    # come first
      !             self.filelist.sort()
        
                    # Remove duplicates from the file list
      !             self.filelist.remove_duplicates()
        
                    # And write complete file list (including default file set) to
                    # the manifest.
      !             self.write_manifest()
        
                # Don't regenerate the manifest, just read it in.
                else:
      !             self.read_manifest()
        
            # get_file_list ()
      ***************
      *** 265,269 ****
        
            def add_defaults (self):
      !         """Add all the default files to self.files:
                  - README or README.txt
                  - setup.py
      --- 260,264 ----
        
            def add_defaults (self):
      !         """Add all the default files to self.filelist:
                  - README or README.txt
                  - setup.py
      ***************
      *** 287,291 ****
                            if os.path.exists (fn):
                                got_it = 1
      !                         self.files.append (fn)
                                break
        
      --- 282,286 ----
                            if os.path.exists (fn):
                                got_it = 1
      !                         self.filelist.append (fn)
                                break
        
      ***************
      *** 295,299 ****
                    else:
                        if os.path.exists (fn):
      !                     self.files.append (fn)
                        else:
                            self.warn ("standard file '%s' not found" % fn)
      --- 290,294 ----
                    else:
                        if os.path.exists (fn):
      !                     self.filelist.append (fn)
                        else:
                            self.warn ("standard file '%s' not found" % fn)
      ***************
      *** 303,319 ****
                    files = filter (os.path.isfile, glob (pattern))
                    if files:
      !                 self.files.extend (files)
        
                if self.distribution.has_pure_modules():
                    build_py = self.get_finalized_command ('build_py')
      !             self.files.extend (build_py.get_source_files ())
        
                if self.distribution.has_ext_modules():
                    build_ext = self.get_finalized_command ('build_ext')
      !             self.files.extend (build_ext.get_source_files ())
        
                if self.distribution.has_c_libraries():
                    build_clib = self.get_finalized_command ('build_clib')
      !             self.files.extend (build_clib.get_source_files ())
        
            # add_defaults ()
      --- 298,314 ----
                    files = filter (os.path.isfile, glob (pattern))
                    if files:
      !                 self.filelist.extend (files)
        
                if self.distribution.has_pure_modules():
                    build_py = self.get_finalized_command ('build_py')
      !             self.filelist.extend (build_py.get_source_files ())
        
                if self.distribution.has_ext_modules():
                    build_ext = self.get_finalized_command ('build_ext')
      !             self.filelist.extend (build_ext.get_source_files ())
        
                if self.distribution.has_c_libraries():
                    build_clib = self.get_finalized_command ('build_clib')
      !             self.filelist.extend (build_clib.get_source_files ())
        
            # add_defaults ()
      ***************
      *** 321,333 ****
        
            def read_template (self):
                """Read and parse the manifest template file named by
      !         'self.template' (usually "MANIFEST.in").  Process all file
      !         specifications (include and exclude) in the manifest template and
      !         update 'self.files' accordingly (filenames may be added to
      !         or removed from 'self.files' based on the manifest template).
                """
      -         assert self.files is not None and type (self.files) is ListType
                self.announce("reading manifest template '%s'" % self.template)
      - 
                template = TextFile (self.template,
                                     strip_comments=1,
      --- 316,326 ----
        
            def read_template (self):
      + 
                """Read and parse the manifest template file named by
      !         'self.template' (usually "MANIFEST.in").  The parsing and
      !         processing is done by 'self.filelist', which updates itself
      !         accordingly.
                """
                self.announce("reading manifest template '%s'" % self.template)
                template = TextFile (self.template,
                                     strip_comments=1,
      ***************
      *** 338,346 ****
                                     collapse_ws=1)
        
      -         # if we give Template() a list, it modifies this list
      -         filelist = FileList(files=self.files,
      -                             warn=self.warn,
      -                             debug_print=self.debug_print)
      - 
                while 1:
                    line = template.readline()
      --- 331,334 ----
      ***************
      *** 348,352 ****
                        break
        
      !             filelist.process_template_line(line)
        
            # read_template ()
      --- 336,340 ----
                        break
        
      !             self.filelist.process_template_line(line)
        
            # read_template ()
      ***************
      *** 364,383 ****
                base_dir = self.distribution.get_fullname()
        
      !         # if we give FileList a list, it modifies this list
      !         filelist = FileList(files=self.files,
      !                             warn=self.warn,
      !                             debug_print=self.debug_print)
      !         filelist.exclude_pattern(None, prefix=build.build_base)
      !         filelist.exclude_pattern(None, prefix=base_dir)
      !         filelist.exclude_pattern(r'/(RCS|CVS)/.*', is_regex=1)
        
        
            def write_manifest (self):
      !         """Write the file list in 'self.files' (presumably as filled in by
      !         'add_defaults()' and 'read_template()') to the manifest file named
      !         by 'self.manifest'.
                """
                self.execute(write_file,
      !                      (self.manifest, self.files),
                             "writing manifest file '%s'" % self.manifest)
        
      --- 352,367 ----
                base_dir = self.distribution.get_fullname()
        
      !         self.filelist.exclude_pattern(None, prefix=build.build_base)
      !         self.filelist.exclude_pattern(None, prefix=base_dir)
      !         self.filelist.exclude_pattern(r'/(RCS|CVS)/.*', is_regex=1)
        
        
            def write_manifest (self):
      !         """Write the file list in 'self.filelist' (presumably as filled in
      !         by 'add_defaults()' and 'read_template()') to the manifest file
      !         named by 'self.manifest'.
                """
                self.execute(write_file,
      !                      (self.manifest, self.filelist.files),
                             "writing manifest file '%s'" % self.manifest)
        
      ***************
      *** 387,391 ****
            def read_manifest (self):
                """Read the manifest file (named by 'self.manifest') and use it to
      !         fill in 'self.files', the list of files to include in the source
                distribution.
                """
      --- 371,375 ----
            def read_manifest (self):
                """Read the manifest file (named by 'self.manifest') and use it to
      !         fill in 'self.filelist', the list of files to include in the source
                distribution.
                """
      ***************
      *** 398,402 ****
                    if line[-1] == '\n':
                        line = line[0:-1]
      !             self.files.append (line)
        
            # read_manifest ()
      --- 382,386 ----
                    if line[-1] == '\n':
                        line = line[0:-1]
      !             self.filelist.append (line)
        
            # read_manifest ()
      ***************
      *** 452,456 ****
                base_name = os.path.join(self.dist_dir, base_dir)
        
      !         self.make_release_tree (base_dir, self.files)
                archive_files = []              # remember names of files we create
                if self.dist_dir:
      --- 436,440 ----
                base_name = os.path.join(self.dist_dir, base_dir)
        
      !         self.make_release_tree (base_dir, self.filelist.files)
                archive_files = []              # remember names of files we create
                if self.dist_dir:
      
      
      
      From python-dev@python.org  Sun Jul 30 02:45:45 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 18:45:45 -0700
      Subject: [Python-checkins] CVS: distutils/distutils filelist.py,1.6,1.7
      Message-ID: <200007300145.SAA27720@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv27616
      
      Modified Files:
      	filelist.py 
      Log Message:
      Added list-like methods: 'append()', 'extend()', 'sort()'.
      Added 'remove_duplicates()'.
      Simplified constructor: no longer take 'files' or 'allfiles' as args,
        and no longer have 'dir' attribute at all.
      Added 'set_allfiles()' and 'findall()' so the client does have a
        way to set the list of all files.
      Changed 'include_pattern()' to use the 'findall()' method instead of
        the external function.  (Of course, the method is just a trivial
        wrapper around the function.)
      
      
      Index: filelist.py
      ===================================================================
      RCS file: /cvsroot/python/distutils/distutils/filelist.py,v
      retrieving revision 1.6
      retrieving revision 1.7
      diff -C2 -r1.6 -r1.7
      *** filelist.py	2000/07/30 01:04:22	1.6
      --- filelist.py	2000/07/30 01:45:42	1.7
      ***************
      *** 36,57 ****
        
            def __init__(self, 
      -                  files=[], 
      -                  dir=os.curdir, 
      -                  allfiles=None, 
                         warn=None, 
                         debug_print=None):
      !         # use standard warning and debug functions, if no other given
      !         if warn is None: warn = self.__warn 
      !         if debug_print is None: debug_print = self.__debug_print
      !         self.warn = warn
      !         self.debug_print = debug_print
      !         self.files = files
      !         self.dir = dir
        
      !         # if None, 'allfiles' will be filled when used for first time
      !         self.allfiles = allfiles 
        
        
      !     # standard warning and debug functions, if no other given
            def __warn (self, msg):
                sys.stderr.write ("warning: %s\n" % msg)
      --- 36,58 ----
        
            def __init__(self, 
                         warn=None, 
                         debug_print=None):
      !         # use standard warning and debug functions if no other given
      !         self.warn = warn or self.__warn
      !         self.debug_print = debug_print or self.__debug_print
        
      !         self.allfiles = None
      !         self.files = []
        
        
      !     def set_allfiles (self, allfiles):
      !         self.allfiles = allfiles
      ! 
      !     def findall (self, dir=os.curdir):
      !         self.allfiles = findall(dir)
      ! 
      ! 
      !     # -- Fallback warning/debug functions ------------------------------
      !     
            def __warn (self, msg):
                sys.stderr.write ("warning: %s\n" % msg)
      ***************
      *** 65,68 ****
      --- 66,97 ----
                    print msg
        
      + 
      +     # -- List-like methods ---------------------------------------------
      + 
      +     def append (self, item):
      +         self.files.append(item)
      + 
      +     def extend (self, items):
      +         self.files.extend(items)
      + 
      +     def sort (self):
      +         # Not a strict lexical sort!
      +         sortable_files = map(os.path.split, self.files)
      +         sortable_files.sort()
      +         self.files = []
      +         for sort_tuple in sortable_files:
      +             self.files.append(apply(os.path.join, sort_tuple))
      + 
      + 
      +     # -- Other miscellaneous utility methods ---------------------------
      + 
      +     def remove_duplicates (self):
      +         # Assumes list has been sorted!
      +         for i in range (len(self.files)-1, 0, -1):
      +             if self.files[i] == self.files[i-1]:
      +                 del self.files[i]
      + 
      + 
      +     # -- "File template" methods ---------------------------------------
            
            def _parse_template_line (self, line):
      ***************
      *** 181,184 ****
      --- 210,215 ----
        
        
      +     # -- Filtering/selection methods -----------------------------------
      + 
            def include_pattern (self, pattern,
                                anchor=1, prefix=None, is_regex=0):
      ***************
      *** 214,218 ****
        
                # delayed loading of allfiles list
      !         if self.allfiles is None: self.allfiles = findall (self.dir)
        
                for name in self.allfiles:
      --- 245,250 ----
        
                # delayed loading of allfiles list
      !         if self.allfiles is None:
      !             self.findall()
        
                for name in self.allfiles:
      
      
      
      From python-dev@python.org  Sun Jul 30 02:47:19 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 18:47:19 -0700
      Subject: [Python-checkins] CVS: distutils/distutils/command sdist.py,1.40,1.41
      Message-ID: <200007300147.SAA27817@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils/command
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv27807/command
      
      Modified Files:
      	sdist.py 
      Log Message:
      Catch syntax errors from processing template lines and turn them into
        mere warnings.
      Call 'findall()' on our FileList object before we start using it seriously.
      
      Index: sdist.py
      ===================================================================
      RCS file: /cvsroot/python/distutils/distutils/command/sdist.py,v
      retrieving revision 1.40
      retrieving revision 1.41
      diff -C2 -r1.40 -r1.41
      *** sdist.py	2000/07/30 01:30:31	1.40
      --- sdist.py	2000/07/30 01:47:16	1.41
      ***************
      *** 15,19 ****
             check_archive_formats
        from distutils.text_file import TextFile
      ! from distutils.errors import DistutilsExecError, DistutilsOptionError
        from distutils.filelist import FileList
        
      --- 15,19 ----
             check_archive_formats
        from distutils.text_file import TextFile
      ! from distutils.errors import *
        from distutils.filelist import FileList
        
      ***************
      *** 228,231 ****
      --- 228,233 ----
                                  self.template)
        
      +             self.filelist.findall()
      + 
                    # Add default file set to 'files'
                    if self.use_defaults:
      ***************
      *** 336,340 ****
                        break
        
      !             self.filelist.process_template_line(line)
        
            # read_template ()
      --- 338,347 ----
                        break
        
      !             try:
      !                 self.filelist.process_template_line(line)
      !             except DistutilsTemplateError, msg:
      !                 self.warn("%s, line %d: %s" % (template.filename,
      !                                                template.current_line,
      !                                                msg))
        
            # read_template ()
      
      
      
      From python-dev@python.org  Sun Jul 30 03:20:40 2000
      From: python-dev@python.org (Mark Hammond)
      Date: Sat, 29 Jul 2000 19:20:40 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_mmap.py,1.7,1.8
      Message-ID: <200007300220.TAA04467@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Lib/test
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv4458
      
      Modified Files:
      	test_mmap.py 
      Log Message:
      Test that after resizing the mmap'd file, we can't seek beyond the new size.
      
      Index: test_mmap.py
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Lib/test/test_mmap.py,v
      retrieving revision 1.7
      retrieving revision 1.8
      diff -C2 -r1.7 -r1.8
      *** test_mmap.py	2000/07/11 11:24:41	1.7
      --- test_mmap.py	2000/07/30 02:20:38	1.8
      ***************
      *** 106,110 ****
            else:
                # resize() is supported
      !         pass
            
            m.close()
      --- 106,117 ----
            else:
                # resize() is supported
      ! 	assert len(m) == 512, "len(m) is %d, but expecting 512" % (len(m),)
      ! 	# Check that we can no longer seek beyond the new size.
      ! 	try:
      ! 		m.seek(513,0)
      ! 	except ValueError:
      ! 		pass
      ! 	else:
      ! 	        assert 0, 'Could seek beyond the new size'
            
            m.close()
      
      
      
      From python-dev@python.org  Sun Jul 30 03:22:46 2000
      From: python-dev@python.org (Mark Hammond)
      Date: Sat, 29 Jul 2000 19:22:46 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.20,2.21
      Message-ID: <200007300222.TAA04516@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Modules
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv4507
      
      Modified Files:
      	mmapmodule.c 
      Log Message:
      Fixes for Windows (but also tested on Linux).  Test suite now completes, and this module should not leak in the face of errors.
      
      Checkin that replaces the INT_PTR types with HANDLEs still TBD (but as that is a "spelling" patch, rather than a functional one, I will commit it seperately.
      
      Index: mmapmodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v
      retrieving revision 2.20
      retrieving revision 2.21
      diff -C2 -r2.20 -r2.21
      *** mmapmodule.c	2000/07/16 12:04:31	2.20
      --- mmapmodule.c	2000/07/30 02:22:43	2.21
      ***************
      *** 62,68 ****
        {
        #ifdef MS_WIN32
      ! 	UnmapViewOfFile (m_obj->data);
      ! 	CloseHandle (m_obj->map_handle);
      ! 	CloseHandle ((HANDLE)m_obj->file_handle);
        #endif /* MS_WIN32 */
        
      --- 62,73 ----
        {
        #ifdef MS_WIN32
      ! 	if (m_obj->data != NULL)
      ! 		UnmapViewOfFile (m_obj->data);
      ! 	if (m_obj->map_handle != INVALID_HANDLE_VALUE)
      ! 		CloseHandle (m_obj->map_handle);
      ! 	if ((HANDLE)m_obj->file_handle != INVALID_HANDLE_VALUE)
      ! 		CloseHandle ((HANDLE)m_obj->file_handle);
      ! 	if (m_obj->tagname)
      ! 		PyMem_Free(m_obj->tagname);
        #endif /* MS_WIN32 */
        
      ***************
      *** 827,833 ****
        
        	m_obj = PyObject_New (mmap_object, &mmap_object_type);
      !     
        	if (fh) {
      ! 		m_obj->file_handle = fh;
        		if (!map_size) {
        			m_obj->size = GetFileSize ((HANDLE)fh, NULL);
      --- 832,860 ----
        
        	m_obj = PyObject_New (mmap_object, &mmap_object_type);
      ! 	if (m_obj==NULL)
      ! 		return NULL;
      ! 	/* Set every field to an invalid marker, so we can safely
      ! 	   destruct the object in the face of failure */
      ! 	m_obj->data = NULL;
      ! 	m_obj->file_handle = (INT_PTR)INVALID_HANDLE_VALUE;
      ! 	m_obj->map_handle = INVALID_HANDLE_VALUE;
      ! 	m_obj->tagname = NULL;
      ! 
        	if (fh) {
      ! 		/* It is necessary to duplicate the handle, so the
      ! 		   Python code can close it on us */
      ! 		if (!DuplicateHandle(
      ! 			    GetCurrentProcess(), /* source process handle */
      ! 			    (HANDLE)fh, /* handle to be duplicated */
      ! 			    GetCurrentProcess(), /* target proc handle */
      ! 			    (LPHANDLE)&m_obj->file_handle, /* result */
      ! 			    0, /* access - ignored due to options value */
      ! 			    FALSE, /* inherited by child processes? */
      ! 			    DUPLICATE_SAME_ACCESS)) { /* options */
      ! 			dwErr = GetLastError();
      ! 			Py_DECREF(m_obj);
      ! 			PyErr_SetFromWindowsErr(dwErr);
      ! 			return NULL;
      ! 		}
        		if (!map_size) {
        			m_obj->size = GetFileSize ((HANDLE)fh, NULL);
      ***************
      *** 837,841 ****
        	}
        	else {
      - 		m_obj->file_handle = (INT_PTR) -1;
        		m_obj->size = map_size;
        	}
      --- 864,867 ----
      ***************
      *** 844,847 ****
      --- 870,886 ----
        	m_obj->pos = (size_t) 0;
        
      + 	/* set the tag name */
      + 	if (tagname != NULL) {
      + 		m_obj->tagname = PyMem_Malloc(strlen(tagname)+1);
      + 		if (m_obj->tagname == NULL) {
      + 			PyErr_NoMemory();
      + 			Py_DECREF(m_obj);
      + 			return NULL;
      + 		}
      + 		strcpy(m_obj->tagname, tagname);
      + 	}
      + 	else
      + 		m_obj->tagname = NULL;
      + 
        	m_obj->map_handle = CreateFileMapping ((HANDLE) m_obj->file_handle,
        					       NULL,
      ***************
      *** 864,867 ****
      --- 903,907 ----
        		dwErr = GetLastError();
        	}
      + 	Py_DECREF(m_obj);
        	PyErr_SetFromWindowsErr(dwErr);
        	return (NULL);
      
      
      
      From python-dev@python.org  Sun Jul 30 03:46:29 2000
      From: python-dev@python.org (Mark Hammond)
      Date: Sat, 29 Jul 2000 19:46:29 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.21,2.22
      Message-ID: <200007300246.TAA05870@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Modules
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv5859
      
      Modified Files:
      	mmapmodule.c 
      Log Message:
      More Windows changes.
      
      * After discussion with Trent, all INT_PTR references have been removed in favour of the HANDLE it should always have been.  Trent can see no 64bit issues here.
      
      * In this process, I noticed that the close operation was dangerous, in that we could end up passing bogus results to the Win32 API.  These result of the API functions passed the bogus values were never (and still are not) checked, but this is closer to "the right thing" (tm) than before.
      
      Tested on Windows and Linux.
      
      Index: mmapmodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v
      retrieving revision 2.21
      retrieving revision 2.22
      diff -C2 -r2.21 -r2.22
      *** mmapmodule.c	2000/07/30 02:22:43	2.21
      --- mmapmodule.c	2000/07/30 02:46:26	2.22
      ***************
      *** 13,17 ****
         /   sizes.
         /
      !  / The latest version of mmapfile is maintained by Sam at
         / ftp://squirl.nightmare.com/pub/python/python-ext.
        */
      --- 13,19 ----
         /   sizes.
         /
      !  / This version of mmapmodule.c has been changed significantly
      !  / from the original mmapfile.c on which it was based.
      !  / The original version of mmapfile is maintained by Sam at
         / ftp://squirl.nightmare.com/pub/python/python-ext.
        */
      ***************
      *** 25,32 ****
        #ifdef MS_WIN32
        #include 
      - #if _MSC_VER < 1200
      - #define INT_PTR unsigned long
        #endif
      - #endif
        
        #ifdef UNIX
      --- 27,31 ----
      ***************
      *** 49,53 ****
        #ifdef MS_WIN32
        	HANDLE	map_handle;
      ! 	INT_PTR	file_handle;
        	char *	tagname;
        #endif
      --- 48,52 ----
        #ifdef MS_WIN32
        	HANDLE	map_handle;
      ! 	HANDLE	file_handle;
        	char *	tagname;
        #endif
      ***************
      *** 66,71 ****
        	if (m_obj->map_handle != INVALID_HANDLE_VALUE)
        		CloseHandle (m_obj->map_handle);
      ! 	if ((HANDLE)m_obj->file_handle != INVALID_HANDLE_VALUE)
      ! 		CloseHandle ((HANDLE)m_obj->file_handle);
        	if (m_obj->tagname)
        		PyMem_Free(m_obj->tagname);
      --- 65,70 ----
        	if (m_obj->map_handle != INVALID_HANDLE_VALUE)
        		CloseHandle (m_obj->map_handle);
      ! 	if (m_obj->file_handle != INVALID_HANDLE_VALUE)
      ! 		CloseHandle (m_obj->file_handle);
        	if (m_obj->tagname)
        		PyMem_Free(m_obj->tagname);
      ***************
      *** 88,95 ****
        		return NULL;
        #ifdef MS_WIN32
      ! 	UnmapViewOfFile (self->data);
      ! 	CloseHandle (self->map_handle);
      ! 	CloseHandle ((HANDLE)self->file_handle);
      ! 	self->map_handle = (HANDLE) NULL;
        #endif /* MS_WIN32 */
        
      --- 87,109 ----
        		return NULL;
        #ifdef MS_WIN32
      ! 	/* For each resource we maintain, we need to check
      ! 	   the value is valid, and if so, free the resource 
      ! 	   and set the member value to an invalid value so
      ! 	   the dealloc does not attempt to resource clearing
      ! 	   again.
      ! 	   TODO - should we check for errors in the close operations???
      ! 	*/
      ! 	if (self->data != NULL) {
      ! 		UnmapViewOfFile (self->data);
      ! 		self->data = NULL;
      ! 	}
      ! 	if (self->map_handle != INVALID_HANDLE_VALUE) {
      ! 		CloseHandle (self->map_handle);
      ! 		self->map_handle = INVALID_HANDLE_VALUE;
      ! 	}
      ! 	if (self->file_handle != INVALID_HANDLE_VALUE) {
      ! 		CloseHandle (self->file_handle);
      ! 		self->file_handle = INVALID_HANDLE_VALUE;
      ! 	}
        #endif /* MS_WIN32 */
        
      ***************
      *** 264,271 ****
        
        #ifdef MS_WIN32
      ! 	if (self->file_handle != (INT_PTR) -1) {
        		return (Py_BuildValue (
        			"l", (long)
      ! 			GetFileSize ((HANDLE)self->file_handle, NULL)));
        	} else {
        		return (Py_BuildValue ("l", (long) self->size) );
      --- 278,285 ----
        
        #ifdef MS_WIN32
      ! 	if (self->file_handle != INVALID_HANDLE_VALUE) {
        		return (Py_BuildValue (
        			"l", (long)
      ! 			GetFileSize (self->file_handle, NULL)));
        	} else {
        		return (Py_BuildValue ("l", (long) self->size) );
      ***************
      *** 308,320 ****
        		UnmapViewOfFile (self->data);
        		/* Close the mapping object */
      ! 		CloseHandle ((HANDLE)self->map_handle);
        		/* Move to the desired EOF position */
      ! 		SetFilePointer ((HANDLE)self->file_handle,
        				new_size, NULL, FILE_BEGIN);
        		/* Change the size of the file */
      ! 		SetEndOfFile ((HANDLE)self->file_handle);
        		/* Create another mapping object and remap the file view */
        		self->map_handle = CreateFileMapping (
      ! 			(HANDLE) self->file_handle,
        			NULL,
        			PAGE_READWRITE,
      --- 322,334 ----
        		UnmapViewOfFile (self->data);
        		/* Close the mapping object */
      ! 		CloseHandle (self->map_handle);
        		/* Move to the desired EOF position */
      ! 		SetFilePointer (self->file_handle,
        				new_size, NULL, FILE_BEGIN);
        		/* Change the size of the file */
      ! 		SetEndOfFile (self->file_handle);
        		/* Create another mapping object and remap the file view */
        		self->map_handle = CreateFileMapping (
      ! 			self->file_handle,
        			NULL,
        			PAGE_READWRITE,
      ***************
      *** 803,807 ****
        	DWORD dwErr = 0;
        	int fileno;
      ! 	INT_PTR fh = 0;
        
        	/* Patch the object type */
      --- 817,821 ----
        	DWORD dwErr = 0;
        	int fileno;
      ! 	HANDLE fh = 0;
        
        	/* Patch the object type */
      ***************
      *** 822,827 ****
        	/* if an actual filename has been specified */
        	if (fileno != 0) {
      ! 		fh = _get_osfhandle(fileno);
      ! 		if (fh==-1) {
        		    PyErr_SetFromErrno(mmap_module_error);
        		    return NULL;
      --- 836,841 ----
        	/* if an actual filename has been specified */
        	if (fileno != 0) {
      ! 		fh = (HANDLE)_get_osfhandle(fileno);
      ! 		if (fh==(HANDLE)-1) {
        		    PyErr_SetFromErrno(mmap_module_error);
        		    return NULL;
      ***************
      *** 837,841 ****
        	   destruct the object in the face of failure */
        	m_obj->data = NULL;
      ! 	m_obj->file_handle = (INT_PTR)INVALID_HANDLE_VALUE;
        	m_obj->map_handle = INVALID_HANDLE_VALUE;
        	m_obj->tagname = NULL;
      --- 851,855 ----
        	   destruct the object in the face of failure */
        	m_obj->data = NULL;
      ! 	m_obj->file_handle = INVALID_HANDLE_VALUE;
        	m_obj->map_handle = INVALID_HANDLE_VALUE;
        	m_obj->tagname = NULL;
      ***************
      *** 846,850 ****
        		if (!DuplicateHandle(
        			    GetCurrentProcess(), /* source process handle */
      ! 			    (HANDLE)fh, /* handle to be duplicated */
        			    GetCurrentProcess(), /* target proc handle */
        			    (LPHANDLE)&m_obj->file_handle, /* result */
      --- 860,864 ----
        		if (!DuplicateHandle(
        			    GetCurrentProcess(), /* source process handle */
      ! 			    fh, /* handle to be duplicated */
        			    GetCurrentProcess(), /* target proc handle */
        			    (LPHANDLE)&m_obj->file_handle, /* result */
      ***************
      *** 858,862 ****
        		}
        		if (!map_size) {
      ! 			m_obj->size = GetFileSize ((HANDLE)fh, NULL);
        		} else {
        			m_obj->size = map_size;
      --- 872,876 ----
        		}
        		if (!map_size) {
      ! 			m_obj->size = GetFileSize (fh, NULL);
        		} else {
        			m_obj->size = map_size;
      ***************
      *** 883,887 ****
        		m_obj->tagname = NULL;
        
      ! 	m_obj->map_handle = CreateFileMapping ((HANDLE) m_obj->file_handle,
        					       NULL,
        					       PAGE_READWRITE,
      --- 897,901 ----
        		m_obj->tagname = NULL;
        
      ! 	m_obj->map_handle = CreateFileMapping (m_obj->file_handle,
        					       NULL,
        					       PAGE_READWRITE,
      
      
      
      From python-dev@python.org  Sun Jul 30 16:38:39 2000
      From: python-dev@python.org (Thomas Wouters)
      Date: Sun, 30 Jul 2000 08:38:39 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_mmap.py,1.8,1.9
      Message-ID: <200007301538.IAA22518@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Lib/test
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv22380/Lib/test
      
      Modified Files:
      	test_mmap.py 
      Log Message:
      
      Fix inconsistent use of tab/space in indentation.
      
      
      
      Index: test_mmap.py
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Lib/test/test_mmap.py,v
      retrieving revision 1.8
      retrieving revision 1.9
      diff -C2 -r1.8 -r1.9
      *** test_mmap.py	2000/07/30 02:20:38	1.8
      --- test_mmap.py	2000/07/30 15:38:35	1.9
      ***************
      *** 106,117 ****
            else:
                # resize() is supported
      ! 	assert len(m) == 512, "len(m) is %d, but expecting 512" % (len(m),)
      ! 	# Check that we can no longer seek beyond the new size.
      ! 	try:
      ! 		m.seek(513,0)
      ! 	except ValueError:
      ! 		pass
      ! 	else:
      ! 	        assert 0, 'Could seek beyond the new size'
            
            m.close()
      --- 106,117 ----
            else:
                # resize() is supported
      !         assert len(m) == 512, "len(m) is %d, but expecting 512" % (len(m),)
      !         # Check that we can no longer seek beyond the new size.
      !         try:
      !             m.seek(513,0)
      !         except ValueError:
      !             pass
      !         else:
      !             assert 0, 'Could seek beyond the new size'
            
            m.close()
      
      
      
      From python-dev@python.org  Mon Jul 31 15:31:30 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Mon, 31 Jul 2000 07:31:30 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Doc/texinputs boilerplate.tex,1.41,1.42
      Message-ID: <200007311431.HAA28434@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Doc/texinputs
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv28425/texinputs
      
      Modified Files:
      	boilerplate.tex 
      Log Message:
      
      Update, 'cause Guido said it should be this way.
      
      
      Index: boilerplate.tex
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/boilerplate.tex,v
      retrieving revision 1.41
      retrieving revision 1.42
      diff -C2 -r1.41 -r1.42
      *** boilerplate.tex	2000/06/30 15:35:16	1.41
      --- boilerplate.tex	2000/07/31 14:31:28	1.42
      ***************
      *** 1,9 ****
      ! \author{Guido van Rossum}
      ! 
        \authoraddress{
        	BeOpen PythonLabs \\
      ! 	E-mail: \email{guido@python.org}
        }
        
      ! \date{July 1, 2000}			% XXX update before release!
        \release{2.0b1}
      --- 1,9 ----
      ! \author{Guido van Rossum \\
      ! 	Fred L. Drake, Jr., editor}
        \authoraddress{
        	BeOpen PythonLabs \\
      ! 	E-mail: \email{python-docs@python.org}
        }
        
      ! \date{\today}			% XXX update before release!
        \release{2.0b1}
      
      
      
      From python-dev@python.org  Mon Jul 31 16:05:22 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Mon, 31 Jul 2000 08:05:22 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0216.txt,NONE,1.1
      Message-ID: <200007311505.IAA03387@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv3329
      
      Added Files:
      	pep-0216.txt 
      Log Message:
      PEP 216, Docstring Format, assigned to Moshe Zadka
      
      
      ***** Error reading new file(2, 'No such file or directory')
      
      
      From python-dev@python.org  Mon Jul 31 16:06:49 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Mon, 31 Jul 2000 08:06:49 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.14,1.15
      Message-ID: <200007311506.IAA06026@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv6017
      
      Modified Files:
      	pep-0000.txt 
      Log Message:
      Added PEP 216, Docstring Format, assigned to Moshe Zadka
      
      
      Index: pep-0000.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v
      retrieving revision 1.14
      retrieving revision 1.15
      diff -C2 -r1.14 -r1.15
      *** pep-0000.txt	2000/07/28 05:49:32	1.14
      --- pep-0000.txt	2000/07/31 15:06:47	1.15
      ***************
      *** 5,9 ****
        Status: Active
        
      - 
        Introduction
        
      --- 5,8 ----
      ***************
      *** 12,15 ****
      --- 11,15 ----
            once assigned are never changed.
        
      + 
        Index
        
      ***************
      *** 37,40 ****
      --- 37,41 ----
             214  pep-0214.txt  Extended Print Statement             bwarsaw
             215  pep-0215.txt  String Interpolation                 ping
      +      216  pep-0216.txt  Docstring Format                     moshez
        
        
      
      
      
      From python-dev@python.org  Mon Jul 31 16:11:03 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Mon, 31 Jul 2000 08:11:03 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Doc/texinputs boilerplate.tex,1.42,1.42.2.1
      Message-ID: <200007311511.IAA06480@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Doc/texinputs
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv6467/texinputs
      
      Modified Files:
            Tag: cnri-16-start
      	boilerplate.tex 
      Log Message:
      
      Update for 1.6b1 release (on 1.6 branch only!).
      
      
      Index: boilerplate.tex
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/boilerplate.tex,v
      retrieving revision 1.42
      retrieving revision 1.42.2.1
      diff -C2 -r1.42 -r1.42.2.1
      *** boilerplate.tex	2000/07/31 14:31:28	1.42
      --- boilerplate.tex	2000/07/31 15:11:01	1.42.2.1
      ***************
      *** 6,9 ****
        }
        
      ! \date{\today}			% XXX update before release!
      ! \release{2.0b1}
      --- 6,9 ----
        }
        
      ! \date{August 1, 2000}			% XXX update before release!
      ! \release{1.6b1}
      
      
      
      From python-dev@python.org  Mon Jul 31 16:28:06 2000
      From: python-dev@python.org (Peter Schneider-Kamp)
      Date: Mon, 31 Jul 2000 08:28:06 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Include Python.h,2.24,2.25 mymalloc.h,2.24,2.25 mymath.h,2.11,2.12 myselect.h,2.12,2.13 mytime.h,2.6,2.7 objimpl.h,2.23,2.24 pgenheaders.h,2.21,2.22 pyport.h,2.7,2.8
      Message-ID: <200007311528.IAA14497@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Include
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv14376/Include
      
      Modified Files:
      	Python.h mymalloc.h mymath.h myselect.h mytime.h objimpl.h 
      	pgenheaders.h pyport.h 
      Log Message:
      
      merge Include/my*.h into Include/pyport.h
      
      marked my*.h as obsolete
      
      
      
      Index: Python.h
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v
      retrieving revision 2.24
      retrieving revision 2.25
      diff -C2 -r2.24 -r2.25
      *** Python.h	2000/07/23 19:28:34	2.24
      --- Python.h	2000/07/31 15:28:03	2.25
      ***************
      *** 55,60 ****
        #include "pyport.h"
        
      - #include "myproto.h"
      - 
        #include "object.h"
        #include "objimpl.h"
      --- 55,58 ----
      ***************
      *** 86,90 ****
        #include "codecs.h"
        #include "pyerrors.h"
      - #include "mymalloc.h"
        
        #include "pystate.h"
      --- 84,87 ----
      
      Index: mymalloc.h
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Include/mymalloc.h,v
      retrieving revision 2.24
      retrieving revision 2.25
      diff -C2 -r2.24 -r2.25
      *** mymalloc.h	2000/07/25 12:56:37	2.24
      --- mymalloc.h	2000/07/31 15:28:03	2.25
      ***************
      *** 11,14 ****
      --- 11,19 ----
        ******************************************************************/
        
      + /***************************************
      + THIS FILE IS OBSOLETE
      + USE "pyport.h" INSTEAD
      + ***************************************/
      + 
        /* Lowest-level memory allocation interface */
        
      
      Index: mymath.h
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Include/mymath.h,v
      retrieving revision 2.11
      retrieving revision 2.12
      diff -C2 -r2.11 -r2.12
      *** mymath.h	2000/07/12 17:21:41	2.11
      --- mymath.h	2000/07/31 15:28:03	2.12
      ***************
      *** 1,2 ****
      --- 1,7 ----
      + /***************************************
      + THIS FILE IS OBSOLETE
      + USE "pyport.h" INSTEAD
      + ***************************************/
      + 
        /* On the 68K Mac, when using CFM (Code Fragment Manager),
            requires special treatment -- we need to surround it with
      
      Index: myselect.h
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Include/myselect.h,v
      retrieving revision 2.12
      retrieving revision 2.13
      diff -C2 -r2.12 -r2.13
      *** myselect.h	2000/06/30 23:58:04	2.12
      --- myselect.h	2000/07/31 15:28:03	2.13
      ***************
      *** 15,18 ****
      --- 15,23 ----
        ******************************************************************/
        
      + /***************************************
      + THIS FILE IS OBSOLETE
      + USE "pyport.h" INSTEAD
      + ***************************************/
      + 
        /* Include file for users of select() */
        
      
      Index: mytime.h
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Include/mytime.h,v
      retrieving revision 2.6
      retrieving revision 2.7
      diff -C2 -r2.6 -r2.7
      *** mytime.h	2000/06/30 23:58:04	2.6
      --- mytime.h	2000/07/31 15:28:03	2.7
      ***************
      *** 15,18 ****
      --- 15,23 ----
        ******************************************************************/
        
      + /***************************************
      + THIS FILE IS OBSOLETE
      + USE "pyport.h" INSTEAD
      + ***************************************/
      + 
        /* Include file instead of  and/or  */
        
      
      Index: objimpl.h
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Include/objimpl.h,v
      retrieving revision 2.23
      retrieving revision 2.24
      diff -C2 -r2.23 -r2.24
      *** objimpl.h	2000/07/25 12:56:37	2.23
      --- objimpl.h	2000/07/31 15:28:03	2.24
      ***************
      *** 15,19 ****
        #endif
        
      ! #include "mymalloc.h"
        
        /*
      --- 15,19 ----
        #endif
        
      ! #include "pyport.h"
        
        /*
      
      Index: pgenheaders.h
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Include/pgenheaders.h,v
      retrieving revision 2.21
      retrieving revision 2.22
      diff -C2 -r2.21 -r2.22
      *** pgenheaders.h	2000/07/22 23:30:03	2.21
      --- pgenheaders.h	2000/07/31 15:28:03	2.22
      ***************
      *** 31,36 ****
        #endif
        
      ! #include "myproto.h"
      ! #include "mymalloc.h"
        
        #include "pydebug.h"
      --- 31,35 ----
        #endif
        
      ! #include "pyport.h"
        
        #include "pydebug.h"
      
      Index: pyport.h
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v
      retrieving revision 2.7
      retrieving revision 2.8
      diff -C2 -r2.7 -r2.8
      *** pyport.h	2000/07/26 15:46:29	2.7
      --- pyport.h	2000/07/31 15:28:03	2.8
      ***************
      *** 30,34 ****
      --- 30,42 ----
        
        
      + #define ANY void /* For API compatibility only. Obsolete, do not use. */
      + 
      + #ifdef HAVE_STDLIB_H
      + #include 
      + #endif
      + 
        #ifdef __cplusplus
      + /* Move this down here since some C++ #include's don't like to be included
      +    inside an extern "C" */
        extern "C" {
        #endif
      ***************
      *** 137,140 ****
      --- 145,457 ----
        #endif /* 0 */
        
      + 
      + /************************
      +  * WRAPPER FOR  *
      +  ************************/
      + 
      + /* On the 68K Mac, when using CFM (Code Fragment Manager),
      +     requires special treatment -- we need to surround it with
      +    #pragma lib_export off / on...
      +    This is because MathLib.o is a static library, and exporting its
      +    symbols doesn't quite work...
      +    XXX Not sure now...  Seems to be something else going on as well... */
      + 
      + #ifndef HAVE_HYPOT
      + extern double hypot(double, double);
      + #ifdef MWERKS_BEFORE_PRO4
      + #define hypot we_dont_want_faulty_hypot_decl
      + #endif
      + #endif
      + 
      + #include 
      + 
      + #ifndef HAVE_HYPOT
      + #ifdef __MWERKS__
      + #undef hypot
      + #endif
      + #endif
      + 
      + #if defined(USE_MSL) && defined(__MC68K__)
      + /* CodeWarrior MSL 2.1.1 has weird define overrides that don't work
      + ** when you take the address of math functions. If I interpret the
      + ** ANSI C standard correctly this is illegal, but I haven't been able
      + ** to convince the MetroWerks folks of this...
      + */
      + #undef acos
      + #undef asin
      + #undef atan
      + #undef atan2
      + #undef ceil
      + #undef cos
      + #undef cosh
      + #undef exp
      + #undef fabs
      + #undef floor
      + #undef fmod
      + #undef log
      + #undef log10
      + #undef pow
      + #undef rint
      + #undef sin
      + #undef sinh
      + #undef sqrt
      + #undef tan
      + #undef tanh
      + #define acos acosd
      + #define asin asind
      + #define atan atand
      + #define atan2 atan2d
      + #define ceil ceild
      + #define cos cosd
      + #define cosh coshd
      + #define exp expd
      + #define fabs fabsd
      + #define floor floord
      + #define fmod fmodd
      + #define log logd
      + #define log10 log10d
      + #define pow powd
      + #define rint rintd
      + #define sin sind
      + #define sinh sinhd
      + #define sqrt sqrtd
      + #define tan tand
      + #define tanh tanhd
      + #endif 
      + 
      + 
      + /***********************************
      +  * WRAPPER FOR malloc/realloc/free *
      +  ***********************************/
      + 
      + #ifndef DL_IMPORT       /* declarations for DLL import */
      + #define DL_IMPORT(RTYPE) RTYPE
      + #endif
      + 
      + #ifndef NULL
      + #define NULL ((void *)0)
      + #endif
      + 
      + #ifdef MALLOC_ZERO_RETURNS_NULL
      + /* XXX Always allocate one extra byte, since some malloc's return NULL
      +    XXX for malloc(0) or realloc(p, 0). */
      + #define _PyMem_EXTRA 1
      + #else
      + #define _PyMem_EXTRA 0
      + #endif
      + 
      + /*
      +  * Core memory allocator
      +  * =====================
      +  */
      + 
      + /* To make sure the interpreter is user-malloc friendly, all memory
      +    APIs are implemented on top of this one.
      + 
      +    The PyCore_* macros can be defined to make the interpreter use a
      +    custom allocator. Note that they are for internal use only. Both
      +    the core and extension modules should use the PyMem_* API.
      + 
      +    See the comment block at the end of this file for two scenarios
      +    showing how to use this to use a different allocator. */
      + 
      + #ifndef PyCore_MALLOC_FUNC
      + #undef PyCore_REALLOC_FUNC
      + #undef PyCore_FREE_FUNC
      + #define PyCore_MALLOC_FUNC      malloc
      + #define PyCore_REALLOC_FUNC     realloc
      + #define PyCore_FREE_FUNC        free
      + #endif
      + 
      + #ifndef PyCore_MALLOC_PROTO
      + #undef PyCore_REALLOC_PROTO
      + #undef PyCore_FREE_PROTO
      + #define PyCore_MALLOC_PROTO    (size_t)
      + #define PyCore_REALLOC_PROTO   (void *, size_t)
      + #define PyCore_FREE_PROTO      (void *)
      + #endif
      + 
      + #ifdef NEED_TO_DECLARE_MALLOC_AND_FRIEND
      + extern void *PyCore_MALLOC_FUNC PyCore_MALLOC_PROTO;
      + extern void *PyCore_REALLOC_FUNC PyCore_REALLOC_PROTO;
      + extern void PyCore_FREE_FUNC PyCore_FREE_PROTO;
      + #endif
      + 
      + #ifndef PyCore_MALLOC
      + #undef PyCore_REALLOC
      + #undef PyCore_FREE
      + #define PyCore_MALLOC(n)        PyCore_MALLOC_FUNC(n)
      + #define PyCore_REALLOC(p, n)    PyCore_REALLOC_FUNC((p), (n))
      + #define PyCore_FREE(p)          PyCore_FREE_FUNC(p)
      + #endif
      + 
      + /* BEWARE:
      + 
      +    Each interface exports both functions and macros. Extension modules
      +    should normally use the functions for ensuring binary compatibility
      +    of the user's code across Python versions. Subsequently, if the
      +    Python runtime switches to its own malloc (different from standard
      +    malloc), no recompilation is required for the extensions.
      + 
      +    The macro versions trade compatibility for speed. They can be used
      +    whenever there is a performance problem, but their use implies
      +    recompilation of the code for each new Python release. The Python
      +    core uses the macros because it *is* compiled on every upgrade.
      +    This might not be the case with 3rd party extensions in a custom
      +    setup (for example, a customer does not always have access to the
      +    source of 3rd party deliverables). You have been warned! */
      + 
      + /*
      +  * Raw memory interface
      +  * ====================
      +  */
      + 
      + /* Functions */
      + 
      + /* Function wrappers around PyCore_MALLOC and friends; useful if you
      +    need to be sure that you are using the same memory allocator as
      +    Python.  Note that the wrappers make sure that allocating 0 bytes
      +    returns a non-NULL pointer, even if the underlying malloc
      +    doesn't. Returned pointers must be checked for NULL explicitly.
      +    No action is performed on failure. */
      + extern DL_IMPORT(void *) PyMem_Malloc(size_t);
      + extern DL_IMPORT(void *) PyMem_Realloc(void *, size_t);
      + extern DL_IMPORT(void) PyMem_Free(void *);
      + 
      + /* Starting from Python 1.6, the wrappers Py_{Malloc,Realloc,Free} are
      +    no longer supported. They used to call PyErr_NoMemory() on failure. */
      + 
      + /* Macros */
      + #define PyMem_MALLOC(n)         PyCore_MALLOC(n)
      + #define PyMem_REALLOC(p, n)     PyCore_REALLOC((void *)(p), (n))
      + #define PyMem_FREE(p)           PyCore_FREE((void *)(p))
      + 
      + /*
      +  * Type-oriented memory interface
      +  * ==============================
      +  */
      + 
      + /* Functions */
      + #define PyMem_New(type, n) \
      + 	( (type *) PyMem_Malloc((n) * sizeof(type)) )
      + #define PyMem_Resize(p, type, n) \
      + 	( (p) = (type *) PyMem_Realloc((n) * sizeof(type)) )
      + #define PyMem_Del(p) PyMem_Free(p)
      + 
      + /* Macros */
      + #define PyMem_NEW(type, n) \
      + 	( (type *) PyMem_MALLOC(_PyMem_EXTRA + (n) * sizeof(type)) )
      + #define PyMem_RESIZE(p, type, n) \
      + 	if ((p) == NULL) \
      + 		(p) = (type *)(PyMem_MALLOC( \
      + 				    _PyMem_EXTRA + (n) * sizeof(type))); \
      + 	else \
      + 		(p) = (type *)(PyMem_REALLOC((p), \
      + 				    _PyMem_EXTRA + (n) * sizeof(type)))
      + #define PyMem_DEL(p) PyMem_FREE(p)
      + 
      + /* PyMem_XDEL is deprecated. To avoid the call when p is NULL,
      +    it is recommended to write the test explicitly in the code.
      +    Note that according to ANSI C, free(NULL) has no effect. */
      + 
      + /* SCENARIOS
      + 
      +    Here are two scenarios by Vladimir Marangozov (the author of the
      +    memory allocation redesign).
      + 
      +    1) Scenario A
      + 
      +    Suppose you want to use a debugging malloc library that collects info on
      +    where the malloc calls originate from. Assume the interface is:
      + 
      +    d_malloc(size_t n, char* src_file, unsigned long src_line) c.s.
      + 
      +    In this case, you would define (for example in config.h) :
      + 
      +    #define PyCore_MALLOC_FUNC      d_malloc
      +    ...
      +    #define PyCore_MALLOC_PROTO	(size_t, char *, unsigned long)
      +    ...
      +    #define NEED_TO_DECLARE_MALLOC_AND_FRIEND
      + 
      +    #define PyCore_MALLOC(n)	PyCore_MALLOC_FUNC((n), __FILE__, __LINE__)
      +    ...
      + 
      +    2) Scenario B
      + 
      +    Suppose you want to use malloc hooks (defined & initialized in a 3rd party
      +    malloc library) instead of malloc functions.  In this case, you would
      +    define:
      + 
      +    #define PyCore_MALLOC_FUNC	(*malloc_hook)
      +    ...
      +    #define NEED_TO_DECLARE_MALLOC_AND_FRIEND
      + 
      +    and ignore the previous definitions about PyCore_MALLOC_FUNC, etc.
      + 
      + 
      + */
      + 
      + /********************************************
      +  * WRAPPER FOR  and/or  *
      +  ********************************************/
      + 
      + #ifdef TIME_WITH_SYS_TIME
      + #include 
      + #include 
      + #else /* !TIME_WITH_SYS_TIME */
      + #ifdef HAVE_SYS_TIME_H
      + #include 
      + #else /* !HAVE_SYS_TIME_H */
      + #include 
      + #endif /* !HAVE_SYS_TIME_H */
      + #endif /* !TIME_WITH_SYS_TIME */
      + 
      + 
      + /******************************
      +  * WRAPPER FOR  *
      +  ******************************/
      + 
      + /* NB caller must include  */
      + 
      + #ifdef HAVE_SYS_SELECT_H
      + 
      + #include 
      + 
      + #else /* !HAVE_SYS_SELECT_H */
      + 
      + #ifdef USE_GUSI1
      + /* If we don't have sys/select the definition may be in unistd.h */
      + #include 
      + #endif
      + 
      + #endif /* !HAVE_SYS_SELECT_H */
      + 
      + /* If the fd manipulation macros aren't defined,
      +    here is a set that should do the job */
      + 
      + #ifndef	FD_SETSIZE
      + #define	FD_SETSIZE	256
      + #endif
      + 
      + #ifndef FD_SET
      + 
      + typedef long fd_mask;
      + 
      + #define NFDBITS	(sizeof(fd_mask) * NBBY)	/* bits per mask */
      + #ifndef howmany
      + #define	howmany(x, y)	(((x)+((y)-1))/(y))
      + #endif /* howmany */
      + 
      + typedef	struct fd_set {
      + 	fd_mask	fds_bits[howmany(FD_SETSIZE, NFDBITS)];
      + } fd_set;
      + 
      + #define	FD_SET(n, p)	((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
      + #define	FD_CLR(n, p)	((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
      + #define	FD_ISSET(n, p)	((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
      + #define FD_ZERO(p)	memset((char *)(p), '\0', sizeof(*(p)))
      + 
      + #endif /* FD_SET */
        #ifdef __cplusplus
        }
      
      
      
      From python-dev@python.org  Mon Jul 31 16:28:06 2000
      From: python-dev@python.org (Peter Schneider-Kamp)
      Date: Mon, 31 Jul 2000 08:28:06 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Parser intrcheck.c,2.38,2.39
      Message-ID: <200007311528.IAA14517@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Parser
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv14376/Parser
      
      Modified Files:
      	intrcheck.c 
      Log Message:
      
      merge Include/my*.h into Include/pyport.h
      
      marked my*.h as obsolete
      
      
      
      Index: intrcheck.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Parser/intrcheck.c,v
      retrieving revision 2.38
      retrieving revision 2.39
      diff -C2 -r2.38 -r2.39
      *** intrcheck.c	2000/07/25 12:56:38	2.38
      --- intrcheck.c	2000/07/31 15:28:04	2.39
      ***************
      *** 18,22 ****
        #endif
        
      - #include "myproto.h"
        #include "intrcheck.h"
        
      --- 18,21 ----
      
      
      
      From python-dev@python.org  Mon Jul 31 16:28:06 2000
      From: python-dev@python.org (Peter Schneider-Kamp)
      Date: Mon, 31 Jul 2000 08:28:06 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.172,2.173 fmod.c,2.11,2.12 hypot.c,2.2,2.3
      Message-ID: <200007311528.IAA14529@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Python
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv14376/Python
      
      Modified Files:
      	bltinmodule.c fmod.c hypot.c 
      Log Message:
      
      merge Include/my*.h into Include/pyport.h
      
      marked my*.h as obsolete
      
      
      
      Index: bltinmodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v
      retrieving revision 2.172
      retrieving revision 2.173
      diff -C2 -r2.172 -r2.173
      *** bltinmodule.c	2000/07/23 22:21:32	2.172
      --- bltinmodule.c	2000/07/31 15:28:04	2.173
      ***************
      *** 17,22 ****
        #include "eval.h"
        
      - #include "mymath.h"
      - 
        #include 
        
      --- 17,20 ----
      
      Index: fmod.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Python/fmod.c,v
      retrieving revision 2.11
      retrieving revision 2.12
      diff -C2 -r2.11 -r2.12
      *** fmod.c	2000/06/30 23:58:06	2.11
      --- fmod.c	2000/07/31 15:28:04	2.12
      ***************
      *** 13,17 ****
        #include "config.h"
        
      ! #include "mymath.h"
        #include 
        
      --- 13,17 ----
        #include "config.h"
        
      ! #include "pyport.h"
        #include 
        
      
      Index: hypot.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Python/hypot.c,v
      retrieving revision 2.2
      retrieving revision 2.3
      diff -C2 -r2.2 -r2.3
      *** hypot.c	2000/07/22 18:47:25	2.2
      --- hypot.c	2000/07/31 15:28:04	2.3
      ***************
      *** 2,7 ****
        
        #include "config.h"
      ! #include "myproto.h"
      ! #include "mymath.h"
        
        double hypot(double x, double y)
      --- 2,6 ----
        
        #include "config.h"
      ! #include "pyport.h"
        
        double hypot(double x, double y)
      
      
      
      From python-dev@python.org  Mon Jul 31 16:28:06 2000
      From: python-dev@python.org (Peter Schneider-Kamp)
      Date: Mon, 31 Jul 2000 08:28:06 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Objects complexobject.c,2.28,2.29 floatobject.c,2.64,2.65 longobject.c,1.64,1.65 object.c,2.90,2.91 stringobject.c,2.83,2.84 unicodeobject.c,2.52,2.53
      Message-ID: <200007311528.IAA14531@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Objects
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv14376/Objects
      
      Modified Files:
      	complexobject.c floatobject.c longobject.c object.c 
      	stringobject.c unicodeobject.c 
      Log Message:
      
      merge Include/my*.h into Include/pyport.h
      
      marked my*.h as obsolete
      
      
      
      Index: complexobject.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Objects/complexobject.c,v
      retrieving revision 2.28
      retrieving revision 2.29
      diff -C2 -r2.28 -r2.29
      *** complexobject.c	2000/07/09 04:36:04	2.28
      --- complexobject.c	2000/07/31 15:28:04	2.29
      ***************
      *** 18,22 ****
        
        #include "Python.h"
      - #include "mymath.h"
        
        #ifdef HAVE_LIMITS_H
      --- 18,21 ----
      
      Index: floatobject.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v
      retrieving revision 2.64
      retrieving revision 2.65
      diff -C2 -r2.64 -r2.65
      *** floatobject.c	2000/07/09 05:31:24	2.64
      --- floatobject.c	2000/07/31 15:28:04	2.65
      ***************
      *** 17,21 ****
        
        #include 
      - #include "mymath.h"
        
        #ifdef i860
      --- 17,20 ----
      
      Index: longobject.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v
      retrieving revision 1.64
      retrieving revision 1.65
      diff -C2 -r1.64 -r1.65
      *** longobject.c	2000/07/08 04:17:21	1.64
      --- longobject.c	2000/07/31 15:28:04	1.65
      ***************
      *** 15,19 ****
        #include "Python.h"
        #include "longintrepr.h"
      - #include "mymath.h"
        
        #include 
      --- 15,18 ----
      
      Index: object.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v
      retrieving revision 2.90
      retrieving revision 2.91
      diff -C2 -r2.90 -r2.91
      *** object.c	2000/07/25 12:56:38	2.90
      --- object.c	2000/07/31 15:28:04	2.91
      ***************
      *** 17,22 ****
        #endif
        
      - #include "mymath.h"
      - 
        /* just for trashcan: */
        #include "compile.h"
      --- 17,20 ----
      
      Index: stringobject.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v
      retrieving revision 2.83
      retrieving revision 2.84
      diff -C2 -r2.83 -r2.84
      *** stringobject.c	2000/07/16 12:04:31	2.83
      --- stringobject.c	2000/07/31 15:28:04	2.84
      ***************
      *** 13,17 ****
        #include "Python.h"
        
      - #include "mymath.h"
        #include 
        
      --- 13,16 ----
      
      Index: unicodeobject.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v
      retrieving revision 2.52
      retrieving revision 2.53
      diff -C2 -r2.52 -r2.53
      *** unicodeobject.c	2000/07/22 19:25:51	2.52
      --- unicodeobject.c	2000/07/31 15:28:04	2.53
      ***************
      *** 65,69 ****
        #include "Python.h"
        
      - #include "mymath.h"
        #include "unicodeobject.h"
        #include "ucnhash.h"
      --- 65,68 ----
      
      
      
      From python-dev@python.org  Mon Jul 31 16:28:07 2000
      From: python-dev@python.org (Peter Schneider-Kamp)
      Date: Mon, 31 Jul 2000 08:28:07 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Modules _tkinter.c,1.109,1.110 audioop.c,1.40,1.41 cPickle.c,2.48,2.49 cmathmodule.c,2.18,2.19 mathmodule.c,2.51,2.52 posixmodule.c,2.162,2.163 pypcre.c,2.20,2.21 resource.c,2.16,2.17 rotormodule.c,2.28,2.29 selectmodule.c,2.41,2.42 socketmodule.c,1.123,1.124 structmodule.c,2.36,2.37 timemodule.c,2.97,2.98
      Message-ID: <200007311528.IAA14538@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Modules
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv14376/Modules
      
      Modified Files:
      	_tkinter.c audioop.c cPickle.c cmathmodule.c mathmodule.c 
      	posixmodule.c pypcre.c resource.c rotormodule.c selectmodule.c 
      	socketmodule.c structmodule.c timemodule.c 
      Log Message:
      
      merge Include/my*.h into Include/pyport.h
      
      marked my*.h as obsolete
      
      
      
      Index: _tkinter.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v
      retrieving revision 1.109
      retrieving revision 1.110
      diff -C2 -r1.109 -r1.110
      *** _tkinter.c	2000/07/24 14:43:34	1.109
      --- _tkinter.c	2000/07/31 15:28:04	1.110
      ***************
      *** 50,60 ****
        #ifdef macintosh
        #define MAC_TCL
      - #include "myselect.h"
        #endif
        
      - #ifdef PYOS_OS2
      - #include "myselect.h"
      - #endif
      - 
        #include 
        #include 
      --- 50,55 ----
      ***************
      *** 256,261 ****
        #ifdef WITH_THREAD
        #ifndef MS_WINDOWS
      - #include "mytime.h"
      - #include "myselect.h"
        
        /* Millisecond sleep() for Unix platforms. */
      --- 251,254 ----
      
      Index: audioop.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/audioop.c,v
      retrieving revision 1.40
      retrieving revision 1.41
      diff -C2 -r1.40 -r1.41
      *** audioop.c	2000/07/21 06:00:07	1.40
      --- audioop.c	2000/07/31 15:28:04	1.41
      ***************
      *** 32,37 ****
        #endif
        
      - #include "mymath.h"
      - 
        /* Code shamelessly stolen from sox,
        ** (c) Craig Reese, Joe Campbell and Jeff Poskanzer 1989 */
      --- 32,35 ----
      
      Index: cPickle.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v
      retrieving revision 2.48
      retrieving revision 2.49
      diff -C2 -r2.48 -r2.49
      *** cPickle.c	2000/07/24 14:43:34	2.48
      --- cPickle.c	2000/07/31 15:28:04	2.49
      ***************
      *** 55,59 ****
        #include "Python.h"
        #include "cStringIO.h"
      - #include "mymath.h"
        
        #ifndef Py_eval_input
      --- 55,58 ----
      
      Index: cmathmodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/cmathmodule.c,v
      retrieving revision 2.18
      retrieving revision 2.19
      diff -C2 -r2.18 -r2.19
      *** cmathmodule.c	2000/07/24 11:17:40	2.18
      --- cmathmodule.c	2000/07/31 15:28:04	2.19
      ***************
      *** 5,10 ****
        #include "Python.h"
        
      - #include "mymath.h"
      - 
        #ifdef i860
        /* Cray APP has bogus definition of HUGE_VAL in  */
      --- 5,8 ----
      
      Index: mathmodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v
      retrieving revision 2.51
      retrieving revision 2.52
      diff -C2 -r2.51 -r2.52
      *** mathmodule.c	2000/07/21 06:00:07	2.51
      --- mathmodule.c	2000/07/31 15:28:04	2.52
      ***************
      *** 13,18 ****
        #include "Python.h"
        
      - #include "mymath.h"
      - 
        #ifndef _MSC_VER
        #ifndef __STDC__
      --- 13,16 ----
      
      Index: posixmodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
      retrieving revision 2.162
      retrieving revision 2.163
      diff -C2 -r2.162 -r2.163
      *** posixmodule.c	2000/07/26 17:29:12	2.162
      --- posixmodule.c	2000/07/31 15:28:04	2.163
      ***************
      *** 46,51 ****
        #endif
        
      - #include "mytime.h"		/* For clock_t on some systems */
      - 
        #ifdef HAVE_FCNTL_H
        #include 
      --- 46,49 ----
      
      Index: pypcre.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/pypcre.c,v
      retrieving revision 2.20
      retrieving revision 2.21
      diff -C2 -r2.20 -r2.21
      *** pypcre.c	2000/07/16 12:04:31	2.20
      --- pypcre.c	2000/07/31 15:28:04	2.21
      ***************
      *** 48,52 ****
        #include "pcre-int.h"
        #include "Python.h"
      - #include "mymalloc.h"
        #include 
        #include "graminit.h"
      --- 48,51 ----
      
      Index: resource.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/resource.c,v
      retrieving revision 2.16
      retrieving revision 2.17
      diff -C2 -r2.16 -r2.17
      *** resource.c	2000/07/24 16:06:23	2.16
      --- resource.c	2000/07/31 15:28:04	2.17
      ***************
      *** 10,14 ****
        
        #include "Python.h"
      - #include "mytime.h" /* needed for SunOS4.1 */
        #include 
        #include 
      --- 10,13 ----
      
      Index: rotormodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/rotormodule.c,v
      retrieving revision 2.28
      retrieving revision 2.29
      diff -C2 -r2.28 -r2.29
      *** rotormodule.c	2000/07/21 06:00:07	2.28
      --- rotormodule.c	2000/07/31 15:28:04	2.29
      ***************
      *** 57,61 ****
        
        #include "Python.h"
      - #include "mymath.h"
        
        #ifndef TRUE
      --- 57,60 ----
      
      Index: selectmodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v
      retrieving revision 2.41
      retrieving revision 2.42
      diff -C2 -r2.41 -r2.42
      *** selectmodule.c	2000/07/22 23:57:55	2.41
      --- selectmodule.c	2000/07/31 15:28:04	2.42
      ***************
      *** 47,51 ****
        #define SOCKET int
        #else
      - #include "myselect.h" /* Also includes mytime.h */
        #define SOCKET int
        #endif
      --- 47,50 ----
      
      Index: socketmodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
      retrieving revision 1.123
      retrieving revision 1.124
      diff -C2 -r1.123 -r1.124
      *** socketmodule.c	2000/07/25 12:56:37	1.123
      --- socketmodule.c	2000/07/31 15:28:04	1.124
      ***************
      *** 127,131 ****
        
        #include 
      - #include "mytime.h"
        
        #include 
      --- 127,130 ----
      
      Index: structmodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/structmodule.c,v
      retrieving revision 2.36
      retrieving revision 2.37
      diff -C2 -r2.36 -r2.37
      *** structmodule.c	2000/07/21 06:00:07	2.36
      --- structmodule.c	2000/07/31 15:28:04	2.37
      ***************
      *** 40,44 ****
        
        #include "Python.h"
      - #include "mymath.h"
        
        #include 
      --- 40,43 ----
      
      Index: timemodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v
      retrieving revision 2.97
      retrieving revision 2.98
      diff -C2 -r2.97 -r2.98
      *** timemodule.c	2000/07/25 12:56:37	2.97
      --- timemodule.c	2000/07/31 15:28:04	2.98
      ***************
      *** 15,22 ****
        #include 
        
      - #ifdef HAVE_SELECT
      - #include "mymath.h"
      - #endif
      - 
        #ifdef macintosh
        #include 
      --- 15,18 ----
      ***************
      *** 39,48 ****
        #ifdef HAVE_UNISTD_H
        #include 
      - #endif
      - 
      - #if defined(HAVE_SELECT) && !defined(__BEOS__)
      - #include "myselect.h"
      - #else
      - #include "mytime.h"
        #endif
        
      --- 35,38 ----
      
      
      
      From python-dev@python.org  Mon Jul 31 16:45:49 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Mon, 31 Jul 2000 08:45:49 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libshutil.tex,1.5,1.6
      Message-ID: <200007311545.IAA16086@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Doc/lib
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv16079/lib
      
      Modified Files:
      	libshutil.tex 
      Log Message:
      
      Moshe Zadka :
      Document new method in shutil (copyfileobj).
      Minor clarification by Fred.
      
      
      Index: libshutil.tex
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/lib/libshutil.tex,v
      retrieving revision 1.5
      retrieving revision 1.6
      diff -C2 -r1.5 -r1.6
      *** libshutil.tex	1999/11/09 18:03:00	1.5
      --- libshutil.tex	2000/07/31 15:45:46	1.6
      ***************
      *** 24,27 ****
      --- 24,36 ----
        \end{funcdesc}
        
      + \begin{funcdesc}{copyfileobj}{fsrc, fdst\optional{, length}}
      +   Copy the contents of the file-like object \var{fsrc} to the
      +   file-like object \var{fdst}.  The integer \var{length}, if given,
      +   is the buffer size. In particular, a negative \var{length} value
      +   means to copy the data without looping over the source data in
      +   chunks; by default the data is read in chunks to avoid uncontrolled
      +   memory consumption.
      + \end{funcdesc}
      + 
        \begin{funcdesc}{copymode}{src, dst}
          Copy the permission bits from \var{src} to \var{dst}.  The file
      
      
      
      From python-dev@python.org  Mon Jul 31 16:52:48 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Mon, 31 Jul 2000 08:52:48 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.11,1.12
      Message-ID: <200007311552.IAA16575@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv16561
      
      Modified Files:
      	pep-0201.txt 
      Log Message:
      Integrated many suggestions from c.l.py and others.  Nothing
      substantial w.r.t. the proposed solution, just clarifications,
      additional references, and an explanation of why most syntax changes
      don't work.
      
      
      Index: pep-0201.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v
      retrieving revision 1.11
      retrieving revision 1.12
      diff -C2 -r1.11 -r1.12
      *** pep-0201.txt	2000/07/28 05:48:25	1.11
      --- pep-0201.txt	2000/07/31 15:52:45	1.12
      ***************
      *** 11,22 ****
        Introduction
        
      !     This PEP describes the `lockstep iteration' proposal for Python
      !     2.0.  This PEP tracks the status and ownership of this feature,
      !     slated for introduction in Python 2.0.  It contains a description
      !     of the feature and outlines changes necessary to support the
      !     feature.  This PEP summarizes discussions held in mailing list
      !     forums, and provides URLs for further information, where
      !     appropriate.  The CVS revision history of this file contains the
      !     definitive historical record.
        
        
      --- 11,22 ----
        Introduction
        
      !     This PEP describes the `lockstep iteration' proposal.  This PEP
      !     tracks the status and ownership of this feature, slated for
      !     introduction in Python 2.0.  It contains a description of the
      !     feature and outlines changes necessary to support the feature.
      !     This PEP summarizes discussions held in mailing list forums, and
      !     provides URLs for further information, where appropriate.  The CVS
      !     revision history of this file contains the definitive historical
      !     record.
        
        
      ***************
      *** 26,37 ****
            sequence until the sequence is exhausted[1].  However, for-loops
            iterate over only a single sequence, and it is often desirable to
      !     loop over more than one sequence, in a lock-step, "Chinese Menu"
      !     type of way.
        
      -     The common idioms used to accomplish this are unintuitive and
      -     inflexible.  This PEP proposes a standard way of performing such
      -     iterations by introducing a new builtin function called `zip'.
      - 
      - 
        Lockstep For-Loops
        
      --- 26,41 ----
            sequence until the sequence is exhausted[1].  However, for-loops
            iterate over only a single sequence, and it is often desirable to
      !     loop over more than one sequence in a lock-step fashion.  In other
      !     words, in a way such that nthe i-th iteration through the loop
      !     returns an object containing the i-th element from each sequence.
      ! 
      !     The common idioms used to accomplish this are unintuitive.  This
      !     PEP proposes a standard way of performing such iterations by
      !     introducing a new builtin function called `zip'.
      ! 
      !     While the primary motivation for zip() comes from lock-step
      !     iteration, by implementing zip() as a built-in function, it has
      !     additional utility in contexts other than for-loops.
        
        Lockstep For-Loops
        
      ***************
      *** 71,81 ****
        
            For these reasons, several proposals were floated in the Python
      !     2.0 beta time frame for providing a better spelling of lockstep
      !     for-loops.  The initial proposals centered around syntactic
      !     changes to the for statement, but conflicts and problems with the
      !     syntax were unresolvable, especially when lockstep for-loops were
      !     combined with another proposed feature called `list
      !     comprehensions' (see pep-0202.txt).
        
        
        The Proposed Solution
      --- 75,92 ----
        
            For these reasons, several proposals were floated in the Python
      !     2.0 beta time frame for syntactic support of lockstep for-loops.
      !     Here are two suggestions:
      ! 
      !     for x in seq1, y in seq2:
      !         # stuff
      ! 
      !     for x, y in seq1, seq2:
      !         # stuff
        
      +     Neither of these forms would work, since they both already mean
      +     something in Python and changing the meanings would break existing
      +     code.  All other suggestions for new syntax suffered the same
      +     problem, or were in conflict with other another proposed feature
      +     called `list comprehensions' (see pep-0202.txt).
        
        The Proposed Solution
      ***************
      *** 207,211 ****
            [2] http://www.haskell.org/onlinereport/standard-prelude.html#$vzip
        
      !     TBD: URL to python-dev archives
        
        
      --- 218,223 ----
            [2] http://www.haskell.org/onlinereport/standard-prelude.html#$vzip
        
      !     Greg Wilson's questionaire on proposed syntax to some CS grad students
      !     http://www.python.org/pipermail/python-dev/2000-July/013139.html
        
        
      
      
      
      From python-dev@python.org  Mon Jul 31 16:55:24 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Mon, 31 Jul 2000 08:55:24 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Doc/html Makefile,1.32,1.33
      Message-ID: <200007311555.IAA16837@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Doc/html
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv16829/html
      
      Modified Files:
      	Makefile 
      Log Message:
      
      Always pass the split level to LaTeX2HTML as a command line option since
      newer versions only process one initialization file, and do so at a
      different time than previous versions.
      
      
      Index: Makefile
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/html/Makefile,v
      retrieving revision 1.32
      retrieving revision 1.33
      diff -C2 -r1.32 -r1.33
      *** Makefile	2000/04/28 17:03:26	1.32
      --- Makefile	2000/07/31 15:55:22	1.33
      ***************
      *** 70,74 ****
        
        api/api.html:  $(PAPERDIR)/api.aux $(BUILDINDEX) $(TOOLSDIR)/mkhtml.sh
      ! 	$(MKHTML) api $(L2HARGS)
        
        doc/doc.html:  $(DOCFILES) $(BUILDINDEX) $(TOPDIR)/perl/ltxmarkup.perl
      --- 70,74 ----
        
        api/api.html:  $(PAPERDIR)/api.aux $(BUILDINDEX) $(TOOLSDIR)/mkhtml.sh
      ! 	$(MKHTML) api $(L2HARGS) -split 5
        
        doc/doc.html:  $(DOCFILES) $(BUILDINDEX) $(TOPDIR)/perl/ltxmarkup.perl
      ***************
      *** 77,86 ****
        
        ext/ext.html:  $(PAPERDIR)/ext.aux $(TOOLSDIR)/mkhtml.sh
      ! 	$(MKHTML) ext $(L2HARGS)
        
        lib/lib.html:  $(PAPERDIR)/lib.aux $(BUILDINDEX) $(TOOLSDIR)/mkhtml.sh
        	$(TOOLSDIR)/fix_libaux.sed <`$(KPSEWHICH) lib.aux` >lib1.aux
        	mv lib1.aux `$(KPSEWHICH) lib.aux`
      ! 	$(MKHTML) lib $(L2HARGS)
        
        mac/mac.html:  $(MACFILES) $(BUILDINDEX)
      --- 77,86 ----
        
        ext/ext.html:  $(PAPERDIR)/ext.aux $(TOOLSDIR)/mkhtml.sh
      ! 	$(MKHTML) ext $(L2HARGS) -split 5
        
        lib/lib.html:  $(PAPERDIR)/lib.aux $(BUILDINDEX) $(TOOLSDIR)/mkhtml.sh
        	$(TOOLSDIR)/fix_libaux.sed <`$(KPSEWHICH) lib.aux` >lib1.aux
        	mv lib1.aux `$(KPSEWHICH) lib.aux`
      ! 	$(MKHTML) lib $(L2HARGS) -split 5
        
        mac/mac.html:  $(MACFILES) $(BUILDINDEX)
      ***************
      *** 89,93 ****
        
        ref/ref.html:  $(PAPERDIR)/ref.aux $(BUILDINDEX) $(TOOLSDIR)/mkhtml.sh
      ! 	$(MKHTML) ref $(L2HARGS)
        
        tut/tut.html:  $(PAPERDIR)/tut.aux $(TOOLSDIR)/mkhtml.sh
      --- 89,93 ----
        
        ref/ref.html:  $(PAPERDIR)/ref.aux $(BUILDINDEX) $(TOOLSDIR)/mkhtml.sh
      ! 	$(MKHTML) ref $(L2HARGS) -split 5
        
        tut/tut.html:  $(PAPERDIR)/tut.aux $(TOOLSDIR)/mkhtml.sh
      
      
      
      From python-dev@python.org  Mon Jul 31 17:34:53 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Mon, 31 Jul 2000 09:34:53 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libstdtypes.tex,1.23,1.24
      Message-ID: <200007311634.JAA27188@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Doc/lib
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv27177/lib
      
      Modified Files:
      	libstdtypes.tex 
      Log Message:
      
      Two minor nits from Gerry Weiner (no working email address) about
      describing the methods of dictionaries.
      
      
      Index: libstdtypes.tex
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v
      retrieving revision 1.23
      retrieving revision 1.24
      diff -C2 -r1.23 -r1.24
      *** libstdtypes.tex	2000/06/30 16:06:19	1.23
      --- libstdtypes.tex	2000/07/31 16:34:46	1.24
      ***************
      *** 570,575 ****
          \lineiii{len(\var{a})}{the number of items in \var{a}}{}
          \lineiii{\var{a}[\var{k}]}{the item of \var{a} with key \var{k}}{(1)}
      !   \lineiii{\var{a}[\var{k}] = \var{x}}
      !           {set \code{\var{a}[\var{k}]} to \var{x}}
                  {}
          \lineiii{del \var{a}[\var{k}]}
      --- 570,575 ----
          \lineiii{len(\var{a})}{the number of items in \var{a}}{}
          \lineiii{\var{a}[\var{k}]}{the item of \var{a} with key \var{k}}{(1)}
      !   \lineiii{\var{a}[\var{k}] = \var{v}}
      !           {set \code{\var{a}[\var{k}]} to \var{v}}
                  {}
          \lineiii{del \var{a}[\var{k}]}
      ***************
      *** 586,590 ****
          \lineiii{\var{a}.keys()}{a copy of \var{a}'s list of keys}{(2)}
          \lineiii{\var{a}.update(\var{b})}
      !           {\code{for k, v in \var{b}.items(): \var{a}[k] = v}}
                  {(3)}
          \lineiii{\var{a}.values()}{a copy of \var{a}'s list of values}{(2)}
      --- 586,590 ----
          \lineiii{\var{a}.keys()}{a copy of \var{a}'s list of keys}{(2)}
          \lineiii{\var{a}.update(\var{b})}
      !           {\code{for k in \var{b}.keys(): \var{a}[k] = \var{b}[k]}}
                  {(3)}
          \lineiii{\var{a}.values()}{a copy of \var{a}'s list of values}{(2)}
      
      
      
      From python-dev@python.org  Mon Jul 31 17:38:15 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Mon, 31 Jul 2000 09:38:15 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.15,1.16
      Message-ID: <200007311638.JAA27412@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv27404
      
      Modified Files:
      	pep-0000.txt 
      Log Message:
      PEP 211 renamed to "Adding New Linear Algebra Operators" at request of
      gvwilson.  More accurately describes the narrower focus.
      
      
      Index: pep-0000.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v
      retrieving revision 1.15
      retrieving revision 1.16
      diff -C2 -r1.15 -r1.16
      *** pep-0000.txt	2000/07/31 15:06:47	1.15
      --- pep-0000.txt	2000/07/31 16:38:12	1.16
      ***************
      *** 32,36 ****
             209  pep-0209.txt  Adding Multidimensional Arrays       davida
             210  pep-0210.txt  Decoupling the Interpreter Loop      davida
      !      211  pep-0211.txt  Adding New Operators to Python       gvwilson
             212  pep-0212.txt  Additional Builtin Generators        bwarsaw
             213  pep-0213.txt  Attribute Access Handlers            prescod
      --- 32,36 ----
             209  pep-0209.txt  Adding Multidimensional Arrays       davida
             210  pep-0210.txt  Decoupling the Interpreter Loop      davida
      !      211  pep-0211.txt  Adding New Linear Algebra Operators  gvwilson
             212  pep-0212.txt  Additional Builtin Generators        bwarsaw
             213  pep-0213.txt  Attribute Access Handlers            prescod
      
      
      
      From python-dev@python.org  Mon Jul 31 17:52:55 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Mon, 31 Jul 2000 09:52:55 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.12,1.13
      Message-ID: <200007311652.JAA28497@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv28484
      
      Modified Files:
      	pep-0201.txt 
      Log Message:
      Added a BDFL justification to why there's no optional pad argument.
      
      
      Index: pep-0201.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v
      retrieving revision 1.12
      retrieving revision 1.13
      diff -C2 -r1.12 -r1.13
      *** pep-0201.txt	2000/07/31 15:52:45	1.12
      --- pep-0201.txt	2000/07/31 16:52:52	1.13
      ***************
      *** 189,193 ****
              behavior to the map(None, ...) semantics except that the user
              would be able to specify pad object.  This has been rejected by
      !       the BDFL in favor of always truncating to the shortest sequence.
        
            - Lazy evaluation.  An earlier version of this PEP proposed that
      --- 189,196 ----
              behavior to the map(None, ...) semantics except that the user
              would be able to specify pad object.  This has been rejected by
      !       the BDFL in favor of always truncating to the shortest sequence,
      !       because of the KISS principle.  If there's a true need, it is
      !       easier to add later.  If it is not needed, it would still be
      !       impossible to delete it in the future.
        
            - Lazy evaluation.  An earlier version of this PEP proposed that
      
      
      
      From python-dev@python.org  Mon Jul 31 18:47:52 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Mon, 31 Jul 2000 10:47:52 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Doc/tools mkhowto,1.10,1.11 mkhtml.sh,1.12,1.13
      Message-ID: <200007311747.KAA07621@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Doc/tools
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv7610/tools
      
      Modified Files:
      	mkhowto mkhtml.sh 
      Log Message:
      
      Small changes to reflect changes in LaTeX2HTML support for newer versions
      of LaTeX2HTML.
      
      
      Index: mkhowto
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkhowto,v
      retrieving revision 1.10
      retrieving revision 1.11
      diff -C2 -r1.10 -r1.11
      *** mkhowto	2000/07/24 23:03:32	1.10
      --- mkhowto	2000/07/31 17:47:49	1.11
      ***************
      *** 362,372 ****
            def write_l2h_aux_init_file(self):
                fp = open(self.l2h_aux_init_file, "w")
                fp.write(open(L2H_INIT_FILE).read())
                fp.write("\n"
                         "# auxillary init file for latex2html\n"
                         "# generated by mkhowto\n"
      -                  "push (@INC, '%s');\n"
                         "$NO_AUTO_LINK = 1;\n"
      -                  % os.path.dirname(L2H_INIT_FILE)
                         )
                options = self.options
      --- 362,375 ----
            def write_l2h_aux_init_file(self):
                fp = open(self.l2h_aux_init_file, "w")
      +         d = string_to_perl(os.path.dirname(L2H_INIT_FILE))
      +         fp.write("package main;\n"
      +                  "push (@INC, '%s');\n"
      +                  "$mydir = '%s';\n"
      +                  % (d, d))
                fp.write(open(L2H_INIT_FILE).read())
                fp.write("\n"
                         "# auxillary init file for latex2html\n"
                         "# generated by mkhowto\n"
                         "$NO_AUTO_LINK = 1;\n"
                         )
                options = self.options
      
      Index: mkhtml.sh
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkhtml.sh,v
      retrieving revision 1.12
      retrieving revision 1.13
      diff -C2 -r1.12 -r1.13
      *** mkhtml.sh	2000/04/03 04:19:14	1.12
      --- mkhtml.sh	2000/07/31 17:47:49	1.13
      ***************
      *** 32,36 ****
        fi
        
      ! echo "latex2html -init_file $srcdir/perl/l2hinit.perl -dir $part" \
         "${1:+$@} $srcdir/$part/$part.tex"
        latex2html \
      --- 32,38 ----
        fi
        
      ! echo "latex2html -no_auto_link" \
      !  "-up_url '../index.html' -up_title 'Documentation Index'" \
      !  "-init_file $srcdir/perl/l2hinit.perl -dir $part" \
         "${1:+$@} $srcdir/$part/$part.tex"
        latex2html \
      
      
      
      From python-dev@python.org  Mon Jul 31 18:53:48 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Mon, 31 Jul 2000 10:53:48 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Doc/perl l2hinit.perl,1.42,1.43
      Message-ID: <200007311753.KAA08137@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Doc/perl
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv8122/perl
      
      Modified Files:
      	l2hinit.perl 
      Log Message:
      
      Many changes to work with newer versions of LaTeX2HTML.  This has been 
      tested with version 99.2beta8.
      
      
      Index: l2hinit.perl
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/perl/l2hinit.perl,v
      retrieving revision 1.42
      retrieving revision 1.43
      diff -C2 -r1.42 -r1.43
      *** l2hinit.perl	2000/04/03 04:41:18	1.42
      --- l2hinit.perl	2000/07/31 17:53:45	1.43
      ***************
      *** 1,21 ****
      ! #LaTeX2HTML Version 96.1 : dot.latex2html-init		-*- perl -*-
      ! #
      ! #  Significantly revised by Fred L. Drake, Jr.  for use
      ! #  with the Python documentation.
      ! #
      ! #  New name to avoid distributing "dot" files with the Python documentation.
      ! #
      ! 
      ! package Override;
      ! 
      ! use Cwd qw(getcwd);
      ! 
        
        package main;
        
        $HTML_VERSION = 4.0;
        
        $MAX_LINK_DEPTH = 2;
      - $MAX_SPLIT_DEPTH = 5;      # split at subsections but not sub-subsections
        $ADDRESS = '';
        
      --- 1,11 ----
      ! # LaTeX2HTML support base for use with Python documentation.
        
        package main;
        
      + use L2hos;
      + 
        $HTML_VERSION = 4.0;
        
        $MAX_LINK_DEPTH = 2;
        $ADDRESS = '';
        
      ***************
      *** 35,41 ****
        $AUTO_NAVIGATION = 0;
        
      - $SUPPRESS_CONTENTS = 0;
      - $SUPPRESS_INDEXES = 0;
      - 
        # these exactly match the python.org colors
        $BODYTEXT = ('bgcolor="#ffffff" text="#000000"'
      --- 25,28 ----
      ***************
      *** 50,61 ****
        
        # A little painful, but lets us clean up the top level directory a little,
      ! # and not be tied to the current directory (as far as I can tell).
      ! #
      ! use Cwd;
      ! use File::Basename;
      ! ($myname, $mydir, $myext) = fileparse(__FILE__, '\..*');
      ! chop $mydir;			# remove trailing '/'
      ! $mydir = getcwd() . "$dd$mydir"
      !   unless $mydir =~ s|^/|/|;
        $LATEX2HTMLSTYLES = "$mydir$envkey$LATEX2HTMLSTYLES";
        push (@INC, $mydir);
      --- 37,54 ----
        
        # A little painful, but lets us clean up the top level directory a little,
      ! # and not be tied to the current directory (as far as I can tell).  Testing
      ! # an existing definition of $mydir is needed since it cannot be computed when
      ! # run under mkhowto with recent versions of LaTeX2HTML, since this file is
      ! # not read directly by LaTeX2HTML any more.  mkhowto is required to prepend
      ! # the required definition at the top of the actual input file.
      ! #
      ! if (!defined $mydir) {
      !     use Cwd;
      !     use File::Basename;
      !     ($myname, $mydir, $myext) = fileparse(__FILE__, '\..*');
      !     chop $mydir;			# remove trailing '/'
      !     $mydir = getcwd() . "$dd$mydir"
      !         unless $mydir =~ s|^/|/|;
      ! }
        $LATEX2HTMLSTYLES = "$mydir$envkey$LATEX2HTMLSTYLES";
        push (@INC, $mydir);
      ***************
      *** 85,89 ****
        
        
      ! sub custom_driver_hook{
            #
            # This adds the directory of the main input file to $TEXINPUTS; it
      --- 78,82 ----
        
        
      ! sub custom_driver_hook {
            #
            # This adds the directory of the main input file to $TEXINPUTS; it
      ***************
      *** 92,153 ****
            #
            my $file = @_[0];
      !     my($jobname,$dir,$ext) = fileparse($file, '\..*');
      !     $dir = make_directory_absolute($dir);
            $dir =~ s/$dd$//;
            $TEXINPUTS = "$dir$envkey$mytexinputs";
      !     print "\nadding $dir to \$TEXINPUTS\n";
        }
        
      - # Defining this allows us to remove all table of contents and index
      - # processing using an init file; this is required to get rid of the
      - # Table of Contents or we'd get a blank page.  Based on a suggestion
      - # from Ross Moore .
      - #
      - # Seems to require a more recent version of LaTeX2HTML than I've
      - # been using, though.
      - #
      - sub preprocess{
      -     if ($SUPPRESS_CONTENTS) {
      - 	s/\\(tableofcontents|listof(figures|tables))/\2/g;
      -     }
      -     if ($SUPPRESS_INDEXES) {
      - 	s/\\(print|make)index//g;
      -     }
      - }
      - 
        
      ! sub set_icon_size{
      !     my($name, $w, $h) = @_;
      !     $iconsizes{$name} = "width=$w height=$h";
      ! }
      ! 
      ! foreach $name (split(/ /, 'up next previous contents index modules blank')) {
      !     set_icon_size($name, 32, 32);
      ! }
      ! sub adjust_icon_information{
      !     # The '_motif' is really annoying, and makes the HTML larger with no value
      !     # added, so strip it off:
      !     foreach $name (keys %icons) {
      !         my $icon = $icons{$name};
      !         # Strip off the wasteful '_motif':
      !         $icon =~ s/_motif//;
      !         # Change the greyed-out icons to be blank:
      !         $icon =~ s/[a-z]*_gr[.]/blank./;
      !         # make sure we're using the latest $IMAGE_TYPE
      !         $icon =~ s/[.](gif|png)$/.$IMAGE_TYPE/;
      !         $icons{$name} = $icon;
      !     }
      !     $icons{'blank'} = 'blank.' . $IMAGE_TYPE;
      !     
      !     $CUSTOM_BUTTONS = '';
      !     $BLANK_ICON = "\n" . img_tag('blank.' . $IMAGE_TYPE) . "";
      !     $BLANK_ICON =~ s/alt="blank"/alt=""/;
      !     $NAV_BGCOLOR = " bgcolor=\"#99CCFF\"";
      ! }
      ! 
      ! adjust_icon_information();
        
      ! 
      ! sub make_nav_sectref{
            my($label,$title) = @_;
            if ($title) {
      --- 85,100 ----
            #
            my $file = @_[0];
      !     my($jobname, $dir, $ext) = fileparse($file, '\..*');
      !     $dir = L2hos->Make_directory_absolute($dir);
            $dir =~ s/$dd$//;
            $TEXINPUTS = "$dir$envkey$mytexinputs";
      !     print "\nAdding $dir to \$TEXINPUTS\n";
        }
        
        
      ! $CUSTOM_BUTTONS = '';
      ! $NAV_BGCOLOR = " bgcolor=\"#99CCFF\"";
        
      ! sub make_nav_sectref {
            my($label,$title) = @_;
            if ($title) {
      ***************
      *** 157,198 ****
            return '';
        }
        
      ! sub make_nav_panel{
            my $s;
      !     $s = ""
      !          . "\n"
      ! 	 . "\n"
      ! 	 . "\n"
      ! 	 . "\n";
      !     if ($SUPPRESS_CONTENTS && $SUPPRESS_INDEXES) {
      ! 	$s .= ("\n");
      !     }
      !     else {
      ! 	$s .= ("\n"
      ! 	       . ($CONTENTS ? "\n" : $BLANK_ICON)
      ! 	       . "\n" # module index
      ! 	       . ($INDEX ? "\n" : $BLANK_ICON));
      !     }
      !     $s .= ("\n
      $NEXT$UP$PREVIOUS" ! . "\n $t_title\ \ \ " ! . "\n $t_title$CONTENTS$CUSTOM_BUTTONS$INDEX
      " ! . make_nav_sectref("Next", $NEXT_TITLE) ! . make_nav_sectref("Up", $UP_TITLE) ! . make_nav_sectref("Previous", $PREVIOUS_TITLE)); ! # remove these; they are unnecessary and cause error from validation ! $s =~ s/ NAME="tex2html\d+"\n//g; return $s; } sub top_navigation_panel { ! "'; } sub bot_navigation_panel { ! "

      \n

      '; } --- 104,181 ---- return ''; } + + sub make_my_icon { + my($name, $text) = @_; + my $iconserver = ($ICONSERVER eq '.') ? '' : "$ICONSERVER/"; + return "\"$text\""; + } + + $BLANK_ICON = make_my_icon("blank", ""); + + @my_icons = (); + $my_icons{'next_page_inactive'} = $BLANK_ICON; + $my_icons{'previous_page_inactive'} = $BLANK_ICON; + $my_icons{'up_page_inactive'} = $BLANK_ICON; + $x = make_my_icon("next", "Next Page"); + $my_icons{'next_page'} = $x; + $my_icons{'next'} = $x; + $x = make_my_icon("previous", "Previous Page"); + $my_icons{'previous_page'} = $x; + $my_icons{'previous'} = $x; + $my_icons{'up'} = make_my_icon("up", "Up One Level"); + $my_icons{'contents'} = make_my_icon("contents", "Contents"); + $my_icons{'index'} = make_my_icon("index", "Index"); + $my_icons{'modules'} = make_my_icon("modules", "Module Index"); + + + sub use_my_icon { + my $s = @_[0]; + $s =~ s/\/$my_icons{$1}/; + return $s; + } ! sub make_nav_panel { my $s; ! $NEXT = use_my_icon("$NEXT"); ! $UP = use_my_icon("$UP"); ! $PREVIOUS = use_my_icon("$PREVIOUS"); ! $CONTENTS = use_my_icon("$CONTENTS"); ! $INDEX = $INDEX ? use_my_icon("$INDEX") : $BLANK_ICON; ! if (!$CUSTOM_BUTTONS) { ! $CUSTOM_BUTTONS = $BLANK_ICON; ! } ! $s = ('' ! . "\n" ! # left-hand side ! . "\n" ! . "\n" ! . "\n" ! # title box ! . "\n" ! # right-hand side ! . "\n" ! . "\n" # module index ! . "\n" ! . "\n
      $NEXT$UP$PREVIOUS" ! . "\n $t_title$CONTENTS$CUSTOM_BUTTONS$INDEX
      \n" ! # textual navigation ! . make_nav_sectref("Next", $NEXT_TITLE) ! . make_nav_sectref("Up", $UP_TITLE) ! . make_nav_sectref("Previous", $PREVIOUS_TITLE)); ! # remove these; they are unnecessary and cause errors from validation ! $s =~ s/ NAME="tex2html\d+"\n */ /g; return $s; } + sub top_navigation_panel { ! return make_nav_panel() ! . '

      '; } sub bot_navigation_panel { ! return "


      " ! . make_nav_panel(); } *************** *** 202,205 **** --- 185,189 ---- my($dummy, $file, $title) = split($delim, $section_info{join(' ',@link)}); + $icon =~ s/\/$my_icons{$1}/; if ($title && ($file ne $current_file)) { $title = purify($title); *************** *** 207,280 **** return (make_href($file, $icon), make_href($file, "$title")) } ! elsif ($icon eq $up_visible_mark && $EXTERNAL_UP_LINK) { return (make_href($EXTERNAL_UP_LINK, $icon), make_href($EXTERNAL_UP_LINK, "$EXTERNAL_UP_TITLE")) } ! elsif (($icon eq $previous_visible_mark ! || $icon eq $previous_page_visible_mark) && $EXTERNAL_PREV_LINK && $EXTERNAL_PREV_TITLE) { return (make_href($EXTERNAL_PREV_LINK, $icon), make_href($EXTERNAL_PREV_LINK, "$EXTERNAL_PREV_TITLE")) } ! elsif (($icon eq $next_visible_mark ! || $icon eq $next_page_visible_mark) && $EXTERNAL_DOWN_LINK && $EXTERNAL_DOWN_TITLE) { return (make_href($EXTERNAL_DOWN_LINK, $icon), make_href($EXTERNAL_DOWN_LINK, "$EXTERNAL_DOWN_TITLE")) } ! (&inactive_img($icon), ""); } sub add_special_link { my($icon, $file, $current_file) = @_; ! (($file && ($file ne $current_file)) ? make_href($file, $icon) : undef) } ! sub img_tag { ! local($icon) = @_; ! my $alt; ! my $align = " align=bottom "; ! ! # having this list hardcoded here is really bogus.... ! $alt = join('|', 'up', 'next_group', 'previous_group' ! , 'next', 'previous', 'change_begin_right', 'change_begin' ! , 'change_end_right', 'change_end', 'change_delete_right' ! , 'change_delete', 'contents', 'index', 'modules', 'blank'); ! ! if ($icon =~ /(gif|png)$/) { ! $used_icons{$icon} = 1; ! if ($icon =~ /change_(begin|end|delete)_right/) { $align = ' ' }; ! my $nav_border = "$NAV_BORDER"; ! if ($icon =~ /($alt)/) { ! $alt = $1; ! $alt = "" ! if ($alt eq "blank"); ! } ! else { ! $nav_border = '1'; ! $alt = '[*]'; ! }; ! if ($LOCAL_ICONS) { ! return join('', '', $alt
! 			,'' ); ! } ! my $s = join('', '', $alt, ' ); ! # if $ICONSERVER starts with "./", remove "./": ! $s =~ s|src="(.\/)+|src="|; ! return $s; ! } ! else { ! return $icon; ! } ! } ! sub do_cmd_arabic { # get rid of that nasty ... ! local($ctr, $val, $id, $_) = &read_counter_value(@_[0]); ! return ($val ? &farabic($val) : "0") . $_; } --- 191,231 ---- return (make_href($file, $icon), make_href($file, "$title")) } ! elsif ($icon eq $my_icons{"up"} && $EXTERNAL_UP_LINK) { return (make_href($EXTERNAL_UP_LINK, $icon), make_href($EXTERNAL_UP_LINK, "$EXTERNAL_UP_TITLE")) } ! elsif ($icon eq $my_icons{"previous"} && $EXTERNAL_PREV_LINK && $EXTERNAL_PREV_TITLE) { return (make_href($EXTERNAL_PREV_LINK, $icon), make_href($EXTERNAL_PREV_LINK, "$EXTERNAL_PREV_TITLE")) } ! elsif ($icon eq $my_icons{"next"} && $EXTERNAL_DOWN_LINK && $EXTERNAL_DOWN_TITLE) { return (make_href($EXTERNAL_DOWN_LINK, $icon), make_href($EXTERNAL_DOWN_LINK, "$EXTERNAL_DOWN_TITLE")) } ! return (&inactive_img($icon), ""); } sub add_special_link { my($icon, $file, $current_file) = @_; ! $icon =~ s/\/$my_icons{$1}/; ! return (($file && ($file ne $current_file)) ! ? make_href($file, $icon) ! : undef) } ! # The img_tag() function seems only to be called with the parameter ! # 'anchor_invisible_mark', which we want to turn into ''. Since ! # replace_icon_marks() is the only interesting caller, and all it really ! # does is call img_tag(), we can just define the hook alternative to be ! # a no-op instead. ! # ! sub replace_icons_hook {} sub do_cmd_arabic { # get rid of that nasty ... ! my($ctr, $val, $id, $text) = &read_counter_value(@_[0]); ! return ($val ? farabic($val) : "0") . $text; } *************** *** 286,290 **** } ! sub insert_index{ my($mark,$datafile,$columns,$letters,$prefix) = @_; my $prog = "$myrootdir/tools/buildindex.py"; --- 237,241 ---- } ! sub insert_index { my($mark,$datafile,$columns,$letters,$prefix) = @_; my $prog = "$myrootdir/tools/buildindex.py"; *************** *** 299,303 **** } ! sub add_idx{ print "\nBuilding HTML for the index ..."; close(IDXFILE); --- 250,254 ---- } ! sub add_idx { print "\nBuilding HTML for the index ..."; close(IDXFILE); *************** *** 309,313 **** $idx_module_title = 'Module Index'; ! sub add_module_idx{ print "\nBuilding HTML for the module index ..."; my $key; --- 260,264 ---- $idx_module_title = 'Module Index'; ! sub add_module_idx { print "\nBuilding HTML for the module index ..."; my $key; *************** *** 357,361 **** # replace both indexes as needed: ! sub add_idx_hook{ add_idx() if (/$idx_mark/); add_module_idx() if (/$idx_module_mark/); --- 308,312 ---- # replace both indexes as needed: ! sub add_idx_hook { add_idx() if (/$idx_mark/); add_module_idx() if (/$idx_module_mark/); *************** *** 368,374 **** sub do_cmd_tableofcontents { local($_) = @_; - # if ($SUPPRESS_CONTENTS) { - # return $_; - # } $TITLE = $toc_title; $tocfile = $CURRENT_FILE; --- 319,322 ---- *************** *** 466,494 **** s/([\\]begin\s*$O\d+$C\s*thebibliography)/$bbl_cnt++; $1/eg; s/([\\]begin\s*$O\d+$C\s*thebibliography)/$id++; "\\bibliography$O$id$C$O$id$C $1"/geo; ! #---------------------------------------------------------------------- ! # (FLD) This was added ! if ($SUPPRESS_INDEXES) { ! $CUSTOM_BUTTONS .= img_tag('blank.' . $IMAGE_TYPE); } else { ! my(@parts) = split(/\\begin\s*$O\d+$C\s*theindex/); ! if (scalar(@parts) == 3) { ! # Be careful to re-write the string in place, since $_ is *not* ! # returned explicity; *** nasty side-effect dependency! *** ! print "\nadd_bbl_and_idx_dummy_commands ==> adding module index"; ! my $rx = "([\\\\]begin\\s*$O\\d+$C\\s*theindex[\\s\\S]*)" ! . "([\\\\]begin\\s*$O\\d+$C\\s*theindex)"; ! s/$rx/\\textohtmlmoduleindex \1 \\textohtmlindex \2/o; ! # Add a button to the navigation areas: ! $CUSTOM_BUTTONS .= ("" ! . img_tag('modules.'.$IMAGE_TYPE) . ""); ! } ! else { ! $CUSTOM_BUTTONS .= img_tag('blank.' . $IMAGE_TYPE); ! $global{'max_id'} = $id; # not sure why.... ! s/([\\]begin\s*$O\d+$C\s*theindex)/\\textohtmlindex $1/o; s/[\\]printindex/\\textohtmlindex /o; } - } #---------------------------------------------------------------------- lib_add_bbl_and_idx_dummy_commands() --- 414,434 ---- s/([\\]begin\s*$O\d+$C\s*thebibliography)/$bbl_cnt++; $1/eg; s/([\\]begin\s*$O\d+$C\s*thebibliography)/$id++; "\\bibliography$O$id$C$O$id$C $1"/geo; ! my(@parts) = split(/\\begin\s*$O\d+$C\s*theindex/); ! if (scalar(@parts) == 3) { ! # Be careful to re-write the string in place, since $_ is *not* ! # returned explicity; *** nasty side-effect dependency! *** ! print "\nadd_bbl_and_idx_dummy_commands ==> adding module index"; ! my $rx = "([\\\\]begin\\s*$O\\d+$C\\s*theindex[\\s\\S]*)" ! . "([\\\\]begin\\s*$O\\d+$C\\s*theindex)"; ! s/$rx/\\textohtmlmoduleindex \1 \\textohtmlindex \2/o; ! # Add a button to the navigation areas: ! $CUSTOM_BUTTONS .= $my_icons{'modules'}; } else { ! $CUSTOM_BUTTONS .= $BLANK_ICON; ! $global{'max_id'} = $id; # not sure why.... ! s/([\\]begin\s*$O\d+$C\s*theindex)/\\textohtmlindex $1/o; s/[\\]printindex/\\textohtmlindex /o; } #---------------------------------------------------------------------- lib_add_bbl_and_idx_dummy_commands() *************** *** 532,553 **** - # Fix from Ross Moore for ']' in \item[...]; this can be removed once the next - # patch to LaTeX2HTML is released and tested ... if the patch gets included. - # Be very careful to keep this around, just in case things break again! - # - sub protect_useritems { - local(*_) = @_; - local($preitems,$thisitem); - while (/\\item\s*\[/) { - $preitems .= $`; - $_ = $'; - $thisitem = $&.'<<'.++$global{'max_id'}.'>>'; - s/^(((($O|$OP)\d+($C|$CP)).*\3|<[^<>]*>|[^\]<]+)*)\]/$thisitem.=$1;''/e; - $preitems .= $thisitem . '<<' . $global{'max_id'} . '>>]'; - s/^]//; - } - $_ = $preitems . $_; - } - # This changes the markup used for {verbatim} environments, and is the # best way I've found that ensures the
      goes on the outside of the --- 472,475 ---- *************** *** 567,578 **** # page. sub make_head_and_body { ! local($title,$body) = @_; ! local($DTDcomment) = ''; ! local($version,$isolanguage) = ($HTML_VERSION, 'EN'); ! local(%isolanguages) = ( 'english', 'EN' , 'USenglish', 'EN.US' ! , 'original', 'EN' , 'german' , 'DE' ! , 'austrian', 'DE.AT', 'french' , 'FR' ! , 'spanish', 'ES' ! , %isolanguages ); $isolanguage = $isolanguages{$default_language}; $isolanguage = 'EN' unless $isolanguage; --- 489,499 ---- # page. sub make_head_and_body { ! my($title, $body) = @_; ! my $DTDcomment = ''; ! my($version, $isolanguage) = ($HTML_VERSION, 'EN'); ! my %isolanguages = ( 'english', 'EN' , 'USenglish', 'EN.US' ! , 'original', 'EN' , 'german' , 'DE' ! , 'austrian', 'DE.AT', 'french' , 'FR' ! , 'spanish', 'ES'); $isolanguage = $isolanguages{$default_language}; $isolanguage = 'EN' unless $isolanguage; From python-dev@python.org Mon Jul 31 18:57:01 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 31 Jul 2000 10:57:01 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc README,1.39,1.40 Message-ID: <200007311757.KAA08518@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv8503 Modified Files: README Log Message: Update to indicate the appropriate version of LaTeX2HTML. Update pointer for retrieving new versions. Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/README,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** README 2000/06/30 23:50:37 1.39 --- README 2000/07/31 17:56:58 1.40 *************** *** 127,138 **** . ! - LaTeX2HTML 98.2b6. Older version will fail with the new ! directory layout. Version 98.2b8 specifically does not ! work; it translates `` and '' to “ and ”, which ! are not supported by popular Web browsers. This also screws ! up code fragments. ;-( Releases are available at: ! . ! Really new versions also don't work, but I'm not sure when ! things broke. --- 127,136 ---- . ! - LaTeX2HTML 99.2b8. Older versions are not supported; each ! version changes enough that supporting multiple versions is not ! likely to work. Many older versions don't work with Perl ! 5.6 as well. This also screws up code fragments. ;-( ! Releases are available at: ! . From python-dev@python.org Mon Jul 31 19:18:33 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 31 Jul 2000 11:18:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc TODO,1.28,1.29 Message-ID: <200007311818.LAA17764@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv17750/Doc Modified Files: TODO Log Message: Organized a little bit; merged in some items from the 1.5.2p2 branch that did not get handled. Index: TODO =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/TODO,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** TODO 2000/06/29 03:33:28 1.28 --- TODO 2000/07/31 18:18:27 1.29 *************** *** 2,6 **** --- 2,18 ---- =============================== + General + ------- + * Figure out HTMLHelp generation for the Windows world. + + * Straighten out random/whrandom. Things are generally in the right + place, but need to respond to comments in email from Jan Kim + . + + + Python/C API + ------------ + * The "Very High Level Interface" in the API document has been requested; I guess it wouldn't hurt to fill in a bit there. Request *************** *** 10,25 **** parameter to the method implementation function. (Missing material mentioned in the Extending & Embedding manual, section 1.1; problem ! reported by Clay Spence .) ! * In the extensions manual, more information is needed about building ! dynamically linked extensions in C++. Specifically, the extensions ! must be linked against the C++ libraries (and possibly runtime). ! Also noted by Albert Hofkamp . ! ! * Python/C API reference missing PyArg_ParseTuple(), ! PyArg_ParseTupleAndKeywords(), Py_BuildValue(). Information ! requested by Greg Kochanski . PyEval_EvalCode() ! has also been requested. * Update the pickle documentation to describe all of the current behavior; only a subset is described. __reduce__, etc. Partial --- 22,54 ---- parameter to the method implementation function. (Missing material mentioned in the Extending & Embedding manual, section 1.1; problem ! reported by Clay Spence .) Heavily impacts one ! chapter of the Python/C API manual. ! ! * Missing PyArg_ParseTuple(), PyArg_ParseTupleAndKeywords(), ! Py_BuildValue(). Information requested by Greg Kochanski ! . PyEval_EvalCode() has also been requested. ! ! Extending & Embedding ! --------------------- ! ! * More information is needed about building dynamically linked ! extensions in C++. Specifically, the extensions must be linked ! against the C++ libraries (and possibly runtime). Also noted by ! Albert Hofkamp . ! ! Reference Manual ! ---------------- ! * Document the Extended Call Syntax in the language reference. ! [Jeremy Hylton] + * Document new comparison support for recursive objects (lang. ref.? + library ref.? (cmp() function). [Jeremy Hylton] + + Library Reference + ----------------- + + * urllib2 module reference. [Jeremy Hylton] + * Update the pickle documentation to describe all of the current behavior; only a subset is described. __reduce__, etc. Partial *************** *** 28,40 **** * Update the code/codeop module documentation. - * Figure out HTMLHelp generation for the Windows world. - - * Straighten out random/whrandom. - - * Update the filecmp documentation (Moshe?). - * Update the httplib documentation to match Greg Stein's HTTP/1.1 support and new classes. (Greg, this is yours!) NOT WORTH THE TROUBLE --- 57,69 ---- * Update the code/codeop module documentation. * Update the httplib documentation to match Greg Stein's HTTP/1.1 support and new classes. (Greg, this is yours!) + Tutorial + -------- + + * Update tutorial to use string methods and talk about backward + compatibility of same. + NOT WORTH THE TROUBLE *************** *** 46,50 **** really worth the pain. (Only an issue at all when a header-letter and the first index entry get separated -- can change as soon as we ! change the index entries in the text.) * Fix problem with howto documents getting the last module synopsis --- 75,80 ---- really worth the pain. (Only an issue at all when a header-letter and the first index entry get separated -- can change as soon as we ! change the index entries in the text.) Also only a problem in the ! print version. * Fix problem with howto documents getting the last module synopsis From python-dev@python.org Mon Jul 31 19:26:37 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 31 Jul 2000 11:26:37 -0700 Subject: [Python-checkins] CVS: python/dist/src Makefile.in,1.91,1.92 Message-ID: <200007311826.LAA18697@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv18682 Modified Files: Makefile.in Log Message: A different solution for Patch #100979: support for out-of-tree "make TAGS" The version there built the tags and TAGS files in the build directory. I like them in the source directory. The simplest solution is to cd to the source directory before running ctags or etags. Tested both superficially and they work for me, on Linux Red Hat 6.1. Index: Makefile.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Makefile.in,v retrieving revision 1.91 retrieving revision 1.92 diff -C2 -r1.91 -r1.92 *** Makefile.in 2000/07/04 04:15:53 1.91 --- Makefile.in 2000/07/31 18:26:35 1.92 *************** *** 461,471 **** # Create a tags file for vi tags:: ! ctags -w -t Include/*.h ! for i in $(SUBDIRS); do ctags -w -t -a $$i/*.[ch]; done sort tags -o tags # Create a tags file for GNU Emacs TAGS:: ! etags Include/*.h for i in $(SUBDIRS); do etags -a $$i/*.[ch]; done --- 461,474 ---- # Create a tags file for vi tags:: ! cd $(srcdir); \ ! ctags -w -t Include/*.h; \ ! for i in $(SUBDIRS); do ctags -w -t -a $$i/*.[ch]; \ ! done; \ sort tags -o tags # Create a tags file for GNU Emacs TAGS:: ! cd $(srcdir); \ ! etags Include/*.h; \ for i in $(SUBDIRS); do etags -a $$i/*.[ch]; done From python-dev@python.org Mon Jul 31 21:08:26 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 31 Jul 2000 13:08:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/ref ref5.tex,1.30,1.31 Message-ID: <200007312008.NAA10428@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ref In directory slayer.i.sourceforge.net:/tmp/cvs-serv10421/ref Modified Files: ref5.tex Log Message: Change as suggested by Peter Funk : Create a hyperlink between the language reference and documentation for the built in functions. Index: ref5.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref5.tex,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -r1.30 -r1.31 *** ref5.tex 2000/07/11 19:43:47 1.30 --- ref5.tex 2000/07/31 20:08:23 1.31 *************** *** 454,459 **** \item[a built-in function or method:] The result is up to the ! interpreter; see the library reference manual for the descriptions of ! built-in functions and methods. \indexii{function}{call} \indexii{built-in function}{call} --- 454,460 ---- \item[a built-in function or method:] The result is up to the ! interpreter; see the \citetitle[../lib/built-in-funcs.html]{Python ! Library Reference} for the descriptions of built-in functions and ! methods. \indexii{function}{call} \indexii{built-in function}{call} From python-dev@python.org Mon Jul 31 21:13:26 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 31 Jul 2000 13:13:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/perl l2hinit.perl,1.43,1.44 Message-ID: <200007312013.NAA10779@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/perl In directory slayer.i.sourceforge.net:/tmp/cvs-serv10768/perl Modified Files: l2hinit.perl Log Message: Change as suggested by Peter Funk : Move around the navigational links on the left-hand side of the navigation bar to be more like the cursor keys. Index: l2hinit.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/l2hinit.perl,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -r1.43 -r1.44 *** l2hinit.perl 2000/07/31 17:53:45 1.43 --- l2hinit.perl 2000/07/31 20:13:23 1.44 *************** *** 149,155 **** . "\n" # left-hand side - . "\n$NEXT" - . "\n$UP" . "\n$PREVIOUS" # title box . "\n" --- 149,155 ---- . "\n" # left-hand side . "\n$PREVIOUS" + . "\n$UP" + . "\n$NEXT" # title box . "\n" *************** *** 161,167 **** . "\n\n" # textual navigation ! . make_nav_sectref("Next", $NEXT_TITLE) . make_nav_sectref("Up", $UP_TITLE) ! . make_nav_sectref("Previous", $PREVIOUS_TITLE)); # remove these; they are unnecessary and cause errors from validation $s =~ s/ NAME="tex2html\d+"\n */ /g; --- 161,168 ---- . "\n\n" # textual navigation ! . make_nav_sectref("Previous", $PREVIOUS_TITLE) . make_nav_sectref("Up", $UP_TITLE) ! . make_nav_sectref("Next", $NEXT_TITLE) ! ); # remove these; they are unnecessary and cause errors from validation $s =~ s/ NAME="tex2html\d+"\n */ /g; From python-dev@python.org Mon Jul 31 21:15:20 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 31 Jul 2000 13:15:20 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0217.txt,NONE,1.1 Message-ID: <200007312015.NAA10935@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv10925 Added Files: pep-0217.txt Log Message: PEP 217, Display Hook for Interactive Use, assigned moshez ***** Error reading new file(2, 'No such file or directory') From python-dev@python.org Mon Jul 31 21:15:50 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 31 Jul 2000 13:15:50 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.16,1.17 Message-ID: <200007312015.NAA11059@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv11051 Modified Files: pep-0000.txt Log Message: Added PEP 217, Display Hook for Interactive Use, assigned moshez Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** pep-0000.txt 2000/07/31 16:38:12 1.16 --- pep-0000.txt 2000/07/31 20:15:48 1.17 *************** *** 38,41 **** --- 38,42 ---- 215 pep-0215.txt String Interpolation ping 216 pep-0216.txt Docstring Format moshez + 217 pep-0217.txt Display Hook for Interactive Use moshez From python-dev@python.org Mon Jul 31 21:20:34 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 31 Jul 2000 13:20:34 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0218.txt,NONE,1.1 Message-ID: <200007312020.NAA11401@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv11391 Added Files: pep-0218.txt Log Message: PEP 218, Adding a Built-In Set Object Type, assigned to gvwilson. --- NEW FILE --- PEP: 218 Title: Adding a Built-In Set Object Type Version: $Revision: 1.1 $ Author: gvwilson@nevex.com (Greg Wilson) Python-Version: 2.1 Status: Draft Created: 31-Jul-2000 Post-History: Abstract Sets are a fundamental mathematical structure, and are commonly used to both specify and implement programs. Sets are often implemented as dictionaries with "don't care" values, but this leaves the meaning of intersection, union, difference, and other basic operations are ambiguous. This PEP therefore proposes syntax and semantics for a concrete, built-in set type. Local Variables: mode: indented-text indent-tabs-mode: nil End: From python-dev@python.org Mon Jul 31 21:20:54 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 31 Jul 2000 13:20:54 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.17,1.18 Message-ID: <200007312020.NAA11511@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv11500 Modified Files: pep-0000.txt Log Message: Added PEP 218, Adding a Built-In Set Object Type, assigned to gvwilson. Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** pep-0000.txt 2000/07/31 20:15:48 1.17 --- pep-0000.txt 2000/07/31 20:20:52 1.18 *************** *** 39,42 **** --- 39,43 ---- 216 pep-0216.txt Docstring Format moshez 217 pep-0217.txt Display Hook for Interactive Use moshez + 218 pep-0218.txt Adding a Built-In Set Object Type gvwilson From python-dev@python.org Mon Jul 31 21:47:20 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 31 Jul 2000 13:47:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules arraymodule.c,2.49,2.50 Message-ID: <200007312047.NAA13896@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv13844 Modified Files: arraymodule.c Log Message: added count, extend, index, pop and remove to arraymodule Index: arraymodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v retrieving revision 2.49 retrieving revision 2.50 diff -C2 -r2.49 -r2.50 *** arraymodule.c 2000/07/21 06:00:07 2.49 --- arraymodule.c 2000/07/31 20:47:15 2.50 *************** *** 675,678 **** --- 675,835 ---- static PyObject * + array_count(arrayobject *self, PyObject *args) + { + int count = 0; + int i; + PyObject *v; + + if (!PyArg_ParseTuple(args, "O:count", &v)) + return NULL; + for (i = 0; i < self->ob_size; i++) { + PyObject *selfi = getarrayitem((PyObject *)self, i); + if (PyObject_Compare(selfi, v) == 0) + count++; + Py_DECREF(selfi); + if (PyErr_Occurred()) + return NULL; + } + return PyInt_FromLong((long)count); + } + + static char count_doc [] = + "count (x)\n\ + \n\ + Return number of occurences of x in the array."; + + static PyObject * + array_index(arrayobject *self, PyObject *args) + { + int i; + PyObject *v; + + if (!PyArg_ParseTuple(args, "O:index", &v)) + return NULL; + for (i = 0; i < self->ob_size; i++) { + PyObject *selfi = getarrayitem((PyObject *)self, i); + if (PyObject_Compare(selfi, v) == 0) { + Py_DECREF(selfi); + return PyInt_FromLong((long)i); + } + Py_DECREF(selfi); + if (PyErr_Occurred()) + return NULL; + } + PyErr_SetString(PyExc_ValueError, "array.index(x): x not in list"); + return NULL; + } + + static char index_doc [] = + "index (x)\n\ + \n\ + Return index of first occurence of x in the array."; + + static PyObject * + array_remove(arrayobject *self, PyObject *args) + { + int i; + PyObject *v; + + if (!PyArg_ParseTuple(args, "O:remove", &v)) + return NULL; + for (i = 0; i < self->ob_size; i++) { + PyObject *selfi = getarrayitem((PyObject *)self,i); + if (PyObject_Compare(selfi, v) == 0) { + Py_DECREF(selfi); + if (array_ass_slice(self, i, i+1, + (PyObject *)NULL) != 0) + return NULL; + Py_INCREF(Py_None); + return Py_None; + } + Py_DECREF(selfi); + if (PyErr_Occurred()) + return NULL; + } + PyErr_SetString(PyExc_ValueError, "array.remove(x): x not in list"); + return NULL; + } + + static char remove_doc [] = + "remove (x)\n\ + \n\ + Remove the first occurence of x in the array."; + + static PyObject * + array_pop(arrayobject *self, PyObject *args) + { + int i = -1; + PyObject *v; + if (!PyArg_ParseTuple(args, "|i:pop", &i)) + return NULL; + if (self->ob_size == 0) { + /* Special-case most common failure cause */ + PyErr_SetString(PyExc_IndexError, "pop from empty array"); + return NULL; + } + if (i < 0) + i += self->ob_size; + if (i < 0 || i >= self->ob_size) { + PyErr_SetString(PyExc_IndexError, "pop index out of range"); + return NULL; + } + v = getarrayitem((PyObject *)self,i); + if (array_ass_slice(self, i, i+1, (PyObject *)NULL) != 0) { + Py_DECREF(v); + return NULL; + } + return v; + } + + static char pop_doc [] = + "pop ([i])\n\ + \n\ + Return the i-th element and delete it from the array. i defaults to -1."; + + static PyObject * + array_extend(self, args) + arrayobject *self; + PyObject *args; + { + int size; + PyObject *bb; + arrayobject *np; + + if (!PyArg_ParseTuple(args, "O:extend", &bb)) + return NULL; + + if (!is_arrayobject(bb)) { + PyErr_Format(PyExc_TypeError, + "can only append array (not \"%.200s\") to array", + bb->ob_type->tp_name); + return NULL; + } + #define b ((arrayobject *)bb) + if (self->ob_descr != b->ob_descr) { + PyErr_SetString(PyExc_TypeError, + "can only append arrays of same kind"); + return NULL; + } + size = self->ob_size + b->ob_size; + PyMem_RESIZE(self->ob_item, char, size*self->ob_descr->itemsize); + if (self->ob_item == NULL) { + PyObject_Del(self); + return PyErr_NoMemory(); + } + memcpy(self->ob_item + self->ob_size*self->ob_descr->itemsize, + b->ob_item, b->ob_size*b->ob_descr->itemsize); + self->ob_size = size; + Py_INCREF(Py_None); + return Py_None; + #undef b + } + + static char extend_doc [] = + "extend(array)\n\ + \n\ + Append array items to the end of the array."; + + static PyObject * array_insert(arrayobject *self, PyObject *args) { *************** *** 817,888 **** Reverse the order of the items in the array."; - /* The following routines were adapted from listobject.c but not converted. - To make them work you will have to work! */ - - #if 0 - static PyObject * - array_index(arrayobject *self, PyObject *args) - { - int i; - - if (args == NULL) { - PyErr_BadArgument(); - return NULL; - } - for (i = 0; i < self->ob_size; i++) { - if (PyObject_Compare(self->ob_item[i], args) == 0) - return PyInt_FromLong((long)i); - /* XXX PyErr_Occurred */ - } - PyErr_SetString(PyExc_ValueError, "array.index(x): x not in array"); - return NULL; - } - #endif - - #if 0 - static PyObject * - array_count(arrayobject *self, PyObject *args) - { - int count = 0; - int i; - - if (args == NULL) { - PyErr_BadArgument(); - return NULL; - } - for (i = 0; i < self->ob_size; i++) { - if (PyObject_Compare(self->ob_item[i], args) == 0) - count++; - /* XXX PyErr_Occurred */ - } - return PyInt_FromLong((long)count); - } - #endif - - #if 0 - static PyObject * - array_remove(arrayobject *self, PyObject *args) - { - int i; - - if (args == NULL) { - PyErr_BadArgument(); - return NULL; - } - for (i = 0; i < self->ob_size; i++) { - if (PyObject_Compare(self->ob_item[i], args) == 0) { - if (array_ass_slice(self, i, i+1, - (PyObject *)NULL) != 0) - return NULL; - Py_INCREF(Py_None); - return Py_None; - } - /* XXX PyErr_Occurred */ - } - PyErr_SetString(PyExc_ValueError, "array.remove(x): x not in array"); - return NULL; - } - #endif - static PyObject * array_fromfile(arrayobject *self, PyObject *args) --- 974,977 ---- *************** *** 1096,1109 **** {"byteswap", (PyCFunction)array_byteswap, METH_VARARGS, byteswap_doc}, ! /* {"count", (method)array_count},*/ {"fromfile", (PyCFunction)array_fromfile, 0, fromfile_doc}, {"fromlist", (PyCFunction)array_fromlist, 0, fromlist_doc}, {"fromstring", (PyCFunction)array_fromstring, 0, fromstring_doc}, ! /* {"index", (method)array_index},*/ {"insert", (PyCFunction)array_insert, 0, insert_doc}, {"read", (PyCFunction)array_fromfile, 0, fromfile_doc}, ! /* {"remove", (method)array_remove},*/ {"reverse", (PyCFunction)array_reverse, 0, reverse_doc}, ! /* {"sort", (method)array_sort},*/ {"tofile", (PyCFunction)array_tofile, 0, tofile_doc}, {"tolist", (PyCFunction)array_tolist, 0, tolist_doc}, --- 1185,1200 ---- {"byteswap", (PyCFunction)array_byteswap, METH_VARARGS, byteswap_doc}, ! {"count", (PyCFunction)array_count, 1, count_doc}, ! {"extend", (PyCFunction)array_extend, 1, extend_doc}, {"fromfile", (PyCFunction)array_fromfile, 0, fromfile_doc}, {"fromlist", (PyCFunction)array_fromlist, 0, fromlist_doc}, {"fromstring", (PyCFunction)array_fromstring, 0, fromstring_doc}, ! {"index", (PyCFunction)array_index, 1, index_doc}, {"insert", (PyCFunction)array_insert, 0, insert_doc}, + {"pop", (PyCFunction)array_pop, 1, pop_doc}, {"read", (PyCFunction)array_fromfile, 0, fromfile_doc}, ! {"remove", (PyCFunction)array_remove, 1, remove_doc}, {"reverse", (PyCFunction)array_reverse, 0, reverse_doc}, ! /* {"sort", (PyCFunction)array_sort, 0, sort_doc},*/ {"tofile", (PyCFunction)array_tofile, 0, tofile_doc}, {"tolist", (PyCFunction)array_tolist, 0, tolist_doc}, *************** *** 1365,1373 **** --- 1456,1469 ---- buffer_info() -- return information giving the current memory info\n\ byteswap() -- byteswap all the items of the array\n\ + count() -- return number of occurences of an object\n\ + extend() -- extend array by appending array elements\n\ fromfile() -- read items from a file object\n\ fromlist() -- append items from the list\n\ fromstring() -- append items from the string\n\ + index() -- return index of first occurence of an object\n\ insert() -- insert a new item into the array at a provided position\n\ + pop() -- remove and return item (default last)\n\ read() -- DEPRECATED, use fromfile()\n\ + remove() -- remove first occurence of an object\n\ reverse() -- reverse the order of the items in the array\n\ tofile() -- write all items to a file object\n\ From python-dev@python.org Mon Jul 31 21:50:00 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 31 Jul 2000 13:50:00 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_array.py,1.7,1.8 Message-ID: <200007312050.NAA14034@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv14022 Modified Files: test_array.py Log Message: added count, extend, index, pop and remove to arraymodule Index: test_array.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_array.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** test_array.py 2000/06/28 17:50:51 1.7 --- test_array.py 2000/07/31 20:49:58 1.8 *************** *** 106,109 **** --- 106,129 ---- if a != array.array(type, "aabcdee"): raise TestFailed, "array(%s) self-slice-assign (cntr)" % `type` + if a.index("e") != 5: + raise TestFailed, "array(%s) index-test" % `type` + if a.count("a") != 2: + raise TestFailed, "array(%s) count-test" % `type` + a.remove("e") + if a != array.array(type, "aabcde"): + raise TestFailed, "array(%s) remove-test" % `type` + if a.pop(0) != "a": + raise TestFailed, "array(%s) pop-test" % `type` + if a.pop(1) != "b": + raise TestFailed, "array(%s) pop-test" % `type` + a.extend(array.array(type, "xyz")) + if a != array.array(type, "acdexyz"): + raise TestFailed, "array(%s) extend-test" % `type` + a.pop() + a.pop() + a.pop() + a.pop() + if a != array.array(type, "acd"): + raise TestFailed, "array(%s) pop-test" % `type` else: a = array.array(type, [1, 2, 3, 4, 5]) *************** *** 119,122 **** --- 139,162 ---- if a != array.array(type, [1, 1, 2, 3, 4, 5, 5]): raise TestFailed, "array(%s) self-slice-assign (cntr)" % `type` + if a.index(5) != 5: + raise TestFailed, "array(%s) index-test" % `type` + if a.count(1) != 2: + raise TestFailed, "array(%s) count-test" % `type` + a.remove(5) + if a != array.array(type, [1, 1, 2, 3, 4, 5]): + raise TestFailed, "array(%s) remove-test" % `type` + if a.pop(0) != 1: + raise TestFailed, "array(%s) pop-test" % `type` + if a.pop(1) != 2: + raise TestFailed, "array(%s) pop-test" % `type` + a.extend(array.array(type, [7, 8, 9])) + if a != array.array(type, [1, 3, 4, 5, 7, 8, 9]): + raise TestFailed, "array(%s) extend-test" % `type` + a.pop() + a.pop() + a.pop() + a.pop() + if a != array.array(type, [1, 3, 4]): + raise TestFailed, "array(%s) pop-test" % `type` # test that overflow exceptions are raised as expected for assignment From python-dev@python.org Mon Jul 31 21:52:24 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 31 Jul 2000 13:52:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libarray.tex,1.24,1.25 libstdtypes.tex,1.24,1.25 Message-ID: <200007312052.NAA14268@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv14223 Modified Files: libarray.tex libstdtypes.tex Log Message: added count, extend, index, pop and remove to arraymodule Index: libarray.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libarray.tex,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** libarray.tex 2000/04/03 20:13:52 1.24 --- libarray.tex 2000/07/31 20:52:21 1.25 *************** *** 84,87 **** --- 84,95 ---- \end{methoddesc} + \begin{methoddesc}[array]{count}{x} + Return the number of occurences of \var{x} in the array. + \end{methoddesc} + + \begin{methoddesc}[array]{extend}{a} + Append array items from \var{a} to the end of the array. + \end{methoddesc} + \begin{methoddesc}[array]{fromfile}{f, n} Read \var{n} items (as machine values) from the file object \var{f} *************** *** 105,108 **** --- 113,121 ---- \end{methoddesc} + \begin{methoddesc}[array]{index}{x} + Return the smallest \var{i} such that \var{i} is the index of + the first occurence of \var{x} in the array. + \end{methoddesc} + \begin{methoddesc}[array]{insert}{i, x} Insert a new item with value \var{x} in the array before position *************** *** 110,113 **** --- 123,132 ---- \end{methoddesc} + \begin{methoddesc}[array]{pop}{\optional{i}} + Removes the item with the index \var{i} from the array and returns + it. The optional argument defaults to \code{-1}, so that by default + the last item is removed and returned. + \end{methoddesc} + \begin{methoddesc}[array]{read}{f, n} \deprecated {1.5.1} *************** *** 119,122 **** --- 138,145 ---- built-in file object; something else with a \method{read()} method won't do. + \end{methoddesc} + + \begin{methoddesc}[array]{remove}{x} + Remove the first occurence of \var{x} from the array. \end{methoddesc} Index: libstdtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** libstdtypes.tex 2000/07/31 16:34:46 1.24 --- libstdtypes.tex 2000/07/31 20:52:21 1.25 *************** *** 507,512 **** \var{s}. ! \item[(4)] The \method{pop()} method is experimental and not supported ! by other mutable sequence types than lists. The optional argument \var{i} defaults to \code{-1}, so that by default the last item is removed and returned. --- 507,512 ---- \var{s}. ! \item[(4)] The \method{pop()} method is experimental and at the moment ! only supported by the list and array types. The optional argument \var{i} defaults to \code{-1}, so that by default the last item is removed and returned. From python-dev@python.org Mon Jul 31 22:57:33 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 31 Jul 2000 14:57:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules arraymodule.c,2.50,2.51 Message-ID: <200007312157.OAA02291@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2155 Modified Files: arraymodule.c Log Message: replaced PyArgs_Parse by PyArgs_ParseTuple changed error messages for extend method from "append" to "extend" Index: arraymodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v retrieving revision 2.50 retrieving revision 2.51 diff -C2 -r2.50 -r2.51 *** arraymodule.c 2000/07/31 20:47:15 2.50 --- arraymodule.c 2000/07/31 21:57:30 2.51 *************** *** 802,806 **** if (!is_arrayobject(bb)) { PyErr_Format(PyExc_TypeError, ! "can only append array (not \"%.200s\") to array", bb->ob_type->tp_name); return NULL; --- 802,806 ---- if (!is_arrayobject(bb)) { PyErr_Format(PyExc_TypeError, ! "can only extend array with array (not \"%.200s\")", bb->ob_type->tp_name); return NULL; *************** *** 809,813 **** if (self->ob_descr != b->ob_descr) { PyErr_SetString(PyExc_TypeError, ! "can only append arrays of same kind"); return NULL; } --- 809,813 ---- if (self->ob_descr != b->ob_descr) { PyErr_SetString(PyExc_TypeError, ! "can only extend with array of same kind"); return NULL; } *************** *** 836,840 **** int i; PyObject *v; ! if (!PyArg_Parse(args, "(iO)", &i, &v)) return NULL; return ins(self, i, v); --- 836,840 ---- int i; PyObject *v; ! if (!PyArg_ParseTuple(args, "iO:insert", &i, &v)) return NULL; return ins(self, i, v); *************** *** 870,874 **** { PyObject *v; ! if (!PyArg_Parse(args, "O", &v)) return NULL; return ins(self, (int) self->ob_size, v); --- 870,874 ---- { PyObject *v; ! if (!PyArg_ParseTuple(args, "O:append", &v)) return NULL; return ins(self, (int) self->ob_size, v); *************** *** 980,984 **** int n; FILE *fp; ! if (!PyArg_Parse(args, "(Oi)", &f, &n)) return NULL; fp = PyFile_AsFile(f); --- 980,984 ---- int n; FILE *fp; ! if (!PyArg_ParseTuple(args, "Oi:fromfile", &f, &n)) return NULL; fp = PyFile_AsFile(f); *************** *** 1033,1037 **** PyObject *f; FILE *fp; ! if (!PyArg_Parse(args, "O", &f)) return NULL; fp = PyFile_AsFile(f); --- 1033,1037 ---- PyObject *f; FILE *fp; ! if (!PyArg_ParseTuple(args, "O:tofile", &f)) return NULL; fp = PyFile_AsFile(f); *************** *** 1065,1069 **** PyObject *list; int itemsize = self->ob_descr->itemsize; ! if (!PyArg_Parse(args, "O", &list)) return NULL; if (!PyList_Check(list)) { --- 1065,1069 ---- PyObject *list; int itemsize = self->ob_descr->itemsize; ! if (!PyArg_ParseTuple(args, "O:fromlist", &list)) return NULL; if (!PyList_Check(list)) { *************** *** 1109,1112 **** --- 1109,1114 ---- PyObject *list = PyList_New(self->ob_size); int i; + if (!PyArg_ParseTuple(args, ":tolist")) + return NULL; if (list == NULL) return NULL; *************** *** 1134,1138 **** int n; int itemsize = self->ob_descr->itemsize; ! if (!PyArg_Parse(args, "s#", &str, &n)) return NULL; if (n % itemsize != 0) { --- 1136,1140 ---- int n; int itemsize = self->ob_descr->itemsize; ! if (!PyArg_ParseTuple(args, "s#:fromstring", &str, &n)) return NULL; if (n % itemsize != 0) { *************** *** 1168,1172 **** array_tostring(arrayobject *self, PyObject *args) { ! if (!PyArg_Parse(args, "")) return NULL; return PyString_FromStringAndSize(self->ob_item, --- 1170,1174 ---- array_tostring(arrayobject *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":tostring")) return NULL; return PyString_FromStringAndSize(self->ob_item, *************** *** 1181,1204 **** PyMethodDef array_methods[] = { ! {"append", (PyCFunction)array_append, 0, append_doc}, ! {"buffer_info", (PyCFunction)array_buffer_info, 0, buffer_info_doc}, ! {"byteswap", (PyCFunction)array_byteswap, METH_VARARGS, ! byteswap_doc}, ! {"count", (PyCFunction)array_count, 1, count_doc}, ! {"extend", (PyCFunction)array_extend, 1, extend_doc}, ! {"fromfile", (PyCFunction)array_fromfile, 0, fromfile_doc}, ! {"fromlist", (PyCFunction)array_fromlist, 0, fromlist_doc}, ! {"fromstring", (PyCFunction)array_fromstring, 0, fromstring_doc}, ! {"index", (PyCFunction)array_index, 1, index_doc}, ! {"insert", (PyCFunction)array_insert, 0, insert_doc}, ! {"pop", (PyCFunction)array_pop, 1, pop_doc}, ! {"read", (PyCFunction)array_fromfile, 0, fromfile_doc}, ! {"remove", (PyCFunction)array_remove, 1, remove_doc}, ! {"reverse", (PyCFunction)array_reverse, 0, reverse_doc}, ! /* {"sort", (PyCFunction)array_sort, 0, sort_doc},*/ ! {"tofile", (PyCFunction)array_tofile, 0, tofile_doc}, ! {"tolist", (PyCFunction)array_tolist, 0, tolist_doc}, ! {"tostring", (PyCFunction)array_tostring, 0, tostring_doc}, ! {"write", (PyCFunction)array_tofile, 0, tofile_doc}, {NULL, NULL} /* sentinel */ }; --- 1183,1205 ---- PyMethodDef array_methods[] = { ! {"append", (PyCFunction)array_append, METH_VARARGS, append_doc}, ! {"buffer_info", (PyCFunction)array_buffer_info, METH_VARARGS, buffer_info_doc}, ! {"byteswap", (PyCFunction)array_byteswap, METH_VARARGS, byteswap_doc}, ! {"count", (PyCFunction)array_count, METH_VARARGS, count_doc}, ! {"extend", (PyCFunction)array_extend, METH_VARARGS, extend_doc}, ! {"fromfile", (PyCFunction)array_fromfile, METH_VARARGS, fromfile_doc}, ! {"fromlist", (PyCFunction)array_fromlist, METH_VARARGS, fromlist_doc}, ! {"fromstring", (PyCFunction)array_fromstring, METH_VARARGS, fromstring_doc}, ! {"index", (PyCFunction)array_index, METH_VARARGS, index_doc}, ! {"insert", (PyCFunction)array_insert, METH_VARARGS, insert_doc}, ! {"pop", (PyCFunction)array_pop, METH_VARARGS, pop_doc}, ! {"read", (PyCFunction)array_fromfile, METH_VARARGS, fromfile_doc}, ! {"remove", (PyCFunction)array_remove, METH_VARARGS, remove_doc}, ! {"reverse", (PyCFunction)array_reverse, METH_VARARGS, reverse_doc}, ! /* {"sort", (PyCFunction)array_sort, METH_VARARGS, sort_doc},*/ ! {"tofile", (PyCFunction)array_tofile, METH_VARARGS, tofile_doc}, ! {"tolist", (PyCFunction)array_tolist, METH_VARARGS, tolist_doc}, ! {"tostring", (PyCFunction)array_tostring, METH_VARARGS, tostring_doc}, ! {"write", (PyCFunction)array_tofile, METH_VARARGS, tofile_doc}, {NULL, NULL} /* sentinel */ }; *************** *** 1236,1239 **** --- 1237,1241 ---- int ok = 0; int i, len; + PyObject *t_empty = PyTuple_New(0); PyObject *v; len = a->ob_size; *************** *** 1244,1248 **** if (a->ob_descr->typecode == 'c') { fprintf(fp, "array('c', "); ! v = array_tostring(a, (PyObject *)NULL); ok = PyObject_Print(v, fp, 0); Py_XDECREF(v); --- 1246,1251 ---- if (a->ob_descr->typecode == 'c') { fprintf(fp, "array('c', "); ! v = array_tostring(a, t_empty); ! Py_DECREF(t_empty);; ok = PyObject_Print(v, fp, 0); Py_XDECREF(v); *************** *** 1356,1362 **** PyObject *initial = NULL; struct arraydescr *descr; ! if (!PyArg_Parse(args, "c", &c)) { PyErr_Clear(); ! if (!PyArg_Parse(args, "(cO)", &c, &initial)) return NULL; if (!PyList_Check(initial) && !PyString_Check(initial)) { --- 1359,1365 ---- PyObject *initial = NULL; struct arraydescr *descr; ! if (!PyArg_ParseTuple(args, "c:array", &c)) { PyErr_Clear(); ! if (!PyArg_ParseTuple(args, "cO:array", &c, &initial)) return NULL; if (!PyList_Check(initial) && !PyString_Check(initial)) { *************** *** 1389,1394 **** } if (initial != NULL && PyString_Check(initial)) { PyObject *v = ! array_fromstring((arrayobject *)a, initial); if (v == NULL) { Py_DECREF(a); --- 1392,1399 ---- } if (initial != NULL && PyString_Check(initial)) { + PyObject *t_initial = Py_BuildValue("(O)", initial); PyObject *v = ! array_fromstring((arrayobject *)a, t_initial); ! Py_DECREF(t_initial); if (v == NULL) { Py_DECREF(a); *************** *** 1413,1417 **** static PyMethodDef a_methods[] = { ! {"array", a_array, 0, a_array_doc}, {NULL, NULL} /* sentinel */ }; --- 1418,1422 ---- static PyMethodDef a_methods[] = { ! {"array", a_array, METH_VARARGS, a_array_doc}, {NULL, NULL} /* sentinel */ }; From python-dev@python.org Mon Jul 31 23:19:33 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 31 Jul 2000 15:19:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include pymem.h,NONE,2.1 Python.h,2.25,2.26 mymalloc.h,2.25,2.26 mymath.h,2.12,2.13 myproto.h,2.9,2.10 myselect.h,2.13,2.14 mytime.h,2.7,2.8 objimpl.h,2.24,2.25 pgenheaders.h,2.22,2.23 pyport.h,2.8,2.9 Message-ID: <200007312219.PAA11538@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv11485/Include Modified Files: Python.h mymalloc.h mymath.h myproto.h myselect.h mytime.h objimpl.h pgenheaders.h pyport.h Added Files: pymem.h Log Message: patch from Vladimir (move Py_Mem* interface to Include/pymem.h) --- NEW FILE --- /*********************************************************** Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. Copyright (c) 1990-1995, Stichting Mathematisch Centrum. All rights reserved. See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ /* Lowest-level memory allocation interface */ #ifndef Py_PYMEM_H #define Py_PYMEM_H #include "pyport.h" #ifdef __cplusplus extern "C" { #endif /* * Core memory allocator * ===================== */ /* To make sure the interpreter is user-malloc friendly, all memory APIs are implemented on top of this one. The PyCore_* macros can be defined to make the interpreter use a custom allocator. Note that they are for internal use only. Both the core and extension modules should use the PyMem_* API. See the comment block at the end of this file for two scenarios showing how to use this to use a different allocator. */ #ifndef PyCore_MALLOC_FUNC #undef PyCore_REALLOC_FUNC #undef PyCore_FREE_FUNC #define PyCore_MALLOC_FUNC malloc #define PyCore_REALLOC_FUNC realloc #define PyCore_FREE_FUNC free #endif #ifndef PyCore_MALLOC_PROTO #undef PyCore_REALLOC_PROTO #undef PyCore_FREE_PROTO #define PyCore_MALLOC_PROTO (size_t) #define PyCore_REALLOC_PROTO (void *, size_t) #define PyCore_FREE_PROTO (void *) #endif #ifdef NEED_TO_DECLARE_MALLOC_AND_FRIEND extern void *PyCore_MALLOC_FUNC PyCore_MALLOC_PROTO; extern void *PyCore_REALLOC_FUNC PyCore_REALLOC_PROTO; extern void PyCore_FREE_FUNC PyCore_FREE_PROTO; #endif #ifndef PyCore_MALLOC #undef PyCore_REALLOC #undef PyCore_FREE #define PyCore_MALLOC(n) PyCore_MALLOC_FUNC(n) #define PyCore_REALLOC(p, n) PyCore_REALLOC_FUNC((p), (n)) #define PyCore_FREE(p) PyCore_FREE_FUNC(p) #endif /* BEWARE: Each interface exports both functions and macros. Extension modules should normally use the functions for ensuring binary compatibility of the user's code across Python versions. Subsequently, if the Python runtime switches to its own malloc (different from standard malloc), no recompilation is required for the extensions. The macro versions trade compatibility for speed. They can be used whenever there is a performance problem, but their use implies recompilation of the code for each new Python release. The Python core uses the macros because it *is* compiled on every upgrade. This might not be the case with 3rd party extensions in a custom setup (for example, a customer does not always have access to the source of 3rd party deliverables). You have been warned! */ /* * Raw memory interface * ==================== */ /* Functions */ /* Function wrappers around PyCore_MALLOC and friends; useful if you need to be sure that you are using the same memory allocator as Python. Note that the wrappers make sure that allocating 0 bytes returns a non-NULL pointer, even if the underlying malloc doesn't. Returned pointers must be checked for NULL explicitly. No action is performed on failure. */ extern DL_IMPORT(void *) PyMem_Malloc(size_t); extern DL_IMPORT(void *) PyMem_Realloc(void *, size_t); extern DL_IMPORT(void) PyMem_Free(void *); /* Starting from Python 1.6, the wrappers Py_{Malloc,Realloc,Free} are no longer supported. They used to call PyErr_NoMemory() on failure. */ /* Macros */ #define PyMem_MALLOC(n) PyCore_MALLOC(n) #define PyMem_REALLOC(p, n) PyCore_REALLOC((void *)(p), (n)) #define PyMem_FREE(p) PyCore_FREE((void *)(p)) /* * Type-oriented memory interface * ============================== */ /* Functions */ #define PyMem_New(type, n) \ ( (type *) PyMem_Malloc((n) * sizeof(type)) ) #define PyMem_Resize(p, type, n) \ ( (p) = (type *) PyMem_Realloc((n) * sizeof(type)) ) #define PyMem_Del(p) PyMem_Free(p) /* Macros */ #define PyMem_NEW(type, n) \ ( (type *) PyMem_MALLOC(_PyMem_EXTRA + (n) * sizeof(type)) ) #define PyMem_RESIZE(p, type, n) \ if ((p) == NULL) \ (p) = (type *)(PyMem_MALLOC( \ _PyMem_EXTRA + (n) * sizeof(type))); \ else \ (p) = (type *)(PyMem_REALLOC((p), \ _PyMem_EXTRA + (n) * sizeof(type))) #define PyMem_DEL(p) PyMem_FREE(p) /* PyMem_XDEL is deprecated. To avoid the call when p is NULL, it is recommended to write the test explicitly in the code. Note that according to ANSI C, free(NULL) has no effect. */ #ifdef __cplusplus } #endif /* SCENARIOS Here are two scenarios by Vladimir Marangozov (the author of the memory allocation redesign). 1) Scenario A Suppose you want to use a debugging malloc library that collects info on where the malloc calls originate from. Assume the interface is: d_malloc(size_t n, char* src_file, unsigned long src_line) c.s. In this case, you would define (for example in config.h) : #define PyCore_MALLOC_FUNC d_malloc ... #define PyCore_MALLOC_PROTO (size_t, char *, unsigned long) ... #define NEED_TO_DECLARE_MALLOC_AND_FRIEND #define PyCore_MALLOC(n) PyCore_MALLOC_FUNC((n), __FILE__, __LINE__) ... 2) Scenario B Suppose you want to use malloc hooks (defined & initialized in a 3rd party malloc library) instead of malloc functions. In this case, you would define: #define PyCore_MALLOC_FUNC (*malloc_hook) ... #define NEED_TO_DECLARE_MALLOC_AND_FRIEND and ignore the previous definitions about PyCore_MALLOC_FUNC, etc. */ #endif /* !Py_PYMEM_H */ Index: Python.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** Python.h 2000/07/31 15:28:03 2.25 --- Python.h 2000/07/31 22:19:30 2.26 *************** *** 55,58 **** --- 55,60 ---- #include "pyport.h" + #include "pymem.h" + #include "object.h" #include "objimpl.h" Index: mymalloc.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mymalloc.h,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** mymalloc.h 2000/07/31 15:28:03 2.25 --- mymalloc.h 2000/07/31 22:19:30 2.26 *************** *** 1,4 **** - #ifndef Py_MYMALLOC_H - #define Py_MYMALLOC_H /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 15,18 **** --- 13,19 ---- USE "pyport.h" INSTEAD ***************************************/ + + #ifndef Py_MYMALLOC_H + #define Py_MYMALLOC_H /* Lowest-level memory allocation interface */ Index: mymath.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mymath.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** mymath.h 2000/07/31 15:28:03 2.12 --- mymath.h 2000/07/31 22:19:30 2.13 *************** *** 1,2 **** --- 1,12 ---- + /*********************************************************** + Copyright (c) 2000, BeOpen.com. + Copyright (c) 1995-2000, Corporation for National Research Initiatives. + Copyright (c) 1990-1995, Stichting Mathematisch Centrum. + All rights reserved. + + See the file "Misc/COPYRIGHT" for information on usage and + redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. + ******************************************************************/ + /*************************************** THIS FILE IS OBSOLETE Index: myproto.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/myproto.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** myproto.h 2000/07/09 03:09:55 2.9 --- myproto.h 2000/07/31 22:19:30 2.10 *************** *** 1,8 **** - #ifndef Py_PROTO_H - #define Py_PROTO_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 19,22 **** --- 13,22 ---- DON'T USE Py_PROTO or Py_FPROTO anymore. ***************************************/ + + #ifndef Py_PROTO_H + #define Py_PROTO_H + #ifdef __cplusplus + extern "C" { + #endif #ifdef HAVE_PROTOTYPES Index: myselect.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/myselect.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** myselect.h 2000/07/31 15:28:03 2.13 --- myselect.h 2000/07/31 22:19:30 2.14 *************** *** 1,8 **** - #ifndef Py_MYSELECT_H - #define Py_MYSELECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 19,22 **** --- 13,22 ---- USE "pyport.h" INSTEAD ***************************************/ + + #ifndef Py_MYSELECT_H + #define Py_MYSELECT_H + #ifdef __cplusplus + extern "C" { + #endif /* Include file for users of select() */ Index: mytime.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mytime.h,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** mytime.h 2000/07/31 15:28:03 2.7 --- mytime.h 2000/07/31 22:19:30 2.8 *************** *** 1,8 **** - #ifndef Py_MYTIME_H - #define Py_MYTIME_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 19,22 **** --- 13,22 ---- USE "pyport.h" INSTEAD ***************************************/ + + #ifndef Py_MYTIME_H + #define Py_MYTIME_H + #ifdef __cplusplus + extern "C" { + #endif /* Include file instead of and/or */ Index: objimpl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/objimpl.h,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -r2.24 -r2.25 *** objimpl.h 2000/07/31 15:28:03 2.24 --- objimpl.h 2000/07/31 22:19:30 2.25 *************** *** 11,19 **** #ifndef Py_OBJIMPL_H #define Py_OBJIMPL_H #ifdef __cplusplus extern "C" { #endif - - #include "pyport.h" /* --- 11,20 ---- #ifndef Py_OBJIMPL_H #define Py_OBJIMPL_H + + #include "pymem.h" + #ifdef __cplusplus extern "C" { #endif /* Index: pgenheaders.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pgenheaders.h,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** pgenheaders.h 2000/07/31 15:28:03 2.22 --- pgenheaders.h 2000/07/31 22:19:30 2.23 *************** *** 31,35 **** #endif ! #include "pyport.h" #include "pydebug.h" --- 31,35 ---- #endif ! #include "pymem.h" #include "pydebug.h" Index: pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** pyport.h 2000/07/31 15:28:03 2.8 --- pyport.h 2000/07/31 22:19:30 2.9 *************** *** 10,13 **** --- 10,15 ---- #define Py_PYPORT_H + #include "config.h" /* include for defines */ + /************************************************************************** Symbols and macros to supply platform-independent interfaces to basic *************** *** 221,227 **** ! /*********************************** ! * WRAPPER FOR malloc/realloc/free * ! ***********************************/ #ifndef DL_IMPORT /* declarations for DLL import */ --- 223,229 ---- ! /************************************ ! * MALLOC COMPATIBILITY FOR pymem.h * ! ************************************/ #ifndef DL_IMPORT /* declarations for DLL import */ *************** *** 241,395 **** #endif - /* - * Core memory allocator - * ===================== - */ - - /* To make sure the interpreter is user-malloc friendly, all memory - APIs are implemented on top of this one. - - The PyCore_* macros can be defined to make the interpreter use a - custom allocator. Note that they are for internal use only. Both - the core and extension modules should use the PyMem_* API. - - See the comment block at the end of this file for two scenarios - showing how to use this to use a different allocator. */ - - #ifndef PyCore_MALLOC_FUNC - #undef PyCore_REALLOC_FUNC - #undef PyCore_FREE_FUNC - #define PyCore_MALLOC_FUNC malloc - #define PyCore_REALLOC_FUNC realloc - #define PyCore_FREE_FUNC free - #endif - - #ifndef PyCore_MALLOC_PROTO - #undef PyCore_REALLOC_PROTO - #undef PyCore_FREE_PROTO - #define PyCore_MALLOC_PROTO (size_t) - #define PyCore_REALLOC_PROTO (void *, size_t) - #define PyCore_FREE_PROTO (void *) - #endif - - #ifdef NEED_TO_DECLARE_MALLOC_AND_FRIEND - extern void *PyCore_MALLOC_FUNC PyCore_MALLOC_PROTO; - extern void *PyCore_REALLOC_FUNC PyCore_REALLOC_PROTO; - extern void PyCore_FREE_FUNC PyCore_FREE_PROTO; - #endif - - #ifndef PyCore_MALLOC - #undef PyCore_REALLOC - #undef PyCore_FREE - #define PyCore_MALLOC(n) PyCore_MALLOC_FUNC(n) - #define PyCore_REALLOC(p, n) PyCore_REALLOC_FUNC((p), (n)) - #define PyCore_FREE(p) PyCore_FREE_FUNC(p) - #endif - - /* BEWARE: - - Each interface exports both functions and macros. Extension modules - should normally use the functions for ensuring binary compatibility - of the user's code across Python versions. Subsequently, if the - Python runtime switches to its own malloc (different from standard - malloc), no recompilation is required for the extensions. - - The macro versions trade compatibility for speed. They can be used - whenever there is a performance problem, but their use implies - recompilation of the code for each new Python release. The Python - core uses the macros because it *is* compiled on every upgrade. - This might not be the case with 3rd party extensions in a custom - setup (for example, a customer does not always have access to the - source of 3rd party deliverables). You have been warned! */ - - /* - * Raw memory interface - * ==================== - */ - - /* Functions */ - - /* Function wrappers around PyCore_MALLOC and friends; useful if you - need to be sure that you are using the same memory allocator as - Python. Note that the wrappers make sure that allocating 0 bytes - returns a non-NULL pointer, even if the underlying malloc - doesn't. Returned pointers must be checked for NULL explicitly. - No action is performed on failure. */ - extern DL_IMPORT(void *) PyMem_Malloc(size_t); - extern DL_IMPORT(void *) PyMem_Realloc(void *, size_t); - extern DL_IMPORT(void) PyMem_Free(void *); - - /* Starting from Python 1.6, the wrappers Py_{Malloc,Realloc,Free} are - no longer supported. They used to call PyErr_NoMemory() on failure. */ - - /* Macros */ - #define PyMem_MALLOC(n) PyCore_MALLOC(n) - #define PyMem_REALLOC(p, n) PyCore_REALLOC((void *)(p), (n)) - #define PyMem_FREE(p) PyCore_FREE((void *)(p)) - - /* - * Type-oriented memory interface - * ============================== - */ - - /* Functions */ - #define PyMem_New(type, n) \ - ( (type *) PyMem_Malloc((n) * sizeof(type)) ) - #define PyMem_Resize(p, type, n) \ - ( (p) = (type *) PyMem_Realloc((n) * sizeof(type)) ) - #define PyMem_Del(p) PyMem_Free(p) - - /* Macros */ - #define PyMem_NEW(type, n) \ - ( (type *) PyMem_MALLOC(_PyMem_EXTRA + (n) * sizeof(type)) ) - #define PyMem_RESIZE(p, type, n) \ - if ((p) == NULL) \ - (p) = (type *)(PyMem_MALLOC( \ - _PyMem_EXTRA + (n) * sizeof(type))); \ - else \ - (p) = (type *)(PyMem_REALLOC((p), \ - _PyMem_EXTRA + (n) * sizeof(type))) - #define PyMem_DEL(p) PyMem_FREE(p) - - /* PyMem_XDEL is deprecated. To avoid the call when p is NULL, - it is recommended to write the test explicitly in the code. - Note that according to ANSI C, free(NULL) has no effect. */ - - /* SCENARIOS - - Here are two scenarios by Vladimir Marangozov (the author of the - memory allocation redesign). - - 1) Scenario A - - Suppose you want to use a debugging malloc library that collects info on - where the malloc calls originate from. Assume the interface is: - - d_malloc(size_t n, char* src_file, unsigned long src_line) c.s. - - In this case, you would define (for example in config.h) : - - #define PyCore_MALLOC_FUNC d_malloc - ... - #define PyCore_MALLOC_PROTO (size_t, char *, unsigned long) - ... - #define NEED_TO_DECLARE_MALLOC_AND_FRIEND - - #define PyCore_MALLOC(n) PyCore_MALLOC_FUNC((n), __FILE__, __LINE__) - ... - - 2) Scenario B - - Suppose you want to use malloc hooks (defined & initialized in a 3rd party - malloc library) instead of malloc functions. In this case, you would - define: - - #define PyCore_MALLOC_FUNC (*malloc_hook) - ... - #define NEED_TO_DECLARE_MALLOC_AND_FRIEND - - and ignore the previous definitions about PyCore_MALLOC_FUNC, etc. - - - */ /******************************************** --- 243,246 ---- From python-dev@python.org Sat Jul 1 00:04:20 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:04:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules signalmodule.c,2.40,2.41 Message-ID: <200006302304.QAA04637@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv4629 Modified Files: signalmodule.c Log Message: Fix another error on AIX by using a proper cast. Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.40 retrieving revision 2.41 diff -C2 -r2.40 -r2.41 *** signalmodule.c 2000/06/28 22:26:21 2.40 --- signalmodule.c 2000/06/30 23:04:18 2.41 *************** *** 357,365 **** d = PyModule_GetDict(m); ! x = DefaultHandler = PyLong_FromVoidPtr(SIG_DFL); if (!x || PyDict_SetItemString(d, "SIG_DFL", x) < 0) goto finally; ! x = IgnoreHandler = PyLong_FromVoidPtr(SIG_IGN); if (!x || PyDict_SetItemString(d, "SIG_IGN", x) < 0) goto finally; --- 357,365 ---- d = PyModule_GetDict(m); ! x = DefaultHandler = PyLong_FromVoidPtr((void *)SIG_DFL); if (!x || PyDict_SetItemString(d, "SIG_DFL", x) < 0) goto finally; ! x = IgnoreHandler = PyLong_FromVoidPtr((void *)SIG_IGN); if (!x || PyDict_SetItemString(d, "SIG_IGN", x) < 0) goto finally; From python-dev@python.org Sat Jul 1 00:22:37 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 30 Jun 2000 16:22:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_pty.py,NONE,1.1 Message-ID: <200006302322.QAA05862@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv5851/test Added Files: test_pty.py Log Message: Thomas Wouters : Test case for the pty module. --- NEW FILE --- import pty, os, sys, string from test_support import verbose, TestFailed TEST_STRING_1 = "I wish to buy a fish license." TEST_STRING_2 = "For my pet fish, Eric." TEST_STRING_3 = "And now for something completely different..." TEST_STRING_4 = "but you pronounce it throatwobbler mangrove." if verbose: def debug(msg): print msg else: def debug(msg): pass # Marginal testing of pty suite. Cannot do extensive 'do or fail' testing # because pty code is not too portable. try: debug("Calling master_open()") master_fd, slave_name = pty.master_open() debug("Got master_fd '%d', slave_name '%s'"%(master_fd, slave_name)) debug("Calling slave_open(%s)"%`slave_name`) slave_fd = pty.slave_open(slave_name) debug("Got slave_fd '%d'"%slave_fd) except OSError: # " An optional feature could not be imported " ... ? raise ImportError, "Pseudo-terminals (seemingly) not functional." ## # Please uncomment these if os.isatty() is added. ## if not os.isatty(master_fd): ## raise TestFailed, "master_fd is not a tty" ## if not os.isatty(slave_fd): ## raise TestFailed, "slave_fd is not a tty" debug("Writing to slave_fd") os.write(slave_fd, TEST_STRING_1) # should check return value print os.read(master_fd, 1024) os.write(slave_fd, TEST_STRING_2[:5]) os.write(slave_fd, TEST_STRING_2[5:]) print os.read(master_fd, 1024) os.close(slave_fd) os.close(master_fd) # basic pty passed. debug("calling pty.fork()") pid, master_fd = pty.fork() if pid == pty.CHILD: ## # Please uncomment these when os.isatty() is added. ## if not os.isatty(1): ## debug("Child's fd 1 is not a tty?!") ## os._exit(3) try: debug("In child, calling os.setsid()") os.setsid() except OSError: # Good, we already were session leader debug("OSError was raised.") pass except AttributeError: # Have pty, but not setsid() ? debug("AttributeError was raised.") pass except: # We don't want this error to propagate, escape the call to # os._exit(), and cause very peculiar behaviour in the calling # regrtest.py ! debug("Some other error was raised.") os._exit(1) else: debug("os.setsid() succeeded! (bad!)") os._exit(2) os._exit(4) else: debug("Waiting for child (%d) to finish."%pid) (pid, status) = os.waitpid(pid, 0) debug("Child (%d) exited with status %d."%(pid, status)) if status / 256 == 1: raise TestFailed, "Child raised an unexpected exception in os.setsid()" elif status / 256 == 2: raise TestFailed, "pty.fork() failed to make child a session leader." elif status / 256 == 3: raise TestFailed, "Child spawned by pty.fork() did not have a tty as stdout" elif status / 256 <> 4: raise TestFailed, "pty.fork() failed for unknown reasons:" print os.read(master_fd, 65536) os.close(master_fd) # pty.fork() passed. From python-dev@python.org Sat Jul 1 00:22:37 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 30 Jun 2000 16:22:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_pty,NONE,1.1 Message-ID: <200006302322.QAA05865@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv5851/test/output Added Files: test_pty Log Message: Thomas Wouters : Test case for the pty module. --- NEW FILE --- test_pty I wish to buy a fish license. For my pet fish, Eric. From python-dev@python.org Sat Jul 1 00:50:42 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:50:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC/os2vacpp config.c,1.3,1.4 getpathp.c,1.5,1.6 Message-ID: <200006302350.QAA07555@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC/os2vacpp In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/PC/os2vacpp Modified Files: config.c getpathp.c Log Message: Change copyright notice. Index: config.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/os2vacpp/config.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** config.c 1998/09/28 22:02:36 1.3 --- config.c 2000/06/30 23:50:39 1.4 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: getpathp.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/os2vacpp/getpathp.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** getpathp.c 2000/05/26 21:49:07 1.5 --- getpathp.c 2000/06/30 23:50:39 1.6 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ From python-dev@python.org Sat Jul 1 00:50:42 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:50:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC config.c,1.23,1.24 getpathp.c,1.15,1.16 Message-ID: <200006302350.QAA07553@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/PC Modified Files: config.c getpathp.c Log Message: Change copyright notice. Index: config.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/config.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** config.c 2000/06/30 05:02:53 1.23 --- config.c 2000/06/30 23:50:39 1.24 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: getpathp.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/getpathp.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** getpathp.c 2000/06/28 22:20:06 1.15 --- getpathp.c 2000/06/30 23:50:39 1.16 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ From python-dev@python.org Sat Jul 1 00:50:42 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:50:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/modulator/Templates copyright,1.2,1.3 Message-ID: <200006302350.QAA07593@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/modulator/Templates In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/Tools/modulator/Templates Modified Files: copyright Log Message: Change copyright notice. Index: copyright =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/Templates/copyright,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** copyright 1996/10/25 14:44:06 1.2 --- copyright 2000/06/30 23:50:40 1.3 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ From python-dev@python.org Sat Jul 1 00:50:42 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:50:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/scripts fixnotice.py,1.2,1.3 Message-ID: <200006302350.QAA07605@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/scripts In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/Tools/scripts Modified Files: fixnotice.py Log Message: Change copyright notice. Index: fixnotice.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/scripts/fixnotice.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** fixnotice.py 1998/03/24 05:30:22 1.2 --- fixnotice.py 2000/06/30 23:50:40 1.3 *************** *** 20,45 **** NEW_NOTICE = """ ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. """ --- 20,30 ---- NEW_NOTICE = """ ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. """ From python-dev@python.org Sat Jul 1 00:50:43 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:50:43 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.35,2.36 bufferobject.c,2.8,2.9 classobject.c,2.94,2.95 cobject.c,2.8,2.9 complexobject.c,2.25,2.26 dictobject.c,2.55,2.56 fileobject.c,2.75,2.76 floatobject.c,2.59,2.60 frameobject.c,2.39,2.40 funcobject.c,2.25,2.26 intobject.c,2.43,2.44 listobject.c,2.76,2.77 longobject.c,1.58,1.59 methodobject.c,2.29,2.30 moduleobject.c,2.25,2.26 object.c,2.76,2.77 rangeobject.c,2.13,2.14 stringobject.c,2.70,2.71 tupleobject.c,2.39,2.40 typeobject.c,2.12,2.13 xxobject.c,2.15,2.16 Message-ID: <200006302350.QAA07642@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/Objects Modified Files: abstract.c bufferobject.c classobject.c cobject.c complexobject.c dictobject.c fileobject.c floatobject.c frameobject.c funcobject.c intobject.c listobject.c longobject.c methodobject.c moduleobject.c object.c rangeobject.c stringobject.c tupleobject.c typeobject.c xxobject.c Log Message: Change copyright notice. Index: abstract.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** abstract.c 2000/06/18 18:43:14 2.35 --- abstract.c 2000/06/30 23:50:39 2.36 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: bufferobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/bufferobject.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** bufferobject.c 2000/06/30 15:01:00 2.8 --- bufferobject.c 2000/06/30 23:50:39 2.9 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: classobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/classobject.c,v retrieving revision 2.94 retrieving revision 2.95 diff -C2 -r2.94 -r2.95 *** classobject.c 2000/06/30 15:01:00 2.94 --- classobject.c 2000/06/30 23:50:39 2.95 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: cobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/cobject.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** cobject.c 2000/05/03 23:44:34 2.8 --- cobject.c 2000/06/30 23:50:39 2.9 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: complexobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/complexobject.c,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** complexobject.c 2000/06/29 19:17:04 2.25 --- complexobject.c 2000/06/30 23:50:39 2.26 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dictobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/dictobject.c,v retrieving revision 2.55 retrieving revision 2.56 diff -C2 -r2.55 -r2.56 *** dictobject.c 2000/06/30 05:02:53 2.55 --- dictobject.c 2000/06/30 23:50:39 2.56 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.75 retrieving revision 2.76 diff -C2 -r2.75 -r2.76 *** fileobject.c 2000/06/30 15:01:00 2.75 --- fileobject.c 2000/06/30 23:50:39 2.76 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: floatobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v retrieving revision 2.59 retrieving revision 2.60 diff -C2 -r2.59 -r2.60 *** floatobject.c 2000/06/30 15:01:00 2.59 --- floatobject.c 2000/06/30 23:50:39 2.60 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: frameobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/frameobject.c,v retrieving revision 2.39 retrieving revision 2.40 diff -C2 -r2.39 -r2.40 *** frameobject.c 2000/05/03 23:44:34 2.39 --- frameobject.c 2000/06/30 23:50:39 2.40 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: funcobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/funcobject.c,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** funcobject.c 2000/06/30 15:01:00 2.25 --- funcobject.c 2000/06/30 23:50:39 2.26 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: intobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/intobject.c,v retrieving revision 2.43 retrieving revision 2.44 diff -C2 -r2.43 -r2.44 *** intobject.c 2000/06/30 15:01:00 2.43 --- intobject.c 2000/06/30 23:50:39 2.44 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: listobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v retrieving revision 2.76 retrieving revision 2.77 diff -C2 -r2.76 -r2.77 *** listobject.c 2000/06/30 05:02:53 2.76 --- listobject.c 2000/06/30 23:50:39 2.77 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: longobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -r1.58 -r1.59 *** longobject.c 2000/06/01 18:37:36 1.58 --- longobject.c 2000/06/30 23:50:39 1.59 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: methodobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/methodobject.c,v retrieving revision 2.29 retrieving revision 2.30 diff -C2 -r2.29 -r2.30 *** methodobject.c 2000/06/30 22:46:04 2.29 --- methodobject.c 2000/06/30 23:50:39 2.30 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: moduleobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/moduleobject.c,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** moduleobject.c 2000/05/03 23:44:35 2.25 --- moduleobject.c 2000/06/30 23:50:39 2.26 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.76 retrieving revision 2.77 diff -C2 -r2.76 -r2.77 *** object.c 2000/06/30 15:01:00 2.76 --- object.c 2000/06/30 23:50:39 2.77 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: rangeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/rangeobject.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** rangeobject.c 2000/06/15 14:50:20 2.13 --- rangeobject.c 2000/06/30 23:50:39 2.14 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.70 retrieving revision 2.71 diff -C2 -r2.70 -r2.71 *** stringobject.c 2000/06/30 10:29:17 2.70 --- stringobject.c 2000/06/30 23:50:39 2.71 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: tupleobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/tupleobject.c,v retrieving revision 2.39 retrieving revision 2.40 diff -C2 -r2.39 -r2.40 *** tupleobject.c 2000/06/30 05:02:53 2.39 --- tupleobject.c 2000/06/30 23:50:39 2.40 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: typeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** typeobject.c 1997/06/02 14:43:07 2.12 --- typeobject.c 2000/06/30 23:50:39 2.13 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: xxobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/xxobject.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** xxobject.c 2000/05/03 23:44:36 2.15 --- xxobject.c 2000/06/30 23:50:39 2.16 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ From python-dev@python.org Sat Jul 1 00:50:43 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:50:43 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser acceler.c,2.12,2.13 assert.h,2.7,2.8 bitset.c,2.7,2.8 firstsets.c,2.7,2.8 grammar.c,2.13,2.14 grammar1.c,2.8,2.9 intrcheck.c,2.30,2.31 listnode.c,2.9,2.10 metagrammar.c,2.7,2.8 myreadline.c,2.18,2.19 node.c,2.8,2.9 parser.c,2.11,2.12 parser.h,2.9,2.10 parsetok.c,2.18,2.19 pgen.c,2.12,2.13 pgen.h,2.9,2.10 pgenmain.c,2.17,2.18 printgrammar.c,2.8,2.9 tokenizer.c,2.42,2.43 tokenizer.h,2.12,2.13 Message-ID: <200006302350.QAA07637@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/Parser Modified Files: acceler.c assert.h bitset.c firstsets.c grammar.c grammar1.c intrcheck.c listnode.c metagrammar.c myreadline.c node.c parser.c parser.h parsetok.c pgen.c pgen.h pgenmain.c printgrammar.c tokenizer.c tokenizer.h Log Message: Change copyright notice. Index: acceler.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/acceler.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** acceler.c 1997/08/02 03:02:25 2.12 --- acceler.c 2000/06/30 23:50:39 2.13 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: assert.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/assert.h,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** assert.h 1996/10/25 14:37:45 2.7 --- assert.h 2000/06/30 23:50:39 2.8 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: bitset.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/bitset.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** bitset.c 1997/04/29 21:02:21 2.7 --- bitset.c 2000/06/30 23:50:39 2.8 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: firstsets.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/firstsets.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** firstsets.c 1997/04/29 21:02:24 2.7 --- firstsets.c 2000/06/30 23:50:39 2.8 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: grammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/grammar.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** grammar.c 1998/04/10 22:09:36 2.13 --- grammar.c 2000/06/30 23:50:39 2.14 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: grammar1.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/grammar1.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** grammar1.c 1997/04/29 21:02:31 2.8 --- grammar1.c 2000/06/30 23:50:39 2.9 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: intrcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/intrcheck.c,v retrieving revision 2.30 retrieving revision 2.31 diff -C2 -r2.30 -r2.31 *** intrcheck.c 1998/12/04 18:50:20 2.30 --- intrcheck.c 2000/06/30 23:50:39 2.31 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: listnode.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/listnode.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** listnode.c 1997/04/29 21:02:37 2.9 --- listnode.c 2000/06/30 23:50:39 2.10 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: metagrammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/metagrammar.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** metagrammar.c 1997/04/29 21:02:40 2.7 --- metagrammar.c 2000/06/30 23:50:39 2.8 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: myreadline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/myreadline.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** myreadline.c 2000/06/28 22:00:02 2.18 --- myreadline.c 2000/06/30 23:50:39 2.19 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: node.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/node.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** node.c 2000/06/20 19:10:44 2.8 --- node.c 2000/06/30 23:50:39 2.9 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: parser.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parser.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** parser.c 2000/06/20 19:10:44 2.11 --- parser.c 2000/06/30 23:50:39 2.12 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: parser.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parser.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** parser.h 1997/04/29 21:02:47 2.9 --- parser.h 2000/06/30 23:50:39 2.10 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: parsetok.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parsetok.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** parsetok.c 2000/06/28 22:00:02 2.18 --- parsetok.c 2000/06/30 23:50:39 2.19 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pgen.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgen.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** pgen.c 1998/04/10 22:09:39 2.12 --- pgen.c 2000/06/30 23:50:39 2.13 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pgen.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgen.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** pgen.h 1997/04/29 21:02:56 2.9 --- pgen.h 2000/06/30 23:50:39 2.10 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pgenmain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgenmain.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** pgenmain.c 2000/06/28 22:00:02 2.17 --- pgenmain.c 2000/06/30 23:50:39 2.18 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: printgrammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/printgrammar.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** printgrammar.c 1997/05/07 23:50:06 2.8 --- printgrammar.c 2000/06/30 23:50:39 2.9 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: tokenizer.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/tokenizer.c,v retrieving revision 2.42 retrieving revision 2.43 diff -C2 -r2.42 -r2.43 *** tokenizer.c 2000/06/28 22:00:02 2.42 --- tokenizer.c 2000/06/30 23:50:39 2.43 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: tokenizer.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/tokenizer.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** tokenizer.h 1998/04/09 21:38:06 2.12 --- tokenizer.h 2000/06/30 23:50:39 2.13 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ From python-dev@python.org Sat Jul 1 00:50:44 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:50:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _tkinter.c,1.102,1.103 almodule.c,1.24,1.25 arraymodule.c,2.42,2.43 audioop.c,1.36,1.37 binascii.c,2.19,2.20 bsddbmodule.c,1.19,1.20 cdmodule.c,1.19,1.20 cgensupport.c,2.11,2.12 cgensupport.h,2.11,2.12 clmodule.c,2.20,2.21 config.c.in,1.67,1.68 cstubs,2.18,2.19 dbmmodule.c,2.17,2.18 dlmodule.c,2.7,2.8 errnomodule.c,2.9,2.10 fcntlmodule.c,2.19,2.20 flmodule.c,1.37,1.38 fmmodule.c,1.11,1.12 gdbmmodule.c,2.22,2.23 getpath.c,1.23,1.24 glmodule.c,2.3,2.4 grpmodule.c,2.9,2.10 imageop.c,2.20,2.21 imgfile.c,1.22,1.23 main.c,1.38,1.39 mathmodule.c,2.45,2.46 md5module.c,2.15,2.16 mpzmodule.c,2.25,2.26 newmodule.c,2.21,2.22 parsermodule.c,2.39,2.40 pcremodule.c,2.19,2.20 posixmodule.c,2.139,2.140 pwdmodule.c,1.17,1.18 pyexpat.c,2.5,2.6 regexmodule.c,1.34,1.35 resource.c,2.10,2.11 selectmodule.c,2.33,2.34 sgimodule.c,1.11,1.12 shamodule.c,2.5,2.6 signalmodule.c,2.41,2.42 socketmodule.c,1.109,1.110 stropmodule.c,2.63,2.64 structmodule.c,2.31,2.32 sun! audiodev.c,1.17,1.18 svmodule.c,2.11,2.12 threadmodule.c,2.31,2.32 timemodule.c,2.86,2.87 xxmodule.c,2.16,2.17 yuv.h,2.5,2.6 yuvconvert.c,2.4,2.5 Message-ID: <200006302350.QAA07688@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/Modules Modified Files: _tkinter.c almodule.c arraymodule.c audioop.c binascii.c bsddbmodule.c cdmodule.c cgensupport.c cgensupport.h clmodule.c config.c.in cstubs dbmmodule.c dlmodule.c errnomodule.c fcntlmodule.c flmodule.c fmmodule.c gdbmmodule.c getpath.c glmodule.c grpmodule.c imageop.c imgfile.c main.c mathmodule.c md5module.c mpzmodule.c newmodule.c parsermodule.c pcremodule.c posixmodule.c pwdmodule.c pyexpat.c regexmodule.c resource.c selectmodule.c sgimodule.c shamodule.c signalmodule.c socketmodule.c stropmodule.c structmodule.c sunaudiodev.c svmodule.c threadmodule.c timemodule.c xxmodule.c yuv.h yuvconvert.c Log Message: Change copyright notice. Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.102 retrieving revision 1.103 diff -C2 -r1.102 -r1.103 *** _tkinter.c 2000/06/30 15:00:59 1.102 --- _tkinter.c 2000/06/30 23:50:38 1.103 *************** *** 6,31 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 6,16 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: almodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/almodule.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** almodule.c 2000/05/03 23:44:31 1.24 --- almodule.c 2000/06/30 23:50:38 1.25 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: arraymodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v retrieving revision 2.42 retrieving revision 2.43 diff -C2 -r2.42 -r2.43 *** arraymodule.c 2000/06/28 21:27:21 2.42 --- arraymodule.c 2000/06/30 23:50:38 2.43 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: audioop.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/audioop.c,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** audioop.c 2000/05/02 21:18:13 1.36 --- audioop.c 2000/06/30 23:50:38 1.37 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: binascii.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/binascii.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** binascii.c 2000/02/29 13:59:22 2.19 --- binascii.c 2000/06/30 23:50:38 2.20 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: bsddbmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/bsddbmodule.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** bsddbmodule.c 2000/06/30 04:17:11 1.19 --- bsddbmodule.c 2000/06/30 23:50:38 1.20 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: cdmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cdmodule.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** cdmodule.c 2000/05/03 23:44:31 1.19 --- cdmodule.c 2000/06/30 23:50:38 1.20 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: cgensupport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cgensupport.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** cgensupport.c 1997/04/29 15:43:55 2.11 --- cgensupport.c 2000/06/30 23:50:38 2.12 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: cgensupport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cgensupport.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** cgensupport.h 1997/04/29 15:35:28 2.11 --- cgensupport.h 2000/06/30 23:50:38 2.12 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: clmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/clmodule.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** clmodule.c 2000/05/03 23:44:31 2.20 --- clmodule.c 2000/06/30 23:50:38 2.21 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: config.c.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/config.c.in,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -r1.67 -r1.68 *** config.c.in 1997/04/29 20:31:59 1.67 --- config.c.in 2000/06/30 23:50:38 1.68 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: cstubs =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cstubs,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** cstubs 1998/04/28 16:09:16 2.18 --- cstubs 2000/06/30 23:50:38 2.19 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dbmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/dbmmodule.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** dbmmodule.c 2000/05/03 23:44:32 2.17 --- dbmmodule.c 2000/06/30 23:50:38 2.18 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/dlmodule.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** dlmodule.c 2000/05/03 23:44:32 2.7 --- dlmodule.c 2000/06/30 23:50:38 2.8 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: errnomodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/errnomodule.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** errnomodule.c 1999/01/27 18:04:05 2.9 --- errnomodule.c 2000/06/30 23:50:38 2.10 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: fcntlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fcntlmodule.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** fcntlmodule.c 2000/02/29 13:59:23 2.19 --- fcntlmodule.c 2000/06/30 23:50:38 2.20 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: flmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/flmodule.c,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -r1.37 -r1.38 *** flmodule.c 2000/06/30 15:00:59 1.37 --- flmodule.c 2000/06/30 23:50:38 1.38 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: fmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fmmodule.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** fmmodule.c 2000/05/03 23:44:32 1.11 --- fmmodule.c 2000/06/30 23:50:38 1.12 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: gdbmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gdbmmodule.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** gdbmmodule.c 2000/05/03 23:44:32 2.22 --- gdbmmodule.c 2000/06/30 23:50:38 2.23 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: getpath.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/getpath.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** getpath.c 2000/06/28 21:29:03 1.23 --- getpath.c 2000/06/30 23:50:38 1.24 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: glmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/glmodule.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** glmodule.c 1998/10/21 16:10:40 2.3 --- glmodule.c 2000/06/30 23:50:38 2.4 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: grpmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/grpmodule.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** grpmodule.c 1998/12/04 18:49:50 2.9 --- grpmodule.c 2000/06/30 23:50:38 2.10 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: imageop.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/imageop.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** imageop.c 1998/12/04 18:49:50 2.20 --- imageop.c 2000/06/30 23:50:38 2.21 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: imgfile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/imgfile.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** imgfile.c 1997/10/01 04:26:35 1.22 --- imgfile.c 2000/06/30 23:50:38 1.23 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: main.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/main.c,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** main.c 2000/05/02 19:20:26 1.38 --- main.c 2000/06/30 23:50:38 1.39 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: mathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** mathmodule.c 2000/05/11 18:40:42 2.45 --- mathmodule.c 2000/06/30 23:50:38 2.46 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: md5module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/md5module.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** md5module.c 2000/05/03 23:44:32 2.15 --- md5module.c 2000/06/30 23:50:38 2.16 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: mpzmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mpzmodule.c,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** mpzmodule.c 2000/06/30 15:00:59 2.25 --- mpzmodule.c 2000/06/30 23:50:38 2.26 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: newmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/newmodule.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** newmodule.c 2000/06/30 05:02:53 2.21 --- newmodule.c 2000/06/30 23:50:38 2.22 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: parsermodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v retrieving revision 2.39 retrieving revision 2.40 diff -C2 -r2.39 -r2.40 *** parsermodule.c 2000/05/03 23:44:32 2.39 --- parsermodule.c 2000/06/30 23:50:38 2.40 *************** *** 82,107 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 82,92 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pcremodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pcremodule.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** pcremodule.c 2000/05/03 23:44:32 2.19 --- pcremodule.c 2000/06/30 23:50:38 2.20 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.139 retrieving revision 2.140 diff -C2 -r2.139 -r2.140 *** posixmodule.c 2000/06/30 22:45:12 2.139 --- posixmodule.c 2000/06/30 23:50:38 2.140 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pwdmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pwdmodule.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** pwdmodule.c 1998/12/04 18:50:00 1.17 --- pwdmodule.c 2000/06/30 23:50:38 1.18 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pyexpat.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pyexpat.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** pyexpat.c 2000/06/27 00:33:30 2.5 --- pyexpat.c 2000/06/30 23:50:38 2.6 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: regexmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/regexmodule.c,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** regexmodule.c 2000/05/03 23:44:33 1.34 --- regexmodule.c 2000/06/30 23:50:38 1.35 *************** *** 10,35 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 10,20 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: resource.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/resource.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** resource.c 2000/02/29 13:59:23 2.10 --- resource.c 2000/06/30 23:50:38 2.11 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: selectmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -r2.33 -r2.34 *** selectmodule.c 2000/06/28 21:18:13 2.33 --- selectmodule.c 2000/06/30 23:50:38 2.34 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: sgimodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sgimodule.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** sgimodule.c 1996/12/10 00:32:31 1.11 --- sgimodule.c 2000/06/30 23:50:38 1.12 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: shamodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/shamodule.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** shamodule.c 2000/05/03 23:44:33 2.5 --- shamodule.c 2000/06/30 23:50:38 2.6 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.41 retrieving revision 2.42 diff -C2 -r2.41 -r2.42 *** signalmodule.c 2000/06/30 23:04:18 2.41 --- signalmodule.c 2000/06/30 23:50:38 2.42 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.109 retrieving revision 1.110 diff -C2 -r1.109 -r1.110 *** socketmodule.c 2000/06/30 02:46:07 1.109 --- socketmodule.c 2000/06/30 23:50:38 1.110 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: stropmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/stropmodule.c,v retrieving revision 2.63 retrieving revision 2.64 diff -C2 -r2.63 -r2.64 *** stropmodule.c 2000/05/03 23:44:33 2.63 --- stropmodule.c 2000/06/30 23:50:38 2.64 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: structmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/structmodule.c,v retrieving revision 2.31 retrieving revision 2.32 diff -C2 -r2.31 -r2.32 *** structmodule.c 2000/06/01 02:02:46 2.31 --- structmodule.c 2000/06/30 23:50:38 2.32 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: sunaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sunaudiodev.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** sunaudiodev.c 2000/05/03 23:44:33 1.17 --- sunaudiodev.c 2000/06/30 23:50:39 1.18 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: svmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/svmodule.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** svmodule.c 2000/05/03 23:44:33 2.11 --- svmodule.c 2000/06/30 23:50:39 2.12 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: threadmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/threadmodule.c,v retrieving revision 2.31 retrieving revision 2.32 diff -C2 -r2.31 -r2.32 *** threadmodule.c 2000/05/03 23:44:33 2.31 --- threadmodule.c 2000/06/30 23:50:39 2.32 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.86 retrieving revision 2.87 diff -C2 -r2.86 -r2.87 *** timemodule.c 2000/06/29 21:31:02 2.86 --- timemodule.c 2000/06/30 23:50:39 2.87 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: xxmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/xxmodule.c,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** xxmodule.c 2000/05/03 23:44:33 2.16 --- xxmodule.c 2000/06/30 23:50:39 2.17 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: yuv.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/yuv.h,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** yuv.h 1996/10/25 14:41:05 2.5 --- yuv.h 2000/06/30 23:50:39 2.6 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: yuvconvert.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/yuvconvert.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** yuvconvert.c 1996/10/25 14:41:08 2.4 --- yuvconvert.c 2000/06/30 23:50:39 2.5 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ From python-dev@python.org Sat Jul 1 00:50:45 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:50:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python atof.c,2.3,2.4 bltinmodule.c,2.163,2.164 ceval.c,2.180,2.181 compile.c,2.110,2.111 dynload_aix.c,2.3,2.4 dynload_beos.c,2.2,2.3 dynload_dl.c,2.2,2.3 dynload_hpux.c,2.2,2.3 dynload_mac.c,2.4,2.5 dynload_next.c,2.3,2.4 dynload_os2.c,2.2,2.3 dynload_shlib.c,2.2,2.3 dynload_stub.c,2.1,2.2 dynload_win.c,2.3,2.4 errors.c,2.45,2.46 fmod.c,2.9,2.10 frozen.c,1.6,1.7 frozenmain.c,2.20,2.21 getargs.c,2.34,2.35 getcompiler.c,1.5,1.6 getcopyright.c,1.6,1.7 getcwd.c,1.10,1.11 getmtime.c,2.10,2.11 getplatform.c,1.4,1.5 getversion.c,1.10,1.11 import.c,2.136,2.137 importdl.c,2.64,2.65 importdl.h,2.12,2.13 marshal.c,1.49,1.50 memmove.c,2.4,2.5 modsupport.c,2.43,2.44 mystrtoul.c,2.17,2.18 pystate.c,2.9,2.10 pythonrun.c,2.98,2.99 sigcheck.c,2.4,2.5 strerror.c,2.6,2.7 structmember.c,2.14,2.15 sysmodule.c,2.66,2.67 thread.c,2.29,2.30 thread_beos.h,2.3,2.4 thread_cthread.h,2.9,2.10 thread_foobar.h,2.7,2.8 thread_lwp.h,2.8,2.9 thread_nt.h,2.12,2.13 thread_os2.h,! 2.6,2.7 thread_pth.h,2.2,2.3 thread_pthread.h,2.25,2.26 thread_sgi.h,2.10,2.11 thread_solaris.h,2.11,2.12 thread_wince.h,2.2,2.3 traceback.c,2.28,2.29 Message-ID: <200006302350.QAA07714@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/Python Modified Files: atof.c bltinmodule.c ceval.c compile.c dynload_aix.c dynload_beos.c dynload_dl.c dynload_hpux.c dynload_mac.c dynload_next.c dynload_os2.c dynload_shlib.c dynload_stub.c dynload_win.c errors.c fmod.c frozen.c frozenmain.c getargs.c getcompiler.c getcopyright.c getcwd.c getmtime.c getplatform.c getversion.c import.c importdl.c importdl.h marshal.c memmove.c modsupport.c mystrtoul.c pystate.c pythonrun.c sigcheck.c strerror.c structmember.c sysmodule.c thread.c thread_beos.h thread_cthread.h thread_foobar.h thread_lwp.h thread_nt.h thread_os2.h thread_pth.h thread_pthread.h thread_sgi.h thread_solaris.h thread_wince.h traceback.c Log Message: Change copyright notice. Index: atof.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/atof.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** atof.c 1996/10/25 14:42:36 2.3 --- atof.c 2000/06/30 23:50:39 2.4 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.163 retrieving revision 2.164 diff -C2 -r2.163 -r2.164 *** bltinmodule.c 2000/06/28 21:12:25 2.163 --- bltinmodule.c 2000/06/30 23:50:39 2.164 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.180 retrieving revision 2.181 diff -C2 -r2.180 -r2.181 *** ceval.c 2000/06/28 22:07:35 2.180 --- ceval.c 2000/06/30 23:50:39 2.181 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.110 retrieving revision 2.111 diff -C2 -r2.110 -r2.111 *** compile.c 2000/06/30 16:20:13 2.110 --- compile.c 2000/06/30 23:50:39 2.111 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dynload_aix.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_aix.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** dynload_aix.c 1999/12/22 14:09:35 2.3 --- dynload_aix.c 2000/06/30 23:50:39 2.4 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dynload_beos.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_beos.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** dynload_beos.c 1999/12/22 14:09:35 2.2 --- dynload_beos.c 2000/06/30 23:50:39 2.3 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dynload_dl.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_dl.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** dynload_dl.c 1999/12/22 14:09:35 2.2 --- dynload_dl.c 2000/06/30 23:50:39 2.3 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dynload_hpux.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_hpux.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** dynload_hpux.c 1999/12/22 14:09:35 2.2 --- dynload_hpux.c 2000/06/30 23:50:39 2.3 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dynload_mac.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_mac.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** dynload_mac.c 2000/04/24 15:08:01 2.4 --- dynload_mac.c 2000/06/30 23:50:39 2.5 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dynload_next.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_next.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** dynload_next.c 2000/04/10 12:45:10 2.3 --- dynload_next.c 2000/06/30 23:50:39 2.4 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dynload_os2.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_os2.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** dynload_os2.c 1999/12/22 14:09:35 2.2 --- dynload_os2.c 2000/06/30 23:50:39 2.3 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dynload_shlib.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_shlib.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** dynload_shlib.c 1999/12/22 14:09:35 2.2 --- dynload_shlib.c 2000/06/30 23:50:39 2.3 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dynload_stub.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_stub.c,v retrieving revision 2.1 retrieving revision 2.2 diff -C2 -r2.1 -r2.2 *** dynload_stub.c 1999/12/20 21:18:49 2.1 --- dynload_stub.c 2000/06/30 23:50:39 2.2 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dynload_win.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_win.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** dynload_win.c 2000/06/28 22:07:35 2.3 --- dynload_win.c 2000/06/30 23:50:39 2.4 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: errors.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/errors.c,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** errors.c 2000/05/02 19:27:51 2.45 --- errors.c 2000/06/30 23:50:39 2.46 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: fmod.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/fmod.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** fmod.c 1996/10/25 14:43:04 2.9 --- fmod.c 2000/06/30 23:50:39 2.10 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: frozen.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/frozen.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** frozen.c 1998/04/03 21:10:36 1.6 --- frozen.c 2000/06/30 23:50:39 1.7 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: frozenmain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/frozenmain.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** frozenmain.c 1999/01/02 21:42:48 2.20 --- frozenmain.c 2000/06/30 23:50:39 2.21 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: getargs.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v retrieving revision 2.34 retrieving revision 2.35 diff -C2 -r2.34 -r2.35 *** getargs.c 2000/06/28 23:53:56 2.34 --- getargs.c 2000/06/30 23:50:39 2.35 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: getcompiler.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getcompiler.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** getcompiler.c 1997/07/19 19:48:41 1.5 --- getcompiler.c 2000/06/30 23:50:40 1.6 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: getcopyright.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getcopyright.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** getcopyright.c 2000/05/10 20:06:00 1.6 --- getcopyright.c 2000/06/30 23:50:40 1.7 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: getcwd.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getcwd.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** getcwd.c 2000/06/28 22:07:35 1.10 --- getcwd.c 2000/06/30 23:50:40 1.11 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: getmtime.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getmtime.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** getmtime.c 2000/06/30 16:18:57 2.10 --- getmtime.c 2000/06/30 23:50:40 2.11 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: getplatform.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getplatform.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** getplatform.c 1997/07/19 19:48:05 1.4 --- getplatform.c 2000/06/30 23:50:40 1.5 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: getversion.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getversion.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** getversion.c 1999/04/22 12:03:40 1.10 --- getversion.c 2000/06/30 23:50:40 1.11 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.136 retrieving revision 2.137 diff -C2 -r2.136 -r2.137 *** import.c 2000/06/30 16:18:57 2.136 --- import.c 2000/06/30 23:50:40 2.137 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: importdl.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/importdl.c,v retrieving revision 2.64 retrieving revision 2.65 diff -C2 -r2.64 -r2.65 *** importdl.c 1999/12/22 14:09:35 2.64 --- importdl.c 2000/06/30 23:50:40 2.65 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: importdl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/importdl.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** importdl.h 1999/12/20 22:55:03 2.12 --- importdl.h 2000/06/30 23:50:40 2.13 *************** *** 12,37 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 12,22 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: marshal.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/marshal.c,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -r1.49 -r1.50 *** marshal.c 2000/06/28 23:24:19 1.49 --- marshal.c 2000/06/30 23:50:40 1.50 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: memmove.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/memmove.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** memmove.c 1996/10/25 14:43:30 2.4 --- memmove.c 2000/06/30 23:50:40 2.5 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: modsupport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/modsupport.c,v retrieving revision 2.43 retrieving revision 2.44 diff -C2 -r2.43 -r2.44 *** modsupport.c 2000/06/28 22:07:35 2.43 --- modsupport.c 2000/06/30 23:50:40 2.44 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: mystrtoul.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/mystrtoul.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** mystrtoul.c 1999/04/07 16:07:21 2.17 --- mystrtoul.c 2000/06/30 23:50:40 2.18 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pystate.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pystate.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** pystate.c 1999/06/18 14:22:24 2.9 --- pystate.c 2000/06/30 23:50:40 2.10 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pythonrun.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v retrieving revision 2.98 retrieving revision 2.99 diff -C2 -r2.98 -r2.99 *** pythonrun.c 2000/06/20 19:10:44 2.98 --- pythonrun.c 2000/06/30 23:50:40 2.99 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: sigcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/sigcheck.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** sigcheck.c 1997/04/29 20:08:14 2.4 --- sigcheck.c 2000/06/30 23:50:40 2.5 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: strerror.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/strerror.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** strerror.c 1996/10/25 14:43:41 2.6 --- strerror.c 2000/06/30 23:50:40 2.7 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: structmember.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/structmember.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** structmember.c 1998/05/20 22:25:32 2.14 --- structmember.c 2000/06/30 23:50:40 2.15 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: sysmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v retrieving revision 2.66 retrieving revision 2.67 diff -C2 -r2.66 -r2.67 *** sysmodule.c 2000/06/28 22:07:35 2.66 --- sysmodule.c 2000/06/30 23:50:40 2.67 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread.c,v retrieving revision 2.29 retrieving revision 2.30 diff -C2 -r2.29 -r2.30 *** thread.c 2000/05/08 13:36:49 2.29 --- thread.c 2000/06/30 23:50:40 2.30 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread_beos.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_beos.h,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** thread_beos.h 2000/06/30 15:01:00 2.3 --- thread_beos.h 2000/06/30 23:50:40 2.4 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. BeOS thread support by Chris Herborth (chrish@qnx.com) --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. BeOS thread support by Chris Herborth (chrish@qnx.com) Index: thread_cthread.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_cthread.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** thread_cthread.h 2000/06/30 15:01:00 2.9 --- thread_cthread.h 2000/06/30 23:50:40 2.10 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread_foobar.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_foobar.h,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** thread_foobar.h 2000/06/30 15:01:00 2.7 --- thread_foobar.h 2000/06/30 23:50:40 2.8 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread_lwp.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_lwp.h,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** thread_lwp.h 2000/06/30 15:01:00 2.8 --- thread_lwp.h 2000/06/30 23:50:40 2.9 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread_nt.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_nt.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** thread_nt.h 2000/06/30 15:01:00 2.12 --- thread_nt.h 2000/06/30 23:50:40 2.13 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread_os2.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_os2.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** thread_os2.h 2000/06/30 15:01:00 2.6 --- thread_os2.h 2000/06/30 23:50:40 2.7 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread_pth.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_pth.h,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** thread_pth.h 2000/06/30 15:01:00 2.2 --- thread_pth.h 2000/06/30 23:50:40 2.3 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread_pthread.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_pthread.h,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** thread_pthread.h 2000/06/30 15:01:00 2.25 --- thread_pthread.h 2000/06/30 23:50:40 2.26 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread_sgi.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_sgi.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** thread_sgi.h 2000/06/30 15:01:00 2.10 --- thread_sgi.h 2000/06/30 23:50:40 2.11 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread_solaris.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_solaris.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** thread_solaris.h 2000/06/30 15:01:00 2.11 --- thread_solaris.h 2000/06/30 23:50:40 2.12 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: thread_wince.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_wince.h,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** thread_wince.h 2000/06/30 15:01:00 2.2 --- thread_wince.h 2000/06/30 23:50:40 2.3 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: traceback.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/traceback.c,v retrieving revision 2.28 retrieving revision 2.29 diff -C2 -r2.28 -r2.29 *** traceback.c 2000/06/28 22:07:35 2.28 --- traceback.c 2000/06/30 23:50:40 2.29 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ From python-dev@python.org Sat Jul 1 00:51:10 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:51:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc README,1.38,1.39 Message-ID: <200006302351.QAA07745@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/Doc Modified Files: README Log Message: Change copyright notice. Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/README,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** README 2000/04/28 16:53:35 1.38 --- README 2000/06/30 23:50:37 1.39 *************** *** 199,223 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ---------------------------------------------------------------------- --- 199,208 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ---------------------------------------------------------------------- From python-dev@python.org Sat Jul 1 00:51:10 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:51:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc python.man,1.13,1.14 Message-ID: <200006302351.QAA07751@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/Misc Modified Files: python.man Log Message: Change copyright notice. Index: python.man =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/python.man,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** python.man 1999/08/20 13:30:49 1.13 --- python.man 2000/06/30 23:50:38 1.14 *************** *** 291,314 **** All Rights Reserved .PP ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. --- 291,299 ---- All Rights Reserved .PP ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. From python-dev@python.org Sat Jul 1 00:51:12 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:51:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include Python.h,2.17,2.18 abstract.h,2.18,2.19 bitset.h,2.9,2.10 bufferobject.h,2.2,2.3 ceval.h,2.31,2.32 classobject.h,2.28,2.29 cobject.h,2.5,2.6 compile.h,2.19,2.20 dictobject.h,2.16,2.17 errcode.h,2.9,2.10 eval.h,2.10,2.11 fileobject.h,2.17,2.18 floatobject.h,2.13,2.14 frameobject.h,2.24,2.25 funcobject.h,2.16,2.17 grammar.h,2.10,2.11 import.h,2.22,2.23 intobject.h,2.17,2.18 intrcheck.h,2.5,2.6 listobject.h,2.17,2.18 longintrepr.h,2.5,2.6 longobject.h,2.13,2.14 marshal.h,2.6,2.7 metagrammar.h,2.7,2.8 methodobject.h,2.16,2.17 modsupport.h,2.28,2.29 moduleobject.h,2.13,2.14 mymalloc.h,2.19,2.20 myproto.h,2.6,2.7 myselect.h,2.10,2.11 mytime.h,2.4,2.5 node.h,2.13,2.14 object.h,2.57,2.58 objimpl.h,2.17,2.18 opcode.h,2.23,2.24 osdefs.h,2.10,2.11 parsetok.h,2.10,2.11 patchlevel.h,2.36,2.37 pgenheaders.h,2.18,2.19 pydebug.h,2.11,2.12 pyerrors.h,2.35,2.36 pystate.h,2.9,2.10 pythonrun.h,2.28,2.29 pythread.h,2.13,2.14 rangeobject.h,2.11,2.12 stringobj! ect.h,2.17,2.18 structmember.h,2.12,2.13 sysmodule.h,2.17,2.18 token.h,2.12,2.13 traceback.h,2.14,2.15 tupleobject.h,2.20,2.21 Message-ID: <200006302351.QAA07801@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv7452/Include Modified Files: Python.h abstract.h bitset.h bufferobject.h ceval.h classobject.h cobject.h compile.h dictobject.h errcode.h eval.h fileobject.h floatobject.h frameobject.h funcobject.h grammar.h import.h intobject.h intrcheck.h listobject.h longintrepr.h longobject.h marshal.h metagrammar.h methodobject.h modsupport.h moduleobject.h mymalloc.h myproto.h myselect.h mytime.h node.h object.h objimpl.h opcode.h osdefs.h parsetok.h patchlevel.h pgenheaders.h pydebug.h pyerrors.h pystate.h pythonrun.h pythread.h rangeobject.h stringobject.h structmember.h sysmodule.h token.h traceback.h tupleobject.h Log Message: Change copyright notice. Index: Python.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** Python.h 2000/05/28 20:29:48 2.17 --- Python.h 2000/06/30 23:50:38 2.18 *************** *** 9,34 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 9,19 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: abstract.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/abstract.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** abstract.h 2000/06/18 18:43:13 2.18 --- abstract.h 2000/06/30 23:50:38 2.19 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: bitset.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/bitset.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** bitset.h 1996/10/25 14:37:47 2.9 --- bitset.h 2000/06/30 23:50:38 2.10 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: bufferobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/bufferobject.h,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** bufferobject.h 1998/12/04 18:47:51 2.2 --- bufferobject.h 2000/06/30 23:50:38 2.3 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: ceval.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/ceval.h,v retrieving revision 2.31 retrieving revision 2.32 diff -C2 -r2.31 -r2.32 *** ceval.h 2000/05/08 14:04:54 2.31 --- ceval.h 2000/06/30 23:50:38 2.32 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: classobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/classobject.h,v retrieving revision 2.28 retrieving revision 2.29 diff -C2 -r2.28 -r2.29 *** classobject.h 1998/12/04 18:47:53 2.28 --- classobject.h 2000/06/30 23:50:38 2.29 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: cobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/cobject.h,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** cobject.h 1998/12/04 18:47:54 2.5 --- cobject.h 2000/06/30 23:50:38 2.6 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: compile.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/compile.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** compile.h 1998/12/04 18:47:55 2.19 --- compile.h 2000/06/30 23:50:38 2.20 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: dictobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/dictobject.h,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** dictobject.h 2000/03/30 22:27:28 2.16 --- dictobject.h 2000/06/30 23:50:38 2.17 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: errcode.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/errcode.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** errcode.h 2000/06/20 19:10:44 2.9 --- errcode.h 2000/06/30 23:50:38 2.10 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: eval.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/eval.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** eval.h 1998/12/04 18:47:58 2.10 --- eval.h 2000/06/30 23:50:38 2.11 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: fileobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/fileobject.h,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** fileobject.h 1998/12/04 18:47:59 2.17 --- fileobject.h 2000/06/30 23:50:38 2.18 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: floatobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/floatobject.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** floatobject.h 1999/10/12 19:54:34 2.13 --- floatobject.h 2000/06/30 23:50:38 2.14 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: frameobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/frameobject.h,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -r2.24 -r2.25 *** frameobject.h 1998/12/04 18:48:01 2.24 --- frameobject.h 2000/06/30 23:50:38 2.25 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: funcobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/funcobject.h,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** funcobject.h 1998/12/04 18:48:02 2.16 --- funcobject.h 2000/06/30 23:50:38 2.17 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: grammar.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/grammar.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** grammar.h 1997/08/12 14:57:08 2.10 --- grammar.h 2000/06/30 23:50:38 2.11 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: import.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/import.h,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** import.h 1999/01/04 16:39:38 2.22 --- import.h 2000/06/30 23:50:38 2.23 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: intobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/intobject.h,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** intobject.h 2000/04/05 20:11:08 2.17 --- intobject.h 2000/06/30 23:50:38 2.18 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: intrcheck.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/intrcheck.h,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** intrcheck.h 1998/12/04 18:48:04 2.5 --- intrcheck.h 2000/06/30 23:50:38 2.6 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: listobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/listobject.h,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** listobject.h 2000/03/01 15:06:53 2.17 --- listobject.h 2000/06/30 23:50:38 2.18 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: longintrepr.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/longintrepr.h,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** longintrepr.h 1998/12/04 18:48:06 2.5 --- longintrepr.h 2000/06/30 23:50:38 2.6 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: longobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/longobject.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** longobject.h 2000/04/05 20:11:08 2.13 --- longobject.h 2000/06/30 23:50:38 2.14 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: marshal.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/marshal.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** marshal.h 1998/12/04 18:48:07 2.6 --- marshal.h 2000/06/30 23:50:38 2.7 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: metagrammar.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/metagrammar.h,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** metagrammar.h 1996/10/25 14:38:29 2.7 --- metagrammar.h 2000/06/30 23:50:38 2.8 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: methodobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/methodobject.h,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** methodobject.h 1998/12/04 18:48:08 2.16 --- methodobject.h 2000/06/30 23:50:38 2.17 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: modsupport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/modsupport.h,v retrieving revision 2.28 retrieving revision 2.29 diff -C2 -r2.28 -r2.29 *** modsupport.h 2000/03/29 01:46:45 2.28 --- modsupport.h 2000/06/30 23:50:38 2.29 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: moduleobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/moduleobject.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** moduleobject.h 1999/02/15 14:43:11 2.13 --- moduleobject.h 2000/06/30 23:50:38 2.14 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: mymalloc.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mymalloc.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** mymalloc.h 2000/05/05 15:36:09 2.19 --- mymalloc.h 2000/06/30 23:50:38 2.20 *************** *** 7,32 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 7,17 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: myproto.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/myproto.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** myproto.h 1997/05/07 23:50:40 2.6 --- myproto.h 2000/06/30 23:50:38 2.7 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: myselect.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/myselect.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** myselect.h 2000/04/24 15:12:54 2.10 --- myselect.h 2000/06/30 23:50:38 2.11 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: mytime.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mytime.h,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** mytime.h 1996/10/25 14:38:42 2.4 --- mytime.h 2000/06/30 23:50:38 2.5 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: node.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/node.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** node.h 2000/06/20 19:10:44 2.13 --- node.h 2000/06/30 23:50:38 2.14 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: object.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/object.h,v retrieving revision 2.57 retrieving revision 2.58 diff -C2 -r2.57 -r2.58 *** object.h 2000/06/29 19:17:04 2.57 --- object.h 2000/06/30 23:50:38 2.58 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: objimpl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/objimpl.h,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** objimpl.h 2000/06/30 05:02:52 2.17 --- objimpl.h 2000/06/30 23:50:38 2.18 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: opcode.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/opcode.h,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** opcode.h 2000/03/29 00:10:03 2.23 --- opcode.h 2000/06/30 23:50:38 2.24 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: osdefs.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/osdefs.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** osdefs.h 1997/12/05 21:39:25 2.10 --- osdefs.h 2000/06/30 23:50:38 2.11 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: parsetok.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/parsetok.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** parsetok.h 1998/12/04 18:48:14 2.10 --- parsetok.h 2000/06/30 23:50:38 2.11 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: patchlevel.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/patchlevel.h,v retrieving revision 2.36 retrieving revision 2.37 diff -C2 -r2.36 -r2.37 *** patchlevel.h 2000/06/29 22:29:24 2.36 --- patchlevel.h 2000/06/30 23:50:38 2.37 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pgenheaders.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pgenheaders.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** pgenheaders.h 2000/06/28 20:55:34 2.18 --- pgenheaders.h 2000/06/30 23:50:38 2.19 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pydebug.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pydebug.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** pydebug.h 2000/05/01 17:51:41 2.11 --- pydebug.h 2000/06/30 23:50:38 2.12 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pyerrors.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyerrors.h,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** pyerrors.h 2000/03/10 22:33:32 2.35 --- pyerrors.h 2000/06/30 23:50:38 2.36 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pystate.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pystate.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** pystate.h 1998/12/21 20:21:19 2.9 --- pystate.h 2000/06/30 23:50:38 2.10 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pythonrun.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pythonrun.h,v retrieving revision 2.28 retrieving revision 2.29 diff -C2 -r2.28 -r2.29 *** pythonrun.h 2000/06/26 14:37:53 2.28 --- pythonrun.h 2000/06/30 23:50:38 2.29 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: pythread.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pythread.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** pythread.h 1999/03/24 19:02:09 2.13 --- pythread.h 2000/06/30 23:50:38 2.14 *************** *** 8,33 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 8,18 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: rangeobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/rangeobject.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** rangeobject.h 1998/12/04 18:48:19 2.11 --- rangeobject.h 2000/06/30 23:50:38 2.12 *************** *** 5,30 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 5,15 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: stringobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/stringobject.h,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** stringobject.h 1998/12/04 18:48:21 2.17 --- stringobject.h 2000/06/30 23:50:38 2.18 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: structmember.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/structmember.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** structmember.h 1998/12/04 18:48:22 2.12 --- structmember.h 2000/06/30 23:50:38 2.13 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: sysmodule.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/sysmodule.h,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** sysmodule.h 1998/12/04 18:48:22 2.17 --- sysmodule.h 2000/06/30 23:50:38 2.18 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: token.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/token.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** token.h 1998/12/04 18:48:23 2.12 --- token.h 2000/06/30 23:50:38 2.13 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: traceback.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/traceback.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** traceback.h 1998/12/04 18:48:24 2.14 --- traceback.h 2000/06/30 23:50:38 2.15 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ Index: tupleobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/tupleobject.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** tupleobject.h 2000/03/01 15:06:53 2.20 --- tupleobject.h 2000/06/30 23:50:38 2.21 *************** *** 11,36 **** All Rights Reserved ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address ftp://ftp.python.org. ! ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ --- 11,21 ---- All Rights Reserved ! Copyright (c) 2000, BeOpen.com. ! Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! All rights reserved. ! See the file "Misc/COPYRIGHT" for information on usage and ! redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ From python-dev@python.org Sat Jul 1 00:58:08 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:58:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC/os2vacpp config.c,1.4,1.5 getpathp.c,1.6,1.7 Message-ID: <200006302358.QAA08427@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC/os2vacpp In directory slayer.i.sourceforge.net:/tmp/cvs-serv8335/PC/os2vacpp Modified Files: config.c getpathp.c Log Message: Change copyright notice - 2nd try. Index: config.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/os2vacpp/config.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** config.c 2000/06/30 23:50:39 1.4 --- config.c 2000/06/30 23:58:05 1.5 *************** *** 1,8 **** /* -*- C -*- *********************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: getpathp.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/os2vacpp/getpathp.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** getpathp.c 2000/06/30 23:50:39 1.6 --- getpathp.c 2000/06/30 23:58:05 1.7 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- From python-dev@python.org Sat Jul 1 00:58:08 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:58:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC config.c,1.24,1.25 getpathp.c,1.16,1.17 Message-ID: <200006302358.QAA08421@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv8335/PC Modified Files: config.c getpathp.c Log Message: Change copyright notice - 2nd try. Index: config.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/config.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** config.c 2000/06/30 23:50:39 1.24 --- config.c 2000/06/30 23:58:05 1.25 *************** *** 1,8 **** /* -*- C -*- *********************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: getpathp.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/getpathp.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** getpathp.c 2000/06/30 23:50:39 1.16 --- getpathp.c 2000/06/30 23:58:05 1.17 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- From python-dev@python.org Sat Jul 1 00:58:08 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:58:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/modulator/Templates copyright,1.3,1.4 Message-ID: <200006302358.QAA08447@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/modulator/Templates In directory slayer.i.sourceforge.net:/tmp/cvs-serv8335/Tools/modulator/Templates Modified Files: copyright Log Message: Change copyright notice - 2nd try. Index: copyright =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/Templates/copyright,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** copyright 2000/06/30 23:50:40 1.3 --- copyright 2000/06/30 23:58:06 1.4 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,15 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,9 ---- From python-dev@python.org Sat Jul 1 00:58:10 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:58:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.36,2.37 bufferobject.c,2.9,2.10 classobject.c,2.95,2.96 cobject.c,2.9,2.10 complexobject.c,2.26,2.27 dictobject.c,2.56,2.57 fileobject.c,2.76,2.77 floatobject.c,2.60,2.61 frameobject.c,2.40,2.41 funcobject.c,2.26,2.27 intobject.c,2.44,2.45 listobject.c,2.77,2.78 longobject.c,1.59,1.60 methodobject.c,2.30,2.31 moduleobject.c,2.26,2.27 object.c,2.77,2.78 rangeobject.c,2.14,2.15 stringobject.c,2.71,2.72 tupleobject.c,2.40,2.41 typeobject.c,2.13,2.14 xxobject.c,2.16,2.17 Message-ID: <200006302358.QAA08531@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv8335/Objects Modified Files: abstract.c bufferobject.c classobject.c cobject.c complexobject.c dictobject.c fileobject.c floatobject.c frameobject.c funcobject.c intobject.c listobject.c longobject.c methodobject.c moduleobject.c object.c rangeobject.c stringobject.c tupleobject.c typeobject.c xxobject.c Log Message: Change copyright notice - 2nd try. Index: abstract.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v retrieving revision 2.36 retrieving revision 2.37 diff -C2 -r2.36 -r2.37 *** abstract.c 2000/06/30 23:50:39 2.36 --- abstract.c 2000/06/30 23:58:05 2.37 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: bufferobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/bufferobject.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** bufferobject.c 2000/06/30 23:50:39 2.9 --- bufferobject.c 2000/06/30 23:58:05 2.10 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: classobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/classobject.c,v retrieving revision 2.95 retrieving revision 2.96 diff -C2 -r2.95 -r2.96 *** classobject.c 2000/06/30 23:50:39 2.95 --- classobject.c 2000/06/30 23:58:05 2.96 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: cobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/cobject.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** cobject.c 2000/06/30 23:50:39 2.9 --- cobject.c 2000/06/30 23:58:05 2.10 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: complexobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/complexobject.c,v retrieving revision 2.26 retrieving revision 2.27 diff -C2 -r2.26 -r2.27 *** complexobject.c 2000/06/30 23:50:39 2.26 --- complexobject.c 2000/06/30 23:58:05 2.27 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dictobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/dictobject.c,v retrieving revision 2.56 retrieving revision 2.57 diff -C2 -r2.56 -r2.57 *** dictobject.c 2000/06/30 23:50:39 2.56 --- dictobject.c 2000/06/30 23:58:05 2.57 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.76 retrieving revision 2.77 diff -C2 -r2.76 -r2.77 *** fileobject.c 2000/06/30 23:50:39 2.76 --- fileobject.c 2000/06/30 23:58:05 2.77 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: floatobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v retrieving revision 2.60 retrieving revision 2.61 diff -C2 -r2.60 -r2.61 *** floatobject.c 2000/06/30 23:50:39 2.60 --- floatobject.c 2000/06/30 23:58:05 2.61 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: frameobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/frameobject.c,v retrieving revision 2.40 retrieving revision 2.41 diff -C2 -r2.40 -r2.41 *** frameobject.c 2000/06/30 23:50:39 2.40 --- frameobject.c 2000/06/30 23:58:05 2.41 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: funcobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/funcobject.c,v retrieving revision 2.26 retrieving revision 2.27 diff -C2 -r2.26 -r2.27 *** funcobject.c 2000/06/30 23:50:39 2.26 --- funcobject.c 2000/06/30 23:58:05 2.27 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: intobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/intobject.c,v retrieving revision 2.44 retrieving revision 2.45 diff -C2 -r2.44 -r2.45 *** intobject.c 2000/06/30 23:50:39 2.44 --- intobject.c 2000/06/30 23:58:05 2.45 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: listobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v retrieving revision 2.77 retrieving revision 2.78 diff -C2 -r2.77 -r2.78 *** listobject.c 2000/06/30 23:50:39 2.77 --- listobject.c 2000/06/30 23:58:05 2.78 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: longobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -r1.59 -r1.60 *** longobject.c 2000/06/30 23:50:39 1.59 --- longobject.c 2000/06/30 23:58:05 1.60 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: methodobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/methodobject.c,v retrieving revision 2.30 retrieving revision 2.31 diff -C2 -r2.30 -r2.31 *** methodobject.c 2000/06/30 23:50:39 2.30 --- methodobject.c 2000/06/30 23:58:05 2.31 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: moduleobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/moduleobject.c,v retrieving revision 2.26 retrieving revision 2.27 diff -C2 -r2.26 -r2.27 *** moduleobject.c 2000/06/30 23:50:39 2.26 --- moduleobject.c 2000/06/30 23:58:05 2.27 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.77 retrieving revision 2.78 diff -C2 -r2.77 -r2.78 *** object.c 2000/06/30 23:50:39 2.77 --- object.c 2000/06/30 23:58:05 2.78 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: rangeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/rangeobject.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** rangeobject.c 2000/06/30 23:50:39 2.14 --- rangeobject.c 2000/06/30 23:58:05 2.15 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.71 retrieving revision 2.72 diff -C2 -r2.71 -r2.72 *** stringobject.c 2000/06/30 23:50:39 2.71 --- stringobject.c 2000/06/30 23:58:05 2.72 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: tupleobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/tupleobject.c,v retrieving revision 2.40 retrieving revision 2.41 diff -C2 -r2.40 -r2.41 *** tupleobject.c 2000/06/30 23:50:39 2.40 --- tupleobject.c 2000/06/30 23:58:05 2.41 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: typeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** typeobject.c 2000/06/30 23:50:39 2.13 --- typeobject.c 2000/06/30 23:58:05 2.14 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: xxobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/xxobject.c,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** xxobject.c 2000/06/30 23:50:39 2.16 --- xxobject.c 2000/06/30 23:58:05 2.17 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- From python-dev@python.org Sat Jul 1 00:58:10 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:58:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser acceler.c,2.13,2.14 assert.h,2.8,2.9 bitset.c,2.8,2.9 firstsets.c,2.8,2.9 grammar.c,2.14,2.15 grammar1.c,2.9,2.10 intrcheck.c,2.31,2.32 listnode.c,2.10,2.11 metagrammar.c,2.8,2.9 myreadline.c,2.19,2.20 node.c,2.9,2.10 parser.c,2.12,2.13 parser.h,2.10,2.11 parsetok.c,2.19,2.20 pgen.c,2.13,2.14 pgen.h,2.10,2.11 pgenmain.c,2.18,2.19 printgrammar.c,2.9,2.10 tokenizer.c,2.43,2.44 tokenizer.h,2.13,2.14 Message-ID: <200006302358.QAA08532@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv8335/Parser Modified Files: acceler.c assert.h bitset.c firstsets.c grammar.c grammar1.c intrcheck.c listnode.c metagrammar.c myreadline.c node.c parser.c parser.h parsetok.c pgen.c pgen.h pgenmain.c printgrammar.c tokenizer.c tokenizer.h Log Message: Change copyright notice - 2nd try. Index: acceler.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/acceler.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** acceler.c 2000/06/30 23:50:39 2.13 --- acceler.c 2000/06/30 23:58:05 2.14 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: assert.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/assert.h,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** assert.h 2000/06/30 23:50:39 2.8 --- assert.h 2000/06/30 23:58:05 2.9 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: bitset.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/bitset.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** bitset.c 2000/06/30 23:50:39 2.8 --- bitset.c 2000/06/30 23:58:05 2.9 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: firstsets.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/firstsets.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** firstsets.c 2000/06/30 23:50:39 2.8 --- firstsets.c 2000/06/30 23:58:05 2.9 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: grammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/grammar.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** grammar.c 2000/06/30 23:50:39 2.14 --- grammar.c 2000/06/30 23:58:05 2.15 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: grammar1.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/grammar1.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** grammar1.c 2000/06/30 23:50:39 2.9 --- grammar1.c 2000/06/30 23:58:05 2.10 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: intrcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/intrcheck.c,v retrieving revision 2.31 retrieving revision 2.32 diff -C2 -r2.31 -r2.32 *** intrcheck.c 2000/06/30 23:50:39 2.31 --- intrcheck.c 2000/06/30 23:58:05 2.32 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: listnode.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/listnode.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** listnode.c 2000/06/30 23:50:39 2.10 --- listnode.c 2000/06/30 23:58:05 2.11 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: metagrammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/metagrammar.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** metagrammar.c 2000/06/30 23:50:39 2.8 --- metagrammar.c 2000/06/30 23:58:05 2.9 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: myreadline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/myreadline.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** myreadline.c 2000/06/30 23:50:39 2.19 --- myreadline.c 2000/06/30 23:58:05 2.20 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: node.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/node.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** node.c 2000/06/30 23:50:39 2.9 --- node.c 2000/06/30 23:58:05 2.10 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: parser.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parser.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** parser.c 2000/06/30 23:50:39 2.12 --- parser.c 2000/06/30 23:58:05 2.13 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: parser.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parser.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** parser.h 2000/06/30 23:50:39 2.10 --- parser.h 2000/06/30 23:58:05 2.11 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: parsetok.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parsetok.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** parsetok.c 2000/06/30 23:50:39 2.19 --- parsetok.c 2000/06/30 23:58:05 2.20 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: pgen.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgen.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** pgen.c 2000/06/30 23:50:39 2.13 --- pgen.c 2000/06/30 23:58:05 2.14 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: pgen.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgen.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** pgen.h 2000/06/30 23:50:39 2.10 --- pgen.h 2000/06/30 23:58:05 2.11 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: pgenmain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgenmain.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** pgenmain.c 2000/06/30 23:50:39 2.18 --- pgenmain.c 2000/06/30 23:58:05 2.19 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: printgrammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/printgrammar.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** printgrammar.c 2000/06/30 23:50:39 2.9 --- printgrammar.c 2000/06/30 23:58:05 2.10 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: tokenizer.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/tokenizer.c,v retrieving revision 2.43 retrieving revision 2.44 diff -C2 -r2.43 -r2.44 *** tokenizer.c 2000/06/30 23:50:39 2.43 --- tokenizer.c 2000/06/30 23:58:05 2.44 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: tokenizer.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/tokenizer.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** tokenizer.h 2000/06/30 23:50:39 2.13 --- tokenizer.h 2000/06/30 23:58:05 2.14 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- From python-dev@python.org Sat Jul 1 00:58:10 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:58:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include Python.h,2.18,2.19 abstract.h,2.19,2.20 bitset.h,2.10,2.11 bufferobject.h,2.3,2.4 ceval.h,2.32,2.33 classobject.h,2.29,2.30 cobject.h,2.6,2.7 compile.h,2.20,2.21 dictobject.h,2.17,2.18 errcode.h,2.10,2.11 eval.h,2.11,2.12 fileobject.h,2.18,2.19 floatobject.h,2.14,2.15 frameobject.h,2.25,2.26 funcobject.h,2.17,2.18 grammar.h,2.11,2.12 import.h,2.23,2.24 intobject.h,2.18,2.19 intrcheck.h,2.6,2.7 listobject.h,2.18,2.19 longintrepr.h,2.6,2.7 longobject.h,2.14,2.15 marshal.h,2.7,2.8 metagrammar.h,2.8,2.9 methodobject.h,2.17,2.18 modsupport.h,2.29,2.30 moduleobject.h,2.14,2.15 mymalloc.h,2.20,2.21 myproto.h,2.7,2.8 myselect.h,2.11,2.12 mytime.h,2.5,2.6 node.h,2.14,2.15 object.h,2.58,2.59 objimpl.h,2.18,2.19 opcode.h,2.24,2.25 osdefs.h,2.11,2.12 parsetok.h,2.11,2.12 patchlevel.h,2.37,2.38 pgenheaders.h,2.19,2.20 pydebug.h,2.12,2.13 pyerrors.h,2.36,2.37 pystate.h,2.10,2.11 pythonrun.h,2.29,2.30 pythread.h,2.14,2.15 rangeobject.h,2.12,2.13 string! object.h,2.18,2.19 structmember.h,2.13,2.14 sysmodule.h,2.18,2.19 token.h,2.13,2.14 traceback.h,2.15,2.16 tupleobject.h,2.21,2.22 Message-ID: <200006302358.QAA08569@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv8335/Include Modified Files: Python.h abstract.h bitset.h bufferobject.h ceval.h classobject.h cobject.h compile.h dictobject.h errcode.h eval.h fileobject.h floatobject.h frameobject.h funcobject.h grammar.h import.h intobject.h intrcheck.h listobject.h longintrepr.h longobject.h marshal.h metagrammar.h methodobject.h modsupport.h moduleobject.h mymalloc.h myproto.h myselect.h mytime.h node.h object.h objimpl.h opcode.h osdefs.h parsetok.h patchlevel.h pgenheaders.h pydebug.h pyerrors.h pystate.h pythonrun.h pythread.h rangeobject.h stringobject.h structmember.h sysmodule.h token.h traceback.h tupleobject.h Log Message: Change copyright notice - 2nd try. Index: Python.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** Python.h 2000/06/30 23:50:38 2.18 --- Python.h 2000/06/30 23:58:04 2.19 *************** *** 4,12 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 4,7 ---- *************** *** 16,20 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 11,14 ---- Index: abstract.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/abstract.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** abstract.h 2000/06/30 23:50:38 2.19 --- abstract.h 2000/06/30 23:58:04 2.20 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: bitset.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/bitset.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** bitset.h 2000/06/30 23:50:38 2.10 --- bitset.h 2000/06/30 23:58:04 2.11 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: bufferobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/bufferobject.h,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** bufferobject.h 2000/06/30 23:50:38 2.3 --- bufferobject.h 2000/06/30 23:58:04 2.4 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: ceval.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/ceval.h,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -r2.32 -r2.33 *** ceval.h 2000/06/30 23:50:38 2.32 --- ceval.h 2000/06/30 23:58:04 2.33 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: classobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/classobject.h,v retrieving revision 2.29 retrieving revision 2.30 diff -C2 -r2.29 -r2.30 *** classobject.h 2000/06/30 23:50:38 2.29 --- classobject.h 2000/06/30 23:58:04 2.30 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: cobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/cobject.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** cobject.h 2000/06/30 23:50:38 2.6 --- cobject.h 2000/06/30 23:58:04 2.7 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: compile.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/compile.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** compile.h 2000/06/30 23:50:38 2.20 --- compile.h 2000/06/30 23:58:04 2.21 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: dictobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/dictobject.h,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** dictobject.h 2000/06/30 23:50:38 2.17 --- dictobject.h 2000/06/30 23:58:04 2.18 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: errcode.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/errcode.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** errcode.h 2000/06/30 23:50:38 2.10 --- errcode.h 2000/06/30 23:58:04 2.11 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: eval.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/eval.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** eval.h 2000/06/30 23:50:38 2.11 --- eval.h 2000/06/30 23:58:04 2.12 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: fileobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/fileobject.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** fileobject.h 2000/06/30 23:50:38 2.18 --- fileobject.h 2000/06/30 23:58:04 2.19 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: floatobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/floatobject.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** floatobject.h 2000/06/30 23:50:38 2.14 --- floatobject.h 2000/06/30 23:58:04 2.15 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: frameobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/frameobject.h,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** frameobject.h 2000/06/30 23:50:38 2.25 --- frameobject.h 2000/06/30 23:58:04 2.26 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: funcobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/funcobject.h,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** funcobject.h 2000/06/30 23:50:38 2.17 --- funcobject.h 2000/06/30 23:58:04 2.18 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: grammar.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/grammar.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** grammar.h 2000/06/30 23:50:38 2.11 --- grammar.h 2000/06/30 23:58:04 2.12 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: import.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/import.h,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** import.h 2000/06/30 23:50:38 2.23 --- import.h 2000/06/30 23:58:04 2.24 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: intobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/intobject.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** intobject.h 2000/06/30 23:50:38 2.18 --- intobject.h 2000/06/30 23:58:04 2.19 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: intrcheck.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/intrcheck.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** intrcheck.h 2000/06/30 23:50:38 2.6 --- intrcheck.h 2000/06/30 23:58:04 2.7 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: listobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/listobject.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** listobject.h 2000/06/30 23:50:38 2.18 --- listobject.h 2000/06/30 23:58:04 2.19 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: longintrepr.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/longintrepr.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** longintrepr.h 2000/06/30 23:50:38 2.6 --- longintrepr.h 2000/06/30 23:58:04 2.7 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: longobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/longobject.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** longobject.h 2000/06/30 23:50:38 2.14 --- longobject.h 2000/06/30 23:58:04 2.15 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: marshal.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/marshal.h,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** marshal.h 2000/06/30 23:50:38 2.7 --- marshal.h 2000/06/30 23:58:04 2.8 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: metagrammar.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/metagrammar.h,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** metagrammar.h 2000/06/30 23:50:38 2.8 --- metagrammar.h 2000/06/30 23:58:04 2.9 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: methodobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/methodobject.h,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** methodobject.h 2000/06/30 23:50:38 2.17 --- methodobject.h 2000/06/30 23:58:04 2.18 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: modsupport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/modsupport.h,v retrieving revision 2.29 retrieving revision 2.30 diff -C2 -r2.29 -r2.30 *** modsupport.h 2000/06/30 23:50:38 2.29 --- modsupport.h 2000/06/30 23:58:04 2.30 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: moduleobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/moduleobject.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** moduleobject.h 2000/06/30 23:50:38 2.14 --- moduleobject.h 2000/06/30 23:58:04 2.15 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: mymalloc.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mymalloc.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** mymalloc.h 2000/06/30 23:50:38 2.20 --- mymalloc.h 2000/06/30 23:58:04 2.21 *************** *** 2,10 **** #define Py_MYMALLOC_H /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 2,5 ---- *************** *** 14,18 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 9,12 ---- Index: myproto.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/myproto.h,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** myproto.h 2000/06/30 23:50:38 2.7 --- myproto.h 2000/06/30 23:58:04 2.8 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: myselect.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/myselect.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** myselect.h 2000/06/30 23:50:38 2.11 --- myselect.h 2000/06/30 23:58:04 2.12 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: mytime.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mytime.h,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** mytime.h 2000/06/30 23:50:38 2.5 --- mytime.h 2000/06/30 23:58:04 2.6 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: node.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/node.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** node.h 2000/06/30 23:50:38 2.14 --- node.h 2000/06/30 23:58:04 2.15 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: object.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/object.h,v retrieving revision 2.58 retrieving revision 2.59 diff -C2 -r2.58 -r2.59 *** object.h 2000/06/30 23:50:38 2.58 --- object.h 2000/06/30 23:58:04 2.59 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: objimpl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/objimpl.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** objimpl.h 2000/06/30 23:50:38 2.18 --- objimpl.h 2000/06/30 23:58:04 2.19 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: opcode.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/opcode.h,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -r2.24 -r2.25 *** opcode.h 2000/06/30 23:50:38 2.24 --- opcode.h 2000/06/30 23:58:04 2.25 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: osdefs.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/osdefs.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** osdefs.h 2000/06/30 23:50:38 2.11 --- osdefs.h 2000/06/30 23:58:04 2.12 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: parsetok.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/parsetok.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** parsetok.h 2000/06/30 23:50:38 2.11 --- parsetok.h 2000/06/30 23:58:04 2.12 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: patchlevel.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/patchlevel.h,v retrieving revision 2.37 retrieving revision 2.38 diff -C2 -r2.37 -r2.38 *** patchlevel.h 2000/06/30 23:50:38 2.37 --- patchlevel.h 2000/06/30 23:58:04 2.38 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: pgenheaders.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pgenheaders.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** pgenheaders.h 2000/06/30 23:50:38 2.19 --- pgenheaders.h 2000/06/30 23:58:04 2.20 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: pydebug.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pydebug.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** pydebug.h 2000/06/30 23:50:38 2.12 --- pydebug.h 2000/06/30 23:58:04 2.13 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: pyerrors.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyerrors.h,v retrieving revision 2.36 retrieving revision 2.37 diff -C2 -r2.36 -r2.37 *** pyerrors.h 2000/06/30 23:50:38 2.36 --- pyerrors.h 2000/06/30 23:58:04 2.37 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: pystate.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pystate.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** pystate.h 2000/06/30 23:50:38 2.10 --- pystate.h 2000/06/30 23:58:04 2.11 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: pythonrun.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pythonrun.h,v retrieving revision 2.29 retrieving revision 2.30 diff -C2 -r2.29 -r2.30 *** pythonrun.h 2000/06/30 23:50:38 2.29 --- pythonrun.h 2000/06/30 23:58:04 2.30 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: pythread.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pythread.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** pythread.h 2000/06/30 23:50:38 2.14 --- pythread.h 2000/06/30 23:58:04 2.15 *************** *** 3,11 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 3,6 ---- *************** *** 15,19 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 10,13 ---- Index: rangeobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/rangeobject.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** rangeobject.h 2000/06/30 23:50:38 2.12 --- rangeobject.h 2000/06/30 23:58:04 2.13 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: stringobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/stringobject.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** stringobject.h 2000/06/30 23:50:38 2.18 --- stringobject.h 2000/06/30 23:58:04 2.19 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: structmember.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/structmember.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** structmember.h 2000/06/30 23:50:38 2.13 --- structmember.h 2000/06/30 23:58:04 2.14 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: sysmodule.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/sysmodule.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** sysmodule.h 2000/06/30 23:50:38 2.18 --- sysmodule.h 2000/06/30 23:58:04 2.19 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: token.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/token.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** token.h 2000/06/30 23:50:38 2.13 --- token.h 2000/06/30 23:58:04 2.14 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: traceback.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/traceback.h,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** traceback.h 2000/06/30 23:50:38 2.15 --- traceback.h 2000/06/30 23:58:04 2.16 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: tupleobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/tupleobject.h,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** tupleobject.h 2000/06/30 23:50:38 2.21 --- tupleobject.h 2000/06/30 23:58:04 2.22 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- From python-dev@python.org Sat Jul 1 00:58:11 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:58:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python atof.c,2.4,2.5 bltinmodule.c,2.164,2.165 ceval.c,2.181,2.182 compile.c,2.111,2.112 dynload_aix.c,2.4,2.5 dynload_beos.c,2.3,2.4 dynload_dl.c,2.3,2.4 dynload_hpux.c,2.3,2.4 dynload_mac.c,2.5,2.6 dynload_next.c,2.4,2.5 dynload_os2.c,2.3,2.4 dynload_shlib.c,2.3,2.4 dynload_stub.c,2.2,2.3 dynload_win.c,2.4,2.5 errors.c,2.46,2.47 fmod.c,2.10,2.11 frozen.c,1.7,1.8 frozenmain.c,2.21,2.22 getargs.c,2.35,2.36 getcompiler.c,1.6,1.7 getcwd.c,1.11,1.12 getmtime.c,2.11,2.12 getplatform.c,1.5,1.6 getversion.c,1.11,1.12 import.c,2.137,2.138 importdl.c,2.65,2.66 importdl.h,2.13,2.14 marshal.c,1.50,1.51 memmove.c,2.5,2.6 modsupport.c,2.44,2.45 mystrtoul.c,2.18,2.19 pystate.c,2.10,2.11 pythonrun.c,2.99,2.100 sigcheck.c,2.5,2.6 strerror.c,2.7,2.8 structmember.c,2.15,2.16 sysmodule.c,2.67,2.68 thread.c,2.30,2.31 thread_beos.h,2.4,2.5 thread_cthread.h,2.10,2.11 thread_foobar.h,2.8,2.9 thread_lwp.h,2.9,2.10 thread_nt.h,2.13,2.14 thread_pth.h,2.3,2.4 thread_pth! read.h,2.26,2.27 thread_sgi.h,2.11,2.12 thread_solaris.h,2.12,2.13 thread_wince.h,2.3,2.4 traceback.c,2.29,2.30 Message-ID: <200006302358.QAA08603@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv8335/Python Modified Files: atof.c bltinmodule.c ceval.c compile.c dynload_aix.c dynload_beos.c dynload_dl.c dynload_hpux.c dynload_mac.c dynload_next.c dynload_os2.c dynload_shlib.c dynload_stub.c dynload_win.c errors.c fmod.c frozen.c frozenmain.c getargs.c getcompiler.c getcwd.c getmtime.c getplatform.c getversion.c import.c importdl.c importdl.h marshal.c memmove.c modsupport.c mystrtoul.c pystate.c pythonrun.c sigcheck.c strerror.c structmember.c sysmodule.c thread.c thread_beos.h thread_cthread.h thread_foobar.h thread_lwp.h thread_nt.h thread_pth.h thread_pthread.h thread_sgi.h thread_solaris.h thread_wince.h traceback.c Log Message: Change copyright notice - 2nd try. Index: atof.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/atof.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** atof.c 2000/06/30 23:50:39 2.4 --- atof.c 2000/06/30 23:58:05 2.5 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.164 retrieving revision 2.165 diff -C2 -r2.164 -r2.165 *** bltinmodule.c 2000/06/30 23:50:39 2.164 --- bltinmodule.c 2000/06/30 23:58:05 2.165 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.181 retrieving revision 2.182 diff -C2 -r2.181 -r2.182 *** ceval.c 2000/06/30 23:50:39 2.181 --- ceval.c 2000/06/30 23:58:05 2.182 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.111 retrieving revision 2.112 diff -C2 -r2.111 -r2.112 *** compile.c 2000/06/30 23:50:39 2.111 --- compile.c 2000/06/30 23:58:06 2.112 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dynload_aix.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_aix.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** dynload_aix.c 2000/06/30 23:50:39 2.4 --- dynload_aix.c 2000/06/30 23:58:06 2.5 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dynload_beos.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_beos.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** dynload_beos.c 2000/06/30 23:50:39 2.3 --- dynload_beos.c 2000/06/30 23:58:06 2.4 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dynload_dl.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_dl.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** dynload_dl.c 2000/06/30 23:50:39 2.3 --- dynload_dl.c 2000/06/30 23:58:06 2.4 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dynload_hpux.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_hpux.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** dynload_hpux.c 2000/06/30 23:50:39 2.3 --- dynload_hpux.c 2000/06/30 23:58:06 2.4 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dynload_mac.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_mac.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** dynload_mac.c 2000/06/30 23:50:39 2.5 --- dynload_mac.c 2000/06/30 23:58:06 2.6 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dynload_next.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_next.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** dynload_next.c 2000/06/30 23:50:39 2.4 --- dynload_next.c 2000/06/30 23:58:06 2.5 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dynload_os2.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_os2.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** dynload_os2.c 2000/06/30 23:50:39 2.3 --- dynload_os2.c 2000/06/30 23:58:06 2.4 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dynload_shlib.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_shlib.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** dynload_shlib.c 2000/06/30 23:50:39 2.3 --- dynload_shlib.c 2000/06/30 23:58:06 2.4 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dynload_stub.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_stub.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** dynload_stub.c 2000/06/30 23:50:39 2.2 --- dynload_stub.c 2000/06/30 23:58:06 2.3 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dynload_win.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_win.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** dynload_win.c 2000/06/30 23:50:39 2.4 --- dynload_win.c 2000/06/30 23:58:06 2.5 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: errors.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/errors.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** errors.c 2000/06/30 23:50:39 2.46 --- errors.c 2000/06/30 23:58:06 2.47 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: fmod.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/fmod.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** fmod.c 2000/06/30 23:50:39 2.10 --- fmod.c 2000/06/30 23:58:06 2.11 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: frozen.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/frozen.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** frozen.c 2000/06/30 23:50:39 1.7 --- frozen.c 2000/06/30 23:58:06 1.8 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: frozenmain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/frozenmain.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** frozenmain.c 2000/06/30 23:50:39 2.21 --- frozenmain.c 2000/06/30 23:58:06 2.22 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: getargs.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** getargs.c 2000/06/30 23:50:39 2.35 --- getargs.c 2000/06/30 23:58:06 2.36 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: getcompiler.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getcompiler.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** getcompiler.c 2000/06/30 23:50:40 1.6 --- getcompiler.c 2000/06/30 23:58:06 1.7 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: getcwd.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getcwd.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** getcwd.c 2000/06/30 23:50:40 1.11 --- getcwd.c 2000/06/30 23:58:06 1.12 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: getmtime.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getmtime.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** getmtime.c 2000/06/30 23:50:40 2.11 --- getmtime.c 2000/06/30 23:58:06 2.12 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: getplatform.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getplatform.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** getplatform.c 2000/06/30 23:50:40 1.5 --- getplatform.c 2000/06/30 23:58:06 1.6 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: getversion.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getversion.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** getversion.c 2000/06/30 23:50:40 1.11 --- getversion.c 2000/06/30 23:58:06 1.12 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.137 retrieving revision 2.138 diff -C2 -r2.137 -r2.138 *** import.c 2000/06/30 23:50:40 2.137 --- import.c 2000/06/30 23:58:06 2.138 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: importdl.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/importdl.c,v retrieving revision 2.65 retrieving revision 2.66 diff -C2 -r2.65 -r2.66 *** importdl.c 2000/06/30 23:50:40 2.65 --- importdl.c 2000/06/30 23:58:06 2.66 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: importdl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/importdl.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** importdl.h 2000/06/30 23:50:40 2.13 --- importdl.h 2000/06/30 23:58:06 2.14 *************** *** 7,15 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 7,10 ---- *************** *** 19,23 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 14,17 ---- Index: marshal.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/marshal.c,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -r1.50 -r1.51 *** marshal.c 2000/06/30 23:50:40 1.50 --- marshal.c 2000/06/30 23:58:06 1.51 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: memmove.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/memmove.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** memmove.c 2000/06/30 23:50:40 2.5 --- memmove.c 2000/06/30 23:58:06 2.6 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: modsupport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/modsupport.c,v retrieving revision 2.44 retrieving revision 2.45 diff -C2 -r2.44 -r2.45 *** modsupport.c 2000/06/30 23:50:40 2.44 --- modsupport.c 2000/06/30 23:58:06 2.45 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: mystrtoul.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/mystrtoul.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** mystrtoul.c 2000/06/30 23:50:40 2.18 --- mystrtoul.c 2000/06/30 23:58:06 2.19 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: pystate.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pystate.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** pystate.c 2000/06/30 23:50:40 2.10 --- pystate.c 2000/06/30 23:58:06 2.11 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: pythonrun.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v retrieving revision 2.99 retrieving revision 2.100 diff -C2 -r2.99 -r2.100 *** pythonrun.c 2000/06/30 23:50:40 2.99 --- pythonrun.c 2000/06/30 23:58:06 2.100 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: sigcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/sigcheck.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** sigcheck.c 2000/06/30 23:50:40 2.5 --- sigcheck.c 2000/06/30 23:58:06 2.6 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: strerror.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/strerror.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** strerror.c 2000/06/30 23:50:40 2.7 --- strerror.c 2000/06/30 23:58:06 2.8 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: structmember.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/structmember.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** structmember.c 2000/06/30 23:50:40 2.15 --- structmember.c 2000/06/30 23:58:06 2.16 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: sysmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v retrieving revision 2.67 retrieving revision 2.68 diff -C2 -r2.67 -r2.68 *** sysmodule.c 2000/06/30 23:50:40 2.67 --- sysmodule.c 2000/06/30 23:58:06 2.68 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: thread.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread.c,v retrieving revision 2.30 retrieving revision 2.31 diff -C2 -r2.30 -r2.31 *** thread.c 2000/06/30 23:50:40 2.30 --- thread.c 2000/06/30 23:58:06 2.31 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: thread_beos.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_beos.h,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** thread_beos.h 2000/06/30 23:50:40 2.4 --- thread_beos.h 2000/06/30 23:58:06 2.5 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - BeOS thread support by Chris Herborth (chrish@qnx.com) ******************************************************************/ --- 7,10 ---- Index: thread_cthread.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_cthread.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** thread_cthread.h 2000/06/30 23:50:40 2.10 --- thread_cthread.h 2000/06/30 23:58:06 2.11 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: thread_foobar.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_foobar.h,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** thread_foobar.h 2000/06/30 23:50:40 2.8 --- thread_foobar.h 2000/06/30 23:58:06 2.9 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: thread_lwp.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_lwp.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** thread_lwp.h 2000/06/30 23:50:40 2.9 --- thread_lwp.h 2000/06/30 23:58:06 2.10 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: thread_nt.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_nt.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** thread_nt.h 2000/06/30 23:50:40 2.13 --- thread_nt.h 2000/06/30 23:58:06 2.14 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: thread_pth.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_pth.h,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** thread_pth.h 2000/06/30 23:50:40 2.3 --- thread_pth.h 2000/06/30 23:58:06 2.4 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: thread_pthread.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_pthread.h,v retrieving revision 2.26 retrieving revision 2.27 diff -C2 -r2.26 -r2.27 *** thread_pthread.h 2000/06/30 23:50:40 2.26 --- thread_pthread.h 2000/06/30 23:58:06 2.27 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: thread_sgi.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_sgi.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** thread_sgi.h 2000/06/30 23:50:40 2.11 --- thread_sgi.h 2000/06/30 23:58:06 2.12 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: thread_solaris.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_solaris.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** thread_solaris.h 2000/06/30 23:50:40 2.12 --- thread_solaris.h 2000/06/30 23:58:06 2.13 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: thread_wince.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_wince.h,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** thread_wince.h 2000/06/30 23:50:40 2.3 --- thread_wince.h 2000/06/30 23:58:06 2.4 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: traceback.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/traceback.c,v retrieving revision 2.29 retrieving revision 2.30 diff -C2 -r2.29 -r2.30 *** traceback.c 2000/06/30 23:50:40 2.29 --- traceback.c 2000/06/30 23:58:06 2.30 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- From python-dev@python.org Sat Jul 1 00:58:11 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 16:58:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules almodule.c,1.25,1.26 arraymodule.c,2.43,2.44 audioop.c,1.37,1.38 bsddbmodule.c,1.20,1.21 cdmodule.c,1.20,1.21 cgensupport.c,2.12,2.13 cgensupport.h,2.12,2.13 clmodule.c,2.21,2.22 config.c.in,1.68,1.69 cstubs,2.19,2.20 dbmmodule.c,2.18,2.19 dlmodule.c,2.8,2.9 errnomodule.c,2.10,2.11 fcntlmodule.c,2.20,2.21 flmodule.c,1.38,1.39 fmmodule.c,1.12,1.13 gdbmmodule.c,2.23,2.24 getpath.c,1.24,1.25 glmodule.c,2.4,2.5 grpmodule.c,2.10,2.11 imageop.c,2.21,2.22 imgfile.c,1.23,1.24 main.c,1.39,1.40 mathmodule.c,2.46,2.47 md5module.c,2.16,2.17 mpzmodule.c,2.26,2.27 newmodule.c,2.22,2.23 parsermodule.c,2.40,2.41 posixmodule.c,2.140,2.141 pwdmodule.c,1.18,1.19 regexmodule.c,1.35,1.36 resource.c,2.11,2.12 selectmodule.c,2.34,2.35 sgimodule.c,1.12,1.13 signalmodule.c,2.42,2.43 socketmodule.c,1.110,1.111 stropmodule.c,2.64,2.65 structmodule.c,2.32,2.33 sunaudiodev.c,1.18,1.19 svmodule.c,2.12,2.13 threadmodule.c,2.32,2.33 timemodule.c,2.87,2.88 xxmodule.c,2.! 17,2.18 yuv.h,2.6,2.7 yuvconvert.c,2.5,2.6 Message-ID: <200006302358.QAA08590@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8335/Modules Modified Files: almodule.c arraymodule.c audioop.c bsddbmodule.c cdmodule.c cgensupport.c cgensupport.h clmodule.c config.c.in cstubs dbmmodule.c dlmodule.c errnomodule.c fcntlmodule.c flmodule.c fmmodule.c gdbmmodule.c getpath.c glmodule.c grpmodule.c imageop.c imgfile.c main.c mathmodule.c md5module.c mpzmodule.c newmodule.c parsermodule.c posixmodule.c pwdmodule.c regexmodule.c resource.c selectmodule.c sgimodule.c signalmodule.c socketmodule.c stropmodule.c structmodule.c sunaudiodev.c svmodule.c threadmodule.c timemodule.c xxmodule.c yuv.h yuvconvert.c Log Message: Change copyright notice - 2nd try. Index: almodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/almodule.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** almodule.c 2000/06/30 23:50:38 1.25 --- almodule.c 2000/06/30 23:58:05 1.26 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: arraymodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v retrieving revision 2.43 retrieving revision 2.44 diff -C2 -r2.43 -r2.44 *** arraymodule.c 2000/06/30 23:50:38 2.43 --- arraymodule.c 2000/06/30 23:58:05 2.44 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: audioop.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/audioop.c,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -r1.37 -r1.38 *** audioop.c 2000/06/30 23:50:38 1.37 --- audioop.c 2000/06/30 23:58:05 1.38 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: bsddbmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/bsddbmodule.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** bsddbmodule.c 2000/06/30 23:50:38 1.20 --- bsddbmodule.c 2000/06/30 23:58:05 1.21 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: cdmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cdmodule.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** cdmodule.c 2000/06/30 23:50:38 1.20 --- cdmodule.c 2000/06/30 23:58:05 1.21 *************** *** 1,8 **** /********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: cgensupport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cgensupport.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** cgensupport.c 2000/06/30 23:50:38 2.12 --- cgensupport.c 2000/06/30 23:58:05 2.13 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: cgensupport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cgensupport.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** cgensupport.h 2000/06/30 23:50:38 2.12 --- cgensupport.h 2000/06/30 23:58:05 2.13 *************** *** 6,14 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 6,9 ---- *************** *** 18,22 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 13,16 ---- Index: clmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/clmodule.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** clmodule.c 2000/06/30 23:50:38 2.21 --- clmodule.c 2000/06/30 23:58:05 2.22 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: config.c.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/config.c.in,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -r1.68 -r1.69 *** config.c.in 2000/06/30 23:50:38 1.68 --- config.c.in 2000/06/30 23:58:05 1.69 *************** *** 1,8 **** /* -*- C -*- *********************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: cstubs =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cstubs,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** cstubs 2000/06/30 23:50:38 2.19 --- cstubs 2000/06/30 23:58:05 2.20 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dbmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/dbmmodule.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** dbmmodule.c 2000/06/30 23:50:38 2.18 --- dbmmodule.c 2000/06/30 23:58:05 2.19 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: dlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/dlmodule.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** dlmodule.c 2000/06/30 23:50:38 2.8 --- dlmodule.c 2000/06/30 23:58:05 2.9 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: errnomodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/errnomodule.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** errnomodule.c 2000/06/30 23:50:38 2.10 --- errnomodule.c 2000/06/30 23:58:05 2.11 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: fcntlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fcntlmodule.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** fcntlmodule.c 2000/06/30 23:50:38 2.20 --- fcntlmodule.c 2000/06/30 23:58:05 2.21 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: flmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/flmodule.c,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** flmodule.c 2000/06/30 23:50:38 1.38 --- flmodule.c 2000/06/30 23:58:05 1.39 *************** *** 1,8 **** /********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: fmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fmmodule.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** fmmodule.c 2000/06/30 23:50:38 1.12 --- fmmodule.c 2000/06/30 23:58:05 1.13 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: gdbmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gdbmmodule.c,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** gdbmmodule.c 2000/06/30 23:50:38 2.23 --- gdbmmodule.c 2000/06/30 23:58:05 2.24 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: getpath.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/getpath.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** getpath.c 2000/06/30 23:50:38 1.24 --- getpath.c 2000/06/30 23:58:05 1.25 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: glmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/glmodule.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** glmodule.c 2000/06/30 23:50:38 2.4 --- glmodule.c 2000/06/30 23:58:05 2.5 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: grpmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/grpmodule.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** grpmodule.c 2000/06/30 23:50:38 2.10 --- grpmodule.c 2000/06/30 23:58:05 2.11 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: imageop.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/imageop.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** imageop.c 2000/06/30 23:50:38 2.21 --- imageop.c 2000/06/30 23:58:05 2.22 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: imgfile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/imgfile.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** imgfile.c 2000/06/30 23:50:38 1.23 --- imgfile.c 2000/06/30 23:58:05 1.24 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: main.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/main.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** main.c 2000/06/30 23:50:38 1.39 --- main.c 2000/06/30 23:58:05 1.40 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: mathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** mathmodule.c 2000/06/30 23:50:38 2.46 --- mathmodule.c 2000/06/30 23:58:05 2.47 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: md5module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/md5module.c,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** md5module.c 2000/06/30 23:50:38 2.16 --- md5module.c 2000/06/30 23:58:05 2.17 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: mpzmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mpzmodule.c,v retrieving revision 2.26 retrieving revision 2.27 diff -C2 -r2.26 -r2.27 *** mpzmodule.c 2000/06/30 23:50:38 2.26 --- mpzmodule.c 2000/06/30 23:58:05 2.27 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: newmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/newmodule.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** newmodule.c 2000/06/30 23:50:38 2.22 --- newmodule.c 2000/06/30 23:58:05 2.23 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: parsermodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v retrieving revision 2.40 retrieving revision 2.41 diff -C2 -r2.40 -r2.41 *** parsermodule.c 2000/06/30 23:50:38 2.40 --- parsermodule.c 2000/06/30 23:58:05 2.41 *************** *** 77,85 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 77,80 ---- *************** *** 89,93 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 84,87 ---- Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.140 retrieving revision 2.141 diff -C2 -r2.140 -r2.141 *** posixmodule.c 2000/06/30 23:50:38 2.140 --- posixmodule.c 2000/06/30 23:58:05 2.141 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: pwdmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pwdmodule.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** pwdmodule.c 2000/06/30 23:50:38 1.18 --- pwdmodule.c 2000/06/30 23:58:05 1.19 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: regexmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/regexmodule.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** regexmodule.c 2000/06/30 23:50:38 1.35 --- regexmodule.c 2000/06/30 23:58:05 1.36 *************** *** 5,13 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 5,8 ---- *************** *** 17,21 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 12,15 ---- Index: resource.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/resource.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** resource.c 2000/06/30 23:50:38 2.11 --- resource.c 2000/06/30 23:58:05 2.12 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: selectmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v retrieving revision 2.34 retrieving revision 2.35 diff -C2 -r2.34 -r2.35 *** selectmodule.c 2000/06/30 23:50:38 2.34 --- selectmodule.c 2000/06/30 23:58:05 2.35 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: sgimodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sgimodule.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** sgimodule.c 2000/06/30 23:50:38 1.12 --- sgimodule.c 2000/06/30 23:58:05 1.13 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.42 retrieving revision 2.43 diff -C2 -r2.42 -r2.43 *** signalmodule.c 2000/06/30 23:50:38 2.42 --- signalmodule.c 2000/06/30 23:58:05 2.43 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -r1.110 -r1.111 *** socketmodule.c 2000/06/30 23:50:38 1.110 --- socketmodule.c 2000/06/30 23:58:05 1.111 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: stropmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/stropmodule.c,v retrieving revision 2.64 retrieving revision 2.65 diff -C2 -r2.64 -r2.65 *** stropmodule.c 2000/06/30 23:50:38 2.64 --- stropmodule.c 2000/06/30 23:58:05 2.65 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: structmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/structmodule.c,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -r2.32 -r2.33 *** structmodule.c 2000/06/30 23:50:38 2.32 --- structmodule.c 2000/06/30 23:58:05 2.33 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: sunaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sunaudiodev.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** sunaudiodev.c 2000/06/30 23:50:39 1.18 --- sunaudiodev.c 2000/06/30 23:58:05 1.19 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: svmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/svmodule.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** svmodule.c 2000/06/30 23:50:39 2.12 --- svmodule.c 2000/06/30 23:58:05 2.13 *************** *** 1,8 **** /********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: threadmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/threadmodule.c,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -r2.32 -r2.33 *** threadmodule.c 2000/06/30 23:50:39 2.32 --- threadmodule.c 2000/06/30 23:58:05 2.33 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.87 retrieving revision 2.88 diff -C2 -r2.87 -r2.88 *** timemodule.c 2000/06/30 23:50:39 2.87 --- timemodule.c 2000/06/30 23:58:05 2.88 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: xxmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/xxmodule.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** xxmodule.c 2000/06/30 23:50:39 2.17 --- xxmodule.c 2000/06/30 23:58:05 2.18 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: yuv.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/yuv.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** yuv.h 2000/06/30 23:50:39 2.6 --- yuv.h 2000/06/30 23:58:05 2.7 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- Index: yuvconvert.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/yuvconvert.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** yuvconvert.c 2000/06/30 23:50:39 2.5 --- yuvconvert.c 2000/06/30 23:58:05 2.6 *************** *** 1,8 **** /*********************************************************** - Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, - The Netherlands. - - All Rights Reserved - Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. --- 1,3 ---- *************** *** 12,16 **** See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - ******************************************************************/ --- 7,10 ---- From python-dev@python.org Sat Jul 1 01:03:45 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 30 Jun 2000 17:03:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild readme.txt,1.6,1.7 Message-ID: <200007010003.RAA15118@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv15105/python/dist/src/pcbuild Modified Files: readme.txt Log Message: Update for 2.0b1. Also add more text, to be more explicit about what the dozen+ subprojects are for, which are and aren't expected to build out of the box, and what else is needed to get them all to build. Also explained that Alpha configurations don't refer to pre-beta, but to the Alpha processor! That's baffled me for years <0.7 wink>. Index: readme.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/readme.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** readme.txt 2000/06/30 09:04:35 1.6 --- readme.txt 2000/07/01 00:03:43 1.7 *************** *** 1,40 **** ! Building Python using VC++ 5.0 or 6.0 ------------------------------------- ! ! This directory is used to build Python for Win32 platforms, ! e.g. Windows 95, 98 and NT. It requires Microsoft Visual C++ 6.x ! or 5.x. (For other Windows platforms and compilers, see ../PC/readme.txt.) ! Unlike previous versions, there's no longer a need to copy the project ! files from the PC/vc5x subdirectory to the PCbuild directory -- they ! come in PCbuild. ! ! All you need to do is open the workspace "pcbuild.dsw" in MSVC++, ! select the Debug or Release setting (using Set Active ! Configuration... in the Build menu), and build the projects. ! ! The proper order to build is ! ! 1) python16 (this builds python16.dll and python16.lib) ! 2) python (this builds python.exe) ! 3) the other subprojects ! ! Some subprojects require that you have distributions of other ! software: Tcl/Tk, bsddb and zlib. If you don't have these, you can't ! build the corresponding extensions. If you do have them, you may have ! to change the project settings to point to the right include files, ! libraries etc. When using the Debug setting, the output files have a _d added to ! their name: python16_d.dll, python_d.exe, parser_d.pyd, and so on. ! If you want to create your own extension module DLL, there's an ! example with easy-to-follow instructions in ../PC/example/; read the ! file readme.txt there first. ! ! Pointers: ! Python http://www.python.org ! Tcl/Tk http://dev.scriptics.com ! zlib http://www.winimage.com/zLibDll ! bsddb Sam Rushing's web/ftp site --- 1,98 ---- ! Building Python using VC++ 6.0 or 5.0 ------------------------------------- ! This directory is used to build Python for Win32 platforms, e.g. Windows ! 95, 98 and NT. It requires Microsoft Visual C++ 6.x or 5.x. (For other Windows platforms and compilers, see ../PC/readme.txt.) + XXX There are still (Python 2.0b1) a few compiler warnings under VC6. + XXX There are likely a few more under VC5. + + Unlike older versions, there's no longer a need to copy the project files + from a subdirectory of PC/ to the PCbuild directory -- they come in PCbuild. + + All you need to do is open the workspace "pcbuild.dsw" in MSVC++, select + the Debug or Release setting (using Build -> Set Active Configuration...), + and build the projects. + + The proper order to build subprojects is: + + 1) python20 (this builds the main Python DLL and library files, + python20.{dll, lib}) + + 2) python (this builds the main Python executable, python.exe) ! 3) the other subprojects, as desired or needed (note: you probably don't ! want to build most of the other subprojects, unless you're building an ! entire Python distribution from scratch, or specifically making changes ! to the subsystems they implement; see SUBPROJECTS below) When using the Debug setting, the output files have a _d added to ! their name: python20_d.dll, python_d.exe, parser_d.pyd, and so on. ! SUBPROJECTS ! ----------- ! These subprojects should build out of the box. Subprojects other than the ! main ones (python20, python, pythonw) generally build a DLL (renamed to ! .pyd) from a specific module so that users don't have to load the code ! supporting that module unless they import the module. ! ! python20 ! .dll and .lib ! python ! .exe ! pythonw ! pythonw.exe, a variant of python.exe that doesn't pop up a DOS box ! _socket ! socketmodule.c ! _sre ! Unicode-aware regular expression engine ! mmap ! mmapmodule.c ! parser ! the parser module ! select ! selectmodule.c ! unicodedata ! large tables of Unicode data ! winreg ! Windows registry API ! winsound ! play sounds (typically .wav files) under Windows ! ! The following subprojects will generally NOT build out of the box. They ! wrap code Python doesn't control, and you'll need to download the base ! packages first (study the subproject structure from within MSVC to see ! where each expects to find the unpacked packages): ! ! _tkinter ! Python wrapper for the Tk windowing system. Requires tcl831.exe from ! http://dev.scriptics.com/software/tcltk/downloadnow83.tml ! ! zlib ! Python wrapper for the zlib compression library. Requires ! http://www.winimage.com/zLibDll/zlib133dll.zip ! and ! ftp://ftp.uu.net/graphics/png/src/zlib133.zip ! ! bsddb ! Python wrapper for the BSD database 1.85. Requires bsddbmodule.zip, ! from the bsddb link at ! http://www.nightmare.com/software.html ! ! pyexpat ! Python wrapper for accelerated XML parsing. Requires ! ftp://ftp.jclark.com/pub/xml/expat.zip ! ! ! NOTE ON CONFIGURATIONS ! ---------------------- ! Under Build -> Configuration ..., you'll find several Alpha configurations, ! such as "Win32 Alpha Release". These do not refer to alpha versions (as in ! alpha, beta, final), but to the DEC/COMPAQ Alpha processor. Ignore them if ! you're not building on an Alpha box. ! ! ! YOUR OWN EXTENSION DDLs ! ----------------------- ! If you want to create your own extension module DLL, there's an example ! with easy-to-follow instructions in ../PC/example/; read the file ! readme.txt there first. From python-dev@python.org Sat Jul 1 01:10:06 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 17:10:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/BeOS dl_export.h,1.1,1.2 Message-ID: <200007010010.RAA15464@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/BeOS In directory slayer.i.sourceforge.net:/tmp/cvs-serv15449 Modified Files: dl_export.h Log Message: Change copyright notice. Index: dl_export.h =================================================================== RCS file: /cvsroot/python/python/dist/src/BeOS/dl_export.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** dl_export.h 1999/01/12 20:30:23 1.1 --- dl_export.h 2000/07/01 00:10:03 1.2 *************** *** 10,35 **** * Python: * ! * 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 ! * supporting documentation, and that the names of Stichting Mathematisch ! * Centrum or CWI or Corporation for National Research Initiatives or ! * CNRI not be used in advertising or publicity pertaining to ! * distribution of the software without specific, written prior ! * permission. ! * ! * While CWI is the initial source for this software, a modified version ! * is made available by the Corporation for National Research Initiatives ! * (CNRI) at the Internet address ftp://ftp.python.org. ! * ! * STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! * CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! * PERFORMANCE OF THIS SOFTWARE. * * - Chris Herborth (chrish@beoscentral.com) --- 10,20 ---- * Python: * ! * Copyright (c) 2000, BeOpen.com. ! * Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! * Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! * All rights reserved. ! * ! * See the file "Misc/COPYRIGHT" for information on usage and ! * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. * * - Chris Herborth (chrish@beoscentral.com) From python-dev@python.org Sat Jul 1 01:13:13 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 17:13:13 -0700 Subject: [Python-checkins] CVS: python/dist/src Makefile.in,1.89,1.90 Message-ID: <200007010013.RAA15705@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv15698 Modified Files: Makefile.in Log Message: Change copyright notice. Index: Makefile.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Makefile.in,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -r1.89 -r1.90 *** Makefile.in 2000/06/30 16:03:26 1.89 --- Makefile.in 2000/07/01 00:13:10 1.90 *************** *** 1,30 **** ######################################################################## ! # 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, ! # provided that the above copyright notice appear in all copies and that ! # both that copyright notice and this permission notice appear in ! # supporting documentation, and that the names of Stichting Mathematisch ! # Centrum or CWI or Corporation for National Research Initiatives or ! # CNRI not be used in advertising or publicity pertaining to ! # distribution of the software without specific, written prior ! # permission. # ! # While CWI is the initial source for this software, a modified version ! # is made available by the Corporation for National Research Initiatives ! # (CNRI) at the Internet address ftp://ftp.python.org. ! # ! # STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! # REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! # MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! # CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! # DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! # PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! # PERFORMANCE OF THIS SOFTWARE. ######################################################################## --- 1,10 ---- ######################################################################## ! # Copyright (c) 2000, BeOpen.com. ! # Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! # Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! # All rights reserved. # ! # See the file "Misc/COPYRIGHT" for information on usage and ! # redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ######################################################################## From python-dev@python.org Sat Jul 1 01:16:15 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 17:16:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules cgen.py,2.14,2.15 Message-ID: <200007010016.RAA15827@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv15820 Modified Files: cgen.py Log Message: Change copyright notice. Index: cgen.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cgen.py,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** cgen.py 1997/04/29 21:34:06 2.14 --- cgen.py 2000/07/01 00:16:13 2.15 *************** *** 1,30 **** ######################################################################## ! # 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, ! # provided that the above copyright notice appear in all copies and that ! # both that copyright notice and this permission notice appear in ! # supporting documentation, and that the names of Stichting Mathematisch ! # Centrum or CWI or Corporation for National Research Initiatives or ! # CNRI not be used in advertising or publicity pertaining to ! # distribution of the software without specific, written prior ! # permission. # ! # While CWI is the initial source for this software, a modified version ! # is made available by the Corporation for National Research Initiatives ! # (CNRI) at the Internet address ftp://ftp.python.org. ! # ! # STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! # REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! # MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! # CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! # DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! # PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! # PERFORMANCE OF THIS SOFTWARE. ######################################################################## --- 1,10 ---- ######################################################################## ! # Copyright (c) 2000, BeOpen.com. ! # Copyright (c) 1995-2000, Corporation for National Research Initiatives. ! # Copyright (c) 1990-1995, Stichting Mathematisch Centrum. ! # All rights reserved. # ! # See the file "Misc/COPYRIGHT" for information on usage and ! # redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ######################################################################## From python-dev@python.org Sat Jul 1 01:34:41 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 17:34:41 -0700 Subject: [Python-checkins] CVS: python/dist/src README,1.87,1.88 Message-ID: <200007010034.RAA16716@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv16709 Modified Files: README Log Message: Update a bunch of URLs. No longer suggests to join PSA or Consortium. Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -r1.87 -r1.88 *** README 2000/06/30 17:30:18 1.87 --- README 2000/07/01 00:34:39 1.88 *************** *** 48,69 **** Python is an interpreted object-oriented programming language, and is often compared to Tcl, Perl, Java or Scheme. To find out more, point ! your browser to http://www.python.org/. - A modest plug - ------------- - - ************************************************************************ - * Without your support, I won't be able to continue to work on Python! * - ************************************************************************ - - If you use Python, please consider joining the Python Software - Activity (PSA). See http://www.python.org/psa/. - - Organizations that make heavy use of Python are especially encouraged - to become corporate members -- or better still, to join the Python - Consortium (see http://www.python.org/consortium/). - - How do I learn Python? ---------------------- --- 48,54 ---- Python is an interpreted object-oriented programming language, and is often compared to Tcl, Perl, Java or Scheme. To find out more, point ! your browser to http://www.pythonlabs.com/. How do I learn Python? ---------------------- *************** *** 660,664 **** Of course, there are also binary distributions available for these ! platforms -- see http://www.python.org/python/. To port Python to a new non-UNIX system, you will have to fake the --- 645,649 ---- Of course, there are also binary distributions available for these ! platforms -- see http://www.pythonlabs.com/downloads.html To port Python to a new non-UNIX system, you will have to fake the *************** *** 688,692 **** All documentation is also available online via the Python web site ! (http://www.python.org/, see below). It is available online for occaissional reference, or can be downloaded in many formats for faster access. The documents are available in HTML, PostScript, PDF, --- 673,677 ---- All documentation is also available online via the Python web site ! (http://www.python.org/doc/, see below). It is available online for occaissional reference, or can be downloaded in many formats for faster access. The documents are available in HTML, PostScript, PDF, *************** *** 701,710 **** Misc/python-mode.el. Originally written by the famous Tim Peters, it is now maintained by the equally famous Barry Warsaw ! . The latest version, along with various ! other contributed Python-related Emacs goodies, is online at . And if you are planning to edit the Python C code, please pick up the latest version of CC Mode ; it contains a "python" style ! used throughout most of the Python C source files. --- 686,697 ---- Misc/python-mode.el. Originally written by the famous Tim Peters, it is now maintained by the equally famous Barry Warsaw ! . The latest version, along with various other ! contributed Python-related Emacs goodies, is online at . And if you are planning to edit the Python C code, please pick up the latest version of CC Mode ; it contains a "python" style ! used throughout most of the Python C source files. (Newer versions of ! Emacs or XEmacs may already come with the latest version of ! python-mode.) *************** *** 712,728 **** -------- ! Python's own web site has URL http://www.python.org/. Come visit us! ! There are a number of mirrors, and a list of mirrors is accessible ! from the home page -- try a mirror that's close you you. - Ftp site - -------- - - Python's own ftp site is ftp://ftp.python.org/pub/python/. There are - numerous mirrors; the list of mirrors is accessible from - http://www.python.org/. - - Newsgroups ---------- --- 699,706 ---- -------- ! Python's own web site has URL http://www.pythonlabs.com/. Come visit ! us! Newsgroups ---------- *************** *** 747,755 **** ----------- ! Bugs are best reported to the comp.lang.python newsgroup (or the ! Python mailing list) -- see the section "Newsgroups" above. Before ! posting, check the newsgroup archives (see above) to see if your bug ! has already been reported! If you don't want to go public, send them ! to me: . --- 725,730 ---- ----------- ! To report or search for bugs, please use the Python Bugs List at ! http://www.python.org/search/search_bugs.html *************** *** 760,764 **** best to post to the comp.lang.python or the Python mailing list (see above). If you specifically don't want to involve the newsgroup or ! mailing list, send questions to (a group of volunteers which does *not* include me). Because of my work and email volume, I'm often be slow in answering questions sent to me directly; --- 735,739 ---- best to post to the comp.lang.python or the Python mailing list (see above). If you specifically don't want to involve the newsgroup or ! mailing list, send questions to (a group of volunteers which does *not* include me). Because of my work and email volume, I'm often be slow in answering questions sent to me directly; *************** *** 772,782 **** also usable from Python. Since this requires that you first build and install Tcl/Tk, the Tk interface is not enabled by default. Python ! supports all Tcl/Tk versions from version 7.5/4.1 through 8.0 (and it ! is expected that it will also work with newer versions). Tcl/Tk ! 7.4/4.0 is no longer supported. 8.0 or any later non-alpha non-beta ! release is recommended. ! See http://sunscript.sun.com/ for more info on Tcl/Tk, including the ! on-line manual pages. --- 747,754 ---- also usable from Python. Since this requires that you first build and install Tcl/Tk, the Tk interface is not enabled by default. Python ! supports Tcl/Tk starting with version 8.0. ! See http://dev.ajubasolutions.com/ for more info on Tcl/Tk, including ! the on-line manual pages. *************** *** 787,802 **** will have to edit the first line to fix or add -I and -L options. (Also see the general instructions at the top of that file.) - - There is little documentation on how to use Tkinter; however most of - the Tk manual pages apply quite straightforwardly. Begin with - fetching the "Tk Lifesaver" document, - e.g. ftp://ftp.python.org/pub/python/doc/tkinter-doc.tar.gz (a gzipped - tar file containing a PostScript file) or the on-line version - http://www.python.org/doc/life-preserver/index.html. Reading the - Tkinter.py source will reveal most details on how Tkinter calls are - translated into Tcl code. ! A more recent introduction to Tkinter programming, by Fredrik Lundh, ! is at http://www.pythonware.com/library/tkinter/introduction/index.htm. There are demos in the Demo/tkinter directory, in the subdirectories --- 759,765 ---- will have to edit the first line to fix or add -I and -L options. (Also see the general instructions at the top of that file.) ! For more Tkinter information, see the Tkinter Resource page: ! http://www.python.org/topics/tkinter/ There are demos in the Demo/tkinter directory, in the subdirectories From python-dev@python.org Sat Jul 1 01:38:22 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 17:38:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules arraymodule.c,2.44,2.45 Message-ID: <200007010038.RAA16914@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv16905 Modified Files: arraymodule.c Log Message: In b_setitem(), instead of the platform dependent CHAR_MIN and CHAR_MAX, use hardcoded -128 and 127. This may seem strange, unless you realize that we're talking about signed bytes here! Bytes are always 8 bits and 2's complement. CHAR_MIN and CHAR_MAX are properties of the char data type, which is guaranteed to hold at least 8 bits anyway. Otherwise you'd get failing tests on platforms where unsigned char is the default (e.g. AIX). Thanks, Vladimir Marangozov, for finding this nit! Index: arraymodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v retrieving revision 2.44 retrieving revision 2.45 diff -C2 -r2.44 -r2.45 *** arraymodule.c 2000/06/30 23:58:05 2.44 --- arraymodule.c 2000/07/01 00:38:19 2.45 *************** *** 100,109 **** if (!PyArg_Parse(v, "h;array item must be integer", &x)) return -1; ! else if (x < CHAR_MIN) { PyErr_SetString(PyExc_OverflowError, "signed char is less than minimum"); return -1; } ! else if (x > CHAR_MAX) { PyErr_SetString(PyExc_OverflowError, "signed char is greater than maximum"); --- 100,109 ---- if (!PyArg_Parse(v, "h;array item must be integer", &x)) return -1; ! else if (x < -128) { PyErr_SetString(PyExc_OverflowError, "signed char is less than minimum"); return -1; } ! else if (x > 127) { PyErr_SetString(PyExc_OverflowError, "signed char is greater than maximum"); From python-dev@python.org Sat Jul 1 01:51:54 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 17:51:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.15,2.16 Message-ID: <200007010051.RAA17476@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv17467 Modified Files: mmapmodule.c Log Message: clean up warnings in Win32 build of mmapmodule.c Index: mmapmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** mmapmodule.c 2000/06/18 19:06:49 2.15 --- mmapmodule.c 2000/07/01 00:51:51 2.16 *************** *** 569,573 **** { CHECK_VALID(NULL); ! if (i < 0 || i >= self->size) { PyErr_SetString(PyExc_IndexError, "mmap index out of range"); return NULL; --- 569,573 ---- { CHECK_VALID(NULL); ! if (i < 0 || (size_t)i >= self->size) { PyErr_SetString(PyExc_IndexError, "mmap index out of range"); return NULL; *************** *** 584,588 **** if (ilow < 0) ilow = 0; ! else if (ilow > self->size) ilow = self->size; if (ihigh < 0) --- 584,588 ---- if (ilow < 0) ilow = 0; ! else if ((size_t)ilow > self->size) ilow = self->size; if (ihigh < 0) *************** *** 590,594 **** if (ihigh < ilow) ihigh = ilow; ! else if (ihigh > self->size) ihigh = self->size; --- 590,594 ---- if (ihigh < ilow) ihigh = ilow; ! else if ((size_t)ihigh > self->size) ihigh = self->size; *************** *** 629,633 **** if (ilow < 0) ilow = 0; ! else if (ilow > self->size) ilow = self->size; if (ihigh < 0) --- 629,633 ---- if (ilow < 0) ilow = 0; ! else if ((size_t)ilow > self->size) ilow = self->size; if (ihigh < 0) *************** *** 635,639 **** if (ihigh < ilow) ihigh = ilow; ! else if (ihigh > self->size) ihigh = self->size; --- 635,639 ---- if (ihigh < ilow) ihigh = ilow; ! else if ((size_t)ihigh > self->size) ihigh = self->size; *************** *** 662,666 **** CHECK_VALID(-1); ! if (i < 0 || i >= self->size) { PyErr_SetString(PyExc_IndexError, "mmap index out of range"); return -1; --- 662,666 ---- CHECK_VALID(-1); ! if (i < 0 || (size_t)i >= self->size) { PyErr_SetString(PyExc_IndexError, "mmap index out of range"); return -1; From python-dev@python.org Sat Jul 1 02:00:38 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 18:00:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include objimpl.h,2.19,2.20 Message-ID: <200007010100.SAA19200@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv19078 Modified Files: objimpl.h Log Message: Neil Schemenauer: small fixes for GC Index: objimpl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/objimpl.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** objimpl.h 2000/06/30 23:58:04 2.19 --- objimpl.h 2000/07/01 01:00:35 2.20 *************** *** 184,187 **** --- 184,189 ---- (typeobj), (n)) ) + #define PyObject_DEL(op) PyObject_FREE(op) + /* This example code implements an object constructor with a custom allocator, where PyObject_New is inlined, and shows the important *************** *** 222,226 **** Py_TPFLAGS_GC and define the type method tp_recurse. You should also add the method tp_clear if your object is mutable. Include ! PyGC_INFO_SIZE in the calculation of tp_basicsize. Call PyObject_GC_Init after the pointers followed by tp_recurse become valid (usually just before returning the object from the allocation --- 224,228 ---- Py_TPFLAGS_GC and define the type method tp_recurse. You should also add the method tp_clear if your object is mutable. Include ! PyGC_HEAD_SIZE in the calculation of tp_basicsize. Call PyObject_GC_Init after the pointers followed by tp_recurse become valid (usually just before returning the object from the allocation *************** *** 235,239 **** #define PyObject_AS_GC(op) (op) #define PyObject_FROM_GC(op) (op) - #define PyObject_DEL(op) PyObject_FREE(op) #else --- 237,240 ---- *************** *** 268,275 **** /* Get the object given the PyGC_Head */ #define PyObject_FROM_GC(g) ((PyObject *)(((PyGC_Head *)g)+1)) - - #define PyObject_DEL(op) PyObject_FREE( PyObject_IS_GC(op) ? \ - (ANY *)PyObject_AS_GC(op) : \ - (ANY *)(op) ) #endif /* WITH_CYCLE_GC */ --- 269,272 ---- From python-dev@python.org Sat Jul 1 02:00:41 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 18:00:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects classobject.c,2.96,2.97 dictobject.c,2.57,2.58 funcobject.c,2.27,2.28 listobject.c,2.78,2.79 object.c,2.78,2.79 tupleobject.c,2.41,2.42 Message-ID: <200007010100.SAA19385@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv19080 Modified Files: classobject.c dictobject.c funcobject.c listobject.c object.c tupleobject.c Log Message: Neil Schemenauer: small fixes for GC Index: classobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/classobject.c,v retrieving revision 2.96 retrieving revision 2.97 diff -C2 -r2.96 -r2.97 *** classobject.c 2000/06/30 23:58:05 2.96 --- classobject.c 2000/07/01 01:00:38 2.97 *************** *** 129,132 **** --- 129,133 ---- Py_XDECREF(op->cl_setattr); Py_XDECREF(op->cl_delattr); + op = (PyClassObject *) PyObject_AS_GC(op); PyObject_DEL(op); } *************** *** 474,477 **** --- 475,479 ---- PyObject_GC_Init(inst); if (inst->in_dict == NULL) { + inst = (PyInstanceObject *) PyObject_AS_GC(inst); PyObject_DEL(inst); return NULL; *************** *** 589,592 **** --- 591,595 ---- Py_DECREF(inst->in_class); Py_XDECREF(inst->in_dict); + inst = (PyInstanceObject *) PyObject_AS_GC(inst); PyObject_DEL(inst); } *************** *** 1764,1767 **** --- 1767,1771 ---- PyMethodObject *im = free_list; free_list = (PyMethodObject *)(im->im_self); + im = (PyMethodObject *) PyObject_AS_GC(im); PyObject_DEL(im); } Index: dictobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/dictobject.c,v retrieving revision 2.57 retrieving revision 2.58 diff -C2 -r2.57 -r2.58 *** dictobject.c 2000/06/30 23:58:05 2.57 --- dictobject.c 2000/07/01 01:00:38 2.58 *************** *** 473,476 **** --- 473,477 ---- if (mp->ma_table != NULL) PyMem_DEL(mp->ma_table); + mp = (dictobject *) PyObject_AS_GC(mp); PyObject_DEL(mp); Py_TRASHCAN_SAFE_END(mp) Index: funcobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/funcobject.c,v retrieving revision 2.27 retrieving revision 2.28 diff -C2 -r2.27 -r2.28 *** funcobject.c 2000/06/30 23:58:05 2.27 --- funcobject.c 2000/07/01 01:00:38 2.28 *************** *** 173,176 **** --- 173,177 ---- Py_XDECREF(op->func_defaults); Py_XDECREF(op->func_doc); + op = (PyFunctionObject *) PyObject_AS_GC(op); PyObject_DEL(op); } Index: listobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v retrieving revision 2.78 retrieving revision 2.79 diff -C2 -r2.78 -r2.79 *** listobject.c 2000/06/30 23:58:05 2.78 --- listobject.c 2000/07/01 01:00:38 2.79 *************** *** 210,213 **** --- 210,214 ---- PyMem_FREE(op->ob_item); } + op = (PyListObject *) PyObject_AS_GC(op); PyObject_DEL(op); Py_TRASHCAN_SAFE_END(op) Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.78 retrieving revision 2.79 diff -C2 -r2.78 -r2.79 *** object.c 2000/06/30 23:58:05 2.78 --- object.c 2000/07/01 01:00:38 2.79 *************** *** 172,183 **** { #ifdef WITH_CYCLE_GC ! if (PyType_IS_GC(op->ob_type)) { ! PyGC_Head *g = PyObject_AS_GC(op); ! PyObject_FREE(g); ! } else ! #endif ! { ! PyObject_FREE(op); } } --- 172,180 ---- { #ifdef WITH_CYCLE_GC ! if (op && PyType_IS_GC(op->ob_type)) { ! op = (PyObject *) PyObject_AS_GC(op); } + #endif + PyObject_FREE(op); } Index: tupleobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/tupleobject.c,v retrieving revision 2.41 retrieving revision 2.42 diff -C2 -r2.41 -r2.42 *** tupleobject.c 2000/06/30 23:58:05 2.41 --- tupleobject.c 2000/07/01 01:00:38 2.42 *************** *** 176,179 **** --- 176,180 ---- #endif } + op = (PyTupleObject *) PyObject_AS_GC(op); PyObject_DEL(op); done: *************** *** 560,563 **** --- 561,565 ---- if (sv == NULL) { PyObject_GC_Init((PyObject *)v); + v = (PyTupleObject *) PyObject_AS_GC(v); PyObject_DEL(v); PyErr_NoMemory(); *************** *** 596,599 **** --- 598,602 ---- q = p; p = (PyTupleObject *)(p->ob_item[0]); + q = (PyTupleObject *) PyObject_AS_GC(q); PyObject_DEL(q); } From python-dev@python.org Sat Jul 1 02:06:58 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 18:06:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python import.c,2.138,2.139 Message-ID: <200007010106.SAA24578@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv24571 Modified Files: import.c Log Message: Jack Jansen, Mac patch: Include stat.h if needed; different Mac filename compare Index: import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.138 retrieving revision 2.139 diff -C2 -r2.138 -r2.139 *** import.c 2000/06/30 23:58:06 2.138 --- import.c 2000/07/01 01:06:56 2.139 *************** *** 40,43 **** --- 40,45 ---- #ifndef DONT_HAVE_SYS_STAT_H #include + #elif defined(HAVE_STAT_H) + #include #endif *************** *** 1130,1135 **** return 0; } ! p2cstr(fss.name); ! if ( strncmp(name, (char *)fss.name, namelen) != 0 ) { PyErr_Format(PyExc_NameError, "Case mismatch for module name %.100s\n(filename %.300s)", --- 1132,1136 ---- return 0; } ! if ( namelen > fss.name[0] || strncmp(name, (char *)fss.name+1, namelen) != 0 ) { PyErr_Format(PyExc_NameError, "Case mismatch for module name %.100s\n(filename %.300s)", From python-dev@python.org Sat Jul 1 02:07:40 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 18:07:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python getargs.c,2.36,2.37 Message-ID: <200007010107.SAA24694@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv24623 Modified Files: getargs.c Log Message: Jack Jansen, Mac patch: Include limits.h if we have it. Index: getargs.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v retrieving revision 2.36 retrieving revision 2.37 diff -C2 -r2.36 -r2.37 *** getargs.c 2000/06/30 23:58:06 2.36 --- getargs.c 2000/07/01 01:07:38 2.37 *************** *** 19,22 **** --- 19,25 ---- #include + #ifdef HAVE_LIMITS_H + #include + #endif From python-dev@python.org Sat Jul 1 02:08:14 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 18:08:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python getmtime.c,2.12,2.13 Message-ID: <200007010108.SAA24720@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv24712 Modified Files: getmtime.c Log Message: Jack Jansen, Mac patch: If we have stat.h include it if we don't have sys/stat.h Index: getmtime.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getmtime.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** getmtime.c 2000/06/30 23:58:06 2.12 --- getmtime.c 2000/07/01 01:08:11 2.13 *************** *** 17,22 **** --- 17,28 ---- #include + #ifndef DONT_HAVE_SYS_TYPES_H #include + #endif + #ifndef DONT_HAVE_SYS_STAT_H #include + #elif defined(HAVE_STAT_H) + #include + #endif time_t From python-dev@python.org Sat Jul 1 02:09:45 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 18:09:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules arraymodule.c,2.45,2.46 Message-ID: <200007010109.SAA24756@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv24747 Modified Files: arraymodule.c Log Message: Jack Jansen, Mac patch: Include limits.h if we have it. Index: arraymodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** arraymodule.c 2000/07/01 00:38:19 2.45 --- arraymodule.c 2000/07/01 01:09:43 2.46 *************** *** 23,26 **** --- 23,29 ---- #endif /* DONT_HAVE_SYS_TYPES_H */ #endif /* !STDC_HEADERS */ + #ifdef HAVE_LIMITS_H + #include + #endif /* HAVE_LIMITS_H */ struct arrayobject; /* Forward */ From python-dev@python.org Sat Jul 1 02:13:33 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 18:13:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_openpty.py,NONE,1.1 Message-ID: <200007010113.SAA24952@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv24946 Added Files: test_openpty.py Log Message: Thomas Wouters: Test script for openpty() --- NEW FILE --- # Test to see if openpty works. (But don't worry if it isn't available.) import os from test_support import verbose, TestFailed try: if verbose: print "Calling os.openpty()" master, slave = os.openpty() if verbose: print "(master, slave) = (%d, %d)"%(master, slave) except AttributeError: raise ImportError, "No openpty() available." ## # Please uncomment these if os.isatty() is added. ## if not os.isatty(master): ## raise TestFailed, "Master-end of pty is not a terminal." ## if not os.isatty(slave): ## raise TestFailed, "Slave-end of pty is not a terminal." os.write(slave, 'Ping!') print os.read(master, 1024) From python-dev@python.org Sat Jul 1 02:41:59 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 30 Jun 2000 18:41:59 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/texinputs copyright.tex,1.6,1.7 Message-ID: <200007010141.SAA26222@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/texinputs In directory slayer.i.sourceforge.net:/tmp/cvs-serv26210/texinputs Modified Files: copyright.tex Log Message: The new copyright / license. Index: copyright.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/copyright.tex,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** copyright.tex 1998/02/11 14:42:06 1.6 --- copyright.tex 2000/07/01 01:41:55 1.7 *************** *** 1,29 **** ! Copyright \copyright{} 1991-1995 by Stichting Mathematisch Centrum, ! Amsterdam, The Netherlands. ! \begin{center} ! All Rights Reserved ! \end{center} ! 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 ! supporting documentation, and that the names of Stichting Mathematisch ! Centrum or CWI or Corporation for National Research Initiatives or ! CNRI not be used in advertising or publicity pertaining to ! distribution of the software without specific, written prior ! permission. ! While CWI is the initial source for this software, a modified version ! is made available by the Corporation for National Research Initiatives ! (CNRI) at the Internet address \url{ftp://ftp.python.org}. ! STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH ! REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH ! CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL ! DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ! PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ! TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ! PERFORMANCE OF THIS SOFTWARE. --- 1,37 ---- ! \leftline{Copyright \copyright{} 2000, BeOpen.com.} ! \leftline{Copyright \copyright{} 1995-2000, Corporation for National Research Initiatives.} ! \leftline{Copyright \copyright{} 1990-1995, Stichting Mathematisch Centrum.} ! \leftline{All rights reserved.} ! Redistribution and use in source and binary forms, with or without ! modification, are permitted provided that the following conditions are ! met: ! \begin{itemize} ! \item ! Redistributions of source code must retain the above copyright ! notice, this list of conditions and the following disclaimer. ! \item ! Redistributions in binary form must reproduce the above copyright ! notice, this list of conditions and the following disclaimer in the ! documentation and/or other materials provided with the distribution. ! \item ! Neither names of the copyright holders nor the names of their ! contributors may be used to endorse or promote products derived from ! this software without specific prior written permission. ! \end{itemize} ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ! A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ! HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS ! OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ! ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE ! USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH ! DAMAGE. From python-dev@python.org Sat Jul 1 03:37:40 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 30 Jun 2000 19:37:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile,1.196,1.197 Message-ID: <200007010237.TAA02661@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv2654 Modified Files: Makefile Log Message: Do not build the "longhtml" version for pre-release versions. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.196 retrieving revision 1.197 diff -C2 -r1.196 -r1.197 *** Makefile 2000/06/30 16:06:19 1.196 --- Makefile 2000/07/01 02:37:37 1.197 *************** *** 311,315 **** ziplatex: latex-$(RELEASE).zip ! zips: zippdf zipps ziphtml ziplonghtml bziphtml: html-$(RELEASE).tar.bz2 --- 311,319 ---- ziplatex: latex-$(RELEASE).zip ! # Only build the longhtml version for final releases; use the second ! # version of this for pre-release versions. ! # ! #zips: zippdf zipps ziphtml ziplonghtml ! zips: zippdf zipps ziphtml bziphtml: html-$(RELEASE).tar.bz2 From python-dev@python.org Sat Jul 1 03:51:26 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 30 Jun 2000 19:51:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild readme.txt,1.7,1.8 Message-ID: <200007010251.TAA03264@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv3242/python/dist/src/pcbuild Modified Files: readme.txt Log Message: Repaired two URLs. Index: readme.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/readme.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** readme.txt 2000/07/01 00:03:43 1.7 --- readme.txt 2000/07/01 02:51:23 1.8 *************** *** 31,37 **** SUBPROJECTS ----------- ! These subprojects should build out of the box. Subprojects other than the ! main ones (python20, python, pythonw) generally build a DLL (renamed to ! .pyd) from a specific module so that users don't have to load the code supporting that module unless they import the module. --- 31,37 ---- SUBPROJECTS ----------- ! These subprojects should build out of the box. Subprojects other than the ! main ones (python20, python, pythonw) generally build a DLL (renamed to ! .pyd) from a specific module so that users don't have to load the code supporting that module unless they import the module. *************** *** 66,70 **** _tkinter Python wrapper for the Tk windowing system. Requires tcl831.exe from ! http://dev.scriptics.com/software/tcltk/downloadnow83.tml zlib --- 66,70 ---- _tkinter Python wrapper for the Tk windowing system. Requires tcl831.exe from ! http://dev.scriptics.com/software/tcltk/downloadnow83.html zlib *************** *** 75,80 **** bsddb ! Python wrapper for the BSD database 1.85. Requires bsddbmodule.zip, ! from the bsddb link at http://www.nightmare.com/software.html --- 75,80 ---- bsddb ! Python wrapper for the BSD database 1.85. Requires db.1.85.win32.zip, ! from the "bsd db" link at http://www.nightmare.com/software.html From python-dev@python.org Sat Jul 1 04:13:03 2000 From: python-dev@python.org (Mark Hammond) Date: Fri, 30 Jun 2000 20:13:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild winsound.dsp,1.2,1.3 winreg.dsp,1.4,1.5 unicodedata.dsp,1.2,1.3 python20.dsp,1.3,1.4 mmap.dsp,1.4,1.5 Message-ID: <200007010313.UAA10536@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv10440 Modified Files: winsound.dsp winreg.dsp unicodedata.dsp python20.dsp mmap.dsp Log Message: Update all projects so Debug builds use "/Zi" instead of "/ZI", which means everything should still build under MSVC5 NOTE: All these projects had messed-up line endings (but MSVC didnt mind). Executing a diff with "--ignore-all-space" will show the specific changes, but I made a complete checkin with correct line endiings as it is the correct thing to do! Index: winsound.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/winsound.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** winsound.dsp 2000/04/21 21:43:40 1.2 --- winsound.dsp 2000/07/01 03:12:59 1.3 *************** *** 1,99 **** ! # Microsoft Developer Studio Project File - Name="winsound" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=winsound - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "winsound.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "winsound.mak" CFG="winsound - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "winsound - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "winsound - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "winsound" ! # PROP Scc_LocalPath "..\pc" ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "winsound - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Release" ! # PROP BASE Intermediate_Dir "Release" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\winsound" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0xc09 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib winmm.lib /nologo /base:"0x1D130000" /dll /machine:I386 /out:"./winsound.pyd" /export:initwinsound ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "winsound - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Debug" ! # PROP BASE Intermediate_Dir "Debug" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\winsound" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0xc09 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib winmm.lib /nologo /base:"0x1D130000" /dll /debug /machine:I386 /out:"./winsound_d.pyd" /pdbtype:sept /export:initwinsound ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "winsound - Win32 Release" ! # Name "winsound - Win32 Debug" ! # Begin Source File ! ! SOURCE=..\PC\winsound.c ! # End Source File ! # End Target ! # End Project --- 1,99 ---- ! # Microsoft Developer Studio Project File - Name="winsound" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=winsound - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "winsound.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "winsound.mak" CFG="winsound - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "winsound - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "winsound - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "winsound" ! # PROP Scc_LocalPath "..\pc" ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "winsound - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Release" ! # PROP BASE Intermediate_Dir "Release" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\winsound" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0xc09 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib winmm.lib /nologo /base:"0x1D130000" /dll /machine:I386 /out:"./winsound.pyd" /export:initwinsound ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "winsound - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Debug" ! # PROP BASE Intermediate_Dir "Debug" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\winsound" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0xc09 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib winmm.lib /nologo /base:"0x1D130000" /dll /debug /machine:I386 /out:"./winsound_d.pyd" /pdbtype:sept /export:initwinsound ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "winsound - Win32 Release" ! # Name "winsound - Win32 Debug" ! # Begin Source File ! ! SOURCE=..\PC\winsound.c ! # End Source File ! # End Target ! # End Project Index: winreg.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/winreg.dsp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** winreg.dsp 2000/06/29 16:43:49 1.4 --- winreg.dsp 2000/07/01 03:12:59 1.5 *************** *** 72,76 **** F90=df.exe # ADD BASE CPP /nologo /MTd /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "winreg_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\Include" /I "..\PC" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 --- 72,76 ---- F90=df.exe # ADD BASE CPP /nologo /MTd /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "winreg_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "..\Include" /I "..\PC" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 Index: unicodedata.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/unicodedata.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** unicodedata.dsp 2000/04/21 21:26:07 1.2 --- unicodedata.dsp 2000/07/01 03:12:59 1.3 *************** *** 1,103 **** ! # Microsoft Developer Studio Project File - Name="unicodedata" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=unicodedata - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "unicodedata.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "unicodedata.mak" CFG="unicodedata - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "unicodedata - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "unicodedata - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "unicodedata" ! # PROP Scc_LocalPath ".." ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "unicodedata - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Release" ! # PROP BASE Intermediate_Dir "Release" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\unicodedata" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0xc09 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1D120000" /dll /machine:I386 /out:"./unicodedata.pyd" /export:initunicodedata ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "unicodedata - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Debug" ! # PROP BASE Intermediate_Dir "Debug" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\unicodedata" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0xc09 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1D120000" /dll /debug /machine:I386 /out:"./unicodedata_d.pyd" /pdbtype:sept /export:initunicodedata ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "unicodedata - Win32 Release" ! # Name "unicodedata - Win32 Debug" ! # Begin Source File ! ! SOURCE=..\Modules\unicodedata.c ! # End Source File ! # Begin Source File ! ! SOURCE=..\Modules\unicodedatabase.c ! # End Source File ! # End Target ! # End Project --- 1,103 ---- ! # Microsoft Developer Studio Project File - Name="unicodedata" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=unicodedata - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "unicodedata.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "unicodedata.mak" CFG="unicodedata - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "unicodedata - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "unicodedata - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "unicodedata" ! # PROP Scc_LocalPath ".." ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "unicodedata - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Release" ! # PROP BASE Intermediate_Dir "Release" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\unicodedata" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0xc09 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1D120000" /dll /machine:I386 /out:"./unicodedata.pyd" /export:initunicodedata ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "unicodedata - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Debug" ! # PROP BASE Intermediate_Dir "Debug" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\unicodedata" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0xc09 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1D120000" /dll /debug /machine:I386 /out:"./unicodedata_d.pyd" /pdbtype:sept /export:initunicodedata ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "unicodedata - Win32 Release" ! # Name "unicodedata - Win32 Debug" ! # Begin Source File ! ! SOURCE=..\Modules\unicodedata.c ! # End Source File ! # Begin Source File ! ! SOURCE=..\Modules\unicodedatabase.c ! # End Source File ! # End Target ! # End Project Index: python20.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/python20.dsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** python20.dsp 2000/06/30 20:30:03 1.3 --- python20.dsp 2000/07/01 03:12:59 1.4 *************** *** 1,1689 **** ! # Microsoft Developer Studio Project File - Name="python20" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! # TARGTYPE "Win32 (ALPHA) Dynamic-Link Library" 0x0602 ! ! CFG=python20 - Win32 Alpha Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run [...3350 lines suppressed...] ! !ENDIF ! ! # End Source File ! # Begin Source File ! ! SOURCE=..\Modules\yuvconvert.c ! ! !IF "$(CFG)" == "python20 - Win32 Release" ! ! !ELSEIF "$(CFG)" == "python20 - Win32 Debug" ! ! !ELSEIF "$(CFG)" == "python20 - Win32 Alpha Debug" ! ! !ELSEIF "$(CFG)" == "python20 - Win32 Alpha Release" ! ! !ENDIF ! ! # End Source File ! # End Target ! # End Project Index: mmap.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/mmap.dsp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** mmap.dsp 2000/04/24 14:17:17 1.4 --- mmap.dsp 2000/07/01 03:12:59 1.5 *************** *** 72,76 **** F90=df.exe # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 --- 72,76 ---- F90=df.exe # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 From python-dev@python.org Sat Jul 1 04:14:53 2000 From: python-dev@python.org (Mark Hammond) Date: Fri, 30 Jun 2000 20:14:53 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild ucnhash.dsp,1.1,1.2 Message-ID: <200007010314.UAA10590@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv10580 Modified Files: ucnhash.dsp Log Message: ucnhash now correctly builds for Windows. Index: ucnhash.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/ucnhash.dsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** ucnhash.dsp 2000/06/28 16:40:10 1.1 --- ucnhash.dsp 2000/07/01 03:14:51 1.2 *************** *** 39,48 **** # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "ucnhash___Win32_Release0" ! # PROP Intermediate_Dir "ucnhash___Win32_Release0" # PROP Target_Dir "" F90=df.exe # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 --- 39,49 ---- # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\ucnhash" ! # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" F90=df.exe # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 *************** *** 54,58 **** LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 !ELSEIF "$(CFG)" == "ucnhash - Win32 Debug" --- 55,60 ---- LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 /nologo /dll /machine:I386 /out:"ucnhash.pyd" /export:initucnhash ! # SUBTRACT LINK32 /pdb:none !ELSEIF "$(CFG)" == "ucnhash - Win32 Debug" *************** *** 65,74 **** # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "ucnhash___Win32_Debug0" ! # PROP Intermediate_Dir "ucnhash___Win32_Debug0" # PROP Target_Dir "" F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 --- 67,77 ---- # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\ucnhash" ! # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 *************** *** 80,84 **** LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept !ENDIF --- 83,88 ---- LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 /nologo /dll /debug /machine:I386 /out:"ucnhash_d.pyd" /pdbtype:sept /export:initucnhash ! # SUBTRACT LINK32 /pdb:none !ENDIF *************** *** 88,103 **** # Name "ucnhash - Win32 Release" # Name "ucnhash - Win32 Debug" ! # Begin Group "Source Files" ! # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" ! # End Group ! # Begin Group "Header Files" ! ! # PROP Default_Filter "h;hpp;hxx;hm;inl" ! # End Group ! # Begin Group "Resource Files" ! ! # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" ! # End Group # End Target # End Project --- 92,99 ---- # Name "ucnhash - Win32 Release" # Name "ucnhash - Win32 Debug" ! # Begin Source File ! SOURCE=..\Modules\ucnhash.c ! # End Source File # End Target # End Project From python-dev@python.org Sat Jul 1 04:15:39 2000 From: python-dev@python.org (Mark Hammond) Date: Fri, 30 Jun 2000 20:15:39 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild pcbuild.dsw,1.17,1.18 Message-ID: <200007010315.UAA10620@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv10613 Modified Files: pcbuild.dsw Log Message: Add ucnhash to the workspace, as a dependency of python20. Index: pcbuild.dsw =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/pcbuild.dsw,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** pcbuild.dsw 2000/06/30 14:04:10 1.17 --- pcbuild.dsw 2000/07/01 03:15:37 1.18 *************** *** 166,169 **** --- 166,184 ---- ############################################################################### + Project: "ucnhash"=".\ucnhash.dsp" - Package Owner=<4> + + Package=<5> + {{{ + }}} + + Package=<4> + {{{ + Begin Project Dependency + Project_Dep_Name python20 + End Project Dependency + }}} + + ############################################################################### + Project: "unicodedata"=".\unicodedata.dsp" - Package Owner=<4> *************** *** 237,240 **** ############################################################################### - --- 252,254 ---- From python-dev@python.org Sat Jul 1 04:27:25 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 20:27:25 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild bsddb.dsp,1.10,1.11 Message-ID: <200007010327.UAA11113@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv11092 Modified Files: bsddb.dsp Log Message: Define a magical symbol and magic include path so it will compile without changes to the bsddb source. Index: bsddb.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/bsddb.dsp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** bsddb.dsp 2000/04/21 21:26:07 1.10 --- bsddb.dsp 2000/07/01 03:27:22 1.11 *************** *** 170,174 **** --- 170,180 ---- !IF "$(CFG)" == "bsddb - Win32 Release" + # ADD CPP /I "..\..\bsddb\PORT\win32\include" /I "..\..\bsddb\PORT\include" /D "__DBINTERFACE_PRIVATE" + # SUBTRACT CPP /X /I "..\..\bsddb\port\include" + !ELSEIF "$(CFG)" == "bsddb - Win32 Debug" + + # ADD CPP /I "..\..\bsddb\PORT\win32\include" /I "..\..\bsddb\PORT\include" /D "__DBINTERFACE_PRIVATE" + # SUBTRACT CPP /I "..\..\bsddb\port\include" !ELSEIF "$(CFG)" == "bsddb - Win32 Alpha Debug" From python-dev@python.org Sat Jul 1 04:34:16 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 20:34:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_openpty,NONE,1.1 Message-ID: <200007010334.UAA11441@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv11430 Added Files: test_openpty Log Message: output for openpty test --- NEW FILE --- test_openpty Ping! From python-dev@python.org Sat Jul 1 04:40:15 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 30 Jun 2000 20:40:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.111,1.112 Message-ID: <200007010340.UAA11703@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv11696 Modified Files: socketmodule.c Log Message: Restore strict checking of socket address values; addresses passed to the bind(), connect(), and connect_ex() methods must be a single parameter. Originally part of 1.98, reverted in 1.100. Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.111 retrieving revision 1.112 diff -C2 -r1.111 -r1.112 *** socketmodule.c 2000/06/30 23:58:05 1.111 --- socketmodule.c 2000/07/01 03:40:12 1.112 *************** *** 46,58 **** Socket methods: - (NB: an argument list of the form (sockaddr...) means that multiple - arguments are treated the same as a single tuple argument, for backwards - compatibility. This is deprecated, and will be removed in future versions.) - s.accept() --> new socket object, sockaddr ! - s.bind(sockaddr...) --> None - s.close() --> None ! - s.connect(sockaddr...) --> None ! - s.connect_ex(sockaddr...) --> 0 or errno (handy for e.g. async connect) - s.fileno() --> file descriptor - s.dup() --> same as socket.fromfd(os.dup(s.fileno(), ...) --- 46,55 ---- Socket methods: - s.accept() --> new socket object, sockaddr ! - s.bind(sockaddr) --> None - s.close() --> None ! - s.connect(sockaddr) --> None ! - s.connect_ex(sockaddr) --> 0 or errno (handy for e.g. async connect) - s.fileno() --> file descriptor - s.dup() --> same as socket.fromfd(os.dup(s.fileno(), ...) *************** *** 857,861 **** ! /* s.bind(sockaddr...) method */ static PyObject * --- 854,858 ---- ! /* s.bind(sockaddr) method */ static PyObject * *************** *** 865,869 **** int addrlen; int res; ! if (!getsockaddrarg(s, args, &addr, &addrlen)) return NULL; Py_BEGIN_ALLOW_THREADS --- 862,869 ---- int addrlen; int res; ! PyObject *addro; ! if (!PyArg_ParseTuple(args, "O:bind", &addro)) ! return NULL; ! if (!getsockaddrarg(s, addro, &addr, &addrlen)) return NULL; Py_BEGIN_ALLOW_THREADS *************** *** 908,912 **** ! /* s.connect(sockaddr...) method */ static PyObject * --- 908,912 ---- ! /* s.connect(sockaddr) method */ static PyObject * *************** *** 916,921 **** int addrlen; int res; ! if (!getsockaddrarg(s, args, &addr, &addrlen)) return NULL; Py_BEGIN_ALLOW_THREADS res = connect(s->sock_fd, addr, addrlen); --- 916,924 ---- int addrlen; int res; ! PyObject *addro; ! if (!PyArg_ParseTuple(args, "O:connect", &addro)) return NULL; + if (!getsockaddrarg(s, addro, &addr, &addrlen)) + return NULL; Py_BEGIN_ALLOW_THREADS res = connect(s->sock_fd, addr, addrlen); *************** *** 934,938 **** ! /* s.connect_ex(sockaddr...) method */ static PyObject * --- 937,941 ---- ! /* s.connect_ex(sockaddr) method */ static PyObject * *************** *** 942,946 **** int addrlen; int res; ! if (!getsockaddrarg(s, args, &addr, &addrlen)) return NULL; Py_BEGIN_ALLOW_THREADS --- 945,952 ---- int addrlen; int res; ! PyObject *addro; ! if (!PyArg_ParseTuple(args, "O:connect_ex", &addro)) ! return NULL; ! if (!getsockaddrarg(s, addro, &addr, &addrlen)) return NULL; Py_BEGIN_ALLOW_THREADS *************** *** 1322,1332 **** {"accept", (PyCFunction)PySocketSock_accept, 1, accept_doc}, ! {"bind", (PyCFunction)PySocketSock_bind, 0, bind_doc}, {"close", (PyCFunction)PySocketSock_close, 1, close_doc}, ! {"connect", (PyCFunction)PySocketSock_connect, 0, connect_doc}, ! {"connect_ex", (PyCFunction)PySocketSock_connect_ex, 0, connect_ex_doc}, #ifndef NO_DUP --- 1328,1338 ---- {"accept", (PyCFunction)PySocketSock_accept, 1, accept_doc}, ! {"bind", (PyCFunction)PySocketSock_bind, 1, bind_doc}, {"close", (PyCFunction)PySocketSock_close, 1, close_doc}, ! {"connect", (PyCFunction)PySocketSock_connect, 1, connect_doc}, ! {"connect_ex", (PyCFunction)PySocketSock_connect_ex, 1, connect_ex_doc}, #ifndef NO_DUP From python-dev@python.org Sat Jul 1 04:43:36 2000 From: python-dev@python.org (Mark Hammond) Date: Fri, 30 Jun 2000 20:43:36 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild ucnhash.dsp,1.2,1.3 Message-ID: <200007010343.UAA11847@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv11840 Modified Files: ucnhash.dsp Log Message: The Python include paths were not specified. Index: ucnhash.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/ucnhash.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ucnhash.dsp 2000/07/01 03:14:51 1.2 --- ucnhash.dsp 2000/07/01 03:43:33 1.3 *************** *** 45,49 **** F90=df.exe # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 --- 45,49 ---- F90=df.exe # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 *************** *** 73,77 **** F90=df.exe # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 --- 73,77 ---- F90=df.exe # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 From python-dev@python.org Sat Jul 1 04:46:40 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 20:46:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild readme.txt,1.8,1.9 Message-ID: <200007010346.UAA11960@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv11951 Modified Files: readme.txt Log Message: Add ucnhash (new subproject). Index: readme.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/readme.txt,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** readme.txt 2000/07/01 02:51:23 1.8 --- readme.txt 2000/07/01 03:46:38 1.9 *************** *** 52,56 **** select selectmodule.c ! unicodedata large tables of Unicode data winreg --- 52,56 ---- select selectmodule.c ! ucnhash, unicodedata large tables of Unicode data winreg From python-dev@python.org Sat Jul 1 05:03:35 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 21:03:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild python20.dsp,1.4,1.5 ucnhash.dsp,1.3,1.4 unicodedata.dsp,1.3,1.4 winsound.dsp,1.3,1.4 Message-ID: <200007010403.VAA19090@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv19080 Modified Files: python20.dsp ucnhash.dsp unicodedata.dsp winsound.dsp Log Message: A bunch of project files were checked in as text files. They should all be binary (cvs admin -kv has now been applied). Index: python20.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/python20.dsp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** python20.dsp 2000/07/01 03:12:59 1.4 --- python20.dsp 2000/07/01 04:03:32 1.5 *************** *** 1,1690 **** ! # Microsoft Developer Studio Project File - Name="python20" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! # TARGTYPE "Win32 (ALPHA) Dynamic-Link Library" 0x0602 ! ! CFG=python20 - Win32 Alpha Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run [...3351 lines suppressed...] ! !ENDIF ! ! # End Source File ! # Begin Source File ! ! SOURCE=..\Modules\yuvconvert.c ! ! !IF "$(CFG)" == "python20 - Win32 Release" ! ! !ELSEIF "$(CFG)" == "python20 - Win32 Debug" ! ! !ELSEIF "$(CFG)" == "python20 - Win32 Alpha Debug" ! ! !ELSEIF "$(CFG)" == "python20 - Win32 Alpha Release" ! ! !ENDIF ! ! # End Source File ! # End Target ! # End Project Index: ucnhash.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/ucnhash.dsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** ucnhash.dsp 2000/07/01 03:43:33 1.3 --- ucnhash.dsp 2000/07/01 04:03:32 1.4 *************** *** 1,99 **** ! # Microsoft Developer Studio Project File - Name="ucnhash" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=ucnhash - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "ucnhash.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "ucnhash.mak" CFG="ucnhash - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "ucnhash - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "ucnhash - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "" ! # PROP Scc_LocalPath "" ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "ucnhash - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "ucnhash___Win32_Release0" ! # PROP BASE Intermediate_Dir "ucnhash___Win32_Release0" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\ucnhash" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0x409 /d "NDEBUG" ! # ADD RSC /l 0x409 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 /nologo /dll /machine:I386 /out:"ucnhash.pyd" /export:initucnhash ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "ucnhash - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "ucnhash___Win32_Debug0" ! # PROP BASE Intermediate_Dir "ucnhash___Win32_Debug0" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\ucnhash" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0x409 /d "_DEBUG" ! # ADD RSC /l 0x409 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 /nologo /dll /debug /machine:I386 /out:"ucnhash_d.pyd" /pdbtype:sept /export:initucnhash ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "ucnhash - Win32 Release" ! # Name "ucnhash - Win32 Debug" ! # Begin Source File ! ! SOURCE=..\Modules\ucnhash.c ! # End Source File ! # End Target ! # End Project --- 1,99 ---- ! # Microsoft Developer Studio Project File - Name="ucnhash" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=ucnhash - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "ucnhash.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "ucnhash.mak" CFG="ucnhash - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "ucnhash - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "ucnhash - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "" ! # PROP Scc_LocalPath "" ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "ucnhash - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "ucnhash___Win32_Release0" ! # PROP BASE Intermediate_Dir "ucnhash___Win32_Release0" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\ucnhash" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0x409 /d "NDEBUG" ! # ADD RSC /l 0x409 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 /nologo /dll /machine:I386 /out:"ucnhash.pyd" /export:initucnhash ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "ucnhash - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "ucnhash___Win32_Debug0" ! # PROP BASE Intermediate_Dir "ucnhash___Win32_Debug0" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\ucnhash" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UCNHASH_EXPORTS" /YX /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0x409 /d "_DEBUG" ! # ADD RSC /l 0x409 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 /nologo /dll /debug /machine:I386 /out:"ucnhash_d.pyd" /pdbtype:sept /export:initucnhash ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "ucnhash - Win32 Release" ! # Name "ucnhash - Win32 Debug" ! # Begin Source File ! ! SOURCE=..\Modules\ucnhash.c ! # End Source File ! # End Target ! # End Project Index: unicodedata.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/unicodedata.dsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** unicodedata.dsp 2000/07/01 03:12:59 1.3 --- unicodedata.dsp 2000/07/01 04:03:32 1.4 *************** *** 1,103 **** ! # Microsoft Developer Studio Project File - Name="unicodedata" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=unicodedata - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "unicodedata.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "unicodedata.mak" CFG="unicodedata - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "unicodedata - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "unicodedata - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "unicodedata" ! # PROP Scc_LocalPath ".." ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "unicodedata - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Release" ! # PROP BASE Intermediate_Dir "Release" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\unicodedata" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0xc09 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1D120000" /dll /machine:I386 /out:"./unicodedata.pyd" /export:initunicodedata ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "unicodedata - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Debug" ! # PROP BASE Intermediate_Dir "Debug" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\unicodedata" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0xc09 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1D120000" /dll /debug /machine:I386 /out:"./unicodedata_d.pyd" /pdbtype:sept /export:initunicodedata ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "unicodedata - Win32 Release" ! # Name "unicodedata - Win32 Debug" ! # Begin Source File ! ! SOURCE=..\Modules\unicodedata.c ! # End Source File ! # Begin Source File ! ! SOURCE=..\Modules\unicodedatabase.c ! # End Source File ! # End Target ! # End Project --- 1,103 ---- ! # Microsoft Developer Studio Project File - Name="unicodedata" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=unicodedata - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "unicodedata.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "unicodedata.mak" CFG="unicodedata - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "unicodedata - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "unicodedata - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "unicodedata" ! # PROP Scc_LocalPath ".." ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "unicodedata - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Release" ! # PROP BASE Intermediate_Dir "Release" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\unicodedata" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0xc09 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1D120000" /dll /machine:I386 /out:"./unicodedata.pyd" /export:initunicodedata ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "unicodedata - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Debug" ! # PROP BASE Intermediate_Dir "Debug" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\unicodedata" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MMAP_EXPORTS" /YX /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0xc09 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1D120000" /dll /debug /machine:I386 /out:"./unicodedata_d.pyd" /pdbtype:sept /export:initunicodedata ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "unicodedata - Win32 Release" ! # Name "unicodedata - Win32 Debug" ! # Begin Source File ! ! SOURCE=..\Modules\unicodedata.c ! # End Source File ! # Begin Source File ! ! SOURCE=..\Modules\unicodedatabase.c ! # End Source File ! # End Target ! # End Project Index: winsound.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/winsound.dsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** winsound.dsp 2000/07/01 03:12:59 1.3 --- winsound.dsp 2000/07/01 04:03:32 1.4 *************** *** 1,99 **** ! # Microsoft Developer Studio Project File - Name="winsound" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=winsound - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "winsound.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "winsound.mak" CFG="winsound - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "winsound - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "winsound - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "winsound" ! # PROP Scc_LocalPath "..\pc" ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "winsound - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Release" ! # PROP BASE Intermediate_Dir "Release" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\winsound" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0xc09 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib winmm.lib /nologo /base:"0x1D130000" /dll /machine:I386 /out:"./winsound.pyd" /export:initwinsound ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "winsound - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Debug" ! # PROP BASE Intermediate_Dir "Debug" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\winsound" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0xc09 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib winmm.lib /nologo /base:"0x1D130000" /dll /debug /machine:I386 /out:"./winsound_d.pyd" /pdbtype:sept /export:initwinsound ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "winsound - Win32 Release" ! # Name "winsound - Win32 Debug" ! # Begin Source File ! ! SOURCE=..\PC\winsound.c ! # End Source File ! # End Target ! # End Project --- 1,99 ---- ! # Microsoft Developer Studio Project File - Name="winsound" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=winsound - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "winsound.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "winsound.mak" CFG="winsound - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "winsound - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "winsound - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "winsound" ! # PROP Scc_LocalPath "..\pc" ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "winsound - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Release" ! # PROP BASE Intermediate_Dir "Release" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-release\winsound" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0xc09 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib winmm.lib /nologo /base:"0x1D130000" /dll /machine:I386 /out:"./winsound.pyd" /export:initwinsound ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "winsound - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Debug" ! # PROP BASE Intermediate_Dir "Debug" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "." ! # PROP Intermediate_Dir "x86-temp-debug\winsound" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINSOUND_EXPORTS" /YX /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0xc09 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib winmm.lib /nologo /base:"0x1D130000" /dll /debug /machine:I386 /out:"./winsound_d.pyd" /pdbtype:sept /export:initwinsound ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "winsound - Win32 Release" ! # Name "winsound - Win32 Debug" ! # Begin Source File ! ! SOURCE=..\PC\winsound.c ! # End Source File ! # End Target ! # End Project From python-dev@python.org Sat Jul 1 05:23:50 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 30 Jun 2000 21:23:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/dos-8x3 sre_comp.py,1.3,1.4 sre_pars.py,1.3,1.4 Message-ID: <200007010423.VAA19770@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/dos-8x3 In directory slayer.i.sourceforge.net:/tmp/cvs-serv19761 Modified Files: sre_comp.py sre_pars.py Log Message: the usual Index: sre_comp.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/sre_comp.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** sre_comp.py 2000/06/30 16:13:37 1.3 --- sre_comp.py 2000/07/01 04:23:47 1.4 *************** *** 40,44 **** else: emit(OPCODES[op]) ! fixup = lambda x: x skip = len(code); emit(0) for op, av in av: --- 40,44 ---- else: emit(OPCODES[op]) ! fixup = lambda x: x skip = len(code); emit(0) for op, av in av: *************** *** 119,123 **** emit(OPCODES[op]) if flags & SRE_FLAG_MULTILINE: ! emit(ATCODES[AT_MULTILINE[av]]) else: emit(ATCODES[av]) --- 119,123 ---- emit(OPCODES[op]) if flags & SRE_FLAG_MULTILINE: ! emit(ATCODES[AT_MULTILINE.get(av, av)]) else: emit(ATCODES[av]) *************** *** 204,208 **** import sre_parse pattern = p ! p = sre_parse.parse(p) else: pattern = None --- 204,208 ---- import sre_parse pattern = p ! p = sre_parse.parse(p, flags) else: pattern = None Index: sre_pars.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/sre_pars.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** sre_pars.py 2000/06/30 16:13:37 1.3 --- sre_pars.py 2000/07/01 04:23:47 1.4 *************** *** 20,25 **** MAXREPEAT = 32767 ! # FIXME: same here ! CHARMASK = 0x7fff SPECIAL_CHARS = ".\\[{()*+?^$|" --- 20,26 ---- MAXREPEAT = 32767 ! # FIXME: might change in 2.0 final. but for now, this seems ! # to be the best way to be compatible with 1.5.2 ! CHARMASK = 0xff SPECIAL_CHARS = ".\\[{()*+?^$|" *************** *** 31,35 **** HEXDIGITS = tuple("0123456789abcdefABCDEF") ! WHITESPACE = string.whitespace ESCAPES = { --- 32,36 ---- HEXDIGITS = tuple("0123456789abcdefABCDEF") ! WHITESPACE = tuple(string.whitespace) ESCAPES = { *************** *** 296,300 **** return subpattern ! def _parse(source, state, flags=0): # parse regular expression pattern into an operator list. --- 297,301 ---- return subpattern ! def _parse(source, state): # parse regular expression pattern into an operator list. *************** *** 468,472 **** b = [] while 1: ! p = _parse(source, state, flags) if source.next == ")": if b: --- 469,473 ---- b = [] while 1: ! p = _parse(source, state) if source.next == ")": if b: *************** *** 495,499 **** group = state.getgroup(name) while 1: ! p = _parse(source, state, flags) if source.match(")"): if b: --- 496,500 ---- group = state.getgroup(name) while 1: ! p = _parse(source, state) if source.match(")"): if b: *************** *** 532,538 **** source = Tokenizer(pattern) state = State() b = [] while 1: ! p = _parse(source, state, flags) tail = source.get() if tail == "|": --- 533,540 ---- source = Tokenizer(pattern) state = State() + state.flags = flags b = [] while 1: ! p = _parse(source, state) tail = source.get() if tail == "|": *************** *** 617,623 **** sep = match.string[:0] if type(sep) is type(""): ! char = chr else: ! char = unichr for c, s in template: if c is LITERAL: --- 619,625 ---- sep = match.string[:0] if type(sep) is type(""): ! char = chr else: ! char = unichr for c, s in template: if c is LITERAL: From python-dev@python.org Sat Jul 1 05:45:55 2000 From: python-dev@python.org (Barry Warsaw) Date: Fri, 30 Jun 2000 21:45:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python exceptions.c,1.3,1.4 Message-ID: <200007010445.VAA20645@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv20637 Modified Files: exceptions.c Log Message: init_exceptions(): Decref `doc' so it doesn't leak. Index: exceptions.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** exceptions.c 2000/06/30 04:59:59 1.3 --- exceptions.c 2000/07/01 04:45:52 1.4 *************** *** 910,913 **** --- 910,914 ---- PyDict_SetItemString(mydict, "__doc__", doc); + Py_DECREF(doc); if (PyErr_Occurred()) Py_FatalError("exceptions bootstrapping error."); From python-dev@python.org Sat Jul 1 05:58:50 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 30 Jun 2000 21:58:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/dom minidom.py,1.1,1.2 pulldom.py,1.1,1.2 Message-ID: <200007010458.VAA21265@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv21246/dom Modified Files: minidom.py pulldom.py Log Message: Reference cycle fixes Index: minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/minidom.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** minidom.py 2000/06/29 19:39:57 1.1 --- minidom.py 2000/07/01 04:58:47 1.2 *************** *** 30,38 **** NOTATION_NODE = 12 ! allnodes=[] def __init__( self ): self.childNodes=[] ! Node.allnodes.append( repr( id( self ))+repr( self.__class__ )) def __getattr__( self, key ): --- 30,46 ---- NOTATION_NODE = 12 ! allnodes={} ! _debug=0 ! _makeParentNodes=1 ! debug=None def __init__( self ): self.childNodes=[] ! if Node._debug: ! index=repr( id( self ))+repr( self.__class__ ) ! Node.allnodes[index]=repr( self.__dict__ ) ! if Node.debug==None: ! Node.debug=open( "debug4.out", "w" ) ! Node.debug.write( "create %s\n"%index ) def __getattr__( self, key ): *************** *** 73,82 **** --- 81,117 ---- else: return 0 + def _get_firstChild( self ): + return self.childNodes[0] + + def _get_lastChild( self ): + return self.childNodes[-1] + def insertBefore( self, newChild, refChild): index=self.childNodes.index( refChild ) self.childNodes.insert( index, newChild ) + if self._makeParentNodes: + newChild.parentNode=self def appendChild( self, node ): self.childNodes.append( node ) + return node + + def replaceChild( self, newChild, oldChild ): + index=self.childNodes.index( oldChild ) + self.childNodes[index]=oldChild + + def removeChild( self, oldChild ): + index=self.childNodes.index( oldChild ) + del self.childNodes[index] + + def cloneNode( self, deep ): + import new + clone=new.instance( self.__class__, self.__dict__ ) + clone.attributes=self.attributes.copy() + if not deep: + clone.childNodes=[] + else: + clone.childNodes=map( lambda x: x.cloneNode, self.childNodes ) + return clone def unlink( self ): *************** *** 87,95 **** self.childNodes=None if self.attributes: ! for attr in self.attributes.values(): ! attr.unlink() ! self.attributes=None ! index=Node.allnodes.index( repr( id( self ))+repr( self.__class__ )) ! del Node.allnodes[index] def _write_data( writer, data): --- 122,133 ---- self.childNodes=None if self.attributes: ! for attr in self._attrs.values(): ! self.removeAttributeNode( attr ) ! assert not len( self._attrs ) ! assert not len( self._attrsNS ) ! if Node._debug: ! index=repr( id( self ))+repr( self.__class__ ) ! self.debug.write( "Deleting: %s\n" % index ) ! del Node.allnodes[index] def _write_data( writer, data): *************** *** 101,109 **** writer.write(data) - def _closeElement( element ): - del element.parentNode - for node in element.elements: - _closeElement( node ) - def _getElementsByTagNameHelper( parent, name, rc ): for node in parent.childNodes: --- 139,142 ---- *************** *** 124,138 **** class Attr(Node): nodeType=Node.ATTRIBUTE_NODE ! def __init__( self, qName, namespaceURI="", prefix="", ! localName=None ): ! Node.__init__( self ) ! assert qName # skip setattr for performance - self.__dict__["nodeName"] = self.__dict__["name"] = qName self.__dict__["localName"]=localName or qName ! self.__dict__["prefix"]=prefix self.__dict__["namespaceURI"]=namespaceURI ! # nodeValue and value are set elsewhere self.attributes=None def __setattr__( self, name, value ): --- 157,170 ---- class Attr(Node): nodeType=Node.ATTRIBUTE_NODE ! def __init__( self, qName, namespaceURI="", localName=None, ! prefix=None ): # skip setattr for performance self.__dict__["localName"]=localName or qName ! self.__dict__["nodeName"] = self.__dict__["name"] = qName self.__dict__["namespaceURI"]=namespaceURI ! self.__dict__["prefix"]=prefix self.attributes=None + Node.__init__( self ) + # nodeValue and value are set elsewhere def __setattr__( self, name, value ): *************** *** 143,152 **** class AttributeList: ! # the attribute list is a transient interface to the underlying dictionaries ! # mutations here will change the underlying element's dictionary def __init__( self, attrs, attrsNS ): ! self.__attrs=attrs ! self.__attrsNS=attrs ! self.length=len( self.__attrs.keys() ) def item( self, index ): --- 175,185 ---- class AttributeList: ! """the attribute list is a transient interface to the underlying ! dictionaries. mutations here will change the underlying element's ! dictionary""" def __init__( self, attrs, attrsNS ): ! self._attrs=attrs ! self._attrsNS=attrsNS ! self.length=len( self._attrs.keys() ) def item( self, index ): *************** *** 158,175 **** def items( self ): return map( lambda node: (node.tagName, node.value), ! self.__attrs.values() ) def itemsNS( self ): return map( lambda node: ((node.URI, node.localName), node.value), ! self.__attrs.values() ) def keys( self ): ! return self.__attrs.keys() def keysNS( self ): ! return self.__attrsNS.keys() def values( self ): ! return self.__attrs.values() def __len__( self ): --- 191,208 ---- def items( self ): return map( lambda node: (node.tagName, node.value), ! self._attrs.values() ) def itemsNS( self ): return map( lambda node: ((node.URI, node.localName), node.value), ! self._attrs.values() ) def keys( self ): ! return self._attrs.keys() def keysNS( self ): ! return self._attrsNS.keys() def values( self ): ! return self._attrs.values() def __len__( self ): *************** *** 177,181 **** def __cmp__( self, other ): ! if self.__attrs is other.__attrs: return 0 else: --- 210,214 ---- def __cmp__( self, other ): ! if self._attrs is getattr( other, "_attrs", None ): return 0 else: *************** *** 184,195 **** #FIXME: is it appropriate to return .value? def __getitem__( self, attname_or_tuple ): ! if type( attname_or_tuple ) == type( (1,2) ): ! return self.__attrsNS[attname_or_tuple].value else: ! return self.__attrs[attname_or_tuple].value def __setitem__( self, attname ): raise TypeError, "object does not support item assignment" ! class Element( Node ): nodeType=Node.ELEMENT_NODE --- 217,234 ---- #FIXME: is it appropriate to return .value? def __getitem__( self, attname_or_tuple ): ! if type( attname_or_tuple ) == type( () ): ! return self._attrsNS[attname_or_tuple] else: ! return self._attrs[attname_or_tuple] def __setitem__( self, attname ): raise TypeError, "object does not support item assignment" ! ! def __delitem__( self, attname_or_tuple ): ! node=self[attname_or_tuple] ! node.unlink() ! del self._attrs[node.name] ! del self._attrsNS[(node.namespaceURI, node.localName)] ! class Element( Node ): nodeType=Node.ELEMENT_NODE *************** *** 203,208 **** self.nodeValue=None ! self.__attrs={} # attributes are double-indexed: ! self.__attrsNS={}# tagName -> Attribute # URI,localName -> Attribute # in the future: consider lazy generation of attribute objects --- 242,247 ---- self.nodeValue=None ! self._attrs={} # attributes are double-indexed: ! self._attrsNS={}# tagName -> Attribute # URI,localName -> Attribute # in the future: consider lazy generation of attribute objects *************** *** 211,218 **** def getAttribute( self, attname ): ! return self.__attrs[attname].value def getAttributeNS( self, namespaceURI, localName ): ! return self.__attrsNS[(namespaceURI, localName)].value def setAttribute( self, attname, value ): --- 250,257 ---- def getAttribute( self, attname ): ! return self._attrs[attname].value def getAttributeNS( self, namespaceURI, localName ): ! return self._attrsNS[(namespaceURI, localName)].value def setAttribute( self, attname, value ): *************** *** 223,246 **** def setAttributeNS( self, namespaceURI, qualifiedName, value ): ! attr=createAttributeNS( namespaceURI, qualifiedName ) # for performance attr.__dict__["value"]=attr.__dict__["nodeValue"]=value self.setAttributeNode( attr ) def setAttributeNode( self, attr ): ! self.__attrs[attr.name]=attr ! self.__attrsNS[(attr.namespaceURI,attr.localName)]=attr def removeAttribute( self, name ): ! attr = self.__attrs[name] self.removeAttributeNode( attr ) def removeAttributeNS( self, namespaceURI, localName ): ! attr = self.__attrsNS[(uri, localName)] self.removeAttributeNode( attr ) def removeAttributeNode( self, node ): ! del self.__attrs[node.name] ! del self.__attrsNS[(node.namespaceURI, node.localName)] def getElementsByTagName( self, name ): --- 262,296 ---- def setAttributeNS( self, namespaceURI, qualifiedName, value ): ! prefix,localname=_nssplit( qualifiedName ) # for performance + attr = Attr( qualifiedName, namespaceURI, localname, prefix ) attr.__dict__["value"]=attr.__dict__["nodeValue"]=value self.setAttributeNode( attr ) + def getAttributeNode( self, attrname ): + return self._attrs.get( attrname ) + + def getAttributeNodeNS( self, namespaceURI, localName ): + return self._attrsNS[(namespaceURI, localName)] + def setAttributeNode( self, attr ): ! old=self._attrs.get( attr.name, None) ! if old: ! old.unlink() ! self._attrs[attr.name]=attr ! self._attrsNS[(attr.namespaceURI,attr.localName)]=attr def removeAttribute( self, name ): ! attr = self._attrs[name] self.removeAttributeNode( attr ) def removeAttributeNS( self, namespaceURI, localName ): ! attr = self._attrsNS[(namespaceURI, localName)] self.removeAttributeNode( attr ) def removeAttributeNode( self, node ): ! node.unlink() ! del self._attrs[node.name] ! del self._attrsNS[(node.namespaceURI, node.localName)] def getElementsByTagName( self, name ): *************** *** 272,276 **** def _get_attributes( self ): ! return AttributeList( self.__attrs, self.__attrsNS ) class Comment( Node ): --- 322,326 ---- def _get_attributes( self ): ! return AttributeList( self._attrs, self._attrsNS ) class Comment( Node ): *************** *** 314,326 **** _write_data( writer, self.data ) class Document( Node ): nodeType=Node.DOCUMENT_NODE def __init__( self ): Node.__init__( self ) - self.documentElement=None self.attributes=None self.nodeName="#document" self.nodeValue=None createElement=Element --- 364,391 ---- _write_data( writer, self.data ) + def _nssplit( qualifiedName ): + fields = string.split(qualifiedName, ':') + if len(fields) == 2: + return fields + elif len(fields) == 1: + return( '', fields[0] ) + class Document( Node ): nodeType=Node.DOCUMENT_NODE + documentElement=None def __init__( self ): Node.__init__( self ) self.attributes=None self.nodeName="#document" self.nodeValue=None + def appendChild( self, node ): + if node.nodeType==Node.ELEMENT_NODE and self.documentElement: + raise TypeError, "Two document elements disallowed" + else: + self.documentElement=node + Node.appendChild( self, node ) + return node + createElement=Element *************** *** 334,362 **** def createElementNS(self, namespaceURI, qualifiedName): ! fields = string.split(qualifiedName, ':') ! if len(fields) == 2: ! prefix = fields[0] ! localName = fields[1] ! elif len(fields) == 1: ! prefix = '' ! localName = fields[0] ! return Element(self, qualifiedName, namespaceURI, prefix, localName) def createAttributeNS(self, namespaceURI, qualifiedName): ! fields = string.split(qualifiedName,':') ! if len(fields) == 2: ! localName = fields[1] ! prefix = fields[0] ! elif len(fields) == 1: ! localName = fields[0] ! prefix = None ! return Attr(qualifiedName, namespaceURI, prefix, localName) def getElementsByTagNameNS(self,namespaceURI,localName): _getElementsByTagNameNSHelper( self, namespaceURI, localName ) - - def close( self ): - for node in self.elements: - _closeElement( node ) def unlink( self ): --- 399,411 ---- def createElementNS(self, namespaceURI, qualifiedName): ! prefix,localName=_nssplit( qualifiedName ) ! return Element(qualifiedName, namespaceURI, prefix, localName) def createAttributeNS(self, namespaceURI, qualifiedName): ! prefix,localName=_nssplit( qualifiedName ) ! return Attr(namespaceURI, qualifiedName, localName, prefix) def getElementsByTagNameNS(self,namespaceURI,localName): _getElementsByTagNameNSHelper( self, namespaceURI, localName ) def unlink( self ): Index: pulldom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/pulldom.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pulldom.py 2000/06/29 19:39:57 1.1 --- pulldom.py 2000/07/01 04:58:47 1.2 *************** *** 3,7 **** import string import sys - import pyexpat from xml.sax import ExpatParser --- 3,6 ---- *************** *** 141,150 **** if token !=END_ELEMENT: ! cur_node.parentNode.childNodes.append( cur_node ) event=self.getEvent() - if node.nodeType==minidom.Node.DOCUMENT_NODE: - for child in node.childNodes: - if child.nodeType==minidom.Node.ELEMENT_NODE: - node.documentElement=child def getEvent( self ): --- 140,145 ---- if token !=END_ELEMENT: ! cur_node.parentNode.appendChild( cur_node ) event=self.getEvent() def getEvent( self ): *************** *** 194,267 **** bufsize=len( string ) ! stringio( string ) parser=_getParser() return DOMEventStream( buf, parser, bufsize ) - #FIXME: Use Lars' instead!!! - class SAX_expat: - "SAX driver for the Pyexpat C module." - - def __init__(self): - self.parser=pyexpat.ParserCreate() - self.started=0 - - def setDocumentHandler( self, handler ): - self.parser.StartElementHandler = handler.startElement - self.parser.EndElementHandler = handler.endElement - self.parser.CharacterDataHandler = handler.datachars - self.parser.ProcessingInstructionHandler = handler.processingInstruction - self.doc_handler=handler - - def setErrorHandler( self, handler ): - self.err_handler=handler - - # --- Locator methods. Only usable after errors. - - def getLineNumber(self): - return self.parser.ErrorLineNumber - - def getColumnNumber(self): - return self.parser.ErrorColumnNumber - - # --- Internal - - def __report_error(self): - msg=pyexpat.ErrorString(self.parser.ErrorCode) - self.err_handler.fatalError(msg) - - # --- EXPERIMENTAL PYTHON SAX EXTENSIONS - - def get_parser_name(self): - return "pyexpat" - - def get_parser_version(self): - return "Unknown" - - def get_driver_version(self): - return version - - def is_validating(self): - return 0 - - def is_dtd_reading(self): - return 0 - - def reset(self): - self.parser=pyexpat.ParserCreate() - self.parser.StartElementHandler = self.startElement - self.parser.EndElementHandler = self.endElement - self.parser.CharacterDataHandler = self.characters - self.parser.ProcessingInstructionHandler = self.processingInstruction - - def feed(self,data): - if not self.started: - self.doc_handler.startDocument() - self.started=1 - if not self.parser.Parse(data): - self.__report_error() - - def close(self): - if not self.parser.Parse("",1): - self.__report_error() - self.doc_handler.endDocument() - self.parser = None --- 189,194 ---- bufsize=len( string ) ! buf=stringio( string ) parser=_getParser() return DOMEventStream( buf, parser, bufsize ) From python-dev@python.org Sat Jul 1 05:58:50 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 30 Jun 2000 21:58:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml __init__.py,1.1,1.2 Message-ID: <200007010458.VAA21264@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml In directory slayer.i.sourceforge.net:/tmp/cvs-serv21246 Modified Files: __init__.py Log Message: Reference cycle fixes Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/__init__.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** __init__.py 2000/06/29 19:25:53 1.1 --- __init__.py 2000/07/01 04:58:46 1.2 *************** *** 9,13 **** sax -- The Simple API for XML, developed by XML-Dev, led by David ! Megginson. This supports the SAX 2 API. ! """ --- 9,13 ---- sax -- The Simple API for XML, developed by XML-Dev, led by David ! Megginson and ported to Python by Lars Marius Garsholm. This ! supports the SAX 2 API. """ From python-dev@python.org Sat Jul 1 05:58:50 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 30 Jun 2000 21:58:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax __init__.py,1.1,1.2 Message-ID: <200007010458.VAA21266@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv21246/sax Modified Files: __init__.py Log Message: Reference cycle fixes Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/__init__.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** __init__.py 2000/06/29 19:33:43 1.1 --- __init__.py 2000/07/01 04:58:47 1.2 *************** *** 24,25 **** --- 24,49 ---- from _exceptions import SAXParseException import xmlreader + + def parse( filename_or_stream, handler, errorHandler=ErrorHandler() ): + parser=ExpatParser() + parser.setContentHandler( handler ) + parse.setErrorHandler( errorHandler ) + parser.parse( filename_or_stream ) + + # this may not work yet...Expat doesn't handle buffer inputs + def parseString( string, handler, errorHandler=ErrorHandler() ): + try: + import cStringIO + stringio=cStringIO.StringIO + except ImportError: + import StringIO + stringio=StringIO.StringIO + + bufsize=len( string ) + buf=stringio( string ) + + parser=ExpatParser() + parser.setContentHandler( handler ) + parse.setErrorHandler( errorHandler ) + parser.parse( buf ) + From python-dev@python.org Sat Jul 1 07:26:48 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 30 Jun 2000 23:26:48 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools/sgmlconv conversion.xml,1.7,1.8 Message-ID: <200007010626.XAA05011@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools/sgmlconv In directory slayer.i.sourceforge.net:/tmp/cvs-serv5002 Modified Files: conversion.xml Log Message: Martin von Loewis : Correct typo that caused a well-formedness failure. Index: conversion.xml =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/sgmlconv/conversion.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** conversion.xml 2000/01/20 22:51:14 1.7 --- conversion.xml 2000/07/01 06:26:44 1.8 *************** *** 609,613 **** ! ABC --- 609,613 ---- ! ABC From python-dev@python.org Sat Jul 1 07:36:53 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 30 Jun 2000 23:36:53 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib ntpath.py,1.23,1.24 Message-ID: <200007010636.XAA05365@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv5358/Lib Modified Files: ntpath.py Log Message: Fix bug #345 reported by David Bolen : getatime() returned the mtime instead of the atime. Similar to an old bug in posixpath.py. Index: ntpath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ntpath.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** ntpath.py 2000/02/17 17:30:40 1.23 --- ntpath.py 2000/07/01 06:36:51 1.24 *************** *** 184,188 **** """Return the last access time of a file, reported by os.stat()""" st = os.stat(filename) ! return st[stat.ST_MTIME] --- 184,188 ---- """Return the last access time of a file, reported by os.stat()""" st = os.stat(filename) ! return st[stat.ST_ATIME] From python-dev@python.org Sat Jul 1 08:03:32 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 1 Jul 2000 00:03:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib urllib.py,1.95,1.96 Message-ID: <200007010703.AAA12554@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv12547/Lib Modified Files: urllib.py Log Message: Fix bug #314, reported by Craig Allen : splittype(): Always lower-case the URL scheme; these are supposed to be normalized according to RFC 1738 anyway. Index: urllib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/urllib.py,v retrieving revision 1.95 retrieving revision 1.96 diff -C2 -r1.95 -r1.96 *** urllib.py 2000/06/10 01:41:48 1.95 --- urllib.py 2000/07/01 07:03:30 1.96 *************** *** 849,853 **** if match: scheme = match.group(1) ! return scheme, url[len(scheme) + 1:] return None, url --- 849,853 ---- if match: scheme = match.group(1) ! return scheme.lower(), url[len(scheme) + 1:] return None, url From python-dev@python.org Sat Jul 1 11:52:30 2000 From: python-dev@python.org (Guido van Rossum) Date: Sat, 1 Jul 2000 03:52:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib macpath.py,1.21,1.22 Message-ID: <200007011052.DAA20595@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv20572 Modified Files: macpath.py Log Message: getatime() returned the mtime instead of the atime. Similar to an old bug in ntpath.py. Index: macpath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/macpath.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** macpath.py 2000/02/04 15:10:33 1.21 --- macpath.py 2000/07/01 10:52:26 1.22 *************** *** 115,119 **** """Return the last access time of a file, reported by os.stat().""" st = os.stat(filename) ! return st[ST_MTIME] --- 115,119 ---- """Return the last access time of a file, reported by os.stat().""" st = os.stat(filename) ! return st[ST_ATIME] From python-dev@python.org Sat Jul 1 11:52:52 2000 From: python-dev@python.org (Guido van Rossum) Date: Sat, 1 Jul 2000 03:52:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib dospath.py,1.12,1.13 Message-ID: <200007011052.DAA20668@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv20661 Modified Files: dospath.py Log Message: getatime() returned the mtime instead of the atime. Similar to an old bug in ntpath.py. Index: dospath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dospath.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** dospath.py 2000/02/04 15:39:29 1.12 --- dospath.py 2000/07/01 10:52:49 1.13 *************** *** 132,136 **** """Return the last access time of a file, reported by os.stat().""" st = os.stat(filename) ! return st[stat.ST_MTIME] --- 132,136 ---- """Return the last access time of a file, reported by os.stat().""" st = os.stat(filename) ! return st[stat.ST_ATIME] From python-dev@python.org Sat Jul 1 14:44:07 2000 From: python-dev@python.org (Paul Prescod) Date: Sat, 1 Jul 2000 06:44:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax __init__.py,1.2,1.3 Message-ID: <200007011344.GAA21526@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv21514 Modified Files: __init__.py Log Message: Tightened xml.sax.__init__.py Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/__init__.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** __init__.py 2000/07/01 04:58:47 1.2 --- __init__.py 2000/07/01 13:44:04 1.3 *************** *** 18,27 **** """ ! from handler import * ! from expatreader import * ! from _exceptions import * ! from saxutils import * ! from _exceptions import SAXParseException import xmlreader def parse( filename_or_stream, handler, errorHandler=ErrorHandler() ): --- 18,27 ---- """ ! from handler import ContentHandler, ErrorHandler ! from expatreader import ExpatParser ! from _exceptions import SAXException, SAXNotRecognizedException, \ ! SAXParseException, SAXNotSupportedException import xmlreader + import saxutils def parse( filename_or_stream, handler, errorHandler=ErrorHandler() ): From python-dev@python.org Sat Jul 1 15:31:12 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 1 Jul 2000 07:31:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects object.c,2.79,2.80 Message-ID: <200007011431.HAA30328@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv30087/Objects Modified Files: object.c Log Message: changed repr and str to always convert unicode strings to 8-bit strings, using the default encoding. Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.79 retrieving revision 2.80 diff -C2 -r2.79 -r2.80 *** object.c 2000/07/01 01:00:38 2.79 --- object.c 2000/07/01 14:31:09 2.80 *************** *** 266,269 **** --- 266,277 ---- if (res == NULL) return NULL; + if (PyUnicode_Check(res)) { + PyObject* str; + str = PyUnicode_AsEncodedString(res, NULL, NULL); + if (str) { + Py_DECREF(res); + res = str; + } + } if (!PyString_Check(res)) { PyErr_Format(PyExc_TypeError, *************** *** 303,306 **** --- 311,322 ---- if (res == NULL) return NULL; + if (PyUnicode_Check(res)) { + PyObject* str; + str = PyUnicode_AsEncodedString(res, NULL, NULL); + if (str) { + Py_DECREF(res); + res = str; + } + } if (!PyString_Check(res)) { PyErr_Format(PyExc_TypeError, From python-dev@python.org Sat Jul 1 15:50:23 2000 From: python-dev@python.org (Paul Prescod) Date: Sat, 1 Jul 2000 07:50:23 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_minidom,NONE,1.1 Message-ID: <200007011450.HAA31396@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv31383/output Added Files: test_minidom Log Message: Added minidom tests. --- NEW FILE --- Test Succeeded testAAA Test Succeeded testAAB Test Succeeded testAddAttr Test Succeeded testAppendChild Test Succeeded testAttrListItem Test Succeeded testAttrListItemNS Test Succeeded testAttrListItems Test Succeeded testAttrListKeys Test Succeeded testAttrListKeysNS Test Succeeded testAttrListLength Test Succeeded testAttrListValues Test Succeeded testAttrList__getitem__ Test Succeeded testAttrList__setitem__ Test Succeeded testAttributeRepr Test Succeeded testChangeAttr Test Succeeded testChildNodes Test Succeeded testCloneAttributeDeep Test Succeeded testCloneAttributeShallow Test Succeeded testCloneDocumentDeep Test Succeeded testCloneDocumentShallow Test Succeeded testCloneElementDeep Test Succeeded testCloneElementShallow Test Succeeded testCloneElementShallowCopiesAttributes Test Succeeded testClonePIDeep Test Succeeded testClonePIShallow Test Succeeded testComment Test Succeeded testCreatAttributeNS Test Succeeded testCreateElementNS Test Succeeded testDeleteAttr Test Succeeded testDocumentElement Test Succeeded testElement Test Succeeded testElementReprAndStr Test Succeeded testFirstChild Test Succeeded testGetAttrLength Test Succeeded testGetAttrList Test Succeeded testGetAttrValues Test Succeeded testGetAttribute Test Succeeded testGetAttributeNS Test Succeeded testGetAttributeNode Test Succeeded testGetElementsByTagName Test Succeeded testGetElementsByTagNameNS Test Succeeded testGetEmptyNodeListFromElementsByTagNameNS Test Succeeded testHasChildNodes Test Succeeded testInsertBefore Test Succeeded testNonZero Test Succeeded testParse Test Succeeded testParseAttributeNamespaces Test Succeeded testParseAttributes Test Succeeded testParseElement Test Succeeded testParseElementNamespaces Test Succeeded testParseProcessingInstructions Test Succeeded testParseString Test Succeeded testProcessingInstruction Test Succeeded testProcessingInstructionRepr Test Succeeded testRemoveAttr Test Succeeded testRemoveAttrNS Test Succeeded testRemoveAttributeNode Test Succeeded testSetAttrValueandNodeValue Test Succeeded testTextNodeRepr Test Succeeded testTextRepr Test Succeeded testTooManyDocumentElements Test Succeeded testUnlink Test Succeeded testWriteText Test Succeeded testWriteXML From python-dev@python.org Sat Jul 1 15:50:23 2000 From: python-dev@python.org (Paul Prescod) Date: Sat, 1 Jul 2000 07:50:23 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_minidom.py,NONE,1.1 Message-ID: <200007011450.HAA31393@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv31383 Added Files: test_minidom.py Log Message: Added minidom tests. --- NEW FILE --- from xml.dom.minidom import parse, Node, Document, parseString import traceback, sys tstfile="test.xml" Node._debug=1 def testGetElementsByTagName( ): dom=parse( tstfile ) assert dom.getElementsByTagName( "LI" )==\ dom.documentElement.getElementsByTagName( "LI" ) dom.unlink() dom=None assert( len( Node.allnodes ))==0 def testInsertBefore( ): dom=parse( tstfile ) docel=dom.documentElement #docel.insertBefore( dom.createProcessingInstruction("a", "b"), # docel.childNodes[1]) #docel.insertBefore( dom.createProcessingInstruction("a", "b"), # docel.childNodes[0]) #assert docel.childNodes[0].target=="a" #assert docel.childNodes[2].target=="a" dom.unlink() del dom del docel assert( len( Node.allnodes ))==0 def testAppendChild(): dom=parse( tstfile ) dom.documentElement.appendChild( dom.createComment( u"Hello" )) assert dom.documentElement.childNodes[-1].nodeName=="#comment" assert dom.documentElement.childNodes[-1].data=="Hello" dom.unlink() dom=None assert( len( Node.allnodes ))==0 def testNonZero(): dom=parse( tstfile ) assert dom # should not be zero dom.appendChild( dom.createComment( "foo" ) ) assert not dom.childNodes[-1].childNodes dom.unlink() dom=None assert( len( Node.allnodes ))==0 def testUnlink(): dom=parse( tstfile ) dom.unlink() dom=None assert( len( Node.allnodes ))==0 def testElement(): dom=Document() dom.appendChild( dom.createElement( "abc" ) ) assert dom.documentElement dom.unlink() dom=None assert( len( Node.allnodes ))==0 def testAAA(): dom=parseString( "" ) el=dom.documentElement el.setAttribute( "spam", "jam2" ) dom.unlink() dom=None def testAAB(): dom=parseString( "" ) el=dom.documentElement el.setAttribute( "spam", "jam" ) el.setAttribute( "spam", "jam2" ) dom.unlink() dom=None def testAddAttr(): dom=Document() child=dom.appendChild( dom.createElement( "abc" ) ) child.setAttribute( "def", "ghi" ) assert child.getAttribute( "def" )=="ghi" assert child.attributes["def"].value=="ghi" child.setAttribute( "jkl", "mno" ) assert child.getAttribute( "jkl" )=="mno" assert child.attributes["jkl"].value=="mno" assert len( child.attributes )==2 child.setAttribute( "def", "newval" ) assert child.getAttribute( "def" )=="newval" assert child.attributes["def"].value=="newval" assert len( child.attributes )==2 dom.unlink() dom=None child=None def testDeleteAttr(): dom=Document() child=dom.appendChild( dom.createElement( "abc" ) ) assert len( child.attributes)==0 child.setAttribute( "def", "ghi" ) assert len( child.attributes)==1 del child.attributes["def"] assert len( child.attributes)==0 dom.unlink() assert( len( Node.allnodes ))==0 def testRemoveAttr(): dom=Document() child=dom.appendChild( dom.createElement( "abc" ) ) child.setAttribute( "def", "ghi" ) assert len( child.attributes)==1 child.removeAttribute("def" ) assert len( child.attributes)==0 dom.unlink() def testRemoveAttrNS(): dom=Document() child=dom.appendChild( dom.createElementNS( "http://www.python.org", "python:abc" ) ) child.setAttributeNS( "http://www.w3.org", "xmlns:python", "http://www.python.org" ) child.setAttributeNS( "http://www.python.org", "python:abcattr", "foo" ) assert len( child.attributes )==2 child.removeAttributeNS( "http://www.python.org", "abcattr" ) assert len( child.attributes )==1 dom.unlink() dom=None def testRemoveAttributeNode(): dom=Document() child=dom.appendChild( dom.createElement( "foo" ) ) child.setAttribute( "spam", "jam" ) assert len( child.attributes )==1 node=child.getAttributeNode( "spam" ) child.removeAttributeNode( node ) assert len( child.attributes )==0 dom.unlink() dom=None assert len( Node.allnodes )==0 def testChangeAttr(): dom=parseString( "" ) el=dom.documentElement el.setAttribute( "spam", "jam" ) assert len( el.attributes )==1 el.setAttribute( "spam", "bam" ) assert len( el.attributes )==1 el.attributes["spam"]="ham" assert len( el.attributes )==1 el.setAttribute( "spam2", "bam" ) assert len( el.attributes )==2 el.attributes[ "spam2"]= "bam2" assert len( el.attributes )==2 dom.unlink() dom=None assert len( Node.allnodes )==0 def testGetAttrList(): pass def testGetAttrValues(): pass def testGetAttrLength(): pass def testGetAttribute(): pass def testGetAttributeNS(): pass def testGetAttributeNode(): pass def testGetElementsByTagNameNS(): pass def testGetEmptyNodeListFromElementsByTagNameNS(): pass def testElementReprAndStr(): dom=Document() el=dom.appendChild( dom.createElement( "abc" ) ) string1=repr( el ) string2=str( el ) assert string1==string2 dom.unlink() # commented out until Fredrick's fix is checked in def _testElementReprAndStrUnicode(): dom=Document() el=dom.appendChild( dom.createElement( u"abc" ) ) string1=repr( el ) string2=str( el ) assert string1==string2 dom.unlink() # commented out until Fredrick's fix is checked in def _testElementReprAndStrUnicodeNS(): dom=Document() el=dom.appendChild( dom.createElementNS( u"http://www.slashdot.org", u"slash:abc" )) string1=repr( el ) string2=str( el ) assert string1==string2 assert string1.find("slash:abc" )!=-1 dom.unlink() def testAttributeRepr(): dom=Document() el=dom.appendChild( dom.createElement( u"abc" ) ) node=el.setAttribute( "abc", "def" ) assert str( node ) == repr( node ) dom.unlink() def testTextNodeRepr(): pass def testWriteXML(): pass def testProcessingInstruction(): pass def testProcessingInstructionRepr(): pass def testTextRepr(): pass def testWriteText(): pass def testDocumentElement(): pass def testTooManyDocumentElements(): pass def testCreateElementNS(): pass def testCreatAttributeNS(): pass def testParse(): pass def testParseString(): pass def testComment(): pass def testAttrListItem(): pass def testAttrListItems(): pass def testAttrListItemNS(): pass def testAttrListKeys(): pass def testAttrListKeysNS(): pass def testAttrListValues(): pass def testAttrListLength(): pass def testAttrList__getitem__(): pass def testAttrList__setitem__(): pass def testSetAttrValueandNodeValue(): pass def testParseElement(): pass def testParseAttributes(): pass def testParseElementNamespaces(): pass def testParseAttributeNamespaces(): pass def testParseProcessingInstructions(): pass def testChildNodes(): pass def testFirstChild(): pass def testHasChildNodes(): pass def testCloneElementShallow(): pass def testCloneElementShallowCopiesAttributes(): pass def testCloneElementDeep(): pass def testCloneDocumentShallow(): pass def testCloneDocumentDeep(): pass def testCloneAttributeShallow(): pass def testCloneAttributeDeep(): pass def testClonePIShallow(): pass def testClonePIDeep(): pass names=globals().keys() names.sort() for name in names: if name.startswith( "test" ): func=globals()[name] try: func() print "Test Succeeded", name if len( Node.allnodes ): print "Garbage left over:" print Node.allnodes.items()[0:10] Node.allnodes={} except Exception, e : print "Test Failed: ", name apply( traceback.print_exception, sys.exc_info() ) print `e` Node.allnodes={} raise From python-dev@python.org Sat Jul 1 15:54:18 2000 From: python-dev@python.org (Paul Prescod) Date: Sat, 1 Jul 2000 07:54:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test.xml,NONE,1.1 Message-ID: <200007011454.HAA31638@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv31632 Added Files: test.xml Log Message: Added minidom tests. --- NEW FILE --- Introduction to XSL

      Introduction to XSL


      Overview

      • 1.Intro
      • 2.History
      • 3.XSL Basics
      • Lunch
      • 4.An XML Data Model
      • 5.XSL Patterns
      • 6.XSL Templates
      • 7.XSL Formatting Model

      Intro

      • Who am I?
      • Who are you?
      • Why are we here?

      History: XML and SGML

      • XML is a subset of SGML.
      • SGML allows the separation of abstract content from formatting.
      • Also one of XML's primary virtues (in the doc publishing domain).

      History: What are stylesheets?

      • Stylesheets specify the formatting of SGML/XML documents.
      • Stylesheets put the "style" back into documents.
      • New York Times content+NYT Stylesheet = NYT paper

      History: FOSI

      • FOSI: "Formatted Output Specification Instance"
        • MIL-STD-28001
        • FOSI's are SGML documents
        • A stylesheet for another document
      • Obsolete but implemented...
      From python-dev@python.org Sat Jul 1 18:43:22 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 1 Jul 2000 10:43:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libnntplib.tex,1.24,1.25 Message-ID: <200007011743.KAA25562@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv25554/Doc/lib Modified Files: libnntplib.tex Log Message: Send a "ARTICLE" --> Send an "ARTICLE" Usage error noted by Grant Griffin . Index: libnntplib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libnntplib.tex,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** libnntplib.tex 2000/02/10 20:26:45 1.24 --- libnntplib.tex 2000/07/01 17:43:19 1.25 *************** *** 204,208 **** \begin{methoddesc}{article}{id} ! Send a \samp{ARTICLE} command, where \var{id} has the same meaning as for \method{stat()}. Return as for \method{head()}. \end{methoddesc} --- 204,208 ---- \begin{methoddesc}{article}{id} ! Send an \samp{ARTICLE} command, where \var{id} has the same meaning as for \method{stat()}. Return as for \method{head()}. \end{methoddesc} From python-dev@python.org Sat Jul 1 18:47:40 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 1 Jul 2000 10:47:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libpickle.tex,1.25,1.26 Message-ID: <200007011747.KAA25745@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv25737/Doc/lib Modified Files: libpickle.tex Log Message: others --> other's (possessive) Usage error noted by Grant Griffin . Index: libpickle.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpickle.tex,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** libpickle.tex 2000/04/06 15:04:30 1.25 --- libpickle.tex 2000/07/01 17:47:38 1.26 *************** *** 387,389 **** certain objects, it's possible that the two modules produce different pickled data for the same input objects; however they will always be ! able to read each others pickles back in.) --- 387,389 ---- certain objects, it's possible that the two modules produce different pickled data for the same input objects; however they will always be ! able to read each other's pickles back in.) From python-dev@python.org Sat Jul 1 18:51:06 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 1 Jul 2000 10:51:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.17,2.18 Message-ID: <200007011751.KAA25898@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv25808/Modules Modified Files: _sre.c Log Message: today's SRE update: -- changed 1.6 to 2.0 in the file headers -- fixed ISALNUM macro for the unicode locale. this solution isn't perfect, but the best I can do with Python's current unicode database. Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** _sre.c 2000/06/30 21:40:20 2.17 --- _sre.c 2000/07/01 17:50:59 2.18 *************** *** 26,30 **** * * Portions of this engine have been developed in cooperation with ! * CNRI. Hewlett-Packard provided funding for 1.6 integration and * other compatibility work. */ --- 26,30 ---- * * Portions of this engine have been developed in cooperation with ! * CNRI. Hewlett-Packard provided funding for 2.0 integration and * other compatibility work. */ *************** *** 53,57 **** #if PY_VERSION_HEX >= 0x01060000 ! /* defining this enables unicode support (default under 1.6) */ #define HAVE_UNICODE #endif --- 53,57 ---- #if PY_VERSION_HEX >= 0x01060000 ! /* defining this enables unicode support (default under 1.6a1 and later) */ #define HAVE_UNICODE #endif *************** *** 144,152 **** return (unsigned int) Py_UNICODE_TOLOWER((Py_UNICODE)(ch)); } ! #define SRE_UNI_TO_LOWER(ch) Py_UNICODE_TOLOWER((Py_UNICODE)(ch)) #define SRE_UNI_IS_DIGIT(ch) Py_UNICODE_ISDIGIT((Py_UNICODE)(ch)) #define SRE_UNI_IS_SPACE(ch) Py_UNICODE_ISSPACE((Py_UNICODE)(ch)) #define SRE_UNI_IS_LINEBREAK(ch) Py_UNICODE_ISLINEBREAK((Py_UNICODE)(ch)) ! #define SRE_UNI_IS_ALNUM(ch) ((ch) < 256 ? isalnum((ch)) : 0) #define SRE_UNI_IS_WORD(ch) (SRE_IS_ALNUM((ch)) || (ch) == '_') #endif --- 144,159 ---- return (unsigned int) Py_UNICODE_TOLOWER((Py_UNICODE)(ch)); } ! ! #if !defined(Py_UNICODE_ISALNUM) ! /* FIXME: workaround. should be fixed in unicodectype.c */ ! #define Py_UNICODE_ISALNUM(ch)\ ! (Py_UNICODE_ISLOWER(ch) || Py_UNICODE_ISUPPER(ch) ||\ ! Py_UNICODE_ISTITLE(ch) || Py_UNICODE_ISDIGIT(ch)) ! #endif ! #define SRE_UNI_IS_DIGIT(ch) Py_UNICODE_ISDIGIT((Py_UNICODE)(ch)) #define SRE_UNI_IS_SPACE(ch) Py_UNICODE_ISSPACE((Py_UNICODE)(ch)) #define SRE_UNI_IS_LINEBREAK(ch) Py_UNICODE_ISLINEBREAK((Py_UNICODE)(ch)) ! #define SRE_UNI_IS_ALNUM(ch) Py_UNICODE_ISALNUM((Py_UNICODE)(ch)) #define SRE_UNI_IS_WORD(ch) (SRE_IS_ALNUM((ch)) || (ch) == '_') #endif From python-dev@python.org Sat Jul 1 18:51:06 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 1 Jul 2000 10:51:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre.py,1.17,1.18 sre_compile.py,1.18,1.19 sre_constants.py,1.12,1.13 sre_parse.py,1.18,1.19 Message-ID: <200007011751.KAA25902@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv25808/Lib Modified Files: sre.py sre_compile.py sre_constants.py sre_parse.py Log Message: today's SRE update: -- changed 1.6 to 2.0 in the file headers -- fixed ISALNUM macro for the unicode locale. this solution isn't perfect, but the best I can do with Python's current unicode database. Index: sre.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** sre.py 2000/06/30 13:55:14 1.17 --- sre.py 2000/07/01 17:50:59 1.18 *************** *** 7,11 **** # # Portions of this engine have been developed in cooperation with ! # CNRI. Hewlett-Packard provided funding for 1.6 integration and # other compatibility work. # --- 7,11 ---- # # Portions of this engine have been developed in cooperation with ! # CNRI. Hewlett-Packard provided funding for 2.0 integration and # other compatibility work. # Index: sre_compile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** sre_compile.py 2000/06/30 22:37:31 1.18 --- sre_compile.py 2000/07/01 17:50:59 1.19 *************** *** 7,11 **** # # Portions of this engine have been developed in cooperation with ! # CNRI. Hewlett-Packard provided funding for 1.6 integration and # other compatibility work. # --- 7,11 ---- # # Portions of this engine have been developed in cooperation with ! # CNRI. Hewlett-Packard provided funding for 2.0 integration and # other compatibility work. # Index: sre_constants.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_constants.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** sre_constants.py 2000/06/30 10:41:30 1.12 --- sre_constants.py 2000/07/01 17:50:59 1.13 *************** *** 8,12 **** # # Portions of this engine have been developed in cooperation with ! # CNRI. Hewlett-Packard provided funding for 1.6 integration and # other compatibility work. # --- 8,12 ---- # # Portions of this engine have been developed in cooperation with ! # CNRI. Hewlett-Packard provided funding for 2.0 integration and # other compatibility work. # Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** sre_parse.py 2000/06/30 22:37:31 1.18 --- sre_parse.py 2000/07/01 17:50:59 1.19 *************** *** 7,11 **** # # Portions of this engine have been developed in cooperation with ! # CNRI. Hewlett-Packard provided funding for 1.6 integration and # other compatibility work. # --- 7,11 ---- # # Portions of this engine have been developed in cooperation with ! # CNRI. Hewlett-Packard provided funding for 2.0 integration and # other compatibility work. # From python-dev@python.org Sat Jul 1 20:17:46 2000 From: python-dev@python.org (Paul Prescod) Date: Sat, 1 Jul 2000 12:17:46 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_minidom,1.1,1.2 Message-ID: <200007011917.MAA10073@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv10064 Modified Files: test_minidom Log Message: Fixed test output Index: test_minidom =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_minidom,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_minidom 2000/07/01 14:50:21 1.1 --- test_minidom 2000/07/01 19:17:43 1.2 *************** *** 1,2 **** --- 1,3 ---- + test_minidom Test Succeeded testAAA Test Succeeded testAAB From python-dev@python.org Sat Jul 1 20:19:34 2000 From: python-dev@python.org (Paul Prescod) Date: Sat, 1 Jul 2000 12:19:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax saxutils.py,1.1,1.2 Message-ID: <200007011919.MAA10146@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv10136 Modified Files: saxutils.py Log Message: Removed unncessary dependency. Index: saxutils.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/saxutils.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** saxutils.py 2000/06/29 19:34:54 1.1 --- saxutils.py 2000/07/01 19:19:32 1.2 *************** *** 6,10 **** """ ! import types, string, sys, urllib import handler --- 6,10 ---- """ ! import types, string, sys import handler From python-dev@python.org Sat Jul 1 20:21:50 2000 From: python-dev@python.org (Paul Prescod) Date: Sat, 1 Jul 2000 12:21:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/dom minidom.py,1.2,1.3 Message-ID: <200007011921.MAA10240@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv10231 Modified Files: minidom.py Log Message: Misc fixes and improvements. Index: minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/minidom.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** minidom.py 2000/07/01 04:58:47 1.2 --- minidom.py 2000/07/01 19:21:47 1.3 *************** *** 41,45 **** Node.allnodes[index]=repr( self.__dict__ ) if Node.debug==None: ! Node.debug=open( "debug4.out", "w" ) Node.debug.write( "create %s\n"%index ) --- 41,46 ---- Node.allnodes[index]=repr( self.__dict__ ) if Node.debug==None: ! Node.debug=StringIO() ! #open( "debug4.out", "w" ) Node.debug.write( "create %s\n"%index ) *************** *** 217,227 **** #FIXME: is it appropriate to return .value? def __getitem__( self, attname_or_tuple ): ! if type( attname_or_tuple ) == type( () ): return self._attrsNS[attname_or_tuple] else: return self._attrs[attname_or_tuple] ! def __setitem__( self, attname ): ! raise TypeError, "object does not support item assignment" def __delitem__( self, attname_or_tuple ): --- 218,239 ---- #FIXME: is it appropriate to return .value? def __getitem__( self, attname_or_tuple ): ! if type( attname_or_tuple ) == types.TupleType: return self._attrsNS[attname_or_tuple] else: return self._attrs[attname_or_tuple] ! # same as set ! def __setitem__( self, attname, value ): ! if type( value ) == types.StringType: ! node=Attr( attname ) ! node.value=value ! else: ! assert isinstance( value, Attr ) or type( value )==types.StringType ! node=value ! old=self._attrs.get( attname, None) ! if old: ! old.unlink() ! self._attrs[node.name]=node ! self._attrsNS[(node.namespaceURI,node.localName)]=node def __delitem__( self, attname_or_tuple ): From python-dev@python.org Sat Jul 1 21:38:30 2000 From: python-dev@python.org (Tim Peters) Date: Sat, 1 Jul 2000 13:38:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild readme.txt,1.9,1.10 Message-ID: <200007012038.NAA20714@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv20693/python/dist/src/PCbuild Modified Files: readme.txt Log Message: Typo repair. Index: readme.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/readme.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** readme.txt 2000/07/01 03:46:38 1.9 --- readme.txt 2000/07/01 20:38:27 1.10 *************** *** 92,96 **** ! YOUR OWN EXTENSION DDLs ----------------------- If you want to create your own extension module DLL, there's an example --- 92,96 ---- ! YOUR OWN EXTENSION DLLs ----------------------- If you want to create your own extension module DLL, there's an example From python-dev@python.org Sat Jul 1 21:57:05 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 1 Jul 2000 13:57:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-win winreg.py,1.2,1.3 Message-ID: <200007012057.NAA21601@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/plat-win In directory slayer.i.sourceforge.net:/tmp/cvs-serv21594/Lib/plat-win Modified Files: winreg.py Log Message: test(): Removed; regression test is in test.test_winreg2, not testreg. Index: winreg.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/plat-win/winreg.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** winreg.py 2000/06/30 20:31:39 1.2 --- winreg.py 2000/07/01 20:57:03 1.3 *************** *** 304,309 **** "REG_OPTION_CREATE_LINK"] - def test(): - import testreg #unusednames=_RegNotifyChangeKeyValueOptions+_RegRestoreKeyOptions+_RegCreateKeyExOptions --- 304,307 ---- From python-dev@python.org Sun Jul 2 00:49:16 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 1 Jul 2000 16:49:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre_parse.py,1.19,1.20 Message-ID: <200007012349.QAA15984@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv15852/Lib Modified Files: sre_parse.py Log Message: - fixed "{ in any other context" bug - minor comment touchups in the C module Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** sre_parse.py 2000/07/01 17:50:59 1.19 --- sre_parse.py 2000/07/01 23:49:14 1.20 *************** *** 143,152 **** class Tokenizer: def __init__(self, string): - self.index = 0 self.string = string ! self.next = self.__next() def __next(self): if self.index >= len(self.string): ! return None char = self.string[self.index] if char[0] == "\\": --- 143,153 ---- class Tokenizer: def __init__(self, string): self.string = string ! self.index = 0 ! self.__next() def __next(self): if self.index >= len(self.string): ! self.next = None ! return char = self.string[self.index] if char[0] == "\\": *************** *** 157,175 **** char = char + c self.index = self.index + len(char) ! return char def match(self, char): if char == self.next: ! self.next = self.__next() ! return 1 ! return 0 ! def match_set(self, set): ! if self.next and self.next in set: ! self.next = self.__next() return 1 return 0 def get(self): this = self.next ! self.next = self.__next() return this def isident(char): --- 158,175 ---- char = char + c self.index = self.index + len(char) ! self.next = char def match(self, char): if char == self.next: ! self.__next() return 1 return 0 def get(self): this = self.next ! self.__next() return this + def tell(self): + return self.index, self.next + def seek(self, index): + self.index, self.next = index def isident(char): *************** *** 382,385 **** --- 382,386 ---- min, max = 1, MAXREPEAT elif this == "{": + here = source.tell() min, max = 0, MAXREPEAT lo = hi = "" *************** *** 392,396 **** hi = lo if not source.match("}"): ! raise error, "bogus range" if lo: min = int(lo) --- 393,399 ---- hi = lo if not source.match("}"): ! subpattern.append((LITERAL, ord(this))) ! source.seek(here) ! continue if lo: min = int(lo) From python-dev@python.org Sun Jul 2 00:49:16 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 1 Jul 2000 16:49:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.18,2.19 Message-ID: <200007012349.QAA15988@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv15852/Modules Modified Files: _sre.c Log Message: - fixed "{ in any other context" bug - minor comment touchups in the C module Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** _sre.c 2000/07/01 17:50:59 2.18 --- _sre.c 2000/07/01 23:49:14 2.19 *************** *** 20,24 **** * 00-06-28 fl fixed findall (0.9.1) * 00-06-29 fl fixed split, added more scanner features (0.9.2) ! * 00-06-30 fl tuning, fast search (0.9.3) * 00-06-30 fl added assert (lookahead) primitives, etc (0.9.4) * --- 20,24 ---- * 00-06-28 fl fixed findall (0.9.1) * 00-06-29 fl fixed split, added more scanner features (0.9.2) ! * 00-06-30 fl added fast search optimization (0.9.3) * 00-06-30 fl added assert (lookahead) primitives, etc (0.9.4) * *************** *** 366,369 **** --- 366,370 ---- case SRE_OP_LITERAL: + /* args: */ if (ch == set[0]) return ok; *************** *** 372,375 **** --- 373,377 ---- case SRE_OP_RANGE: + /* args: */ if (set[0] <= ch && ch <= set[1]) return ok; *************** *** 378,381 **** --- 380,384 ---- case SRE_OP_CATEGORY: + /* args: */ if (sre_category(set[0], (int) ch)) return ok; From python-dev@python.org Sun Jul 2 13:00:09 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 2 Jul 2000 05:00:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.19,2.20 sre_constants.h,2.5,2.6 Message-ID: <200007021200.FAA11452@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv10442/Modules Modified Files: _sre.c sre_constants.h Log Message: -- use charset bitmaps where appropriate. this gives a 5-10% speedup for some tests, including the python tokenizer. -- added support for an optional charset anchor to the engine (currently unused by the code generator). -- removed workaround for array module bug. Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** _sre.c 2000/07/01 23:49:14 2.19 --- _sre.c 2000/07/02 12:00:07 2.20 *************** *** 379,382 **** --- 379,389 ---- break; + case SRE_OP_CHARSET: + /* args: (16 bits per code word) */ + if (ch < 256 && (set[ch >> 4] & (1 << (ch & 15)))) + return ok; + set += 16; + break; + case SRE_OP_CATEGORY: /* args: */ *************** *** 953,979 **** SRE_CHAR* end = state->end; int status = 0; ! int prefix_len = 0; ! SRE_CODE* prefix; ! SRE_CODE* overlap; ! int literal = 0; if (pattern[0] == SRE_OP_INFO) { /* optimization info block */ ! /* args: <1=skip> <2=flags> <3=min> <4=max> <5=prefix> <6=data...> */ if (pattern[3] > 0) { /* adjust end point (but make sure we leave at least one ! character in there) */ end -= pattern[3]-1; if (end <= ptr) end = ptr+1; } - - literal = pattern[2]; - - prefix = pattern + 6; - prefix_len = pattern[5]; ! overlap = prefix + prefix_len - 1; pattern += 1 + pattern[1]; --- 960,989 ---- SRE_CHAR* end = state->end; int status = 0; ! int prefix_len; ! SRE_CODE* prefix = NULL; ! SRE_CODE* charset = NULL; ! SRE_CODE* overlap = NULL; ! int flags = 0; if (pattern[0] == SRE_OP_INFO) { /* optimization info block */ ! /* args: <1=skip> <2=flags> <3=min> <4=max> <5=prefix info> */ ! ! flags = pattern[2]; if (pattern[3] > 0) { /* adjust end point (but make sure we leave at least one ! character in there, so literal search will work) */ end -= pattern[3]-1; if (end <= ptr) end = ptr+1; } ! if (flags & SRE_INFO_PREFIX) { ! prefix_len = pattern[5]; ! prefix = pattern + 6; ! overlap = prefix + prefix_len - 1; ! } else if (flags & SRE_INFO_CHARSET) ! charset = pattern + 5; pattern += 1 + pattern[1]; *************** *** 981,985 **** #if defined(USE_FAST_SEARCH) ! if (prefix_len > 1) { /* pattern starts with a known prefix. use the overlap table to skip forward as fast as we possibly can */ --- 991,995 ---- #if defined(USE_FAST_SEARCH) ! if (prefix && overlap && prefix_len > 1) { /* pattern starts with a known prefix. use the overlap table to skip forward as fast as we possibly can */ *************** *** 999,1004 **** state->start = ptr - prefix_len + 1; state->ptr = ptr + 1; ! if (literal) ! return 1; /* all of it */ status = SRE_MATCH(state, pattern + 2*prefix_len); if (status != 0) --- 1009,1014 ---- state->start = ptr - prefix_len + 1; state->ptr = ptr + 1; ! if (flags & SRE_INFO_LITERAL) ! return 1; /* we got all of it */ status = SRE_MATCH(state, pattern + 2*prefix_len); if (status != 0) *************** *** 1017,1023 **** #endif ! if (pattern[0] == SRE_OP_LITERAL) { ! /* pattern starts with a literal character. this is used for ! short prefixes, and if fast search is disabled*/ SRE_CODE chr = pattern[1]; for (;;) { --- 1027,1033 ---- #endif ! if (pattern[0] == SRE_OP_LITERAL) { ! /* pattern starts with a literal character. this is used ! for short prefixes, and if fast search is disabled */ SRE_CODE chr = pattern[1]; for (;;) { *************** *** 1033,1036 **** --- 1043,1062 ---- break; } + #if 0 + } else if (charset) { + /* pattern starts with a character from a known set */ + for (;;) { + while (ptr < end && !SRE_MEMBER(charset, ptr[0])) + ptr++; + if (ptr == end) + return 0; + TRACE(("%8d: === SEARCH === charset\n", PTR(ptr))); + state->start = ptr; + state->ptr = ptr; + status = SRE_MATCH(state, pattern); + if (status != 0) + break; + } + #endif } else /* general case */ *************** *** 1045,1048 **** --- 1071,1075 ---- return status; } + #if !defined(SRE_RECURSIVE) Index: sre_constants.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sre_constants.h,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** sre_constants.h 2000/06/30 10:41:31 2.5 --- sre_constants.h 2000/07/02 12:00:07 2.6 *************** *** 21,41 **** #define SRE_OP_CALL 7 #define SRE_OP_CATEGORY 8 ! #define SRE_OP_GROUP 9 ! #define SRE_OP_GROUP_IGNORE 10 ! #define SRE_OP_IN 11 ! #define SRE_OP_IN_IGNORE 12 ! #define SRE_OP_INFO 13 ! #define SRE_OP_JUMP 14 ! #define SRE_OP_LITERAL 15 ! #define SRE_OP_LITERAL_IGNORE 16 ! #define SRE_OP_MARK 17 ! #define SRE_OP_MAX_REPEAT 18 ! #define SRE_OP_MAX_REPEAT_ONE 19 ! #define SRE_OP_MIN_REPEAT 20 ! #define SRE_OP_NOT_LITERAL 21 ! #define SRE_OP_NOT_LITERAL_IGNORE 22 ! #define SRE_OP_NEGATE 23 ! #define SRE_OP_RANGE 24 ! #define SRE_OP_REPEAT 25 #define SRE_AT_BEGINNING 0 #define SRE_AT_BEGINNING_LINE 1 --- 21,42 ---- #define SRE_OP_CALL 7 #define SRE_OP_CATEGORY 8 ! #define SRE_OP_CHARSET 9 ! #define SRE_OP_GROUP 10 ! #define SRE_OP_GROUP_IGNORE 11 ! #define SRE_OP_IN 12 ! #define SRE_OP_IN_IGNORE 13 ! #define SRE_OP_INFO 14 ! #define SRE_OP_JUMP 15 ! #define SRE_OP_LITERAL 16 ! #define SRE_OP_LITERAL_IGNORE 17 ! #define SRE_OP_MARK 18 ! #define SRE_OP_MAX_REPEAT 19 ! #define SRE_OP_MAX_REPEAT_ONE 20 ! #define SRE_OP_MIN_REPEAT 21 ! #define SRE_OP_NOT_LITERAL 22 ! #define SRE_OP_NOT_LITERAL_IGNORE 23 ! #define SRE_OP_NEGATE 24 ! #define SRE_OP_RANGE 25 ! #define SRE_OP_REPEAT 26 #define SRE_AT_BEGINNING 0 #define SRE_AT_BEGINNING_LINE 1 *************** *** 69,70 **** --- 70,74 ---- #define SRE_FLAG_UNICODE 32 #define SRE_FLAG_VERBOSE 64 + #define SRE_INFO_PREFIX 1 + #define SRE_INFO_LITERAL 2 + #define SRE_INFO_CHARSET 4 From python-dev@python.org Sun Jul 2 13:00:09 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 2 Jul 2000 05:00:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre_compile.py,1.19,1.20 sre_constants.py,1.13,1.14 sre_parse.py,1.20,1.21 Message-ID: <200007021200.FAA11448@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv10442/Lib Modified Files: sre_compile.py sre_constants.py sre_parse.py Log Message: -- use charset bitmaps where appropriate. this gives a 5-10% speedup for some tests, including the python tokenizer. -- added support for an optional charset anchor to the engine (currently unused by the code generator). -- removed workaround for array module bug. Index: sre_compile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** sre_compile.py 2000/07/01 17:50:59 1.19 --- sre_compile.py 2000/07/02 12:00:06 1.20 *************** *** 17,21 **** # find an array type code that matches the engine's code size ! for WORDSIZE in "BHil": if len(array.array(WORDSIZE, [0]).tostring()) == _sre.getcodesize(): break --- 17,21 ---- # find an array type code that matches the engine's code size ! for WORDSIZE in "Hil": if len(array.array(WORDSIZE, [0]).tostring()) == _sre.getcodesize(): break *************** *** 23,26 **** --- 23,85 ---- raise RuntimeError, "cannot find a useable array type" + MAXCODE = 65535 + + def _charset(charset, fixup): + # internal: optimize character set + out = [] + charmap = [0]*256 + try: + for op, av in charset: + if op is NEGATE: + out.append((op, av)) + elif op is LITERAL: + charmap[fixup(av)] = 1 + elif op is RANGE: + for i in range(fixup(av[0]), fixup(av[1])+1): + charmap[i] = 1 + elif op is CATEGORY: + # FIXME: could append to charmap tail + return charset # cannot compress + except IndexError: + # unicode + return charset + # compress character map + i = p = n = 0 + runs = [] + for c in charmap: + if c: + if n == 0: + p = i + n = n + 1 + elif n: + runs.append((p, n)) + n = 0 + i = i + 1 + if n: + runs.append((p, n)) + if len(runs) <= 2: + # use literal/range + for p, n in runs: + if n == 1: + out.append((LITERAL, p)) + else: + out.append((RANGE, (p, p+n-1))) + if len(out) < len(charset): + return out + else: + # use bitmap + data = [] + m = 1; v = 0 + for c in charmap: + if c: + v = v + m + m = m << 1 + if m > MAXCODE: + data.append(v) + m = 1; v = 0 + out.append((CHARSET, data)) + return out + return charset + def _compile(code, pattern, flags): # internal: compile a (sub)pattern *************** *** 42,46 **** fixup = lambda x: x skip = len(code); emit(0) ! for op, av in av: emit(OPCODES[op]) if op is NEGATE: --- 101,105 ---- fixup = lambda x: x skip = len(code); emit(0) ! for op, av in _charset(av, fixup): emit(OPCODES[op]) if op is NEGATE: *************** *** 51,54 **** --- 110,115 ---- emit(fixup(av[0])) emit(fixup(av[1])) + elif op is CHARSET: + code.extend(av) elif op is CATEGORY: if flags & SRE_FLAG_LOCALE: *************** *** 156,161 **** def _compile_info(code, pattern, flags): # internal: compile an info block. in the current version, ! # this contains min/max pattern width and a literal prefix, ! # if any lo, hi = pattern.getwidth() if lo == 0: --- 217,222 ---- def _compile_info(code, pattern, flags): # internal: compile an info block. in the current version, ! # this contains min/max pattern width, and an optional literal ! # prefix or a character map lo, hi = pattern.getwidth() if lo == 0: *************** *** 163,166 **** --- 224,228 ---- # look for a literal prefix prefix = [] + charset = [] # not used if not (flags & SRE_FLAG_IGNORECASE): for op, av in pattern.data: *************** *** 175,198 **** # literal flag mask = 0 ! if len(prefix) == len(pattern.data): ! mask = 1 emit(mask) # pattern length ! emit(lo) ! if hi < 32768: emit(hi) else: emit(0) # add literal prefix - emit(len(prefix)) if prefix: ! code.extend(prefix) ! # generate overlap table ! table = [-1] + ([0]*len(prefix)) ! for i in range(len(prefix)): ! table[i+1] = table[i]+1 ! while table[i+1] > 0 and prefix[i] != prefix[table[i+1]-1]: ! table[i+1] = table[table[i+1]-1]+1 ! code.extend(table[1:]) # don't store first entry code[skip] = len(code) - skip --- 237,274 ---- # literal flag mask = 0 ! if prefix: ! mask = SRE_INFO_PREFIX ! if len(prefix) == len(pattern.data): ! mask = mask + SRE_INFO_LITERAL ! elif charset: ! mask = mask + SRE_INFO_CHARSET emit(mask) # pattern length ! if lo < MAXCODE: ! emit(lo) ! else: ! emit(MAXCODE) ! prefix = prefix[:MAXCODE] ! if hi < MAXCODE: emit(hi) else: emit(0) # add literal prefix if prefix: ! emit(len(prefix)) ! if prefix: ! code.extend(prefix) ! # generate overlap table ! table = [-1] + ([0]*len(prefix)) ! for i in range(len(prefix)): ! table[i+1] = table[i]+1 ! while table[i+1] > 0 and prefix[i] != prefix[table[i+1]-1]: ! table[i+1] = table[table[i+1]-1]+1 ! code.extend(table[1:]) # don't store first entry ! elif charset: ! for char in charset: ! emit(OPCODES[LITERAL]) ! emit(char) ! emit(OPCODES[FAILURE]) code[skip] = len(code) - skip Index: sre_constants.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_constants.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** sre_constants.py 2000/07/01 17:50:59 1.13 --- sre_constants.py 2000/07/02 12:00:06 1.14 *************** *** 29,32 **** --- 29,33 ---- CALL = "call" CATEGORY = "category" + CHARSET = "charset" GROUP = "group" GROUP_IGNORE = "group_ignore" *************** *** 88,91 **** --- 89,93 ---- CALL, CATEGORY, + CHARSET, GROUP, GROUP_IGNORE, IN, IN_IGNORE, *************** *** 167,177 **** # flags ! SRE_FLAG_TEMPLATE = 1 ! SRE_FLAG_IGNORECASE = 2 ! SRE_FLAG_LOCALE = 4 ! SRE_FLAG_MULTILINE = 8 ! SRE_FLAG_DOTALL = 16 ! SRE_FLAG_UNICODE = 32 ! SRE_FLAG_VERBOSE = 64 if __name__ == "__main__": --- 169,184 ---- # flags ! SRE_FLAG_TEMPLATE = 1 # template mode (disable backtracking) ! SRE_FLAG_IGNORECASE = 2 # case insensitive ! SRE_FLAG_LOCALE = 4 # honour system locale ! SRE_FLAG_MULTILINE = 8 # treat target as multiline string ! SRE_FLAG_DOTALL = 16 # treat target as a single string ! SRE_FLAG_UNICODE = 32 # use unicode locale ! SRE_FLAG_VERBOSE = 64 # ignore whitespace and comments ! ! # flags for INFO primitive ! SRE_INFO_PREFIX = 1 # has prefix ! SRE_INFO_LITERAL = 2 # entire pattern is literal (given by prefix) ! SRE_INFO_CHARSET = 4 # pattern starts with character from given set if __name__ == "__main__": *************** *** 202,205 **** --- 209,213 ---- dump(f, ATCODES, "SRE") dump(f, CHCODES, "SRE") + f.write("#define SRE_FLAG_TEMPLATE %d\n" % SRE_FLAG_TEMPLATE) f.write("#define SRE_FLAG_IGNORECASE %d\n" % SRE_FLAG_IGNORECASE) *************** *** 209,212 **** --- 217,225 ---- f.write("#define SRE_FLAG_UNICODE %d\n" % SRE_FLAG_UNICODE) f.write("#define SRE_FLAG_VERBOSE %d\n" % SRE_FLAG_VERBOSE) + + f.write("#define SRE_INFO_PREFIX %d\n" % SRE_INFO_PREFIX) + f.write("#define SRE_INFO_LITERAL %d\n" % SRE_INFO_LITERAL) + f.write("#define SRE_INFO_CHARSET %d\n" % SRE_INFO_CHARSET) + f.close() print "done" Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** sre_parse.py 2000/07/01 23:49:14 1.20 --- sre_parse.py 2000/07/02 12:00:06 1.21 *************** *** 17,25 **** from sre_constants import * ! # FIXME: should be 65535, but the arraymodule is still broken ! MAXREPEAT = 32767 ! # FIXME: might change in 2.0 final. but for now, this seems ! # to be the best way to be compatible with 1.5.2 CHARMASK = 0xff --- 17,24 ---- from sre_constants import * ! MAXREPEAT = 65535 ! # FIXME: the following might change in 2.0 final. but for now, this ! # seems to be the best way to be compatible with 1.5.2 CHARMASK = 0xff From python-dev@python.org Sun Jul 2 14:52:24 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 2 Jul 2000 06:52:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml __init__.py,1.2,1.3 Message-ID: <200007021352.GAA28307@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml In directory slayer.i.sourceforge.net:/tmp/cvs-serv28300 Modified Files: __init__.py Log Message: Typo (mine): Garsholm --> Garshol Noted by Rob Hooft . Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/__init__.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** __init__.py 2000/07/01 04:58:46 1.2 --- __init__.py 2000/07/02 13:52:21 1.3 *************** *** 9,13 **** sax -- The Simple API for XML, developed by XML-Dev, led by David ! Megginson and ported to Python by Lars Marius Garsholm. This supports the SAX 2 API. """ --- 9,13 ---- sax -- The Simple API for XML, developed by XML-Dev, led by David ! Megginson and ported to Python by Lars Marius Garshol. This supports the SAX 2 API. """ From python-dev@python.org Sun Jul 2 18:33:30 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 2 Jul 2000 10:33:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.20,2.21 sre.h,2.10,2.11 sre_constants.h,2.6,2.7 Message-ID: <200007021733.KAA31666@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv31347/Modules Modified Files: _sre.c sre.h sre_constants.h Log Message: - actually enabled charset anchors in the engine (still not used by the code generator) - changed max repeat value in engine (to match earlier array fix) - added experimental "which part matched?" mechanism to sre; see http://hem.passagen.se/eff/2000_07_01_bot-archive.htm#416954 or python-dev for details. Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** _sre.c 2000/07/02 12:00:07 2.20 --- _sre.c 2000/07/02 17:33:27 2.21 *************** *** 22,25 **** --- 22,26 ---- * 00-06-30 fl added fast search optimization (0.9.3) * 00-06-30 fl added assert (lookahead) primitives, etc (0.9.4) + * 00-07-02 fl added charset optimizations, etc (0.9.5) * * Copyright (c) 1997-2000 by Secret Labs AB. All rights reserved. *************** *** 32,36 **** #ifndef SRE_RECURSIVE ! char copyright[] = " SRE 0.9.4 Copyright (c) 1997-2000 by Secret Labs AB "; #include "Python.h" --- 33,37 ---- #ifndef SRE_RECURSIVE ! char copyright[] = " SRE 0.9.5 Copyright (c) 1997-2000 by Secret Labs AB "; #include "Python.h" *************** *** 588,591 **** --- 589,600 ---- break; + case SRE_OP_INDEX: + /* set index */ + /* args: */ + TRACE(("%8d: set index %d\n", PTR(ptr), pattern[0])); + state->index = pattern[0]; + pattern++; + break; + case SRE_OP_JUMP: case SRE_OP_INFO: *************** *** 811,815 **** points to the stack */ ! while (pattern[2] == 32767 || count < (int) pattern[2]) { state->stackbase = stack; i = SRE_MATCH(state, pattern + 3); --- 820,824 ---- points to the stack */ ! while (pattern[2] == 65535 || count < (int) pattern[2]) { state->stackbase = stack; i = SRE_MATCH(state, pattern + 3); *************** *** 981,988 **** --- 990,999 ---- if (flags & SRE_INFO_PREFIX) { + /* pattern starts with a known prefix */ prefix_len = pattern[5]; prefix = pattern + 6; overlap = prefix + prefix_len - 1; } else if (flags & SRE_INFO_CHARSET) + /* pattern starts with a character from a known set */ charset = pattern + 5; *************** *** 1043,1047 **** break; } - #if 0 } else if (charset) { /* pattern starts with a character from a known set */ --- 1054,1057 ---- *************** *** 1058,1062 **** break; } - #endif } else /* general case */ --- 1068,1071 ---- *************** *** 1205,1208 **** --- 1214,1219 ---- state->mark[i] = NULL; + state->index = -1; + state->stack = NULL; state->stackbase = 0; *************** *** 1287,1290 **** --- 1298,1303 ---- match->mark[j+2] = match->mark[j+3] = -1; /* undefined */ + match->index = state->index; + return (PyObject*) match; *************** *** 1887,1890 **** --- 1900,1912 ---- if (!strcmp(name, "endpos")) return Py_BuildValue("i", 0); /* FIXME */ + + if (!strcmp(name, "index")) { + /* experimental */ + if (self->index < 0) { + Py_INCREF(Py_None); + return Py_None; + } else + return Py_BuildValue("i", self->index); + } PyErr_SetString(PyExc_AttributeError, name); Index: sre.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sre.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** sre.h 2000/06/29 18:03:25 2.10 --- sre.h 2000/07/02 17:33:27 2.11 *************** *** 34,37 **** --- 34,38 ---- PyObject* string; /* link to the target string */ PatternObject* pattern; /* link to the regex (pattern) object */ + int index; /* last index marker seen by the engine (-1 if none) */ int groups; /* number of groups (start/end marks) */ int mark[2]; *************** *** 58,61 **** --- 59,63 ---- int charsize; /* registers */ + int index; int lastmark; void* mark[SRE_MARK_SIZE]; Index: sre_constants.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sre_constants.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** sre_constants.h 2000/07/02 12:00:07 2.6 --- sre_constants.h 2000/07/02 17:33:27 2.7 *************** *** 24,42 **** #define SRE_OP_GROUP 10 #define SRE_OP_GROUP_IGNORE 11 ! #define SRE_OP_IN 12 ! #define SRE_OP_IN_IGNORE 13 ! #define SRE_OP_INFO 14 ! #define SRE_OP_JUMP 15 ! #define SRE_OP_LITERAL 16 ! #define SRE_OP_LITERAL_IGNORE 17 ! #define SRE_OP_MARK 18 ! #define SRE_OP_MAX_REPEAT 19 ! #define SRE_OP_MAX_REPEAT_ONE 20 ! #define SRE_OP_MIN_REPEAT 21 ! #define SRE_OP_NOT_LITERAL 22 ! #define SRE_OP_NOT_LITERAL_IGNORE 23 ! #define SRE_OP_NEGATE 24 ! #define SRE_OP_RANGE 25 ! #define SRE_OP_REPEAT 26 #define SRE_AT_BEGINNING 0 #define SRE_AT_BEGINNING_LINE 1 --- 24,43 ---- #define SRE_OP_GROUP 10 #define SRE_OP_GROUP_IGNORE 11 ! #define SRE_OP_INDEX 12 ! #define SRE_OP_IN 13 ! #define SRE_OP_IN_IGNORE 14 ! #define SRE_OP_INFO 15 ! #define SRE_OP_JUMP 16 ! #define SRE_OP_LITERAL 17 ! #define SRE_OP_LITERAL_IGNORE 18 ! #define SRE_OP_MARK 19 ! #define SRE_OP_MAX_REPEAT 20 ! #define SRE_OP_MAX_REPEAT_ONE 21 ! #define SRE_OP_MIN_REPEAT 22 ! #define SRE_OP_NOT_LITERAL 23 ! #define SRE_OP_NOT_LITERAL_IGNORE 24 ! #define SRE_OP_NEGATE 25 ! #define SRE_OP_RANGE 26 ! #define SRE_OP_REPEAT 27 #define SRE_AT_BEGINNING 0 #define SRE_AT_BEGINNING_LINE 1 From python-dev@python.org Sun Jul 2 18:33:30 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 2 Jul 2000 10:33:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre.py,1.18,1.19 sre_compile.py,1.20,1.21 sre_constants.py,1.14,1.15 sre_parse.py,1.21,1.22 Message-ID: <200007021733.KAA31658@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv31347/Lib Modified Files: sre.py sre_compile.py sre_constants.py sre_parse.py Log Message: - actually enabled charset anchors in the engine (still not used by the code generator) - changed max repeat value in engine (to match earlier array fix) - added experimental "which part matched?" mechanism to sre; see http://hem.passagen.se/eff/2000_07_01_bot-archive.htm#416954 or python-dev for details. Index: sre.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** sre.py 2000/07/01 17:50:59 1.18 --- sre.py 2000/07/02 17:33:27 1.19 *************** *** 156,157 **** --- 156,188 ---- copy_reg.pickle(type(_compile("")), _pickle, _compile) + + # -------------------------------------------------------------------- + # experimental stuff (see python-dev discussions for details) + + class Scanner: + def __init__(self, lexicon): + self.lexicon = lexicon + p = [] + for phrase, action in lexicon: + p.append("(?:%s)(?P#%d)" % (phrase, len(p))) + self.scanner = sre.compile("|".join(p)) + def scan(self, string): + result = [] + append = result.append + match = self.scanner.match + i = 0 + while 1: + m = match(string, i) + if not m: + break + j = m.end() + if i == j: + break + action = self.lexicon[m.index][1] + if callable(action): + self.match = match + action = action(self, m.group()) + if action is not None: + append(action) + i = j + return result, string[i:] Index: sre_compile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** sre_compile.py 2000/07/02 12:00:06 1.20 --- sre_compile.py 2000/07/02 17:33:27 1.21 *************** *** 209,213 **** emit(OPCODES[op]) emit(av-1) ! elif op is MARK: emit(OPCODES[op]) emit(av) --- 209,213 ---- emit(OPCODES[op]) emit(av-1) ! elif op in (MARK, INDEX): emit(OPCODES[op]) emit(av) Index: sre_constants.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_constants.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** sre_constants.py 2000/07/02 12:00:06 1.14 --- sre_constants.py 2000/07/02 17:33:27 1.15 *************** *** 34,37 **** --- 34,38 ---- IN = "in" IN_IGNORE = "in_ignore" + INDEX = "index" INFO = "info" JUMP = "jump" *************** *** 91,94 **** --- 92,96 ---- CHARSET, GROUP, GROUP_IGNORE, + INDEX, IN, IN_IGNORE, INFO, Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** sre_parse.py 2000/07/02 12:00:06 1.21 --- sre_parse.py 2000/07/02 17:33:27 1.22 *************** *** 452,455 **** --- 452,472 ---- raise error, "unknown group name" subpattern.append((GROUP, gid)) + elif source.match("#"): + index = "" + while 1: + char = source.get() + if char is None: + raise error, "unterminated index" + if char == ")": + break + index = index + char + try: + index = int(index) + if index < 0 or index > MAXREPEAT: + raise ValueError + except ValueError: + raise error, "illegal index" + subpattern.append((INDEX, index)) + continue else: char = source.get() From python-dev@python.org Sun Jul 2 21:17:11 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 2 Jul 2000 13:17:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mathmodule.c,2.47,2.48 Message-ID: <200007022017.NAA25954@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv25919/python/dist/src/modules Modified Files: mathmodule.c Log Message: Repair docs for math.frexp (they were wrong). Reported on c.l.py by Kirill Simonov. Index: mathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v retrieving revision 2.47 retrieving revision 2.48 diff -C2 -r2.47 -r2.48 *** mathmodule.c 2000/06/30 23:58:05 2.47 --- mathmodule.c 2000/07/02 20:17:08 2.48 *************** *** 172,176 **** "frexp(x)\n\ \n\ ! Return the matissa and exponent for x. The mantissa is positive."; --- 172,178 ---- "frexp(x)\n\ \n\ ! Return the matissa and exponent of x, as pair (m, e).\n\ ! m is a float and e is an int, such that x = m * 2.**e.\n\ ! If x is 0, m and e are both 0. Else 0.5 <= abs(m) < 1.0."; From python-dev@python.org Sun Jul 2 23:25:42 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 2 Jul 2000 15:25:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre_compile.py,1.21,1.22 sre_parse.py,1.22,1.23 Message-ID: <200007022225.PAA13755@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv13488/Lib Modified Files: sre_compile.py sre_parse.py Log Message: - experimental: added two new attributes to the match object: "lastgroup" is the name of the last matched capturing group, "lastindex" is the index of the same group. if no group was matched, both attributes are set to None. the (?P#) feature will be removed in the next relase. Index: sre_compile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** sre_compile.py 2000/07/02 17:33:27 1.21 --- sre_compile.py 2000/07/02 22:25:39 1.22 *************** *** 299,305 **** "sorry, but this version only supports 100 named groups" return _sre.compile( pattern, flags, array.array(WORDSIZE, code).tostring(), ! p.pattern.groups-1, p.pattern.groupdict ) --- 299,311 ---- "sorry, but this version only supports 100 named groups" + # map in either direction + groupindex = p.pattern.groupdict + indexgroup = [None] * p.pattern.groups + for k, i in groupindex.items(): + indexgroup[i] = k + return _sre.compile( pattern, flags, array.array(WORDSIZE, code).tostring(), ! p.pattern.groups-1, groupindex, indexgroup ) Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** sre_parse.py 2000/07/02 17:33:27 1.22 --- sre_parse.py 2000/07/02 22:25:39 1.23 *************** *** 516,519 **** --- 516,521 ---- while 1: p = _parse(source, state) + if group is not None: + p.append((INDEX, group)) if source.match(")"): if b: From python-dev@python.org Sun Jul 2 23:25:42 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 2 Jul 2000 15:25:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.21,2.22 sre.h,2.11,2.12 Message-ID: <200007022225.PAA13760@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv13488/Modules Modified Files: _sre.c sre.h Log Message: - experimental: added two new attributes to the match object: "lastgroup" is the name of the last matched capturing group, "lastindex" is the index of the same group. if no group was matched, both attributes are set to None. the (?P#) feature will be removed in the next relase. Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** _sre.c 2000/07/02 17:33:27 2.21 --- _sre.c 2000/07/02 22:25:39 2.22 *************** *** 1105,1111 **** int groups = 0; PyObject* groupindex = NULL; ! if (!PyArg_ParseTuple(args, "OiO!|iO", &pattern, &flags, &PyString_Type, &code, ! &groups, &groupindex)) return NULL; --- 1105,1112 ---- int groups = 0; PyObject* groupindex = NULL; ! PyObject* indexgroup = NULL; ! if (!PyArg_ParseTuple(args, "OiO!|iOO", &pattern, &flags, &PyString_Type, &code, ! &groups, &groupindex, &indexgroup)) return NULL; *************** *** 1128,1131 **** --- 1129,1135 ---- self->groupindex = groupindex; + Py_XINCREF(indexgroup); + self->indexgroup = indexgroup; + return (PyObject*) self; } *************** *** 1884,1888 **** PyErr_Clear(); ! /* attributes */ if (!strcmp(name, "string")) { Py_INCREF(self->string); --- 1888,1913 ---- PyErr_Clear(); ! if (!strcmp(name, "lastindex")) { ! /* experimental */ ! if (self->index >= 0) ! return Py_BuildValue("i", self->index); ! Py_INCREF(Py_None); ! return Py_None; ! } ! ! if (!strcmp(name, "lastgroup")) { ! /* experimental */ ! if (self->pattern->indexgroup) { ! PyObject* result = PySequence_GetItem( ! self->pattern->indexgroup, self->index ! ); ! if (result) ! return result; ! PyErr_Clear(); ! } ! Py_INCREF(Py_None); ! return Py_None; ! } ! if (!strcmp(name, "string")) { Py_INCREF(self->string); *************** *** 1900,1912 **** if (!strcmp(name, "endpos")) return Py_BuildValue("i", 0); /* FIXME */ - - if (!strcmp(name, "index")) { - /* experimental */ - if (self->index < 0) { - Py_INCREF(Py_None); - return Py_None; - } else - return Py_BuildValue("i", self->index); - } PyErr_SetString(PyExc_AttributeError, name); --- 1925,1928 ---- Index: sre.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sre.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** sre.h 2000/07/02 17:33:27 2.11 --- sre.h 2000/07/02 22:25:39 2.12 *************** *** 22,25 **** --- 22,26 ---- int groups; PyObject* groupindex; + PyObject* indexgroup; /* compatibility */ PyObject* pattern; /* pattern source (or None) */ From python-dev@python.org Mon Jul 3 00:00:00 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 2 Jul 2000 16:00:00 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre.py,1.19,1.20 Message-ID: <200007022300.QAA15786@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv15713/Lib Modified Files: sre.py Log Message: - changed sre.Scanner to use lastindex instead of index. Index: sre.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** sre.py 2000/07/02 17:33:27 1.19 --- sre.py 2000/07/02 22:59:57 1.20 *************** *** 166,170 **** for phrase, action in lexicon: p.append("(?:%s)(?P#%d)" % (phrase, len(p))) ! self.scanner = sre.compile("|".join(p)) def scan(self, string): result = [] --- 166,170 ---- for phrase, action in lexicon: p.append("(?:%s)(?P#%d)" % (phrase, len(p))) ! self.scanner = _compile("|".join(p)) def scan(self, string): result = [] *************** *** 179,183 **** if i == j: break ! action = self.lexicon[m.index][1] if callable(action): self.match = match --- 179,183 ---- if i == j: break ! action = self.lexicon[m.lastindex][1] if callable(action): self.match = match From python-dev@python.org Mon Jul 3 00:18:46 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 2 Jul 2000 16:18:46 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC/example_nt example.dsp,1.2,1.3 example.dsw,1.1,1.2 readme.txt,1.6,1.7 example.mak,1.3,NONE Message-ID: <200007022318.QAA23342@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC/example_nt In directory slayer.i.sourceforge.net:/tmp/cvs-serv23043/python/dist/src/PC/example_nt Modified Files: example.dsp example.dsw readme.txt Removed Files: example.mak Log Message: The example_nt directory was old enough to vote. Frank Stajano pointed out some of the problems he had following the instructions, and I stumbled into the others: MSVC has changed in several respects, Python has changed the directories into which it builds its own Windows outputs, and we grew the unusual scheme of appending "_d" to the names of debug-mode output files. This should all work with VC6 + CVS Python now. Some other Windows geek please confirm! And the less you know, the better <0.5 wink>. Explanations and examples for versions of MSVC before 6, and versions of Python before 2.0b1, have been removed, because they're too different and so confuse life. This last step I OK'ed with Guido first (indeed, 'twas his idea!). Index: example.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/example_nt/example.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** example.dsp 1997/12/11 04:06:04 1.2 --- example.dsp 2000/07/02 23:18:42 1.3 *************** *** 1,4 **** # Microsoft Developer Studio Project File - Name="example" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 5.00 # ** DO NOT EDIT ** --- 1,4 ---- # Microsoft Developer Studio Project File - Name="example" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** *************** *** 18,27 **** !MESSAGE Possible choices for configuration are: !MESSAGE ! !MESSAGE "example - Win32 Release" (based on\ ! "Win32 (x86) Dynamic-Link Library") !MESSAGE "example - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP Scc_ProjName "" # PROP Scc_LocalPath "" --- 18,27 ---- !MESSAGE Possible choices for configuration are: !MESSAGE ! !MESSAGE "example - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "example - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project + # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" *************** *** 71,75 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c # ADD BASE MTL /nologo /D "_DEBUG" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 --- 71,75 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c # ADD BASE MTL /nologo /D "_DEBUG" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 Index: example.dsw =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/example_nt/example.dsw,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** example.dsw 1997/12/11 03:43:29 1.1 --- example.dsw 2000/07/02 23:18:43 1.2 *************** *** 1,8 **** ! Microsoft Developer Studio Workspace File, Format Version 5.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### ! Project: "example"=".\example.dsp" - Package Owner=<4> Package=<5> --- 1,8 ---- ! Microsoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### ! Project: "example"=.\example.dsp - Package Owner=<4> Package=<5> Index: readme.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/example_nt/readme.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** readme.txt 1997/12/11 04:01:25 1.6 --- readme.txt 2000/07/02 23:18:43 1.7 *************** *** 2,98 **** ======================================= ! This directory contains everything you need to build a Python ! extension module using Microsoft VC++ ("Developer Studio") version 4.x ! or 5.x, except for the Python distribution. It has been tested with ! VC++ 4.2 on Python 1.5a3, and with VC++ 5.0 on Python 1.5b2. ! ! The "example_nt" subdirectory should be an immediate subdirectory of ! the Python source directory -- a direct sibling of Include and PC, in ! particular, which are referenced as "..\Include" and "..\PC". In ! other words, it should *not* be used "as is". Copy or move it up one ! level or you will regret it! (This is done to keep all the PC ! specific files inside the PC subdirectory of the distribution, where ! they belong.) ! ! When using the VC++ 4.x project (makefile), it is assumed that the ! build results of Python are in the directory ..\vc40. In particular, ! the python15.lib file is referred to as "..\vc40\python15.lib". If ! you have problems with this file, the best thing to do is to delete it ! from the project and add it again. ! ! When using the VC++ 5.x project (workspace), the build results of ! Python are assumed to be in ..\PCbuild. Since the provided VC++ 5.x ! project and workspace files have a different structure (to support ! separate "release" and "debug" builds), the example project and ! workspace match this structure. ! ! In order to use the example project from VC++ 4.x, use the "File->Open ! Workspace..." dialog (*not* the "File->Open..." dialog!). Change the ! pattern to "*.mak" and select the file "example.mak". Now choose ! "File->Save All" and the othe project files will be created. ! From VC+ 5.x, do the same except don't change the pattern, and select ! the example.dsw workspace file. In order to check that everything is set up right, try building: - choose "Build->Build example.dll". This creates all intermediate and - result files in a subdirectory which is called either Debug or Release - depending on which configuration you have chosen. - - Once the build has succeeded, test the resulting DLL. In a DOS - command window, chdir to that directory. You should now be able to - repeat the following session "(C>" is the DOS prompt, ">>>" is the - Python prompt): - - C> ..\..\vc40\python.exe - >>> import example - >>> example.foo() - Hello, world - >>> - - When using VC++ 5.x, issue these commands: - - C> ..\..\PCbuild\Release\python.exe - >>> import example - >>> example.foo() - Hello, world - >>> - ! Creating the project ! -------------------- ! There are two ways to use this example to create a project for your ! own module. First, choose a name ("spam" is always a winner :-) and ! create a directory for it. Copy your C sources into it. Note that ! the module source file name does not necessarily have to match the ! module name, but the "init" function name should match the module name ! -- i.e. you can only import a module "spam" if its init function is ! called "initspam()", and it should call Py_InitModule with the string ! "spam" as its first argument. By convention, it lives in a file called "spam.c" or "spammodule.c". The output file should be called ! "spam.dll" or "spam.pyd" (the latter is supported to avoid confusion ! with a system library "spam.dll" to which your module could be a ! Python interface). Now your options are: ! 1) Clone example.mak. Start by copying example_nt\example.mak to ! spam\spam.mak. Do a global edit on spam.mak, replacing all ! occurrences of the string "example" by "spam", and all occurrences of ! "DEP_CPP_EXAMP" by something like "DEP_CPP_SPAM". You can now use ! this makefile to create a project file by opening it as a workspace ! (you have to change the pattern to *.mak first). (When using VC++ ! 5.x, you can clone example.dsp and example.dsw in a similar way.) 2) Create a brand new project; instructions are below. ! In both cases, copy example_nt\example.def to spam\spam.def, and edit ! spam\spam.def so its second line contains the string "initspam". If ! you created a new project yourself, add the file spam.def to the ! project now. (This is an annoying little file with only two lines. ! An alternative approach is to forget about the .def file, and add the ! option "/export:initspam" somewhere to the Link settings, by manually ! editing the "Project Options" box). You are now all set to build your extension, unless it requires other --- 2,114 ---- ======================================= ! This directory contains everything needed (except for the Python ! distribution!) to build a Python extension module using Microsoft VC++ ! ("Developer Studio") version 6. It has been tested with VC++ 6.0 on Python ! 2.0b1. You can also use earlier versions of VC to build Python extensions, ! but the sample VC project file (example.dsw in this directory) is in VC 6 ! format. ! COPY THIS DIRECTORY! ! -------------------- ! This "example_nt" directory is a subdirectory of the PC directory, in order ! to keep all the PC-specific files under the same directory. However, the ! example_nt directory can't actually be used from this location. You first ! need to copy or move it up one level, so that example_nt is a direct ! sibling of the PC\ and Include\ directories. Do all your work from within ! this new location -- sorry, but you'll be sorry if you don't. ! ! OPEN THE PROJECT ! ---------------- ! From VC 6.x, use the ! File -> Open Workspace... ! dialog (*not* the "File -> Open..." dialog!). Navigate to and select the ! file "example.dsw". Click Open. + BUILD THE EXAMPLE DLL + --------------------- In order to check that everything is set up right, try building: ! 1. Select a configuration. This step is optional. Do ! Build -> Select Active Configuration... ! and select either "example - Win32 Release" or "example - Win32 Debug". ! If you skip this step, you'll use the Debug configuration by default. ! ! 2. Build the DLL. Do ! Build -> Build example_d.dll ! in Debug mode, or ! Build -> Build example.dll ! in Release mode. ! This creates all intermediate and result files in a subdirectory which ! is called either Debug or Release, depending on which configuration you ! picked in the preceding step. ! ! TESTING THE DEBUG-MODE DLL ! -------------------------- ! Once the Debug build has succeeded, bring up a DOS box, and cd to ! example_nt\Debug. You should now be able to repeat the following session ! ("C>" is the DOS prompt, ">>>" is the Python prompt) (note that various ! debug output from Python may not match this screen dump exactly): ! ! C>..\..\PCbuild\python_d ! Adding parser accelerators ... ! Done. ! Python 2.0b1 (#0, Jul 1 2000, 11:29:37) [MSC 32 bit (Intel)] on win32 ! Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam ! Copyright 1995-2000 Corporation for National Research Initiatives (CNRI) ! >>> import example ! [8830 refs] ! >>> example.foo() ! Hello, world ! [8830 refs] ! >>> ! TESTING THE RELEASE-MODE DLL ! ---------------------------- ! Once the Release build has succeeded, bring up a DOS box, and cd to ! example_nt\Release. You should now be able to repeat the following session ! ("C>" is the DOS prompt, ">>>" is the Python prompt): ! ! C>..\..\PCbuild\python ! Python 2.0b1 (#0, Jul 1 2000, 11:28:35) [MSC 32 bit (Intel)] on win32 ! Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam ! Copyright 1995-2000 Corporation for National Research Initiatives (CNRI) ! >>> import example ! >>> example.foo() ! Hello, world ! >>> ! ! Congratulations! You've successfully built your first Python extension ! module. ! ! CREATING YOUR OWN PROJECT ! ------------------------- ! Choose a name ("spam" is always a winner :-) and create a directory for ! it. Copy your C sources into it. Note that the module source file name ! does not necessarily have to match the module name, but the "init" function ! name should match the module name -- i.e. you can only import a module ! "spam" if its init function is called "initspam()", and it should call ! Py_InitModule with the string "spam" as its first argument (use the minimal ! example.c in this directory as a guide). By convention, it lives in a file called "spam.c" or "spammodule.c". The output file should be called ! "spam.dll" or "spam.pyd" (the latter is supported to avoid confusion with a ! system library "spam.dll" to which your module could be a Python interface) ! in Release mode, or spam_d.dll or spam_d.pyd in Debug mode. Now your options are: ! 1) Copy example.dsw and example.dsp, rename them to spam.*, and edit them ! by hand. + or + 2) Create a brand new project; instructions are below. ! In either case, copy example_nt\example.def to spam\spam.def, and edit the ! new spam.def so its second line contains the string "initspam". If you ! created a new project yourself, add the file spam.def to the project now. ! (This is an annoying little file with only two lines. An alternative ! approach is to forget about the .def file, and add the option ! "/export:initspam" somewhere to the Link settings, by manually editing the ! "Project Options" box). You are now all set to build your extension, unless it requires other *************** *** 101,148 **** ! Creating a brand new project ---------------------------- ! ! If you don't feel comfortable with editing Makefiles or project and ! workspace files, you can create a brand new project from scratch ! easily. ! ! Use the "File->New..." dialog to create a new Project Workspace. ! Select Dynamic-Link Library, enter the name ("spam"), and make sure ! the "Location" is set to the spam directory you have created (which ! should be a direct subdirectory of the Python build tree). Select ! Win32 as the platform (in my version, this is the only choice). Click ! "Create". ! ! Now open the "Build->Settings..." dialog. (Impressive, isn't it? :-) ! You only need to change a few settings. Make sure you have both the ! Debug and the Release configuration selected when you make the first ! change. Select the "C/C++" tab. Choose the "Preprocessor" category ! in the popup menu at the top. Type the following text in the entry ! box labeled "Addditional include directories:" ! ! ..\Include,..\PC ! ! Next, for both configurations, select the "Link" tab, choose the ! "General" category, and add "python15.lib" to the end of the ! "Object/library modules" box. ! ! Then, separately for the Release and Debug configurations, choose the ! "Input" category in the Link tab, and enter "..\PCbuild\Release" or ! "..\PCbuild\Debug", respectively, in the "Additional library path" ! box. ! ! Finally, you must change the run-time library. This must also be done ! separately for the Release and Debug configurations. Choose the "Code ! Generation" category in the C/C++ tab. In the box labeled "Use ! run-time library", choose "Multithreaded DLL" for the Release ! configuration, and "Debug Multithreaded DLL" for the Debug ! configuration. That's all. ! ! You should now first create the file spam.def as instructed in the ! previous section. ! ! Now chose the "Insert->Files into Project..." dialog. Set the pattern ! to *.* and select both spam.c and spam.def and click OK. (Inserting ! them one by one is fine too.) ! --- 117,165 ---- ! CREATING A BRAND NEW PROJECT ---------------------------- ! Use the ! File -> New... -> Projects ! dialog to create a new Project Workspace. Select "Win32 Dynamic-Link ! Library", enter the name ("spam"), and make sure the "Location" is set to ! the spam directory you have created (which should be a direct subdirectory ! of the Python build tree, a sibling of Inclue and PC). Select Win32 as the ! platform (in my version, this is the only choice). Make sure the "Create ! new workspace" radio button is selected. Click OK. ! ! Now open the ! Project -> Settings... ! dialog. (Impressive, isn't it? :-) You only need to change a few ! settings. Make sure "All Configurations" is selected from the "Settings ! for:" dropdown list. Select the "C/C++" tab. Choose the "Preprocessor" ! category in the popup menu at the top. Type the following text in the ! entry box labeled "Addditional include directories:" ! ! ..\Include,..\PC ! ! Then, choose the "Input" category in the Link tab, and enter ! ..\PCbuild ! in the "Additional library path:" box. ! ! Now you need to add some mode-specific settings: ! ! Select "Win32 Release" in the "Settings for:" dropdown list. Click the ! "Link" tab, choose the "Input" Category, and append "python20.lib" to the ! list in the "Object/library modules:" box. ! ! Select "Win32 Debug" in the "Settings for:" dropdown list, and append ! "python20_d.lib" to the list in the "Object/library modules:" box. Then ! click on the C/C++ tab, select "Code Generation" from the "Category:" ! dropdown list, and select "Debug Multithreaded DLL" from the "Use run-time ! library:" dropdown list. ! ! Select "Win32 Release" again from the "Settings for:" dropdown list. ! Select "Multithreaded DLL" from the "Use run-time library:" dropdown list. ! ! That's all . ! ! You should now create the file spam.def as instructed in the previous ! section. Then chose the ! Insert -> Files into Project... ! dialog. Set the pattern to *.* and select both spam.c and spam.def and ! click OK. (Inserting them one by one is fine too.) From python-dev@python.org Mon Jul 3 00:21:51 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 2 Jul 2000 16:21:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC/example_nt example.dsp,1.3,1.4 Message-ID: <200007022321.QAA23494@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC/example_nt In directory slayer.i.sourceforge.net:/tmp/cvs-serv23461/python/dist/src/PC/example_nt Modified Files: example.dsp Log Message: Checked in a wrong version. Index: example.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/example_nt/example.dsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** example.dsp 2000/07/02 23:18:42 1.3 --- example.dsp 2000/07/02 23:21:49 1.4 *************** *** 54,58 **** LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib python15.lib /nologo /subsystem:windows /dll /machine:I386 /libpath:"..\PCbuild\Release" /export:initexample # SUBTRACT LINK32 /pdb:none --- 54,58 ---- LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib python20.lib /nologo /subsystem:windows /dll /machine:I386 /libpath:"..\PCbuild" /export:initexample # SUBTRACT LINK32 /pdb:none *************** *** 81,85 **** LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib python15.lib /nologo /subsystem:windows /dll /debug /machine:I386 /libpath:"..\PCbuild\Debug" /export:initexample # SUBTRACT LINK32 /pdb:none --- 81,85 ---- LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib python20_d.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:".\Debug/example_d.dll" /libpath:"..\PCbuild" /export:initexample # SUBTRACT LINK32 /pdb:none From python-dev@python.org Mon Jul 3 07:38:19 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 2 Jul 2000 23:38:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libmath.tex,1.21,1.22 Message-ID: <200007030638.XAA22944@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv22936/lib Modified Files: libmath.tex Log Message: Tim-blessed documentation for math.frexp(). Index: libmath.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmath.tex,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** libmath.tex 2000/05/18 05:07:38 1.21 --- libmath.tex 2000/07/03 06:38:17 1.22 *************** *** 65,74 **** \begin{funcdesc}{frexp}{x} ! Convert a floating-point number to fractional and integral ! components. If \var{x} is zero, returns \code{(0.0, 0)}, otherwise ! returns \code{(\var{frac}, \var{exp})} such that \code{\var{frac} * ! 2**\var{exp}} will equal \var{x}. \var{exp} will be an integer, and ! the absolute value of \var{frac} will be in the range [0.5, 1.0) ! (\var{frac} will share the sign of \var{x}). \end{funcdesc} --- 65,74 ---- \begin{funcdesc}{frexp}{x} ! % Blessed by Tim. ! Return the mantissa and exponent of \var{x} as the pair ! \code{(\var{m}, \var{e})}. \var{m} is a float and \var{e} is an ! integer such that \code{\var{x} == \var{m} * 2**\var{e}}. ! If \var{x} is zero, returns \code{(0.0, 0)}, otherwise ! \code{0.5 <= abs(\var{m}) < 1}. \end{funcdesc} From python-dev@python.org Mon Jul 3 08:23:16 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 00:23:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib string.py,1.49,1.50 Message-ID: <200007030723.AAA31664@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv31657 Modified Files: string.py Log Message: Martin von Löwis : This patch delegates more string functions to string object methods, uses the varargs delegation syntax, and stops using stringold. Closes SourceForge patch #100712. Index: string.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/string.py,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -r1.49 -r1.50 *** string.py 2000/04/05 20:11:18 1.49 --- string.py 2000/07/03 07:23:13 1.50 *************** *** 126,132 **** joinfields = join - # for a little bit of speed - _apply = apply - # Find substring, raise exception if not found def index(s, *args): --- 126,129 ---- *************** *** 136,140 **** """ ! return _apply(s.index, args) # Find last substring, raise exception if not found --- 133,137 ---- """ ! return s.index(*args) # Find last substring, raise exception if not found *************** *** 145,149 **** """ ! return _apply(s.rindex, args) # Count non-overlapping occurrences of substring --- 142,146 ---- """ ! return s.rindex(*args) # Count non-overlapping occurrences of substring *************** *** 156,160 **** """ ! return _apply(s.count, args) # Find substring, return -1 if not found --- 153,157 ---- """ ! return s.count(*args) # Find substring, return -1 if not found *************** *** 169,173 **** """ ! return _apply(s.find, args) # Find last substring, return -1 if not found --- 166,170 ---- """ ! return s.find(*args) # Find last substring, return -1 if not found *************** *** 182,186 **** """ ! return _apply(s.rfind, args) # for a bit of speed --- 179,183 ---- """ ! return s.rfind(*args) # for a bit of speed *************** *** 240,246 **** """ ! n = width - len(s) ! if n <= 0: return s ! return s + ' '*n # Right-justify a string --- 237,241 ---- """ ! return s.ljust(width) # Right-justify a string *************** *** 253,259 **** """ ! n = width - len(s) ! if n <= 0: return s ! return ' '*n + s # Center a string --- 248,252 ---- """ ! return s.rjust(width) # Center a string *************** *** 266,276 **** """ ! n = width - len(s) ! if n <= 0: return s ! half = n/2 ! if n%2 and width%2: ! # This ensures that center(center(s, i), j) = center(s, j) ! half = half+1 ! return ' '*half + s + ' '*(n-half) # Zero-fill a number, e.g., (12, 3) --> '012' and (-3, 3) --> '-03' --- 259,263 ---- """ ! return s.center(width) # Zero-fill a number, e.g., (12, 3) --> '012' and (-3, 3) --> '-03' *************** *** 303,315 **** """ ! res = line = '' ! for c in s: ! if c == '\t': ! c = ' '*(tabsize - len(line) % tabsize) ! line = line + c ! if c == '\n': ! res = res + line ! line = '' ! return res + line # Character translation through look-up table. --- 290,294 ---- """ ! return s.expandtabs(tabsize) # Character translation through look-up table. *************** *** 380,393 **** return s.replace(old, new, maxsplit) - - # XXX: transitional - # - # If string objects do not have methods, then we need to use the old string.py - # library, which uses strop for many more things than just the few outlined - # below. - try: - ''.upper - except AttributeError: - from stringold import * # Try importing optional built-in module "strop" -- if it exists, --- 359,362 ---- From python-dev@python.org Mon Jul 3 09:18:49 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 01:18:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib filecmp.py,1.5,1.6 Message-ID: <200007030818.BAA08449@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv8435 Modified Files: filecmp.py Log Message: cmpfiles(): Added shallow and use_statcache parameters, with same meanings and defaults as for filecmp.cmp(). Updated docstring accordingly, and formatted it more like others in the standard library. Index: filecmp.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/filecmp.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** filecmp.py 2000/06/29 14:13:28 1.5 --- filecmp.py 2000/07/03 08:18:47 1.6 *************** *** 17,21 **** BUFSIZE=8*1024 ! def cmp(f1, f2, shallow=1,use_statcache=0): """Compare two files. --- 17,21 ---- BUFSIZE=8*1024 ! def cmp(f1, f2, shallow=1, use_statcache=0): """Compare two files. *************** *** 268,291 **** ! # Compare common files in two directories. ! # Return: ! # - files that compare equal ! # - files that compare different ! # - funny cases (can't stat etc.) ! # ! def cmpfiles(a, b, common): """Compare common files in two directories. ! cmpfiles(a,b,common) ! A and B are directory names ! COMMON is a list of file names ! returns a tuple of three lists: files that compare equal files that are different ! filenames that aren't regular files.""" res = ([], [], []) for x in common: ! res[_cmp(os.path.join(a, x), os.path.join(b, x))].append(x) return res --- 268,290 ---- ! def cmpfiles(a, b, common, shallow=1, use_statcache=0): """Compare common files in two directories. + + a, b -- directory names + common -- list of file names found in both directories + shallow -- if true, do comparison based solely on stat() information + use_statcache -- if true, use statcache.stat() instead of os.stat() ! Returns a tuple of three lists: files that compare equal files that are different ! filenames that aren't regular files. + """ res = ([], [], []) for x in common: ! ax = os.path.join(a, x) ! bx = os.path.join(b, x) ! res[_cmp(ax, bx, shallow, use_statcache)].append(x) return res From python-dev@python.org Mon Jul 3 09:24:52 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 01:24:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libfilecmp.tex,1.1,1.2 Message-ID: <200007030824.BAA09132@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9125/lib Modified Files: libfilecmp.tex Log Message: Moshe Zadka : Substantial updates to reflect Moshe's Gordon's enhancements to the module. Additional changes from Fred to reflect his changes to the module as well. Index: libfilecmp.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfilecmp.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** libfilecmp.tex 1999/10/29 17:23:15 1.1 --- libfilecmp.tex 2000/07/03 08:24:49 1.2 *************** *** 1,4 **** \section{\module{filecmp} --- ! File Comparisons} \declaremodule{standard}{filecmp} --- 1,4 ---- \section{\module{filecmp} --- ! File and Directory Comparisons} \declaremodule{standard}{filecmp} *************** *** 6,22 **** \modulesynopsis{Compare files efficiently.} - The \module{filecmp} module defines a function to compare files, taking all - sort of short-cuts to make it a highly efficient operation. The \module{filecmp} module defines the following function: \begin{funcdesc}{cmp}{f1, f2\optional{, shallow\optional{, use_statcache}}} ! Compare the files named \var{f1} and \var{f2}, returning \code{1} ! if they seem equal, \code{0} otherwise. Unless \var{shallow} is given and is false, files with identical ! \function{os.stat()} signatures are taken to be equal. If \var{use_statcache} is given and is true, ! \function{statcache.stat()} will be called rather then \var{os.stat()}. Files that were compared using this function will not be compared again --- 6,24 ---- \modulesynopsis{Compare files efficiently.} + The \module{filecmp} module defines functions to compare files and directories, + with various optional time/correctness trade-offs. + The \module{filecmp} module defines the following function: \begin{funcdesc}{cmp}{f1, f2\optional{, shallow\optional{, use_statcache}}} ! Compare the files named \var{f1} and \var{f2}, returning \code{1} if ! they seem equal, \code{0} otherwise. Unless \var{shallow} is given and is false, files with identical ! \function{os.stat()} signatures are taken to be equal. If \var{use_statcache} is given and is true, ! \function{statcache.stat()} will be called rather then ! \function{os.stat()}; the default is to use \function{os.stat()}. Files that were compared using this function will not be compared again *************** *** 26,33 **** cache. ! Note that no external programs are called from this module giving it portability and efficiency. \end{funcdesc} Example: --- 28,49 ---- cache. ! Note that no external programs are called from this function, giving it portability and efficiency. \end{funcdesc} + \begin{funcdesc}{cmpfiles}{dir1, dir2, common\optional{, + shallow\optional{, use_statcache}}} + Returns three lists of file names: \var{match}, \var{mismatch}, + \var{errors}. \var{match} contains the list of files match in both + directories, \var{mismatch} includes the names of those that don't, + and \var{errros} lists the names of files which could not be + compared. Files may be listed in \var{errors} because the user may + lack permission to read them or many other reasons, but always that + the comparison could not be done for some reason. + + The \var{shallow} and \var{use_statcache} parameters have the same + meanings and default values as for \function{filecmp.cmp()}. + \end{funcdesc} + Example: *************** *** 39,40 **** --- 55,138 ---- 0 \end{verbatim} + + + \subsection{The \protect\class{dircmp} class \label{dircmp-objects}} + + \begin{classdesc}{dircmp}{a, b\optional{, ignore\optional{, hide}}} + Construct a new directory comparison object, to compare the + directories \var{a} and \var{b}. \var{ignore} is a list of names to + ignore, and defaults to \code{['RCS', 'CVS', 'tags']}. \var{hide} is a + list of names to hid, and defaults to \code{[os.curdir, os.pardir]}. + \end{classdesc} + + \begin{methoddesc}[dircmp]{report}{} + Print (to \code{sys.stdout}) a comparison between \var{a} and \var{b}. + \end{methoddesc} + + \begin{methoddesc}[dircmp]{report_partial_closure}{} + Print a comparison between \var{a} and \var{b} and common immediate + subdirctories. + \end{methoddesc} + + \begin{methoddesc}[dircmp]{report_full_closure}{} + Print a comparison between \var{a} and \var{b} and common + subdirctories (recursively). + \end{methoddesc} + + \begin{memberdesc}[dircmp]{left_list} + Files and subdirectories in \var{a}, filtered by \var{hide} and + \var{ignore}. + \end{memberdesc} + + \begin{memberdesc}[dircmp]{right_list} + Files and subdirectories in \var{b}, filtered by \var{hide} and + \var{ignore}. + \end{memberdesc} + + \begin{memberdesc}[dircmp]{common} + Files and subdirectories in both \var{a} and \var{b}. + \end{memberdesc} + + \begin{memberdesc}[dircmp]{left_only} + Files and subdirectories only in \var{a}. + \end{memberdesc} + + \begin{memberdesc}[dircmp]{right_only} + Files and subdirectories only in \var{b}. + \end{memberdesc} + + \begin{memberdesc}[dircmp]{common_dirs} + Subdirectories in both \var{a} and \var{b}. + \end{memberdesc} + + \begin{memberdesc}[dircmp]{common_files} + Files in both \var{a} and \var{b} + \end{memberdesc} + + \begin{memberdesc}[dircmp]{common_funny} + Names in both \var{a} and \var{b}, such that the type differs between + the directories, or names for which \function{os.stat()} reports an + error. + \end{memberdesc} + + \begin{memberdesc}[dircmp]{same_files} + Files which are identical in both \var{a} and \var{b}. + \end{memberdesc} + + \begin{memberdesc}[dircmp]{diff_files} + Files which are in both \var{a} and \var{b}, whose contents differ. + \end{memberdesc} + + \begin{memberdesc}[dircmp]{funny_files} + Files which are in both \var{a} and \var{b}, but could not be + compared. + \end{memberdesc} + + \begin{memberdesc}[dircmp]{subdirs} + A dictionary mapping names in \member{common_dirs} to + \class{dircmp} objects. + \end{memberdesc} + + Note that via \method{__getattr__()} hooks, all attributes are + computed lazilly, so there is no speed penalty if only those + attributes which are lightweight to compute are used. From python-dev@python.org Mon Jul 3 10:56:26 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 02:56:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib shlex.py,1.7,1.8 Message-ID: <200007030956.CAA25001@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv24985/Lib Modified Files: shlex.py Log Message: Eric S. Raymond : This patch implements relative-path semantics for the "source" facility resembling those of cpp(1), documents the change, and improves the shlex test main to make it easier to test this feature. Along the way, it fixes a name error in the existing docs. [Additional documentation markup changes for consistency by FLD.] Index: shlex.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/shlex.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** shlex.py 2000/05/01 20:14:12 1.7 --- shlex.py 2000/07/03 09:56:23 1.8 *************** *** 4,9 **** --- 4,11 ---- # Input stacking and error message cleanup added by ESR, March 2000 + import os.path import sys + class shlex: "A lexical analyzer class for simple shell-like syntaxes." *************** *** 27,31 **** self.source = None if self.debug: ! print 'shlex: reading from %s, line %d' % (self.instream,self.lineno) def push_token(self, tok): --- 29,34 ---- self.source = None if self.debug: ! print 'shlex: reading from %s, line %d' \ ! % (self.instream, self.lineno) def push_token(self, tok): *************** *** 48,52 **** while raw == self.source: (newfile, newstream) = self.sourcehook(self.read_token()) ! self.filestack = [(self.infile,self.instream,self.lineno)] + self.filestack self.infile = newfile self.instream = newstream --- 51,55 ---- while raw == self.source: (newfile, newstream) = self.sourcehook(self.read_token()) ! self.filestack.insert(0, (self.infile, self.instream, self.lineno)) self.infile = newfile self.instream = newstream *************** *** 64,68 **** self.filestack = self.filestack[1:] if self.debug: ! print 'shlex: popping to %s, line %d' % (self.instream, self.lineno) self.state = ' ' raw = self.get_token() --- 67,72 ---- self.filestack = self.filestack[1:] if self.debug: ! print 'shlex: popping to %s, line %d' \ ! % (self.instream, self.lineno) self.state = ' ' raw = self.get_token() *************** *** 83,87 **** self.lineno = self.lineno + 1 if self.debug >= 3: ! print "shlex: in state " + repr(self.state) + " I see character: " + repr(nextchar) if self.state == None: self.token = ''; # past end of file --- 87,92 ---- self.lineno = self.lineno + 1 if self.debug >= 3: ! print "shlex: in state", repr(self.state), \ ! "I see character:", repr(nextchar) if self.state == None: self.token = ''; # past end of file *************** *** 157,160 **** --- 162,168 ---- if newfile[0] == '"': newfile = newfile[1:-1] + # This implements cpp-like semantics for relative-path inclusion. + if type(self.infile) == type("") and not os.path.isabs(newfile): + newfile = os.path.join(os.path.dirname(self.infile), newfile) return (newfile, open(newfile, "r")) *************** *** 167,177 **** return "\"%s\", line %d: " % (infile, lineno) - if __name__ == '__main__': ! lexer = shlex() while 1: tt = lexer.get_token() ! print "Token: " + repr(tt) ! if not tt: break - --- 175,189 ---- return "\"%s\", line %d: " % (infile, lineno) ! if __name__ == '__main__': ! if len(sys.argv) == 1: ! lexer = shlex() ! else: ! file = sys.argv[1] ! lexer = shlex(open(file), file) while 1: tt = lexer.get_token() ! if tt: ! print "Token: " + repr(tt) ! else: break From python-dev@python.org Mon Jul 3 10:56:25 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 02:56:25 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libshlex.tex,1.7,1.8 Message-ID: <200007030956.CAA24997@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv24985/Doc/lib Modified Files: libshlex.tex Log Message: Eric S. Raymond : This patch implements relative-path semantics for the "source" facility resembling those of cpp(1), documents the change, and improves the shlex test main to make it easier to test this feature. Along the way, it fixes a name error in the existing docs. [Additional documentation markup changes for consistency by FLD.] Index: libshlex.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libshlex.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** libshlex.tex 2000/05/01 20:14:47 1.7 --- libshlex.tex 2000/07/03 09:56:23 1.8 *************** *** 14,18 **** Python applications. ! \begin{classdesc}{shlex}{\optional{stream}, \optional{file}} A \class{shlex} instance or subclass instance is a lexical analyzer object. The initialization argument, if present, specifies where to --- 14,18 ---- Python applications. ! \begin{classdesc}{shlex}{\optional{stream\optional{, file}}} A \class{shlex} instance or subclass instance is a lexical analyzer object. The initialization argument, if present, specifies where to *************** *** 36,39 **** --- 36,40 ---- A \class{shlex} instance has the following methods: + \begin{methoddesc}{get_token}{} Return a token. If tokens have been stacked using *************** *** 53,85 **** \end{methoddesc} ! \begin{methoddesc}{openhook}{filename} ! When shlex detects a source request (see \member{source} below) ! this method is given the following token as argument, and expected to ! return a tuple consisting of a filename and an opened stream object. ! ! Normally, this method just strips any quotes off the argument and ! treats it as a filename, calling \code{open()} on it. It is exposed so that ! you can use it to implement directory search paths, addition of ! file extensions, and other namespace hacks. There is no corresponding `close' hook, but a shlex instance will call ! the \code{close()} method of the sourced input stream when it returns EOF. \end{methoddesc} ! \begin{methoddesc}{error_leader}{\optional{file}, \optional{line}} This method generates an error message leader in the format of a ! Unix C compiler error label; the format is '"\%s", line \%d: ', ! where the \%s is replaced with the name of the current source file and ! the \%d with the current input line number (the optional arguments ! can be used to override these). ! ! This convenience is provided to encourage shlex users to generate ! error messages in the standard, parseable format understood by Emacs ! and other Unix tools. \end{methoddesc} Instances of \class{shlex} subclasses have some public instance ! variables which either control lexical analysis or can be used ! for debugging: \begin{memberdesc}{commenters} --- 54,96 ---- \end{methoddesc} ! \begin{methoddesc}{sourcehook}{filename} ! When \class{shlex} detects a source request (see ! \member{source} below) this method is given the following token as ! argument, and expected to return a tuple consisting of a filename and ! an open file-like object. ! ! Normally, this method first strips any quotes off the argument. If ! the result is an absolute pathname, or there was no previous source ! request in effect, or the previous source was a stream ! (e.g. \code{sys.stdin}), the result is left alone. Otherwise, if the ! result is a relative pathname, the directory part of the name of the ! file immediately before it on the source inclusion stack is prepended ! (this behavior is like the way the C preprocessor handles ! \code{\#include "file.h"}). The result of the manipulations is treated ! as a filename, and returned as the first component of the tuple, with ! \function{open()} called on it to yield the second component. + This hook is exposed so that you can use it to implement directory + search paths, addition of file extensions, and other namespace hacks. There is no corresponding `close' hook, but a shlex instance will call ! the \method{close()} method of the sourced input stream when it ! returns \EOF. \end{methoddesc} ! \begin{methoddesc}{error_leader}{\optional{file\optional{, line}}} This method generates an error message leader in the format of a ! \UNIX{} C compiler error label; the format is '"\%s", line \%d: ', ! where the \samp{\%s} is replaced with the name of the current source ! file and the \samp{\%d} with the current input line number (the ! optional arguments can be used to override these). ! ! This convenience is provided to encourage \module{shlex} users to ! generate error messages in the standard, parseable format understood ! by Emacs and other \UNIX{} tools. \end{methoddesc} Instances of \class{shlex} subclasses have some public instance ! variables which either control lexical analysis or can be used for ! debugging: \begin{memberdesc}{commenters} *************** *** 91,95 **** \begin{memberdesc}{wordchars} The string of characters that will accumulate into multi-character ! tokens. By default, includes all \ASCII{} alphanumerics and underscore. \end{memberdesc} --- 102,106 ---- \begin{memberdesc}{wordchars} The string of characters that will accumulate into multi-character ! tokens. By default, includes all \ASCII{} alphanumerics and underscore. \end{memberdesc} *************** *** 115,136 **** \begin{memberdesc}{instream} ! The input stream from which this shlex instance is reading characters. \end{memberdesc} \begin{memberdesc}{source} ! This member is None by default. If you assign a string to it, that ! string will be recognized as a lexical-level inclusion request similar ! to the `source' keyword in various shells. That is, the immediately ! following token will opened as a filename and input taken from that ! stream until EOF, at which point the \code{close()} method of that ! stream will be called and the input source will again become the ! original input stream. Source requests may be stacked any number of ! levels deep. \end{memberdesc} \begin{memberdesc}{debug} ! If this member is numeric and 1 or more, a shlex instance will print ! verbose progress output on its behavior. If you need to use this, ! you can read the module source code to learn the details. \end{memberdesc} --- 126,149 ---- \begin{memberdesc}{instream} ! The input stream from which this \class{shlex} instance is reading ! characters. \end{memberdesc} \begin{memberdesc}{source} ! This member is \code{None} by default. If you assign a string to it, ! that string will be recognized as a lexical-level inclusion request ! similar to the \samp{source} keyword in various shells. That is, the ! immediately following token will opened as a filename and input taken ! from that stream until \EOF, at which point the \method{close()} ! method of that stream will be called and the input source will again ! become the original input stream. Source requests may be stacked any ! number of levels deep. \end{memberdesc} \begin{memberdesc}{debug} ! If this member is numeric and \code{1} or more, a \class{shlex} ! instance will print verbose progress output on its behavior. If you ! need to use this, you can read the module source code to learn the ! details. \end{memberdesc} From python-dev@python.org Mon Jul 3 10:57:55 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Mon, 3 Jul 2000 02:57:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects object.c,2.80,2.81 Message-ID: <200007030957.CAA25291@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv25267/Objects Modified Files: object.c Log Message: If auto-conversion fails, the Unicode codecs will return NULL. This is now checked and the error passed on to the caller. Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.80 retrieving revision 2.81 diff -C2 -r2.80 -r2.81 *** object.c 2000/07/01 14:31:09 2.80 --- object.c 2000/07/03 09:57:53 2.81 *************** *** 269,276 **** PyObject* str; str = PyUnicode_AsEncodedString(res, NULL, NULL); ! if (str) { ! Py_DECREF(res); res = str; ! } } if (!PyString_Check(res)) { --- 269,277 ---- PyObject* str; str = PyUnicode_AsEncodedString(res, NULL, NULL); ! Py_DECREF(res); ! if (str) res = str; ! else ! return NULL; } if (!PyString_Check(res)) { *************** *** 311,322 **** if (res == NULL) return NULL; ! if (PyUnicode_Check(res)) { ! PyObject* str; ! str = PyUnicode_AsEncodedString(res, NULL, NULL); ! if (str) { ! Py_DECREF(res); ! res = str; ! } ! } if (!PyString_Check(res)) { PyErr_Format(PyExc_TypeError, --- 312,324 ---- if (res == NULL) return NULL; ! if (PyUnicode_Check(res)) { ! PyObject* str; ! str = PyUnicode_AsEncodedString(res, NULL, NULL); ! Py_DECREF(res); ! if (str) ! res = str; ! else ! return NULL; ! } if (!PyString_Check(res)) { PyErr_Format(PyExc_TypeError, From python-dev@python.org Mon Jul 3 11:52:16 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Mon, 3 Jul 2000 03:52:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include unicodeobject.h,2.10,2.11 Message-ID: <200007031052.DAA08285@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv8276/Include Modified Files: unicodeobject.h Log Message: Added new Py_UNICODE_ISALPHA() and Py_UNICODE_ISALNUM() macros which are true for alphabetic and alphanumeric characters resp. The macros are currently implemented using the existing is* tables but will have to be updated to meet the Unicode standard definitions (add tables for non-cased letters and letter modifiers). Index: unicodeobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/unicodeobject.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** unicodeobject.h 2000/06/18 22:22:27 2.10 --- unicodeobject.h 2000/07/03 10:52:13 2.11 *************** *** 161,164 **** --- 161,175 ---- #endif + #define Py_UNICODE_ISALPHA(ch) \ + (Py_UNICODE_ISLOWER(ch) || \ + Py_UNICODE_ISUPPER(ch) || \ + Py_UNICODE_ISTITLE(ch)) + + #define Py_UNICODE_ISALNUM(ch) \ + (Py_UNICODE_ISALPHA(ch) || \ + Py_UNICODE_ISDECIMAL(ch) || \ + Py_UNICODE_ISDIGIT(ch) || \ + Py_UNICODE_ISNUMERIC(ch)) + #define Py_UNICODE_COPY(target, source, length)\ (memcpy((target), (source), (length)*sizeof(Py_UNICODE))) From python-dev@python.org Mon Jul 3 14:38:12 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 06:38:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/api api.tex,1.71,1.72 Message-ID: <200007031338.GAA12404@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/api In directory slayer.i.sourceforge.net:/tmp/cvs-serv12392/api Modified Files: api.tex Log Message: Marc-Andre Lemburg : Update the API docs for the new macros Py_UNICODE_ISALPHA() and Py_UNICODE_ISALNUM(). Index: api.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/api.tex,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -r1.71 -r1.72 *** api.tex 2000/06/30 15:52:39 1.71 --- api.tex 2000/07/03 13:38:10 1.72 *************** *** 1994,1998 **** \begin{cfuncdesc}{int}{Py_UNICODE_ISUPPER}{Py_UNICODE ch} ! Returns 1/0 depending on whether \var{ch} is a uppercase character. \end{cfuncdesc} --- 1994,1998 ---- \begin{cfuncdesc}{int}{Py_UNICODE_ISUPPER}{Py_UNICODE ch} ! Returns 1/0 depending on whether \var{ch} is an uppercase character. \end{cfuncdesc} *************** *** 2015,2018 **** --- 2015,2026 ---- \begin{cfuncdesc}{int}{Py_UNICODE_ISNUMERIC}{Py_UNICODE ch} Returns 1/0 depending on whether \var{ch} is a numeric character. + \end{cfuncdesc} + + \begin{cfuncdesc}{int}{Py_UNICODE_ISALPHA}{Py_UNICODE ch} + Returns 1/0 depending on whether \var{ch} is an alphabetic character. + \end{cfuncdesc} + + \begin{cfuncdesc}{int}{Py_UNICODE_ISALNUM}{Py_UNICODE ch} + Returns 1/0 depending on whether \var{ch} is an alphanumeric character. \end{cfuncdesc} From python-dev@python.org Mon Jul 3 14:44:28 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 06:44:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib pty.py,1.4,1.5 Message-ID: <200007031344.GAA12804@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv12796 Modified Files: pty.py Log Message: Fix bug #379, reported by Phillip Porch : openpty(): Fallback code when os.openpty() does not exist attempted to call _slave_open(), which should have been slave_open(). This bug only showed on platforms which do not provide a working openpty() in the C library. Index: pty.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/pty.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** pty.py 2000/06/28 16:40:38 1.4 --- pty.py 2000/07/03 13:44:25 1.5 *************** *** 26,30 **** pass master_fd, slave_name = _open_terminal() ! slave_fd = _slave_open(slave_name) return master_fd, slave_fd --- 26,30 ---- pass master_fd, slave_name = _open_terminal() ! slave_fd = slave_open(slave_name) return master_fd, slave_fd From python-dev@python.org Mon Jul 3 15:32:07 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 07:32:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libsgmllib.tex,1.18,1.19 Message-ID: <200007031432.HAA22037@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv22029/lib Modified Files: libsgmllib.tex Log Message: get_starttag_text(): Document this method. Index: libsgmllib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsgmllib.tex,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** libsgmllib.tex 1999/04/22 18:25:32 1.18 --- libsgmllib.tex 2000/07/03 14:32:04 1.19 *************** *** 71,74 **** --- 71,82 ---- \end{methoddesc} + \begin{methoddesc}{get_starttag_text}{} + Return the text of the most recently opened start tag. This should + not normally be needed for structured processing, but may be useful in + dealing with HTML ``as deployed'' or for re-generating input with + minimal changes (whitespace between attributes can be preserved, + etc.). + \end{methoddesc} + \begin{methoddesc}{handle_starttag}{tag, method, attributes} This method is called to handle start tags for which either a From python-dev@python.org Mon Jul 3 17:37:45 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 09:37:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_minidom.py,1.1,1.2 Message-ID: <200007031637.JAA10323@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv10312/test Modified Files: test_minidom.py Log Message: Compute the name of the test file so that it can be found both when this test is run as a script and when imported via the regression test framework. Problem reported by Phillip Porch . Index: test_minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_minidom.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_minidom.py 2000/07/01 14:50:21 1.1 --- test_minidom.py 2000/07/03 16:37:42 1.2 *************** *** 1,6 **** from xml.dom.minidom import parse, Node, Document, parseString ! import traceback, sys ! tstfile="test.xml" Node._debug=1 --- 1,16 ---- + # test for xml.dom.minidom + from xml.dom.minidom import parse, Node, Document, parseString ! ! import os.path ! import sys ! import traceback ! if __name__ == "__main__": ! base = sys.argv[0] ! else: ! base = __file__ ! tstfile = os.path.join(os.path.dirname(base), "test.xml") ! del base Node._debug=1 From python-dev@python.org Mon Jul 3 19:07:45 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 11:07:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules parsermodule.c,2.41,2.42 Message-ID: <200007031807.LAA28166@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv28159 Modified Files: parsermodule.c Log Message: Andrew Kuchling : Typo in string literal: execpt --> except Index: parsermodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v retrieving revision 2.41 retrieving revision 2.42 diff -C2 -r2.41 -r2.42 *** parsermodule.c 2000/06/30 23:58:05 2.41 --- parsermodule.c 2000/07/03 18:07:43 2.42 *************** *** 1652,1656 **** && validate_suite(CHILD(tree, nch - 1))); else { ! const char* name = "execpt"; char buffer[60]; if (TYPE(CHILD(tree, nch - 3)) != except_clause) --- 1652,1656 ---- && validate_suite(CHILD(tree, nch - 1))); else { ! const char* name = "except"; char buffer[60]; if (TYPE(CHILD(tree, nch - 3)) != except_clause) From python-dev@python.org Mon Jul 3 19:11:59 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 11:11:59 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mathmodule.c,2.48,2.49 Message-ID: <200007031811.LAA28478@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv28471 Modified Files: mathmodule.c Log Message: ANSI-fication, remove Py_PROTO, etc. Revise math_1(), math_2(), stub-generating macros, and function tables to use PyArg_ParseTuple() and properly provide the function name for error message generation. Fix pow() docstring for MPW 3.1; had said "power" instead of "pow". Index: mathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v retrieving revision 2.48 retrieving revision 2.49 diff -C2 -r2.48 -r2.49 *** mathmodule.c 2000/07/02 20:17:08 2.48 --- mathmodule.c 2000/07/03 18:11:56 2.49 *************** *** 17,24 **** #ifndef _MSC_VER #ifndef __STDC__ ! extern double fmod Py_PROTO((double, double)); ! extern double frexp Py_PROTO((double, int *)); ! extern double ldexp Py_PROTO((double, int)); ! extern double modf Py_PROTO((double, double *)); #endif /* __STDC__ */ #endif /* _MSC_VER */ --- 17,24 ---- #ifndef _MSC_VER #ifndef __STDC__ ! extern double fmod (double, double); ! extern double frexp (double, int *); ! extern double ldexp (double, int); ! extern double modf (double, double *); #endif /* __STDC__ */ #endif /* _MSC_VER */ *************** *** 52,61 **** static PyObject * ! math_1(args, func) ! PyObject *args; ! double (*func) Py_FPROTO((double)); { double x; ! if (! PyArg_Parse(args, "d", &x)) return NULL; errno = 0; --- 52,59 ---- static PyObject * ! math_1(PyObject *args, double (*func) (double), char *argsfmt) { double x; ! if (! PyArg_ParseTuple(args, argsfmt, &x)) return NULL; errno = 0; *************** *** 71,80 **** static PyObject * ! math_2(args, func) ! PyObject *args; ! double (*func) Py_FPROTO((double, double)); { double x, y; ! if (! PyArg_Parse(args, "(dd)", &x, &y)) return NULL; errno = 0; --- 69,76 ---- static PyObject * ! math_2(PyObject *args, double (*func) (double, double), char *argsfmt) { double x, y; ! if (! PyArg_ParseTuple(args, argsfmt, &x, &y)) return NULL; errno = 0; *************** *** 89,163 **** } ! #define FUNC1(stubname, func, docstring_name, docstring) \ ! static PyObject * stubname(self, args) PyObject *self, *args; { \ ! return math_1(args, func); \ }\ ! static char docstring_name [] = docstring; ! #define FUNC2(stubname, func, docstring_name, docstring) \ ! static PyObject * stubname(self, args) PyObject *self, *args; { \ ! return math_2(args, func); \ }\ ! static char docstring_name [] = docstring; ! FUNC1(math_acos, acos, math_acos_doc, "acos(x)\n\nReturn the arc cosine of x.") ! FUNC1(math_asin, asin, math_asin_doc, "asin(x)\n\nReturn the arc sine of x.") ! FUNC1(math_atan, atan, math_atan_doc, "atan(x)\n\nReturn the arc tangent of x.") ! FUNC2(math_atan2, atan2, math_atan2_doc, "atan2(y, x)\n\nReturn atan(y/x).") ! FUNC1(math_ceil, ceil, math_ceil_doc, "ceil(x)\n\nReturn the ceiling of x as a real.") ! FUNC1(math_cos, cos, math_cos_doc, "cos(x)\n\nReturn the cosine of x.") ! FUNC1(math_cosh, cosh, math_cosh_doc, "cosh(x)\n\nReturn the hyperbolic cosine of x.") ! FUNC1(math_exp, exp, math_exp_doc, "exp(x)\n\nReturn e raised to the power of x.") ! FUNC1(math_fabs, fabs, math_fabs_doc, "fabs(x)\n\nReturn the absolute value of the real x.") ! FUNC1(math_floor, floor, math_floor_doc, "floor(x)\n\nReturn the floor of x as a real.") ! FUNC2(math_fmod, fmod, math_fmod_doc, "fmod(x,y)\n\nReturn x % y.") ! FUNC2(math_hypot, hypot, math_hypot_doc, "hypot(x,y)\n\nReturn the Euclidean distance, sqrt(x*x + y*y).") ! FUNC1(math_log, log, math_log_doc, "log(x)\n\nReturn the natural logarithm of x.") ! FUNC1(math_log10, log10, math_log10_doc, "log10(x)\n\nReturn the base-10 logarithm of x.") #ifdef MPW_3_1 /* This hack is needed for MPW 3.1 but not for 3.2 ... */ ! FUNC2(math_pow, power, math_pow_doc, ! "power(x,y)\n\nReturn x**y.") #else ! FUNC2(math_pow, pow, math_pow_doc, "pow(x,y)\n\nReturn x**y.") #endif #ifdef HAVE_RINT ! FUNC1(math_rint, rint, math_rint_doc, "rint(x)\n\nReturn the integer nearest to x as a real.") #endif ! FUNC1(math_sin, sin, math_sin_doc, "sin(x)\n\nReturn the sine of x.") ! FUNC1(math_sinh, sinh, math_sinh_doc, "sinh(x)\n\nReturn the hyperbolic sine of x.") ! FUNC1(math_sqrt, sqrt, math_sqrt_doc, "sqrt(x)\n\nReturn the square root of x.") ! FUNC1(math_tan, tan, math_tan_doc, "tan(x)\n\nReturn the tangent of x.") ! FUNC1(math_tanh, tanh, math_tanh_doc, "tanh(x)\n\nReturn the hyperbolic tangent of x.") static PyObject * ! math_frexp(self, args) ! PyObject *self; ! PyObject *args; { double x; int i; ! if (! PyArg_Parse(args, "d", &x)) return NULL; errno = 0; --- 85,157 ---- } ! #define FUNC1(funcname, func, docstring) \ ! static PyObject * math_##funcname(PyObject *self, PyObject *args) { \ ! return math_1(args, func, "d:" #funcname); \ }\ ! static char math_##funcname##_doc [] = docstring; ! #define FUNC2(funcname, func, docstring) \ ! static PyObject * math_##funcname(PyObject *self, PyObject *args) { \ ! return math_2(args, func, "dd:" #funcname); \ }\ ! static char math_##funcname##_doc [] = docstring; ! FUNC1(acos, acos, "acos(x)\n\nReturn the arc cosine of x.") ! FUNC1(asin, asin, "asin(x)\n\nReturn the arc sine of x.") ! FUNC1(atan, atan, "atan(x)\n\nReturn the arc tangent of x.") ! FUNC2(atan2, atan2, "atan2(y, x)\n\nReturn atan(y/x).") ! FUNC1(ceil, ceil, "ceil(x)\n\nReturn the ceiling of x as a real.") ! FUNC1(cos, cos, "cos(x)\n\nReturn the cosine of x.") ! FUNC1(cosh, cosh, "cosh(x)\n\nReturn the hyperbolic cosine of x.") ! FUNC1(exp, exp, "exp(x)\n\nReturn e raised to the power of x.") ! FUNC1(fabs, fabs, "fabs(x)\n\nReturn the absolute value of the real x.") ! FUNC1(floor, floor, "floor(x)\n\nReturn the floor of x as a real.") ! FUNC2(fmod, fmod, "fmod(x,y)\n\nReturn x % y.") ! FUNC2(hypot, hypot, "hypot(x,y)\n\nReturn the Euclidean distance, sqrt(x*x + y*y).") ! FUNC1(log, log, "log(x)\n\nReturn the natural logarithm of x.") ! FUNC1(log10, log10, "log10(x)\n\nReturn the base-10 logarithm of x.") #ifdef MPW_3_1 /* This hack is needed for MPW 3.1 but not for 3.2 ... */ ! FUNC2(pow, power, ! "pow(x,y)\n\nReturn x**y.") #else ! FUNC2(pow, pow, "pow(x,y)\n\nReturn x**y.") #endif #ifdef HAVE_RINT ! FUNC1(rint, rint, "rint(x)\n\nReturn the integer nearest to x as a real.") #endif ! FUNC1(sin, sin, "sin(x)\n\nReturn the sine of x.") ! FUNC1(sinh, sinh, "sinh(x)\n\nReturn the hyperbolic sine of x.") ! FUNC1(sqrt, sqrt, "sqrt(x)\n\nReturn the square root of x.") ! FUNC1(tan, tan, "tan(x)\n\nReturn the tangent of x.") ! FUNC1(tanh, tanh, "tanh(x)\n\nReturn the hyperbolic tangent of x.") static PyObject * ! math_frexp(PyObject *self, PyObject *args) { double x; int i; ! if (! PyArg_ParseTuple(args, "d:frexp", &x)) return NULL; errno = 0; *************** *** 178,188 **** static PyObject * ! math_ldexp(self, args) ! PyObject *self; ! PyObject *args; { double x; int exp; ! if (! PyArg_Parse(args, "(di)", &x, &exp)) return NULL; errno = 0; --- 172,180 ---- static PyObject * ! math_ldexp(PyObject *self, PyObject *args) { double x; int exp; ! if (! PyArg_ParseTuple(args, "di:ldexp", &x, &exp)) return NULL; errno = 0; *************** *** 204,221 **** static PyObject * ! math_modf(self, args) ! PyObject *self; ! PyObject *args; { double x, y; ! if (! PyArg_Parse(args, "d", &x)) return NULL; errno = 0; #ifdef MPW /* MPW C modf expects pointer to extended as second argument */ ! { ! extended e; ! x = modf(x, &e); ! y = e; ! } #else x = modf(x, &y); --- 196,211 ---- static PyObject * ! math_modf(PyObject *self, PyObject *args) { double x, y; ! if (! PyArg_ParseTuple(args, "d:modf", &x)) return NULL; errno = 0; #ifdef MPW /* MPW C modf expects pointer to extended as second argument */ ! { ! extended e; ! x = modf(x, &e); ! y = e; ! } #else x = modf(x, &y); *************** *** 235,264 **** static PyMethodDef math_methods[] = { ! {"acos", math_acos, 0, math_acos_doc}, ! {"asin", math_asin, 0, math_asin_doc}, ! {"atan", math_atan, 0, math_atan_doc}, ! {"atan2", math_atan2, 0, math_atan2_doc}, ! {"ceil", math_ceil, 0, math_ceil_doc}, ! {"cos", math_cos, 0, math_cos_doc}, ! {"cosh", math_cosh, 0, math_cosh_doc}, ! {"exp", math_exp, 0, math_exp_doc}, ! {"fabs", math_fabs, 0, math_fabs_doc}, ! {"floor", math_floor, 0, math_floor_doc}, ! {"fmod", math_fmod, 0, math_fmod_doc}, ! {"frexp", math_frexp, 0, math_frexp_doc}, ! {"hypot", math_hypot, 0, math_hypot_doc}, ! {"ldexp", math_ldexp, 0, math_ldexp_doc}, ! {"log", math_log, 0, math_log_doc}, ! {"log10", math_log10, 0, math_log10_doc}, ! {"modf", math_modf, 0, math_modf_doc}, ! {"pow", math_pow, 0, math_pow_doc}, #ifdef HAVE_RINT ! {"rint", math_rint, 0, math_rint_doc}, #endif ! {"sin", math_sin, 0, math_sin_doc}, ! {"sinh", math_sinh, 0, math_sinh_doc}, ! {"sqrt", math_sqrt, 0, math_sqrt_doc}, ! {"tan", math_tan, 0, math_tan_doc}, ! {"tanh", math_tanh, 0, math_tanh_doc}, {NULL, NULL} /* sentinel */ }; --- 225,254 ---- static PyMethodDef math_methods[] = { ! {"acos", math_acos, METH_VARARGS, math_acos_doc}, ! {"asin", math_asin, METH_VARARGS, math_asin_doc}, ! {"atan", math_atan, METH_VARARGS, math_atan_doc}, ! {"atan2", math_atan2, METH_VARARGS, math_atan2_doc}, ! {"ceil", math_ceil, METH_VARARGS, math_ceil_doc}, ! {"cos", math_cos, METH_VARARGS, math_cos_doc}, ! {"cosh", math_cosh, METH_VARARGS, math_cosh_doc}, ! {"exp", math_exp, METH_VARARGS, math_exp_doc}, ! {"fabs", math_fabs, METH_VARARGS, math_fabs_doc}, ! {"floor", math_floor, METH_VARARGS, math_floor_doc}, ! {"fmod", math_fmod, METH_VARARGS, math_fmod_doc}, ! {"frexp", math_frexp, METH_VARARGS, math_frexp_doc}, ! {"hypot", math_hypot, METH_VARARGS, math_hypot_doc}, ! {"ldexp", math_ldexp, METH_VARARGS, math_ldexp_doc}, ! {"log", math_log, METH_VARARGS, math_log_doc}, ! {"log10", math_log10, METH_VARARGS, math_log10_doc}, ! {"modf", math_modf, METH_VARARGS, math_modf_doc}, ! {"pow", math_pow, METH_VARARGS, math_pow_doc}, #ifdef HAVE_RINT ! {"rint", math_rint, METH_VARARGS, math_rint_doc}, #endif ! {"sin", math_sin, METH_VARARGS, math_sin_doc}, ! {"sinh", math_sinh, METH_VARARGS, math_sinh_doc}, ! {"sqrt", math_sqrt, METH_VARARGS, math_sqrt_doc}, ! {"tan", math_tan, METH_VARARGS, math_tan_doc}, ! {"tanh", math_tanh, METH_VARARGS, math_tanh_doc}, {NULL, NULL} /* sentinel */ }; From python-dev@python.org Mon Jul 3 19:44:24 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 3 Jul 2000 11:44:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_sre.py,1.2,1.3 Message-ID: <200007031844.LAA30938@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv30343/Lib/test Modified Files: test_sre.py Log Message: - added lookbehind support (?<=pattern), (?a)|(?Pb))(?Pc)?') ! assert pat.match('a').group(1, 2, 3) == ('a', None, None) ! assert pat.match('b').group('a1', 'b2', 'c3') == (None, 'b', None) ! assert pat.match('ac').group(1, 'b2', 3) == ('a', None, 'c') except AssertionError: raise TestFailed, "match .group() method" --- 202,213 ---- try: # A single group ! m = sre.match('(a)', 'a') ! assert m.group(0) == 'a' ; assert m.group(0) == 'a' assert m.group(1) == 'a' ; assert m.group(1, 1) == ('a', 'a') pat = sre.compile('(?:(?Pa)|(?Pb))(?Pc)?') ! assert pat.match('a').group(1, 2, 3) == ('a', None, None) ! assert pat.match('b').group('a1', 'b2', 'c3') == (None, 'b', None) ! assert pat.match('ac').group(1, 'b2', 3) == ('a', None, 'c') except AssertionError: raise TestFailed, "match .group() method" *************** *** 253,260 **** assert sre.L == sre.LOCALE assert sre.M == sre.MULTILINE ! assert sre.S == sre.DOTALL ! assert sre.X == sre.VERBOSE ! assert sre.T == sre.TEMPLATE ! assert sre.U == sre.UNICODE except AssertionError: raise TestFailed, 're module constants' --- 253,260 ---- assert sre.L == sre.LOCALE assert sre.M == sre.MULTILINE ! assert sre.S == sre.DOTALL ! assert sre.X == sre.VERBOSE ! assert sre.T == sre.TEMPLATE ! assert sre.U == sre.UNICODE except AssertionError: raise TestFailed, 're module constants' *************** *** 273,277 **** # To save time, only run the first and last 10 tests #tests = tests[:10] + tests[-10:] ! pass for t in tests: --- 273,277 ---- # To save time, only run the first and last 10 tests #tests = tests[:10] + tests[-10:] ! pass for t in tests: *************** *** 281,285 **** pattern, s, outcome, repl, expected = t elif len(t)==3: ! pattern, s, outcome = t else: raise ValueError, ('Test tuples should have 3 or 5 fields',t) --- 281,285 ---- pattern, s, outcome, repl, expected = t elif len(t)==3: ! pattern, s, outcome = t else: raise ValueError, ('Test tuples should have 3 or 5 fields',t) *************** *** 289,293 **** except sre.error: if outcome==SYNTAX_ERROR: pass # Expected a syntax error ! else: print '=== Syntax error:', t except KeyboardInterrupt: raise KeyboardInterrupt --- 289,293 ---- except sre.error: if outcome==SYNTAX_ERROR: pass # Expected a syntax error ! else: print '=== Syntax error:', t except KeyboardInterrupt: raise KeyboardInterrupt *************** *** 357,361 **** # break (because it won't match at the end or start of a # string), so we'll ignore patterns that feature it. ! if pattern[:2]!='\\B' and pattern[-2:]!='\\B': obj=sre.compile(pattern) --- 357,361 ---- # break (because it won't match at the end or start of a # string), so we'll ignore patterns that feature it. ! if pattern[:2]!='\\B' and pattern[-2:]!='\\B': obj=sre.compile(pattern) From python-dev@python.org Mon Jul 3 19:44:24 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 3 Jul 2000 11:44:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre_compile.py,1.22,1.23 sre_parse.py,1.23,1.24 Message-ID: <200007031844.LAA30930@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv30343/Lib Modified Files: sre_compile.py sre_parse.py Log Message: - added lookbehind support (?<=pattern), (?= 0: ! emit(0) # look ahead ! else: ! lo, hi = av[1].getwidth() ! if lo != hi: ! raise error, "look-behind requires fixed-width pattern" ! emit(lo) # look behind ! _compile(code, av[1], flags) ! emit(OPCODES[SUCCESS]) ! code[skip] = len(code) - skip ! elif op is CALL: emit(OPCODES[op]) skip = len(code); emit(0) *************** *** 306,311 **** return _sre.compile( ! pattern, flags, ! array.array(WORDSIZE, code).tostring(), ! p.pattern.groups-1, groupindex, indexgroup ) --- 311,316 ---- return _sre.compile( ! pattern, flags, code, ! p.pattern.groups-1, ! groupindex, indexgroup ) Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** sre_parse.py 2000/07/02 22:25:39 1.23 --- sre_parse.py 2000/07/03 18:44:21 1.24 *************** *** 483,489 **** break source.get() ! elif source.next in ("=", "!"): # lookahead assertions char = source.get() b = [] while 1: --- 483,495 ---- break source.get() ! elif source.next in ("=", "!", "<"): # lookahead assertions char = source.get() + dir = 1 + if char == "<": + if source.next not in ("=", "!"): + raise error, "syntax error" + dir = -1 # lookbehind + char = source.get() b = [] while 1: *************** *** 494,500 **** p = _branch(state, b) if char == "=": ! subpattern.append((ASSERT, p)) else: ! subpattern.append((ASSERT_NOT, p)) break elif source.match("|"): --- 500,506 ---- p = _branch(state, b) if char == "=": ! subpattern.append((ASSERT, (dir, p))) else: ! subpattern.append((ASSERT_NOT, (dir, p))) break elif source.match("|"): From python-dev@python.org Mon Jul 3 19:44:24 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 3 Jul 2000 11:44:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.22,2.23 sre.h,2.12,2.13 Message-ID: <200007031844.LAA30940@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv30343/Modules Modified Files: _sre.c sre.h Log Message: - added lookbehind support (?<=pattern), (? */ TRACE(("%8d: set index %d\n", PTR(ptr), pattern[0])); ! state->index = pattern[0]; pattern++; break; --- 586,590 ---- /* args: */ TRACE(("%8d: set index %d\n", PTR(ptr), pattern[0])); ! state->lastindex = pattern[0]; pattern++; break; *************** *** 607,614 **** case SRE_OP_ASSERT: /* assert subpattern */ ! /* args: */ ! TRACE(("%8d: assert subpattern\n", PTR(ptr))); ! state->ptr = ptr; ! i = SRE_MATCH(state, pattern + 1); if (i < 0) return i; --- 600,609 ---- case SRE_OP_ASSERT: /* assert subpattern */ ! /* args: */ ! TRACE(("%8d: assert subpattern %d\n", PTR(ptr), pattern[1])); ! state->ptr = ptr - pattern[1]; ! if (state->ptr < state->beginning) ! goto failure; ! i = SRE_MATCH(state, pattern + 2); if (i < 0) return i; *************** *** 621,627 **** /* assert not subpattern */ /* args: */ ! TRACE(("%8d: assert not subpattern\n", PTR(ptr))); ! state->ptr = ptr; ! i = SRE_MATCH(state, pattern + 1); if (i < 0) return i; --- 616,624 ---- /* assert not subpattern */ /* args: */ ! TRACE(("%8d: assert not subpattern %d\n", PTR(ptr), pattern[1])); ! state->ptr = ptr - pattern[1]; ! if (state->ptr < state->beginning) ! goto failure; ! i = SRE_MATCH(state, pattern + 2); if (i < 0) return i; *************** *** 1099,1102 **** --- 1096,1100 ---- PatternObject* self; + int i, n; PyObject* pattern; *************** *** 1106,1119 **** PyObject* groupindex = NULL; PyObject* indexgroup = NULL; ! if (!PyArg_ParseTuple(args, "OiO!|iOO", &pattern, &flags, ! &PyString_Type, &code, &groups, &groupindex, &indexgroup)) return NULL; ! self = PyObject_NEW(PatternObject, &Pattern_Type); ! if (self == NULL) return NULL; Py_INCREF(pattern); self->pattern = pattern; --- 1104,1133 ---- PyObject* groupindex = NULL; PyObject* indexgroup = NULL; ! if (!PyArg_ParseTuple(args, "OiO|iOO", &pattern, &flags, &code, &groups, &groupindex, &indexgroup)) return NULL; ! code = PySequence_Fast(code, "code argument must be a sequence"); ! if (!code) ! return NULL; + n = PySequence_Length(code); + + self = PyObject_NEW_VAR(PatternObject, &Pattern_Type, 100*n); + if (!self) { + Py_DECREF(code); return NULL; + } + + for (i = 0; i < n; i++) { + PyObject *o = PySequence_Fast_GET_ITEM(code, i); + self->code[i] = (SRE_CODE) PyInt_AsLong(o); + } + + Py_DECREF(code); + if (PyErr_Occurred()) + return NULL; + Py_INCREF(pattern); self->pattern = pattern; *************** *** 1121,1127 **** self->flags = flags; - Py_INCREF(code); - self->code = code; - self->groups = groups; --- 1135,1138 ---- *************** *** 1218,1222 **** state->mark[i] = NULL; ! state->index = -1; state->stack = NULL; --- 1229,1233 ---- state->mark[i] = NULL; ! state->lastindex = -1; state->stack = NULL; *************** *** 1275,1280 **** /* create match object (with room for extra group marks) */ ! match = PyObject_NEW_VAR(MatchObject, &Match_Type, 2*pattern->groups); ! if (match == NULL) return NULL; --- 1286,1292 ---- /* create match object (with room for extra group marks) */ ! match = PyObject_NEW_VAR(MatchObject, &Match_Type, ! 2*(pattern->groups+1)); ! if (!match) return NULL; *************** *** 1301,1306 **** } else match->mark[j+2] = match->mark[j+3] = -1; /* undefined */ ! match->index = state->index; return (PyObject*) match; --- 1313,1321 ---- } else match->mark[j+2] = match->mark[j+3] = -1; /* undefined */ + + match->lastindex = state->lastindex; ! match->pos = ((char*) state->start - base) / n; ! match->endpos = ((char*) state->end - base) / n; return (PyObject*) match; *************** *** 1330,1339 **** /* create match object (with room for extra group marks) */ self = PyObject_NEW(ScannerObject, &Scanner_Type); ! if (self == NULL) return NULL; string = state_init(&self->state, pattern, args); if (!string) { ! PyObject_DEL(self); return NULL; } --- 1345,1354 ---- /* create match object (with room for extra group marks) */ self = PyObject_NEW(ScannerObject, &Scanner_Type); ! if (!self) return NULL; string = state_init(&self->state, pattern, args); if (!string) { ! PyObject_Del(self); return NULL; } *************** *** 1351,1358 **** pattern_dealloc(PatternObject* self) { - Py_XDECREF(self->code); Py_XDECREF(self->pattern); Py_XDECREF(self->groupindex); ! PyMem_DEL(self); } --- 1366,1372 ---- pattern_dealloc(PatternObject* self) { Py_XDECREF(self->pattern); Py_XDECREF(self->groupindex); ! PyObject_DEL(self); } *************** *** 1615,1622 **** statichere PyTypeObject Pattern_Type = { PyObject_HEAD_INIT(NULL) ! 0, "SRE_Pattern", sizeof(PatternObject), 0, (destructor)pattern_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ ! (getattrfunc)pattern_getattr, /*tp_getattr*/ }; --- 1629,1637 ---- statichere PyTypeObject Pattern_Type = { PyObject_HEAD_INIT(NULL) ! 0, "SRE_Pattern", ! sizeof(PatternObject), sizeof(SRE_CODE), (destructor)pattern_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ ! (getattrfunc)pattern_getattr /*tp_getattr*/ }; *************** *** 1629,1633 **** Py_XDECREF(self->string); Py_DECREF(self->pattern); ! PyMem_DEL(self); } --- 1644,1648 ---- Py_XDECREF(self->string); Py_DECREF(self->pattern); ! PyObject_DEL(self); } *************** *** 1644,1648 **** } ! if (self->string == Py_None || self->mark[index+index] < 0) { /* return default value if the string or group is undefined */ Py_INCREF(def); --- 1659,1665 ---- } ! index *= 2; ! ! if (self->string == Py_None || self->mark[index] < 0) { /* return default value if the string or group is undefined */ Py_INCREF(def); *************** *** 1651,1655 **** return PySequence_GetSlice( ! self->string, self->mark[index+index], self->mark[index+index+1] ); } --- 1668,1672 ---- return PySequence_GetSlice( ! self->string, self->mark[index], self->mark[index+1] ); } *************** *** 1658,1672 **** match_getindex(MatchObject* self, PyObject* index) { ! if (!PyInt_Check(index) && self->pattern->groupindex != NULL) { ! /* FIXME: resource leak? */ ! index = PyObject_GetItem(self->pattern->groupindex, index); ! if (!index) ! return -1; ! } if (PyInt_Check(index)) return (int) PyInt_AS_LONG(index); ! return -1; } --- 1675,1696 ---- match_getindex(MatchObject* self, PyObject* index) { ! int i; if (PyInt_Check(index)) return (int) PyInt_AS_LONG(index); + + i = -1; + + if (self->pattern->groupindex) { + index = PyObject_GetItem(self->pattern->groupindex, index); + if (index) { + if (PyInt_Check(index)) + i = (int) PyInt_AS_LONG(index); + Py_DECREF(index); + } else + PyErr_Clear(); + } ! return i; } *************** *** 1890,1895 **** if (!strcmp(name, "lastindex")) { /* experimental */ ! if (self->index >= 0) ! return Py_BuildValue("i", self->index); Py_INCREF(Py_None); return Py_None; --- 1914,1919 ---- if (!strcmp(name, "lastindex")) { /* experimental */ ! if (self->lastindex >= 0) ! return Py_BuildValue("i", self->lastindex); Py_INCREF(Py_None); return Py_None; *************** *** 1898,1904 **** if (!strcmp(name, "lastgroup")) { /* experimental */ ! if (self->pattern->indexgroup) { PyObject* result = PySequence_GetItem( ! self->pattern->indexgroup, self->index ); if (result) --- 1922,1928 ---- if (!strcmp(name, "lastgroup")) { /* experimental */ ! if (self->pattern->indexgroup && self->lastindex >= 0) { PyObject* result = PySequence_GetItem( ! self->pattern->indexgroup, self->lastindex ); if (result) *************** *** 1921,1928 **** if (!strcmp(name, "pos")) ! return Py_BuildValue("i", 0); /* FIXME */ if (!strcmp(name, "endpos")) ! return Py_BuildValue("i", 0); /* FIXME */ PyErr_SetString(PyExc_AttributeError, name); --- 1945,1952 ---- if (!strcmp(name, "pos")) ! return Py_BuildValue("i", self->pos); if (!strcmp(name, "endpos")) ! return Py_BuildValue("i", self->endpos); PyErr_SetString(PyExc_AttributeError, name); *************** *** 1936,1944 **** PyObject_HEAD_INIT(NULL) 0, "SRE_Match", ! sizeof(MatchObject), /* size of basic object */ ! sizeof(int), /* space for group item */ (destructor)match_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ ! (getattrfunc)match_getattr, /*tp_getattr*/ }; --- 1960,1967 ---- PyObject_HEAD_INIT(NULL) 0, "SRE_Match", ! sizeof(MatchObject), sizeof(int), (destructor)match_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ ! (getattrfunc)match_getattr /*tp_getattr*/ }; *************** *** 1952,1956 **** Py_DECREF(self->string); Py_DECREF(self->pattern); ! PyMem_DEL(self); } --- 1975,1979 ---- Py_DECREF(self->string); Py_DECREF(self->pattern); ! PyObject_DEL(self); } *************** *** 2042,2047 **** PyObject_HEAD_INIT(NULL) 0, "SRE_Scanner", ! sizeof(ScannerObject), /* size of basic object */ ! 0, (destructor)scanner_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ --- 2065,2069 ---- PyObject_HEAD_INIT(NULL) 0, "SRE_Scanner", ! sizeof(ScannerObject), 0, (destructor)scanner_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ Index: sre.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sre.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** sre.h 2000/07/02 22:25:39 2.12 --- sre.h 2000/07/03 18:44:21 2.13 *************** *** 18,23 **** typedef struct { ! PyObject_HEAD ! PyObject* code; /* link to the code string object */ int groups; PyObject* groupindex; --- 18,22 ---- typedef struct { ! PyObject_VAR_HEAD int groups; PyObject* groupindex; *************** *** 26,41 **** PyObject* pattern; /* pattern source (or None) */ int flags; /* flags used when compiling pattern source */ } PatternObject; ! #define PatternObject_GetCode(o)\ ! ((void*) PyString_AS_STRING(((PatternObject*)(o))->code)) typedef struct { ! PyObject_HEAD PyObject* string; /* link to the target string */ PatternObject* pattern; /* link to the regex (pattern) object */ ! int index; /* last index marker seen by the engine (-1 if none) */ int groups; /* number of groups (start/end marks) */ ! int mark[2]; } MatchObject; --- 25,42 ---- PyObject* pattern; /* pattern source (or None) */ int flags; /* flags used when compiling pattern source */ + /* pattern code */ + SRE_CODE code[1]; } PatternObject; ! #define PatternObject_GetCode(o) (((PatternObject*)(o))->code) typedef struct { ! PyObject_VAR_HEAD PyObject* string; /* link to the target string */ PatternObject* pattern; /* link to the regex (pattern) object */ ! int pos, endpos; /* current target slice */ ! int lastindex; /* last index marker seen by the engine (-1 if none) */ int groups; /* number of groups (start/end marks) */ ! int mark[1]; } MatchObject; *************** *** 60,64 **** int charsize; /* registers */ ! int index; int lastmark; void* mark[SRE_MARK_SIZE]; --- 61,65 ---- int charsize; /* registers */ ! int lastindex; int lastmark; void* mark[SRE_MARK_SIZE]; From python-dev@python.org Mon Jul 3 19:53:21 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 3 Jul 2000 20:53:21 +0200 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_sre.py,1.2,1.3 References: <200007031844.LAA30938@slayer.i.sourceforge.net> Message-ID: <00f301bfe51f$f84e6f60$f2a6b5d4@hagrid> > - cleaned up a various of potential leaks, api abuses, > and other minors in the engine module. hmm. I wonder what that was supposed to mean... guess it's time for a break. From python-dev@python.org Mon Jul 3 22:31:51 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 3 Jul 2000 14:31:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre_compile.py,1.23,1.24 sre_constants.py,1.15,1.16 sre_parse.py,1.24,1.25 Message-ID: <200007032131.OAA28633@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv28299/Lib Modified Files: sre_compile.py sre_constants.py sre_parse.py Log Message: - fixed grouping error bug - changed "group" operator to "groupref" Index: sre_compile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** sre_compile.py 2000/07/03 18:44:21 1.23 --- sre_compile.py 2000/07/03 21:31:48 1.24 *************** *** 149,164 **** emit(av[0]) emit(av[1]) _compile(code, av[2], flags) emit(OPCODES[SUCCESS]) code[skip] = len(code) - skip elif op is SUBPATTERN: ! group = av[0] ! if group: emit(OPCODES[MARK]) ! emit((group-1)*2) _compile(code, av[1], flags) ! if group: emit(OPCODES[MARK]) ! emit((group-1)*2+1) elif op in (SUCCESS, FAILURE): emit(OPCODES[op]) --- 149,171 ---- emit(av[0]) emit(av[1]) + mark = MAXCODE + if av[2][0][0] == SUBPATTERN: + # repeated subpattern + gid, foo = av[2][0][1] + if gid: + mark = (gid-1)*2 + emit(mark) _compile(code, av[2], flags) emit(OPCODES[SUCCESS]) code[skip] = len(code) - skip elif op is SUBPATTERN: ! gid = av[0] ! if gid: emit(OPCODES[MARK]) ! emit((gid-1)*2) _compile(code, av[1], flags) ! if gid: emit(OPCODES[MARK]) ! emit((gid-1)*2+1) elif op in (SUCCESS, FAILURE): emit(OPCODES[op]) *************** *** 208,212 **** else: emit(CHCODES[av]) ! elif op is GROUP: if flags & SRE_FLAG_IGNORECASE: emit(OPCODES[OP_IGNORE[op]]) --- 215,219 ---- else: emit(CHCODES[av]) ! elif op is GROUPREF: if flags & SRE_FLAG_IGNORECASE: emit(OPCODES[OP_IGNORE[op]]) Index: sre_constants.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_constants.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** sre_constants.py 2000/07/02 17:33:27 1.15 --- sre_constants.py 2000/07/03 21:31:48 1.16 *************** *** 30,35 **** CATEGORY = "category" CHARSET = "charset" ! GROUP = "group" ! GROUP_IGNORE = "group_ignore" IN = "in" IN_IGNORE = "in_ignore" --- 30,35 ---- CATEGORY = "category" CHARSET = "charset" ! GROUPREF = "groupref" ! GROUPREF_IGNORE = "groupref_ignore" IN = "in" IN_IGNORE = "in_ignore" *************** *** 91,95 **** CATEGORY, CHARSET, ! GROUP, GROUP_IGNORE, INDEX, IN, IN_IGNORE, --- 91,95 ---- CATEGORY, CHARSET, ! GROUPREF, GROUPREF_IGNORE, INDEX, IN, IN_IGNORE, *************** *** 137,141 **** # replacement operations for "ignore case" mode OP_IGNORE = { ! GROUP: GROUP_IGNORE, IN: IN_IGNORE, LITERAL: LITERAL_IGNORE, --- 137,141 ---- # replacement operations for "ignore case" mode OP_IGNORE = { ! GROUPREF: GROUPREF_IGNORE, IN: IN_IGNORE, LITERAL: LITERAL_IGNORE, Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** sre_parse.py 2000/07/03 18:44:21 1.24 --- sre_parse.py 2000/07/03 21:31:48 1.25 *************** *** 242,246 **** if (not source.next or not _group(escape + source.next, state.groups)): ! return GROUP, group escape = escape + source.get() elif source.next in OCTDIGITS: --- 242,246 ---- if (not source.next or not _group(escape + source.next, state.groups)): ! return GROUPREF, group escape = escape + source.get() elif source.next in OCTDIGITS: *************** *** 451,455 **** if gid is None: raise error, "unknown group name" ! subpattern.append((GROUP, gid)) elif source.match("#"): index = "" --- 451,455 ---- if gid is None: raise error, "unknown group name" ! subpattern.append((GROUPREF, gid)) elif source.match("#"): index = "" From python-dev@python.org Mon Jul 3 22:31:51 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 3 Jul 2000 14:31:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_sre,1.5,1.6 Message-ID: <200007032131.OAA28638@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv28299/Lib/test/output Modified Files: test_sre Log Message: - fixed grouping error bug - changed "group" operator to "groupref" Index: test_sre =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_sre,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_sre 2000/06/30 18:39:20 1.5 --- test_sre 2000/07/03 21:31:48 1.6 *************** *** 2,7 **** === Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A') === Failed incorrectly ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a') - === grouping error ('([^/]*/)*sub1/', 'd:msgs/tdir/sub1/trial/away.cpp', 0, 'found+"-"+g1', 'd:msgs/tdir/sub1/-tdir/') 'd:msgs/tdir/sub1/-trial/' should be 'd:msgs/tdir/sub1/-tdir/' - === grouping error ('([abc])*bcd', 'abcd', 0, 'found+"-"+g1', 'abcd-a') 'abcd-c' should be 'abcd-a' - === grouping error ('(?i)([abc])*bcd', 'ABCD', 0, 'found+"-"+g1', 'ABCD-A') 'ABCD-C' should be 'ABCD-A' === Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A') --- 2,4 ---- From python-dev@python.org Mon Jul 3 22:31:51 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 3 Jul 2000 14:31:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.23,2.24 sre.h,2.13,2.14 Message-ID: <200007032131.OAA28639@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv28299/Modules Modified Files: _sre.c sre.h Log Message: - fixed grouping error bug - changed "group" operator to "groupref" Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** _sre.c 2000/07/03 18:44:21 2.23 --- _sre.c 2000/07/03 21:31:48 2.24 *************** *** 407,410 **** --- 407,411 ---- int lastmark; int i, count; + SRE_STACK* sp; /* FIXME: this is a hack! */ *************** *** 572,577 **** /* args: */ TRACE(("%8d: set mark %d\n", PTR(ptr), pattern[0])); ! if (state->lastmark < pattern[0]) ! state->lastmark = pattern[0]; if (!mark) { mark = mark_copy; --- 573,578 ---- /* args: */ TRACE(("%8d: set mark %d\n", PTR(ptr), pattern[0])); ! if (state->lastmark < pattern[0]+1) ! state->lastmark = pattern[0]+1; if (!mark) { mark = mark_copy; *************** *** 781,788 **** case SRE_OP_MAX_REPEAT: ! /* match repeated sequence (maximizing regexp). repeated ! group should end with a MAX_UNTIL code */ ! ! /* args: */ TRACE(("%8d: max repeat (%d %d)\n", PTR(ptr), --- 782,787 ---- case SRE_OP_MAX_REPEAT: ! /* match repeated sequence (maximizing regexp) */ ! /* args: <1=min> <2=max> <3=save> <4=item> */ TRACE(("%8d: max repeat (%d %d)\n", PTR(ptr), *************** *** 794,798 **** /* match minimum number of items */ while (count < (int) pattern[1]) { ! i = SRE_MATCH(state, pattern + 3); if (i < 0) return i; --- 793,797 ---- /* match minimum number of items */ while (count < (int) pattern[1]) { ! i = SRE_MATCH(state, pattern + 4); if (i < 0) return i; *************** *** 818,823 **** while (pattern[2] == 65535 || count < (int) pattern[2]) { state->stackbase = stack; ! i = SRE_MATCH(state, pattern + 3); state->stackbase = stackbase; /* rewind */ if (i < 0) --- 817,827 ---- while (pattern[2] == 65535 || count < (int) pattern[2]) { + void *mark0, *mark1; + if (pattern[3] != 65535) { + mark0 = state->mark[pattern[3]]; + mark1 = state->mark[pattern[3]+1]; + } state->stackbase = stack; ! i = SRE_MATCH(state, pattern + 4); state->stackbase = stackbase; /* rewind */ if (i < 0) *************** *** 838,843 **** } TRACE(("%8d: stack[%d] = %d\n", PTR(ptr), stack, PTR(ptr))); ! state->stack[stack].ptr = ptr; ! state->stack[stack].pattern = pattern + pattern[0]; stack++; /* move forward */ --- 842,853 ---- } TRACE(("%8d: stack[%d] = %d\n", PTR(ptr), stack, PTR(ptr))); ! sp = state->stack + stack; ! sp->ptr = ptr; ! sp->pattern = pattern + pattern[0]; ! sp->mark = pattern[3]; ! if (pattern[3] != 65535) { ! sp->mark0 = mark0; ! sp->mark1 = mark1; ! } stack++; /* move forward */ *************** *** 856,859 **** --- 866,871 ---- case SRE_OP_MIN_REPEAT: /* match repeated sequence (minimizing regexp) */ + /* args: <1=min> <2=max> <3=save> <4=item> */ + TRACE(("%8d: min repeat %d %d\n", PTR(ptr), pattern[1], pattern[2])); *************** *** 862,866 **** /* match minimum number of items */ while (count < (int) pattern[1]) { ! i = SRE_MATCH(state, pattern + 3); if (i < 0) return i; --- 874,878 ---- /* match minimum number of items */ while (count < (int) pattern[1]) { ! i = SRE_MATCH(state, pattern + 4); if (i < 0) return i; *************** *** 878,882 **** } state->ptr = ptr; /* backtrack */ ! i = SRE_MATCH(state, pattern + 3); if (i < 0) return i; --- 890,894 ---- } state->ptr = ptr; /* backtrack */ ! i = SRE_MATCH(state, pattern + 4); if (i < 0) return i; *************** *** 941,953 **** failure: if (stack-- > stackbase) { ! ptr = state->stack[stack].ptr; ! pattern = state->stack[stack].pattern; TRACE(("%8d: retry (%d)\n", PTR(ptr), stack)); goto retry; } - TRACE(("%8d: leave (failure)\n", PTR(ptr))); - state->stackbase = stackbase; state->lastmark = lastmark; if (mark) memcpy(state->mark, mark, state->lastmark*sizeof(void*)); --- 953,970 ---- failure: + TRACE(("%8d: leave (failure)\n", PTR(ptr))); if (stack-- > stackbase) { ! sp = state->stack + stack; ! ptr = sp->ptr; ! pattern = sp->pattern; ! if (sp->mark != 65535) { ! state->mark[sp->mark] = sp->mark0; ! state->mark[sp->mark+1] = sp->mark1; ! } TRACE(("%8d: retry (%d)\n", PTR(ptr), stack)); goto retry; } state->lastmark = lastmark; + state->stackbase = stackbase; if (mark) memcpy(state->mark, mark, state->lastmark*sizeof(void*)); Index: sre.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sre.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** sre.h 2000/07/03 18:44:21 2.13 --- sre.h 2000/07/03 21:31:48 2.14 *************** *** 47,50 **** --- 47,53 ---- SRE_CODE* pattern; void* ptr; + int mark; + void* mark0; + void* mark1; } SRE_STACK; From python-dev@python.org Mon Jul 3 22:37:29 2000 From: python-dev@python.org (Jack Jansen) Date: Mon, 3 Jul 2000 14:37:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules timemodule.c,2.88,2.89 Message-ID: <200007032137.OAA29077@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv28917 Modified Files: timemodule.c Log Message: Mac only: two epoch problem workarounds are no longer needed for GUSI >= 2.0.5. One still is:-( Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.88 retrieving revision 2.89 diff -C2 -r2.88 -r2.89 *** timemodule.c 2000/06/30 23:58:05 2.88 --- timemodule.c 2000/07/03 21:37:27 2.89 *************** *** 260,264 **** struct tm *p; errno = 0; ! #if defined(macintosh) && defined(USE_GUSI2) when = when + GUSI_TO_MSL_EPOCH; #endif --- 260,264 ---- struct tm *p; errno = 0; ! #if defined(macintosh) && defined(USE_GUSI204) when = when + GUSI_TO_MSL_EPOCH; #endif *************** *** 475,479 **** return NULL; tt = (time_t)dt; ! #if defined(macintosh) && defined(USE_GUSI2) tt = tt + GUSI_TO_MSL_EPOCH; #endif --- 475,479 ---- return NULL; tt = (time_t)dt; ! #if defined(macintosh) && defined(USE_GUSI204) tt = tt + GUSI_TO_MSL_EPOCH; #endif From python-dev@python.org Mon Jul 3 22:39:49 2000 From: python-dev@python.org (Jack Jansen) Date: Mon, 3 Jul 2000 14:39:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser myreadline.c,2.20,2.21 Message-ID: <200007032139.OAA29267@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv29235/Parser Modified Files: myreadline.c Log Message: Include limits.h if we have it. Index: myreadline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/myreadline.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** myreadline.c 2000/06/30 23:58:05 2.20 --- myreadline.c 2000/07/03 21:39:47 2.21 *************** *** 20,23 **** --- 20,26 ---- #include "Python.h" + #ifdef HAVE_LIMITS_H + #include + #endif int (*PyOS_InputHook)() = NULL; From python-dev@python.org Mon Jul 3 22:39:49 2000 From: python-dev@python.org (Jack Jansen) Date: Mon, 3 Jul 2000 14:39:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.165,2.166 codecs.c,2.8,2.9 compile.c,2.112,2.113 modsupport.c,2.45,2.46 Message-ID: <200007032139.OAA29276@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv29235/Python Modified Files: bltinmodule.c codecs.c compile.c modsupport.c Log Message: Include limits.h if we have it. Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.165 retrieving revision 2.166 diff -C2 -r2.165 -r2.166 *** bltinmodule.c 2000/06/30 23:58:05 2.165 --- bltinmodule.c 2000/07/03 21:39:47 2.166 *************** *** 24,27 **** --- 24,30 ---- #include #endif + #ifdef HAVE_LIMITS_H + #include + #endif /* Forward */ Index: codecs.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/codecs.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** codecs.c 2000/06/29 14:50:15 2.8 --- codecs.c 2000/07/03 21:39:47 2.9 *************** *** 11,14 **** --- 11,17 ---- #include "Python.h" #include + #ifdef HAVE_LIMITS_H + #include + #endif /* --- Globals ------------------------------------------------------------ */ Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.112 retrieving revision 2.113 diff -C2 -r2.112 -r2.113 *** compile.c 2000/06/30 23:58:06 2.112 --- compile.c 2000/07/03 21:39:47 2.113 *************** *** 34,37 **** --- 34,40 ---- #include + #ifdef HAVE_LIMITS_H + #include + #endif /* Three symbols from graminit.h are also defined in Python.h, with Index: modsupport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/modsupport.c,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** modsupport.c 2000/06/30 23:58:06 2.45 --- modsupport.c 2000/07/03 21:39:47 2.46 *************** *** 12,15 **** --- 12,18 ---- #include "Python.h" + #ifdef HAVE_LIMITS_H + #include + #endif #ifdef MPW /* MPW pushes 'extended' for float and double types with varargs */ From python-dev@python.org Mon Jul 3 23:41:40 2000 From: python-dev@python.org (Tim Peters) Date: Mon, 3 Jul 2000 15:41:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mathmodule.c,2.49,2.50 Message-ID: <200007032241.PAA06739@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6711/python/dist/src/modules Modified Files: mathmodule.c Log Message: Typo repair in docstring -- my fault. Index: mathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v retrieving revision 2.49 retrieving revision 2.50 diff -C2 -r2.49 -r2.50 *** mathmodule.c 2000/07/03 18:11:56 2.49 --- mathmodule.c 2000/07/03 22:41:34 2.50 *************** *** 166,170 **** "frexp(x)\n\ \n\ ! Return the matissa and exponent of x, as pair (m, e).\n\ m is a float and e is an int, such that x = m * 2.**e.\n\ If x is 0, m and e are both 0. Else 0.5 <= abs(m) < 1.0."; --- 166,170 ---- "frexp(x)\n\ \n\ ! Return the mantissa and exponent of x, as pair (m, e).\n\ m is a float and e is an int, such that x = m * 2.**e.\n\ If x is 0, m and e are both 0. Else 0.5 <= abs(m) < 1.0."; From python-dev@python.org Tue Jul 4 00:51:19 2000 From: python-dev@python.org (Tim Peters) Date: Mon, 3 Jul 2000 16:51:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC import_nt.c,1.12,1.13 Message-ID: <200007032351.QAA16724@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv16659/python/dist/src/PC Modified Files: import_nt.c Log Message: Squash signed-vs-unsigned warning. Also edits to bring into line with Python coding stds (max line length, C-style comments). Index: import_nt.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/import_nt.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** import_nt.c 2000/06/28 22:20:06 1.12 --- import_nt.c 2000/07/03 23:51:17 1.13 *************** *** 9,19 **** #include "Python.h" #include "osdefs.h" #include #include "importdl.h" ! #include "malloc.h" // for alloca ! extern const char *PyWin_DLLVersionString; // a string loaded from the DLL at startup. ! FILE *PyWin_FindRegisteredModule( const char *moduleName, struct filedescr **ppFileDesc, char *pathBuf, int pathLen) { char *moduleKey; --- 9,24 ---- #include "Python.h" #include "osdefs.h" + #include #include #include "importdl.h" ! #include "malloc.h" /* for alloca */ ! /* a string loaded from the DLL at startup */ ! extern const char *PyWin_DLLVersionString; ! FILE *PyWin_FindRegisteredModule(const char *moduleName, ! struct filedescr **ppFileDesc, ! char *pathBuf, ! int pathLen) { char *moduleKey; *************** *** 21,25 **** const char keySuffix[] = "\\Modules\\"; #ifdef _DEBUG ! // In debugging builds, we _must_ have the debug version registered. const char debugString[] = "\\Debug"; #else --- 26,32 ---- const char keySuffix[] = "\\Modules\\"; #ifdef _DEBUG ! /* In debugging builds, we _must_ have the debug version ! * registered. ! */ const char debugString[] = "\\Debug"; #else *************** *** 32,53 **** long regStat; ! // Calculate the size for the sprintf buffer. ! // Get the size of the chars only, plus 1 NULL. ! size_t bufSize = sizeof(keyPrefix)-1 + strlen(PyWin_DLLVersionString) + sizeof(keySuffix) + strlen(moduleName) + sizeof(debugString) - 1; ! // alloca == no free required, but memory only local to fn, also no heap fragmentation! moduleKey = alloca(bufSize); ! sprintf(moduleKey, "Software\\Python\\PythonCore\\%s\\Modules\\%s%s", PyWin_DLLVersionString, moduleName, debugString); modNameSize = pathLen; regStat = RegQueryValue(keyBase, moduleKey, pathBuf, &modNameSize); ! if (regStat!=ERROR_SUCCESS) return NULL; ! // use the file extension to locate the type entry. for (fdp = _PyImport_Filetab; fdp->suffix != NULL; fdp++) { size_t extLen = strlen(fdp->suffix); ! if (modNameSize>extLen && strnicmp(pathBuf+(modNameSize-extLen-1),fdp->suffix,extLen)==0) break; } ! if (fdp->suffix==NULL) return NULL; fp = fopen(pathBuf, fdp->mode); --- 39,73 ---- long regStat; ! /* Calculate the size for the sprintf buffer. ! * Get the size of the chars only, plus 1 NULL. ! */ ! size_t bufSize = sizeof(keyPrefix)-1 + ! strlen(PyWin_DLLVersionString) + ! sizeof(keySuffix) + ! strlen(moduleName) + ! sizeof(debugString) - 1; ! /* alloca == no free required, but memory only local to fn, ! * also no heap fragmentation! ! */ moduleKey = alloca(bufSize); ! sprintf(moduleKey, ! "Software\\Python\\PythonCore\\%s\\Modules\\%s%s", ! PyWin_DLLVersionString, moduleName, debugString); modNameSize = pathLen; regStat = RegQueryValue(keyBase, moduleKey, pathBuf, &modNameSize); ! if (regStat != ERROR_SUCCESS) return NULL; ! /* use the file extension to locate the type entry. */ for (fdp = _PyImport_Filetab; fdp->suffix != NULL; fdp++) { size_t extLen = strlen(fdp->suffix); ! assert(modNameSize >= 0); /* else cast to size_t is wrong */ ! if ((size_t)modNameSize > extLen && ! strnicmp(pathBuf + ((size_t)modNameSize-extLen-1), ! fdp->suffix, ! extLen) == 0) break; } ! if (fdp->suffix == NULL) return NULL; fp = fopen(pathBuf, fdp->mode); *************** *** 56,58 **** return fp; } - --- 76,77 ---- From python-dev@python.org Tue Jul 4 04:38:13 2000 From: python-dev@python.org (Paul Prescod) Date: Mon, 3 Jul 2000 20:38:13 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_winreg.py,1.4,1.5 Message-ID: <200007040338.UAA21090@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv20965 Modified Files: test_winreg.py Log Message: Removed some tabs. Index: test_winreg.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_winreg.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_winreg.py 2000/06/29 19:42:00 1.4 --- test_winreg.py 2000/07/04 03:38:10 1.5 *************** *** 43,58 **** CloseKey(sub_key) try: ! QueryInfoKey(int_sub_key) ! raise RuntimeError, "It appears the CloseKey() function does not close the actual key!" except EnvironmentError: ! pass # ... and close that key that way :-) int_key = int(key) key.Close() try: ! QueryInfoKey(int_key) ! raise RuntimeError, "It appears the key.Close() function does not close the actual key!" except EnvironmentError: ! pass def ReadTestData(root_key): --- 43,58 ---- CloseKey(sub_key) try: ! QueryInfoKey(int_sub_key) ! raise RuntimeError, "It appears the CloseKey() function does not close the actual key!" except EnvironmentError: ! pass # ... and close that key that way :-) int_key = int(key) key.Close() try: ! QueryInfoKey(int_key) ! raise RuntimeError, "It appears the key.Close() function does not close the actual key!" except EnvironmentError: ! pass def ReadTestData(root_key): From python-dev@python.org Tue Jul 4 04:39:35 2000 From: python-dev@python.org (Paul Prescod) Date: Mon, 3 Jul 2000 20:39:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/dom minidom.py,1.3,1.4 pulldom.py,1.2,1.3 Message-ID: <200007040339.UAA21167@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv21106/dom Modified Files: minidom.py pulldom.py Log Message: Used original SAX handling form. Index: minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/minidom.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** minidom.py 2000/07/01 19:21:47 1.3 --- minidom.py 2000/07/04 03:39:33 1.4 *************** *** 42,46 **** if Node.debug==None: Node.debug=StringIO() ! #open( "debug4.out", "w" ) Node.debug.write( "create %s\n"%index ) --- 42,46 ---- if Node.debug==None: Node.debug=StringIO() ! #open( "debug4.out", "w" ) Node.debug.write( "create %s\n"%index ) *************** *** 231,235 **** assert isinstance( value, Attr ) or type( value )==types.StringType node=value ! old=self._attrs.get( attname, None) if old: old.unlink() --- 231,235 ---- assert isinstance( value, Attr ) or type( value )==types.StringType node=value ! old=self._attrs.get( attname, None) if old: old.unlink() Index: pulldom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/pulldom.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pulldom.py 2000/07/01 04:58:47 1.2 --- pulldom.py 2000/07/04 03:39:33 1.3 *************** *** 23,27 **** def setDocumentLocator( self, locator ): pass ! def startElement( self, tagName , attrs ): if not hasattr( self, "curNode" ): # FIXME: hack! --- 23,27 ---- def setDocumentLocator( self, locator ): pass ! def startElement( self, name, tagName , attrs ): if not hasattr( self, "curNode" ): # FIXME: hack! *************** *** 43,47 **** #self.events.append( (START_ELEMENT, node) ) ! def endElement( self, name ): node = self.curNode self.lastEvent[1]=[(END_ELEMENT, node), None ] --- 43,47 ---- #self.events.append( (START_ELEMENT, node) ) ! def endElement( self, name, tagName ): node = self.curNode self.lastEvent[1]=[(END_ELEMENT, node), None ] From python-dev@python.org Tue Jul 4 04:39:35 2000 From: python-dev@python.org (Paul Prescod) Date: Mon, 3 Jul 2000 20:39:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax expatreader.py,1.1,1.2 Message-ID: <200007040339.UAA21171@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv21106/sax Modified Files: expatreader.py Log Message: Used original SAX handling form. Index: expatreader.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/expatreader.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** expatreader.py 2000/06/29 19:34:54 1.1 --- expatreader.py 2000/07/04 03:39:33 1.2 *************** *** 102,107 **** else: self._parser = pyexpat.ParserCreate() ! self._parser.StartElementHandler = self._cont_handler.startElement ! self._parser.EndElementHandler = self._cont_handler.endElement self._parser.ProcessingInstructionHandler = \ --- 102,107 ---- else: self._parser = pyexpat.ParserCreate() ! self._parser.StartElementHandler = self.start_element ! self._parser.EndElementHandler = self.end_element self._parser.ProcessingInstructionHandler = \ *************** *** 134,156 **** return self._parser.GetBase() - # internal methods - # event handlers - def start_element(self, name, attrs): ! self._cont_handler.startElement(name, xmlreader.AttributesImpl(attrs, attrs)) def end_element(self, name): ! self._cont_handler.endElement(name) def start_element_ns(self, name, attrs): pair = split(name) if len(pair) == 1: ! tup = (None, name, None) else: ! tup = pair+[None] # prefix is not implemented yet! ! self._cont_handler.startElement(tup, xmlreader.AttributesImpl(attrs, None)) --- 134,153 ---- return self._parser.GetBase() # event handlers def start_element(self, name, attrs): ! self._cont_handler.startElement(name, name, xmlreader.AttributesImpl(attrs, attrs)) def end_element(self, name): ! self._cont_handler.endElement( name, name ) def start_element_ns(self, name, attrs): pair = split(name) if len(pair) == 1: ! tup = (None, name ) else: ! tup = pair ! self._cont_handler.startElement(tup, None, xmlreader.AttributesImpl(attrs, None)) *************** *** 162,170 **** name = pair+[None] # prefix is not implemented yet! ! self._cont_handler.endElement(name) def processing_instruction(self, target, data): self._cont_handler.processingInstruction(target, data) def character_data(self, data): self._cont_handler.characters(data) --- 159,169 ---- name = pair+[None] # prefix is not implemented yet! ! self._cont_handler.endElement(name, None) + # this is not used def processing_instruction(self, target, data): self._cont_handler.processingInstruction(target, data) + # this is not used def character_data(self, data): self._cont_handler.characters(data) From python-dev@python.org Tue Jul 4 05:15:55 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 3 Jul 2000 21:15:55 -0700 Subject: [Python-checkins] CVS: python/dist/src Makefile.in,1.90,1.91 Message-ID: <200007040415.VAA29247@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv29240 Modified Files: Makefile.in Log Message: libinstall: For the first bytecode compilation pass, use -tt instead of -t. This ensures that each installation from source is checked for compliance. This is needed to make sure .py files in the various Lib/plat-foo/ directories are tested even if the core developers do not have access to the corresponding platforms. Index: Makefile.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Makefile.in,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -r1.90 -r1.91 *** Makefile.in 2000/07/01 00:13:10 1.90 --- Makefile.in 2000/07/04 04:15:53 1.91 *************** *** 329,333 **** done PYTHONPATH=$(LIBDEST) \ ! ./python$(EXE) -t $(LIBDEST)/compileall.py $(LIBDEST) PYTHONPATH=$(LIBDEST) \ ./python$(EXE) -O $(LIBDEST)/compileall.py $(LIBDEST) --- 329,333 ---- done PYTHONPATH=$(LIBDEST) \ ! ./python$(EXE) -tt $(LIBDEST)/compileall.py $(LIBDEST) PYTHONPATH=$(LIBDEST) \ ./python$(EXE) -O $(LIBDEST)/compileall.py $(LIBDEST) From python-dev@python.org Tue Jul 4 08:10:08 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Tue, 4 Jul 2000 09:10:08 +0200 (CEST) Subject: [Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.165,2.166 codecs.c,2.8,2.9 compile.c,2.112,2.113 modsupport.c,2.45 In-Reply-To: <200007032139.OAA29276@slayer.i.sourceforge.net> from "Jack Jansen" at Jul 03, 2000 02:39:49 PM Message-ID: <200007040710.JAA16635@python.inrialpes.fr> This HAVE_LIMITS_H define spans over several files already. Why not putting it in Python.h and cleanup the rest? Jack Jansen wrote: > > Update of /cvsroot/python/python/dist/src/Python > In directory slayer.i.sourceforge.net:/tmp/cvs-serv29235/Python > > Modified Files: > bltinmodule.c codecs.c compile.c modsupport.c > Log Message: > Include limits.h if we have it. > > > Index: bltinmodule.c > =================================================================== > RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v > retrieving revision 2.165 > retrieving revision 2.166 > diff -C2 -r2.165 -r2.166 > *** bltinmodule.c 2000/06/30 23:58:05 2.165 > --- bltinmodule.c 2000/07/03 21:39:47 2.166 > *************** > *** 24,27 **** > --- 24,30 ---- > #include > #endif > + #ifdef HAVE_LIMITS_H > + #include > + #endif > > /* Forward */ > > Index: codecs.c > =================================================================== > RCS file: /cvsroot/python/python/dist/src/Python/codecs.c,v > retrieving revision 2.8 > retrieving revision 2.9 > diff -C2 -r2.8 -r2.9 > *** codecs.c 2000/06/29 14:50:15 2.8 > --- codecs.c 2000/07/03 21:39:47 2.9 > *************** > *** 11,14 **** > --- 11,17 ---- > #include "Python.h" > #include > + #ifdef HAVE_LIMITS_H > + #include > + #endif > > /* --- Globals ------------------------------------------------------------ */ > > Index: compile.c > =================================================================== > RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v > retrieving revision 2.112 > retrieving revision 2.113 > diff -C2 -r2.112 -r2.113 > *** compile.c 2000/06/30 23:58:06 2.112 > --- compile.c 2000/07/03 21:39:47 2.113 > *************** > *** 34,37 **** > --- 34,40 ---- > > #include > + #ifdef HAVE_LIMITS_H > + #include > + #endif > > /* Three symbols from graminit.h are also defined in Python.h, with > > Index: modsupport.c > =================================================================== > RCS file: /cvsroot/python/python/dist/src/Python/modsupport.c,v > retrieving revision 2.45 > retrieving revision 2.46 > diff -C2 -r2.45 -r2.46 > *** modsupport.c 2000/06/30 23:58:06 2.45 > --- modsupport.c 2000/07/03 21:39:47 2.46 > *************** > *** 12,15 **** > --- 12,18 ---- > > #include "Python.h" > + #ifdef HAVE_LIMITS_H > + #include > + #endif > > #ifdef MPW /* MPW pushes 'extended' for float and double types with varargs */ > > > _______________________________________________ > Python-checkins mailing list > Python-checkins@python.org > http://www.python.org/mailman/listinfo/python-checkins > -- Vladimir MARANGOZOV | Vladimir.Marangozov@inrialpes.fr http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252 From python-dev@python.org Tue Jul 4 10:51:10 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Tue, 4 Jul 2000 02:51:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.33,2.34 Message-ID: <200007040951.CAA16669@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv16660/Objects Modified Files: unicodeobject.c Log Message: Bill Tutt: Make unicode_compare a true UTF-16 compare function (includes support for surrogates). Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -r2.33 -r2.34 *** unicodeobject.c 2000/06/30 14:58:20 2.33 --- unicodeobject.c 2000/07/04 09:51:07 2.34 *************** *** 3046,3053 **** --- 3046,3066 ---- } + /* speedy UTF-16 code point order comparison */ + /* gleaned from: */ + /* http://www-4.ibm.com/software/developer/library/utf16.html?dwzone=unicode */ + + static unsigned short utf16Fixup[32] = + { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0x2000, 0xf800, 0xf800, 0xf800, 0xf800 + }; + static int unicode_compare(PyUnicodeObject *str1, PyUnicodeObject *str2) { int len1, len2; + Py_UNICODE *s1 = str1->str; Py_UNICODE *s2 = str2->str; *************** *** 3055,3065 **** len1 = str1->length; len2 = str2->length; ! while (len1 > 0 && len2 > 0) { ! int cmp = (*s1++) - (*s2++); ! if (cmp) ! /* This should make Christian happy! */ ! return (cmp < 0) ? -1 : (cmp != 0); ! len1--, len2--; } --- 3068,3088 ---- len1 = str1->length; len2 = str2->length; ! while (len1 > 0 && len2 > 0) { ! unsigned short c1, c2; /* 16 bits */ ! int diff; /* 32 bits */ ! ! c1 = *s1++; ! c2 = *s2++; ! if (c1 > (1<<11) * 26) ! c1 += utf16Fixup[c1>>11]; ! if (c2 > (1<<11) * 26) ! c2 += utf16Fixup[c2>>11]; ! ! /* now c1 and c2 are in UTF-32-compatible order */ ! diff = (int)c1 - (int)c2; ! if (diff) ! return (diff < 0) ? -1 : (diff != 0); ! len1--; len2--; } From python-dev@python.org Tue Jul 4 15:17:36 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Tue, 4 Jul 2000 07:17:36 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules signalmodule.c,2.43,2.44 Message-ID: <200007041417.HAA12986@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv12979/Modules Modified Files: signalmodule.c Log Message: Fixed symbol search for defining NSIG. It now also checks _NSIG which some C libs define (e.g. glibc). Added a fallback default value for NSIG which hopefully provides enough room for signal slots. Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.43 retrieving revision 2.44 diff -C2 -r2.43 -r2.44 *** signalmodule.c 2000/06/30 23:58:05 2.43 --- signalmodule.c 2000/07/04 14:17:33 2.44 *************** *** 36,44 **** #ifndef NSIG ! #ifdef _SIGMAX ! #define NSIG (_SIGMAX + 1) /* For QNX */ ! #else ! #define NSIG (SIGMAX + 1) /* for djgpp */ ! #endif #endif --- 36,48 ---- #ifndef NSIG ! # if defined(_NSIG) ! # define NSIG _NSIG /* For BSD/SysV */ ! # elif defined(_SIGMAX) ! # define NSIG (_SIGMAX + 1) /* For QNX */ ! # elif defined(SIGMAX) ! # define NSIG (SIGMAX + 1) /* For djgpp */ ! # else ! # define NSIG 64 /* Use a reasonable default value */ ! # endif #endif From python-dev@python.org Tue Jul 4 15:53:14 2000 From: python-dev@python.org (Sjoerd Mullender) Date: Tue, 4 Jul 2000 07:53:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib xmllib.py,1.19,1.20 Message-ID: <200007041453.HAA15566@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv15231 Modified Files: xmllib.py Log Message: 2 fixes plus one extension: - Actually count the linefeeds in a the CDATA content. - Don't call the endtag handler for an unmatched endtag (this makes the base class simpler since it doesn't have to deal with unopened endtags). - If the __init__ method is called with keyword argument translate_attribute_references=0, don't attempt to translate character and entity references in attribute values. Index: xmllib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xmllib.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** xmllib.py 2000/06/28 14:48:01 1.19 --- xmllib.py 2000/07/04 14:53:12 1.20 *************** *** 91,94 **** --- 91,95 ---- __map_case = 0 __accept_utf8 = 0 + __translate_attribute_references = 1 # Interface -- initialize and reset this instance *************** *** 103,106 **** --- 104,109 ---- if kw.has_key('accept_utf8'): self.__accept_utf8 = kw['accept_utf8'] + if kw.has_key('translate_attribute_references'): + self.__translate_attribute_references = kw['translate_attribute_references'] self.reset() *************** *** 172,175 **** --- 175,180 ---- # Interface -- translate references def translate_references(self, data, all = 1): + if not self.__translate_attribute_references: + return data i = 0 while 1: *************** *** 278,282 **** k = self.parse_cdata(i) if k < 0: break ! self.lineno = self.lineno + string.count(rawdata[i:i], '\n') i = k continue --- 283,287 ---- k = self.parse_cdata(i) if k < 0: break ! self.lineno = self.lineno + string.count(rawdata[i:k], '\n') i = k continue *************** *** 692,700 **** if found == -1: self.syntax_error('unopened end tag') - method = self.elements.get(tag, (None, None))[1] - if method is not None: - self.handle_endtag(tag, method) - else: - self.unknown_endtag(tag) return while len(self.stack) > found: --- 697,700 ---- From python-dev@python.org Tue Jul 4 15:53:45 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 4 Jul 2000 07:53:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules pyexpat.c,2.6,2.7 Message-ID: <200007041453.HAA15606@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv15552 Modified Files: pyexpat.c Log Message: Fixes for compilation problems on Tru64 reported by Mark Favas Index: pyexpat.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pyexpat.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** pyexpat.c 2000/06/30 23:50:38 2.6 --- pyexpat.c 2000/07/04 14:53:43 2.7 *************** *** 67,71 **** }; ! staticforward struct HandlerInfo handler_info[]; /* Convert an array of attributes and their values into a Python dict */ --- 67,71 ---- }; ! staticforward struct HandlerInfo handler_info[64]; /* Convert an array of attributes and their values into a Python dict */ *************** *** 985,1031 **** {{"StartElementHandler", pyxml_SetStartElementHandler, ! my_StartElementHandler}, {"EndElementHandler", pyxml_SetEndElementHandler, ! my_EndElementHandler}, {"ProcessingInstructionHandler", (xmlhandlersetter)XML_SetProcessingInstructionHandler, ! my_ProcessingInstructionHandler}, {"CharacterDataHandler", (xmlhandlersetter)XML_SetCharacterDataHandler, ! my_CharacterDataHandler}, {"UnparsedEntityDeclHandler", (xmlhandlersetter)XML_SetUnparsedEntityDeclHandler, ! my_UnparsedEntityDeclHandler }, {"NotationDeclHandler", (xmlhandlersetter)XML_SetNotationDeclHandler, ! my_NotationDeclHandler }, {"StartNamespaceDeclHandler", pyxml_SetStartNamespaceDeclHandler, ! my_StartNamespaceDeclHandler }, {"EndNamespaceDeclHandler", pyxml_SetEndNamespaceDeclHandler, ! my_EndNamespaceDeclHandler }, {"CommentHandler", (xmlhandlersetter)XML_SetCommentHandler, ! my_CommentHandler}, {"StartCdataSectionHandler", pyxml_SetStartCdataSection, ! my_StartCdataSectionHandler}, {"EndCdataSectionHandler", pyxml_SetEndCdataSection, ! my_EndCdataSectionHandler}, {"DefaultHandler", (xmlhandlersetter)XML_SetDefaultHandler, ! my_DefaultHandler}, {"DefaultHandlerExpand", (xmlhandlersetter)XML_SetDefaultHandlerExpand, ! my_DefaultHandlerExpandHandler}, {"NotStandaloneHandler", (xmlhandlersetter)XML_SetNotStandaloneHandler, ! my_NotStandaloneHandler}, {"ExternalEntityRefHandler", (xmlhandlersetter)XML_SetExternalEntityRefHandler, ! my_ExternalEntityRefHandler }, {NULL, NULL, NULL } /* sentinel */ --- 985,1031 ---- {{"StartElementHandler", pyxml_SetStartElementHandler, ! (xmlhandler)my_StartElementHandler}, {"EndElementHandler", pyxml_SetEndElementHandler, ! (xmlhandler)my_EndElementHandler}, {"ProcessingInstructionHandler", (xmlhandlersetter)XML_SetProcessingInstructionHandler, ! (xmlhandler)my_ProcessingInstructionHandler}, {"CharacterDataHandler", (xmlhandlersetter)XML_SetCharacterDataHandler, ! (xmlhandler)my_CharacterDataHandler}, {"UnparsedEntityDeclHandler", (xmlhandlersetter)XML_SetUnparsedEntityDeclHandler, ! (xmlhandler)my_UnparsedEntityDeclHandler }, {"NotationDeclHandler", (xmlhandlersetter)XML_SetNotationDeclHandler, ! (xmlhandler)my_NotationDeclHandler }, {"StartNamespaceDeclHandler", pyxml_SetStartNamespaceDeclHandler, ! (xmlhandler)my_StartNamespaceDeclHandler }, {"EndNamespaceDeclHandler", pyxml_SetEndNamespaceDeclHandler, ! (xmlhandler)my_EndNamespaceDeclHandler }, {"CommentHandler", (xmlhandlersetter)XML_SetCommentHandler, ! (xmlhandler)my_CommentHandler}, {"StartCdataSectionHandler", pyxml_SetStartCdataSection, ! (xmlhandler)my_StartCdataSectionHandler}, {"EndCdataSectionHandler", pyxml_SetEndCdataSection, ! (xmlhandler)my_EndCdataSectionHandler}, {"DefaultHandler", (xmlhandlersetter)XML_SetDefaultHandler, ! (xmlhandler)my_DefaultHandler}, {"DefaultHandlerExpand", (xmlhandlersetter)XML_SetDefaultHandlerExpand, ! (xmlhandler)my_DefaultHandlerExpandHandler}, {"NotStandaloneHandler", (xmlhandlersetter)XML_SetNotStandaloneHandler, ! (xmlhandler)my_NotStandaloneHandler}, {"ExternalEntityRefHandler", (xmlhandlersetter)XML_SetExternalEntityRefHandler, ! (xmlhandler)my_ExternalEntityRefHandler }, {NULL, NULL, NULL } /* sentinel */ From python-dev@python.org Tue Jul 4 18:44:50 2000 From: python-dev@python.org (Tim Peters) Date: Tue, 4 Jul 2000 10:44:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include dictobject.h,2.18,2.19 Message-ID: <200007041744.KAA12843@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv12647/python/dist/src/Include Modified Files: dictobject.h Log Message: Removed Py_PROTO and switched to ANSI C declarations in the dict implementation. This was really to test whether my new CVS+SSH setup is more usable than the old one -- and turns out it is (for whatever reason, it was impossible to do a commit before that involved more than one directory). Index: dictobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/dictobject.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** dictobject.h 2000/06/30 23:58:04 2.18 --- dictobject.h 2000/07/04 17:44:48 2.19 *************** *** 21,41 **** #define PyDict_Check(op) ((op)->ob_type == &PyDict_Type) ! extern DL_IMPORT(PyObject *) PyDict_New Py_PROTO((void)); ! extern DL_IMPORT(PyObject *) PyDict_GetItem Py_PROTO((PyObject *mp, PyObject *key)); ! extern DL_IMPORT(int) PyDict_SetItem Py_PROTO((PyObject *mp, PyObject *key, PyObject *item)); ! extern DL_IMPORT(int) PyDict_DelItem Py_PROTO((PyObject *mp, PyObject *key)); ! extern DL_IMPORT(void) PyDict_Clear Py_PROTO((PyObject *mp)); extern DL_IMPORT(int) PyDict_Next ! Py_PROTO((PyObject *mp, int *pos, PyObject **key, PyObject **value)); ! extern DL_IMPORT(PyObject *) PyDict_Keys Py_PROTO((PyObject *mp)); ! extern DL_IMPORT(PyObject *) PyDict_Values Py_PROTO((PyObject *mp)); ! extern DL_IMPORT(PyObject *) PyDict_Items Py_PROTO((PyObject *mp)); ! extern DL_IMPORT(int) PyDict_Size Py_PROTO((PyObject *mp)); ! extern DL_IMPORT(PyObject *) PyDict_Copy Py_PROTO((PyObject *mp)); ! extern DL_IMPORT(PyObject *) PyDict_GetItemString Py_PROTO((PyObject *dp, char *key)); ! extern DL_IMPORT(int) PyDict_SetItemString Py_PROTO((PyObject *dp, char *key, PyObject *item)); ! extern DL_IMPORT(int) PyDict_DelItemString Py_PROTO((PyObject *dp, char *key)); #ifdef __cplusplus --- 21,41 ---- #define PyDict_Check(op) ((op)->ob_type == &PyDict_Type) ! extern DL_IMPORT(PyObject *) PyDict_New(void); ! extern DL_IMPORT(PyObject *) PyDict_GetItem(PyObject *mp, PyObject *key); ! extern DL_IMPORT(int) PyDict_SetItem(PyObject *mp, PyObject *key, PyObject *item); ! extern DL_IMPORT(int) PyDict_DelItem(PyObject *mp, PyObject *key); ! extern DL_IMPORT(void) PyDict_Clear(PyObject *mp); extern DL_IMPORT(int) PyDict_Next ! (PyObject *mp, int *pos, PyObject **key, PyObject **value); ! extern DL_IMPORT(PyObject *) PyDict_Keys(PyObject *mp); ! extern DL_IMPORT(PyObject *) PyDict_Values(PyObject *mp); ! extern DL_IMPORT(PyObject *) PyDict_Items(PyObject *mp); ! extern DL_IMPORT(int) PyDict_Size(PyObject *mp); ! extern DL_IMPORT(PyObject *) PyDict_Copy(PyObject *mp); ! extern DL_IMPORT(PyObject *) PyDict_GetItemString(PyObject *dp, char *key); ! extern DL_IMPORT(int) PyDict_SetItemString(PyObject *dp, char *key, PyObject *item); ! extern DL_IMPORT(int) PyDict_DelItemString(PyObject *dp, char *key); #ifdef __cplusplus From python-dev@python.org Tue Jul 4 18:44:50 2000 From: python-dev@python.org (Tim Peters) Date: Tue, 4 Jul 2000 10:44:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects dictobject.c,2.58,2.59 Message-ID: <200007041744.KAA12847@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv12647/python/dist/src/Objects Modified Files: dictobject.c Log Message: Removed Py_PROTO and switched to ANSI C declarations in the dict implementation. This was really to test whether my new CVS+SSH setup is more usable than the old one -- and turns out it is (for whatever reason, it was impossible to do a commit before that involved more than one directory). Index: dictobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/dictobject.c,v retrieving revision 2.58 retrieving revision 2.59 diff -C2 -r2.58 -r2.59 *** dictobject.c 2000/07/01 01:00:38 2.58 --- dictobject.c 2000/07/04 17:44:48 2.59 *************** *** 131,140 **** Jyrki Alakuijala and Vladimir Marangozov.) */ - static dictentry *lookdict Py_PROTO((dictobject *, PyObject *, long)); static dictentry * ! lookdict(mp, key, hash) ! dictobject *mp; ! PyObject *key; ! register long hash; { register int i; --- 131,136 ---- Jyrki Alakuijala and Vladimir Marangozov.) */ static dictentry * ! lookdict(dictobject *mp, PyObject *key, register long hash) { register int i; *************** *** 200,211 **** Eats a reference to key and one to value. */ - static void insertdict - Py_PROTO((dictobject *, PyObject *, long, PyObject *)); static void ! insertdict(mp, key, hash, value) ! register dictobject *mp; ! PyObject *key; ! long hash; ! PyObject *value; { PyObject *old_value; --- 196,201 ---- Eats a reference to key and one to value. */ static void ! insertdict(register dictobject *mp, PyObject *key, long hash, PyObject *value) { PyObject *old_value; *************** *** 235,243 **** actually be smaller than the old one. */ - static int dictresize Py_PROTO((dictobject *, int)); static int ! dictresize(mp, minused) ! dictobject *mp; ! int minused; { register int oldsize = mp->ma_size; --- 225,230 ---- actually be smaller than the old one. */ static int ! dictresize(dictobject *mp, int minused) { register int oldsize = mp->ma_size; *************** *** 288,294 **** PyObject * ! PyDict_GetItem(op, key) ! PyObject *op; ! PyObject *key; { long hash; --- 275,279 ---- PyObject * ! PyDict_GetItem(PyObject *op, PyObject *key) { long hash; *************** *** 313,320 **** int ! PyDict_SetItem(op, key, value) ! register PyObject *op; ! PyObject *key; ! PyObject *value; { register dictobject *mp; --- 298,302 ---- int ! PyDict_SetItem(register PyObject *op, PyObject *key, PyObject *value) { register dictobject *mp; *************** *** 361,367 **** int ! PyDict_DelItem(op, key) ! PyObject *op; ! PyObject *key; { register dictobject *mp; --- 343,347 ---- int ! PyDict_DelItem(PyObject *op, PyObject *key) { register dictobject *mp; *************** *** 404,409 **** void ! PyDict_Clear(op) ! PyObject *op; { int i, n; --- 384,388 ---- void ! PyDict_Clear(PyObject *op) { int i, n; *************** *** 427,435 **** int ! PyDict_Next(op, ppos, pkey, pvalue) ! PyObject *op; ! int *ppos; ! PyObject **pkey; ! PyObject **pvalue; { int i; --- 406,410 ---- int ! PyDict_Next(PyObject *op, int *ppos, PyObject **pkey, PyObject **pvalue) { int i; *************** *** 456,461 **** static void ! dict_dealloc(mp) ! register dictobject *mp; { register int i; --- 431,435 ---- static void ! dict_dealloc(register dictobject *mp) { register int i; *************** *** 479,486 **** static int ! dict_print(mp, fp, flags) ! register dictobject *mp; ! register FILE *fp; ! register int flags; { register int i; --- 453,457 ---- static int ! dict_print(register dictobject *mp, register FILE *fp, register int flags) { register int i; *************** *** 519,524 **** static PyObject * ! dict_repr(mp) ! dictobject *mp; { auto PyObject *v; --- 490,494 ---- static PyObject * ! dict_repr(dictobject *mp) { auto PyObject *v; *************** *** 556,561 **** static int ! dict_length(mp) ! dictobject *mp; { return mp->ma_used; --- 526,530 ---- static int ! dict_length(dictobject *mp) { return mp->ma_used; *************** *** 563,569 **** static PyObject * ! dict_subscript(mp, key) ! dictobject *mp; ! register PyObject *key; { PyObject *v; --- 532,536 ---- static PyObject * ! dict_subscript(dictobject *mp, register PyObject *key) { PyObject *v; *************** *** 591,597 **** static int ! dict_ass_sub(mp, v, w) ! dictobject *mp; ! PyObject *v, *w; { if (w == NULL) --- 558,562 ---- static int ! dict_ass_sub(dictobject *mp, PyObject *v, PyObject *w) { if (w == NULL) *************** *** 608,614 **** static PyObject * ! dict_keys(mp, args) ! register dictobject *mp; ! PyObject *args; { register PyObject *v; --- 573,577 ---- static PyObject * ! dict_keys(register dictobject *mp, PyObject *args) { register PyObject *v; *************** *** 631,637 **** static PyObject * ! dict_values(mp, args) ! register dictobject *mp; ! PyObject *args; { register PyObject *v; --- 594,598 ---- static PyObject * ! dict_values(register dictobject *mp, PyObject *args) { register PyObject *v; *************** *** 654,660 **** static PyObject * ! dict_items(mp, args) ! register dictobject *mp; ! PyObject *args; { register PyObject *v; --- 615,619 ---- static PyObject * ! dict_items(register dictobject *mp, PyObject *args) { register PyObject *v; *************** *** 686,692 **** static PyObject * ! dict_update(mp, args) ! register dictobject *mp; ! PyObject *args; { register int i; --- 645,649 ---- static PyObject * ! dict_update(register dictobject *mp, PyObject *args) { register int i; *************** *** 719,725 **** static PyObject * ! dict_copy(mp, args) ! register dictobject *mp; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 676,680 ---- static PyObject * ! dict_copy(register dictobject *mp, PyObject *args) { if (!PyArg_Parse(args, "")) *************** *** 729,734 **** PyObject * ! PyDict_Copy(o) ! PyObject *o; { register dictobject *mp; --- 684,688 ---- PyObject * ! PyDict_Copy(PyObject *o) { register dictobject *mp; *************** *** 762,767 **** int ! PyDict_Size(mp) ! PyObject *mp; { if (mp == NULL || !PyDict_Check(mp)) { --- 716,720 ---- int ! PyDict_Size(PyObject *mp) { if (mp == NULL || !PyDict_Check(mp)) { *************** *** 773,778 **** PyObject * ! PyDict_Keys(mp) ! PyObject *mp; { if (mp == NULL || !PyDict_Check(mp)) { --- 726,730 ---- PyObject * ! PyDict_Keys(PyObject *mp) { if (mp == NULL || !PyDict_Check(mp)) { *************** *** 784,789 **** PyObject * ! PyDict_Values(mp) ! PyObject *mp; { if (mp == NULL || !PyDict_Check(mp)) { --- 736,740 ---- PyObject * ! PyDict_Values(PyObject *mp) { if (mp == NULL || !PyDict_Check(mp)) { *************** *** 795,800 **** PyObject * ! PyDict_Items(mp) ! PyObject *mp; { if (mp == NULL || !PyDict_Check(mp)) { --- 746,750 ---- PyObject * ! PyDict_Items(PyObject *mp) { if (mp == NULL || !PyDict_Check(mp)) { *************** *** 814,821 **** static PyObject * ! characterize(a, b, pval) ! dictobject *a; ! dictobject *b; ! PyObject **pval; { PyObject *diff = NULL; --- 764,768 ---- static PyObject * ! characterize(dictobject *a, dictobject *b, PyObject **pval) { PyObject *diff = NULL; *************** *** 844,849 **** static int ! dict_compare(a, b) ! dictobject *a, *b; { PyObject *adiff, *bdiff, *aval, *bval; --- 791,795 ---- static int ! dict_compare(dictobject *a, dictobject *b) { PyObject *adiff, *bdiff, *aval, *bval; *************** *** 874,879 **** static int ! dict_compare(a, b) ! dictobject *a, *b; { PyObject *akeys, *bkeys; --- 820,824 ---- static int ! dict_compare(dictobject *a, dictobject *b) { PyObject *akeys, *bkeys; *************** *** 953,959 **** static PyObject * ! dict_has_key(mp, args) ! register dictobject *mp; ! PyObject *args; { PyObject *key; --- 898,902 ---- static PyObject * ! dict_has_key(register dictobject *mp, PyObject *args) { PyObject *key; *************** *** 976,982 **** static PyObject * ! dict_get(mp, args) ! register dictobject *mp; ! PyObject *args; { PyObject *key; --- 919,923 ---- static PyObject * ! dict_get(register dictobject *mp, PyObject *args) { PyObject *key; *************** *** 1010,1016 **** static PyObject * ! dict_clear(mp, args) ! register dictobject *mp; ! PyObject *args; { if (!PyArg_NoArgs(args)) --- 951,955 ---- static PyObject * ! dict_clear(register dictobject *mp, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 1059,1065 **** static PyObject * ! dict_getattr(mp, name) ! dictobject *mp; ! char *name; { return Py_FindMethod(mapp_methods, (PyObject *)mp, name); --- 998,1002 ---- static PyObject * ! dict_getattr(dictobject *mp, char *name) { return Py_FindMethod(mapp_methods, (PyObject *)mp, name); *************** *** 1096,1102 **** PyObject * ! PyDict_GetItemString(v, key) ! PyObject *v; ! char *key; { PyObject *kv, *rv; --- 1033,1037 ---- PyObject * ! PyDict_GetItemString(PyObject *v, char *key) { PyObject *kv, *rv; *************** *** 1110,1117 **** int ! PyDict_SetItemString(v, key, item) ! PyObject *v; ! char *key; ! PyObject *item; { PyObject *kv; --- 1045,1049 ---- int ! PyDict_SetItemString(PyObject *v, char *key, PyObject *item) { PyObject *kv; *************** *** 1127,1133 **** int ! PyDict_DelItemString(v, key) ! PyObject *v; ! char *key; { PyObject *kv; --- 1059,1063 ---- int ! PyDict_DelItemString(PyObject *v, char *key) { PyObject *kv; From python-dev@python.org Tue Jul 4 19:48:49 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 4 Jul 2000 11:48:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules parsermodule.c,2.42,2.43 Message-ID: <200007041848.LAA23784@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv23771 Modified Files: parsermodule.c Log Message: Remove warning about local variable possibly being using uninitialized; noted by Marc-Andre Lemburg . Index: parsermodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v retrieving revision 2.42 retrieving revision 2.43 diff -C2 -r2.42 -r2.43 *** parsermodule.c 2000/07/03 18:07:43 2.42 --- parsermodule.c 2000/07/04 18:48:46 2.43 *************** *** 2087,2091 **** { int nch = NCH(tree); ! int i, ok; node *last; --- 2087,2091 ---- { int nch = NCH(tree); ! int i, ok = 1; node *last; From python-dev@python.org Wed Jul 5 00:51:33 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 4 Jul 2000 16:51:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules pyexpat.c,2.7,2.8 Message-ID: <200007042351.QAA13057@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv13050 Modified Files: pyexpat.c Log Message: pyexpat.errors is a *strange* module! It gets initialized when pyexpat is imported, and is only accessible as an attribute of pyexpat; it cannot be imported itself. This allows it to at least be importable after pyexpat itself has been imported by adding it to sys.modules, so it is not quite as strange. This arrangement needs to be better thought out. Index: pyexpat.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pyexpat.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** pyexpat.c 2000/07/04 14:53:43 2.7 --- pyexpat.c 2000/07/04 23:51:31 2.8 *************** *** 841,853 **** initpyexpat(){ PyObject *m, *d; ! char *rev="$Revision$"; PyObject *errors_module, *errors_dict; ! Xmlparsetype.ob_type = &PyType_Type; /* Create the module and add the functions */ m = Py_InitModule4("pyexpat", pyexpat_methods, ! pyexpat_module_documentation, ! (PyObject*)NULL,PYTHON_API_VERSION); /* Add some symbolic constants to the module */ --- 841,854 ---- initpyexpat(){ PyObject *m, *d; ! char *rev = "$Revision$"; PyObject *errors_module, *errors_dict; + PyObject *sys_modules; ! Xmlparsetype.ob_type = &PyType_Type; /* Create the module and add the functions */ m = Py_InitModule4("pyexpat", pyexpat_methods, ! pyexpat_module_documentation, ! (PyObject*)NULL, PYTHON_API_VERSION); /* Add some symbolic constants to the module */ *************** *** 856,865 **** PyDict_SetItemString(d, "error", ErrorObject); ! PyDict_SetItemString(d,"__version__", PyString_FromStringAndSize(rev+11, strlen(rev+11)-2)); ! errors_module=PyModule_New( "errors" ); ! PyDict_SetItemString(d,"errors", errors_module ); /* XXX When Expat supports some way of figuring out how it was --- 857,868 ---- PyDict_SetItemString(d, "error", ErrorObject); ! PyDict_SetItemString(d, "__version__", PyString_FromStringAndSize(rev+11, strlen(rev+11)-2)); ! sys_modules = PySys_GetObject("modules"); ! errors_module = PyModule_New("pyexpat.errors"); ! PyDict_SetItemString(d, "errors", errors_module); ! PyDict_SetItemString(sys_modules, "pyexpat.errors", errors_module); /* XXX When Expat supports some way of figuring out how it was *************** *** 868,879 **** */ PyDict_SetItemString(d, "native_encoding", ! PyString_FromString("UTF-8") ); ! ! errors_dict=PyModule_GetDict( errors_module ); #define MYCONST(name) \ PyDict_SetItemString(errors_dict, #name, \ ! PyString_FromString( XML_ErrorString(name))) ! MYCONST(XML_ERROR_NO_MEMORY); MYCONST(XML_ERROR_SYNTAX); --- 871,881 ---- */ PyDict_SetItemString(d, "native_encoding", ! PyString_FromString("UTF-8")); ! errors_dict = PyModule_GetDict(errors_module); #define MYCONST(name) \ PyDict_SetItemString(errors_dict, #name, \ ! PyString_FromString(XML_ErrorString(name))) ! MYCONST(XML_ERROR_NO_MEMORY); MYCONST(XML_ERROR_SYNTAX); *************** *** 895,899 **** MYCONST(XML_ERROR_UNKNOWN_ENCODING); MYCONST(XML_ERROR_INCORRECT_ENCODING); ! /* Check for errors */ if (PyErr_Occurred()) --- 897,901 ---- MYCONST(XML_ERROR_UNKNOWN_ENCODING); MYCONST(XML_ERROR_INCORRECT_ENCODING); ! /* Check for errors */ if (PyErr_Occurred()) *************** *** 1031,1033 **** {NULL, NULL, NULL } /* sentinel */ }; - --- 1033,1034 ---- From python-dev@python.org Wed Jul 5 03:03:37 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 4 Jul 2000 19:03:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libpyexpat.tex,1.1,1.2 Message-ID: <200007050203.TAA06866@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv6859 Modified Files: libpyexpat.tex Log Message: Wrapped some long lines. Cleaned up the table of error constants defined in pyexpat.errors; an extra pair of braces had pretty much destroyed the table! (Not sure why.) Moved the pyexpat.errors module documentation into a \section with the proper headers for a module. Index: libpyexpat.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpyexpat.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** libpyexpat.tex 2000/06/11 02:42:07 1.1 --- libpyexpat.tex 2000/07/05 02:03:34 1.2 *************** *** 69,73 **** Parses the contents of the string \var{data}, calling the appropriate handler functions to process the parsed data. \var{isfinal} must be ! true on the final call to this method. \var{data} can be the empty string at any time. \end{methoddesc} --- 69,74 ---- Parses the contents of the string \var{data}, calling the appropriate handler functions to process the parsed data. \var{isfinal} must be ! true on the final call to this method. \var{data} can be the empty ! string at any time. \end{methoddesc} *************** *** 117,121 **** Here is the list of handlers that can be set. To set a handler on an ! \class{xmlparser} object \var{o}, use \code{\var{o}.\var{handlername} = \var{func}}. \var{handlername} must be taken from the following list, and \var{func} must be a callable object accepting the correct number of arguments. The arguments are all strings, unless otherwise stated. \begin{methoddesc}{StartElementHandler}{name, attributes} --- 118,126 ---- Here is the list of handlers that can be set. To set a handler on an ! \class{xmlparser} object \var{o}, use ! \code{\var{o}.\var{handlername} = \var{func}}. \var{handlername} must ! be taken from the following list, and \var{func} must be a callable ! object accepting the correct number of arguments. The arguments are ! all strings, unless otherwise stated. \begin{methoddesc}{StartElementHandler}{name, attributes} *************** *** 188,224 **** ! ! ! \subsection{\module{pyexpat.errors} -- Error constants} ! ! The following table lists the error constants in the ! \module{pyexpat.errors} submodule, available once the \module{pyexpat} module has been imported. ! ! \begin{tableii}{l|l}{code}{Constants}{}{} ! \lineii {XML_ERROR_ASYNC_ENTITY} ! {XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF} ! \lineii {XML_ERROR_BAD_CHAR_REF} ! {XML_ERROR_BINARY_ENTITY_REF} ! \lineii {XML_ERROR_DUPLICATE_ATTRIBUTE} ! {XML_ERROR_INCORRECT_ENCODING} ! \lineii {XML_ERROR_INVALID_TOKEN} ! {XML_ERROR_JUNK_AFTER_DOC_ELEMENT} ! \lineii {XML_ERROR_MISPLACED_XML_PI} ! {XML_ERROR_NO_ELEMENTS} ! \lineii {XML_ERROR_NO_MEMORY} ! {XML_ERROR_PARAM_ENTITY_REF} ! \lineii {XML_ERROR_PARTIAL_CHAR} ! {XML_ERROR_RECURSIVE_ENTITY_REF} ! \lineii {XML_ERROR_SYNTAX} ! {XML_ERROR_TAG_MISMATCH} ! \lineii {XML_ERROR_UNCLOSED_TOKEN} ! {XML_ERROR_UNDEFINED_ENTITY} ! \lineii {XML_ERROR_UNKNOWN_ENCODING}{} ! \end{tableii} ! ! \subsection{Example} ! ! The following program defines 3 handlers that just print out their arguments. --- 193,199 ---- + \subsection{Example \label{pyexpat-example}} ! The following program defines three handlers that just print out their arguments. *************** *** 261,262 **** --- 236,276 ---- End element: parent \end{verbatim} + + + \section{\module{pyexpat.errors} --- Error constants} + + \declaremodule{builtin}{pyexpat.errors} + \modulesynopsis{Error constants defined for the Expat parser} + \moduleauthor{Paul Prescod}{paul@prescod.net} + \sectionauthor{A.M. Kuchling}{amk1@bigfoot.com} + + The following table lists the error constants in the + \module{pyexpat.errors} submodule, available once the + \refmodule{pyexpat} module has been imported. + + Note that this module cannot be imported directly until + \refmodule{pyexpat} has been imported. + + The following constants are defined: + + \begin{tableii}{l|l}{code}{Constants}{} + \lineii{XML_ERROR_ASYNC_ENTITY} + {XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF} + \lineii{XML_ERROR_BAD_CHAR_REF} + {XML_ERROR_BINARY_ENTITY_REF} + \lineii{XML_ERROR_DUPLICATE_ATTRIBUTE} + {XML_ERROR_INCORRECT_ENCODING} + \lineii{XML_ERROR_INVALID_TOKEN} + {XML_ERROR_JUNK_AFTER_DOC_ELEMENT} + \lineii{XML_ERROR_MISPLACED_XML_PI} + {XML_ERROR_NO_ELEMENTS} + \lineii{XML_ERROR_NO_MEMORY} + {XML_ERROR_PARAM_ENTITY_REF} + \lineii{XML_ERROR_PARTIAL_CHAR} + {XML_ERROR_RECURSIVE_ENTITY_REF} + \lineii{XML_ERROR_SYNTAX} + {XML_ERROR_TAG_MISMATCH} + \lineii{XML_ERROR_UNCLOSED_TOKEN} + {XML_ERROR_UNDEFINED_ENTITY} + \lineii{XML_ERROR_UNKNOWN_ENCODING}{} + \end{tableii} From python-dev@python.org Wed Jul 5 03:24:41 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 4 Jul 2000 19:24:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib markup.tex,NONE,1.1 lib.tex,1.154,1.155 Message-ID: <200007050224.TAA08029@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv8017/lib Modified Files: lib.tex Added Files: markup.tex Log Message: Created a new chapter on structured markup processing, including the existing SGML, HTML, & XML support, and providing a home for the new XML support as it becomes documented. --- NEW FILE --- \chapter{Structured Markup Processing Tools \label{markup}} Python supports a variety of modules to work with various forms of structured data markup. This includes modules to work with the Standard Generalized Markup Language (SGML) and the Hypertext Markup Language (HTML), and several interfaces for working with the Extensible Markup Language (XML). \localmoduletable Index: lib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/lib.tex,v retrieving revision 1.154 retrieving revision 1.155 diff -C2 -r1.154 -r1.155 *** lib.tex 2000/06/28 22:05:44 1.154 --- lib.tex 2000/07/05 02:24:38 1.155 *************** *** 216,222 **** \input{netdata} % Internet Data Handling - \input{libsgmllib} - \input{libhtmllib} - \input{libxmllib} \input{libformatter} \input{librfc822} --- 216,219 ---- *************** *** 237,242 **** \input{libnetrc} \input{librobotparser} ! \input{librestricted} \input{librexec} \input{libbastion} --- 234,245 ---- \input{libnetrc} \input{librobotparser} + + \input{markup} % Structured Markup Processing Tools + \input{libsgmllib} + \input{libhtmllib} + \input{libxmllib} + \input{libpyexpat} ! \input{librestricted} % Restricted Execution \input{librexec} \input{libbastion} From python-dev@python.org Wed Jul 5 03:24:41 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 4 Jul 2000 19:24:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile.deps,1.34,1.35 Message-ID: <200007050224.TAA08030@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv8017 Modified Files: Makefile.deps Log Message: Created a new chapter on structured markup processing, including the existing SGML, HTML, & XML support, and providing a home for the new XML support as it becomes documented. Index: Makefile.deps =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile.deps,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** Makefile.deps 2000/06/28 22:03:28 1.34 --- Makefile.deps 2000/07/05 02:24:39 1.35 *************** *** 167,170 **** --- 167,171 ---- ../lib/libdis.tex \ ../lib/libxmllib.tex \ + ../lib/libpyexpat.tex \ ../lib/libqueue.tex \ ../lib/liblocale.tex \ *************** *** 188,191 **** --- 189,193 ---- ../lib/internet.tex \ ../lib/netdata.tex \ + ../lib/markup.tex \ ../lib/libpycompile.tex \ ../lib/libcompileall.tex \ From python-dev@python.org Wed Jul 5 04:06:49 2000 From: python-dev@python.org (Greg Ward) Date: Tue, 4 Jul 2000 20:06:49 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command sdist.py,1.36,1.37 Message-ID: <200007050306.UAA16884@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv16872 Modified Files: sdist.py Log Message: Added the --dist-dir option to control where the archive(s) are put; defaults to 'dist' (ie. no longer in the distribution root). Index: sdist.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/sdist.py,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** sdist.py 2000/06/29 02:06:29 1.36 --- sdist.py 2000/07/05 03:06:46 1.37 *************** *** 65,68 **** --- 65,71 ---- "keep the distribution tree around after creating " + "archive file(s)"), + ('dist-dir=', 'd', + "directory to put the source distribution archive(s) in " + "[default: dist]"), ] *************** *** 95,98 **** --- 98,102 ---- self.formats = None self.keep_tree = 0 + self.dist_dir = None self.archive_files = None *************** *** 119,123 **** --- 123,130 ---- "unknown archive format '%s'" % bad_format + if self.dist_dir is None: + self.dist_dir = "dist" + def run (self): *************** *** 668,676 **** # done elsewhere. base_dir = self.distribution.get_fullname() self.make_release_tree (base_dir, self.files) archive_files = [] # remember names of files we create for fmt in self.formats: ! file = self.make_archive (base_dir, fmt, base_dir=base_dir) archive_files.append(file) --- 675,686 ---- # done elsewhere. base_dir = self.distribution.get_fullname() + base_name = os.path.join(self.dist_dir, base_dir) self.make_release_tree (base_dir, self.files) archive_files = [] # remember names of files we create + if self.dist_dir: + self.mkpath(self.dist_dir) for fmt in self.formats: ! file = self.make_archive (base_name, fmt, base_dir=base_dir) archive_files.append(file) From python-dev@python.org Wed Jul 5 04:07:21 2000 From: python-dev@python.org (Greg Ward) Date: Tue, 4 Jul 2000 20:07:21 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command bdist.py,1.14,1.15 Message-ID: <200007050307.UAA16921@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv16913/command Modified Files: bdist.py Log Message: Added the --dist-dir option that the "bdist_*" will use to control where they place their output files. Index: bdist.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/bdist.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** bdist.py 2000/06/27 01:24:07 1.14 --- bdist.py 2000/07/05 03:07:18 1.15 *************** *** 35,38 **** --- 35,41 ---- ('formats=', None, "formats for distribution (comma-separated list)"), + ('dist-dir=', 'd', + "directory to put final built distributions in " + "[default: dist]"), ] *************** *** 66,69 **** --- 69,73 ---- self.bdist_base = None self.formats = None + self.dist_dir = None # initialize_options() *************** *** 87,90 **** --- 91,97 ---- "don't know how to create built distributions " + \ "on platform %s" % os.name + + if self.dist_dir is None: + self.dist_dir = "dist" # finalize_options() From python-dev@python.org Wed Jul 5 04:07:39 2000 From: python-dev@python.org (Greg Ward) Date: Tue, 4 Jul 2000 20:07:39 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command bdist_dumb.py,1.8,1.9 Message-ID: <200007050307.UAA16948@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv16940 Modified Files: bdist_dumb.py Log Message: Added --dist-dir option to control where output archive(s) go. Index: bdist_dumb.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/bdist_dumb.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** bdist_dumb.py 2000/06/28 00:36:40 1.8 --- bdist_dumb.py 2000/07/05 03:07:37 1.9 *************** *** 25,28 **** --- 25,30 ---- "keep the pseudo-installation tree around after " + "creating the distribution archive"), + ('dist-dir=', 'd', + "directory to put final built distributions in"), ] *************** *** 35,38 **** --- 37,41 ---- self.format = None self.keep_tree = 0 + self.dist_dir = None # initialize_options() *************** *** 52,55 **** --- 55,60 ---- "on platform %s") % os.name + self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) + # finalize_options() *************** *** 72,76 **** print "self.bdist_dir = %s" % self.bdist_dir print "self.format = %s" % self.format ! self.make_archive (archive_basename, self.format, root_dir=self.bdist_dir) --- 77,82 ---- print "self.bdist_dir = %s" % self.bdist_dir print "self.format = %s" % self.format ! self.make_archive (os.path.join(self.dist_dir, archive_basename), ! self.format, root_dir=self.bdist_dir) From python-dev@python.org Wed Jul 5 04:08:57 2000 From: python-dev@python.org (Greg Ward) Date: Tue, 4 Jul 2000 20:08:57 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command bdist_wininst.py,1.3,1.4 Message-ID: <200007050308.UAA17012@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv16999/command Modified Files: bdist_wininst.py Log Message: Fixed so the ZIP file (which is bundled into an executable) goes in the temporary directory ('bdist_base'). Added --dist-dir option to control where the executable is put. Index: bdist_wininst.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/bdist_wininst.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** bdist_wininst.py 2000/06/29 23:50:19 1.3 --- bdist_wininst.py 2000/07/05 03:08:55 1.4 *************** *** 29,32 **** --- 29,34 ---- "require a specific python version" + " on the target system (1.5 or 1.6/2.0)"), + ('dist-dir=', 'd', + "directory to put final built distributions in"), ] *************** *** 37,40 **** --- 39,43 ---- self.target_optimize = 0 self.target_version = None + self.dist_dir = None # initialize_options() *************** *** 58,61 **** --- 61,66 ---- self.target_version = short_version + self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) + # finalize_options() *************** *** 93,97 **** # And make an archive relative to the root of the # pseudo-installation tree. ! archive_basename = "%s.win32" % self.distribution.get_fullname() # XXX hack! Our archive MUST be relative to sys.prefix # XXX What about .install_data, .install_scripts, ...? --- 98,105 ---- # And make an archive relative to the root of the # pseudo-installation tree. ! fullname = self.distribution.get_fullname() ! archive_basename = os.path.join(self.bdist_dir, ! "%s.win32" % fullname) ! # XXX hack! Our archive MUST be relative to sys.prefix # XXX What about .install_data, .install_scripts, ...? *************** *** 104,108 **** arcname = self.make_archive (archive_basename, "zip", root_dir=root_dir) ! self.create_exe (arcname) if not self.keep_tree: --- 112,116 ---- arcname = self.make_archive (archive_basename, "zip", root_dir=root_dir) ! self.create_exe (arcname, fullname) if not self.keep_tree: *************** *** 157,161 **** # create_inifile() ! def create_exe (self, arcname): import struct, zlib --- 165,169 ---- # create_inifile() ! def create_exe (self, arcname, fullname): import struct, zlib *************** *** 166,170 **** zcfgdata = co.compress (cfgdata) + co.flush() ! installer_name = "%s.win32.exe" % self.distribution.get_fullname() self.announce ("creating %s" % installer_name) --- 174,179 ---- zcfgdata = co.compress (cfgdata) + co.flush() ! installer_name = os.path.join(self.dist_dir, ! "%s.win32.exe" % fullname) self.announce ("creating %s" % installer_name) From python-dev@python.org Wed Jul 5 04:10:23 2000 From: python-dev@python.org (Greg Ward) Date: Tue, 4 Jul 2000 20:10:23 -0700 Subject: [Python-checkins] CVS: distutils TODO,1.6,1.7 Message-ID: <200007050310.UAA17180@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv17171 Modified Files: TODO Log Message: Various post-0.9 updates. Index: TODO =================================================================== RCS file: /cvsroot/python/distutils/TODO,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** TODO 2000/06/30 03:45:08 1.6 --- TODO 2000/07/05 03:10:20 1.7 *************** *** 129,134 **** --- 129,137 ---- strip the quotes (and, ideally, put them back on again when spawn() prints out the command run!) + [fixed!] + * support for building a new, static Python binary + INSTALLATION ------------ *************** *** 183,186 **** --- 186,191 ---- * should certainly put tarballs and zip files (sdist, bdist_dumb) in "dist" directory -- maybe RPMs, Windows installers too + + * bug! bdist --format=gztar,zip doesn't work: premature cleanup From python-dev@python.org Wed Jul 5 09:53:21 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Wed, 5 Jul 2000 01:53:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include Python.h,2.19,2.20 Message-ID: <200007050853.BAA06026@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv6017/Include Modified Files: Python.h Log Message: Added #defines to enable SUSv2 compatibility where available and to switch on support for BSD and SysV on platforms which use glibc such as Linux. These #defines are documented in e.g. the file /usr/include/features.h on Linux platforms and the SUSv2 docs. Index: Python.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** Python.h 2000/06/30 23:58:04 2.19 --- Python.h 2000/07/05 08:53:18 2.20 *************** *** 13,16 **** --- 13,26 ---- ******************************************************************/ + /* Enable compiler features including SUSv2 compatibility; switching + on C lib defines doesn't work here, because the symbols haven't + necessarily been defined yet. */ + #ifndef _GNU_SOURCE + # define _GNU_SOURCE 1 + #endif + #ifndef _XOPEN_SOURCE + # define _XOPEN_SOURCE 500 + #endif + /* Include nearly all Python header files */ From python-dev@python.org Wed Jul 5 10:46:02 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Wed, 5 Jul 2000 02:46:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include unicodeobject.h,2.11,2.12 Message-ID: <200007050946.CAA17699@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv17679/Include Modified Files: unicodeobject.h Log Message: Modified the ISALPHA and ISALNUM macros to use the new lookup APIs from unicodectype.c Index: unicodeobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/unicodeobject.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** unicodeobject.h 2000/07/03 10:52:13 2.11 --- unicodeobject.h 2000/07/05 09:45:59 2.12 *************** *** 138,141 **** --- 138,143 ---- #define Py_UNICODE_TONUMERIC(ch) _PyUnicode_ToNumeric(ch) + #define Py_UNICODE_ISALPHA(ch) iswalpha(ch) + #else *************** *** 159,168 **** #define Py_UNICODE_TONUMERIC(ch) _PyUnicode_ToNumeric(ch) ! #endif ! #define Py_UNICODE_ISALPHA(ch) \ ! (Py_UNICODE_ISLOWER(ch) || \ ! Py_UNICODE_ISUPPER(ch) || \ ! Py_UNICODE_ISTITLE(ch)) #define Py_UNICODE_ISALNUM(ch) \ --- 161,167 ---- #define Py_UNICODE_TONUMERIC(ch) _PyUnicode_ToNumeric(ch) ! #define Py_UNICODE_ISALPHA(ch) _PyUnicode_IsAlpha(ch) ! #endif #define Py_UNICODE_ISALNUM(ch) \ *************** *** 869,872 **** --- 868,875 ---- extern DL_IMPORT(int) _PyUnicode_IsNumeric( + register const Py_UNICODE ch /* Unicode character */ + ); + + extern DL_IMPORT(int) _PyUnicode_IsAlpha( register const Py_UNICODE ch /* Unicode character */ ); From python-dev@python.org Wed Jul 5 10:46:28 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Wed, 5 Jul 2000 02:46:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_string.py,1.8,1.9 Message-ID: <200007050946.CAA17831@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv17815/Lib/test Modified Files: test_string.py Log Message: Added tests for the new .isalpha() and .isalnum() methods. Index: test_string.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_string.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** test_string.py 2000/04/11 15:37:24 1.8 --- test_string.py 2000/07/05 09:46:26 1.9 *************** *** 85,88 **** --- 85,103 ---- test('istitle', 'Not--a Titlecase String', 0) + test('isalpha', 'a', 1) + test('isalpha', 'A', 1) + test('isalpha', '\n', 0) + test('isalpha', 'abc', 1) + test('isalpha', 'aBc123', 0) + test('isalpha', 'abc\n', 0) + + test('isalnum', 'a', 1) + test('isalnum', 'A', 1) + test('isalnum', '\n', 0) + test('isalnum', '123abc456', 1) + test('isalnum', 'a1b3c', 1) + test('isalnum', 'aBc000 ', 0) + test('isalnum', 'abc\n', 0) + test('splitlines', "abc\ndef\n\rghi", ['abc', 'def', '', 'ghi']) test('splitlines', "abc\ndef\n\r\nghi", ['abc', 'def', '', 'ghi']) From python-dev@python.org Wed Jul 5 10:46:42 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Wed, 5 Jul 2000 02:46:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_unicode.py,1.16,1.17 Message-ID: <200007050946.CAA17861@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv17854/Lib/test Modified Files: test_unicode.py Log Message: Added tests for the new .isalpha() and .isalnum() methods. Index: test_unicode.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** test_unicode.py 2000/06/30 09:13:35 1.16 --- test_unicode.py 2000/07/05 09:46:40 1.17 *************** *** 207,210 **** --- 207,226 ---- test('istitle', u'Not--a Titlecase String', 0) + test('isalpha', u'a', 1) + test('isalpha', u'A', 1) + test('isalpha', u'\n', 0) + test('isalpha', u'\u1FFc', 1) + test('isalpha', u'abc', 1) + test('isalpha', u'aBc123', 0) + test('isalpha', u'abc\n', 0) + + test('isalnum', u'a', 1) + test('isalnum', u'A', 1) + test('isalnum', u'\n', 0) + test('isalnum', u'123abc456', 1) + test('isalnum', u'a1b3c', 1) + test('isalnum', u'aBc000 ', 0) + test('isalnum', u'abc\n', 0) + test('splitlines', u"abc\ndef\n\rghi", [u'abc', u'def', u'', u'ghi']) test('splitlines', u"abc\ndef\n\r\nghi", [u'abc', u'def', u'', u'ghi']) From python-dev@python.org Wed Jul 5 10:47:50 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Wed, 5 Jul 2000 02:47:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.72,2.73 Message-ID: <200007050947.CAA17949@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv17901/Objects Modified Files: stringobject.c Log Message: Added new .isalpha() and .isalnum() methods to match the same ones on the Unicode objects. Note that the string versions use the (locale aware) C lib APIs isalpha() and isalnum(). Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.72 retrieving revision 2.73 diff -C2 -r2.72 -r2.73 *** stringobject.c 2000/06/30 23:58:05 2.72 --- stringobject.c 2000/07/05 09:47:46 2.73 *************** *** 1925,1928 **** --- 1925,1994 ---- + static char isalpha__doc__[] = + "S.isalpha() -> int\n\ + \n\ + Return 1 if all characters in S are alphabetic\n\ + and there is at least one character in S, 0 otherwise."; + + static PyObject* + string_isalpha(PyUnicodeObject *self, PyObject *args) + { + register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); + register const unsigned char *e; + + if (!PyArg_NoArgs(args)) + return NULL; + + /* Shortcut for single character strings */ + if (PyString_GET_SIZE(self) == 1 && + isalpha(*p)) + return PyInt_FromLong(1); + + /* Special case for empty strings */ + if (PyString_GET_SIZE(self) == 0) + return PyInt_FromLong(0); + + e = p + PyString_GET_SIZE(self); + for (; p < e; p++) { + if (!isalpha(*p)) + return PyInt_FromLong(0); + } + return PyInt_FromLong(1); + } + + + static char isalnum__doc__[] = + "S.isalnum() -> int\n\ + \n\ + Return 1 if all characters in S are alphanumeric\n\ + and there is at least one character in S, 0 otherwise."; + + static PyObject* + string_isalnum(PyUnicodeObject *self, PyObject *args) + { + register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); + register const unsigned char *e; + + if (!PyArg_NoArgs(args)) + return NULL; + + /* Shortcut for single character strings */ + if (PyString_GET_SIZE(self) == 1 && + isalnum(*p)) + return PyInt_FromLong(1); + + /* Special case for empty strings */ + if (PyString_GET_SIZE(self) == 0) + return PyInt_FromLong(0); + + e = p + PyString_GET_SIZE(self); + for (; p < e; p++) { + if (!isalnum(*p)) + return PyInt_FromLong(0); + } + return PyInt_FromLong(1); + } + + static char isdigit__doc__[] = "S.isdigit() -> int\n\ *************** *** 2167,2170 **** --- 2233,2238 ---- {"isdigit", (PyCFunction)string_isdigit, 0, isdigit__doc__}, {"istitle", (PyCFunction)string_istitle, 0, istitle__doc__}, + {"isalpha", (PyCFunction)string_isalpha, 0, isalpha__doc__}, + {"isalnum", (PyCFunction)string_isalnum, 0, isalnum__doc__}, {"capitalize", (PyCFunction)string_capitalize, 1, capitalize__doc__}, {"count", (PyCFunction)string_count, 1, count__doc__}, From python-dev@python.org Wed Jul 5 10:49:02 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Wed, 5 Jul 2000 02:49:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodectype.c,2.2,2.3 Message-ID: <200007050949.CAA18107@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv18055/Objects Modified Files: unicodectype.c Log Message: Added new lookup API which matches all alphabetic Unicode characters, i.e the ones with category 'Ll','Lu','Lt','Lo','Lm'. Index: unicodectype.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodectype.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** unicodectype.c 2000/04/11 15:39:02 2.2 --- unicodectype.c 2000/07/05 09:48:59 2.3 *************** *** 5015,5018 **** --- 5015,10308 ---- } + /* Returns 1 for Unicode characters having the category 'Ll', 'Lu', 'Lt', + 'Lo' or 'Lm', 0 otherwise. */ + + int _PyUnicode_IsAlpha(register const Py_UNICODE ch) + { + if (_PyUnicode_IsLowercase(ch) || + _PyUnicode_IsUppercase(ch) || [...5277 lines suppressed...] + return 1; + default: + return 0; + } + } + #else *************** *** 5043,5046 **** --- 10333,10341 ---- { return towupper(ch); + } + + int _PyUnicode_IsAlpha(register const Py_UNICODE ch) + { + return iswalpha(ch); } From python-dev@python.org Wed Jul 5 10:49:46 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Wed, 5 Jul 2000 02:49:46 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.34,2.35 Message-ID: <200007050949.CAA18149@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv18137/Objects Modified Files: unicodeobject.c Log Message: Added new .isalpha() and .isalnum() methods which provide interfaces to the new alphabetic lookup APIs in unicodectype.c. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.34 retrieving revision 2.35 diff -C2 -r2.34 -r2.35 *** unicodeobject.c 2000/07/04 09:51:07 2.34 --- unicodeobject.c 2000/07/05 09:49:44 2.35 *************** *** 3589,3592 **** --- 3589,3656 ---- } + static char isalpha__doc__[] = + "S.isalpha() -> int\n\ + \n\ + Return 1 if all characters in S are alphabetic\n\ + and there is at least one character in S, 0 otherwise."; + + static PyObject* + unicode_isalpha(PyUnicodeObject *self, PyObject *args) + { + register const Py_UNICODE *p = PyUnicode_AS_UNICODE(self); + register const Py_UNICODE *e; + + if (!PyArg_NoArgs(args)) + return NULL; + + /* Shortcut for single character strings */ + if (PyUnicode_GET_SIZE(self) == 1 && + Py_UNICODE_ISALPHA(*p)) + return PyInt_FromLong(1); + + /* Special case for empty strings */ + if (PyString_GET_SIZE(self) == 0) + return PyInt_FromLong(0); + + e = p + PyUnicode_GET_SIZE(self); + for (; p < e; p++) { + if (!Py_UNICODE_ISALPHA(*p)) + return PyInt_FromLong(0); + } + return PyInt_FromLong(1); + } + + static char isalnum__doc__[] = + "S.isalnum() -> int\n\ + \n\ + Return 1 if all characters in S are alphanumeric\n\ + and there is at least one character in S, 0 otherwise."; + + static PyObject* + unicode_isalnum(PyUnicodeObject *self, PyObject *args) + { + register const Py_UNICODE *p = PyUnicode_AS_UNICODE(self); + register const Py_UNICODE *e; + + if (!PyArg_NoArgs(args)) + return NULL; + + /* Shortcut for single character strings */ + if (PyUnicode_GET_SIZE(self) == 1 && + Py_UNICODE_ISALNUM(*p)) + return PyInt_FromLong(1); + + /* Special case for empty strings */ + if (PyString_GET_SIZE(self) == 0) + return PyInt_FromLong(0); + + e = p + PyUnicode_GET_SIZE(self); + for (; p < e; p++) { + if (!Py_UNICODE_ISALNUM(*p)) + return PyInt_FromLong(0); + } + return PyInt_FromLong(1); + } + static char isdecimal__doc__[] = "S.isdecimal() -> int\n\ *************** *** 4254,4257 **** --- 4318,4323 ---- {"isdigit", (PyCFunction) unicode_isdigit, 0, isdigit__doc__}, {"isnumeric", (PyCFunction) unicode_isnumeric, 0, isnumeric__doc__}, + {"isalpha", (PyCFunction) unicode_isalpha, 0, isalpha__doc__}, + {"isalnum", (PyCFunction) unicode_isalnum, 0, isalnum__doc__}, #if 0 {"zfill", (PyCFunction) unicode_zfill, 1, zfill__doc__}, From python-dev@python.org Wed Jul 5 11:38:12 2000 From: python-dev@python.org (Greg Stein) Date: Wed, 5 Jul 2000 03:38:12 -0700 Subject: [Python-checkins] CVS: python/dist/src configure.in,1.132,1.133 configure,1.123,1.124 Message-ID: <200007051038.DAA31054@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv30979 Modified Files: configure.in configure Log Message: check for Pth *after* the standard system threading libraries. Pth should not override those. Submitted by: flight@users.sourceforge.net Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.132 retrieving revision 1.133 diff -C2 -r1.132 -r1.133 *** configure.in 2000/06/30 16:39:35 1.132 --- configure.in 2000/07/05 10:38:09 1.133 *************** *** 685,692 **** AC_DEFINE(C_THREADS) LIBOBJS="$LIBOBJS thread.o"],[ - AC_CHECK_LIB(pth, pth_init, [AC_DEFINE(WITH_THREAD) - AC_DEFINE(_GNU_PTH) - LIBS="-lpth $LIBS" - LIBOBJS="$LIBOBJS thread.o"],[ AC_CHECK_LIB(pthread, pthread_create, [AC_DEFINE(WITH_THREAD) AC_DEFINE(_POSIX_THREADS) --- 685,688 ---- *************** *** 711,714 **** --- 707,714 ---- LIBS="$LIBS -lthread" LIBOBJS="$LIBOBJS thread.o"], [ + AC_CHECK_LIB(pth, pth_init, [AC_DEFINE(WITH_THREAD) + AC_DEFINE(_GNU_PTH) + LIBS="-lpth $LIBS" + LIBOBJS="$LIBOBJS thread.o"],[ AC_CHECK_LIB(cma, pthread_create, [AC_DEFINE(WITH_THREAD) AC_DEFINE(_POSIX_THREADS) Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.123 retrieving revision 1.124 diff -C2 -r1.123 -r1.124 *** configure 2000/06/30 16:39:35 1.123 --- configure 2000/07/05 10:38:09 1.124 *************** *** 1,5 **** #! /bin/sh ! # From configure.in Revision: 1.131 # Guess values for system-dependent variables and create Makefiles. --- 1,5 ---- #! /bin/sh ! # From configure.in Revision: 1.132 # Guess values for system-dependent variables and create Makefiles. *************** *** 2990,3043 **** echo "$ac_t""no" 1>&6 - echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6 - echo "configure:2994: checking for pth_init in -lpth" >&5 - ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_save_LIBS="$LIBS" - LIBS="-lpth $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - LIBS="$ac_save_LIBS" - - fi - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF - #define WITH_THREAD 1 - EOF - - cat >> confdefs.h <<\EOF - #define _GNU_PTH 1 - EOF - - LIBS="-lpth $LIBS" - LIBOBJS="$LIBOBJS thread.o" - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 ! echo "configure:3042: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 2990,2995 ---- echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 ! echo "configure:2994: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 3047,3051 **** LIBS="-lpthread $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 3010,3014 ---- ; return 0; } EOF ! if { (eval echo configure:3013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 3087,3096 **** echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 ! echo "configure:3090: checking for pthread_detach" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3042: checking for pthread_detach" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_pthread_detach=yes" --- 3067,3071 ---- ; return 0; } EOF ! if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_pthread_detach=yes" *************** *** 3143,3157 **** ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 ! echo "configure:3146: checking for kernel/OS.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 3095,3109 ---- ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 ! echo "configure:3098: checking for kernel/OS.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 3182,3186 **** echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 ! echo "configure:3185: checking for pthread_create in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 3134,3138 ---- echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 ! echo "configure:3137: checking for pthread_create in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 3190,3194 **** LIBS="-lpthreads $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 3153,3157 ---- ; return 0; } EOF ! if { (eval echo configure:3156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 3230,3234 **** echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 ! echo "configure:3233: checking for pthread_create in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 3182,3186 ---- echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 ! echo "configure:3185: checking for pthread_create in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 3238,3242 **** LIBS="-lc_r $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 3201,3205 ---- ; return 0; } EOF ! if { (eval echo configure:3204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 3278,3282 **** echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 ! echo "configure:3281: checking for __d6_pthread_create in -lthread" >&5 ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 3230,3234 ---- echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 ! echo "configure:3233: checking for __d6_pthread_create in -lthread" >&5 ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 3286,3290 **** LIBS="-lthread $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 3249,3253 ---- ; return 0; } EOF ! if { (eval echo configure:3252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 3321,3324 **** --- 3273,3324 ---- LIBS="$LIBS -lthread" + LIBOBJS="$LIBOBJS thread.o" + else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6 + echo "configure:3281: checking for pth_init in -lpth" >&5 + ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-lpth $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF + #define WITH_THREAD 1 + EOF + + cat >> confdefs.h <<\EOF + #define _GNU_PTH 1 + EOF + + LIBS="-lpth $LIBS" LIBOBJS="$LIBOBJS thread.o" else From python-dev@python.org Wed Jul 5 12:24:15 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Wed, 5 Jul 2000 04:24:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _codecsmodule.c,2.2,2.3 Message-ID: <200007051124.EAA14972@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv14965/Modules Modified Files: _codecsmodule.c Log Message: Modified the encode interfaces of all builtin codecs to accept any object which can be converted to Unicode by means of PyUnicode_FromObject(). Index: _codecsmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_codecsmodule.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** _codecsmodule.c 2000/03/28 20:29:58 2.2 --- _codecsmodule.c 2000/07/05 11:24:13 2.3 *************** *** 21,26 **** (Unicode object, bytes consumed) These s are available: utf_8, unicode_escape, ! raw_unicode_escape, unicode_internal, latin_1, ascii (7-bit) Written by Marc-Andre Lemburg (mal@lemburg.com). --- 21,32 ---- (Unicode object, bytes consumed) + _encode() interfaces also accept non-Unicode object as + input. The objects are then converted to Unicode using + PyUnicode_FromObject() prior to applying the conversion. + These s are available: utf_8, unicode_escape, ! raw_unicode_escape, unicode_internal, latin_1, ascii (7-bit), ! mbcs (on win32). ! Written by Marc-Andre Lemburg (mal@lemburg.com). *************** *** 345,359 **** PyObject *args) { ! PyObject *str; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "U|z:utf_8_encode", &str, &errors)) return NULL; ! return codec_tuple(PyUnicode_EncodeUTF8(PyUnicode_AS_UNICODE(str), ! PyUnicode_GET_SIZE(str), ! errors), ! PyUnicode_GET_SIZE(str)); } --- 351,370 ---- PyObject *args) { ! PyObject *str, *v; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "O|z:utf_8_encode", &str, &errors)) return NULL; ! str = PyUnicode_FromObject(str); ! if (str == NULL) ! return NULL; ! v = codec_tuple(PyUnicode_EncodeUTF8(PyUnicode_AS_UNICODE(str), ! PyUnicode_GET_SIZE(str), ! errors), ! PyUnicode_GET_SIZE(str)); ! Py_DECREF(str); ! return v; } *************** *** 369,385 **** PyObject *args) { ! PyObject *str; const char *errors = NULL; int byteorder = 0; ! if (!PyArg_ParseTuple(args, "U|zi:utf_16_encode", &str, &errors, &byteorder)) return NULL; ! return codec_tuple(PyUnicode_EncodeUTF16(PyUnicode_AS_UNICODE(str), ! PyUnicode_GET_SIZE(str), ! errors, ! byteorder), ! PyUnicode_GET_SIZE(str)); } --- 380,401 ---- PyObject *args) { ! PyObject *str, *v; const char *errors = NULL; int byteorder = 0; ! if (!PyArg_ParseTuple(args, "O|zi:utf_16_encode", &str, &errors, &byteorder)) return NULL; ! str = PyUnicode_FromObject(str); ! if (str == NULL) ! return NULL; ! v = codec_tuple(PyUnicode_EncodeUTF16(PyUnicode_AS_UNICODE(str), ! PyUnicode_GET_SIZE(str), ! errors, ! byteorder), ! PyUnicode_GET_SIZE(str)); ! Py_DECREF(str); ! return v; } *************** *** 388,403 **** PyObject *args) { ! PyObject *str; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "U|zi:utf_16_le_encode", &str, &errors)) return NULL; ! return codec_tuple(PyUnicode_EncodeUTF16(PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str), errors, -1), PyUnicode_GET_SIZE(str)); } --- 404,424 ---- PyObject *args) { ! PyObject *str, *v; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "O|zi:utf_16_le_encode", &str, &errors)) return NULL; ! str = PyUnicode_FromObject(str); ! if (str == NULL) ! return NULL; ! v = codec_tuple(PyUnicode_EncodeUTF16(PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str), errors, -1), PyUnicode_GET_SIZE(str)); + Py_DECREF(str); + return v; } *************** *** 406,421 **** PyObject *args) { ! PyObject *str; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "U|zi:utf_16_be_encode", &str, &errors)) return NULL; ! return codec_tuple(PyUnicode_EncodeUTF16(PyUnicode_AS_UNICODE(str), ! PyUnicode_GET_SIZE(str), ! errors, ! +1), ! PyUnicode_GET_SIZE(str)); } --- 427,447 ---- PyObject *args) { ! PyObject *str, *v; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "O|zi:utf_16_be_encode", &str, &errors)) return NULL; ! str = PyUnicode_FromObject(str); ! if (str == NULL) ! return NULL; ! v = codec_tuple(PyUnicode_EncodeUTF16(PyUnicode_AS_UNICODE(str), ! PyUnicode_GET_SIZE(str), ! errors, ! +1), ! PyUnicode_GET_SIZE(str)); ! Py_DECREF(str); ! return v; } *************** *** 424,438 **** PyObject *args) { ! PyObject *str; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "U|z:unicode_escape_encode", &str, &errors)) return NULL; ! return codec_tuple(PyUnicode_EncodeUnicodeEscape( ! PyUnicode_AS_UNICODE(str), ! PyUnicode_GET_SIZE(str)), ! PyUnicode_GET_SIZE(str)); } --- 450,468 ---- PyObject *args) { ! PyObject *str, *v; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "O|z:unicode_escape_encode", &str, &errors)) return NULL; ! str = PyUnicode_FromObject(str); ! if (str == NULL) ! return NULL; ! v = codec_tuple(PyUnicode_EncodeUnicodeEscape(PyUnicode_AS_UNICODE(str), ! PyUnicode_GET_SIZE(str)), ! PyUnicode_GET_SIZE(str)); ! Py_DECREF(str); ! return v; } *************** *** 441,455 **** PyObject *args) { ! PyObject *str; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "U|z:raw_unicode_escape_encode", &str, &errors)) return NULL; ! return codec_tuple(PyUnicode_EncodeRawUnicodeEscape( PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str)), ! PyUnicode_GET_SIZE(str)); } --- 471,490 ---- PyObject *args) { ! PyObject *str, *v; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "O|z:raw_unicode_escape_encode", &str, &errors)) return NULL; ! str = PyUnicode_FromObject(str); ! if (str == NULL) ! return NULL; ! v = codec_tuple(PyUnicode_EncodeRawUnicodeEscape( PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str)), ! PyUnicode_GET_SIZE(str)); ! Py_DECREF(str); ! return v; } *************** *** 458,473 **** PyObject *args) { ! PyObject *str; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "U|z:latin_1_encode", &str, &errors)) return NULL; ! return codec_tuple(PyUnicode_EncodeLatin1( PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str), errors), ! PyUnicode_GET_SIZE(str)); } --- 493,513 ---- PyObject *args) { ! PyObject *str, *v; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "O|z:latin_1_encode", &str, &errors)) return NULL; ! str = PyUnicode_FromObject(str); ! if (str == NULL) ! return NULL; ! v = codec_tuple(PyUnicode_EncodeLatin1( PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str), errors), ! PyUnicode_GET_SIZE(str)); ! Py_DECREF(str); ! return v; } *************** *** 476,491 **** PyObject *args) { ! PyObject *str; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "U|z:ascii_encode", &str, &errors)) return NULL; ! return codec_tuple(PyUnicode_EncodeASCII( PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str), errors), ! PyUnicode_GET_SIZE(str)); } --- 516,536 ---- PyObject *args) { ! PyObject *str, *v; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "O|z:ascii_encode", &str, &errors)) return NULL; ! str = PyUnicode_FromObject(str); ! if (str == NULL) ! return NULL; ! v = codec_tuple(PyUnicode_EncodeASCII( PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str), errors), ! PyUnicode_GET_SIZE(str)); ! Py_DECREF(str); ! return v; } *************** *** 494,502 **** PyObject *args) { ! PyObject *str; const char *errors = NULL; PyObject *mapping = NULL; ! if (!PyArg_ParseTuple(args, "U|zO:charmap_encode", &str, &errors, &mapping)) return NULL; --- 539,547 ---- PyObject *args) { ! PyObject *str, *v; const char *errors = NULL; PyObject *mapping = NULL; ! if (!PyArg_ParseTuple(args, "O|zO:charmap_encode", &str, &errors, &mapping)) return NULL; *************** *** 504,513 **** mapping = NULL; ! return codec_tuple(PyUnicode_EncodeCharmap( PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str), mapping, errors), ! PyUnicode_GET_SIZE(str)); } --- 549,563 ---- mapping = NULL; ! str = PyUnicode_FromObject(str); ! if (str == NULL) ! return NULL; ! v = codec_tuple(PyUnicode_EncodeCharmap( PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str), mapping, errors), ! PyUnicode_GET_SIZE(str)); ! Py_DECREF(str); ! return v; } *************** *** 518,533 **** PyObject *args) { ! PyObject *str; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "U|z:mbcs_encode", &str, &errors)) return NULL; ! return codec_tuple(PyUnicode_EncodeMBCS( PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str), errors), ! PyUnicode_GET_SIZE(str)); } --- 568,588 ---- PyObject *args) { ! PyObject *str, *v; const char *errors = NULL; ! if (!PyArg_ParseTuple(args, "O|z:mbcs_encode", &str, &errors)) return NULL; ! str = PyUnicode_FromObject(str); ! if (str == NULL) ! return NULL; ! v = codec_tuple(PyUnicode_EncodeMBCS( PyUnicode_AS_UNICODE(str), PyUnicode_GET_SIZE(str), errors), ! PyUnicode_GET_SIZE(str)); ! Py_DECREF(str); ! return v; } From python-dev@python.org Wed Jul 5 13:22:17 2000 From: python-dev@python.org (A.M. Kuchling) Date: Wed, 5 Jul 2000 05:22:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.16,2.17 Message-ID: <200007051222.FAA31310@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv31179 Modified Files: mmapmodule.c Log Message: Remove definition of _GNU_SOURCE, since Python.h now does it for us Index: mmapmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** mmapmodule.c 2000/07/01 00:51:51 2.16 --- mmapmodule.c 2000/07/05 12:22:14 2.17 *************** *** 17,25 **** */ - #ifdef __linux__ - #define _GNU_SOURCE /* So we can get MREMAP_MAYMOVE defined when - sys/mman.h is included */ - #endif - #include --- 17,20 ---- From python-dev@python.org Wed Jul 5 16:32:43 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Wed, 5 Jul 2000 08:32:43 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects fileobject.c,2.77,2.78 Message-ID: <200007051532.IAA32293@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv32275/Objects Modified Files: fileobject.c Log Message: Fix to bug #389: Full_Name: Bastian Kleineidam Version: 2.0b1 CVS 5.7.2000 OS: Debian Linux 2.2 Submission from: earth.cs.uni-sb.de (134.96.252.92) Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.77 retrieving revision 2.78 diff -C2 -r2.77 -r2.78 *** fileobject.c 2000/06/30 23:58:05 2.77 --- fileobject.c 2000/07/05 15:32:40 2.78 *************** *** 584,588 **** static PyObject * ! getline(f, n) PyFileObject *f; int n; --- 584,588 ---- static PyObject * ! get_line(f, n) PyFileObject *f; int n; *************** *** 706,710 **** if (((PyFileObject*)f)->f_fp == NULL) return err_closed(); ! return getline((PyFileObject *)f, n); } --- 706,710 ---- if (((PyFileObject*)f)->f_fp == NULL) return err_closed(); ! return get_line((PyFileObject *)f, n); } *************** *** 726,730 **** if (n < 0) n = 0; ! return getline(f, n); } --- 726,730 ---- if (n < 0) n = 0; ! return get_line(f, n); } *************** *** 820,824 **** if (sizehint > 0) { /* Need to complete the last line */ ! PyObject *rest = getline(f, 0); if (rest == NULL) { Py_DECREF(line); --- 820,824 ---- if (sizehint > 0) { /* Need to complete the last line */ ! PyObject *rest = get_line(f, 0); if (rest == NULL) { Py_DECREF(line); From python-dev@python.org Wed Jul 5 22:14:18 2000 From: python-dev@python.org (Fredrik Lundh) Date: Wed, 5 Jul 2000 14:14:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.24,2.25 Message-ID: <200007052114.OAA30370@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv29972/Modules Modified Files: _sre.c Log Message: maintenance release: - reorganized some code to get rid of -Wall and -W4 warnings - fixed default argument handling for sub/subn/split methods (reported by Peter Schneider-Kamp). Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -r2.24 -r2.25 *** _sre.c 2000/07/03 21:31:48 2.24 --- _sre.c 2000/07/05 21:14:16 2.25 *************** *** 64,67 **** --- 64,68 ---- #if defined(_MSC_VER) #pragma optimize("agtw", on) /* doesn't seem to make much difference... */ + #pragma warning(disable: 4710) /* who cares if functions are not inlined ;-) */ /* fastest possible local call under MSVC */ #define LOCAL(type) static __inline type __fastcall *************** *** 241,246 **** while (stacksize < lo) stacksize = 2 * stacksize; ! /* FIXME: could trim size if it's larger than lo, and ! much larger than hi */ TRACE(("grow stack to %d\n", stacksize)); stack = realloc(state->stack, sizeof(SRE_STACK) * stacksize); --- 242,247 ---- while (stacksize < lo) stacksize = 2 * stacksize; ! /* FIXME: could trim size if it's much larger than hi, ! as long it's larger than lo */ TRACE(("grow stack to %d\n", stacksize)); stack = realloc(state->stack, sizeof(SRE_STACK) * stacksize); *************** *** 817,836 **** while (pattern[2] == 65535 || count < (int) pattern[2]) { - void *mark0, *mark1; - if (pattern[3] != 65535) { - mark0 = state->mark[pattern[3]]; - mark1 = state->mark[pattern[3]+1]; - } - state->stackbase = stack; - i = SRE_MATCH(state, pattern + 4); - state->stackbase = stackbase; /* rewind */ - if (i < 0) - return i; - if (!i) - break; - if (state->ptr == ptr) { - count = (int) pattern[2]; - break; - } /* this position was valid; add it to the retry stack */ --- 818,821 ---- *************** *** 841,845 **** return i; /* out of memory */ } ! TRACE(("%8d: stack[%d] = %d\n", PTR(ptr), stack, PTR(ptr))); sp = state->stack + stack; sp->ptr = ptr; --- 826,832 ---- return i; /* out of memory */ } ! TRACE(("%8d: stack[%d]\n", PTR(ptr), stack)); ! TRACE((" ptr %d mark %d %d %d\n", ! PTR(ptr), pattern[3], PTR(mark0), PTR(mark1))); sp = state->stack + stack; sp->ptr = ptr; *************** *** 847,854 **** sp->mark = pattern[3]; if (pattern[3] != 65535) { ! sp->mark0 = mark0; ! sp->mark1 = mark1; } stack++; /* move forward */ ptr = state->ptr; --- 834,852 ---- sp->mark = pattern[3]; if (pattern[3] != 65535) { ! sp->mark0 = state->mark[pattern[3]]; ! sp->mark1 = state->mark[pattern[3]+1]; } stack++; + state->stackbase = stack; + i = SRE_MATCH(state, pattern + 4); + state->stackbase = stackbase; + if (i < 0) + return i; + if (!i) + break; + if (state->ptr == ptr) { + count = (int) pattern[2]; + break; + } /* move forward */ ptr = state->ptr; *************** *** 955,958 **** --- 953,957 ---- TRACE(("%8d: leave (failure)\n", PTR(ptr))); if (stack-- > stackbase) { + TRACE(("%8d: pop stack[%d]\n", stack)); sp = state->stack + stack; ptr = sp->ptr; *************** *** 983,987 **** SRE_CHAR* end = state->end; int status = 0; ! int prefix_len; SRE_CODE* prefix = NULL; SRE_CODE* charset = NULL; --- 982,986 ---- SRE_CHAR* end = state->end; int status = 0; ! int prefix_len = 0; SRE_CODE* prefix = NULL; SRE_CODE* charset = NULL; *************** *** 1016,1020 **** #if defined(USE_FAST_SEARCH) ! if (prefix && overlap && prefix_len > 1) { /* pattern starts with a known prefix. use the overlap table to skip forward as fast as we possibly can */ --- 1015,1019 ---- #if defined(USE_FAST_SEARCH) ! if (prefix_len > 1) { /* pattern starts with a known prefix. use the overlap table to skip forward as fast as we possibly can */ *************** *** 1468,1473 **** PyObject* template; PyObject* string; ! PyObject* count; ! if (!PyArg_ParseTuple(args, "OOO", &template, &string, &count)) return NULL; --- 1467,1472 ---- PyObject* template; PyObject* string; ! PyObject* count = Py_False; /* zero */ ! if (!PyArg_ParseTuple(args, "OO|O", &template, &string, &count)) return NULL; *************** *** 1481,1486 **** PyObject* template; PyObject* string; ! PyObject* count; ! if (!PyArg_ParseTuple(args, "OOO", &template, &string, &count)) return NULL; --- 1480,1485 ---- PyObject* template; PyObject* string; ! PyObject* count = Py_False; /* zero */ ! if (!PyArg_ParseTuple(args, "OO|O", &template, &string, &count)) return NULL; *************** *** 1493,1498 **** { PyObject* string; ! PyObject* maxsplit; ! if (!PyArg_ParseTuple(args, "OO", &string, &maxsplit)) return NULL; --- 1492,1497 ---- { PyObject* string; ! PyObject* maxsplit = Py_False; /* zero */ ! if (!PyArg_ParseTuple(args, "O|O", &string, &maxsplit)) return NULL; *************** *** 1831,1835 **** int index; ! PyObject* index_ = Py_False; if (!PyArg_ParseTuple(args, "|O", &index_)) return NULL; --- 1830,1834 ---- int index; ! PyObject* index_ = Py_False; /* zero */ if (!PyArg_ParseTuple(args, "|O", &index_)) return NULL; *************** *** 1858,1862 **** int index; ! PyObject* index_ = Py_False; if (!PyArg_ParseTuple(args, "|O", &index_)) return NULL; --- 1857,1861 ---- int index; ! PyObject* index_ = Py_False; /* zero */ if (!PyArg_ParseTuple(args, "|O", &index_)) return NULL; *************** *** 1885,1889 **** int index; ! PyObject* index_ = Py_False; if (!PyArg_ParseTuple(args, "|O", &index_)) return NULL; --- 1884,1888 ---- int index; ! PyObject* index_ = Py_False; /* zero */ if (!PyArg_ParseTuple(args, "|O", &index_)) return NULL; From python-dev@python.org Wed Jul 5 22:14:18 2000 From: python-dev@python.org (Fredrik Lundh) Date: Wed, 5 Jul 2000 14:14:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre_compile.py,1.24,1.25 Message-ID: <200007052114.OAA30366@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv29972/Lib Modified Files: sre_compile.py Log Message: maintenance release: - reorganized some code to get rid of -Wall and -W4 warnings - fixed default argument handling for sub/subn/split methods (reported by Peter Schneider-Kamp). Index: sre_compile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** sre_compile.py 2000/07/03 21:31:48 1.24 --- sre_compile.py 2000/07/05 21:14:15 1.25 *************** *** 17,22 **** MAXCODE = 65535 ! def _charset(charset, fixup): # internal: optimize character set out = [] charmap = [0]*256 --- 17,24 ---- MAXCODE = 65535 ! def _charset(charset, fixup=None): # internal: optimize character set + if not fixup: + fixup = lambda x: x out = [] charmap = [0]*256 From python-dev@python.org Wed Jul 5 23:56:55 2000 From: python-dev@python.org (Tim Peters) Date: Wed, 5 Jul 2000 15:56:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules pypcre.c,2.18,2.19 Message-ID: <200007052256.PAA12103@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv11692 Modified Files: pypcre.c Log Message: Add more "volatile" decls to stop gcc -Wall warnings. Somebody w/ gcc please check that the wngs are gone! There are cheaper (at runtime) ways to prevent the wngs, but they're obscure and delicate. I'm going for the easy Big Hammer here under the theory that PCRE will be replaced by SRE anyway. Index: pypcre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pypcre.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** pypcre.c 2000/06/01 03:02:48 2.18 --- pypcre.c 2000/07/05 22:56:52 2.19 *************** *** 4521,4527 **** volatile int resetcount, ocount; volatile int first_char = -1; match_data match_block; - const uschar *start_bits = NULL; - const uschar *start_match = (const uschar *)subject + start_pos; const uschar *end_subject; const real_pcre *re = (const real_pcre *)external_re; --- 4521,4527 ---- volatile int resetcount, ocount; volatile int first_char = -1; + const uschar * volatile start_bits = NULL; + const uschar * volatile start_match = (const uschar *)subject + start_pos; match_data match_block; const uschar *end_subject; const real_pcre *re = (const real_pcre *)external_re; From python-dev@python.org Thu Jul 6 00:11:28 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 5 Jul 2000 16:11:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libatexit.tex,1.3,1.4 Message-ID: <200007052311.QAA19481@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv19385 Modified Files: libatexit.tex Log Message: added warning about incompatibility with other codes' use of sys.exitfunc. Index: libatexit.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libatexit.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** libatexit.tex 2000/06/30 16:06:19 1.3 --- libatexit.tex 2000/07/05 23:11:26 1.4 *************** *** 21,24 **** --- 21,32 ---- \withsubitem{(in sys)}{\ttindex{exitfunc}} + Note: This module is unlikely to work correctly when used with other code + that sets \code{sys.exitfunc}. In particular, other core Python modules are + free to use \module{atexit} without the programmer's knowledge. Authors who + use \code{sys.exitfunc} should convert their code to use + \module{atexit} instead. The simplest way to convert code that sets + \code{sys.exitfunc} is to import \module{atexit} and register the function + that had been bound to \code{sys.exitfunc}. + \begin{funcdesc}{register}{func\optional{, *args\optional{, **kargs}}} Register \var{func} as a function to be executed at termination. Any From python-dev@python.org Thu Jul 6 01:50:45 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 5 Jul 2000 17:50:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/ref ref6.tex,1.25,1.26 Message-ID: <200007060050.RAA31816@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ref In directory slayer.i.sourceforge.net:/tmp/cvs-serv31800/ref Modified Files: ref6.tex Log Message: Typo: "This table table" -> "This table is" Noted by Nicholas Spies . Index: ref6.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref6.tex,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** ref6.tex 2000/04/27 18:32:02 1.25 --- ref6.tex 2000/07/06 00:50:42 1.26 *************** *** 462,466 **** The system maintains a table of modules that have been initialized, ! indexed by module name. This table table accessible as \code{sys.modules}. When a module name is found in this table, step (1) is finished. If not, a search for a module --- 462,466 ---- The system maintains a table of modules that have been initialized, ! indexed by module name. This table is accessible as \code{sys.modules}. When a module name is found in this table, step (1) is finished. If not, a search for a module From python-dev@python.org Thu Jul 6 03:55:44 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 5 Jul 2000 19:55:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax handler.py,1.1,1.2 Message-ID: <200007060255.TAA19687@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv19677 Modified Files: handler.py Log Message: fix indentation in three docstrings Index: handler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/handler.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** handler.py 2000/06/29 19:34:54 1.1 --- handler.py 2000/07/06 02:55:41 1.2 *************** *** 27,39 **** def error(self, exception): ! "Handle a recoverable error." raise exception def fatalError(self, exception): ! "Handle a non-recoverable error." raise exception def warning(self, exception): ! "Handle a warning." print exception --- 27,39 ---- def error(self, exception): ! "Handle a recoverable error." raise exception def fatalError(self, exception): ! "Handle a non-recoverable error." raise exception def warning(self, exception): ! "Handle a warning." print exception From python-dev@python.org Thu Jul 6 03:56:38 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 5 Jul 2000 19:56:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax expatreader.py,1.2,1.3 Message-ID: <200007060256.TAA19720@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv19712 Modified Files: expatreader.py Log Message: fix indentation in one docstring Index: expatreader.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/expatreader.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** expatreader.py 2000/07/04 03:39:33 1.2 --- expatreader.py 2000/07/06 02:56:36 1.3 *************** *** 40,44 **** def parse(self, stream_or_string ): ! "Parse an XML document from a URL." if type( stream_or_string ) == type( "" ): stream=open( stream_or_string ) --- 40,44 ---- def parse(self, stream_or_string ): ! "Parse an XML document from a URL." if type( stream_or_string ) == type( "" ): stream=open( stream_or_string ) From python-dev@python.org Thu Jul 6 04:01:42 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 5 Jul 2000 20:01:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax xmlreader.py,1.1,1.2 Message-ID: <200007060301.UAA21867@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv21770 Modified Files: xmlreader.py Log Message: fixed indentation in several places Index: xmlreader.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/xmlreader.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** xmlreader.py 2000/06/29 19:34:54 1.1 --- xmlreader.py 2000/07/06 03:01:40 1.2 *************** *** 7,17 **** class XMLReader: def __init__(self): ! self._cont_handler = handler.ContentHandler() ! #self._dtd_handler = handler.DTDHandler() ! #self._ent_handler = handler.EntityResolver() ! self._err_handler = handler.ErrorHandler() def parse(self, source): ! "Parse an XML document from a system identifier or an InputSource." raise NotImplementedError("This method must be implemented!") --- 7,17 ---- class XMLReader: def __init__(self): ! self._cont_handler = handler.ContentHandler() ! #self._dtd_handler = handler.DTDHandler() ! #self._ent_handler = handler.EntityResolver() ! self._err_handler = handler.ErrorHandler() def parse(self, source): ! "Parse an XML document from a system identifier or an InputSource." raise NotImplementedError("This method must be implemented!") *************** *** 29,34 **** def setDTDHandler(self, handler): ! "Register an object to receive basic DTD-related events." ! self._dtd_handler = handler def getEntityResolver(self): --- 29,34 ---- def setDTDHandler(self, handler): ! "Register an object to receive basic DTD-related events." ! self._dtd_handler = handler def getEntityResolver(self): *************** *** 37,42 **** def setEntityResolver(self, resolver): ! "Register an object to resolve external entities." ! self._ent_handler = resolver def getErrorHandler(self): --- 37,42 ---- def setEntityResolver(self, resolver): ! "Register an object to resolve external entities." ! self._ent_handler = resolver def getErrorHandler(self): *************** *** 45,50 **** def setErrorHandler(self, handler): ! "Register an object to receive error-message events." ! self._err_handler = handler def setLocale(self, locale): --- 45,50 ---- def setErrorHandler(self, handler): ! "Register an object to receive error-message events." ! self._err_handler = handler def setLocale(self, locale): *************** *** 150,167 **** def getColumnNumber(self): ! "Return the column number where the current event ends." ! return -1 def getLineNumber(self): ! "Return the line number where the current event ends." ! return -1 def getPublicId(self): ! "Return the public identifier for the current event." ! return None def getSystemId(self): ! "Return the system identifier for the current event." ! return None # --- AttributesImpl --- 150,167 ---- def getColumnNumber(self): ! "Return the column number where the current event ends." ! return -1 def getLineNumber(self): ! "Return the line number where the current event ends." ! return -1 def getPublicId(self): ! "Return the public identifier for the current event." ! return None def getSystemId(self): ! "Return the system identifier for the current event." ! return None # --- AttributesImpl From python-dev@python.org Thu Jul 6 04:25:29 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 5 Jul 2000 20:25:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libreadline.tex,NONE,1.1 Message-ID: <200007060325.UAA27775@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv27764 Added Files: libreadline.tex Log Message: simple-minded readline section doc based upon module's doc strings. --- NEW FILE --- \section{\module{readline} --- Expose GNU readline functionality to Python} \declaremodule{builtin}{readline} \sectionauthor{Skip Montanaro}{skip@mojam.com} \modulesynopsis{GNU Readline in Python.} \platform{UNIX} The \module{readline} module defines a number of functions used either directly or from the \module{rlcompleter} module to facilitate completion and history file read and write from the Python interpreter. The \module{readline} module defines the following functions: \begin{funcdesc}{parse_and_bind}{string} Parse and execute single line of a readline init file. \end{funcdesc} \begin{funcdesc}{get_line_buffer}{} Return the current contents of the line buffer. \end{funcdesc} \begin{funcdesc}{insert_text}{string} Insert text into the command line. \end{funcdesc} \begin{funcdesc}{read_init_file}{\optional{filename}} Parse a readline initialization file. The default filename is the last filename used. \end{funcdesc} \begin{funcdesc}{read_history_file}{\optional{filename}} Load a readline history file. The default filename is ~/.history. \end{funcdesc} \begin{funcdesc}{write_history_file}{\optional{filename}} Save a readline history file. The default filename is ~/.history. \end{funcdesc} \begin{funcdesc}{set_completer}{\optional{function}} Set or remove the completer function. The function is called as function(text, state), \code{for i in [0, 1, 2, ...]} until it returns a non-string. It should return the next possible completion starting with 'text'. \end{funcdesc} \begin{funcdesc}{get_begidx}{} Get the beginning index of the readline tab-completion scope. \end{funcdesc} \begin{funcdesc}{get_endidx}{} Get the ending index of the readline tab-completion scope. \end{funcdesc} \begin{funcdesc}{set_completer_delims}{string} Set the readline word delimiters for tab-completion. \end{funcdesc} \begin{funcdesc}{get_completer_delims}{} Get the readline word delimiters for tab-completion. \end{funcdesc} \subsection{Example} \nodename{Readline Example} The following example demonstrates how to use the \module{readline} module's history reading and writing functions to automatically load and save a history file named \code{.pyhist} from the user's home directory. The code below would normally be executed automatically during interactive sessions from the user's PYTHONSTARTUP file. \begin{verbatim} >>> import os >>> histfile = os.path.join(os.environ["HOME"], ".pyhist") >>> try: >>> readline.read_history_file(histfile) >>> except IOError: >>> pass >>> import atexit >>> atexit.register(readline.write_history_file, histfile) >>> del os, histfile \end{verbatim} \begin{seealso} \seemodule{rlcompleter}{completion of Python identifiers} \end{seealso} From python-dev@python.org Thu Jul 6 04:26:41 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 5 Jul 2000 20:26:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libatexit.tex,1.4,1.5 Message-ID: <200007060326.UAA27835@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv27824 Modified Files: libatexit.tex Log Message: added seealso pointing reader at readline example which uses atexit. Index: libatexit.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libatexit.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** libatexit.tex 2000/07/05 23:11:26 1.4 --- libatexit.tex 2000/07/06 03:26:39 1.5 *************** *** 68,69 **** --- 68,73 ---- \end{verbatim} + \begin{seealso} + \seemodule{readline}{useful example of atexit to read and write readline + history files} + \end{seealso} From python-dev@python.org Thu Jul 6 05:38:40 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 5 Jul 2000 21:38:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libwinreg.tex,1.3,1.4 Message-ID: <200007060438.VAA05633@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv5626/lib Modified Files: libwinreg.tex Log Message: Correct typo in description of the machine name parameter to the ConnectRegistry() function; there is no trailing period! Index: libwinreg.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libwinreg.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** libwinreg.tex 2000/06/30 03:50:06 1.3 --- libwinreg.tex 2000/07/06 04:38:37 1.4 *************** *** 9,15 **** \versionadded{2.0} ! These functions exposes the Windows registry API to Python. Instead of ! using an integer as the registry handle, a handle object is used to ensure ! that the handles are closed correctly, even if the programmer neglects to explicitly close them. --- 9,15 ---- \versionadded{2.0} ! These functions expose the Windows registry API to Python. Instead of ! using an integer as the registry handle, a handle object is used to ! ensure that the handles are closed correctly, even if the programmer neglects to explicitly close them. *************** *** 18,23 **** \module{winreg} module. - \subsection{Registry Operations \label{registry-operations}} \begin{funcdesc}{CloseKey}{hkey} --- 18,23 ---- \module{winreg} module. + This module offers the following functions: \begin{funcdesc}{CloseKey}{hkey} *************** *** 36,41 **** \var{computer_name} is the name of the remote computer, of the ! form \code{'\\\\computername.'}. If \code{None}, the local computer is ! used. \var{key} is the predefined handle to connect to. --- 36,41 ---- \var{computer_name} is the name of the remote computer, of the ! form \samp{\e\e computername}. If \code{None}, the local computer ! is used. \var{key} is the predefined handle to connect to. *************** *** 67,71 **** \end{funcdesc} - \begin{funcdesc}{DeleteKey}{key, sub_key} Deletes the specified key. --- 67,70 ---- *************** *** 373,377 **** the \method{Close()} method on the object, or the \function{CloseKey()} function. ! All registry functions in this module return one of these objects. --- 372,376 ---- the \method{Close()} method on the object, or the \function{CloseKey()} function. ! All registry functions in this module return one of these objects. *************** *** 380,391 **** encouraged. ! Handle objects provide semantics for __nonzero__ - thus ! \begin{verbatim} ! if handle: ! print "Yes" ! \end{verbatim} ! will print \code{Yes} if the handle is currently valid (ie, has not been closed or detached). ! The object also support comparison semantics, so handle objects will compare true if they both reference the same --- 379,390 ---- encouraged. ! Handle objects provide semantics for \method{__nonzero__()} - thus ! \begin{verbatim} ! if handle: ! print "Yes" ! \end{verbatim} ! will print \code{Yes} if the handle is currently valid (i.e., has not been closed or detached). ! The object also support comparison semantics, so handle objects will compare true if they both reference the same *************** *** 398,402 **** also disconnect the Windows handle from the handle object. ! \begin{methoddesc}{Close} Closes the underlying Windows handle. --- 397,401 ---- also disconnect the Windows handle from the handle object. ! \begin{methoddesc}{Close}{} Closes the underlying Windows handle. *************** *** 405,409 **** ! \begin{methoddesc}{Detach} Detaches the Windows handle from the handle object. --- 404,408 ---- ! \begin{methoddesc}{Detach}{} Detaches the Windows handle from the handle object. From python-dev@python.org Thu Jul 6 05:45:17 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 5 Jul 2000 21:45:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libxmllib.tex,1.22,1.23 Message-ID: <200007060445.VAA05874@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv5865/lib Modified Files: libxmllib.tex Log Message: Sjoerd Mullender : Updates for recent changes in xmllib. Index: libxmllib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libxmllib.tex,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** libxmllib.tex 2000/04/03 20:13:54 1.22 --- libxmllib.tex 2000/07/06 04:45:14 1.23 *************** *** 21,25 **** recognized which influence the parser to accept certain non-standard constructs. The following keyword arguments are currently ! recognized. The defaults for all of these is \code{0} (false). \var{accept_unquoted_attributes} (accept certain attribute values without requiring quotes), \var{accept_missing_endtag_name} (accept --- 21,26 ---- recognized which influence the parser to accept certain non-standard constructs. The following keyword arguments are currently ! recognized. The defaults for all of these is \code{0} (false) except ! for the last one for which the default is \code{1} (true). \var{accept_unquoted_attributes} (accept certain attribute values without requiring quotes), \var{accept_missing_endtag_name} (accept *************** *** 28,32 **** characters in input; this is required according to the XML standard, but Python does not as yet deal properly with these characters, so ! this is not the default).} \end{classdesc} --- 29,34 ---- characters in input; this is required according to the XML standard, but Python does not as yet deal properly with these characters, so ! this is not the default), \var{translate_attribute_references} (don't ! attempt to translate character and entity references in attribute values).} \end{classdesc} From python-dev@python.org Thu Jul 6 05:47:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 5 Jul 2000 21:47:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile.deps,1.35,1.36 Message-ID: <200007060447.VAA05949@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv5940 Modified Files: Makefile.deps Log Message: Add entry for readline documentation. Index: Makefile.deps =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile.deps,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** Makefile.deps 2000/07/05 02:24:39 1.35 --- Makefile.deps 2000/07/06 04:47:25 1.36 *************** *** 227,230 **** --- 227,231 ---- ../lib/libpipes.tex \ ../lib/libpty.tex \ + ../lib/libreadline.tex \ ../lib/librlcompleter.tex \ ../lib/libsched.tex \ From python-dev@python.org Thu Jul 6 05:47:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 5 Jul 2000 21:47:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib lib.tex,1.155,1.156 Message-ID: <200007060447.VAA05953@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv5940/lib Modified Files: lib.tex Log Message: Add entry for readline documentation. Index: lib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/lib.tex,v retrieving revision 1.155 retrieving revision 1.156 diff -C2 -r1.155 -r1.156 *** lib.tex 2000/07/05 02:24:38 1.155 --- lib.tex 2000/07/06 04:47:25 1.156 *************** *** 171,174 **** --- 171,175 ---- \input{libgzip} \input{libzipfile} + \input{libreadline} \input{librlcompleter} From python-dev@python.org Thu Jul 6 05:51:06 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 5 Jul 2000 21:51:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libatexit.tex,1.5,1.6 libreadline.tex,1.1,1.2 librlcompleter.tex,1.2,1.3 Message-ID: <200007060451.VAA06130@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv6118 Modified Files: libatexit.tex libreadline.tex librlcompleter.tex Log Message: Several small changes, mostly to the markup, to improve consistency and internal hyperlinking. Move some things around, also for consistency with other modules ("See also" stuff tends to live at the \section level, before sub-sections, etc.). Index: libatexit.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libatexit.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** libatexit.tex 2000/07/06 03:26:39 1.5 --- libatexit.tex 2000/07/06 04:51:04 1.6 *************** *** 1,4 **** \section{\module{atexit} --- ! exit handlers} \declaremodule{standard}{atexit} --- 1,4 ---- \section{\module{atexit} --- ! Exit handlers} \declaremodule{standard}{atexit} *************** *** 15,19 **** Note: the functions registered via this module are not called when the program is killed by a signal, when a Python fatal internal error is detected, or when ! \code{os._exit()} is called. This is an alternate interface to the functionality provided by the --- 15,19 ---- Note: the functions registered via this module are not called when the program is killed by a signal, when a Python fatal internal error is detected, or when ! \function{os._exit()} is called. This is an alternate interface to the functionality provided by the *************** *** 68,73 **** \end{verbatim} \begin{seealso} ! \seemodule{readline}{useful example of atexit to read and write readline ! history files} \end{seealso} --- 68,74 ---- \end{verbatim} + \begin{seealso} ! \seemodule{readline}{Useful example of atexit to read and write ! \refmodule{readline} history files.} \end{seealso} Index: libreadline.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libreadline.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** libreadline.tex 2000/07/06 03:25:26 1.1 --- libreadline.tex 2000/07/06 04:51:04 1.2 *************** *** 1,18 **** \section{\module{readline} --- ! Expose GNU readline functionality to Python} \declaremodule{builtin}{readline} \sectionauthor{Skip Montanaro}{skip@mojam.com} - \modulesynopsis{GNU Readline in Python.} - \platform{UNIX} The \module{readline} module defines a number of functions used either ! directly or from the \module{rlcompleter} module to facilitate completion ! and history file read and write from the Python interpreter. The \module{readline} module defines the following functions: \begin{funcdesc}{parse_and_bind}{string} Parse and execute single line of a readline init file. --- 1,19 ---- \section{\module{readline} --- ! GNU readline interface} \declaremodule{builtin}{readline} + \platform{Unix} \sectionauthor{Skip Montanaro}{skip@mojam.com} \modulesynopsis{GNU Readline in Python.} The \module{readline} module defines a number of functions used either ! directly or from the \refmodule{rlcompleter} module to facilitate ! completion and history file read and write from the Python ! interpreter. The \module{readline} module defines the following functions: + \begin{funcdesc}{parse_and_bind}{string} Parse and execute single line of a readline init file. *************** *** 34,50 **** \begin{funcdesc}{read_history_file}{\optional{filename}} Load a readline history file. ! The default filename is ~/.history. \end{funcdesc} \begin{funcdesc}{write_history_file}{\optional{filename}} Save a readline history file. ! The default filename is ~/.history. \end{funcdesc} \begin{funcdesc}{set_completer}{\optional{function}} ! Set or remove the completer function. ! The function is called as function(text, state), \code{for i in [0, 1, 2, ...]} until it returns a non-string. ! It should return the next possible completion starting with 'text'. \end{funcdesc} --- 35,51 ---- \begin{funcdesc}{read_history_file}{\optional{filename}} Load a readline history file. ! The default filename is \file{\~{}/.history}. \end{funcdesc} \begin{funcdesc}{write_history_file}{\optional{filename}} Save a readline history file. ! The default filename is \file{\~{}/.history}. \end{funcdesc} \begin{funcdesc}{set_completer}{\optional{function}} ! Set or remove the completer function. The completer function is ! called as \code{\var{function}(\var{text}, \var{state})}, \code{for i in [0, 1, 2, ...]} until it returns a non-string. ! It should return the next possible completion starting with \var{text}. \end{funcdesc} *************** *** 64,90 **** Get the readline word delimiters for tab-completion. \end{funcdesc} ! \subsection{Example} ! \nodename{Readline Example} ! The following example demonstrates how to use the \module{readline} module's ! history reading and writing functions to automatically load and save a ! history file named \code{.pyhist} from the user's home directory. The code ! below would normally be executed automatically during interactive sessions ! from the user's PYTHONSTARTUP file. \begin{verbatim} ! >>> import os ! >>> histfile = os.path.join(os.environ["HOME"], ".pyhist") ! >>> try: ! >>> readline.read_history_file(histfile) ! >>> except IOError: ! >>> pass ! >>> import atexit ! >>> atexit.register(readline.write_history_file, histfile) ! >>> del os, histfile \end{verbatim} - - \begin{seealso} - \seemodule{rlcompleter}{completion of Python identifiers} - \end{seealso} --- 65,94 ---- Get the readline word delimiters for tab-completion. \end{funcdesc} + + + \begin{seealso} + \seemodule{rlcompleter}{Completion of Python identifiers at the + interactive prompt.} + \end{seealso} + ! \subsection{Example \label{readline-example}} ! The following example demonstrates how to use the ! \module{readline} module's history reading and writing functions to ! automatically load and save a history file named \file{.pyhist} from ! the user's home directory. The code below would normally be executed ! automatically during interactive sessions from the user's ! \envvar{PYTHONSTARTUP} file. \begin{verbatim} ! import os ! histfile = os.path.join(os.environ["HOME"], ".pyhist") ! try: ! readline.read_history_file(histfile) ! except IOError: ! pass ! import atexit ! atexit.register(readline.write_history_file, histfile) ! del os, histfile \end{verbatim} Index: librlcompleter.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/librlcompleter.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** librlcompleter.tex 1999/08/02 14:13:09 1.2 --- librlcompleter.tex 2000/07/06 04:51:04 1.3 *************** *** 3,13 **** \declaremodule{standard}{rlcompleter} \sectionauthor{Moshe Zadka}{mzadka@geocities.com} \modulesynopsis{Python identifier completion in the readline library.} The \module{rlcompleter} module defines a completion function for ! the \module{readline} module by completing valid Python identifiers and ! keyword. The \module{rlcompleter} module defines the \class{Completer} class. --- 3,17 ---- \declaremodule{standard}{rlcompleter} + \platform{Unix} \sectionauthor{Moshe Zadka}{mzadka@geocities.com} \modulesynopsis{Python identifier completion in the readline library.} The \module{rlcompleter} module defines a completion function for ! the \refmodule{readline} module by completing valid Python identifiers ! and keywords. + This module is \UNIX-specific due to it's dependence on the + \refmodule{readline} module. + The \module{rlcompleter} module defines the \class{Completer} class. *************** *** 48,52 **** Return the \var{state}th completion for \var{text}. ! If called for \var{text} that doesn't includea period character (\character{.}), it will complete from names currently defined in \refmodule[main]{__main__}, \refmodule[builtin]{__builtin__} and --- 52,56 ---- Return the \var{state}th completion for \var{text}. ! If called for \var{text} that doesn't include a period character (\character{.}), it will complete from names currently defined in \refmodule[main]{__main__}, \refmodule[builtin]{__builtin__} and From python-dev@python.org Thu Jul 6 06:24:44 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 5 Jul 2000 22:24:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/doc doc.tex,1.21,1.22 Message-ID: <200007060524.WAA14336@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv14329/doc Modified Files: doc.tex Log Message: Added some further description to the usage of the seealso environment. Documented the \seerfc and \seeurl macros used in that environment as well. Index: doc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/doc/doc.tex,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** doc.tex 2000/06/30 15:54:18 1.21 --- doc.tex 2000/07/06 05:24:41 1.22 *************** *** 752,755 **** --- 752,760 ---- reasonable manner. + The \env{seealso} environment is typically placed in a section + just before any sub-sections. This is done to ensure that + reference links related to the section are not hidden in a + subsection in the hypertext renditions of the documentation. + \begin{envdesc}{seealso}{} This environment creates a ``See also:'' heading and defines the *************** *** 757,760 **** --- 762,770 ---- \end{envdesc} + For each of the following macros, \var{why} should be a complete + sentence, start with a capital letter (unless it starts with an + identifier, which should not be modified), and end with the + apropriate punctuation. + \begin{macrodesc}{seemodule}{\op{key}\p{name}\p{why}} Refer to another module. \var{why} should be a brief *************** *** 767,774 **** \end{macrodesc} \begin{macrodesc}{seetext}{\p{text}} Add arbitrary text \var{text} to the ``See also:'' list. This can be used to refer to off-line materials or on-line materials ! using the \macro{url} macro. \end{macrodesc} --- 777,803 ---- \end{macrodesc} + \begin{macrodesc}{seerfc}{\p{number}\p{title}\p{why}} + Refer to an IETF Request for Comments (RFC). \var{number} + should be the official number assigned by the RFC Editor, + \var{title} should be the human-readable title of the RFC as + found in the official copy of the document, and \var{why} should + explain what's interesting about the RFC. This should be used + to refer the reader to RFCs which specify protocols or data + formats relevant to the material in the annotated section of the + documentation. + \end{macrodesc} + \begin{macrodesc}{seetext}{\p{text}} Add arbitrary text \var{text} to the ``See also:'' list. This can be used to refer to off-line materials or on-line materials ! using the \macro{url} macro. This should consist of one or more ! complete sentences. ! \end{macrodesc} ! ! \begin{macrodesc}{seeurl}{\p{url}\p{why}} ! References to specific on-line resources should be given using ! the \macro{seeurl} macro. No title is associated with the ! reference, but the \var{why} text may include a title marked ! using the \macro{citetitle} macro. \end{macrodesc} From python-dev@python.org Thu Jul 6 06:34:17 2000 From: python-dev@python.org (Guido van Rossum) Date: Wed, 5 Jul 2000 22:34:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/lib-tk Tkinter.py,1.139,1.140 Message-ID: <200007060534.WAA14782@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/lib-tk In directory slayer.i.sourceforge.net:/tmp/cvs-serv14775 Modified Files: Tkinter.py Log Message: Change whitespace in two places to silence tabnanny. Also fix spelling tupel -> tuple. Index: Tkinter.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/Tkinter.py,v retrieving revision 1.139 retrieving revision 1.140 diff -C2 -r1.139 -r1.140 *** Tkinter.py 2000/06/29 16:30:50 1.139 --- Tkinter.py 2000/07/06 05:34:14 1.140 *************** *** 92,96 **** class Event: ! """Container for the properties of an event. Instances of this type are generated if one of the following events occurs: --- 92,96 ---- class Event: ! """Container for the properties of an event. Instances of this type are generated if one of the following events occurs: *************** *** 678,687 **** self.tk.call('winfo', 'pointerx', self._w)) def winfo_pointerxy(self): ! """Return a tupel of x and y coordinates of the pointer on the root window.""" return self._getints( self.tk.call('winfo', 'pointerxy', self._w)) def winfo_pointery(self): """Return the y coordinate of the pointer on the root window.""" ! return getint( self.tk.call('winfo', 'pointery', self._w)) def winfo_reqheight(self): --- 678,687 ---- self.tk.call('winfo', 'pointerx', self._w)) def winfo_pointerxy(self): ! """Return a tuple of x and y coordinates of the pointer on the root window.""" return self._getints( self.tk.call('winfo', 'pointerxy', self._w)) def winfo_pointery(self): """Return the y coordinate of the pointer on the root window.""" ! return getint( self.tk.call('winfo', 'pointery', self._w)) def winfo_reqheight(self): *************** *** 694,698 **** self.tk.call('winfo', 'reqwidth', self._w)) def winfo_rgb(self, color): ! """Return tupel of decimal values for red, green, blue for COLOR in this widget.""" return self._getints( --- 694,698 ---- self.tk.call('winfo', 'reqwidth', self._w)) def winfo_rgb(self, color): ! """Return tuple of decimal values for red, green, blue for COLOR in this widget.""" return self._getints( From python-dev@python.org Thu Jul 6 12:25:43 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Thu, 6 Jul 2000 04:25:43 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include stringobject.h,2.19,2.20 Message-ID: <200007061125.EAA22783@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv22776/Include Modified Files: stringobject.h Log Message: Added prototypes for the new codec APIs for strings. These APIs match the ones in the Unicode implementation, but were extended to be able to reuse the existing Unicode codecs for string purposes too. Conversion from string to Unicode and back are done using the default encoding. Index: stringobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/stringobject.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** stringobject.h 2000/06/30 23:58:04 2.19 --- stringobject.h 2000/07/06 11:25:40 2.20 *************** *** 82,85 **** --- 82,116 ---- #define PyString_GET_SIZE(op) (((PyStringObject *)(op))->ob_size) + /* --- Generic Codecs ----------------------------------------------------- */ + + /* Create a string object by decoding the encoded string s of the + given size. */ + + extern DL_IMPORT(PyObject*) PyString_Decode( + const char *s, /* encoded string */ + int size, /* size of buffer */ + const char *encoding, /* encoding */ + const char *errors /* error handling */ + ); + + /* Encodes a char buffer of the given size and returns a + Python string object. */ + + extern DL_IMPORT(PyObject*) PyString_Encode( + const char *s, /* string char buffer */ + int size, /* number of chars to encode */ + const char *encoding, /* encoding */ + const char *errors /* error handling */ + ); + + /* Encodes a string object and returns the result as Python string + object. */ + + extern DL_IMPORT(PyObject*) PyString_AsEncodedString( + PyObject *str, /* string object */ + const char *encoding, /* encoding */ + const char *errors /* error handling */ + ); + #ifdef __cplusplus } From python-dev@python.org Thu Jul 6 12:29:04 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Thu, 6 Jul 2000 04:29:04 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.73,2.74 Message-ID: <200007061129.EAA23033@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv23018/Objects Modified Files: stringobject.c Log Message: Added new codec APIs and a new interface method .encode() which works just like the Unicode one. The C APIs match the ones in the Unicode implementation, but were extended to be able to reuse the existing Unicode codecs for string purposes too. Conversions from string to Unicode and back are done using the default encoding. Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.73 retrieving revision 2.74 diff -C2 -r2.73 -r2.74 *** stringobject.c 2000/07/05 09:47:46 2.73 --- stringobject.c 2000/07/06 11:29:01 2.74 *************** *** 153,156 **** --- 153,250 ---- } + PyObject *PyString_Decode(const char *s, + int size, + const char *encoding, + const char *errors) + { + PyObject *buffer = NULL, *str; + + if (encoding == NULL) + encoding = PyUnicode_GetDefaultEncoding(); + + /* Decode via the codec registry */ + buffer = PyBuffer_FromMemory((void *)s, size); + if (buffer == NULL) + goto onError; + str = PyCodec_Decode(buffer, encoding, errors); + if (str == NULL) + goto onError; + /* Convert Unicode to a string using the default encoding */ + if (PyUnicode_Check(str)) { + PyObject *temp = str; + str = PyUnicode_AsEncodedString(str, NULL, NULL); + Py_DECREF(temp); + if (str == NULL) + goto onError; + } + if (!PyString_Check(str)) { + PyErr_Format(PyExc_TypeError, + "decoder did not return an string object (type=%.400s)", + str->ob_type->tp_name); + Py_DECREF(str); + goto onError; + } + Py_DECREF(buffer); + return str; + + onError: + Py_XDECREF(buffer); + return NULL; + } + + PyObject *PyString_Encode(const char *s, + int size, + const char *encoding, + const char *errors) + { + PyObject *v, *str; + + str = PyString_FromStringAndSize(s, size); + if (str == NULL) + return NULL; + v = PyString_AsEncodedString(str, encoding, errors); + Py_DECREF(str); + return v; + } + + PyObject *PyString_AsEncodedString(PyObject *str, + const char *encoding, + const char *errors) + { + PyObject *v; + + if (!PyString_Check(str)) { + PyErr_BadArgument(); + goto onError; + } + + if (encoding == NULL) + encoding = PyUnicode_GetDefaultEncoding(); + + /* Encode via the codec registry */ + v = PyCodec_Encode(str, encoding, errors); + if (v == NULL) + goto onError; + /* Convert Unicode to a string using the default encoding */ + if (PyUnicode_Check(v)) { + PyObject *temp = v; + v = PyUnicode_AsEncodedString(v, NULL, NULL); + Py_DECREF(temp); + if (v == NULL) + goto onError; + } + if (!PyString_Check(v)) { + PyErr_Format(PyExc_TypeError, + "encoder did not return a string object (type=%.400s)", + v->ob_type->tp_name); + Py_DECREF(v); + goto onError; + } + return v; + + onError: + return NULL; + } + static void string_dealloc(op) *************** *** 1687,1690 **** --- 1781,1803 ---- + static char encode__doc__[] = + "S.encode([encoding[,errors]]) -> string\n\ + \n\ + Return an encoded string version of S. Default encoding is the current\n\ + default string encoding. errors may be given to set a different error\n\ + handling scheme. Default is 'strict' meaning that encoding errors raise\n\ + a ValueError. Other possible values are 'ignore' and 'replace'."; + + static PyObject * + string_encode(PyStringObject *self, PyObject *args) + { + char *encoding = NULL; + char *errors = NULL; + if (!PyArg_ParseTuple(args, "|ss:encode", &encoding, &errors)) + return NULL; + return PyString_AsEncodedString((PyObject *)self, encoding, errors); + } + + static char expandtabs__doc__[] = "S.expandtabs([tabsize]) -> string\n\ *************** *** 2253,2256 **** --- 2366,2370 ---- {"rjust", (PyCFunction)string_rjust, 1, rjust__doc__}, {"center", (PyCFunction)string_center, 1, center__doc__}, + {"encode", (PyCFunction)string_encode, 1, encode__doc__}, {"expandtabs", (PyCFunction)string_expandtabs, 1, expandtabs__doc__}, {"splitlines", (PyCFunction)string_splitlines, 1, splitlines__doc__}, From python-dev@python.org Thu Jul 6 13:22:03 2000 From: python-dev@python.org (Jack Jansen) Date: Thu, 6 Jul 2000 05:22:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python getargs.c,2.37,2.38 modsupport.c,2.46,2.47 Message-ID: <200007061222.FAA05035@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv5003 Modified Files: getargs.c modsupport.c Log Message: Added support for H (unsigned short) specifier in PyArg_ParseTuple and Py_BuildValue. Index: getargs.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v retrieving revision 2.37 retrieving revision 2.38 diff -C2 -r2.37 -r2.38 *** getargs.c 2000/07/01 01:07:38 2.37 --- getargs.c 2000/07/06 12:22:00 2.38 *************** *** 490,493 **** --- 490,514 ---- } + case 'H': /* unsigned short int */ + { + unsigned short *p = va_arg(*p_va, unsigned short *); + long ival = PyInt_AsLong(arg); + if (ival == -1 && PyErr_Occurred()) + return "integer"; + else if (ival < 0) { + PyErr_SetString(PyExc_OverflowError, + "unsigned short integer is less than minimum"); + return "integer"; + } + else if (ival > USHRT_MAX) { + PyErr_SetString(PyExc_OverflowError, + "unsigned short integer is greater than maximum"); + return "integer"; + } + else + *p = (unsigned short) ival; + break; + } + case 'i': /* signed int */ { *************** *** 510,514 **** break; } - case 'l': /* long int */ { --- 531,534 ---- *************** *** 1205,1208 **** --- 1225,1234 ---- { (void) va_arg(*p_va, short *); + break; + } + + case 'H': /* unsigned short int */ + { + (void) va_arg(*p_va, unsigned short *); break; } Index: modsupport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/modsupport.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** modsupport.c 2000/07/03 21:39:47 2.46 --- modsupport.c 2000/07/06 12:22:00 2.47 *************** *** 279,282 **** --- 279,285 ---- case 'i': return PyInt_FromLong((long)va_arg(*p_va, int)); + + case 'H': + return PyInt_FromLong((long)va_arg(*p_va, unsigned int)); case 'l': From python-dev@python.org Thu Jul 6 14:43:40 2000 From: python-dev@python.org (Skip Montanaro) Date: Thu, 6 Jul 2000 06:43:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/templates module.tex,1.19,1.20 Message-ID: <200007061343.GAA16722@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/templates In directory slayer.i.sourceforge.net:/tmp/cvs-serv16714 Modified Files: module.tex Log Message: modified template to demonstrate subsection for examples. Index: module.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/templates/module.tex,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** module.tex 1999/03/02 16:24:22 1.19 --- module.tex 2000/07/06 13:43:37 1.20 *************** *** 130,134 **** % detailed list of functions.) ! Example: \begin{verbatim} --- 130,138 ---- % detailed list of functions.) ! \subsection{Example} ! \nodename{Spam Example} ! ! The following example demonstrates how to open a can of spam using the ! \module{spam} module. \begin{verbatim} From python-dev@python.org Thu Jul 6 14:57:42 2000 From: python-dev@python.org (Jack Jansen) Date: Thu, 6 Jul 2000 06:57:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodectype.c,2.3,2.4 Message-ID: <200007061357.GAA17565@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv17257 Modified Files: unicodectype.c Log Message: Conditionally (currently on ifdef macintosh) break the large switch up into 1000-case smaller ones. Index: unicodectype.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodectype.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** unicodectype.c 2000/07/05 09:48:59 2.3 --- unicodectype.c 2000/07/06 13:57:38 2.4 *************** *** 15,18 **** --- 15,28 ---- #include "unicodeobject.h" + #ifdef macintosh + /* This probably needs to be defined for some other compilers too. It breaks the + ** 5000-label switch statement up into switches with around 1000 cases each. + */ + #define BREAK_SWITCH_UP return 1; } switch (ch) { + #else + #define BREAK_SWITCH_UP /* nothing */ + #endif + + /* Returns 1 for Unicode characters having the category 'Zl' or type 'B', 0 otherwise. */ *************** *** 5992,5995 **** --- 6002,6006 ---- case 0x1023: /* MYANMAR LETTER I */ case 0x1024: /* MYANMAR LETTER II */ + BREAK_SWITCH_UP case 0x1025: /* MYANMAR LETTER U */ case 0x1026: /* MYANMAR LETTER UU */ *************** *** 6991,6994 **** --- 7002,7006 ---- case 0x1532: /* CANADIAN SYLLABICS WEST-CREE YWI */ case 0x1533: /* CANADIAN SYLLABICS YWII */ + BREAK_SWITCH_UP case 0x1534: /* CANADIAN SYLLABICS WEST-CREE YWII */ case 0x1535: /* CANADIAN SYLLABICS YWO */ *************** *** 7990,7993 **** --- 8002,8006 ---- case 0xA02A: /* YI SYLLABLE BE */ case 0xA02B: /* YI SYLLABLE BEP */ + BREAK_SWITCH_UP case 0xA02C: /* YI SYLLABLE BUT */ case 0xA02D: /* YI SYLLABLE BUX */ *************** *** 8989,8992 **** --- 9002,9006 ---- case 0xA411: /* YI SYLLABLE QUR */ case 0xA412: /* YI SYLLABLE QYT */ + BREAK_SWITCH_UP case 0xA413: /* YI SYLLABLE QYX */ case 0xA414: /* YI SYLLABLE QY */ *************** *** 9988,9991 **** --- 10002,10006 ---- case 0xFD94: /* ARABIC LIGATURE HEH WITH MEEM WITH MEEM INITIAL FORM */ case 0xFD95: /* ARABIC LIGATURE NOON WITH HAH WITH MEEM INITIAL FORM */ + BREAK_SWITCH_UP case 0xFD96: /* ARABIC LIGATURE NOON WITH HAH WITH ALEF MAKSURA FINAL FORM */ case 0xFD97: /* ARABIC LIGATURE NOON WITH JEEM WITH MEEM FINAL FORM */ From python-dev@python.org Thu Jul 6 16:17:55 2000 From: python-dev@python.org (Jack Jansen) Date: Thu, 6 Jul 2000 08:17:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/bgen/bgen bgenType.py,1.5,1.6 macsupport.py,1.17,1.18 Message-ID: <200007061517.IAA04050@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/bgen/bgen In directory slayer.i.sourceforge.net:/tmp/cvs-serv4000 Modified Files: bgenType.py macsupport.py Log Message: Make a distinction between shorts and unsigned shorts. Index: bgenType.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/bgen/bgen/bgenType.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** bgenType.py 1998/04/28 16:04:12 1.5 --- bgenType.py 2000/07/06 15:17:52 1.6 *************** *** 138,141 **** --- 138,142 ---- char = Type("char", "c") short = Type("short", "h") + unsigned_short = Type("unsigned short", "H") int = Type("int", "i") long = Type("long", "l") Index: macsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/bgen/bgen/macsupport.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** macsupport.py 2000/04/24 14:56:00 1.17 --- macsupport.py 2000/07/06 15:17:52 1.18 *************** *** 22,26 **** UInt8 = Type("UInt8", "b") SInt8 = Type("SInt8", "b") ! UInt16 = Type("UInt16", "h") SInt16 = Type("SInt16", "h") UInt32 = Type("UInt32", "l") --- 22,26 ---- UInt8 = Type("UInt8", "b") SInt8 = Type("SInt8", "b") ! UInt16 = Type("UInt16", "H") SInt16 = Type("SInt16", "h") UInt32 = Type("UInt32", "l") From python-dev@python.org Thu Jul 6 17:12:51 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 6 Jul 2000 09:12:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/templates module.tex,1.20,1.21 Message-ID: <200007061612.JAA11764@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/templates In directory slayer.i.sourceforge.net:/tmp/cvs-serv11738 Modified Files: module.tex Log Message: Minor changes. Explain that for class exceptions, use excdesc but do not document the constructor parameters. Need a better way, but this will do for now. Index: module.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/templates/module.tex,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** module.tex 2000/07/06 13:43:37 1.20 --- module.tex 2000/07/06 16:12:47 1.21 *************** *** 85,89 **** \begin{funcdesc}{open}{filename\optional{, mode\optional{, buffersize}}} Open the file \var{filename} as a can of Spam. The optional ! \var{mode} and \var{buffersize} arguments specify the read-write mode (\code{'r'} (default) or \code{'w'}) and the buffer size (default: system dependent). --- 85,89 ---- \begin{funcdesc}{open}{filename\optional{, mode\optional{, buffersize}}} Open the file \var{filename} as a can of Spam. The optional ! \var{mode} and \var{buffersize} arguments specify the read/write mode (\code{'r'} (default) or \code{'w'}) and the buffer size (default: system dependent). *************** *** 102,106 **** % --- 3.3. --- % Exceptions are described using a ``excdesc'' block. This has only ! % one parameter: the exception name. \begin{excdesc}{error} --- 102,108 ---- % --- 3.3. --- % Exceptions are described using a ``excdesc'' block. This has only ! % one parameter: the exception name. Exceptions defined as classes in ! % the source code should be documented using this environment, but ! % constructor parameters must be ommitted. \begin{excdesc}{error} *************** *** 130,135 **** % detailed list of functions.) ! \subsection{Example} ! \nodename{Spam Example} The following example demonstrates how to open a can of spam using the --- 132,136 ---- % detailed list of functions.) ! \subsection{Example \label{spam-example}} The following example demonstrates how to open a can of spam using the From python-dev@python.org Thu Jul 6 18:58:09 2000 From: python-dev@python.org (Skip Montanaro) Date: Thu, 6 Jul 2000 10:58:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules makesetup,1.23,1.24 Message-ID: <200007061758.KAA27595@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv27574 Modified Files: makesetup Log Message: don't prepend "$(srcdir)/" to paths beginning with "$" since they are likely to be absolute. Index: makesetup =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/makesetup,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** makesetup 1999/05/21 19:18:49 1.23 --- makesetup 2000/07/06 17:58:06 1.24 *************** *** 190,193 **** --- 190,194 ---- glmodule.c) ;; /*) ;; + \$*) ;; *) src='$(srcdir)/'$src;; esac From python-dev@python.org Thu Jul 6 19:09:04 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 6 Jul 2000 11:09:04 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libtime.tex,1.31,1.32 Message-ID: <200007061809.LAA01187@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv1155 Modified Files: libtime.tex Log Message: Correct a markup nit that caused a space to be dropped from the HTML version (actually a LaTeX2HTML bug), and clarified a sentence in the mktime() description based entirely on comments from Grant Griffin . Index: libtime.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtime.tex,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** libtime.tex 2000/06/30 04:24:52 1.31 --- libtime.tex 2000/07/06 18:09:02 1.32 *************** *** 155,160 **** \begin{funcdesc}{mktime}{tuple} This is the inverse function of \function{localtime()}. Its argument ! is the full 9-tuple (since the dst flag is needed --- pass \code{-1} ! as the dst flag if it is unknown) which expresses the time in \emph{local} time, not UTC. It returns a floating point number, for compatibility with \function{time()}. If the input value cannot be --- 155,160 ---- \begin{funcdesc}{mktime}{tuple} This is the inverse function of \function{localtime()}. Its argument ! is the full 9-tuple (since the dst flag is needed; use \code{-1} as ! the dst flag if it is unknown) which expresses the time in \emph{local} time, not UTC. It returns a floating point number, for compatibility with \function{time()}. If the input value cannot be From python-dev@python.org Thu Jul 6 19:14:09 2000 From: python-dev@python.org (A.M. Kuchling) Date: Thu, 6 Jul 2000 11:14:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.28,2.29 Message-ID: <200007061814.LAA02516@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2452 Modified Files: _cursesmodule.c Log Message: Removed unused variables. Added two functions that were left out of the method definition table. Index: _cursesmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v retrieving revision 2.28 retrieving revision 2.29 diff -C2 -r2.28 -r2.29 *** _cursesmodule.c 2000/06/27 21:49:47 2.28 --- _cursesmodule.c 2000/07/06 18:14:03 2.29 *************** *** 1644,1648 **** PyObject *args; { - int rtn; MEVENT event; --- 1644,1647 ---- *************** *** 1948,1952 **** PyObject * arg; { ! int newmask, rtn; mmask_t oldmask, availmask; --- 1947,1951 ---- PyObject * arg; { ! int newmask; mmask_t oldmask, availmask; *************** *** 2160,2164 **** PyObject * arg; { ! int fd, err; PyCursesInitialised --- 2159,2163 ---- PyObject * arg; { ! int fd; PyCursesInitialised *************** *** 2303,2306 **** --- 2302,2307 ---- {"reset_prog_mode", (PyCFunction)PyCurses_reset_prog_mode}, {"reset_shell_mode", (PyCFunction)PyCurses_reset_shell_mode}, + {"resetty", (PyCFunction)PyCurses_resetty}, + {"savetty", (PyCFunction)PyCurses_savetty}, {"setsyx", (PyCFunction)PyCurses_setsyx}, {"start_color", (PyCFunction)PyCurses_Start_Color}, From python-dev@python.org Thu Jul 6 19:37:10 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 6 Jul 2000 11:37:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libsocket.tex,1.45,1.46 Message-ID: <200007061837.LAA03920@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv3911/lib Modified Files: libsocket.tex Log Message: Clean up markup to be more like recommended practice; only small changes needed. Index: libsocket.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsocket.tex,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -r1.45 -r1.46 *** libsocket.tex 2000/06/30 04:21:41 1.45 --- libsocket.tex 2000/07/06 18:37:08 1.46 *************** *** 231,234 **** --- 231,240 ---- \end{datadesc} + + \begin{seealso} + \seemodule{SocketServer}{Classes that simplify writing network servers.} + \end{seealso} + + \subsection{Socket Objects \label{socket-objects}} *************** *** 394,400 **** instead. - \subsection{Example} - \nodename{Socket Example} Here are two minimal example programs using the TCP/IP protocol:\ a server that echoes all data that it receives back (servicing only one --- 400,406 ---- instead. + \subsection{Example \label{socket-example}} + Here are two minimal example programs using the TCP/IP protocol:\ a server that echoes all data that it receives back (servicing only one *************** *** 437,442 **** print 'Received', `data` \end{verbatim} - - \begin{seealso} - \seemodule{SocketServer}{classes that simplify writing network servers} - \end{seealso} --- 443,444 ---- From python-dev@python.org Thu Jul 6 19:55:14 2000 From: python-dev@python.org (Skip Montanaro) Date: Thu, 6 Jul 2000 11:55:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules readline.c,2.18,2.19 Message-ID: <200007061855.LAA05178@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv5168 Modified Files: readline.c Log Message: added read_history_file and write_history_file XXX should perhaps support history truncation as well Index: readline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** readline.c 2000/06/28 21:30:31 2.18 --- readline.c 2000/07/06 18:55:12 2.19 *************** *** 95,98 **** --- 95,146 ---- + /* Exported function to load a readline history file */ + + static PyObject * + read_history_file(self, args) + PyObject *self; + PyObject *args; + { + char *s = NULL; + if (!PyArg_ParseTuple(args, "|z:read_history_file", &s)) + return NULL; + errno = read_history(s); + if (errno) + return PyErr_SetFromErrno(PyExc_IOError); + Py_INCREF(Py_None); + return Py_None; + } + + static char doc_read_history_file[] = "\ + read_history_file([filename]) -> None\n\ + Load a readline history file.\n\ + The default filename is ~/.history.\ + "; + + + /* Exported function to save a readline history file */ + + static PyObject * + write_history_file(self, args) + PyObject *self; + PyObject *args; + { + char *s = NULL; + if (!PyArg_ParseTuple(args, "|z:write_history_file", &s)) + return NULL; + errno = write_history(s); + if (errno) + return PyErr_SetFromErrno(PyExc_IOError); + Py_INCREF(Py_None); + return Py_None; + } + + static char doc_write_history_file[] = "\ + write_history_file([filename]) -> None\n\ + Save a readline history file.\n\ + The default filename is ~/.history.\ + "; + + /* Exported function to specify a word completer in Python */ *************** *** 262,265 **** --- 310,315 ---- {"insert_text", insert_text, 1, doc_insert_text}, {"read_init_file", read_init_file, 1, doc_read_init_file}, + {"read_history_file", read_history_file, 1, doc_read_history_file}, + {"write_history_file", write_history_file, 1, doc_write_history_file}, {"set_completer", set_completer, 1, doc_set_completer}, {"get_begidx", get_begidx, 0, doc_get_begidx}, From python-dev@python.org Thu Jul 6 20:38:54 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 6 Jul 2000 12:38:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.29,2.30 almodule.c,1.26,1.27 pcremodule.c,2.20,2.21 Message-ID: <200007061938.MAA14650@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv14639 Modified Files: _cursesmodule.c almodule.c pcremodule.c Log Message: Python 2.0 is not supposed to use string exceptions in the standard library & extensions, so create exceptions in extension modules using the PyErr_NewException() API. Index: _cursesmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v retrieving revision 2.29 retrieving revision 2.30 diff -C2 -r2.29 -r2.30 *** _cursesmodule.c 2000/07/06 18:14:03 2.29 --- _cursesmodule.c 2000/07/06 19:38:49 2.30 *************** *** 2330,2334 **** /* For exception curses.error */ ! PyCursesError = PyString_FromString("_curses.error"); PyDict_SetItemString(d, "error", PyCursesError); --- 2330,2334 ---- /* For exception curses.error */ ! PyCursesError = PyErr_NewException("_curses.error", NULL, NULL); PyDict_SetItemString(d, "error", PyCursesError); Index: almodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/almodule.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** almodule.c 2000/06/30 23:58:05 1.26 --- almodule.c 2000/07/06 19:38:49 1.27 *************** *** 2196,2200 **** /* Add some symbolic constants to the module */ d = PyModule_GetDict(m); ! ErrorObject = PyString_FromString("al.error"); PyDict_SetItemString(d, "error", ErrorObject); --- 2196,2200 ---- /* Add some symbolic constants to the module */ d = PyModule_GetDict(m); ! ErrorObject = PyErr_NewException("al.error", NULL, NULL); PyDict_SetItemString(d, "error", ErrorObject); Index: pcremodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pcremodule.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** pcremodule.c 2000/06/30 23:50:38 2.20 --- pcremodule.c 2000/07/06 19:38:49 2.21 *************** *** 655,659 **** /* Add some symbolic constants to the module */ d = PyModule_GetDict(m); ! ErrorObject = PyString_FromString("pcre.error"); PyDict_SetItemString(d, "error", ErrorObject); --- 655,659 ---- /* Add some symbolic constants to the module */ d = PyModule_GetDict(m); ! ErrorObject = PyErr_NewException("pcre.error", NULL, NULL); PyDict_SetItemString(d, "error", ErrorObject); From python-dev@python.org Thu Jul 6 20:42:21 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 6 Jul 2000 12:42:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.141,2.142 Message-ID: <200007061942.MAA14903@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv14895/Modules Modified Files: posixmodule.c Log Message: Fix bug #392, reported by Jonathan Giddy : In posixmodule.c:posix_fork, the function PyOS_AfterFork is called for both the parent and the child, despite the docs stating that it should be called in the new (child) process. This causes problems in the parent since the forking thread becomes the main thread according to the signal module. Calling PyOS_AfterFork() only in the child fixes this. Changed for both fork() and forkpty(). Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.141 retrieving revision 2.142 diff -C2 -r2.141 -r2.142 *** posixmodule.c 2000/06/30 23:58:05 2.141 --- posixmodule.c 2000/07/06 19:42:19 2.142 *************** *** 1756,1760 **** if (pid == -1) return posix_error(); ! PyOS_AfterFork(); return PyInt_FromLong((long)pid); } --- 1756,1761 ---- if (pid == -1) return posix_error(); ! if (pid == 0) ! PyOS_AfterFork(); return PyInt_FromLong((long)pid); } *************** *** 1815,1819 **** if (pid == -1) return posix_error(); ! PyOS_AfterFork(); return Py_BuildValue("(ii)", pid, master_fd); } --- 1816,1821 ---- if (pid == -1) return posix_error(); ! if (pid == 0) ! PyOS_AfterFork(); return Py_BuildValue("(ii)", pid, master_fd); } From python-dev@python.org Thu Jul 6 20:43:34 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Thu, 6 Jul 2000 12:43:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.35,2.36 Message-ID: <200007061943.MAA14997@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv14982/Objects Modified Files: unicodeobject.c Log Message: Fixed a couple of places where 'int' was used where 'long' should have been used. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** unicodeobject.c 2000/07/05 09:49:44 2.35 --- unicodeobject.c 2000/07/06 19:43:31 2.36 *************** *** 771,775 **** PyObject *_PyUnicode_AsUTF8String(PyObject *unicode, ! const char *errors) { PyObject *v = ((PyUnicodeObject *)unicode)->utf8str; --- 771,775 ---- PyObject *_PyUnicode_AsUTF8String(PyObject *unicode, ! const char *errors) { PyObject *v = ((PyUnicodeObject *)unicode)->utf8str; *************** *** 1064,1068 **** while (s < end) { unsigned char c; ! unsigned int x; int i; --- 1064,1068 ---- while (s < end) { unsigned char c; ! unsigned long x; int i; *************** *** 1373,1377 **** while (s < end) { unsigned char c; ! unsigned int x; int i; --- 1373,1377 ---- while (s < end) { unsigned char c; ! unsigned long x; int i; *************** *** 1853,1857 **** /* Apply mapping */ if (PyInt_Check(x)) { ! int value = PyInt_AS_LONG(x); if (value < 0 || value > 65535) { PyErr_SetString(PyExc_TypeError, --- 1853,1857 ---- /* Apply mapping */ if (PyInt_Check(x)) { ! long value = PyInt_AS_LONG(x); if (value < 0 || value > 65535) { PyErr_SetString(PyExc_TypeError, *************** *** 1972,1976 **** /* Apply mapping */ if (PyInt_Check(x)) { ! int value = PyInt_AS_LONG(x); if (value < 0 || value > 255) { PyErr_SetString(PyExc_TypeError, --- 1972,1976 ---- /* Apply mapping */ if (PyInt_Check(x)) { ! long value = PyInt_AS_LONG(x); if (value < 0 || value > 255) { PyErr_SetString(PyExc_TypeError, *************** *** 3071,3075 **** while (len1 > 0 && len2 > 0) { unsigned short c1, c2; /* 16 bits */ ! int diff; /* 32 bits */ c1 = *s1++; --- 3071,3075 ---- while (len1 > 0 && len2 > 0) { unsigned short c1, c2; /* 16 bits */ ! long diff; /* >=32 bits */ c1 = *s1++; *************** *** 3081,3085 **** /* now c1 and c2 are in UTF-32-compatible order */ ! diff = (int)c1 - (int)c2; if (diff) return (diff < 0) ? -1 : (diff != 0); --- 3081,3085 ---- /* now c1 and c2 are in UTF-32-compatible order */ ! diff = (long)c1 - (long)c2; if (diff) return (diff < 0) ? -1 : (diff != 0); From python-dev@python.org Thu Jul 6 21:13:26 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Thu, 6 Jul 2000 13:13:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.36,2.37 Message-ID: <200007062013.NAA23575@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv23563/Objects Modified Files: unicodeobject.c Log Message: Fixed some code that used 'short' to use 'long' instead. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.36 retrieving revision 2.37 diff -C2 -r2.36 -r2.37 *** unicodeobject.c 2000/07/06 19:43:31 2.36 --- unicodeobject.c 2000/07/06 20:13:23 2.37 *************** *** 3050,3054 **** /* http://www-4.ibm.com/software/developer/library/utf16.html?dwzone=unicode */ ! static unsigned short utf16Fixup[32] = { 0, 0, 0, 0, 0, 0, 0, 0, --- 3050,3054 ---- /* http://www-4.ibm.com/software/developer/library/utf16.html?dwzone=unicode */ ! static unsigned long utf16Fixup[32] = { 0, 0, 0, 0, 0, 0, 0, 0, *************** *** 3070,3075 **** while (len1 > 0 && len2 > 0) { ! unsigned short c1, c2; /* 16 bits */ ! long diff; /* >=32 bits */ c1 = *s1++; --- 3070,3075 ---- while (len1 > 0 && len2 > 0) { ! unsigned long c1, c2; ! long diff; c1 = *s1++; From python-dev@python.org Fri Jul 7 04:36:14 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 6 Jul 2000 20:36:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libwebbrowser.tex,NONE,1.1 lib.tex,1.156,1.157 Message-ID: <200007070336.UAA30963@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv30950/Doc/lib Modified Files: lib.tex Added Files: libwebbrowser.tex Log Message: New module webbrowser. Easy-to-use controller objects to make using a Web browser as a help/information browser easy across platforms. --- NEW FILE --- \section{\module{webbrowser} --- Convenient Web-browser controller} \declaremodule{standard}{webbrowser} \modulesynopsis{Easy-to-use controller for Web browsers.} \moduleauthor{Fred L. Drake, Jr.}{fdrake@acm.org} \sectionauthor{Fred L. Drake, Jr.}{fdrake@acm.org} The \module{webbrowser} module provides a very high-level interface to allow displaying Web-based documents to users. The controller objects are easy to use and are platform independent. Under \UNIX, graphical browsers are preferred under X11, but text-mode browser will be used if graphical browsers are not available or an X11 display isn't available. If text-mode browsers are used, the calling process will block until the user exits the browser. For non-\UNIX{} platforms, or when X11 browsers are available on \UNIX, the controlling process will not wait for the user to finish with the browser, but allow the browser to maintain its own window on the display. The following exception is defined: \begin{excdesc}{Error} Exception raised when a browser control error occurs. \end{excdesc} The following functions are defined: \begin{funcdesc}{open}{url\optional{, new}} Display \var{url} using the default browser. If \var{new} is true, a new browser window is opened if possible. \end{funcdesc} \begin{funcdesc}{open_new}{url} Open \var{url} in a new window of the default browser, if possible, otherwise, open \var{url} in the only browser window. \end{funcdesc} \begin{funcdesc}{get}{\optional{name}} Return a controller object for the browser type \var{name}. \end{funcdesc} \begin{funcdesc}{register}{name, constructor\optional{, controller}} Register the browser type \var{name}. Once a browser type is registered, the \function{get()} function can return a controller for that browser type. If \var{instance} is not provided, or is \code{None}, \var{constructor} will be called without parameters to create an instance when needed. If \var{instance} is provided, \var{constructor} will never be called, and may be \code{None}. \end{funcdesc} Several browser types are defined. This table gives the type names that may be passed to the \function{get()} function and the names of the implementation classes, all defined in this module. \begin{tableiii}{l|l|c}{code}{Type Name}{Class Name}{Notes} \lineiii{'netscape'}{\class{Netscape}}{} \lineiii{'grail'}{\class{Grail}}{} \lineiii{'windows-default'}{\class{WindowsDefault}}{(1)} \lineiii{'internet-config'}{\class{InternetConfig}}{(2)} \lineiii{'command-line'}{\class{CommandLineBrowser}}{} \end{tableiii} \noindent Notes: \begin{description} \item[(1)] Only on Windows platforms; requires the common extension modules \module{win32api} and \module{win32con}. \item[(2)] Only on MacOS platforms; requires the standard MacPython \module{ic} module, described in the \citetitle[../mac/module-ic.html]{Macintosh Library Modules} manual. \end{description} \subsection{Browser Controller Objects \label{browser-controllers}} Browser controllers provide two methods which parallel two of the module-level convenience functions: \begin{funcdesc}{open}{url\optional{, new}} Display \var{url} using the browser handled by this controller. If \var{new} is true, a new browser window is opened if possible. \end{funcdesc} \begin{funcdesc}{open_new}{url} Open \var{url} in a new window of the browser handled by this controller, if possible, otherwise, open \var{url} in the only browser window. \end{funcdesc} Index: lib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/lib.tex,v retrieving revision 1.156 retrieving revision 1.157 diff -C2 -r1.156 -r1.157 *** lib.tex 2000/07/06 04:47:25 1.156 --- lib.tex 2000/07/07 03:36:12 1.157 *************** *** 199,202 **** --- 199,203 ---- \input{internet} % Internet Protocols + \input{libwebbrowser} \input{libcgi} \input{liburllib} From python-dev@python.org Fri Jul 7 04:36:14 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 6 Jul 2000 20:36:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile.deps,1.36,1.37 Message-ID: <200007070336.UAA30959@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv30950/Doc Modified Files: Makefile.deps Log Message: New module webbrowser. Easy-to-use controller objects to make using a Web browser as a help/information browser easy across platforms. Index: Makefile.deps =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile.deps,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** Makefile.deps 2000/07/06 04:47:25 1.36 --- Makefile.deps 2000/07/07 03:36:11 1.37 *************** *** 187,190 **** --- 187,191 ---- ../lib/libmultifile.tex \ ../lib/libthreading.tex \ + ../lib/libwebbrowser.tex \ ../lib/internet.tex \ ../lib/netdata.tex \ From python-dev@python.org Fri Jul 7 10:01:44 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 02:01:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include unicodeobject.h,2.12,2.13 Message-ID: <200007070901.CAA16518@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv16506/Include Modified Files: unicodeobject.h Log Message: Bill Tutt: Added Py_UCS4 typedef to hold UCS4 values (these need at least 32 bits as opposed to Py_UNICODE which rely on having 16 bits). Index: unicodeobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/unicodeobject.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** unicodeobject.h 2000/07/05 09:45:59 2.12 --- unicodeobject.h 2000/07/07 09:01:41 2.13 *************** *** 108,111 **** --- 108,122 ---- #endif + /* + * Use this typedef when you need to represent a UTF-16 surrogate pair + * as single unsigned integer. + */ + #if SIZEOF_INT >= 4 + typedef unsigned int Py_UCS4; + #elif SIZEOF_LONG >= 4 + typedef unsigned long Py_UCS4; + #endif + + /* --- Internal Unicode Operations ---------------------------------------- */ From python-dev@python.org Fri Jul 7 10:47:27 2000 From: python-dev@python.org (Sjoerd Mullender) Date: Fri, 7 Jul 2000 02:47:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.37,2.38 Message-ID: <200007070947.CAA27026@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv26903 Modified Files: unicodeobject.c Log Message: Two more places where long should be used instead of int. Especially true after revision 2.36 was checked in... Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.37 retrieving revision 2.38 diff -C2 -r2.37 -r2.38 *** unicodeobject.c 2000/07/06 20:13:23 2.37 --- unicodeobject.c 2000/07/07 09:47:24 2.38 *************** *** 995,999 **** static int unicodeescape_decoding_error(const char **source, ! unsigned int *x, const char *errors, const char *details) --- 995,999 ---- static int unicodeescape_decoding_error(const char **source, ! unsigned long *x, const char *errors, const char *details) *************** *** 1010,1014 **** } else if (strcmp(errors,"replace") == 0) { ! *x = (unsigned int)Py_UNICODE_REPLACEMENT_CHARACTER; return 0; } --- 1010,1014 ---- } else if (strcmp(errors,"replace") == 0) { ! *x = (unsigned long)Py_UNICODE_REPLACEMENT_CHARACTER; return 0; } From python-dev@python.org Fri Jul 7 12:24:51 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 04:24:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include Python.h,2.20,2.21 Message-ID: <200007071124.EAA22832@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv22812/Include Modified Files: Python.h Log Message: Defunct the _XOPEN_SOURCE define for now. Suggested by Fredrik Lundh as response to bug reports on True64 and IRIX. Index: Python.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** Python.h 2000/07/05 08:53:18 2.20 --- Python.h 2000/07/07 11:24:49 2.21 *************** *** 13,24 **** ******************************************************************/ ! /* Enable compiler features including SUSv2 compatibility; switching ! on C lib defines doesn't work here, because the symbols haven't ! necessarily been defined yet. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifndef _XOPEN_SOURCE # define _XOPEN_SOURCE 500 #endif --- 13,29 ---- ******************************************************************/ ! /* Enable compiler features; switching on C lib defines doesn't work ! here, because the symbols haven't necessarily been defined yet. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif + + /* Forcing SUSv2 compatibility still produces problems on some + platforms, True64 and SGI IRIX begin two of them, so for now the + define is switched off. */ + #if 0 #ifndef _XOPEN_SOURCE # define _XOPEN_SOURCE 500 + #endif #endif From python-dev@python.org Fri Jul 7 12:27:48 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 04:27:48 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.38,2.39 Message-ID: <200007071127.EAA23332@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv23307/Objects Modified Files: unicodeobject.c Log Message: Fix to bug #393 (UTF16 codec didn't like empty strings) and corrected some usage of 'unsigned long' where Py_UNICODE should have been used. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.38 retrieving revision 2.39 diff -C2 -r2.38 -r2.39 *** unicodeobject.c 2000/07/07 09:47:24 2.38 --- unicodeobject.c 2000/07/07 11:27:45 2.39 *************** *** 954,965 **** if (v == NULL) return NULL; - if (size == 0) - goto done; q = PyString_AS_STRING(v); p = (Py_UNICODE *)q; - if (byteorder == 0) *p++ = 0xFEFF; if (byteorder == 0 || #ifdef BYTEORDER_IS_LITTLE_ENDIAN --- 954,964 ---- if (v == NULL) return NULL; q = PyString_AS_STRING(v); p = (Py_UNICODE *)q; if (byteorder == 0) *p++ = 0xFEFF; + if (size == 0) + goto done; if (byteorder == 0 || #ifdef BYTEORDER_IS_LITTLE_ENDIAN *************** *** 995,999 **** static int unicodeescape_decoding_error(const char **source, ! unsigned long *x, const char *errors, const char *details) --- 994,998 ---- static int unicodeescape_decoding_error(const char **source, ! Py_UNICODE *x, const char *errors, const char *details) *************** *** 1010,1014 **** } else if (strcmp(errors,"replace") == 0) { ! *x = (unsigned long)Py_UNICODE_REPLACEMENT_CHARACTER; return 0; } --- 1009,1013 ---- } else if (strcmp(errors,"replace") == 0) { ! *x = Py_UNICODE_REPLACEMENT_CHARACTER; return 0; } *************** *** 1064,1068 **** while (s < end) { unsigned char c; ! unsigned long x; int i; --- 1063,1067 ---- while (s < end) { unsigned char c; ! Py_UNICODE x; int i; *************** *** 1373,1377 **** while (s < end) { unsigned char c; ! unsigned long x; int i; --- 1372,1376 ---- while (s < end) { unsigned char c; ! Py_UNICODE x; int i; From python-dev@python.org Fri Jul 7 14:45:47 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 06:45:47 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include unicodeobject.h,2.13,2.14 Message-ID: <200007071345.GAA16822@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv16811/Include Modified Files: unicodeobject.h Log Message: Added new API PyUnicode_FromEncodedObject() which supports decoding objects including instance objects. The old API PyUnicode_FromObject() is still available as shortcut. Index: unicodeobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/unicodeobject.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** unicodeobject.h 2000/07/07 09:01:41 2.13 --- unicodeobject.h 2000/07/07 13:45:44 2.14 *************** *** 298,301 **** --- 298,319 ---- */ + extern DL_IMPORT(PyObject*) PyUnicode_FromEncodedObject( + register PyObject *obj, /* Object */ + const char *encoding, /* encoding */ + const char *errors /* error handling */ + ); + + /* Shortcut for PyUnicode_FromEncodedObject(obj, NULL, "strict"); + which results in using the default encoding as basis for + decoding the object. + + Coerces obj to an Unicode object and return a reference with + *incremented* refcount. + + The API returns NULL in case of an error. The caller is responsible + for decref'ing the returned objects. + + */ + extern DL_IMPORT(PyObject*) PyUnicode_FromObject( register PyObject *obj /* Object */ From python-dev@python.org Fri Jul 7 14:46:22 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 06:46:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_unicode.py,1.17,1.18 Message-ID: <200007071346.GAA16854@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv16847/Lib/test Modified Files: test_unicode.py Log Message: Tests for new instance support in unicode(). Index: test_unicode.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** test_unicode.py 2000/07/05 09:46:40 1.17 --- test_unicode.py 2000/07/07 13:46:19 1.18 *************** *** 299,302 **** --- 299,317 ---- assert unicode('hello','latin-1') == u'hello' + class String: + x = '' + def __str__(self): + return self.x + + o = String() + + o.x = 'abc' + assert unicode(o) == u'abc' + assert str(o) == 'abc' + + o.x = u'abc' + assert unicode(o) == u'abc' + assert str(o) == 'abc' + try: u'Andr\202 x'.encode('ascii') From python-dev@python.org Fri Jul 7 14:46:44 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 06:46:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.39,2.40 Message-ID: <200007071346.GAA16879@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv16868/Objects Modified Files: unicodeobject.c Log Message: Added new API PyUnicode_FromEncodedObject() which supports decoding objects including instance objects. The old API PyUnicode_FromObject() is still available as shortcut. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.39 retrieving revision 2.40 diff -C2 -r2.39 -r2.40 *** unicodeobject.c 2000/07/07 11:27:45 2.39 --- unicodeobject.c 2000/07/07 13:46:42 2.40 *************** *** 357,362 **** --- 357,371 ---- PyObject *PyUnicode_FromObject(register PyObject *obj) { + return PyUnicode_FromEncodedObject(obj, NULL, "strict"); + } + + PyObject *PyUnicode_FromEncodedObject(register PyObject *obj, + const char *encoding, + const char *errors) + { const char *s; int len; + int owned = 0; + PyObject *v; if (obj == NULL) { *************** *** 364,370 **** return NULL; } ! else if (PyUnicode_Check(obj)) { Py_INCREF(obj); ! return obj; } else if (PyString_Check(obj)) { --- 373,401 ---- return NULL; } ! ! /* Coerce object */ ! if (PyInstance_Check(obj)) { ! PyObject *func; ! func = PyObject_GetAttrString(obj, "__str__"); ! if (func == NULL) { ! PyErr_SetString(PyExc_TypeError, ! "coercing to Unicode: instance doesn't define __str__"); ! return NULL; ! } ! obj = PyEval_CallObject(func, NULL); ! Py_DECREF(func); ! if (obj == NULL) ! return NULL; ! owned = 1; ! } ! if (PyUnicode_Check(obj)) { Py_INCREF(obj); ! v = obj; ! if (encoding) { ! PyErr_SetString(PyExc_TypeError, ! "decoding Unicode is not supported"); ! return NULL; ! } ! goto done; } else if (PyString_Check(obj)) { *************** *** 377,388 **** if (PyErr_ExceptionMatches(PyExc_TypeError)) PyErr_SetString(PyExc_TypeError, ! "coercing to Unicode: need string or charbuffer"); ! return NULL; } if (len == 0) { Py_INCREF(unicode_empty); ! return (PyObject *)unicode_empty; } ! return PyUnicode_Decode(s, len, NULL, "strict"); } --- 408,431 ---- if (PyErr_ExceptionMatches(PyExc_TypeError)) PyErr_SetString(PyExc_TypeError, ! "coercing to Unicode: need string or buffer"); ! goto onError; } + + /* Convert to Unicode */ if (len == 0) { Py_INCREF(unicode_empty); ! v = (PyObject *)unicode_empty; } ! else ! v = PyUnicode_Decode(s, len, encoding, errors); ! done: ! if (owned) ! Py_DECREF(obj); ! return v; ! ! onError: ! if (owned) ! Py_DECREF(obj); ! return NULL; } From python-dev@python.org Fri Jul 7 14:48:27 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 06:48:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.166,2.167 Message-ID: <200007071348.GAA17060@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv17051/Python Modified Files: bltinmodule.c Log Message: Fixed unicode() to use the new API PyUnicode_FromEncodedObject(). This adds support for instance to the constructor (instances have to define __str__ and can return Unicode objects via that hook; string return values are decoded into Unicode using the current default encoding). Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.166 retrieving revision 2.167 diff -C2 -r2.166 -r2.167 *** bltinmodule.c 2000/07/03 21:39:47 2.166 --- bltinmodule.c 2000/07/07 13:48:25 2.167 *************** *** 156,173 **** if ( !PyArg_ParseTuple(args, "O|ss:unicode", &v, &encoding, &errors) ) return NULL; ! /* Special case: Unicode will stay Unicode */ ! if (PyUnicode_Check(v)) { ! if (encoding) { ! PyErr_SetString(PyExc_TypeError, ! "unicode() does not support decoding of Unicode objects"); ! return NULL; ! } ! Py_INCREF(v); ! return v; ! } ! /* Read raw data and decode it */ ! if (PyObject_AsReadBuffer(v, &buffer, &len)) ! return NULL; ! return PyUnicode_Decode((const char *)buffer, len, encoding, errors); } --- 156,160 ---- if ( !PyArg_ParseTuple(args, "O|ss:unicode", &v, &encoding, &errors) ) return NULL; ! return PyUnicode_FromEncodedObject(v, encoding, errors); } From python-dev@python.org Fri Jul 7 15:13:32 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 07:13:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.112,1.113 Message-ID: <200007071413.HAA25429@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv25420 Modified Files: socketmodule.c Log Message: Removed a prototype which is not used in socketmodule.c Patch by T. Wouters. Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -r1.112 -r1.113 *** socketmodule.c 2000/07/01 03:40:12 1.112 --- socketmodule.c 2000/07/07 14:13:29 1.113 *************** *** 356,360 **** staticforward PyTypeObject SSL_Type; - staticforward int SSL_setattr(SSLObject *self, char *name, PyObject *v); staticforward PyObject *SSL_SSLwrite(SSLObject *self, PyObject *args); staticforward PyObject *SSL_SSLread(SSLObject *self, PyObject *args); --- 356,359 ---- From python-dev@python.org Fri Jul 7 16:47:09 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 08:47:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/api api.tex,1.72,1.73 Message-ID: <200007071547.IAA06081@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/api In directory slayer.i.sourceforge.net:/tmp/cvs-serv5372/Doc/api Modified Files: api.tex Log Message: Added docs for the new Unicode and string APIs. Index: api.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/api.tex,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -r1.72 -r1.73 *** api.tex 2000/07/03 13:38:10 1.72 --- api.tex 2000/07/07 15:47:06 1.73 *************** *** 1924,1927 **** --- 1924,1961 ---- \end{cfuncdesc} + \begin{cfuncdesc}{PyObject*}{PyString_Decode}{const char *s, + int size, + const char *encoding, + const char *errors} + Create a string object by decoding \var{size} bytes of the encoded + buffer \var{s}. \var{encoding} and \var{errors} have the same meaning + as the parameters of the same name in the unicode() builtin + function. The codec to be used is looked up using the Python codec + registry. Returns \NULL{} in case an exception was raised by the + codec. + \end{cfuncdesc} + + \begin{cfuncdesc}{PyObject*}{PyString_Encode}{const Py_UNICODE *s, + int size, + const char *encoding, + const char *errors} + Encodes the \ctype{Py_UNICODE} buffer of the given size and returns a + Python string object. \var{encoding} and \var{errors} have the same + meaning as the parameters of the same name in the string .encode() + method. The codec to be used is looked up using the Python codec + registry. Returns \NULL{} in case an exception was raised by the + codec. + \end{cfuncdesc} + + \begin{cfuncdesc}{PyObject*}{PyString_AsEncodedString}{PyObject *unicode, + const char *encoding, + const char *errors} + Encodes a string object and returns the result as Python string + object. \var{encoding} and \var{errors} have the same meaning as the + parameters of the same name in the string .encode() method. The codec + to be used is looked up using the Python codec registry. Returns + \NULL{} in case an exception was raised by the codec. + \end{cfuncdesc} + \subsection{Unicode Objects \label{unicodeObjects}} *************** *** 2077,2098 **** \end{cfuncdesc} ! \begin{cfuncdesc}{PyObject*}{PyUnicode_FromObject}{PyObject *obj} ! Coerce obj to an Unicode object and return a reference with ! incremented refcount. Coercion is done in the following way: \begin{enumerate} \item Unicode objects are passed back as-is with incremented ! refcount. \item String and other char buffer compatible objects are decoded ! under the assumptions that they contain UTF-8 data. Decoding ! is done in "strict" mode. ! \item All other objects raise an exception. \end{enumerate} The API returns NULL in case of an error. The caller is responsible for decref'ing the returned objects. \end{cfuncdesc} --- 2111,2143 ---- \end{cfuncdesc} ! \begin{cfuncdesc}{PyObject*}{PyUnicode_FromEncodedObject}{PyObject *obj, ! const char *encoding, ! const char *errors} ! Coerce an encoded object obj to an Unicode object and return a ! reference with incremented refcount. Coercion is done in the following way: \begin{enumerate} \item Unicode objects are passed back as-is with incremented ! refcount. Note: these cannot be decoded; passing a non-NULL ! value for encoding will result in a TypeError. \item String and other char buffer compatible objects are decoded ! according to the given encoding and using the error handling ! defined by errors. Both can be NULL to have the interface use ! the default values (see the next section for details). ! \item All other objects cause an exception. \end{enumerate} The API returns NULL in case of an error. The caller is responsible for decref'ing the returned objects. + \end{cfuncdesc} + + \begin{cfuncdesc}{PyObject*}{PyUnicode_FromObject}{PyObject *obj} + + Shortcut for PyUnicode_FromEncodedObject(obj, NULL, ``strict'') + which is used throughout the interpreter whenever coercion to + Unicode is needed. \end{cfuncdesc} From python-dev@python.org Fri Jul 7 16:48:56 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 08:48:56 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/api refcounts.dat,1.10,1.11 Message-ID: <200007071548.IAA06236@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/api In directory slayer.i.sourceforge.net:/tmp/cvs-serv6228/Doc/api Modified Files: refcounts.dat Log Message: Added new APIs and fixed some other Unicode ones (missing * or extra ' '). Index: refcounts.dat =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/refcounts.dat,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** refcounts.dat 2000/06/16 21:04:15 1.10 --- refcounts.dat 2000/07/07 15:48:54 1.11 *************** *** 773,776 **** --- 773,793 ---- PyString_Size:PyObject*:string:0: + PyString_Decode:PyObject*::+1: + PyString_Decode:const char*:s:: + PyString_Decode:int:size:: + PyString_Decode:const char*:encoding:: + PyString_Decode:const char*:errors:: + + PyString_Encode:PyObject*::+1: + PyString_Encode:const char*:s:: + PyString_Encode:int:size:: + PyString_Encode:const char*:encoding:: + PyString_Encode:const char*:errors:: + + PyString_AsEncodedString:PyObject*::+1: + PyString_AsEncodedString:PyObject*:str:: + PyString_AsEncodedString:const char*:encoding:: + PyString_AsEncodedString:const char*:errors:: + PySys_SetArgv:int::: PySys_SetArgv:int:argc:: *************** *** 881,885 **** PyUnicode_FromUnicode:PyObject*::+1: ! PyUnicode_FromUnicode:const Py_UNICODE *:u:: PyUnicode_FromUnicode:int:size:: --- 898,902 ---- PyUnicode_FromUnicode:PyObject*::+1: ! PyUnicode_FromUnicode:const Py_UNICODE*:u:: PyUnicode_FromUnicode:int:size:: *************** *** 891,1013 **** PyUnicode_FromObject:PyObject*::+1: ! PyUnicode_FromObject:PyObject :*obj:0: PyUnicode_FromWideChar:PyObject*::+1: ! PyUnicode_FromWideChar:const wchar_t *:w:: PyUnicode_FromWideChar:int:size:: PyUnicode_AsWideChar:int::: ! PyUnicode_AsWideChar:PyObject :*unicode:0: ! PyUnicode_AsWideChar:wchar_t *:w:: PyUnicode_AsWideChar:int:size:: PyUnicode_Decode:PyObject*::+1: ! PyUnicode_Decode:const char *:s:: PyUnicode_Decode:int:size:: ! PyUnicode_Decode:const char *:encoding:: ! PyUnicode_Decode:const char *:errors:: PyUnicode_Encode:PyObject*::+1: ! PyUnicode_Encode:const Py_UNICODE *:s:: PyUnicode_Encode:int:size:: ! PyUnicode_Encode:const char *:encoding:: ! PyUnicode_Encode:const char *:errors:: PyUnicode_AsEncodedString:PyObject*::+1: ! PyUnicode_AsEncodedString:PyObject *:unicode:: ! PyUnicode_AsEncodedString:const char *:encoding:: ! PyUnicode_AsEncodedString:const char *:errors:: PyUnicode_DecodeUTF8:PyObject*::+1: ! PyUnicode_DecodeUTF8:const char *:s:: PyUnicode_DecodeUTF8:int:size:: ! PyUnicode_DecodeUTF8:const char *:errors:: PyUnicode_EncodeUTF8:PyObject*::+1: ! PyUnicode_EncodeUTF8:const Py_UNICODE *:s:: PyUnicode_EncodeUTF8:int:size:: ! PyUnicode_EncodeUTF8:const char *:errors:: PyUnicode_AsUTF8String:PyObject*::+1: ! PyUnicode_AsUTF8String:PyObject *:unicode:: PyUnicode_DecodeUTF16:PyObject*::+1: ! PyUnicode_DecodeUTF16:const char *:s:: PyUnicode_DecodeUTF16:int:size:: ! PyUnicode_DecodeUTF16:const char *:errors:: PyUnicode_DecodeUTF16:int*:byteorder:: PyUnicode_EncodeUTF16:PyObject*::+1: ! PyUnicode_EncodeUTF16:const Py_UNICODE *:s:: PyUnicode_EncodeUTF16:int:size:: ! PyUnicode_EncodeUTF16:const char *:errors:: PyUnicode_EncodeUTF16:int:byteorder:: PyUnicode_AsUTF16String:PyObject*::+1: ! PyUnicode_AsUTF16String:PyObject *:unicode:: PyUnicode_DecodeUnicodeEscape:PyObject*::+1: ! PyUnicode_DecodeUnicodeEscape:const char *:s:: PyUnicode_DecodeUnicodeEscape:int:size:: ! PyUnicode_DecodeUnicodeEscape:const char *:errors:: PyUnicode_EncodeUnicodeEscape:PyObject*::+1: ! PyUnicode_EncodeUnicodeEscape:const Py_UNICODE *:s:: PyUnicode_EncodeUnicodeEscape:int:size:: ! PyUnicode_EncodeUnicodeEscape:const char *:errors:: PyUnicode_AsUnicodeEscapeString:PyObject*::+1: ! PyUnicode_AsUnicodeEscapeString:PyObject *:unicode:: PyUnicode_DecodeRawUnicodeEscape:PyObject*::+1: ! PyUnicode_DecodeRawUnicodeEscape:const char *:s:: PyUnicode_DecodeRawUnicodeEscape:int:size:: ! PyUnicode_DecodeRawUnicodeEscape:const char *:errors:: PyUnicode_EncodeRawUnicodeEscape:PyObject*::+1: ! PyUnicode_EncodeRawUnicodeEscape:const Py_UNICODE *:s:: PyUnicode_EncodeRawUnicodeEscape:int:size:: ! PyUnicode_EncodeRawUnicodeEscape:const char *:errors:: PyUnicode_AsRawUnicodeEscapeString:PyObject*::+1: ! PyUnicode_AsRawUnicodeEscapeString:PyObject *:unicode:: PyUnicode_DecodeLatin1:PyObject*::+1: ! PyUnicode_DecodeLatin1:const char *:s:: PyUnicode_DecodeLatin1:int:size:: ! PyUnicode_DecodeLatin1:const char *:errors:: PyUnicode_EncodeLatin1:PyObject*::+1: ! PyUnicode_EncodeLatin1:const Py_UNICODE *:s:: PyUnicode_EncodeLatin1:int:size:: ! PyUnicode_EncodeLatin1:const char *:errors:: PyUnicode_AsLatin1String:PyObject*::+1: ! PyUnicode_AsLatin1String:PyObject *:unicode:: PyUnicode_DecodeASCII:PyObject*::+1: ! PyUnicode_DecodeASCII:const char *:s:: PyUnicode_DecodeASCII:int:size:: ! PyUnicode_DecodeASCII:const char *:errors:: PyUnicode_EncodeASCII:PyObject*::+1: ! PyUnicode_EncodeASCII:const Py_UNICODE *:s:: PyUnicode_EncodeASCII:int:size:: ! PyUnicode_EncodeASCII:const char *:errors:: PyUnicode_AsASCIIString:PyObject*::+1: ! PyUnicode_AsASCIIString:PyObject *:unicode:: PyUnicode_DecodeCharmap:PyObject*::+1: ! PyUnicode_DecodeCharmap:const char *:s:: PyUnicode_DecodeCharmap:int:size:: PyUnicode_DecodeCharmap:PyObject*:mapping:0: ! PyUnicode_DecodeCharmap:const char *:errors:: PyUnicode_EncodeCharmap:PyObject*::+1: ! PyUnicode_EncodeCharmap:const Py_UNICODE *:s:: PyUnicode_EncodeCharmap:int:size:: PyUnicode_EncodeCharmap:PyObject*:mapping:0: ! PyUnicode_EncodeCharmap:const char *:errors:: PyUnicode_AsCharmapString:PyObject*::+1: --- 908,1035 ---- PyUnicode_FromObject:PyObject*::+1: ! PyUnicode_FromObject:PyObject*:*obj:0: ! ! PyUnicode_FromEncodedObject:PyObject*::+1: ! PyUnicode_FromEncodedObject:PyObject*:*obj:0: ! PyUnicode_FromEncodedObject:const char*:encoding:: ! PyUnicode_FromEncodedObject:const char*:errors:: PyUnicode_FromWideChar:PyObject*::+1: ! PyUnicode_FromWideChar:const wchar_t*:w:: PyUnicode_FromWideChar:int:size:: PyUnicode_AsWideChar:int::: ! PyUnicode_AsWideChar:PyObject*:*unicode:0: ! PyUnicode_AsWideChar:wchar_t*:w:: PyUnicode_AsWideChar:int:size:: PyUnicode_Decode:PyObject*::+1: ! PyUnicode_Decode:const char*:s:: PyUnicode_Decode:int:size:: ! PyUnicode_Decode:const char*:encoding:: ! PyUnicode_Decode:const char*:errors:: PyUnicode_Encode:PyObject*::+1: ! PyUnicode_Encode:const Py_UNICODE*:s:: PyUnicode_Encode:int:size:: ! PyUnicode_Encode:const char*:encoding:: ! PyUnicode_Encode:const char*:errors:: PyUnicode_AsEncodedString:PyObject*::+1: ! PyUnicode_AsEncodedString:PyObject*:unicode:: ! PyUnicode_AsEncodedString:const char*:encoding:: ! PyUnicode_AsEncodedString:const char*:errors:: PyUnicode_DecodeUTF8:PyObject*::+1: ! PyUnicode_DecodeUTF8:const char*:s:: PyUnicode_DecodeUTF8:int:size:: ! PyUnicode_DecodeUTF8:const char*:errors:: PyUnicode_EncodeUTF8:PyObject*::+1: ! PyUnicode_EncodeUTF8:const Py_UNICODE*:s:: PyUnicode_EncodeUTF8:int:size:: ! PyUnicode_EncodeUTF8:const char*:errors:: PyUnicode_AsUTF8String:PyObject*::+1: ! PyUnicode_AsUTF8String:PyObject*:unicode:: PyUnicode_DecodeUTF16:PyObject*::+1: ! PyUnicode_DecodeUTF16:const char*:s:: PyUnicode_DecodeUTF16:int:size:: ! PyUnicode_DecodeUTF16:const char*:errors:: PyUnicode_DecodeUTF16:int*:byteorder:: PyUnicode_EncodeUTF16:PyObject*::+1: ! PyUnicode_EncodeUTF16:const Py_UNICODE*:s:: PyUnicode_EncodeUTF16:int:size:: ! PyUnicode_EncodeUTF16:const char*:errors:: PyUnicode_EncodeUTF16:int:byteorder:: PyUnicode_AsUTF16String:PyObject*::+1: ! PyUnicode_AsUTF16String:PyObject*:unicode:: PyUnicode_DecodeUnicodeEscape:PyObject*::+1: ! PyUnicode_DecodeUnicodeEscape:const char*:s:: PyUnicode_DecodeUnicodeEscape:int:size:: ! PyUnicode_DecodeUnicodeEscape:const char*:errors:: PyUnicode_EncodeUnicodeEscape:PyObject*::+1: ! PyUnicode_EncodeUnicodeEscape:const Py_UNICODE*:s:: PyUnicode_EncodeUnicodeEscape:int:size:: ! PyUnicode_EncodeUnicodeEscape:const char*:errors:: PyUnicode_AsUnicodeEscapeString:PyObject*::+1: ! PyUnicode_AsUnicodeEscapeString:PyObject*:unicode:: PyUnicode_DecodeRawUnicodeEscape:PyObject*::+1: ! PyUnicode_DecodeRawUnicodeEscape:const char*:s:: PyUnicode_DecodeRawUnicodeEscape:int:size:: ! PyUnicode_DecodeRawUnicodeEscape:const char*:errors:: PyUnicode_EncodeRawUnicodeEscape:PyObject*::+1: ! PyUnicode_EncodeRawUnicodeEscape:const Py_UNICODE*:s:: PyUnicode_EncodeRawUnicodeEscape:int:size:: ! PyUnicode_EncodeRawUnicodeEscape:const char*:errors:: PyUnicode_AsRawUnicodeEscapeString:PyObject*::+1: ! PyUnicode_AsRawUnicodeEscapeString:PyObject*:unicode:: PyUnicode_DecodeLatin1:PyObject*::+1: ! PyUnicode_DecodeLatin1:const char*:s:: PyUnicode_DecodeLatin1:int:size:: ! PyUnicode_DecodeLatin1:const char*:errors:: PyUnicode_EncodeLatin1:PyObject*::+1: ! PyUnicode_EncodeLatin1:const Py_UNICODE*:s:: PyUnicode_EncodeLatin1:int:size:: ! PyUnicode_EncodeLatin1:const char*:errors:: PyUnicode_AsLatin1String:PyObject*::+1: ! PyUnicode_AsLatin1String:PyObject*:unicode:: PyUnicode_DecodeASCII:PyObject*::+1: ! PyUnicode_DecodeASCII:const char*:s:: PyUnicode_DecodeASCII:int:size:: ! PyUnicode_DecodeASCII:const char*:errors:: PyUnicode_EncodeASCII:PyObject*::+1: ! PyUnicode_EncodeASCII:const Py_UNICODE*:s:: PyUnicode_EncodeASCII:int:size:: ! PyUnicode_EncodeASCII:const char*:errors:: PyUnicode_AsASCIIString:PyObject*::+1: ! PyUnicode_AsASCIIString:PyObject*:unicode:: PyUnicode_DecodeCharmap:PyObject*::+1: ! PyUnicode_DecodeCharmap:const char*:s:: PyUnicode_DecodeCharmap:int:size:: PyUnicode_DecodeCharmap:PyObject*:mapping:0: ! PyUnicode_DecodeCharmap:const char*:errors:: PyUnicode_EncodeCharmap:PyObject*::+1: ! PyUnicode_EncodeCharmap:const Py_UNICODE*:s:: PyUnicode_EncodeCharmap:int:size:: PyUnicode_EncodeCharmap:PyObject*:mapping:0: ! PyUnicode_EncodeCharmap:const char*:errors:: PyUnicode_AsCharmapString:PyObject*::+1: *************** *** 1016,1036 **** PyUnicode_TranslateCharmap:PyObject*::+1: ! PyUnicode_TranslateCharmap:const Py_UNICODE *:s:: PyUnicode_TranslateCharmap:int:size:: PyUnicode_TranslateCharmap:PyObject*:table:0: ! PyUnicode_TranslateCharmap:const char *:errors:: PyUnicode_DecodeMBCS:PyObject*::+1: ! PyUnicode_DecodeMBCS:const char *:s:: PyUnicode_DecodeMBCS:int:size:: ! PyUnicode_DecodeMBCS:const char *:errors:: PyUnicode_EncodeMBCS:PyObject*::+1: ! PyUnicode_EncodeMBCS:const Py_UNICODE *:s:: PyUnicode_EncodeMBCS:int:size:: ! PyUnicode_EncodeMBCS:const char *:errors:: PyUnicode_AsMBCSString:PyObject*::+1: ! PyUnicode_AsMBCSString:PyObject *:unicode:: PyUnicode_Concat:PyObject*::+1: --- 1038,1058 ---- PyUnicode_TranslateCharmap:PyObject*::+1: ! PyUnicode_TranslateCharmap:const Py_UNICODE*:s:: PyUnicode_TranslateCharmap:int:size:: PyUnicode_TranslateCharmap:PyObject*:table:0: ! PyUnicode_TranslateCharmap:const char*:errors:: PyUnicode_DecodeMBCS:PyObject*::+1: ! PyUnicode_DecodeMBCS:const char*:s:: PyUnicode_DecodeMBCS:int:size:: ! PyUnicode_DecodeMBCS:const char*:errors:: PyUnicode_EncodeMBCS:PyObject*::+1: ! PyUnicode_EncodeMBCS:const Py_UNICODE*:s:: PyUnicode_EncodeMBCS:int:size:: ! PyUnicode_EncodeMBCS:const char*:errors:: PyUnicode_AsMBCSString:PyObject*::+1: ! PyUnicode_AsMBCSString:PyObject*:unicode:: PyUnicode_Concat:PyObject*::+1: *************** *** 1050,1054 **** PyUnicode_Translate:PyObject*:str:0: PyUnicode_Translate:PyObject*:table:0: ! PyUnicode_Translate:const char *:errors:: PyUnicode_Join:PyObject*::+1: --- 1072,1076 ---- PyUnicode_Translate:PyObject*:str:0: PyUnicode_Translate:PyObject*:table:0: ! PyUnicode_Translate:const char*:errors:: PyUnicode_Join:PyObject*::+1: From python-dev@python.org Fri Jul 7 16:53:31 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 7 Jul 2000 08:53:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include longintrepr.h,2.7,2.8 longobject.h,2.15,2.16 Message-ID: <200007071553.IAA06681@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv6414/src/Include Modified Files: longintrepr.h longobject.h Log Message: Some cleanup of longs in prepartion for Cray J90 fixes: got rid of Py_PROTO, switched to ANSI function decls, and did some minor fiddling. Index: longintrepr.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/longintrepr.h,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** longintrepr.h 2000/06/30 23:58:04 2.7 --- longintrepr.h 2000/07/07 15:53:28 2.8 *************** *** 53,57 **** }; ! DL_IMPORT(PyLongObject *) _PyLong_New Py_PROTO((int)); #ifdef __cplusplus --- 53,57 ---- }; ! DL_IMPORT(PyLongObject *) _PyLong_New(int); #ifdef __cplusplus Index: longobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/longobject.h,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** longobject.h 2000/06/30 23:58:04 2.15 --- longobject.h 2000/07/07 15:53:28 2.16 *************** *** 23,34 **** #define PyLong_Check(op) ((op)->ob_type == &PyLong_Type) ! extern DL_IMPORT(PyObject *) PyLong_FromLong Py_PROTO((long)); ! extern DL_IMPORT(PyObject *) PyLong_FromUnsignedLong Py_PROTO((unsigned long)); ! extern DL_IMPORT(PyObject *) PyLong_FromDouble Py_PROTO((double)); ! extern DL_IMPORT(long) PyLong_AsLong Py_PROTO((PyObject *)); ! extern DL_IMPORT(unsigned long) PyLong_AsUnsignedLong Py_PROTO((PyObject *)); ! extern DL_IMPORT(double) PyLong_AsDouble Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyLong_FromVoidPtr Py_PROTO((void *)); ! extern DL_IMPORT(void *) PyLong_AsVoidPtr Py_PROTO((PyObject *)); #ifdef HAVE_LONG_LONG --- 23,34 ---- #define PyLong_Check(op) ((op)->ob_type == &PyLong_Type) ! extern DL_IMPORT(PyObject *) PyLong_FromLong(long); ! extern DL_IMPORT(PyObject *) PyLong_FromUnsignedLong(unsigned long); ! extern DL_IMPORT(PyObject *) PyLong_FromDouble(double); ! extern DL_IMPORT(long) PyLong_AsLong(PyObject *); ! extern DL_IMPORT(unsigned long) PyLong_AsUnsignedLong(PyObject *); ! extern DL_IMPORT(double) PyLong_AsDouble(PyObject *); ! extern DL_IMPORT(PyObject *) PyLong_FromVoidPtr(void *); ! extern DL_IMPORT(void *) PyLong_AsVoidPtr(PyObject *); #ifdef HAVE_LONG_LONG *************** *** 55,66 **** #endif ! extern DL_IMPORT(PyObject *) PyLong_FromLongLong Py_PROTO((LONG_LONG)); ! extern DL_IMPORT(PyObject *) PyLong_FromUnsignedLongLong Py_PROTO((unsigned LONG_LONG)); ! extern DL_IMPORT(LONG_LONG) PyLong_AsLongLong Py_PROTO((PyObject *)); ! extern DL_IMPORT(unsigned LONG_LONG) PyLong_AsUnsignedLongLong Py_PROTO((PyObject *)); #endif /* HAVE_LONG_LONG */ ! DL_IMPORT(PyObject *) PyLong_FromString Py_PROTO((char *, char **, int)); ! DL_IMPORT(PyObject *) PyLong_FromUnicode Py_PROTO((Py_UNICODE*, int, int)); #ifdef __cplusplus --- 55,66 ---- #endif ! extern DL_IMPORT(PyObject *) PyLong_FromLongLong(LONG_LONG); ! extern DL_IMPORT(PyObject *) PyLong_FromUnsignedLongLong(unsigned LONG_LONG); ! extern DL_IMPORT(LONG_LONG) PyLong_AsLongLong(PyObject *); ! extern DL_IMPORT(unsigned LONG_LONG) PyLong_AsUnsignedLongLong(PyObject *); #endif /* HAVE_LONG_LONG */ ! DL_IMPORT(PyObject *) PyLong_FromString(char *, char **, int); ! DL_IMPORT(PyObject *) PyLong_FromUnicode(Py_UNICODE*, int, int); #ifdef __cplusplus From python-dev@python.org Fri Jul 7 16:53:31 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 7 Jul 2000 08:53:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects longobject.c,1.60,1.61 Message-ID: <200007071553.IAA06685@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv6414/src/Objects Modified Files: longobject.c Log Message: Some cleanup of longs in prepartion for Cray J90 fixes: got rid of Py_PROTO, switched to ANSI function decls, and did some minor fiddling. Index: longobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -r1.60 -r1.61 *** longobject.c 2000/06/30 23:58:05 1.60 --- longobject.c 2000/07/07 15:53:28 1.61 *************** *** 23,31 **** /* Forward */ ! static PyLongObject *long_normalize Py_PROTO((PyLongObject *)); ! static PyLongObject *mul1 Py_PROTO((PyLongObject *, wdigit)); ! static PyLongObject *muladd1 Py_PROTO((PyLongObject *, wdigit, wdigit)); ! static PyLongObject *divrem1 Py_PROTO((PyLongObject *, wdigit, digit *)); ! static PyObject *long_format Py_PROTO((PyObject *aa, int base, int addL)); static int ticker; /* XXX Could be shared with ceval? */ --- 23,31 ---- /* Forward */ ! static PyLongObject *long_normalize(PyLongObject *); ! static PyLongObject *mul1(PyLongObject *, wdigit); ! static PyLongObject *muladd1(PyLongObject *, wdigit, wdigit); ! static PyLongObject *divrem1(PyLongObject *, wdigit, digit *); ! static PyObject *long_format(PyObject *aa, int base, int addL); static int ticker; /* XXX Could be shared with ceval? */ *************** *** 42,47 **** static PyLongObject * ! long_normalize(v) ! register PyLongObject *v; { int j = ABS(v->ob_size); --- 42,46 ---- static PyLongObject * ! long_normalize(register PyLongObject *v) { int j = ABS(v->ob_size); *************** *** 59,64 **** PyLongObject * ! _PyLong_New(size) ! int size; { return PyObject_NEW_VAR(PyLongObject, &PyLong_Type, size); --- 58,62 ---- PyLongObject * ! _PyLong_New(int size) { return PyObject_NEW_VAR(PyLongObject, &PyLong_Type, size); *************** *** 68,73 **** PyObject * ! PyLong_FromLong(ival) ! long ival; { /* Assume a C long fits in at most 5 'digits' */ --- 66,70 ---- PyObject * ! PyLong_FromLong(long ival) { /* Assume a C long fits in at most 5 'digits' */ *************** *** 93,98 **** PyObject * ! PyLong_FromUnsignedLong(ival) ! unsigned long ival; { /* Assume a C long fits in at most 5 'digits' */ --- 90,94 ---- PyObject * ! PyLong_FromUnsignedLong(unsigned long ival) { /* Assume a C long fits in at most 5 'digits' */ *************** *** 114,123 **** PyObject * - #ifdef MPW PyLong_FromDouble(double dval) - #else - PyLong_FromDouble(dval) - double dval; - #endif /* MPW */ { PyLongObject *v; --- 110,114 ---- *************** *** 157,162 **** long ! PyLong_AsLong(vv) ! PyObject *vv; { /* This version by Tim Peters */ --- 148,152 ---- long ! PyLong_AsLong(PyObject *vv) { /* This version by Tim Peters */ *************** *** 202,207 **** unsigned long ! PyLong_AsUnsignedLong(vv) ! PyObject *vv; { register PyLongObject *v; --- 192,196 ---- unsigned long ! PyLong_AsUnsignedLong(PyObject *vv) { register PyLongObject *v; *************** *** 236,241 **** double ! PyLong_AsDouble(vv) ! PyObject *vv; { register PyLongObject *v; --- 225,229 ---- double ! PyLong_AsDouble(PyObject *vv) { register PyLongObject *v; *************** *** 265,270 **** PyObject * ! PyLong_FromVoidPtr(p) ! void *p; { #if SIZEOF_VOID_P == SIZEOF_LONG --- 253,257 ---- PyObject * ! PyLong_FromVoidPtr(void *p) { #if SIZEOF_VOID_P == SIZEOF_LONG *************** *** 285,290 **** void * ! PyLong_AsVoidPtr(vv) ! PyObject *vv; { /* This function will allow int or long objects. If vv is neither, --- 272,276 ---- void * ! PyLong_AsVoidPtr(PyObject *vv) { /* This function will allow int or long objects. If vv is neither, *************** *** 328,333 **** PyObject * ! PyLong_FromLongLong(ival) ! LONG_LONG ival; { #if SIZEOF_LONG_LONG == SIZEOF_LONG --- 314,318 ---- PyObject * ! PyLong_FromLongLong(LONG_LONG ival) { #if SIZEOF_LONG_LONG == SIZEOF_LONG *************** *** 370,375 **** /* Create a new long int object from a C unsigned LONG_LONG int */ PyObject * ! PyLong_FromUnsignedLongLong(ival) ! unsigned LONG_LONG ival; { #if SIZEOF_LONG_LONG == SIZEOF_LONG --- 355,359 ---- /* Create a new long int object from a C unsigned LONG_LONG int */ PyObject * ! PyLong_FromUnsignedLongLong(unsigned LONG_LONG ival) { #if SIZEOF_LONG_LONG == SIZEOF_LONG *************** *** 404,409 **** LONG_LONG ! PyLong_AsLongLong(vv) ! PyObject *vv; { #if SIZEOF_LONG_LONG == SIZEOF_LONG --- 388,392 ---- LONG_LONG ! PyLong_AsLongLong(PyObject *vv) { #if SIZEOF_LONG_LONG == SIZEOF_LONG *************** *** 445,450 **** unsigned LONG_LONG ! PyLong_AsUnsignedLongLong(vv) ! PyObject *vv; { #if SIZEOF_LONG_LONG == 4 --- 428,432 ---- unsigned LONG_LONG ! PyLong_AsUnsignedLongLong(PyObject *vv) { #if SIZEOF_LONG_LONG == 4 *************** *** 489,495 **** static PyLongObject * ! mul1(a, n) ! PyLongObject *a; ! wdigit n; { return muladd1(a, n, (digit)0); --- 471,475 ---- static PyLongObject * ! mul1(PyLongObject *a, wdigit n) { return muladd1(a, n, (digit)0); *************** *** 499,506 **** static PyLongObject * ! muladd1(a, n, extra) ! PyLongObject *a; ! wdigit n; ! wdigit extra; { int size_a = ABS(a->ob_size); --- 479,483 ---- static PyLongObject * ! muladd1(PyLongObject *a, wdigit n, wdigit extra) { int size_a = ABS(a->ob_size); *************** *** 525,532 **** static PyLongObject * ! divrem1(a, n, prem) ! PyLongObject *a; ! wdigit n; ! digit *prem; { int size = ABS(a->ob_size); --- 502,506 ---- static PyLongObject * ! divrem1(PyLongObject *a, wdigit n, digit *prem) { int size = ABS(a->ob_size); *************** *** 553,560 **** static PyObject * ! long_format(aa, base, addL) ! PyObject *aa; ! int base; ! int addL; { register PyLongObject *a = (PyLongObject *)aa; --- 527,531 ---- static PyObject * ! long_format(PyObject *aa, int base, int addL) { register PyLongObject *a = (PyLongObject *)aa; *************** *** 683,705 **** } - #if 0 - /* Convert a string to a long int object, in a given base. - Base zero implies a default depending on the number. - External linkage: used in compile.c and stropmodule.c. */ - - PyObject * - long_scan(str, base) - char *str; - int base; - { - return PyLong_FromString(str, (char **)NULL, base); - } - #endif - PyObject * ! PyLong_FromString(str, pend, base) ! char *str; ! char **pend; ! int base; { int sign = 1; --- 654,659 ---- } PyObject * ! PyLong_FromString(char *str, char **pend, int base) { int sign = 1; *************** *** 774,781 **** PyObject * ! PyLong_FromUnicode(u, length, base) ! Py_UNICODE *u; ! int length; ! int base; { char buffer[256]; --- 728,732 ---- PyObject * ! PyLong_FromUnicode(Py_UNICODE *u, int length, int base) { char buffer[256]; *************** *** 792,808 **** } static PyLongObject *x_divrem ! Py_PROTO((PyLongObject *, PyLongObject *, PyLongObject **)); ! static PyObject *long_pos Py_PROTO((PyLongObject *)); ! static int long_divrem Py_PROTO((PyLongObject *, PyLongObject *, ! PyLongObject **, PyLongObject **)); /* Long division with remainder, top-level routine */ static int ! long_divrem(a, b, pdiv, prem) ! PyLongObject *a, *b; ! PyLongObject **pdiv; ! PyLongObject **prem; { int size_a = ABS(a->ob_size), size_b = ABS(b->ob_size); --- 743,758 ---- } + /* forward */ static PyLongObject *x_divrem ! (PyLongObject *, PyLongObject *, PyLongObject **); ! static PyObject *long_pos(PyLongObject *); ! static int long_divrem(PyLongObject *, PyLongObject *, ! PyLongObject **, PyLongObject **); /* Long division with remainder, top-level routine */ static int ! long_divrem(PyLongObject *a, PyLongObject *b, ! PyLongObject **pdiv, PyLongObject **prem) { int size_a = ABS(a->ob_size), size_b = ABS(b->ob_size); *************** *** 850,856 **** static PyLongObject * ! x_divrem(v1, w1, prem) ! PyLongObject *v1, *w1; ! PyLongObject **prem; { int size_v = ABS(v1->ob_size), size_w = ABS(w1->ob_size); --- 800,804 ---- static PyLongObject * ! x_divrem(PyLongObject *v1, PyLongObject *w1, PyLongObject **prem) { int size_v = ABS(v1->ob_size), size_w = ABS(w1->ob_size); *************** *** 946,977 **** /* Methods */ - /* Forward */ - static void long_dealloc Py_PROTO((PyObject *)); - static PyObject *long_repr Py_PROTO((PyObject *)); - static int long_compare Py_PROTO((PyLongObject *, PyLongObject *)); - static long long_hash Py_PROTO((PyLongObject *)); - - static PyObject *long_add Py_PROTO((PyLongObject *, PyLongObject *)); - static PyObject *long_sub Py_PROTO((PyLongObject *, PyLongObject *)); - static PyObject *long_mul Py_PROTO((PyLongObject *, PyLongObject *)); - static PyObject *long_div Py_PROTO((PyLongObject *, PyLongObject *)); - static PyObject *long_mod Py_PROTO((PyLongObject *, PyLongObject *)); - static PyObject *long_divmod Py_PROTO((PyLongObject *, PyLongObject *)); - static PyObject *long_pow - Py_PROTO((PyLongObject *, PyLongObject *, PyLongObject *)); - static PyObject *long_neg Py_PROTO((PyLongObject *)); - static PyObject *long_pos Py_PROTO((PyLongObject *)); - static PyObject *long_abs Py_PROTO((PyLongObject *)); - static int long_nonzero Py_PROTO((PyLongObject *)); - static PyObject *long_invert Py_PROTO((PyLongObject *)); - static PyObject *long_lshift Py_PROTO((PyLongObject *, PyLongObject *)); - static PyObject *long_rshift Py_PROTO((PyLongObject *, PyLongObject *)); - static PyObject *long_and Py_PROTO((PyLongObject *, PyLongObject *)); - static PyObject *long_xor Py_PROTO((PyLongObject *, PyLongObject *)); - static PyObject *long_or Py_PROTO((PyLongObject *, PyLongObject *)); - static void ! long_dealloc(v) ! PyObject *v; { PyObject_DEL(v); --- 894,899 ---- /* Methods */ static void ! long_dealloc(PyObject *v) { PyObject_DEL(v); *************** *** 979,984 **** static PyObject * ! long_repr(v) ! PyObject *v; { return long_format(v, 10, 1); --- 901,905 ---- static PyObject * ! long_repr(PyObject *v) { return long_format(v, 10, 1); *************** *** 986,991 **** static PyObject * ! long_str(v) ! PyObject *v; { return long_format(v, 10, 0); --- 907,911 ---- static PyObject * ! long_str(PyObject *v) { return long_format(v, 10, 0); *************** *** 993,998 **** static int ! long_compare(a, b) ! PyLongObject *a, *b; { int sign; --- 913,917 ---- static int ! long_compare(PyLongObject *a, PyLongObject *b) { int sign; *************** *** 1020,1025 **** static long ! long_hash(v) ! PyLongObject *v; { long x; --- 939,943 ---- static long ! long_hash(PyLongObject *v) { long x; *************** *** 1050,1057 **** /* Add the absolute values of two long integers. */ - static PyLongObject *x_add Py_PROTO((PyLongObject *, PyLongObject *)); static PyLongObject * ! x_add(a, b) ! PyLongObject *a, *b; { int size_a = ABS(a->ob_size), size_b = ABS(b->ob_size); --- 968,973 ---- /* Add the absolute values of two long integers. */ static PyLongObject * ! x_add(PyLongObject *a, PyLongObject *b) { int size_a = ABS(a->ob_size), size_b = ABS(b->ob_size); *************** *** 1088,1095 **** /* Subtract the absolute values of two integers. */ - static PyLongObject *x_sub Py_PROTO((PyLongObject *, PyLongObject *)); static PyLongObject * ! x_sub(a, b) ! PyLongObject *a, *b; { int size_a = ABS(a->ob_size), size_b = ABS(b->ob_size); --- 1004,1009 ---- /* Subtract the absolute values of two integers. */ static PyLongObject * ! x_sub(PyLongObject *a, PyLongObject *b) { int size_a = ABS(a->ob_size), size_b = ABS(b->ob_size); *************** *** 1143,1149 **** static PyObject * ! long_add(a, b) ! PyLongObject *a; ! PyLongObject *b; { PyLongObject *z; --- 1057,1061 ---- static PyObject * ! long_add(PyLongObject *a, PyLongObject *b) { PyLongObject *z; *************** *** 1168,1174 **** static PyObject * ! long_sub(a, b) ! PyLongObject *a; ! PyLongObject *b; { PyLongObject *z; --- 1080,1084 ---- static PyObject * ! long_sub(PyLongObject *a, PyLongObject *b) { PyLongObject *z; *************** *** 1192,1198 **** static PyObject * ! long_mul(a, b) ! PyLongObject *a; ! PyLongObject *b; { int size_a; --- 1102,1106 ---- static PyObject * ! long_mul(PyLongObject *a, PyLongObject *b) { int size_a; *************** *** 1260,1271 **** part of the outcome to keep the invariant intact. */ - static int l_divmod Py_PROTO((PyLongObject *, PyLongObject *, - PyLongObject **, PyLongObject **)); static int ! l_divmod(v, w, pdiv, pmod) ! PyLongObject *v; ! PyLongObject *w; ! PyLongObject **pdiv; ! PyLongObject **pmod; { PyLongObject *div, *mod; --- 1168,1174 ---- part of the outcome to keep the invariant intact. */ static int ! l_divmod(PyLongObject *v, PyLongObject *w, ! PyLongObject **pdiv, PyLongObject **pmod) { PyLongObject *div, *mod; *************** *** 1302,1308 **** static PyObject * ! long_div(v, w) ! PyLongObject *v; ! PyLongObject *w; { PyLongObject *div, *mod; --- 1205,1209 ---- static PyObject * ! long_div(PyLongObject *v, PyLongObject *w) { PyLongObject *div, *mod; *************** *** 1314,1320 **** static PyObject * ! long_mod(v, w) ! PyLongObject *v; ! PyLongObject *w; { PyLongObject *div, *mod; --- 1215,1219 ---- static PyObject * ! long_mod(PyLongObject *v, PyLongObject *w) { PyLongObject *div, *mod; *************** *** 1326,1332 **** static PyObject * ! long_divmod(v, w) ! PyLongObject *v; ! PyLongObject *w; { PyObject *z; --- 1225,1229 ---- static PyObject * ! long_divmod(PyLongObject *v, PyLongObject *w) { PyObject *z; *************** *** 1347,1354 **** static PyObject * ! long_pow(a, b, c) ! PyLongObject *a; ! PyLongObject *b; ! PyLongObject *c; { PyLongObject *z, *div, *mod; --- 1244,1248 ---- static PyObject * ! long_pow(PyLongObject *a, PyLongObject *b, PyLongObject *c) { PyLongObject *z, *div, *mod; *************** *** 1429,1434 **** static PyObject * ! long_invert(v) ! PyLongObject *v; { /* Implement ~x as -(x+1) */ --- 1323,1327 ---- static PyObject * ! long_invert(PyLongObject *v) { /* Implement ~x as -(x+1) */ *************** *** 1448,1453 **** static PyObject * ! long_pos(v) ! PyLongObject *v; { Py_INCREF(v); --- 1341,1345 ---- static PyObject * ! long_pos(PyLongObject *v) { Py_INCREF(v); *************** *** 1456,1461 **** static PyObject * ! long_neg(v) ! PyLongObject *v; { PyLongObject *z; --- 1348,1352 ---- static PyObject * ! long_neg(PyLongObject *v) { PyLongObject *z; *************** *** 1477,1482 **** static PyObject * ! long_abs(v) ! PyLongObject *v; { if (v->ob_size < 0) --- 1368,1372 ---- static PyObject * ! long_abs(PyLongObject *v) { if (v->ob_size < 0) *************** *** 1489,1494 **** static int ! long_nonzero(v) ! PyLongObject *v; { return ABS(v->ob_size) != 0; --- 1379,1383 ---- static int ! long_nonzero(PyLongObject *v) { return ABS(v->ob_size) != 0; *************** *** 1496,1502 **** static PyObject * ! long_rshift(a, b) ! PyLongObject *a; ! PyLongObject *b; { PyLongObject *z; --- 1385,1389 ---- static PyObject * ! long_rshift(PyLongObject *a, PyLongObject *b) { PyLongObject *z; *************** *** 1550,1556 **** static PyObject * ! long_lshift(a, b) ! PyLongObject *a; ! PyLongObject *b; { /* This version due to Tim Peters */ --- 1437,1441 ---- static PyObject * ! long_lshift(PyLongObject *a, PyLongObject *b) { /* This version due to Tim Peters */ *************** *** 1606,1615 **** #define MIN(x, y) ((x) > (y) ? (y) : (x)) - static PyObject *long_bitwise Py_PROTO((PyLongObject *, int, PyLongObject *)); static PyObject * ! long_bitwise(a, op, b) ! PyLongObject *a; ! int op; /* '&', '|', '^' */ ! PyLongObject *b; { digit maska, maskb; /* 0 or MASK */ --- 1491,1498 ---- #define MIN(x, y) ((x) > (y) ? (y) : (x)) static PyObject * ! long_bitwise(PyLongObject *a, ! int op, /* '&', '|', '^' */ ! PyLongObject *b) { digit maska, maskb; /* 0 or MASK */ *************** *** 1710,1716 **** static PyObject * ! long_and(a, b) ! PyLongObject *a; ! PyLongObject *b; { return long_bitwise(a, '&', b); --- 1593,1597 ---- static PyObject * ! long_and(PyLongObject *a, PyLongObject *b) { return long_bitwise(a, '&', b); *************** *** 1718,1724 **** static PyObject * ! long_xor(a, b) ! PyLongObject *a; ! PyLongObject *b; { return long_bitwise(a, '^', b); --- 1599,1603 ---- static PyObject * ! long_xor(PyLongObject *a, PyLongObject *b) { return long_bitwise(a, '^', b); *************** *** 1726,1732 **** static PyObject * ! long_or(a, b) ! PyLongObject *a; ! PyLongObject *b; { return long_bitwise(a, '|', b); --- 1605,1609 ---- static PyObject * ! long_or(PyLongObject *a, PyLongObject *b) { return long_bitwise(a, '|', b); *************** *** 1734,1740 **** static int ! long_coerce(pv, pw) ! PyObject **pv; ! PyObject **pw; { if (PyInt_Check(*pw)) { --- 1611,1615 ---- static int ! long_coerce(PyObject **pv, PyObject **pw) { if (PyInt_Check(*pw)) { *************** *** 1747,1752 **** static PyObject * ! long_int(v) ! PyObject *v; { long x; --- 1622,1626 ---- static PyObject * ! long_int(PyObject *v) { long x; *************** *** 1758,1763 **** static PyObject * ! long_long(v) ! PyObject *v; { Py_INCREF(v); --- 1632,1636 ---- static PyObject * ! long_long(PyObject *v) { Py_INCREF(v); *************** *** 1766,1771 **** static PyObject * ! long_float(v) ! PyObject *v; { double result; --- 1639,1643 ---- static PyObject * ! long_float(PyObject *v) { double result; *************** *** 1777,1782 **** static PyObject * ! long_oct(v) ! PyObject *v; { return long_format(v, 8, 1); --- 1649,1653 ---- static PyObject * ! long_oct(PyObject *v) { return long_format(v, 8, 1); *************** *** 1784,1824 **** static PyObject * ! long_hex(v) ! PyObject *v; { return long_format(v, 16, 1); } - - #define UF (unaryfunc) - #define BF (binaryfunc) - #define TF (ternaryfunc) - #define IF (inquiry) - static PyNumberMethods long_as_number = { ! BF long_add, /*nb_add*/ ! BF long_sub, /*nb_subtract*/ ! BF long_mul, /*nb_multiply*/ ! BF long_div, /*nb_divide*/ ! BF long_mod, /*nb_remainder*/ ! BF long_divmod, /*nb_divmod*/ ! TF long_pow, /*nb_power*/ ! UF long_neg, /*nb_negative*/ ! UF long_pos, /*tp_positive*/ ! UF long_abs, /*tp_absolute*/ ! IF long_nonzero,/*tp_nonzero*/ ! UF long_invert, /*nb_invert*/ ! BF long_lshift, /*nb_lshift*/ ! BF long_rshift, /*nb_rshift*/ ! BF long_and, /*nb_and*/ ! BF long_xor, /*nb_xor*/ ! BF long_or, /*nb_or*/ ! (int (*) Py_FPROTO((PyObject **, PyObject **))) ! (coercion)long_coerce, /*nb_coerce*/ ! UF long_int, /*nb_int*/ ! UF long_long, /*nb_long*/ ! UF long_float, /*nb_float*/ ! UF long_oct, /*nb_oct*/ ! UF long_hex, /*nb_hex*/ }; --- 1655,1688 ---- static PyObject * ! long_hex(PyObject *v) { return long_format(v, 16, 1); } static PyNumberMethods long_as_number = { ! (binaryfunc) long_add, /*nb_add*/ ! (binaryfunc) long_sub, /*nb_subtract*/ ! (binaryfunc) long_mul, /*nb_multiply*/ ! (binaryfunc) long_div, /*nb_divide*/ ! (binaryfunc) long_mod, /*nb_remainder*/ ! (binaryfunc) long_divmod, /*nb_divmod*/ ! (ternaryfunc) long_pow, /*nb_power*/ ! (unaryfunc) long_neg, /*nb_negative*/ ! (unaryfunc) long_pos, /*tp_positive*/ ! (unaryfunc) long_abs, /*tp_absolute*/ ! (inquiry) long_nonzero, /*tp_nonzero*/ ! (unaryfunc) long_invert, /*nb_invert*/ ! (binaryfunc) long_lshift, /*nb_lshift*/ ! (binaryfunc) long_rshift, /*nb_rshift*/ ! (binaryfunc) long_and, /*nb_and*/ ! (binaryfunc) long_xor, /*nb_xor*/ ! (binaryfunc) long_or, /*nb_or*/ ! (int (*) (PyObject **, PyObject **)) ! (coercion)long_coerce, /*nb_coerce*/ ! (unaryfunc) long_int, /*nb_int*/ ! (unaryfunc) long_long, /*nb_long*/ ! (unaryfunc) long_float, /*nb_float*/ ! (unaryfunc) long_oct, /*nb_oct*/ ! (unaryfunc) long_hex, /*nb_hex*/ }; *************** *** 1829,1845 **** sizeof(PyLongObject) - sizeof(digit), sizeof(digit), ! (destructor)long_dealloc, /*tp_dealloc*/ ! 0, /*tp_print*/ ! 0, /*tp_getattr*/ ! 0, /*tp_setattr*/ ! (int (*) Py_FPROTO((PyObject *, PyObject *))) ! (cmpfunc)long_compare, /*tp_compare*/ ! (reprfunc)long_repr, /*tp_repr*/ ! &long_as_number,/*tp_as_number*/ ! 0, /*tp_as_sequence*/ ! 0, /*tp_as_mapping*/ ! (long (*) Py_FPROTO((PyObject *))) ! (hashfunc)long_hash, /*tp_hash*/ ! 0, /*tp_call*/ ! (reprfunc)long_str, /*tp_str*/ }; --- 1693,1709 ---- sizeof(PyLongObject) - sizeof(digit), sizeof(digit), ! (destructor)long_dealloc, /*tp_dealloc*/ ! 0, /*tp_print*/ ! 0, /*tp_getattr*/ ! 0, /*tp_setattr*/ ! (int (*) (PyObject *, PyObject *)) ! (cmpfunc)long_compare, /*tp_compare*/ ! (reprfunc)long_repr, /*tp_repr*/ ! &long_as_number, /*tp_as_number*/ ! 0, /*tp_as_sequence*/ ! 0, /*tp_as_mapping*/ ! (long (*) (PyObject *)) ! (hashfunc)long_hash, /*tp_hash*/ ! 0, /*tp_call*/ ! (reprfunc)long_str, /*tp_str*/ }; From python-dev@python.org Fri Jul 7 17:21:34 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 7 Jul 2000 09:21:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules makesetup,1.24,1.25 Message-ID: <200007071621.JAA15058@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv15045/Modules Modified Files: makesetup Log Message: Thomas Wouters : Allow -f* parameters to be passed to the compiler from Setup files. Index: makesetup =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/makesetup,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** makesetup 2000/07/06 17:58:06 1.24 --- makesetup 2000/07/07 16:21:31 1.25 *************** *** 141,145 **** esac case $arg in ! -[IDUC]*) cpps="$cpps $arg";; -Xlinker) libs="$libs $arg"; skip=libs;; -rpath) libs="$libs $arg"; skip=libs;; --- 141,145 ---- esac case $arg in ! -[IDUCf]*) cpps="$cpps $arg";; -Xlinker) libs="$libs $arg"; skip=libs;; -rpath) libs="$libs $arg"; skip=libs;; From python-dev@python.org Fri Jul 7 18:08:42 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 7 Jul 2000 10:08:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libwebbrowser.tex,1.1,1.2 Message-ID: <200007071708.KAA24821@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv24814 Modified Files: libwebbrowser.tex Log Message: Add an entry for the KDE File Manager support from Peter Funk. Index: libwebbrowser.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libwebbrowser.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** libwebbrowser.tex 2000/07/07 03:36:12 1.1 --- libwebbrowser.tex 2000/07/07 17:08:40 1.2 *************** *** 58,64 **** \begin{tableiii}{l|l|c}{code}{Type Name}{Class Name}{Notes} \lineiii{'netscape'}{\class{Netscape}}{} \lineiii{'grail'}{\class{Grail}}{} ! \lineiii{'windows-default'}{\class{WindowsDefault}}{(1)} ! \lineiii{'internet-config'}{\class{InternetConfig}}{(2)} \lineiii{'command-line'}{\class{CommandLineBrowser}}{} \end{tableiii} --- 58,65 ---- \begin{tableiii}{l|l|c}{code}{Type Name}{Class Name}{Notes} \lineiii{'netscape'}{\class{Netscape}}{} + \lineiii{'kfm'}{\class{Konquerer}}{(1)} \lineiii{'grail'}{\class{Grail}}{} ! \lineiii{'windows-default'}{\class{WindowsDefault}}{(2)} ! \lineiii{'internet-config'}{\class{InternetConfig}}{(3)} \lineiii{'command-line'}{\class{CommandLineBrowser}}{} \end{tableiii} *************** *** 69,76 **** \begin{description} \item[(1)] Only on Windows platforms; requires the common extension modules \module{win32api} and \module{win32con}. ! \item[(2)] Only on MacOS platforms; requires the standard MacPython \module{ic} module, described in the \citetitle[../mac/module-ic.html]{Macintosh --- 70,81 ---- \begin{description} \item[(1)] + ``Konquerer'' is the file manager for the KDE desktop environment, and + only makes sense to use if KDE is running. + + \item[(2)] Only on Windows platforms; requires the common extension modules \module{win32api} and \module{win32con}. ! \item[(3)] Only on MacOS platforms; requires the standard MacPython \module{ic} module, described in the \citetitle[../mac/module-ic.html]{Macintosh From python-dev@python.org Fri Jul 7 18:45:39 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 10:45:39 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include ucnhash.h,1.2,1.3 Message-ID: <200007071745.KAA27159@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv27135/Include Modified Files: ucnhash.h Log Message: Fix to use Py_UCS4 Index: ucnhash.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/ucnhash.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ucnhash.h 2000/06/29 00:06:39 1.2 --- ucnhash.h 2000/07/07 17:45:37 1.3 *************** *** 16,20 **** { const char *pszUCN; ! unsigned int uiValue; } _Py_UnicodeCharacterName; --- 16,20 ---- { const char *pszUCN; ! Py_UCS4 value; } _Py_UnicodeCharacterName; From python-dev@python.org Fri Jul 7 18:48:54 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 10:48:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_unicode.py,1.18,1.19 Message-ID: <200007071748.KAA27423@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv27299/Lib/test Modified Files: test_unicode.py Log Message: Tests for new surrogate support in the UTF-8 codec. By Bill Tutt. Index: test_unicode.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** test_unicode.py 2000/07/07 13:46:19 1.18 --- test_unicode.py 2000/07/07 17:48:52 1.19 *************** *** 169,172 **** --- 169,223 ---- print 'done.' + print 'Testing UTF-16 code point order comparisons...', + #No surrogates, no fixup required. + assert u'\u0061' < u'\u20ac' + # Non surrogate below surrogate value, no fixup required + assert u'\u0061' < u'\ud800\udc02' + + # Non surrogate above surrogate value, fixup required + def test_lecmp(s, s2): + assert s < s2 , "comparison failed on %s < %s" % (s, s2) + + def test_fixup(s): + s2 = u'\ud800\udc01' + test_lecmp(s, s2) + s2 = u'\ud900\udc01' + test_lecmp(s, s2) + s2 = u'\uda00\udc01' + test_lecmp(s, s2) + s2 = u'\udb00\udc01' + test_lecmp(s, s2) + s2 = u'\ud800\udd01' + test_lecmp(s, s2) + s2 = u'\ud900\udd01' + test_lecmp(s, s2) + s2 = u'\uda00\udd01' + test_lecmp(s, s2) + s2 = u'\udb00\udd01' + test_lecmp(s, s2) + s2 = u'\ud800\ude01' + test_lecmp(s, s2) + s2 = u'\ud900\ude01' + test_lecmp(s, s2) + s2 = u'\uda00\ude01' + test_lecmp(s, s2) + s2 = u'\udb00\ude01' + test_lecmp(s, s2) + s2 = u'\ud800\udfff' + test_lecmp(s, s2) + s2 = u'\ud900\udfff' + test_lecmp(s, s2) + s2 = u'\uda00\udfff' + test_lecmp(s, s2) + s2 = u'\udb00\udfff' + test_lecmp(s, s2) + + test_fixup(u'\ue000') + test_fixup(u'\uff61') + + # Surrogates on both sides, no fixup required + assert u'\ud800\udc02' < u'\ud84d\udc56' + print 'done.' + test('ljust', u'abc', u'abc ', 10) test('rjust', u'abc', u' abc', 10) *************** *** 293,296 **** --- 344,368 ---- # Test builtin codecs print 'Testing builtin codecs...', + + # UTF-8 specific encoding tests: + assert u'\u20ac'.encode('utf-8') == \ + ''.join((chr(0xe2), chr(0x82), chr(0xac))) + assert u'\ud800\udc02'.encode('utf-8') == \ + ''.join((chr(0xf0), chr(0x90), chr(0x80), chr(0x82))) + assert u'\ud84d\udc56'.encode('utf-8') == \ + ''.join((chr(0xf0), chr(0xa3), chr(0x91), chr(0x96))) + # UTF-8 specific decoding tests + assert unicode(''.join((chr(0xf0), chr(0xa3), chr(0x91), chr(0x96))), + 'utf-8') == u'\ud84d\udc56' + assert unicode(''.join((chr(0xf0), chr(0x90), chr(0x80), chr(0x82))), + 'utf-8') == u'\ud800\udc02' + assert unicode(''.join((chr(0xe2), chr(0x82), chr(0xac))), + 'utf-8') == u'\u20ac' + + # Other possible utf-8 test cases: + # * strict decoding testing for all of the + # UTF8_ERROR cases in PyUnicode_DecodeUTF8 + + assert unicode('hello','ascii') == u'hello' From python-dev@python.org Fri Jul 7 18:51:10 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 10:51:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.40,2.41 Message-ID: <200007071751.KAA27570@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv27530/Objects Modified Files: unicodeobject.c Log Message: New surrogate support in the UTF-8 codec. By Bill Tutt. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.40 retrieving revision 2.41 diff -C2 -r2.40 -r2.41 *** unicodeobject.c 2000/07/07 13:46:42 2.40 --- unicodeobject.c 2000/07/07 17:51:08 2.41 *************** *** 658,665 **** while (s < e) { ! register Py_UNICODE ch = (unsigned char)*s; if (ch < 0x80) { ! *p++ = ch; s++; continue; --- 658,665 ---- while (s < e) { ! Py_UCS4 ch = (unsigned char)*s; if (ch < 0x80) { ! *p++ = (Py_UNICODE)ch; s++; continue; *************** *** 688,692 **** UTF8_ERROR("illegal encoding"); else ! *p++ = ch; break; --- 688,692 ---- UTF8_ERROR("illegal encoding"); else ! *p++ = (Py_UNICODE)ch; break; *************** *** 699,703 **** UTF8_ERROR("illegal encoding"); else ! *p++ = ch; break; --- 699,726 ---- UTF8_ERROR("illegal encoding"); else ! *p++ = (Py_UNICODE)ch; ! break; ! ! case 4: ! if ((s[1] & 0xc0) != 0x80 || ! (s[2] & 0xc0) != 0x80 || ! (s[3] & 0xc0) != 0x80) ! UTF8_ERROR("invalid data"); ! ch = ((s[0] & 0x7) << 18) + ((s[1] & 0x3f) << 12) + ! ((s[2] & 0x3f) << 6) + (s[3] & 0x3f); ! /* validate and convert to UTF-16 */ ! if ((ch < 0x10000) || /* minimum value allowed for 4 byte encoding */ ! (ch > 0x10ffff)) /* maximum value allowed for UTF-16 */ ! UTF8_ERROR("illegal encoding"); ! /* compute and append the two surrogates: */ ! ! /* translate from 10000..10FFFF to 0..FFFF */ ! ch -= 0x10000; ! ! /* high surrogate = top 10 bits added to D800 */ ! *p++ = (Py_UNICODE)(0xD800 + (ch >> 10)); ! ! /* low surrogate = bottom 10 bits added to DC00 */ ! *p++ = (Py_UNICODE)(0xDC00 + (ch & ~0xFC00)); break; *************** *** 759,764 **** char *p; char *q; ! v = PyString_FromStringAndSize(NULL, 3 * size); if (v == NULL) return NULL; --- 782,791 ---- char *p; char *q; + Py_UCS4 ch2; + unsigned int cbAllocated = 3 * size; + unsigned int cbWritten = 0; + int i = 0; ! v = PyString_FromStringAndSize(NULL, cbAllocated); if (v == NULL) return NULL; *************** *** 767,788 **** p = q = PyString_AS_STRING(v); ! while (size-- > 0) { ! Py_UNICODE ch = *s++; ! if (ch < 0x80) *p++ = (char) ch; else if (ch < 0x0800) { *p++ = 0xc0 | (ch >> 6); *p++ = 0x80 | (ch & 0x3f); ! } else if (0xD800 <= ch && ch <= 0xDFFF) { ! /* These byte ranges are reserved for UTF-16 surrogate ! bytes which the Python implementation currently does ! not support. */ ! if (utf8_encoding_error(&s, &p, errors, ! "unsupported code range")) goto onError; ! } else { ! *p++ = 0xe0 | (ch >> 12); ! *p++ = 0x80 | ((ch >> 6) & 0x3f); ! *p++ = 0x80 | (ch & 0x3f); } } --- 794,839 ---- p = q = PyString_AS_STRING(v); ! while (i < size) { ! Py_UCS4 ch = s[i++]; ! if (ch < 0x80) { *p++ = (char) ch; + cbWritten++; + } else if (ch < 0x0800) { *p++ = 0xc0 | (ch >> 6); *p++ = 0x80 | (ch & 0x3f); ! cbWritten += 2; ! } ! else { ! /* Check for high surrogate */ ! if (0xD800 <= ch && ch <= 0xDBFF) { ! if (i != size) { ! ch2 = s[i]; ! if (0xDC00 <= ch2 && ch2 <= 0xDFFF) { ! ! if (cbWritten >= (cbAllocated - 4)) { ! /* Provide enough room for some more ! surrogates */ ! cbAllocated += 4*10; ! if (_PyString_Resize(&v, cbAllocated)) goto onError; ! } ! ! /* combine the two values */ ! ch = ((ch - 0xD800)<<10 | (ch2-0xDC00))+0x10000; ! ! *p++ = (char)((ch >> 18) | 0xf0); ! *p++ = (char)(0x80 | (ch >> 12) & 0x3f); ! i++; ! cbWritten += 4; ! } ! } ! } ! else { ! *p++ = (char)(0xe0 | (ch >> 12)); ! cbWritten += 3; ! } ! *p++ = (char)(0x80 | ((ch >> 6) & 0x3f)); ! *p++ = (char)(0x80 | (ch & 0x3f)); } } *************** *** 1218,1222 **** const char *start = s + 1; const char *endBrace = start; ! unsigned int uiValue; unsigned long j; --- 1269,1273 ---- const char *start = s + 1; const char *endBrace = start; ! Py_UCS4 value; unsigned long j; *************** *** 1249,1258 **** goto ucnFallthrough; } ! uiValue = ((_Py_UnicodeCharacterName *) ! (pucnHash->getValue(j)))->uiValue; ! if (uiValue < 1<<16) { /* In UCS-2 range, easy solution.. */ ! *p++ = uiValue; } else --- 1300,1309 ---- goto ucnFallthrough; } ! value = ((_Py_UnicodeCharacterName *) ! (pucnHash->getValue(j)))->value; ! if (value < 1<<16) { /* In UCS-2 range, easy solution.. */ ! *p++ = value; } else *************** *** 1261,1271 **** /* compute and append the two surrogates: */ /* translate from 10000..10FFFF to 0..FFFFF */ ! uiValue -= 0x10000; /* high surrogate = top 10 bits added to D800 */ ! *p++ = 0xD800 + (uiValue >> 10); /* low surrogate = bottom 10 bits added to DC00 */ ! *p++ = 0xDC00 + (uiValue & ~0xFC00); } s = endBrace + 1; --- 1312,1322 ---- /* compute and append the two surrogates: */ /* translate from 10000..10FFFF to 0..FFFFF */ ! value -= 0x10000; /* high surrogate = top 10 bits added to D800 */ ! *p++ = 0xD800 + (value >> 10); /* low surrogate = bottom 10 bits added to DC00 */ ! *p++ = 0xDC00 + (value & ~0xFC00); } s = endBrace + 1; *************** *** 3092,3101 **** /* http://www-4.ibm.com/software/developer/library/utf16.html?dwzone=unicode */ ! static unsigned long utf16Fixup[32] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0x2000, 0xf800, 0xf800, 0xf800, 0xf800 }; --- 3143,3152 ---- /* http://www-4.ibm.com/software/developer/library/utf16.html?dwzone=unicode */ ! static short utf16Fixup[32] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0x2000, -0x800, -0x800, -0x800, -0x800 }; *************** *** 3112,3116 **** while (len1 > 0 && len2 > 0) { ! unsigned long c1, c2; long diff; --- 3163,3167 ---- while (len1 > 0 && len2 > 0) { ! Py_UNICODE c1, c2; long diff; From python-dev@python.org Fri Jul 7 18:54:06 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Fri, 7 Jul 2000 10:54:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/perfecthash GenUCNHash.py,1.3,1.4 Message-ID: <200007071754.KAA27823@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/perfecthash In directory slayer.i.sourceforge.net:/tmp/cvs-serv27816/Tools/perfecthash Modified Files: GenUCNHash.py Log Message: Fix to use Py_UCS4. By Bill Tutt. Index: GenUCNHash.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/perfecthash/GenUCNHash.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** GenUCNHash.py 2000/06/30 10:30:35 1.3 --- GenUCNHash.py 2000/07/07 17:53:54 1.4 *************** *** 39,43 **** { const char *pszUCN; ! unsigned int uiValue; } _Py_UnicodeCharacterName; --- 39,43 ---- { const char *pszUCN; ! Py_UCS4 value; } _Py_UnicodeCharacterName; From python-dev@python.org Fri Jul 7 21:41:23 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 7 Jul 2000 13:41:23 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/distutils ccompiler.py,1.28,1.29 Message-ID: <200007072041.NAA26210@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv26175 Modified Files: ccompiler.py Log Message: fix inconsistent use of tabs and spaces Index: ccompiler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/ccompiler.py,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** ccompiler.py 2000/06/28 01:29:09 1.28 --- ccompiler.py 2000/07/07 20:41:20 1.29 *************** *** 829,833 **** compilers = [] for compiler in compiler_class.keys(): ! compilers.append(("compiler="+compiler, None, compiler_class[compiler][2])) compilers.sort() --- 829,833 ---- compilers = [] for compiler in compiler_class.keys(): ! compilers.append(("compiler="+compiler, None, compiler_class[compiler][2])) compilers.sort() From python-dev@python.org Fri Jul 7 21:41:23 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 7 Jul 2000 13:41:23 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/distutils/command build_ext.py,1.54,1.55 install_headers.py,1.3,1.4 Message-ID: <200007072041.NAA26216@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv26175/command Modified Files: build_ext.py install_headers.py Log Message: fix inconsistent use of tabs and spaces Index: build_ext.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/build_ext.py,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -r1.54 -r1.55 *** build_ext.py 2000/06/29 23:09:20 1.54 --- build_ext.py 2000/07/07 20:41:21 1.55 *************** *** 371,380 **** self.get_ext_filename(fullname)) ! if not (self.force or newer_group(sources, ext_filename, 'newer')): ! self.announce ("skipping '%s' extension (up-to-date)" % ext.name) ! continue # 'for' loop over all extensions ! else: ! self.announce ("building '%s' extension" % ext.name) # First, scan the sources for SWIG definition files (.i), run --- 371,380 ---- self.get_ext_filename(fullname)) ! if not (self.force or newer_group(sources, ext_filename, 'newer')): ! self.announce ("skipping '%s' extension (up-to-date)" % ext.name) ! continue # 'for' loop over all extensions ! else: ! self.announce ("building '%s' extension" % ext.name) # First, scan the sources for SWIG definition files (.i), run Index: install_headers.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/install_headers.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** install_headers.py 2000/06/21 03:14:27 1.3 --- install_headers.py 2000/07/07 20:41:21 1.4 *************** *** 23,27 **** def initialize_options (self): self.install_dir = None ! self.outfiles = [] def finalize_options (self): --- 23,27 ---- def initialize_options (self): self.install_dir = None ! self.outfiles = [] def finalize_options (self): From python-dev@python.org Fri Jul 7 21:45:24 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 7 Jul 2000 13:45:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/distutils dist.py,1.31,1.32 Message-ID: <200007072045.NAA26729@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv26614 Modified Files: dist.py Log Message: fix inconsistent use of tabs and spaces Index: dist.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/dist.py,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** dist.py 2000/06/28 01:25:27 1.31 --- dist.py 2000/07/07 20:45:21 1.32 *************** *** 276,286 **** # What to call the per-user config file if os.name == 'posix': ! user_filename = ".pydistutils.cfg" ! else: ! user_filename = "pydistutils.cfg" # And look for the user config file ! if os.environ.has_key('HOME'): ! user_file = os.path.join(os.environ.get('HOME'), user_filename) if os.path.isfile(user_file): files.append(user_file) --- 276,286 ---- # What to call the per-user config file if os.name == 'posix': ! user_filename = ".pydistutils.cfg" ! else: ! user_filename = "pydistutils.cfg" # And look for the user config file ! if os.environ.has_key('HOME'): ! user_file = os.path.join(os.environ.get('HOME'), user_filename) if os.path.isfile(user_file): files.append(user_file) *************** *** 440,444 **** # Check for help_options in command class. They have a different # format (tuple of four) so we need to preprocess them here. ! if (hasattr(cmd_class, 'help_options') and type (cmd_class.help_options) is ListType): help_options = fix_help_options(cmd_class.help_options) --- 440,444 ---- # Check for help_options in command class. They have a different # format (tuple of four) so we need to preprocess them here. ! if (hasattr(cmd_class, 'help_options') and type (cmd_class.help_options) is ListType): help_options = fix_help_options(cmd_class.help_options) *************** *** 458,472 **** return ! if (hasattr(cmd_class, 'help_options') and type (cmd_class.help_options) is ListType): ! help_option_found=0 ! for (help_option, short, desc, func) in cmd_class.help_options: ! if hasattr(opts, parser.get_attr_name(help_option)): ! help_option_found=1 #print "showing help for option %s of command %s" % \ # (help_option[0],cmd_class) if callable(func): ! func() else: raise DistutilsClassError, \ --- 458,472 ---- return ! if (hasattr(cmd_class, 'help_options') and type (cmd_class.help_options) is ListType): ! help_option_found=0 ! for (help_option, short, desc, func) in cmd_class.help_options: ! if hasattr(opts, parser.get_attr_name(help_option)): ! help_option_found=1 #print "showing help for option %s of command %s" % \ # (help_option[0],cmd_class) if callable(func): ! func() else: raise DistutilsClassError, \ *************** *** 476,480 **** if help_option_found: ! return # Put the options from the command-line into their official --- 476,480 ---- if help_option_found: ! return # Put the options from the command-line into their official *************** *** 527,536 **** else: klass = self.get_command_class (command) ! if (hasattr(klass, 'help_options') and type (klass.help_options) is ListType): ! parser.set_option_table (klass.user_options + fix_help_options(klass.help_options)) ! else: ! parser.set_option_table (klass.user_options) parser.print_help ("Options for '%s' command:" % klass.__name__) print --- 527,536 ---- else: klass = self.get_command_class (command) ! if (hasattr(klass, 'help_options') and type (klass.help_options) is ListType): ! parser.set_option_table (klass.user_options + fix_help_options(klass.help_options)) ! else: ! parser.set_option_table (klass.user_options) parser.print_help ("Options for '%s' command:" % klass.__name__) print From python-dev@python.org Fri Jul 7 21:57:44 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 7 Jul 2000 13:57:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax _exceptions.py,1.1,1.2 Message-ID: <200007072057.NAA27663@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv27642 Modified Files: _exceptions.py Log Message: fix inconsistent use of tabs and spaces Index: _exceptions.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/_exceptions.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** _exceptions.py 2000/06/29 19:34:54 1.1 --- _exceptions.py 2000/07/07 20:57:42 1.2 *************** *** 23,28 **** def getMessage(self): ! "Return a message for this exception." ! return self._msg def getException(self): --- 23,28 ---- def getMessage(self): ! "Return a message for this exception." ! return self._msg def getException(self): *************** *** 61,79 **** def getColumnNumber(self): ! """The column number of the end of the text where the exception occurred.""" ! return self._locator.getColumnNumber() def getLineNumber(self): ! "The line number of the end of the text where the exception occurred." ! return self._locator.getLineNumber() def getPublicId(self): ! "Get the public identifier of the entity where the exception occurred." ! return self._locator.getPublicId() def getSystemId(self): ! "Get the system identifier of the entity where the exception occurred." ! return self._locator.getSystemId() def __str__(self): --- 61,79 ---- def getColumnNumber(self): ! """The column number of the end of the text where the exception occurred.""" ! return self._locator.getColumnNumber() def getLineNumber(self): ! "The line number of the end of the text where the exception occurred." ! return self._locator.getLineNumber() def getPublicId(self): ! "Get the public identifier of the entity where the exception occurred." ! return self._locator.getPublicId() def getSystemId(self): ! "Get the system identifier of the entity where the exception occurred." ! return self._locator.getSystemId() def __str__(self): From python-dev@python.org Fri Jul 7 22:02:02 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 7 Jul 2000 14:02:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/dos-8x3 rfc822-n.py,1.1,1.2 Message-ID: <200007072102.OAA31771@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/dos-8x3 In directory slayer.i.sourceforge.net:/tmp/cvs-serv31709/dos-8x3 Modified Files: rfc822-n.py Log Message: fix inconsistent use of tabs and spaces Index: rfc822-n.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/rfc822-n.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** rfc822-n.py 2000/05/08 17:31:00 1.1 --- rfc822-n.py 2000/07/07 21:02:00 1.2 *************** *** 328,336 **** raw = [] for h in self.getallmatchingheaders(name): ! if h[0] in ' \t': ! raw.append(h) ! else: ! if raw: ! raw.append(', ') i = string.find(h, ':') if i > 0: --- 328,336 ---- raw = [] for h in self.getallmatchingheaders(name): ! if h[0] in ' \t': ! raw.append(h) ! else: ! if raw: ! raw.append(', ') i = string.find(h, ':') if i > 0: *************** *** 833,846 **** if mm > 12: mm = mm - 12 if dd[-1] == ',': ! dd = dd[:-1] i = string.find(yy, ':') if i > 0: ! yy, tm = tm, yy if yy[-1] == ',': ! yy = yy[:-1] if yy[0] not in string.digits: ! yy, tz = tz, yy if tm[-1] == ',': ! tm = tm[:-1] tm = string.splitfields(tm, ':') if len(tm) == 2: --- 833,846 ---- if mm > 12: mm = mm - 12 if dd[-1] == ',': ! dd = dd[:-1] i = string.find(yy, ':') if i > 0: ! yy, tm = tm, yy if yy[-1] == ',': ! yy = yy[:-1] if yy[0] not in string.digits: ! yy, tz = tz, yy if tm[-1] == ',': ! tm = tm[:-1] tm = string.splitfields(tm, ':') if len(tm) == 2: From python-dev@python.org Fri Jul 7 22:02:24 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 7 Jul 2000 14:02:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/curses wrapper.py,1.3,1.4 Message-ID: <200007072102.OAA31835@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/curses In directory slayer.i.sourceforge.net:/tmp/cvs-serv31811/curses Modified Files: wrapper.py Log Message: fix inconsistent use of tabs and spaces convert semicolons to newlines Index: wrapper.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/curses/wrapper.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** wrapper.py 2000/06/27 00:50:40 1.3 --- wrapper.py 2000/07/07 21:02:22 1.4 *************** *** 21,29 **** try: # Initialize curses ! stdscr=curses.initscr() # Turn off echoing of keys, and enter cbreak mode, # where no buffering is performed on keyboard input ! curses.noecho() ; curses.cbreak() # In keypad mode, escape sequences for special keys --- 21,30 ---- try: # Initialize curses ! stdscr=curses.initscr() # Turn off echoing of keys, and enter cbreak mode, # where no buffering is performed on keyboard input ! curses.noecho() ! curses.cbreak() # In keypad mode, escape sequences for special keys *************** *** 36,42 **** # In the event of an error, restore the terminal # to a sane state. ! stdscr.keypad(0) ! curses.echo() ; curses.nocbreak() ! curses.endwin() # Pass the exception upwards --- 37,44 ---- # In the event of an error, restore the terminal # to a sane state. ! stdscr.keypad(0) ! curses.echo() ! curses.nocbreak() ! curses.endwin() # Pass the exception upwards *************** *** 45,51 **** else: # Set everything back to normal ! stdscr.keypad(0) ! curses.echo() ; curses.nocbreak() ! curses.endwin() # Terminate curses return res --- 47,54 ---- else: # Set everything back to normal ! stdscr.keypad(0) ! curses.echo() ! curses.nocbreak() ! curses.endwin() # Terminate curses return res From python-dev@python.org Fri Jul 7 22:35:06 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 7 Jul 2000 14:35:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/dos-8x3 rfc822-n.py,1.2,NONE Message-ID: <200007072135.OAA04727@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/dos-8x3 In directory slayer.i.sourceforge.net:/tmp/cvs-serv4719 Removed Files: rfc822-n.py Log Message: Deleted bogus file. From python-dev@python.org Fri Jul 7 22:57:27 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 7 Jul 2000 14:57:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/dos-8x3 mimepars.py,1.1,NONE Message-ID: <200007072157.OAA06401@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/dos-8x3 In directory slayer.i.sourceforge.net:/tmp/cvs-serv6383 Removed Files: mimepars.py Log Message: delete bogus file From python-dev@python.org Sat Jul 8 01:32:07 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 7 Jul 2000 17:32:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include object.h,2.59,2.60 Message-ID: <200007080032.RAA02254@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv2086/src/Include Modified Files: object.h Log Message: Got RID of redundant coercions in longobject.c (as spotted by Greg Stein -- thanks!). Incidentally removed all the Py_PROTO macros from object.h, as they prevented my editor from magically finding the definitions of the "coercion", "cmpfunc" and "reprfunc" typedefs that were being redundantly applied in longobject.c. Index: object.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/object.h,v retrieving revision 2.59 retrieving revision 2.60 diff -C2 -r2.59 -r2.60 *** object.h 2000/06/30 23:58:04 2.59 --- object.h 2000/07/08 00:32:04 2.60 *************** *** 110,130 **** */ ! typedef PyObject * (*unaryfunc) Py_PROTO((PyObject *)); ! typedef PyObject * (*binaryfunc) Py_PROTO((PyObject *, PyObject *)); ! typedef PyObject * (*ternaryfunc) Py_PROTO((PyObject *, PyObject *, PyObject *)); ! typedef int (*inquiry) Py_PROTO((PyObject *)); ! typedef int (*coercion) Py_PROTO((PyObject **, PyObject **)); ! typedef PyObject *(*intargfunc) Py_PROTO((PyObject *, int)); ! typedef PyObject *(*intintargfunc) Py_PROTO((PyObject *, int, int)); ! typedef int(*intobjargproc) Py_PROTO((PyObject *, int, PyObject *)); ! typedef int(*intintobjargproc) Py_PROTO((PyObject *, int, int, PyObject *)); ! typedef int(*objobjargproc) Py_PROTO((PyObject *, PyObject *, PyObject *)); ! typedef int (*getreadbufferproc) Py_PROTO((PyObject *, int, void **)); ! typedef int (*getwritebufferproc) Py_PROTO((PyObject *, int, void **)); ! typedef int (*getsegcountproc) Py_PROTO((PyObject *, int *)); ! typedef int (*getcharbufferproc) Py_PROTO((PyObject *, int, const char **)); ! typedef int (*objobjproc) Py_PROTO((PyObject *, PyObject *)); ! typedef int (*visitproc) Py_PROTO((PyObject *, void *)); ! typedef int (*traverseproc) Py_PROTO((PyObject *, visitproc, void *)); typedef struct { --- 110,130 ---- */ ! typedef PyObject * (*unaryfunc)(PyObject *); ! typedef PyObject * (*binaryfunc)(PyObject *, PyObject *); ! typedef PyObject * (*ternaryfunc)(PyObject *, PyObject *, PyObject *); ! typedef int (*inquiry)(PyObject *); ! typedef int (*coercion)(PyObject **, PyObject **); ! typedef PyObject *(*intargfunc)(PyObject *, int); ! typedef PyObject *(*intintargfunc)(PyObject *, int, int); ! typedef int(*intobjargproc)(PyObject *, int, PyObject *); ! typedef int(*intintobjargproc)(PyObject *, int, int, PyObject *); ! typedef int(*objobjargproc)(PyObject *, PyObject *, PyObject *); ! typedef int (*getreadbufferproc)(PyObject *, int, void **); ! typedef int (*getwritebufferproc)(PyObject *, int, void **); ! typedef int (*getsegcountproc)(PyObject *, int *); ! typedef int (*getcharbufferproc)(PyObject *, int, const char **); ! typedef int (*objobjproc)(PyObject *, PyObject *); ! typedef int (*visitproc)(PyObject *, void *); ! typedef int (*traverseproc)(PyObject *, visitproc, void *); typedef struct { *************** *** 179,191 **** ! typedef void (*destructor) Py_PROTO((PyObject *)); ! typedef int (*printfunc) Py_PROTO((PyObject *, FILE *, int)); ! typedef PyObject *(*getattrfunc) Py_PROTO((PyObject *, char *)); ! typedef PyObject *(*getattrofunc) Py_PROTO((PyObject *, PyObject *)); ! typedef int (*setattrfunc) Py_PROTO((PyObject *, char *, PyObject *)); ! typedef int (*setattrofunc) Py_PROTO((PyObject *, PyObject *, PyObject *)); ! typedef int (*cmpfunc) Py_PROTO((PyObject *, PyObject *)); ! typedef PyObject *(*reprfunc) Py_PROTO((PyObject *)); ! typedef long (*hashfunc) Py_PROTO((PyObject *)); typedef struct _typeobject { --- 179,191 ---- ! typedef void (*destructor)(PyObject *); ! typedef int (*printfunc)(PyObject *, FILE *, int); ! typedef PyObject *(*getattrfunc)(PyObject *, char *); ! typedef PyObject *(*getattrofunc)(PyObject *, PyObject *); ! typedef int (*setattrfunc)(PyObject *, char *, PyObject *); ! typedef int (*setattrofunc)(PyObject *, PyObject *, PyObject *); ! typedef int (*cmpfunc)(PyObject *, PyObject *); ! typedef PyObject *(*reprfunc)(PyObject *); ! typedef long (*hashfunc)(PyObject *); typedef struct _typeobject { *************** *** 249,272 **** /* Generic operations on objects */ ! extern DL_IMPORT(int) PyObject_Print Py_PROTO((PyObject *, FILE *, int)); ! extern DL_IMPORT(PyObject *) PyObject_Repr Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyObject_Str Py_PROTO((PyObject *)); ! extern DL_IMPORT(int) PyObject_Compare Py_PROTO((PyObject *, PyObject *)); ! extern DL_IMPORT(PyObject *) PyObject_GetAttrString Py_PROTO((PyObject *, char *)); ! extern DL_IMPORT(int) PyObject_SetAttrString Py_PROTO((PyObject *, char *, PyObject *)); ! extern DL_IMPORT(int) PyObject_HasAttrString Py_PROTO((PyObject *, char *)); ! extern DL_IMPORT(PyObject *) PyObject_GetAttr Py_PROTO((PyObject *, PyObject *)); ! extern DL_IMPORT(int) PyObject_SetAttr Py_PROTO((PyObject *, PyObject *, PyObject *)); ! extern DL_IMPORT(int) PyObject_HasAttr Py_PROTO((PyObject *, PyObject *)); ! extern DL_IMPORT(long) PyObject_Hash Py_PROTO((PyObject *)); ! extern DL_IMPORT(int) PyObject_IsTrue Py_PROTO((PyObject *)); ! extern DL_IMPORT(int) PyObject_Not Py_PROTO((PyObject *)); ! extern DL_IMPORT(int) PyCallable_Check Py_PROTO((PyObject *)); ! extern DL_IMPORT(int) PyNumber_Coerce Py_PROTO((PyObject **, PyObject **)); ! extern DL_IMPORT(int) PyNumber_CoerceEx Py_PROTO((PyObject **, PyObject **)); /* Helpers for printing recursive container types */ ! extern DL_IMPORT(int) Py_ReprEnter Py_PROTO((PyObject *)); ! extern DL_IMPORT(void) Py_ReprLeave Py_PROTO((PyObject *)); /* tstate dict key for PyObject_Compare helper */ --- 249,272 ---- /* Generic operations on objects */ ! extern DL_IMPORT(int) PyObject_Print(PyObject *, FILE *, int); ! extern DL_IMPORT(PyObject *) PyObject_Repr(PyObject *); ! extern DL_IMPORT(PyObject *) PyObject_Str(PyObject *); ! extern DL_IMPORT(int) PyObject_Compare(PyObject *, PyObject *); ! extern DL_IMPORT(PyObject *) PyObject_GetAttrString(PyObject *, char *); ! extern DL_IMPORT(int) PyObject_SetAttrString(PyObject *, char *, PyObject *); ! extern DL_IMPORT(int) PyObject_HasAttrString(PyObject *, char *); ! extern DL_IMPORT(PyObject *) PyObject_GetAttr(PyObject *, PyObject *); ! extern DL_IMPORT(int) PyObject_SetAttr(PyObject *, PyObject *, PyObject *); ! extern DL_IMPORT(int) PyObject_HasAttr(PyObject *, PyObject *); ! extern DL_IMPORT(long) PyObject_Hash(PyObject *); ! extern DL_IMPORT(int) PyObject_IsTrue(PyObject *); ! extern DL_IMPORT(int) PyObject_Not(PyObject *); ! extern DL_IMPORT(int) PyCallable_Check(PyObject *); ! extern DL_IMPORT(int) PyNumber_Coerce(PyObject **, PyObject **); ! extern DL_IMPORT(int) PyNumber_CoerceEx(PyObject **, PyObject **); /* Helpers for printing recursive container types */ ! extern DL_IMPORT(int) Py_ReprEnter(PyObject *); ! extern DL_IMPORT(void) Py_ReprLeave(PyObject *); /* tstate dict key for PyObject_Compare helper */ *************** *** 274,279 **** /* Helpers for hash functions */ ! extern DL_IMPORT(long) _Py_HashDouble Py_PROTO((double)); ! extern DL_IMPORT(long) _Py_HashPointer Py_PROTO((void*)); /* Flag bits for printing: */ --- 274,279 ---- /* Helpers for hash functions */ ! extern DL_IMPORT(long) _Py_HashDouble(double); ! extern DL_IMPORT(long) _Py_HashPointer(void*); /* Flag bits for printing: */ *************** *** 356,364 **** #ifdef Py_TRACE_REFS ! extern DL_IMPORT(void) _Py_Dealloc Py_PROTO((PyObject *)); ! extern DL_IMPORT(void) _Py_NewReference Py_PROTO((PyObject *)); ! extern DL_IMPORT(void) _Py_ForgetReference Py_PROTO((PyObject *)); ! extern DL_IMPORT(void) _Py_PrintReferences Py_PROTO((FILE *)); ! extern DL_IMPORT(void) _Py_ResetReferences Py_PROTO((void)); #endif --- 356,364 ---- #ifdef Py_TRACE_REFS ! extern DL_IMPORT(void) _Py_Dealloc(PyObject *); ! extern DL_IMPORT(void) _Py_NewReference(PyObject *); ! extern DL_IMPORT(void) _Py_ForgetReference(PyObject *); ! extern DL_IMPORT(void) _Py_PrintReferences(FILE *); ! extern DL_IMPORT(void) _Py_ResetReferences(void); #endif *************** *** 374,378 **** #ifdef COUNT_ALLOCS ! extern DL_IMPORT(void) inc_count Py_PROTO((PyTypeObject *)); #endif --- 374,378 ---- #ifdef COUNT_ALLOCS ! extern DL_IMPORT(void) inc_count(PyTypeObject *); #endif *************** *** 556,561 **** } \ ! extern DL_IMPORT(void) _PyTrash_deposit_object Py_PROTO((PyObject*)); ! extern DL_IMPORT(void) _PyTrash_destroy_chain Py_PROTO(()); extern DL_IMPORT(int) _PyTrash_delete_nesting; --- 556,561 ---- } \ ! extern DL_IMPORT(void) _PyTrash_deposit_object(PyObject*); ! extern DL_IMPORT(void) _PyTrash_destroy_chain(); extern DL_IMPORT(int) _PyTrash_delete_nesting; From python-dev@python.org Sat Jul 8 01:32:07 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 7 Jul 2000 17:32:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects longobject.c,1.61,1.62 Message-ID: <200007080032.RAA02258@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv2086/src/Objects Modified Files: longobject.c Log Message: Got RID of redundant coercions in longobject.c (as spotted by Greg Stein -- thanks!). Incidentally removed all the Py_PROTO macros from object.h, as they prevented my editor from magically finding the definitions of the "coercion", "cmpfunc" and "reprfunc" typedefs that were being redundantly applied in longobject.c. Index: longobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -r1.61 -r1.62 *** longobject.c 2000/07/07 15:53:28 1.61 --- longobject.c 2000/07/08 00:32:04 1.62 *************** *** 1678,1683 **** (binaryfunc) long_xor, /*nb_xor*/ (binaryfunc) long_or, /*nb_or*/ ! (int (*) (PyObject **, PyObject **)) ! (coercion)long_coerce, /*nb_coerce*/ (unaryfunc) long_int, /*nb_int*/ (unaryfunc) long_long, /*nb_long*/ --- 1678,1682 ---- (binaryfunc) long_xor, /*nb_xor*/ (binaryfunc) long_or, /*nb_or*/ ! (coercion) long_coerce, /*nb_coerce*/ (unaryfunc) long_int, /*nb_int*/ (unaryfunc) long_long, /*nb_long*/ *************** *** 1697,1708 **** 0, /*tp_getattr*/ 0, /*tp_setattr*/ ! (int (*) (PyObject *, PyObject *)) ! (cmpfunc)long_compare, /*tp_compare*/ (reprfunc)long_repr, /*tp_repr*/ &long_as_number, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ ! (long (*) (PyObject *)) ! (hashfunc)long_hash, /*tp_hash*/ 0, /*tp_call*/ (reprfunc)long_str, /*tp_str*/ --- 1696,1705 ---- 0, /*tp_getattr*/ 0, /*tp_setattr*/ ! (cmpfunc)long_compare, /*tp_compare*/ (reprfunc)long_repr, /*tp_repr*/ &long_as_number, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ ! (hashfunc)long_hash, /*tp_hash*/ 0, /*tp_call*/ (reprfunc)long_str, /*tp_str*/ From python-dev@python.org Sat Jul 8 01:46:22 2000 From: python-dev@python.org (Greg Stein) Date: Fri, 7 Jul 2000 17:46:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include object.h,2.60,2.61 Message-ID: <200007080046.RAA02905@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv2891 Modified Files: object.h Log Message: One of the new prototypes was missing the "void" args. Index: object.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/object.h,v retrieving revision 2.60 retrieving revision 2.61 diff -C2 -r2.60 -r2.61 *** object.h 2000/07/08 00:32:04 2.60 --- object.h 2000/07/08 00:46:19 2.61 *************** *** 557,561 **** extern DL_IMPORT(void) _PyTrash_deposit_object(PyObject*); ! extern DL_IMPORT(void) _PyTrash_destroy_chain(); extern DL_IMPORT(int) _PyTrash_delete_nesting; --- 557,561 ---- extern DL_IMPORT(void) _PyTrash_deposit_object(PyObject*); ! extern DL_IMPORT(void) _PyTrash_destroy_chain(void); extern DL_IMPORT(int) _PyTrash_delete_nesting; From python-dev@python.org Sat Jul 8 03:26:50 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 7 Jul 2000 19:26:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects longobject.c,1.62,1.63 Message-ID: <200007080226.TAA20331@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv20303/python/dist/src/Objects Modified Files: longobject.c Log Message: The tail end of x_sub implicitly assumed that an unsigned short contains 16 bits. Not true on Cray J90. Index: longobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -r1.62 -r1.63 *** longobject.c 2000/07/08 00:32:04 1.62 --- longobject.c 2000/07/08 02:26:47 1.63 *************** *** 1049,1052 **** --- 1049,1053 ---- z->ob_digit[i] = borrow & MASK; borrow >>= SHIFT; + borrow &= 1; /* Keep only one sign bit */ } assert(borrow == 0); From python-dev@python.org Sat Jul 8 05:04:41 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 7 Jul 2000 21:04:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _tkinter.c,1.103,1.104 Message-ID: <200007080404.VAA05166@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv5156 Modified Files: _tkinter.c Log Message: Removed Py_PROTO, ANSI-fied sources. Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -r1.103 -r1.104 *** _tkinter.c 2000/06/30 23:50:38 1.103 --- _tkinter.c 2000/07/08 04:04:38 1.104 *************** *** 192,200 **** #include /* For EventRecord */ ! typedef int (*TclMacConvertEventPtr) Py_PROTO((EventRecord *eventPtr)); ! void Tcl_MacSetEventProc Py_PROTO((TclMacConvertEventPtr procPtr)); ! int TkMacConvertEvent Py_PROTO((EventRecord *eventPtr)); ! staticforward int PyMacConvertEvent Py_PROTO((EventRecord *eventPtr)); #if defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__) --- 192,200 ---- #include /* For EventRecord */ ! typedef int (*TclMacConvertEventPtr) (EventRecord *eventPtr); ! void Tcl_MacSetEventProc (TclMacConvertEventPtr procPtr); ! int TkMacConvertEvent (EventRecord *eventPtr); ! staticforward int PyMacConvertEvent (EventRecord *eventPtr); #if defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__) *************** *** 244,249 **** static PyObject * ! Tkinter_Error(v) ! PyObject *v; { PyErr_SetString(Tkinter_TclError, Tkapp_Result(v)); --- 244,248 ---- static PyObject * ! Tkinter_Error(PyObject *v) { PyErr_SetString(Tkinter_TclError, Tkapp_Result(v)); *************** *** 263,268 **** static void ! Sleep(milli) ! int milli; { /* XXX Too bad if you don't have select(). */ --- 262,266 ---- static void ! Sleep(int milli) { /* XXX Too bad if you don't have select(). */ *************** *** 278,284 **** static char * ! AsString(value, tmp) ! PyObject *value; ! PyObject *tmp; { if (PyString_Check(value)) --- 276,280 ---- static char * ! AsString(PyObject *value, PyObject *tmp) { if (PyString_Check(value)) *************** *** 297,302 **** static char * ! Merge(args) ! PyObject *args; { PyObject *tmp = NULL; --- 293,297 ---- static char * ! Merge(PyObject *args) { PyObject *tmp = NULL; *************** *** 370,375 **** static PyObject * ! Split(list) ! char *list; { int argc; --- 365,369 ---- static PyObject * ! Split(char *list) { int argc; *************** *** 417,422 **** #ifndef WITH_APPINIT int ! Tcl_AppInit(interp) ! Tcl_Interp *interp; { Tk_Window main; --- 411,415 ---- #ifndef WITH_APPINIT int ! Tcl_AppInit(Tcl_Interp *interp) { Tk_Window main; *************** *** 446,454 **** static TkappObject * ! Tkapp_New(screenName, baseName, className, interactive) ! char *screenName; ! char *baseName; ! char *className; ! int interactive; { TkappObject *v; --- 439,443 ---- static TkappObject * ! Tkapp_New(char *screenName, char *baseName, char *className, int interactive) { TkappObject *v; *************** *** 511,516 **** static Tcl_Obj* ! AsObj(value) ! PyObject *value; { Tcl_Obj *result; --- 500,504 ---- static Tcl_Obj* ! AsObj(PyObject *value) { Tcl_Obj *result; *************** *** 568,574 **** static PyObject * ! Tkapp_Call(self, args) ! PyObject *self; ! PyObject *args; { Tcl_Obj *objStore[ARGSZ]; --- 556,560 ---- static PyObject * ! Tkapp_Call(PyObject *self, PyObject *args) { Tcl_Obj *objStore[ARGSZ]; *************** *** 661,667 **** static PyObject * ! Tkapp_Call(self, args) ! PyObject *self; ! PyObject *args; { /* This is copied from Merge() */ --- 647,651 ---- static PyObject * ! Tkapp_Call(PyObject *self, PyObject *args) { /* This is copied from Merge() */ *************** *** 776,782 **** static PyObject * ! Tkapp_GlobalCall(self, args) ! PyObject *self; ! PyObject *args; { /* Could do the same here as for Tkapp_Call(), but this is not used --- 760,764 ---- static PyObject * ! Tkapp_GlobalCall(PyObject *self, PyObject *args) { /* Could do the same here as for Tkapp_Call(), but this is not used *************** *** 812,818 **** static PyObject * ! Tkapp_Eval(self, args) ! PyObject *self; ! PyObject *args; { char *script; --- 794,798 ---- static PyObject * ! Tkapp_Eval(PyObject *self, PyObject *args) { char *script; *************** *** 835,841 **** static PyObject * ! Tkapp_GlobalEval(self, args) ! PyObject *self; ! PyObject *args; { char *script; --- 815,819 ---- static PyObject * ! Tkapp_GlobalEval(PyObject *self, PyObject *args) { char *script; *************** *** 858,864 **** static PyObject * ! Tkapp_EvalFile(self, args) ! PyObject *self; ! PyObject *args; { char *fileName; --- 836,840 ---- static PyObject * ! Tkapp_EvalFile(PyObject *self, PyObject *args) { char *fileName; *************** *** 882,888 **** static PyObject * ! Tkapp_Record(self, args) ! PyObject *self; ! PyObject *args; { char *script; --- 858,862 ---- static PyObject * ! Tkapp_Record(PyObject *self, PyObject *args) { char *script; *************** *** 905,911 **** static PyObject * ! Tkapp_AddErrorInfo(self, args) ! PyObject *self; ! PyObject *args; { char *msg; --- 879,883 ---- static PyObject * ! Tkapp_AddErrorInfo(PyObject *self, PyObject *args) { char *msg; *************** *** 926,933 **** static PyObject * ! SetVar(self, args, flags) ! PyObject *self; ! PyObject *args; ! int flags; { char *name1, *name2, *ok, *s; --- 898,902 ---- static PyObject * ! SetVar(PyObject *self, PyObject *args, int flags) { char *name1, *name2, *ok, *s; *************** *** 970,976 **** static PyObject * ! Tkapp_SetVar(self, args) ! PyObject *self; ! PyObject *args; { return SetVar(self, args, TCL_LEAVE_ERR_MSG); --- 939,943 ---- static PyObject * ! Tkapp_SetVar(PyObject *self, PyObject *args) { return SetVar(self, args, TCL_LEAVE_ERR_MSG); *************** *** 978,984 **** static PyObject * ! Tkapp_GlobalSetVar(self, args) ! PyObject *self; ! PyObject *args; { return SetVar(self, args, TCL_LEAVE_ERR_MSG | TCL_GLOBAL_ONLY); --- 945,949 ---- static PyObject * ! Tkapp_GlobalSetVar(PyObject *self, PyObject *args) { return SetVar(self, args, TCL_LEAVE_ERR_MSG | TCL_GLOBAL_ONLY); *************** *** 988,995 **** static PyObject * ! GetVar(self, args, flags) ! PyObject *self; ! PyObject *args; ! int flags; { char *name1, *name2=NULL, *s; --- 953,957 ---- static PyObject * ! GetVar(PyObject *self, PyObject *args, int flags) { char *name1, *name2=NULL, *s; *************** *** 1015,1021 **** static PyObject * ! Tkapp_GetVar(self, args) ! PyObject *self; ! PyObject *args; { return GetVar(self, args, TCL_LEAVE_ERR_MSG); --- 977,981 ---- static PyObject * ! Tkapp_GetVar(PyObject *self, PyObject *args) { return GetVar(self, args, TCL_LEAVE_ERR_MSG); *************** *** 1023,1029 **** static PyObject * ! Tkapp_GlobalGetVar(self, args) ! PyObject *self; ! PyObject *args; { return GetVar(self, args, TCL_LEAVE_ERR_MSG | TCL_GLOBAL_ONLY); --- 983,987 ---- static PyObject * ! Tkapp_GlobalGetVar(PyObject *self, PyObject *args) { return GetVar(self, args, TCL_LEAVE_ERR_MSG | TCL_GLOBAL_ONLY); *************** *** 1033,1040 **** static PyObject * ! UnsetVar(self, args, flags) ! PyObject *self; ! PyObject *args; ! int flags; { char *name1, *name2=NULL; --- 991,995 ---- static PyObject * ! UnsetVar(PyObject *self, PyObject *args, int flags) { char *name1, *name2=NULL; *************** *** 1063,1069 **** static PyObject * ! Tkapp_UnsetVar(self, args) ! PyObject *self; ! PyObject *args; { return UnsetVar(self, args, TCL_LEAVE_ERR_MSG); --- 1018,1022 ---- static PyObject * ! Tkapp_UnsetVar(PyObject *self, PyObject *args) { return UnsetVar(self, args, TCL_LEAVE_ERR_MSG); *************** *** 1071,1077 **** static PyObject * ! Tkapp_GlobalUnsetVar(self, args) ! PyObject *self; ! PyObject *args; { return UnsetVar(self, args, TCL_LEAVE_ERR_MSG | TCL_GLOBAL_ONLY); --- 1024,1028 ---- static PyObject * ! Tkapp_GlobalUnsetVar(PyObject *self, PyObject *args) { return UnsetVar(self, args, TCL_LEAVE_ERR_MSG | TCL_GLOBAL_ONLY); *************** *** 1083,1089 **** static PyObject * ! Tkapp_GetInt(self, args) ! PyObject *self; ! PyObject *args; { char *s; --- 1034,1038 ---- static PyObject * ! Tkapp_GetInt(PyObject *self, PyObject *args) { char *s; *************** *** 1098,1104 **** static PyObject * ! Tkapp_GetDouble(self, args) ! PyObject *self; ! PyObject *args; { char *s; --- 1047,1051 ---- static PyObject * ! Tkapp_GetDouble(PyObject *self, PyObject *args) { char *s; *************** *** 1113,1119 **** static PyObject * ! Tkapp_GetBoolean(self, args) ! PyObject *self; ! PyObject *args; { char *s; --- 1060,1064 ---- static PyObject * ! Tkapp_GetBoolean(PyObject *self, PyObject *args) { char *s; *************** *** 1128,1134 **** static PyObject * ! Tkapp_ExprString(self, args) ! PyObject *self; ! PyObject *args; { char *s; --- 1073,1077 ---- static PyObject * ! Tkapp_ExprString(PyObject *self, PyObject *args) { char *s; *************** *** 1150,1156 **** static PyObject * ! Tkapp_ExprLong(self, args) ! PyObject *self; ! PyObject *args; { char *s; --- 1093,1097 ---- static PyObject * ! Tkapp_ExprLong(PyObject *self, PyObject *args) { char *s; *************** *** 1173,1179 **** static PyObject * ! Tkapp_ExprDouble(self, args) ! PyObject *self; ! PyObject *args; { char *s; --- 1114,1118 ---- static PyObject * ! Tkapp_ExprDouble(PyObject *self, PyObject *args) { char *s; *************** *** 1198,1204 **** static PyObject * ! Tkapp_ExprBoolean(self, args) ! PyObject *self; ! PyObject *args; { char *s; --- 1137,1141 ---- static PyObject * ! Tkapp_ExprBoolean(PyObject *self, PyObject *args) { char *s; *************** *** 1223,1229 **** static PyObject * ! Tkapp_SplitList(self, args) ! PyObject *self; ! PyObject *args; { char *list; --- 1160,1164 ---- static PyObject * ! Tkapp_SplitList(PyObject *self, PyObject *args) { char *list; *************** *** 1257,1263 **** static PyObject * ! Tkapp_Split(self, args) ! PyObject *self; ! PyObject *args; { char *list; --- 1192,1196 ---- static PyObject * ! Tkapp_Split(PyObject *self, PyObject *args) { char *list; *************** *** 1269,1275 **** static PyObject * ! Tkapp_Merge(self, args) ! PyObject *self; ! PyObject *args; { char *s = Merge(args); --- 1202,1206 ---- static PyObject * ! Tkapp_Merge(PyObject *self, PyObject *args) { char *s = Merge(args); *************** *** 1297,1302 **** static int ! PythonCmd_Error(interp) ! Tcl_Interp *interp; { errorInCmd = 1; --- 1228,1232 ---- static int ! PythonCmd_Error(Tcl_Interp *interp) { errorInCmd = 1; *************** *** 1310,1318 **** */ static int ! PythonCmd(clientData, interp, argc, argv) ! ClientData clientData; ! Tcl_Interp *interp; ! int argc; ! char *argv[]; { PythonCmd_ClientData *data = (PythonCmd_ClientData *)clientData; --- 1240,1244 ---- */ static int ! PythonCmd(ClientData clientData, Tcl_Interp *interp, int argc, char *argv[]) { PythonCmd_ClientData *data = (PythonCmd_ClientData *)clientData; *************** *** 1360,1365 **** static void ! PythonCmdDelete(clientData) ! ClientData clientData; { PythonCmd_ClientData *data = (PythonCmd_ClientData *)clientData; --- 1286,1290 ---- static void ! PythonCmdDelete(ClientData clientData) { PythonCmd_ClientData *data = (PythonCmd_ClientData *)clientData; *************** *** 1375,1381 **** static PyObject * ! Tkapp_CreateCommand(self, args) ! PyObject *self; ! PyObject *args; { PythonCmd_ClientData *data; --- 1300,1304 ---- static PyObject * ! Tkapp_CreateCommand(PyObject *self, PyObject *args) { PythonCmd_ClientData *data; *************** *** 1416,1422 **** static PyObject * ! Tkapp_DeleteCommand(self, args) ! PyObject *self; ! PyObject *args; { char *cmdName; --- 1339,1343 ---- static PyObject * ! Tkapp_DeleteCommand(PyObject *self, PyObject *args) { char *cmdName; *************** *** 1451,1458 **** static FileHandler_ClientData * ! NewFHCD(func, file, id) ! PyObject *func; ! PyObject *file; ! int id; { FileHandler_ClientData *p; --- 1372,1376 ---- static FileHandler_ClientData * ! NewFHCD(PyObject *func, PyObject *file, int id) { FileHandler_ClientData *p; *************** *** 1471,1476 **** static void ! DeleteFHCD(id) ! int id; { FileHandler_ClientData *p, **pp; --- 1389,1393 ---- static void ! DeleteFHCD(int id) { FileHandler_ClientData *p, **pp; *************** *** 1490,1496 **** static void ! FileHandler(clientData, mask) ! ClientData clientData; ! int mask; { FileHandler_ClientData *data = (FileHandler_ClientData *)clientData; --- 1407,1411 ---- static void ! FileHandler(ClientData clientData, int mask) { FileHandler_ClientData *data = (FileHandler_ClientData *)clientData; *************** *** 1514,1522 **** static int ! GetFileNo(file) /* Either an int >= 0 or an object with a *.fileno() method that returns an int >= 0 */ - PyObject *file; { PyObject *meth, *args, *res; --- 1429,1436 ---- static int ! GetFileNo(PyObject *file) /* Either an int >= 0 or an object with a *.fileno() method that returns an int >= 0 */ { PyObject *meth, *args, *res; *************** *** 1557,1563 **** static PyObject * ! Tkapp_CreateFileHandler(self, args) ! PyObject *self; ! PyObject *args; /* Is (file, mask, func) */ { FileHandler_ClientData *data; --- 1471,1476 ---- static PyObject * ! Tkapp_CreateFileHandler(PyObject *self, PyObject *args) ! /* args is (file, mask, func) */ { FileHandler_ClientData *data; *************** *** 1588,1594 **** static PyObject * ! Tkapp_DeleteFileHandler(self, args) ! PyObject *self; ! PyObject *args; /* Args: file */ { PyObject *file; --- 1501,1505 ---- static PyObject * ! Tkapp_DeleteFileHandler(PyObject *self, PyObject *args) { PyObject *file; *************** *** 1625,1631 **** static PyObject * ! Tktt_DeleteTimerHandler(self, args) ! PyObject *self; ! PyObject *args; { TkttObject *v = (TkttObject *)self; --- 1536,1540 ---- static PyObject * ! Tktt_DeleteTimerHandler(PyObject *self, PyObject *args) { TkttObject *v = (TkttObject *)self; *************** *** 1654,1659 **** static TkttObject * ! Tktt_New(func) ! PyObject *func; { TkttObject *v; --- 1563,1567 ---- static TkttObject * ! Tktt_New(PyObject *func) { TkttObject *v; *************** *** 1673,1678 **** static void ! Tktt_Dealloc(self) ! PyObject *self; { TkttObject *v = (TkttObject *)self; --- 1581,1585 ---- static void ! Tktt_Dealloc(PyObject *self) { TkttObject *v = (TkttObject *)self; *************** *** 1685,1690 **** static PyObject * ! Tktt_Repr(self) ! PyObject *self; { TkttObject *v = (TkttObject *)self; --- 1592,1596 ---- static PyObject * ! Tktt_Repr(PyObject *self) { TkttObject *v = (TkttObject *)self; *************** *** 1697,1703 **** static PyObject * ! Tktt_GetAttr(self, name) ! PyObject *self; ! char *name; { return Py_FindMethod(Tktt_methods, self, name); --- 1603,1607 ---- static PyObject * ! Tktt_GetAttr(PyObject *self, char *name) { return Py_FindMethod(Tktt_methods, self, name); *************** *** 1728,1733 **** static void ! TimerHandler(clientData) ! ClientData clientData; { TkttObject *v = (TkttObject *)clientData; --- 1632,1636 ---- static void ! TimerHandler(ClientData clientData) { TkttObject *v = (TkttObject *)clientData; *************** *** 1757,1763 **** static PyObject * ! Tkapp_CreateTimerHandler(self, args) ! PyObject *self; ! PyObject *args; /* Is (milliseconds, func) */ { int milliseconds; --- 1660,1664 ---- static PyObject * ! Tkapp_CreateTimerHandler(PyObject *self, PyObject *args) { int milliseconds; *************** *** 1782,1788 **** static PyObject * ! Tkapp_MainLoop(self, args) ! PyObject *self; ! PyObject *args; { int threshold = 0; --- 1683,1687 ---- static PyObject * ! Tkapp_MainLoop(PyObject *self, PyObject *args) { int threshold = 0; *************** *** 1833,1839 **** static PyObject * ! Tkapp_DoOneEvent(self, args) ! PyObject *self; ! PyObject *args; { int flags = 0; --- 1732,1736 ---- static PyObject * ! Tkapp_DoOneEvent(PyObject *self, PyObject *args) { int flags = 0; *************** *** 1850,1856 **** static PyObject * ! Tkapp_Quit(self, args) ! PyObject *self; ! PyObject *args; { --- 1747,1751 ---- static PyObject * ! Tkapp_Quit(PyObject *self, PyObject *args) { *************** *** 1864,1870 **** static PyObject * ! Tkapp_InterpAddr(self, args) ! PyObject *self; ! PyObject *args; { --- 1759,1763 ---- static PyObject * ! Tkapp_InterpAddr(PyObject *self, PyObject *args) { *************** *** 1923,1928 **** static void ! Tkapp_Dealloc(self) ! PyObject *self; { ENTER_TCL --- 1816,1820 ---- static void ! Tkapp_Dealloc(PyObject *self) { ENTER_TCL *************** *** 1934,1940 **** static PyObject * ! Tkapp_GetAttr(self, name) ! PyObject *self; ! char *name; { return Py_FindMethod(Tkapp_methods, self, name); --- 1826,1830 ---- static PyObject * ! Tkapp_GetAttr(PyObject *self, char *name) { return Py_FindMethod(Tkapp_methods, self, name); *************** *** 2113,2119 **** #ifndef MS_WINDOWS static void ! MyFileProc(clientData, mask) ! void *clientData; ! int mask; { stdin_ready = 1; --- 2003,2007 ---- #ifndef MS_WINDOWS static void ! MyFileProc(void *clientData, int mask) { stdin_ready = 1; *************** *** 2208,2215 **** /* all errors will be checked in one fell swoop in init_tkinter() */ static void ! ins_long(d, name, val) ! PyObject *d; ! char *name; ! long val; { PyObject *v = PyInt_FromLong(val); --- 2096,2100 ---- /* all errors will be checked in one fell swoop in init_tkinter() */ static void ! ins_long(PyObject *d, char *name, long val) { PyObject *v = PyInt_FromLong(val); *************** *** 2220,2227 **** } static void ! ins_string(d, name, val) ! PyObject *d; ! char *name; ! char *val; { PyObject *v = PyString_FromString(val); --- 2105,2109 ---- } static void ! ins_string(PyObject *d, char *name, char *val) { PyObject *v = PyString_FromString(val); *************** *** 2324,2329 **** static int ! PyMacConvertEvent(eventPtr) ! EventRecord *eventPtr; { WindowPtr frontwin; --- 2206,2210 ---- static int ! PyMacConvertEvent(EventRecord *eventPtr) { WindowPtr frontwin; From python-dev@python.org Sat Jul 8 05:12:11 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 7 Jul 2000 21:12:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules operator.c,2.13,2.14 Message-ID: <200007080412.VAA05563@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv5553 Modified Files: operator.c Log Message: ANSI-fy the sources. Index: operator.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/operator.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** operator.c 1998/12/04 18:49:56 2.13 --- operator.c 2000/07/08 04:12:08 2.14 *************** *** 70,89 **** #include "Python.h" ! #define spam1(OP,AOP) static PyObject *OP(s,a) PyObject *s, *a; { \ PyObject *a1; \ if(! PyArg_ParseTuple(a,"O",&a1)) return NULL; \ return AOP(a1); } ! #define spam2(OP,AOP) static PyObject *OP(s,a) PyObject *s, *a; { \ PyObject *a1, *a2; \ if(! PyArg_ParseTuple(a,"OO",&a1,&a2)) return NULL; \ return AOP(a1,a2); } ! #define spamoi(OP,AOP) static PyObject *OP(s,a) PyObject *s, *a; { \ PyObject *a1; int a2; \ if(! PyArg_ParseTuple(a,"Oi",&a1,&a2)) return NULL; \ return AOP(a1,a2); } ! #define spam2n(OP,AOP) static PyObject *OP(s,a) PyObject *s, *a; { \ PyObject *a1, *a2; \ if(! PyArg_ParseTuple(a,"OO",&a1,&a2)) return NULL; \ --- 70,89 ---- #include "Python.h" ! #define spam1(OP,AOP) static PyObject *OP(PyObject *s, PyObject *a) { \ PyObject *a1; \ if(! PyArg_ParseTuple(a,"O",&a1)) return NULL; \ return AOP(a1); } ! #define spam2(OP,AOP) static PyObject *OP(PyObject *s, PyObject *a) { \ PyObject *a1, *a2; \ if(! PyArg_ParseTuple(a,"OO",&a1,&a2)) return NULL; \ return AOP(a1,a2); } ! #define spamoi(OP,AOP) static PyObject *OP(PyObject *s, PyObject *a) { \ PyObject *a1; int a2; \ if(! PyArg_ParseTuple(a,"Oi",&a1,&a2)) return NULL; \ return AOP(a1,a2); } ! #define spam2n(OP,AOP) static PyObject *OP(PyObject *s, PyObject *a) { \ PyObject *a1, *a2; \ if(! PyArg_ParseTuple(a,"OO",&a1,&a2)) return NULL; \ *************** *** 92,96 **** return Py_None; } ! #define spam3n(OP,AOP) static PyObject *OP(s,a) PyObject *s, *a; { \ PyObject *a1, *a2, *a3; \ if(! PyArg_ParseTuple(a,"OOO",&a1,&a2,&a3)) return NULL; \ --- 92,96 ---- return Py_None; } ! #define spam3n(OP,AOP) static PyObject *OP(PyObject *s, PyObject *a) { \ PyObject *a1, *a2, *a3; \ if(! PyArg_ParseTuple(a,"OOO",&a1,&a2,&a3)) return NULL; \ *************** *** 99,103 **** return Py_None; } ! #define spami(OP,AOP) static PyObject *OP(s,a) PyObject *s, *a; { \ PyObject *a1; long r; \ if(! PyArg_ParseTuple(a,"O",&a1)) return NULL; \ --- 99,103 ---- return Py_None; } ! #define spami(OP,AOP) static PyObject *OP(PyObject *s, PyObject *a) { \ PyObject *a1; long r; \ if(! PyArg_ParseTuple(a,"O",&a1)) return NULL; \ *************** *** 105,109 **** return PyInt_FromLong(r); } ! #define spami2(OP,AOP) static PyObject *OP(s,a) PyObject *s, *a; { \ PyObject *a1, *a2; long r; \ if(! PyArg_ParseTuple(a,"OO",&a1,&a2)) return NULL; \ --- 105,109 ---- return PyInt_FromLong(r); } ! #define spami2(OP,AOP) static PyObject *OP(PyObject *s, PyObject *a) { \ PyObject *a1, *a2; long r; \ if(! PyArg_ParseTuple(a,"OO",&a1,&a2)) return NULL; \ *************** *** 141,146 **** static PyObject* ! op_getslice(s,a) ! PyObject *s, *a; { PyObject *a1; --- 141,145 ---- static PyObject* ! op_getslice(PyObject *s, PyObject *a) { PyObject *a1; *************** *** 153,158 **** static PyObject* ! op_setslice(s,a) ! PyObject *s, *a; { PyObject *a1, *a4; --- 152,156 ---- static PyObject* ! op_setslice(PyObject *s, PyObject *a) { PyObject *a1, *a4; *************** *** 170,175 **** static PyObject* ! op_delslice(s,a) ! PyObject *s, *a; { PyObject *a1; --- 168,172 ---- static PyObject* ! op_delslice(PyObject *s, PyObject *a) { PyObject *a1; *************** *** 189,199 **** #undef spam2 #ifdef HAVE_OLD_CPP ! #define spam1(OP,DOC) {"OP", OP, 1, DOC}, ! #define spam2(OP,ALTOP,DOC) {"OP", op_/**/OP, 1, DOC}, \ ! {"ALTOP", op_/**/OP, 1, DOC}, #else ! #define spam1(OP,DOC) {#OP, OP, 1, DOC}, ! #define spam2(OP,ALTOP,DOC) {#OP, op_##OP, 1, DOC}, \ ! {#ALTOP, op_##OP, 1, DOC}, #endif --- 186,196 ---- #undef spam2 #ifdef HAVE_OLD_CPP ! #define spam1(OP,DOC) {"OP", OP, METH_VARARGS, DOC}, ! #define spam2(OP,ALTOP,DOC) {"OP", op_/**/OP, METH_VARARGS, DOC}, \ ! {"ALTOP", op_/**/OP, METH_VARARGS, DOC}, #else ! #define spam1(OP,DOC) {#OP, OP, METH_VARARGS, DOC}, ! #define spam2(OP,ALTOP,DOC) {#OP, op_##OP, METH_VARARGS, DOC}, \ ! {#ALTOP, op_##OP, METH_VARARGS, DOC}, #endif From python-dev@python.org Sat Jul 8 05:17:24 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 7 Jul 2000 21:17:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include pyport.h,NONE,2.1 Python.h,2.21,2.22 longintrepr.h,2.8,2.9 Message-ID: <200007080417.VAA05755@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv5529/src/Include Modified Files: Python.h longintrepr.h Added Files: pyport.h Log Message: Cray J90 fixes for long ints. This was a convenient excuse to create the pyport.h file recently discussed! Please use new Py_ARITHMETIC_RIGHT_SHIFT when right-shifting a signed int and you *need* sign-extension. This is #define'd in pyport.h, keying off new config symbol SIGNED_RIGHT_SHIFT_ZERO_FILLS. If you're running on a platform that needs that symbol #define'd, the std tests never would have worked for you (in particular, at least test_long would have failed). The autoconfig stuff got added to Python after my Unix days, so I don't know how that works. Would someone please look into doing & testing an auto-config of the SIGNED_RIGHT_SHIFT_ZERO_FILLS symbol? It needs to be defined if & only if, e.g., (-1) >> 3 is not -1. --- NEW FILE --- /*********************************************************** Copyright (c) 2000, BeOpen.com. All rights reserved. See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ #ifndef Py_PYPORT_H #define Py_PYPORT_H 1 /************************************************************************** Symbols and macros to supply platform-independent interfaces to basic C-language operations whose spellings vary across platforms. Please try to make documentation here as clear as possible: by definition, the stuff here is trying to illuminate C's darkest corners. Config #defines referenced here: SIGNED_RIGHT_SHIFT_ZERO_FILLS Meaning: To be defined iff i>>j does not extend the sign bit when i is a signed integral type and i < 0. Used in: Py_ARITHMETIC_RIGHT_SHIFT **************************************************************************/ #ifdef __cplusplus extern "C" { #endif /* Py_ARITHMETIC_RIGHT_SHIFT * C doesn't define whether a right-shift of a signed integer sign-extends * or zero-fills. Here a macro to force sign extension: * Py_ARITHMETIC_RIGHT_SHIFT(TYPE, I, J) * Return I >> J, forcing sign extension. * Requirements: * I is of basic signed type TYPE (char, short, int, long, or long long). * TYPE is one of char, short, int, long, or long long, although long long * must not be used except on platforms that support it. * J is an integer >= 0 and strictly less than the number of bits in TYPE * (because C doesn't define what happens for J outside that range either). * Caution: * I may be evaluated more than once. */ #ifdef SIGNED_RIGHT_SHIFT_ZERO_FILLS #define Py_ARITHMETIC_RIGHT_SHIFT(TYPE, I, J) \ ((I) < 0 ? ~((~(unsigned TYPE)(I)) >> (J)) : (I) >> (J)) #else #define Py_ARITHMETIC_RIGHT_SHIFT(TYPE, I, J) ((I) >> (J)) #endif #ifdef __cplusplus } #endif #endif /* Py_PYPORT_H */ Index: Python.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** Python.h 2000/07/07 11:24:49 2.21 --- Python.h 2000/07/08 04:17:21 2.22 *************** *** 32,35 **** --- 32,36 ---- #include "patchlevel.h" #include "config.h" + #include "pyport.h" /* config.h may or may not define DL_IMPORT */ Index: longintrepr.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/longintrepr.h,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** longintrepr.h 2000/07/07 15:53:28 2.8 --- longintrepr.h 2000/07/08 04:17:21 2.9 *************** *** 19,23 **** /* Parameters of the long integer representation. These shouldn't have to be changed as C should guarantee that a short ! contains at least 16 bits, but it's made changeable any way. Note: 'digit' should be able to hold 2*MASK+1, and 'twodigits' should be able to hold the intermediate results in 'mul' --- 19,23 ---- /* Parameters of the long integer representation. These shouldn't have to be changed as C should guarantee that a short ! contains at least 16 bits, but it's made changeable anyway. Note: 'digit' should be able to hold 2*MASK+1, and 'twodigits' should be able to hold the intermediate results in 'mul' *************** *** 29,34 **** typedef unsigned short digit; typedef unsigned int wdigit; /* digit widened to parameter size */ ! typedef unsigned long twodigits; ! typedef long stwodigits; /* signed variant of twodigits */ #define SHIFT 15 --- 29,35 ---- typedef unsigned short digit; typedef unsigned int wdigit; /* digit widened to parameter size */ ! #define BASE_TWODIGITS_TYPE long ! typedef unsigned BASE_TWODIGITS_TYPE twodigits; ! typedef BASE_TWODIGITS_TYPE stwodigits; /* signed variant of twodigits */ #define SHIFT 15 From python-dev@python.org Sat Jul 8 05:17:24 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 7 Jul 2000 21:17:24 -0700 Subject: [Python-checkins] CVS: python/dist/src acconfig.h,1.31,1.32 Message-ID: <200007080417.VAA05746@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv5529/src Modified Files: acconfig.h Log Message: Cray J90 fixes for long ints. This was a convenient excuse to create the pyport.h file recently discussed! Please use new Py_ARITHMETIC_RIGHT_SHIFT when right-shifting a signed int and you *need* sign-extension. This is #define'd in pyport.h, keying off new config symbol SIGNED_RIGHT_SHIFT_ZERO_FILLS. If you're running on a platform that needs that symbol #define'd, the std tests never would have worked for you (in particular, at least test_long would have failed). The autoconfig stuff got added to Python after my Unix days, so I don't know how that works. Would someone please look into doing & testing an auto-config of the SIGNED_RIGHT_SHIFT_ZERO_FILLS symbol? It needs to be defined if & only if, e.g., (-1) >> 3 is not -1. Index: acconfig.h =================================================================== RCS file: /cvsroot/python/python/dist/src/acconfig.h,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** acconfig.h 2000/06/30 16:02:24 1.31 --- acconfig.h 2000/07/08 04:17:21 1.32 *************** *** 170,173 **** --- 170,178 ---- #undef HAVE_DYNAMIC_LOADING + /* Define if i>>j for signed int i does not extend the sign bit + when i < 0 + */ + #undef SIGNED_RIGHT_SHIFT_ZERO_FILLS + /* Leave that blank line there-- autoheader needs it! */ From python-dev@python.org Sat Jul 8 05:17:24 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 7 Jul 2000 21:17:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects intobject.c,2.45,2.46 longobject.c,1.63,1.64 Message-ID: <200007080417.VAA05756@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv5529/src/Objects Modified Files: intobject.c longobject.c Log Message: Cray J90 fixes for long ints. This was a convenient excuse to create the pyport.h file recently discussed! Please use new Py_ARITHMETIC_RIGHT_SHIFT when right-shifting a signed int and you *need* sign-extension. This is #define'd in pyport.h, keying off new config symbol SIGNED_RIGHT_SHIFT_ZERO_FILLS. If you're running on a platform that needs that symbol #define'd, the std tests never would have worked for you (in particular, at least test_long would have failed). The autoconfig stuff got added to Python after my Unix days, so I don't know how that works. Would someone please look into doing & testing an auto-config of the SIGNED_RIGHT_SHIFT_ZERO_FILLS symbol? It needs to be defined if & only if, e.g., (-1) >> 3 is not -1. Index: intobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/intobject.c,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** intobject.c 2000/06/30 23:58:05 2.45 --- intobject.c 2000/07/08 04:17:21 2.46 *************** *** 722,729 **** } else { ! if (a < 0) ! a = ~( ~(unsigned long)a >> b ); ! else ! a = (unsigned long)a >> b; } return PyInt_FromLong(a); --- 722,726 ---- } else { ! a = Py_ARITHMETIC_RIGHT_SHIFT(long, a, b); } return PyInt_FromLong(a); Index: longobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -r1.63 -r1.64 *** longobject.c 2000/07/08 02:26:47 1.63 --- longobject.c 2000/07/08 04:17:21 1.64 *************** *** 572,576 **** int basebits = 1; i = base; ! while ((i >>= 1) > 1) ++basebits; i = 0; --- 572,577 ---- int basebits = 1; i = base; ! while ((i >>= 1) > 1) ! ++basebits; i = 0; *************** *** 854,858 **** + ((twodigits)zz << SHIFT); v->ob_digit[i+k] = carry & MASK; ! carry = (carry >> SHIFT) - zz; } --- 855,861 ---- + ((twodigits)zz << SHIFT); v->ob_digit[i+k] = carry & MASK; ! carry = Py_ARITHMETIC_RIGHT_SHIFT(BASE_TWODIGITS_TYPE, ! carry, SHIFT); ! carry -= zz; } *************** *** 871,875 **** carry += v->ob_digit[i+k] + w->ob_digit[i]; v->ob_digit[i+k] = carry & MASK; ! carry >>= SHIFT; } } --- 874,880 ---- carry += v->ob_digit[i+k] + w->ob_digit[i]; v->ob_digit[i+k] = carry & MASK; ! carry = Py_ARITHMETIC_RIGHT_SHIFT( ! BASE_TWODIGITS_TYPE, ! carry, SHIFT); } } *************** *** 989,994 **** carry += a->ob_digit[i] + b->ob_digit[i]; z->ob_digit[i] = carry & MASK; - /* The following assumes unsigned shifts don't - propagate the sign bit. */ carry >>= SHIFT; } --- 994,997 ---- From python-dev@python.org Sat Jul 8 05:53:50 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 7 Jul 2000 21:53:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules operator.c,2.14,2.15 Message-ID: <200007080453.VAA06971@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6964 Modified Files: operator.c Log Message: Pretensions of the 20th century... remove old-style preprocessor hackery (/**/), leaving only new-style preprocessor hackery (##). Index: operator.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/operator.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** operator.c 2000/07/08 04:12:08 2.14 --- operator.c 2000/07/08 04:53:48 2.15 *************** *** 185,197 **** #undef spam1 #undef spam2 - #ifdef HAVE_OLD_CPP - #define spam1(OP,DOC) {"OP", OP, METH_VARARGS, DOC}, - #define spam2(OP,ALTOP,DOC) {"OP", op_/**/OP, METH_VARARGS, DOC}, \ - {"ALTOP", op_/**/OP, METH_VARARGS, DOC}, - #else #define spam1(OP,DOC) {#OP, OP, METH_VARARGS, DOC}, #define spam2(OP,ALTOP,DOC) {#OP, op_##OP, METH_VARARGS, DOC}, \ {#ALTOP, op_##OP, METH_VARARGS, DOC}, - #endif static struct PyMethodDef operator_methods[] = { --- 185,191 ---- From python-dev@python.org Sat Jul 8 06:00:10 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 7 Jul 2000 22:00:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules gdbmmodule.c,2.24,2.25 Message-ID: <200007080500.WAA07620@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv7465 Modified Files: gdbmmodule.c Log Message: ANSI-fy the sources. Convert to using PyArg_ParseTuple() as appropriate to allow method names in error messages. Re-indent to four-space indentation. Index: gdbmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gdbmmodule.c,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -r2.24 -r2.25 *** gdbmmodule.c 2000/06/30 23:58:05 2.24 --- gdbmmodule.c 2000/07/08 05:00:07 2.25 *************** *** 39,45 **** typedef struct { ! PyObject_HEAD ! int di_size; /* -1 means recompute */ ! GDBM_FILE di_dbm; } dbmobject; --- 39,45 ---- typedef struct { ! PyObject_HEAD ! int di_size; /* -1 means recompute */ ! GDBM_FILE di_dbm; } dbmobject; *************** *** 48,53 **** #define is_dbmobject(v) ((v)->ob_type == &Dbmtype) #define check_dbmobject_open(v) if ((v)->di_dbm == NULL) \ ! { PyErr_SetString(DbmError, "GDBM object has already been closed"); \ ! return NULL; } --- 48,53 ---- #define is_dbmobject(v) ((v)->ob_type == &Dbmtype) #define check_dbmobject_open(v) if ((v)->di_dbm == NULL) \ ! { PyErr_SetString(DbmError, "GDBM object has already been closed"); \ ! return NULL; } *************** *** 66,90 **** static PyObject * ! newdbmobject(file, flags, mode) ! char *file; ! int flags; ! int mode; ! { ! dbmobject *dp; ! ! dp = PyObject_New(dbmobject, &Dbmtype); ! if (dp == NULL) ! return NULL; ! dp->di_size = -1; ! errno = 0; ! if ( (dp->di_dbm = gdbm_open(file, 0, flags, mode, NULL)) == 0 ) { ! if (errno != 0) ! PyErr_SetFromErrno(DbmError); ! else ! PyErr_SetString(DbmError, gdbm_strerror(gdbm_errno)); ! Py_DECREF(dp); ! return NULL; ! } ! return (PyObject *)dp; } --- 66,87 ---- static PyObject * ! newdbmobject(char *file, int flags, int mode) ! { ! dbmobject *dp; ! ! dp = PyObject_New(dbmobject, &Dbmtype); ! if (dp == NULL) ! return NULL; ! dp->di_size = -1; ! errno = 0; ! if ((dp->di_dbm = gdbm_open(file, 0, flags, mode, NULL)) == 0) { ! if (errno != 0) ! PyErr_SetFromErrno(DbmError); ! else ! PyErr_SetString(DbmError, gdbm_strerror(gdbm_errno)); ! Py_DECREF(dp); ! return NULL; ! } ! return (PyObject *)dp; } *************** *** 92,202 **** static void ! dbm_dealloc(dp) ! register dbmobject *dp; { ! if ( dp->di_dbm ) ! gdbm_close(dp->di_dbm); ! PyObject_Del(dp); } static int ! dbm_length(dp) ! dbmobject *dp; { ! if (dp->di_dbm == NULL) { ! PyErr_SetString(DbmError, "GDBM object has already been closed"); ! return -1; } ! if ( dp->di_size < 0 ) { ! datum key,okey; ! int size; ! okey.dsize=0; ! ! size = 0; ! for ( key=gdbm_firstkey(dp->di_dbm); key.dptr; ! key = gdbm_nextkey(dp->di_dbm,okey)) { ! size++; ! if(okey.dsize) free(okey.dptr); ! okey=key; ! } ! dp->di_size = size; ! } ! return dp->di_size; } static PyObject * ! dbm_subscript(dp, key) ! dbmobject *dp; ! register PyObject *key; ! { ! PyObject *v; ! datum drec, krec; ! ! if (!PyArg_Parse(key, "s#", &krec.dptr, &krec.dsize) ) ! return NULL; ! ! if (dp->di_dbm == NULL) { ! PyErr_SetString(DbmError, ! "GDBM object has already been closed"); ! return NULL; ! } ! drec = gdbm_fetch(dp->di_dbm, krec); ! if ( drec.dptr == 0 ) { ! PyErr_SetString(PyExc_KeyError, ! PyString_AS_STRING((PyStringObject *)key)); ! return NULL; ! } ! v = PyString_FromStringAndSize(drec.dptr, drec.dsize); ! free(drec.dptr); ! return v; } static int ! dbm_ass_sub(dp, v, w) ! dbmobject *dp; ! PyObject *v, *w; ! { ! datum krec, drec; ! ! if ( !PyArg_Parse(v, "s#", &krec.dptr, &krec.dsize) ) { ! PyErr_SetString(PyExc_TypeError, ! "gdbm mappings have string indices only"); ! return -1; ! } ! if (dp->di_dbm == NULL) { ! PyErr_SetString(DbmError, ! "GDBM object has already been closed"); ! return -1; } ! dp->di_size = -1; ! if (w == NULL) { ! if ( gdbm_delete(dp->di_dbm, krec) < 0 ) { ! PyErr_SetString(PyExc_KeyError, ! PyString_AS_STRING((PyStringObject *)v)); ! return -1; ! } ! } else { ! if ( !PyArg_Parse(w, "s#", &drec.dptr, &drec.dsize) ) { ! PyErr_SetString(PyExc_TypeError, ! "gdbm mappings have string elements only"); ! return -1; ! } ! errno = 0; ! if ( gdbm_store(dp->di_dbm, krec, drec, GDBM_REPLACE) < 0 ) { ! if (errno != 0) ! PyErr_SetFromErrno(DbmError); ! else ! PyErr_SetString(DbmError, ! gdbm_strerror(gdbm_errno)); ! return -1; ! } ! } ! return 0; } static PyMappingMethods dbm_as_mapping = { ! (inquiry)dbm_length, /*mp_length*/ ! (binaryfunc)dbm_subscript, /*mp_subscript*/ ! (objobjargproc)dbm_ass_sub, /*mp_ass_subscript*/ }; --- 89,194 ---- static void ! dbm_dealloc(register dbmobject *dp) { ! if (dp->di_dbm) ! gdbm_close(dp->di_dbm); ! PyObject_Del(dp); } static int ! dbm_length(dbmobject *dp) { ! if (dp->di_dbm == NULL) { ! PyErr_SetString(DbmError, "GDBM object has already been closed"); ! return -1; ! } ! if (dp->di_size < 0) { ! datum key,okey; ! int size; ! okey.dsize=0; ! ! size = 0; ! for (key=gdbm_firstkey(dp->di_dbm); key.dptr; ! key = gdbm_nextkey(dp->di_dbm,okey)) { ! size++; ! if(okey.dsize) free(okey.dptr); ! okey=key; } ! dp->di_size = size; ! } ! return dp->di_size; } static PyObject * ! dbm_subscript(dbmobject *dp, register PyObject *key) ! { ! PyObject *v; ! datum drec, krec; ! ! if (!PyArg_Parse(key, "s#", &krec.dptr, &krec.dsize) ) ! return NULL; ! ! if (dp->di_dbm == NULL) { ! PyErr_SetString(DbmError, ! "GDBM object has already been closed"); ! return NULL; ! } ! drec = gdbm_fetch(dp->di_dbm, krec); ! if (drec.dptr == 0) { ! PyErr_SetString(PyExc_KeyError, ! PyString_AS_STRING((PyStringObject *)key)); ! return NULL; ! } ! v = PyString_FromStringAndSize(drec.dptr, drec.dsize); ! free(drec.dptr); ! return v; } static int ! dbm_ass_sub(dbmobject *dp, PyObject *v, PyObject *w) ! { ! datum krec, drec; ! ! if (!PyArg_Parse(v, "s#", &krec.dptr, &krec.dsize) ) { ! PyErr_SetString(PyExc_TypeError, ! "gdbm mappings have string indices only"); ! return -1; ! } ! if (dp->di_dbm == NULL) { ! PyErr_SetString(DbmError, ! "GDBM object has already been closed"); ! return -1; ! } ! dp->di_size = -1; ! if (w == NULL) { ! if (gdbm_delete(dp->di_dbm, krec) < 0) { ! PyErr_SetString(PyExc_KeyError, ! PyString_AS_STRING((PyStringObject *)v)); ! return -1; ! } ! } ! else { ! if (!PyArg_Parse(w, "s#", &drec.dptr, &drec.dsize)) { ! PyErr_SetString(PyExc_TypeError, ! "gdbm mappings have string elements only"); ! return -1; } ! errno = 0; ! if (gdbm_store(dp->di_dbm, krec, drec, GDBM_REPLACE) < 0) { ! if (errno != 0) ! PyErr_SetFromErrno(DbmError); ! else ! PyErr_SetString(DbmError, ! gdbm_strerror(gdbm_errno)); ! return -1; ! } ! } ! return 0; } static PyMappingMethods dbm_as_mapping = { ! (inquiry)dbm_length, /*mp_length*/ ! (binaryfunc)dbm_subscript, /*mp_subscript*/ ! (objobjargproc)dbm_ass_sub, /*mp_ass_subscript*/ }; *************** *** 206,220 **** static PyObject * ! dbm_close(dp, args) ! register dbmobject *dp; ! PyObject *args; ! { ! if ( !PyArg_NoArgs(args) ) ! return NULL; ! if ( dp->di_dbm ) ! gdbm_close(dp->di_dbm); ! dp->di_dbm = NULL; ! Py_INCREF(Py_None); ! return Py_None; } --- 198,210 ---- static PyObject * ! dbm_close(register dbmobject *dp, PyObject *args) ! { ! if (!PyArg_ParseTuple(args, ":close")) ! return NULL; ! if (dp->di_dbm) ! gdbm_close(dp->di_dbm); ! dp->di_dbm = NULL; ! Py_INCREF(Py_None); ! return Py_None; } *************** *** 224,270 **** static PyObject * ! dbm_keys(dp, args) ! register dbmobject *dp; ! PyObject *args; ! { ! register PyObject *v, *item; ! datum key, nextkey; ! int err; ! ! if (dp == NULL || !is_dbmobject(dp)) { ! PyErr_BadInternalCall(); ! return NULL; ! } ! ! if (!PyArg_NoArgs(args)) ! return NULL; ! ! check_dbmobject_open(dp); ! ! v = PyList_New(0); ! if (v == NULL) ! return NULL; ! ! key = gdbm_firstkey(dp->di_dbm); ! while (key.dptr) { ! item = PyString_FromStringAndSize(key.dptr, key.dsize); ! if (item == NULL) { ! free(key.dptr); ! Py_DECREF(v); ! return NULL; ! } ! err = PyList_Append(v, item); ! Py_DECREF(item); ! if (err != 0) { ! free(key.dptr); ! Py_DECREF(v); ! return NULL; ! } ! nextkey = gdbm_nextkey(dp->di_dbm, key); ! free(key.dptr); ! key = nextkey; ! } ! ! return v; } --- 214,256 ---- static PyObject * ! dbm_keys(register dbmobject *dp, PyObject *args) ! { ! register PyObject *v, *item; ! datum key, nextkey; ! int err; ! ! if (dp == NULL || !is_dbmobject(dp)) { ! PyErr_BadInternalCall(); ! return NULL; ! } ! if (!PyArg_ParseTuple(args, ":keys")) ! return NULL; ! ! check_dbmobject_open(dp); ! ! v = PyList_New(0); ! if (v == NULL) ! return NULL; ! ! key = gdbm_firstkey(dp->di_dbm); ! while (key.dptr) { ! item = PyString_FromStringAndSize(key.dptr, key.dsize); ! if (item == NULL) { ! free(key.dptr); ! Py_DECREF(v); ! return NULL; ! } ! err = PyList_Append(v, item); ! Py_DECREF(item); ! if (err != 0) { ! free(key.dptr); ! Py_DECREF(v); ! return NULL; ! } ! nextkey = gdbm_nextkey(dp->di_dbm, key); ! free(key.dptr); ! key = nextkey; ! } ! return v; } *************** *** 274,287 **** static PyObject * ! dbm_has_key(dp, args) ! register dbmobject *dp; ! PyObject *args; ! { ! datum key; ! ! if (!PyArg_Parse(args, "s#", &key.dptr, &key.dsize)) ! return NULL; ! check_dbmobject_open(dp); ! return PyInt_FromLong((long) gdbm_exists(dp->di_dbm, key)); } --- 260,271 ---- static PyObject * ! dbm_has_key(register dbmobject *dp, PyObject *args) ! { ! datum key; ! ! if (!PyArg_ParseTuple(args, "s#:has_key", &key.dptr, &key.dsize)) ! return NULL; ! check_dbmobject_open(dp); ! return PyInt_FromLong((long) gdbm_exists(dp->di_dbm, key)); } *************** *** 294,316 **** static PyObject * ! dbm_firstkey(dp, args) ! register dbmobject *dp; ! PyObject *args; ! { ! register PyObject *v; ! datum key; ! ! if (!PyArg_NoArgs(args)) ! return NULL; ! check_dbmobject_open(dp); ! key = gdbm_firstkey(dp->di_dbm); ! if (key.dptr) { ! v = PyString_FromStringAndSize(key.dptr, key.dsize); ! free(key.dptr); ! return v; ! } else { ! Py_INCREF(Py_None); ! return Py_None; ! } } --- 278,299 ---- static PyObject * ! dbm_firstkey(register dbmobject *dp, PyObject *args) ! { ! register PyObject *v; ! datum key; ! ! if (!PyArg_ParseTuple(args, ":firstkey")) ! return NULL; ! check_dbmobject_open(dp); ! key = gdbm_firstkey(dp->di_dbm); ! if (key.dptr) { ! v = PyString_FromStringAndSize(key.dptr, key.dsize); ! free(key.dptr); ! return v; ! } ! else { ! Py_INCREF(Py_None); ! return Py_None; ! } } *************** *** 327,349 **** static PyObject * ! dbm_nextkey(dp, args) ! register dbmobject *dp; ! PyObject *args; ! { ! register PyObject *v; ! datum key, nextkey; ! ! if (!PyArg_Parse(args, "s#", &key.dptr, &key.dsize)) ! return NULL; ! check_dbmobject_open(dp); ! nextkey = gdbm_nextkey(dp->di_dbm, key); ! if (nextkey.dptr) { ! v = PyString_FromStringAndSize(nextkey.dptr, nextkey.dsize); ! free(nextkey.dptr); ! return v; ! } else { ! Py_INCREF(Py_None); ! return Py_None; ! } } --- 310,331 ---- static PyObject * ! dbm_nextkey(register dbmobject *dp, PyObject *args) ! { ! register PyObject *v; ! datum key, nextkey; ! ! if (!PyArg_ParseTuple(args, "s#:nextkey", &key.dptr, &key.dsize)) ! return NULL; ! check_dbmobject_open(dp); ! nextkey = gdbm_nextkey(dp->di_dbm, key); ! if (nextkey.dptr) { ! v = PyString_FromStringAndSize(nextkey.dptr, nextkey.dsize); ! free(nextkey.dptr); ! return v; ! } ! else { ! Py_INCREF(Py_None); ! return Py_None; ! } } *************** *** 357,377 **** static PyObject * ! dbm_reorganize(dp, args) ! register dbmobject *dp; ! PyObject *args; ! { ! if (!PyArg_NoArgs(args)) ! return NULL; ! check_dbmobject_open(dp); ! errno = 0; ! if (gdbm_reorganize(dp->di_dbm) < 0) { ! if (errno != 0) ! PyErr_SetFromErrno(DbmError); ! else ! PyErr_SetString(DbmError, gdbm_strerror(gdbm_errno)); ! return NULL; ! } ! Py_INCREF(Py_None); ! return Py_None; } --- 339,357 ---- static PyObject * ! dbm_reorganize(register dbmobject *dp, PyObject *args) ! { ! if (!PyArg_ParseTuple(args, ":reorganize")) ! return NULL; ! check_dbmobject_open(dp); ! errno = 0; ! if (gdbm_reorganize(dp->di_dbm) < 0) { ! if (errno != 0) ! PyErr_SetFromErrno(DbmError); ! else ! PyErr_SetString(DbmError, gdbm_strerror(gdbm_errno)); ! return NULL; ! } ! Py_INCREF(Py_None); ! return Py_None; } *************** *** 382,439 **** static PyObject * ! dbm_sync(dp, args) ! register dbmobject *dp; ! PyObject *args; ! { ! if (!PyArg_NoArgs(args)) ! return NULL; ! check_dbmobject_open(dp); ! gdbm_sync(dp->di_dbm); ! Py_INCREF(Py_None); ! return Py_None; } static PyMethodDef dbm_methods[] = { ! {"close", (PyCFunction)dbm_close, 0, dbm_close__doc__}, ! {"keys", (PyCFunction)dbm_keys, 0, dbm_keys__doc__}, ! {"has_key", (PyCFunction)dbm_has_key, 0, dbm_has_key__doc__}, ! {"firstkey", (PyCFunction)dbm_firstkey, 0, dbm_firstkey__doc__}, ! {"nextkey", (PyCFunction)dbm_nextkey, 0, dbm_nextkey__doc__}, ! {"reorganize", (PyCFunction)dbm_reorganize, 0, dbm_reorganize__doc__}, ! {"sync", (PyCFunction)dbm_sync, 0, dbm_sync__doc__}, ! {NULL, NULL} /* sentinel */ }; static PyObject * ! dbm_getattr(dp, name) ! dbmobject *dp; ! char *name; { ! return Py_FindMethod(dbm_methods, (PyObject *)dp, name); } static PyTypeObject Dbmtype = { ! PyObject_HEAD_INIT(0) ! 0, ! "gdbm", ! sizeof(dbmobject), ! 0, ! (destructor)dbm_dealloc, /*tp_dealloc*/ ! 0, /*tp_print*/ ! (getattrfunc)dbm_getattr, /*tp_getattr*/ ! 0, /*tp_setattr*/ ! 0, /*tp_compare*/ ! 0, /*tp_repr*/ ! 0, /*tp_as_number*/ ! 0, /*tp_as_sequence*/ ! &dbm_as_mapping, /*tp_as_mapping*/ ! 0, /*tp_hash*/ ! 0, /*tp_call*/ ! 0, /*tp_str*/ ! 0, /*tp_getattro*/ ! 0, /*tp_setattro*/ ! 0, /*tp_as_buffer*/ ! 0, /*tp_xxx4*/ ! gdbm_object__doc__, /*tp_doc*/ }; --- 362,415 ---- static PyObject * ! dbm_sync(register dbmobject *dp, PyObject *args) ! { ! if (!PyArg_ParseTuple(args, ":sync")) ! return NULL; ! check_dbmobject_open(dp); ! gdbm_sync(dp->di_dbm); ! Py_INCREF(Py_None); ! return Py_None; } static PyMethodDef dbm_methods[] = { ! {"close", (PyCFunction)dbm_close, METH_VARARGS, dbm_close__doc__}, ! {"keys", (PyCFunction)dbm_keys, METH_VARARGS, dbm_keys__doc__}, ! {"has_key", (PyCFunction)dbm_has_key, METH_VARARGS, dbm_has_key__doc__}, ! {"firstkey", (PyCFunction)dbm_firstkey,METH_VARARGS, dbm_firstkey__doc__}, ! {"nextkey", (PyCFunction)dbm_nextkey, METH_VARARGS, dbm_nextkey__doc__}, ! {"reorganize",(PyCFunction)dbm_reorganize,METH_VARARGS, dbm_reorganize__doc__}, ! {"sync", (PyCFunction)dbm_sync, METH_VARARGS, dbm_sync__doc__}, ! {NULL, NULL} /* sentinel */ }; static PyObject * ! dbm_getattr(dbmobject *dp, char *name) { ! return Py_FindMethod(dbm_methods, (PyObject *)dp, name); } static PyTypeObject Dbmtype = { ! PyObject_HEAD_INIT(0) ! 0, ! "gdbm", ! sizeof(dbmobject), ! 0, ! (destructor)dbm_dealloc, /*tp_dealloc*/ ! 0, /*tp_print*/ ! (getattrfunc)dbm_getattr, /*tp_getattr*/ ! 0, /*tp_setattr*/ ! 0, /*tp_compare*/ ! 0, /*tp_repr*/ ! 0, /*tp_as_number*/ ! 0, /*tp_as_sequence*/ ! &dbm_as_mapping, /*tp_as_mapping*/ ! 0, /*tp_hash*/ ! 0, /*tp_call*/ ! 0, /*tp_str*/ ! 0, /*tp_getattro*/ ! 0, /*tp_setattro*/ ! 0, /*tp_as_buffer*/ ! 0, /*tp_xxx4*/ ! gdbm_object__doc__, /*tp_doc*/ }; *************** *** 461,514 **** static PyObject * ! dbmopen(self, args) ! PyObject *self; ! PyObject *args; ! { ! char *name; ! char *flags = "r "; ! int iflags; ! int mode = 0666; ! ! if ( !PyArg_ParseTuple(args, "s|si:open", &name, &flags, &mode) ) ! return NULL; ! switch (flags[0]) { ! case 'r': ! iflags = GDBM_READER; ! break; ! case 'w': ! iflags = GDBM_WRITER; ! break; ! case 'c': ! iflags = GDBM_WRCREAT; ! break; ! case 'n': ! iflags = GDBM_NEWDB; ! break; ! default: ! PyErr_SetString(DbmError, ! "Flags should be one of 'r', 'w', 'c' or 'n'"); ! return NULL; ! } ! if (flags[1] == 'f') ! iflags |= GDBM_FAST; ! return newdbmobject(name, iflags, mode); } static PyMethodDef dbmmodule_methods[] = { ! { "open", (PyCFunction)dbmopen, 1, dbmopen__doc__}, ! { 0, 0 }, }; DL_EXPORT(void) initgdbm() { ! PyObject *m, *d; ! Dbmtype.ob_type = &PyType_Type; ! m = Py_InitModule4("gdbm", dbmmodule_methods, ! gdbmmodule__doc__, (PyObject *)NULL, ! PYTHON_API_VERSION); ! d = PyModule_GetDict(m); ! DbmError = PyErr_NewException("gdbm.error", NULL, NULL); ! if (DbmError != NULL) ! PyDict_SetItemString(d, "error", DbmError); } --- 437,488 ---- static PyObject * ! dbmopen(PyObject *self, PyObject *args) ! { ! char *name; ! char *flags = "r "; ! int iflags; ! int mode = 0666; ! ! if (!PyArg_ParseTuple(args, "s|si:open", &name, &flags, &mode)) ! return NULL; ! switch (flags[0]) { ! case 'r': ! iflags = GDBM_READER; ! break; ! case 'w': ! iflags = GDBM_WRITER; ! break; ! case 'c': ! iflags = GDBM_WRCREAT; ! break; ! case 'n': ! iflags = GDBM_NEWDB; ! break; ! default: ! PyErr_SetString(DbmError, ! "Flags should be one of 'r', 'w', 'c' or 'n'"); ! return NULL; ! } ! if (flags[1] == 'f') ! iflags |= GDBM_FAST; ! return newdbmobject(name, iflags, mode); } static PyMethodDef dbmmodule_methods[] = { ! { "open", (PyCFunction)dbmopen, METH_VARARGS, dbmopen__doc__}, ! { 0, 0 }, }; DL_EXPORT(void) initgdbm() { ! PyObject *m, *d; ! Dbmtype.ob_type = &PyType_Type; ! m = Py_InitModule4("gdbm", dbmmodule_methods, ! gdbmmodule__doc__, (PyObject *)NULL, ! PYTHON_API_VERSION); ! d = PyModule_GetDict(m); ! DbmError = PyErr_NewException("gdbm.error", NULL, NULL); ! if (DbmError != NULL) ! PyDict_SetItemString(d, "error", DbmError); } From python-dev@python.org Sat Jul 8 06:18:57 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 7 Jul 2000 22:18:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tut tut.tex,1.108,1.109 Message-ID: <200007080518.WAA14610@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tut In directory slayer.i.sourceforge.net:/tmp/cvs-serv14603/tut Modified Files: tut.tex Log Message: Markup improvements in sections relating to interactive behavior. Clarify some of the details of readline-related configuration. Index: tut.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -r1.108 -r1.109 *** tut.tex 2000/06/30 16:06:19 1.108 --- tut.tex 2000/07/08 05:18:54 1.109 *************** *** 175,183 **** \file{/usr/local/python} is a popular alternative location.) ! Typing an EOF character (Control-D on \UNIX{}, Control-Z on DOS ! or Windows) at the primary prompt causes the interpreter to exit with ! a zero exit status. If that doesn't work, you can exit the ! interpreter by typing the following commands: \samp{import sys; ! sys.exit()}. The interpreter's line-editing features usually aren't very --- 175,183 ---- \file{/usr/local/python} is a popular alternative location.) ! Typing an \EOF{} character (\kbd{Control-D} on \UNIX, ! \kbd{Control-Z} on DOS or Windows) at the primary prompt causes the ! interpreter to exit with a zero exit status. If that doesn't work, ! you can exit the interpreter by typing the following commands: ! \samp{import sys; sys.exit()}. The interpreter's line-editing features usually aren't very *************** *** 187,194 **** quickest check to see whether command line editing is supported is typing Control-P to the first Python prompt you get. If it beeps, you ! have command line editing; see Appendix A for an introduction to the ! keys. If nothing appears to happen, or if \code{\^P} is echoed, ! command line editing isn't available; you'll only be able to use ! backspace to remove characters from the current line. The interpreter operates somewhat like the \UNIX{} shell: when called --- 187,195 ---- quickest check to see whether command line editing is supported is typing Control-P to the first Python prompt you get. If it beeps, you ! have command line editing; see Appendix \ref{interacting} for an ! introduction to the keys. If nothing appears to happen, or if ! \code{\^P} is echoed, command line editing isn't available; you'll ! only be able to use backspace to remove characters from the current ! line. The interpreter operates somewhat like the \UNIX{} shell: when called *************** *** 325,337 **** If you want to read an additional start-up file from the current directory, you can program this in the global start-up file, ! e.g.\ \samp{execfile('.pythonrc.py')}\indexii{.pythonrc.py}{file}. If ! you want to use the startup file in a script, you must do this ! explicitly in the script: \begin{verbatim} import os ! if os.environ.get('PYTHONSTARTUP') \ ! and os.path.isfile(os.environ['PYTHONSTARTUP']): ! execfile(os.environ['PYTHONSTARTUP']) \end{verbatim} --- 326,338 ---- If you want to read an additional start-up file from the current directory, you can program this in the global start-up file, ! e.g.\ \samp{if os.path.isfile('.pythonrc.py'): ! execfile('.pythonrc.py')}. If you want to use the startup file in a ! script, you must do this explicitly in the script: \begin{verbatim} import os ! filename = os.environ.get('PYTHONSTARTUP') ! if filename and os.path.isfile(filename): ! execfile(filename) \end{verbatim} *************** *** 3923,3933 **** prints a primary or secondary prompt. The current line can be edited using the conventional Emacs control characters. The most important ! of these are: C-A (Control-A) moves the cursor to the beginning of the ! line, C-E to the end, C-B moves it one position to the left, C-F to ! the right. Backspace erases the character to the left of the cursor, ! C-D the character to its right. C-K kills (erases) the rest of the ! line to the right of the cursor, C-Y yanks back the last killed ! string. C-underscore undoes the last change you made; it can be ! repeated for cumulative effect. \section{History Substitution \label{history}} --- 3924,3935 ---- prints a primary or secondary prompt. The current line can be edited using the conventional Emacs control characters. The most important ! of these are: \kbd{C-A} (Control-A) moves the cursor to the beginning ! of the line, \kbd{C-E} to the end, \kbd{C-B} moves it one position to ! the left, \kbd{C-F} to the right. Backspace erases the character to ! the left of the cursor, \kbd{C-D} the character to its right. ! \kbd{C-K} kills (erases) the rest of the line to the right of the ! cursor, \kbd{C-Y} yanks back the last killed string. ! \kbd{C-underscore} undoes the last change you made; it can be repeated ! for cumulative effect. \section{History Substitution \label{history}} *************** *** 3935,3944 **** History substitution works as follows. All non-empty input lines issued are saved in a history buffer, and when a new prompt is given ! you are positioned on a new line at the bottom of this buffer. C-P ! moves one line up (back) in the history buffer, C-N moves one down. ! Any line in the history buffer can be edited; an asterisk appears in ! front of the prompt to mark a line as modified. Pressing the Return ! key passes the current line to the interpreter. C-R starts an ! incremental reverse search; C-S starts a forward search. \section{Key Bindings \label{keyBindings}} --- 3937,3947 ---- History substitution works as follows. All non-empty input lines issued are saved in a history buffer, and when a new prompt is given ! you are positioned on a new line at the bottom of this buffer. ! \kbd{C-P} moves one line up (back) in the history buffer, ! \kbd{C-N} moves one down. Any line in the history buffer can be ! edited; an asterisk appears in front of the prompt to mark a line as ! modified. Pressing the \kbd{Return} key passes the current line to ! the interpreter. \kbd{C-R} starts an incremental reverse search; ! \kbd{C-S} starts a forward search. \section{Key Bindings \label{keyBindings}} *************** *** 3946,3950 **** The key bindings and some other parameters of the Readline library can be customized by placing commands in an initialization file called ! \file{\$HOME/.inputrc}. Key bindings have the form \begin{verbatim} --- 3949,3953 ---- The key bindings and some other parameters of the Readline library can be customized by placing commands in an initialization file called ! \file{\~{}/.inputrc}. Key bindings have the form \begin{verbatim} *************** *** 3969,3974 **** --- 3972,3979 ---- # I prefer vi-style editing: set editing-mode vi + # Edit using a single line: set horizontal-scroll-mode On + # Rebind some keys: Meta-h: backward-kill-word *************** *** 3977,3995 **** \end{verbatim} ! Note that the default binding for TAB in Python is to insert a TAB ! instead of Readline's default filename completion function. If you ! insist, you can override this by putting \begin{verbatim} ! TAB: complete \end{verbatim} ! in your \file{\$HOME/.inputrc}. (Of course, this makes it hard to type ! indented continuation lines...) Automatic completion of variable and module names is optionally available. To enable it in the interpreter's interactive mode, add ! the following to your \file{\$HOME/.pythonrc.py} file:% ! \indexii{.pythonrc.py}{file} \refstmodindex{rlcompleter}\refbimodindex{readline} --- 3982,4002 ---- \end{verbatim} ! Note that the default binding for \kbd{Tab} in Python is to insert a ! \kbd{Tab} character instead of Readline's default filename completion ! function. If you insist, you can override this by putting \begin{verbatim} ! Tab: complete \end{verbatim} ! in your \file{\~{}/.inputrc}. (Of course, this makes it harder to ! type indented continuation lines.) Automatic completion of variable and module names is optionally available. To enable it in the interpreter's interactive mode, add ! the following to your startup file:\footnote{ ! Python will execute the contents of a file identified by the ! \envvar{PYTHONSTARTUP} environment variable when you start an ! interactive interpreter.} \refstmodindex{rlcompleter}\refbimodindex{readline} *************** *** 4011,4023 **** \section{Commentary \label{commentary}} ! This facility is an enormous step forward compared to previous ! versions of the interpreter; however, some wishes are left: It would ! be nice if the proper indentation were suggested on continuation lines ! (the parser knows if an indent token is required next). The ! completion mechanism might use the interpreter's symbol table. A ! command to check (or even suggest) matching parentheses, quotes etc. ! would also be useful. - % XXX Lele Gaifax's readline module, which adds name completion... \end{document} --- 4018,4029 ---- \section{Commentary \label{commentary}} ! This facility is an enormous step forward compared to earlier versions ! of the interpreter; however, some wishes are left: It would be nice if ! the proper indentation were suggested on continuation lines (the ! parser knows if an indent token is required next). The completion ! mechanism might use the interpreter's symbol table. A command to ! check (or even suggest) matching parentheses, quotes, etc., would also ! be useful. \end{document} From python-dev@python.org Sat Jul 8 07:06:01 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 7 Jul 2000 23:06:01 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules linuxaudiodev.c,2.2,2.3 Message-ID: <200007080606.XAA22987@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv22913 Modified Files: linuxaudiodev.c Log Message: Add method names to PyArg_ParseTuple() calls for better error messages. Convert to four-space indents. Index: linuxaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/linuxaudiodev.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** linuxaudiodev.c 2000/05/03 23:44:32 2.2 --- linuxaudiodev.c 2000/07/08 06:05:58 2.3 *************** *** 33,54 **** typedef struct { ! PyObject_HEAD; ! int x_fd; /* The open file */ ! int x_icount; /* Input count */ ! int x_ocount; /* Output count */ ! uint32_t x_afmts; /* Supported audio formats */ } lad_t; static struct { ! int a_bps; ! uint32_t a_fmt; } audio_types[] = { ! { 8, AFMT_MU_LAW }, ! { 8, AFMT_U8 }, ! { 8, AFMT_S8 }, ! { 16, AFMT_U16_BE }, ! { 16, AFMT_U16_LE }, ! { 16, AFMT_S16_BE }, ! { 16, AFMT_S16_LE }, }; --- 33,54 ---- typedef struct { ! PyObject_HEAD; ! int x_fd; /* The open file */ ! int x_icount; /* Input count */ ! int x_ocount; /* Output count */ ! uint32_t x_afmts; /* Supported audio formats */ } lad_t; static struct { ! int a_bps; ! uint32_t a_fmt; } audio_types[] = { ! { 8, AFMT_MU_LAW }, ! { 8, AFMT_U8 }, ! { 8, AFMT_S8 }, ! { 16, AFMT_U16_BE }, ! { 16, AFMT_U16_LE }, ! { 16, AFMT_S16_BE }, ! { 16, AFMT_S16_LE }, }; *************** *** 61,116 **** newladobject(PyObject *arg) { ! lad_t *xp; ! int fd, afmts, imode; ! char *mode; ! char *basedev; ! char *ctldev; ! char *opendev; ! ! /* Check arg for r/w/rw */ ! if (!PyArg_ParseTuple(arg, "s", &mode)) return NULL; ! if (strcmp(mode, "r") == 0) ! imode = 0; ! else if (strcmp(mode, "w") == 0) ! imode = 1; ! else { ! PyErr_SetString(LinuxAudioError, "Mode should be one of 'r', or 'w'"); ! return NULL; ! } ! ! /* Open the correct device. The base device name comes from the ! * AUDIODEV environment variable first, then /dev/audio. The ! * control device tacks "ctl" onto the base device name. ! */ ! basedev = getenv("AUDIODEV"); ! if (!basedev) ! basedev = "/dev/dsp"; ! ! if ((fd = open(basedev, imode)) < 0) { ! PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); ! return NULL; ! } ! ! if (imode) { ! if (ioctl(fd, SNDCTL_DSP_NONBLOCK, NULL) < 0) { ! PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); ! return NULL; ! } ! } ! ! if (ioctl(fd, SNDCTL_DSP_GETFMTS, &afmts) < 0) { ! PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); ! return NULL; ! } ! ! /* Create and initialize the object */ ! if ((xp = PyObject_New(lad_t, &Ladtype)) == NULL) { ! close(fd); ! return NULL; ! } ! xp->x_fd = fd; ! xp->x_icount = xp->x_ocount = 0; ! xp->x_afmts = afmts; ! return xp; } --- 61,111 ---- newladobject(PyObject *arg) { ! lad_t *xp; ! int fd, afmts, imode; ! char *mode; ! char *basedev; ! char *ctldev; ! char *opendev; ! ! /* Check arg for r/w/rw */ ! if (!PyArg_ParseTuple(arg, "s:open", &mode)) return NULL; ! if (strcmp(mode, "r") == 0) ! imode = 0; ! else if (strcmp(mode, "w") == 0) ! imode = 1; ! else { ! PyErr_SetString(LinuxAudioError, "Mode should be one of 'r', or 'w'"); ! return NULL; ! } ! ! /* Open the correct device. The base device name comes from the ! * AUDIODEV environment variable first, then /dev/audio. The ! * control device tacks "ctl" onto the base device name. ! */ ! basedev = getenv("AUDIODEV"); ! if (!basedev) ! basedev = "/dev/dsp"; ! ! if ((fd = open(basedev, imode)) < 0) { ! PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); ! return NULL; ! } ! if (imode && ioctl(fd, SNDCTL_DSP_NONBLOCK, NULL) < 0) { ! PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); ! return NULL; ! } ! if (ioctl(fd, SNDCTL_DSP_GETFMTS, &afmts) < 0) { ! PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); ! return NULL; ! } ! /* Create and initialize the object */ ! if ((xp = PyObject_New(lad_t, &Ladtype)) == NULL) { ! close(fd); ! return NULL; ! } ! xp->x_fd = fd; ! xp->x_icount = xp->x_ocount = 0; ! xp->x_afmts = afmts; ! return xp; } *************** *** 118,123 **** lad_dealloc(lad_t *xp) { ! close(xp->x_fd); ! PyObject_Del(xp); } --- 113,118 ---- lad_dealloc(lad_t *xp) { ! close(xp->x_fd); ! PyObject_Del(xp); } *************** *** 125,149 **** lad_read(lad_t *self, PyObject *args) { ! int size, count; ! char *cp; ! PyObject *rv; ! if (!PyArg_ParseTuple(args, "i", &size)) return NULL; ! rv = PyString_FromStringAndSize(NULL, size); ! if (rv == NULL) return NULL; ! ! if (!(cp = PyString_AsString(rv))) { ! Py_DECREF(rv); ! return NULL; ! } ! ! if ((count = read(self->x_fd, cp, size)) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! Py_DECREF(rv); ! return NULL; ! } ! ! self->x_icount += count; ! return rv; } --- 120,144 ---- lad_read(lad_t *self, PyObject *args) { ! int size, count; ! char *cp; ! PyObject *rv; ! if (!PyArg_ParseTuple(args, "i:read", &size)) ! return NULL; ! rv = PyString_FromStringAndSize(NULL, size); ! if (rv == NULL) ! return NULL; ! ! if (!(cp = PyString_AsString(rv))) { ! Py_DECREF(rv); ! return NULL; ! } ! if ((count = read(self->x_fd, cp, size)) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! Py_DECREF(rv); ! return NULL; ! } ! self->x_icount += count; ! return rv; } *************** *** 151,170 **** lad_write(lad_t *self, PyObject *args) { ! char *cp; ! int rv, size; ! if (!PyArg_ParseTuple(args, "s#", &cp, &size)) return NULL; ! while (size > 0) { ! if ((rv = write(self->x_fd, cp, size)) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! self->x_ocount += rv; ! size -= rv; ! cp += rv; ! } ! Py_INCREF(Py_None); ! return Py_None; } --- 146,165 ---- lad_write(lad_t *self, PyObject *args) { ! char *cp; ! int rv, size; ! if (!PyArg_ParseTuple(args, "s#:write", &cp, &size)) return NULL; ! while (size > 0) { ! if ((rv = write(self->x_fd, cp, size)) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! self->x_ocount += rv; ! size -= rv; ! cp += rv; ! } ! Py_INCREF(Py_None); ! return Py_None; } *************** *** 172,182 **** lad_close(lad_t *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, "")) return NULL; ! if (self->x_fd >= 0) { ! close(self->x_fd); ! self->x_fd = -1; ! } ! Py_INCREF(Py_None); ! return Py_None; } --- 167,177 ---- lad_close(lad_t *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":close")) return NULL; ! if (self->x_fd >= 0) { ! close(self->x_fd); ! self->x_fd = -1; ! } ! Py_INCREF(Py_None); ! return Py_None; } *************** *** 184,189 **** lad_fileno(lad_t *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, "")) return NULL; ! return PyInt_FromLong(self->x_fd); } --- 179,184 ---- lad_fileno(lad_t *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":fileno")) return NULL; ! return PyInt_FromLong(self->x_fd); } *************** *** 191,238 **** lad_setparameters(lad_t *self, PyObject *args) { ! int rate, ssize, nchannels, stereo, n, fmt; ! if (!PyArg_ParseTuple(args, "iiii", &rate, &ssize, &nchannels, &fmt)) ! return NULL; ! ! if (rate < 0 || ssize < 0 || (nchannels != 1 && nchannels != 2)) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! ! if (ioctl(self->x_fd, SOUND_PCM_WRITE_RATE, &rate) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! ! if (ioctl(self->x_fd, SNDCTL_DSP_SAMPLESIZE, &ssize) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! ! stereo = (nchannels == 1)? 0: (nchannels == 2)? 1: -1; ! if (ioctl(self->x_fd, SNDCTL_DSP_STEREO, &stereo) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! ! for (n = 0; n != sizeof(audio_types) / sizeof(audio_types[0]); n++) ! if (fmt == audio_types[n].a_fmt) ! break; ! ! if (n == sizeof(audio_types) / sizeof(audio_types[0]) || ! audio_types[n].a_bps != ssize || ! (self->x_afmts & audio_types[n].a_fmt) == 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! ! if (ioctl(self->x_fd, SNDCTL_DSP_SETFMT, &audio_types[n].a_fmt) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! Py_INCREF(Py_None); ! return Py_None; } --- 186,228 ---- lad_setparameters(lad_t *self, PyObject *args) { ! int rate, ssize, nchannels, stereo, n, fmt; ! if (!PyArg_ParseTuple(args, "iiii:setparameters", ! &rate, &ssize, &nchannels, &fmt)) ! return NULL; ! if (rate < 0 || ssize < 0 || (nchannels != 1 && nchannels != 2)) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! if (ioctl(self->x_fd, SOUND_PCM_WRITE_RATE, &rate) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! if (ioctl(self->x_fd, SNDCTL_DSP_SAMPLESIZE, &ssize) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! stereo = (nchannels == 1)? 0: (nchannels == 2)? 1: -1; ! if (ioctl(self->x_fd, SNDCTL_DSP_STEREO, &stereo) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! for (n = 0; n != sizeof(audio_types) / sizeof(audio_types[0]); n++) ! if (fmt == audio_types[n].a_fmt) ! break; ! ! if (n == sizeof(audio_types) / sizeof(audio_types[0]) || ! audio_types[n].a_bps != ssize || ! (self->x_afmts & audio_types[n].a_fmt) == 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! if (ioctl(self->x_fd, SNDCTL_DSP_SETFMT, &audio_types[n].a_fmt) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! Py_INCREF(Py_None); ! return Py_None; } *************** *** 240,296 **** _ssize(lad_t *self, int *nchannels, int *ssize) { ! int fmt; ! fmt = 0; ! if (ioctl(self->x_fd, SNDCTL_DSP_SETFMT, &fmt) < 0) ! return -errno; ! ! switch (fmt) { ! case AFMT_MU_LAW: ! case AFMT_A_LAW: ! case AFMT_U8: ! case AFMT_S8: ! *ssize = sizeof(char); ! break; ! case AFMT_S16_LE: ! case AFMT_S16_BE: ! case AFMT_U16_LE: ! case AFMT_U16_BE: ! *ssize = sizeof(short); ! break; ! case AFMT_MPEG: ! case AFMT_IMA_ADPCM: ! default: ! return -EOPNOTSUPP; ! } ! ! *nchannels = 0; ! if (ioctl(self->x_fd, SNDCTL_DSP_CHANNELS, nchannels) < 0) ! return -errno; ! return 0; } /* bufsize returns the size of the hardware audio buffer in number ! of samples */ static PyObject * lad_bufsize(lad_t *self, PyObject *args) { ! audio_buf_info ai; ! int nchannels, ssize; ! ! if (!PyArg_ParseTuple(args, "")) return NULL; ! if (_ssize(self, &nchannels, &ssize) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! ! if (ioctl(self->x_fd, SNDCTL_DSP_GETOSPACE, &ai) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! return PyInt_FromLong((ai.fragstotal * ai.fragsize) / (nchannels * ssize)); } --- 230,283 ---- _ssize(lad_t *self, int *nchannels, int *ssize) { ! int fmt; ! fmt = 0; ! if (ioctl(self->x_fd, SNDCTL_DSP_SETFMT, &fmt) < 0) ! return -errno; ! ! switch (fmt) { ! case AFMT_MU_LAW: ! case AFMT_A_LAW: ! case AFMT_U8: ! case AFMT_S8: ! *ssize = sizeof(char); ! break; ! case AFMT_S16_LE: ! case AFMT_S16_BE: ! case AFMT_U16_LE: ! case AFMT_U16_BE: ! *ssize = sizeof(short); ! break; ! case AFMT_MPEG: ! case AFMT_IMA_ADPCM: ! default: ! return -EOPNOTSUPP; ! } ! *nchannels = 0; ! if (ioctl(self->x_fd, SNDCTL_DSP_CHANNELS, nchannels) < 0) ! return -errno; ! return 0; } /* bufsize returns the size of the hardware audio buffer in number ! of samples */ static PyObject * lad_bufsize(lad_t *self, PyObject *args) { ! audio_buf_info ai; ! int nchannels, ssize; ! if (!PyArg_ParseTuple(args, ":bufsize")) return NULL; ! if (_ssize(self, &nchannels, &ssize) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! if (ioctl(self->x_fd, SNDCTL_DSP_GETOSPACE, &ai) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! return PyInt_FromLong((ai.fragstotal * ai.fragsize) / (nchannels * ssize)); } *************** *** 300,343 **** lad_obufcount(lad_t *self, PyObject *args) { ! audio_buf_info ai; ! int nchannels, ssize; ! if (!PyArg_ParseTuple(args, "")) return NULL; ! if (_ssize(self, &nchannels, &ssize) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! ! if (ioctl(self->x_fd, SNDCTL_DSP_GETOSPACE, &ai) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! ! return PyInt_FromLong((ai.fragstotal * ai.fragsize - ai.bytes) / ! (ssize * nchannels)); } /* obufcount returns the number of samples that can be played without ! blocking */ static PyObject * lad_obuffree(lad_t *self, PyObject *args) { ! audio_buf_info ai; ! int nchannels, ssize; ! ! if (!PyArg_ParseTuple(args, "")) return NULL; ! if (_ssize(self, &nchannels, &ssize) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! ! if (ioctl(self->x_fd, SNDCTL_DSP_GETOSPACE, &ai) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! return PyInt_FromLong(ai.bytes / (ssize * nchannels)); } --- 287,328 ---- lad_obufcount(lad_t *self, PyObject *args) { ! audio_buf_info ai; ! int nchannels, ssize; ! if (!PyArg_ParseTuple(args, ":obufcount")) ! return NULL; ! if (_ssize(self, &nchannels, &ssize) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! if (ioctl(self->x_fd, SNDCTL_DSP_GETOSPACE, &ai) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! return PyInt_FromLong((ai.fragstotal * ai.fragsize - ai.bytes) / ! (ssize * nchannels)); } /* obufcount returns the number of samples that can be played without ! blocking */ static PyObject * lad_obuffree(lad_t *self, PyObject *args) { ! audio_buf_info ai; ! int nchannels, ssize; ! if (!PyArg_ParseTuple(args, ":obuffree")) ! return NULL; ! if (_ssize(self, &nchannels, &ssize) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! if (ioctl(self->x_fd, SNDCTL_DSP_GETOSPACE, &ai) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! return PyInt_FromLong(ai.bytes / (ssize * nchannels)); } *************** *** 346,371 **** lad_flush(lad_t *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, "")) return NULL; ! if (ioctl(self->x_fd, SNDCTL_DSP_SYNC, NULL) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! ! Py_INCREF(Py_None); ! return Py_None; } static PyMethodDef lad_methods[] = { ! { "read", (PyCFunction)lad_read, 1 }, ! { "write", (PyCFunction)lad_write, 1 }, ! { "setparameters", (PyCFunction)lad_setparameters, 1 }, ! { "bufsize", (PyCFunction)lad_bufsize, 1 }, ! { "obufcount", (PyCFunction)lad_obufcount, 1 }, ! { "obuffree", (PyCFunction)lad_obuffree, 1 }, ! { "flush", (PyCFunction)lad_flush, 1 }, ! { "close", (PyCFunction)lad_close, 1 }, ! { "fileno", (PyCFunction)lad_fileno, 1 }, ! { NULL, NULL} /* sentinel */ }; --- 331,355 ---- lad_flush(lad_t *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":flush")) return NULL; ! if (ioctl(self->x_fd, SNDCTL_DSP_SYNC, NULL) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; ! } ! Py_INCREF(Py_None); ! return Py_None; } static PyMethodDef lad_methods[] = { ! { "read", (PyCFunction)lad_read, METH_VARARGS }, ! { "write", (PyCFunction)lad_write, METH_VARARGS }, ! { "setparameters", (PyCFunction)lad_setparameters, METH_VARARGS }, ! { "bufsize", (PyCFunction)lad_bufsize, METH_VARARGS }, ! { "obufcount", (PyCFunction)lad_obufcount, METH_VARARGS }, ! { "obuffree", (PyCFunction)lad_obuffree, METH_VARARGS }, ! { "flush", (PyCFunction)lad_flush, METH_VARARGS }, ! { "close", (PyCFunction)lad_close, METH_VARARGS }, ! { "fileno", (PyCFunction)lad_fileno, METH_VARARGS }, ! { NULL, NULL} /* sentinel */ }; *************** *** 373,392 **** lad_getattr(lad_t *xp, char *name) { ! return Py_FindMethod(lad_methods, (PyObject *)xp, name); } static PyTypeObject Ladtype = { ! PyObject_HEAD_INIT(&PyType_Type) ! 0, /*ob_size*/ ! "linux_audio_device", /*tp_name*/ ! sizeof(lad_t), /*tp_size*/ ! 0, /*tp_itemsize*/ ! /* methods */ ! (destructor)lad_dealloc, /*tp_dealloc*/ ! 0, /*tp_print*/ ! (getattrfunc)lad_getattr, /*tp_getattr*/ ! 0, /*tp_setattr*/ ! 0, /*tp_compare*/ ! 0, /*tp_repr*/ }; --- 357,376 ---- lad_getattr(lad_t *xp, char *name) { ! return Py_FindMethod(lad_methods, (PyObject *)xp, name); } static PyTypeObject Ladtype = { ! PyObject_HEAD_INIT(&PyType_Type) ! 0, /*ob_size*/ ! "linux_audio_device", /*tp_name*/ ! sizeof(lad_t), /*tp_size*/ ! 0, /*tp_itemsize*/ ! /* methods */ ! (destructor)lad_dealloc, /*tp_dealloc*/ ! 0, /*tp_print*/ ! (getattrfunc)lad_getattr, /*tp_getattr*/ ! 0, /*tp_setattr*/ ! 0, /*tp_compare*/ ! 0, /*tp_repr*/ }; *************** *** 394,403 **** ladopen(PyObject *self, PyObject *args) { ! return (PyObject *)newladobject(args); } static PyMethodDef linuxaudiodev_methods[] = { ! { "open", ladopen, 1 }, ! { 0, 0 }, }; --- 378,387 ---- ladopen(PyObject *self, PyObject *args) { ! return (PyObject *)newladobject(args); } static PyMethodDef linuxaudiodev_methods[] = { ! { "open", ladopen, METH_VARARGS }, ! { 0, 0 }, }; *************** *** 405,466 **** ins(PyObject *d, char *symbol, long value) { ! PyObject* v = PyInt_FromLong(value); ! if (!v || PyDict_SetItemString(d, symbol, v) < 0) ! return -1; /* triggers fatal error */ ! Py_DECREF(v); ! return 0; } void initlinuxaudiodev() { ! PyObject *m, *d, *x; ! m = Py_InitModule("linuxaudiodev", linuxaudiodev_methods); ! d = PyModule_GetDict(m); ! LinuxAudioError = PyErr_NewException("linuxaudiodev.error", NULL, NULL); ! if (LinuxAudioError) ! PyDict_SetItemString(d, "error", LinuxAudioError); ! ! x = PyInt_FromLong((long) AFMT_MU_LAW); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_MU_LAW", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_U8); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_U8", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_S8); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_S8", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_U16_BE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_U16_BE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_U16_LE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_U16_LE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_S16_BE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_S16_BE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_S16_LE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_S16_LE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! /* Check for errors */ ! if (PyErr_Occurred()) { ! error: ! Py_FatalError("can't initialize module linuxaudiodev"); ! } } --- 389,451 ---- ins(PyObject *d, char *symbol, long value) { ! PyObject* v = PyInt_FromLong(value); ! if (!v || PyDict_SetItemString(d, symbol, v) < 0) ! return -1; /* triggers fatal error */ ! Py_DECREF(v); ! return 0; } + void initlinuxaudiodev() { ! PyObject *m, *d, *x; ! m = Py_InitModule("linuxaudiodev", linuxaudiodev_methods); ! d = PyModule_GetDict(m); ! LinuxAudioError = PyErr_NewException("linuxaudiodev.error", NULL, NULL); ! if (LinuxAudioError) ! PyDict_SetItemString(d, "error", LinuxAudioError); ! ! x = PyInt_FromLong((long) AFMT_MU_LAW); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_MU_LAW", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_U8); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_U8", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_S8); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_S8", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_U16_BE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_U16_BE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_U16_LE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_U16_LE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_S16_BE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_S16_BE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_S16_LE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_S16_LE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! /* Check for errors */ ! if (PyErr_Occurred()) { ! error: ! Py_FatalError("can't initialize module linuxaudiodev"); ! } } From python-dev@python.org Sat Jul 8 07:16:40 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 7 Jul 2000 23:16:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules getpath.c,1.25,1.26 Message-ID: <200007080616.XAA23651@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv23644 Modified Files: getpath.c Log Message: ANSI-fied sources, converted to four-space indentation. Index: getpath.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/getpath.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** getpath.c 2000/06/30 23:58:05 1.25 --- getpath.c 2000/07/08 06:16:37 1.26 *************** *** 140,150 **** static void ! reduce(dir) ! char *dir; { ! size_t i = strlen(dir); ! while (i > 0 && dir[i] != SEP) ! --i; ! dir[i] = '\0'; } --- 140,149 ---- static void ! reduce(char *dir) { ! size_t i = strlen(dir); ! while (i > 0 && dir[i] != SEP) ! --i; ! dir[i] = '\0'; } *************** *** 159,358 **** static int ! isfile(filename) /* Is file, not directory */ ! char *filename; { ! struct stat buf; ! if (stat(filename, &buf) != 0) ! return 0; ! if (!S_ISREG(buf.st_mode)) ! return 0; ! return 1; } static int ! ismodule(filename) /* Is module -- check for .pyc/.pyo too */ ! char *filename; { ! if (isfile(filename)) ! return 1; ! /* Check for the compiled version of prefix. */ ! if (strlen(filename) < MAXPATHLEN) { ! strcat(filename, Py_OptimizeFlag ? "o" : "c"); ! if (isfile(filename)) ! return 1; ! } ! return 0; } static int ! isxfile(filename) /* Is executable file */ ! char *filename; { ! struct stat buf; ! if (stat(filename, &buf) != 0) ! return 0; ! if (!S_ISREG(buf.st_mode)) ! return 0; ! if ((buf.st_mode & 0111) == 0) ! return 0; ! return 1; } static int ! isdir(filename) /* Is directory */ ! char *filename; { ! struct stat buf; ! if (stat(filename, &buf) != 0) ! return 0; ! if (!S_ISDIR(buf.st_mode)) ! return 0; ! return 1; } static void ! joinpath(buffer, stuff) ! char *buffer; ! char *stuff; ! { ! size_t n, k; ! if (stuff[0] == SEP) ! n = 0; ! else { ! n = strlen(buffer); ! if (n > 0 && buffer[n-1] != SEP && n < MAXPATHLEN) ! buffer[n++] = SEP; ! } ! k = strlen(stuff); ! if (n + k > MAXPATHLEN) ! k = MAXPATHLEN - n; ! strncpy(buffer+n, stuff, k); ! buffer[n+k] = '\0'; } static int ! search_for_prefix(argv0_path, home) ! char *argv0_path; ! char *home; ! { ! size_t n; ! char *vpath; ! ! /* If PYTHONHOME is set, we believe it unconditionally */ ! if (home) { ! char *delim; ! strcpy(prefix, home); ! delim = strchr(prefix, DELIM); ! if (delim) ! *delim = '\0'; ! joinpath(prefix, lib_python); ! joinpath(prefix, LANDMARK); ! return 1; ! } ! ! /* Check to see if argv[0] is in the build directory */ ! strcpy(prefix, argv0_path); ! joinpath(prefix, "Modules/Setup"); ! if (isfile(prefix)) { ! /* Check VPATH to see if argv0_path is in the build directory. ! * Complication: the VPATH passed in is relative to the ! * Modules build directory and points to the Modules source ! * directory; we need it relative to the build tree and ! * pointing to the source tree. Solution: chop off a leading ! * ".." (but only if it's there -- it could be an absolute ! * path) and chop off the final component (assuming it's ! * "Modules"). ! */ ! vpath = VPATH; ! if (vpath[0] == '.' && vpath[1] == '.' && vpath[2] == '/') ! vpath += 3; ! strcpy(prefix, argv0_path); ! joinpath(prefix, vpath); ! reduce(prefix); ! joinpath(prefix, "Lib"); ! joinpath(prefix, LANDMARK); ! if (ismodule(prefix)) ! return -1; ! } ! /* Search from argv0_path, until root is found */ ! strcpy(prefix, argv0_path); ! do { ! n = strlen(prefix); ! joinpath(prefix, lib_python); ! joinpath(prefix, LANDMARK); ! if (ismodule(prefix)) ! return 1; ! prefix[n] = '\0'; ! reduce(prefix); ! } while (prefix[0]); ! ! /* Look at configure's PREFIX */ ! strcpy(prefix, PREFIX); ! joinpath(prefix, lib_python); ! joinpath(prefix, LANDMARK); ! if (ismodule(prefix)) ! return 1; ! /* Fail */ ! return 0; } static int ! search_for_exec_prefix(argv0_path, home) ! char *argv0_path; ! char *home; ! { ! size_t n; ! ! /* If PYTHONHOME is set, we believe it unconditionally */ ! if (home) { ! char *delim; ! delim = strchr(home, DELIM); ! if (delim) ! strcpy(exec_prefix, delim+1); ! else ! strcpy(exec_prefix, home); ! joinpath(exec_prefix, lib_python); ! joinpath(exec_prefix, "lib-dynload"); ! return 1; ! } ! ! /* Check to see if argv[0] is in the build directory */ ! strcpy(exec_prefix, argv0_path); ! joinpath(exec_prefix, "Modules/Setup"); ! if (isfile(exec_prefix)) { ! reduce(exec_prefix); ! return -1; ! } ! /* Search from argv0_path, until root is found */ ! strcpy(exec_prefix, argv0_path); ! do { ! n = strlen(exec_prefix); ! joinpath(exec_prefix, lib_python); ! joinpath(exec_prefix, "lib-dynload"); ! if (isdir(exec_prefix)) ! return 1; ! exec_prefix[n] = '\0'; ! reduce(exec_prefix); ! } while (exec_prefix[0]); ! ! /* Look at configure's EXEC_PREFIX */ ! strcpy(exec_prefix, EXEC_PREFIX); ! joinpath(exec_prefix, lib_python); ! joinpath(exec_prefix, "lib-dynload"); ! if (isdir(exec_prefix)) ! return 1; ! /* Fail */ ! return 0; } --- 158,347 ---- static int ! isfile(char *filename) /* Is file, not directory */ { ! struct stat buf; ! if (stat(filename, &buf) != 0) ! return 0; ! if (!S_ISREG(buf.st_mode)) ! return 0; ! return 1; } static int ! ismodule(char *filename) /* Is module -- check for .pyc/.pyo too */ { ! if (isfile(filename)) ! return 1; ! /* Check for the compiled version of prefix. */ ! if (strlen(filename) < MAXPATHLEN) { ! strcat(filename, Py_OptimizeFlag ? "o" : "c"); ! if (isfile(filename)) ! return 1; ! } ! return 0; } static int ! isxfile(char *filename) /* Is executable file */ { ! struct stat buf; ! if (stat(filename, &buf) != 0) ! return 0; ! if (!S_ISREG(buf.st_mode)) ! return 0; ! if ((buf.st_mode & 0111) == 0) ! return 0; ! return 1; } static int ! isdir(char *filename) /* Is directory */ { ! struct stat buf; ! if (stat(filename, &buf) != 0) ! return 0; ! if (!S_ISDIR(buf.st_mode)) ! return 0; ! return 1; } static void ! joinpath(char *buffer, char *stuff) ! { ! size_t n, k; ! if (stuff[0] == SEP) ! n = 0; ! else { ! n = strlen(buffer); ! if (n > 0 && buffer[n-1] != SEP && n < MAXPATHLEN) ! buffer[n++] = SEP; ! } ! k = strlen(stuff); ! if (n + k > MAXPATHLEN) ! k = MAXPATHLEN - n; ! strncpy(buffer+n, stuff, k); ! buffer[n+k] = '\0'; } static int ! search_for_prefix(char *argv0_path, char *home) ! { ! size_t n; ! char *vpath; ! /* If PYTHONHOME is set, we believe it unconditionally */ ! if (home) { ! char *delim; ! strcpy(prefix, home); ! delim = strchr(prefix, DELIM); ! if (delim) ! *delim = '\0'; ! joinpath(prefix, lib_python); ! joinpath(prefix, LANDMARK); ! return 1; ! } ! ! /* Check to see if argv[0] is in the build directory */ ! strcpy(prefix, argv0_path); ! joinpath(prefix, "Modules/Setup"); ! if (isfile(prefix)) { ! /* Check VPATH to see if argv0_path is in the build directory. ! * Complication: the VPATH passed in is relative to the ! * Modules build directory and points to the Modules source ! * directory; we need it relative to the build tree and ! * pointing to the source tree. Solution: chop off a leading ! * ".." (but only if it's there -- it could be an absolute ! * path) and chop off the final component (assuming it's ! * "Modules"). ! */ ! vpath = VPATH; ! if (vpath[0] == '.' && vpath[1] == '.' && vpath[2] == '/') ! vpath += 3; ! strcpy(prefix, argv0_path); ! joinpath(prefix, vpath); ! reduce(prefix); ! joinpath(prefix, "Lib"); ! joinpath(prefix, LANDMARK); ! if (ismodule(prefix)) ! return -1; ! } ! ! /* Search from argv0_path, until root is found */ ! strcpy(prefix, argv0_path); ! do { ! n = strlen(prefix); ! joinpath(prefix, lib_python); ! joinpath(prefix, LANDMARK); ! if (ismodule(prefix)) ! return 1; ! prefix[n] = '\0'; ! reduce(prefix); ! } while (prefix[0]); ! ! /* Look at configure's PREFIX */ ! strcpy(prefix, PREFIX); ! joinpath(prefix, lib_python); ! joinpath(prefix, LANDMARK); ! if (ismodule(prefix)) ! return 1; ! /* Fail */ ! return 0; } static int ! search_for_exec_prefix(char *argv0_path, char *home) ! { ! size_t n; ! /* If PYTHONHOME is set, we believe it unconditionally */ ! if (home) { ! char *delim; ! delim = strchr(home, DELIM); ! if (delim) ! strcpy(exec_prefix, delim+1); ! else ! strcpy(exec_prefix, home); ! joinpath(exec_prefix, lib_python); ! joinpath(exec_prefix, "lib-dynload"); ! return 1; ! } ! ! /* Check to see if argv[0] is in the build directory */ ! strcpy(exec_prefix, argv0_path); ! joinpath(exec_prefix, "Modules/Setup"); ! if (isfile(exec_prefix)) { ! reduce(exec_prefix); ! return -1; ! } ! ! /* Search from argv0_path, until root is found */ ! strcpy(exec_prefix, argv0_path); ! do { ! n = strlen(exec_prefix); ! joinpath(exec_prefix, lib_python); ! joinpath(exec_prefix, "lib-dynload"); ! if (isdir(exec_prefix)) ! return 1; ! exec_prefix[n] = '\0'; ! reduce(exec_prefix); ! } while (exec_prefix[0]); ! ! /* Look at configure's EXEC_PREFIX */ ! strcpy(exec_prefix, EXEC_PREFIX); ! joinpath(exec_prefix, lib_python); ! joinpath(exec_prefix, "lib-dynload"); ! if (isdir(exec_prefix)) ! return 1; ! /* Fail */ ! return 0; } *************** *** 361,395 **** calculate_path() { ! extern char *Py_GetProgramName(); ! static char delimiter[2] = {DELIM, '\0'}; ! static char separator[2] = {SEP, '\0'}; ! char *pythonpath = PYTHONPATH; ! char *rtpypath = getenv("PYTHONPATH"); ! char *home = Py_GetPythonHome(); ! char *path = getenv("PATH"); ! char *prog = Py_GetProgramName(); ! char argv0_path[MAXPATHLEN+1]; ! int pfound, efound; /* 1 if found; -1 if found build directory */ ! char *buf; ! size_t bufsz; ! size_t prefixsz; ! char *defpath = pythonpath; #ifdef WITH_NEXT_FRAMEWORK ! NSModule pythonModule; #endif #ifdef WITH_NEXT_FRAMEWORK ! pythonModule = NSModuleForSymbol(NSLookupAndBindSymbol("_Py_Initialize")); ! /* Use dylib functions to find out where the framework was loaded from */ ! buf = NSLibraryNameForModule(pythonModule); ! if (buf != NULL) { ! /* We're in a framework. */ ! strcpy(progpath, buf); ! ! /* Frameworks have support for versioning */ ! strcpy(lib_python, "lib"); ! } else { ! /* If we're not in a framework, fall back to the old way (even though NSNameOfModule() probably does the same thing.) */ #endif --- 350,386 ---- calculate_path() { ! extern char *Py_GetProgramName(); ! static char delimiter[2] = {DELIM, '\0'}; ! static char separator[2] = {SEP, '\0'}; ! char *pythonpath = PYTHONPATH; ! char *rtpypath = getenv("PYTHONPATH"); ! char *home = Py_GetPythonHome(); ! char *path = getenv("PATH"); ! char *prog = Py_GetProgramName(); ! char argv0_path[MAXPATHLEN+1]; ! int pfound, efound; /* 1 if found; -1 if found build directory */ ! char *buf; ! size_t bufsz; ! size_t prefixsz; ! char *defpath = pythonpath; #ifdef WITH_NEXT_FRAMEWORK ! NSModule pythonModule; #endif #ifdef WITH_NEXT_FRAMEWORK ! pythonModule = NSModuleForSymbol(NSLookupAndBindSymbol("_Py_Initialize")); ! /* Use dylib functions to find out where the framework was loaded from */ ! buf = NSLibraryNameForModule(pythonModule); ! if (buf != NULL) { ! /* We're in a framework. */ ! strcpy(progpath, buf); ! ! /* Frameworks have support for versioning */ ! strcpy(lib_python, "lib"); ! } ! else { ! /* If we're not in a framework, fall back to the old way ! (even though NSNameOfModule() probably does the same thing.) */ #endif *************** *** 403,579 **** */ if (strchr(prog, SEP)) ! strcpy(progpath, prog); else if (path) { ! while (1) { ! char *delim = strchr(path, DELIM); ! if (delim) { ! size_t len = delim - path; ! strncpy(progpath, path, len); ! *(progpath + len) = '\0'; ! } ! else ! strcpy(progpath, path); ! ! joinpath(progpath, prog); ! if (isxfile(progpath)) ! break; ! ! if (!delim) { ! progpath[0] = '\0'; ! break; ! } ! path = delim + 1; ! } } else ! progpath[0] = '\0'; #ifdef WITH_NEXT_FRAMEWORK ! } #endif ! strcpy(argv0_path, progpath); #if HAVE_READLINK ! { ! char tmpbuffer[MAXPATHLEN+1]; ! int linklen = readlink(progpath, tmpbuffer, MAXPATHLEN); ! while (linklen != -1) { ! /* It's not null terminated! */ ! tmpbuffer[linklen] = '\0'; ! if (tmpbuffer[0] == SEP) ! strcpy(argv0_path, tmpbuffer); ! else { ! /* Interpret relative to progpath */ ! reduce(argv0_path); ! joinpath(argv0_path, tmpbuffer); ! } ! linklen = readlink(argv0_path, tmpbuffer, MAXPATHLEN); ! } ! } #endif /* HAVE_READLINK */ ! reduce(argv0_path); ! if (!(pfound = search_for_prefix(argv0_path, home))) { ! if (!Py_FrozenFlag) ! fprintf(stderr, ! "Could not find platform independent libraries \n"); ! strcpy(prefix, PREFIX); ! joinpath(prefix, lib_python); ! } ! else ! reduce(prefix); ! if (!(efound = search_for_exec_prefix(argv0_path, home))) { ! if (!Py_FrozenFlag) ! fprintf(stderr, ! "Could not find platform dependent libraries \n"); ! strcpy(exec_prefix, EXEC_PREFIX); ! joinpath(exec_prefix, "lib/lib-dynload"); ! } ! /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */ ! ! if ((!pfound || !efound) && !Py_FrozenFlag) ! fprintf(stderr, ! "Consider setting $PYTHONHOME to [:]\n"); ! ! /* Calculate size of return buffer. ! */ ! bufsz = 0; ! ! if (rtpypath) ! bufsz += strlen(rtpypath) + 1; ! ! prefixsz = strlen(prefix) + 1; ! ! while (1) { ! char *delim = strchr(defpath, DELIM); ! ! if (defpath[0] != SEP) ! /* Paths are relative to prefix */ ! bufsz += prefixsz; ! ! if (delim) ! bufsz += delim - defpath + 1; ! else { ! bufsz += strlen(defpath) + 1; ! break; ! } ! defpath = delim + 1; ! } ! ! bufsz += strlen(exec_prefix) + 1; ! /* This is the only malloc call in this file */ ! buf = PyMem_Malloc(bufsz); ! if (buf == NULL) { ! /* We can't exit, so print a warning and limp along */ ! fprintf(stderr, "Not enough memory for dynamic PYTHONPATH.\n"); ! fprintf(stderr, "Using default static PYTHONPATH.\n"); ! module_search_path = PYTHONPATH; ! } ! else { ! /* Run-time value of $PYTHONPATH goes first */ ! if (rtpypath) { ! strcpy(buf, rtpypath); ! strcat(buf, delimiter); ! } ! else ! buf[0] = '\0'; ! ! /* Next goes merge of compile-time $PYTHONPATH with ! * dynamically located prefix. ! */ ! defpath = pythonpath; ! while (1) { ! char *delim = strchr(defpath, DELIM); ! ! if (defpath[0] != SEP) { ! strcat(buf, prefix); ! strcat(buf, separator); ! } ! ! if (delim) { ! size_t len = delim - defpath + 1; ! size_t end = strlen(buf) + len; ! strncat(buf, defpath, len); ! *(buf + end) = '\0'; ! } ! else { ! strcat(buf, defpath); ! break; ! } ! defpath = delim + 1; ! } ! strcat(buf, delimiter); ! /* Finally, on goes the directory for dynamic-load modules */ ! strcat(buf, exec_prefix); ! /* And publish the results */ ! module_search_path = buf; ! } ! /* Reduce prefix and exec_prefix to their essence, ! * e.g. /usr/local/lib/python1.5 is reduced to /usr/local. ! * If we're loading relative to the build directory, ! * return the compiled-in defaults instead. ! */ ! if (pfound > 0) { ! reduce(prefix); ! reduce(prefix); ! } ! else ! strcpy(prefix, PREFIX); ! if (efound > 0) { ! reduce(exec_prefix); ! reduce(exec_prefix); ! reduce(exec_prefix); ! } ! else ! strcpy(exec_prefix, EXEC_PREFIX); } --- 394,570 ---- */ if (strchr(prog, SEP)) ! strcpy(progpath, prog); else if (path) { ! while (1) { ! char *delim = strchr(path, DELIM); ! if (delim) { ! size_t len = delim - path; ! strncpy(progpath, path, len); ! *(progpath + len) = '\0'; ! } ! else ! strcpy(progpath, path); ! ! joinpath(progpath, prog); ! if (isxfile(progpath)) ! break; ! ! if (!delim) { ! progpath[0] = '\0'; ! break; ! } ! path = delim + 1; ! } } else ! progpath[0] = '\0'; #ifdef WITH_NEXT_FRAMEWORK ! } #endif ! strcpy(argv0_path, progpath); #if HAVE_READLINK ! { ! char tmpbuffer[MAXPATHLEN+1]; ! int linklen = readlink(progpath, tmpbuffer, MAXPATHLEN); ! while (linklen != -1) { ! /* It's not null terminated! */ ! tmpbuffer[linklen] = '\0'; ! if (tmpbuffer[0] == SEP) ! strcpy(argv0_path, tmpbuffer); ! else { ! /* Interpret relative to progpath */ ! reduce(argv0_path); ! joinpath(argv0_path, tmpbuffer); ! } ! linklen = readlink(argv0_path, tmpbuffer, MAXPATHLEN); ! } ! } #endif /* HAVE_READLINK */ ! reduce(argv0_path); ! if (!(pfound = search_for_prefix(argv0_path, home))) { ! if (!Py_FrozenFlag) ! fprintf(stderr, ! "Could not find platform independent libraries \n"); ! strcpy(prefix, PREFIX); ! joinpath(prefix, lib_python); ! } ! else ! reduce(prefix); ! if (!(efound = search_for_exec_prefix(argv0_path, home))) { ! if (!Py_FrozenFlag) ! fprintf(stderr, ! "Could not find platform dependent libraries \n"); ! strcpy(exec_prefix, EXEC_PREFIX); ! joinpath(exec_prefix, "lib/lib-dynload"); ! } ! /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */ ! ! if ((!pfound || !efound) && !Py_FrozenFlag) ! fprintf(stderr, ! "Consider setting $PYTHONHOME to [:]\n"); ! ! /* Calculate size of return buffer. ! */ ! bufsz = 0; ! ! if (rtpypath) ! bufsz += strlen(rtpypath) + 1; ! ! prefixsz = strlen(prefix) + 1; ! ! while (1) { ! char *delim = strchr(defpath, DELIM); ! ! if (defpath[0] != SEP) ! /* Paths are relative to prefix */ ! bufsz += prefixsz; ! ! if (delim) ! bufsz += delim - defpath + 1; ! else { ! bufsz += strlen(defpath) + 1; ! break; ! } ! defpath = delim + 1; ! } ! bufsz += strlen(exec_prefix) + 1; ! /* This is the only malloc call in this file */ ! buf = PyMem_Malloc(bufsz); ! if (buf == NULL) { ! /* We can't exit, so print a warning and limp along */ ! fprintf(stderr, "Not enough memory for dynamic PYTHONPATH.\n"); ! fprintf(stderr, "Using default static PYTHONPATH.\n"); ! module_search_path = PYTHONPATH; ! } ! else { ! /* Run-time value of $PYTHONPATH goes first */ ! if (rtpypath) { ! strcpy(buf, rtpypath); ! strcat(buf, delimiter); ! } ! else ! buf[0] = '\0'; ! /* Next goes merge of compile-time $PYTHONPATH with ! * dynamically located prefix. ! */ ! defpath = pythonpath; ! while (1) { ! char *delim = strchr(defpath, DELIM); ! ! if (defpath[0] != SEP) { ! strcat(buf, prefix); ! strcat(buf, separator); ! } ! ! if (delim) { ! size_t len = delim - defpath + 1; ! size_t end = strlen(buf) + len; ! strncat(buf, defpath, len); ! *(buf + end) = '\0'; ! } ! else { ! strcat(buf, defpath); ! break; ! } ! defpath = delim + 1; ! } ! strcat(buf, delimiter); ! /* Finally, on goes the directory for dynamic-load modules */ ! strcat(buf, exec_prefix); ! /* And publish the results */ ! module_search_path = buf; ! } ! ! /* Reduce prefix and exec_prefix to their essence, ! * e.g. /usr/local/lib/python1.5 is reduced to /usr/local. ! * If we're loading relative to the build directory, ! * return the compiled-in defaults instead. ! */ ! if (pfound > 0) { ! reduce(prefix); ! reduce(prefix); ! } ! else ! strcpy(prefix, PREFIX); ! ! if (efound > 0) { ! reduce(exec_prefix); ! reduce(exec_prefix); ! reduce(exec_prefix); ! } ! else ! strcpy(exec_prefix, EXEC_PREFIX); } *************** *** 584,590 **** Py_GetPath() { ! if (!module_search_path) ! calculate_path(); ! return module_search_path; } --- 575,581 ---- Py_GetPath() { ! if (!module_search_path) ! calculate_path(); ! return module_search_path; } *************** *** 592,598 **** Py_GetPrefix() { ! if (!module_search_path) ! calculate_path(); ! return prefix; } --- 583,589 ---- Py_GetPrefix() { ! if (!module_search_path) ! calculate_path(); ! return prefix; } *************** *** 600,606 **** Py_GetExecPrefix() { ! if (!module_search_path) ! calculate_path(); ! return exec_prefix; } --- 591,597 ---- Py_GetExecPrefix() { ! if (!module_search_path) ! calculate_path(); ! return exec_prefix; } *************** *** 608,613 **** Py_GetProgramFullPath() { ! if (!module_search_path) ! calculate_path(); ! return progpath; } --- 599,604 ---- Py_GetProgramFullPath() { ! if (!module_search_path) ! calculate_path(); ! return progpath; } From python-dev@python.org Sat Jul 8 07:41:05 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 7 Jul 2000 23:41:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules shamodule.c,2.6,2.7 Message-ID: <200007080641.XAA24616@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv24609 Modified Files: shamodule.c Log Message: ANSI-fied sources, converted to four-space indentation. Converted to PyArg_ParseTuple() with method names to get better error messages. Index: shamodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/shamodule.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** shamodule.c 2000/06/30 23:50:38 2.6 --- shamodule.c 2000/07/08 06:41:03 2.7 *************** *** 56,65 **** typedef struct { ! PyObject_HEAD ! SHA_INT32 digest[5]; /* Message digest */ ! SHA_INT32 count_lo, count_hi; /* 64-bit bit count */ ! SHA_BYTE data[SHA_BLOCKSIZE]; /* SHA data buffer */ ! int Endianness; ! int local; /* unprocessed amount in data */ } SHAobject; --- 56,65 ---- typedef struct { ! PyObject_HEAD ! SHA_INT32 digest[5]; /* Message digest */ ! SHA_INT32 count_lo, count_hi; /* 64-bit bit count */ ! SHA_BYTE data[SHA_BLOCKSIZE]; /* SHA data buffer */ ! int Endianness; ! int local; /* unprocessed amount in data */ } SHAobject; *************** *** 67,73 **** array of longwords. */ ! static void longReverse(buffer, byteCount, Endianness) ! SHA_INT32 *buffer; ! int byteCount, Endianness; { SHA_INT32 value; --- 67,71 ---- array of longwords. */ ! static void longReverse(SHA_INT32 *buffer, int byteCount, int Endianness) { SHA_INT32 value; *************** *** 77,82 **** byteCount /= sizeof(*buffer); ! while( byteCount-- ) ! { value = *buffer; value = ( ( value & 0xFF00FF00L ) >> 8 ) | \ --- 75,79 ---- byteCount /= sizeof(*buffer); ! while (byteCount--) { value = *buffer; value = ( ( value & 0xFF00FF00L ) >> 8 ) | \ *************** *** 86,98 **** } ! static void SHAcopy(src, dest) ! SHAobject *src, *dest; { ! dest->Endianness = src->Endianness; ! dest->local = src->local; ! dest->count_lo = src->count_lo; ! dest->count_hi = src->count_hi; ! memcpy(dest->digest, src->digest, sizeof(src->digest)); ! memcpy(dest->data, src->data, sizeof(src->data)); } --- 83,94 ---- } ! static void SHAcopy(SHAobject *src, SHAobject *dest) { ! dest->Endianness = src->Endianness; ! dest->local = src->local; ! dest->count_lo = src->count_lo; ! dest->count_hi = src->count_hi; ! memcpy(dest->digest, src->digest, sizeof(src->digest)); ! memcpy(dest->data, src->data, sizeof(src->data)); } *************** *** 174,179 **** static void ! sha_transform(sha_info) ! SHAobject *sha_info; { int i; --- 170,174 ---- static void ! sha_transform(SHAobject *sha_info) { int i; *************** *** 236,241 **** static void ! sha_init(sha_info) ! SHAobject *sha_info; { TestEndianness(sha_info->Endianness) --- 231,235 ---- static void ! sha_init(SHAobject *sha_info) { TestEndianness(sha_info->Endianness) *************** *** 254,261 **** static void ! sha_update(sha_info, buffer, count) ! SHAobject *sha_info; ! SHA_BYTE *buffer; ! int count; { int i; --- 248,252 ---- static void ! sha_update(SHAobject *sha_info, SHA_BYTE *buffer, int count) { int i; *************** *** 264,292 **** clo = sha_info->count_lo + ((SHA_INT32) count << 3); if (clo < sha_info->count_lo) { ! ++sha_info->count_hi; } sha_info->count_lo = clo; sha_info->count_hi += (SHA_INT32) count >> 29; if (sha_info->local) { ! i = SHA_BLOCKSIZE - sha_info->local; ! if (i > count) { ! i = count; ! } ! memcpy(((SHA_BYTE *) sha_info->data) + sha_info->local, ! buffer, i); ! count -= i; ! buffer += i; ! sha_info->local += i; ! if (sha_info->local == SHA_BLOCKSIZE) { ! sha_transform(sha_info); ! } else { ! return; ! } } while (count >= SHA_BLOCKSIZE) { ! memcpy(sha_info->data, buffer, SHA_BLOCKSIZE); ! buffer += SHA_BLOCKSIZE; ! count -= SHA_BLOCKSIZE; ! sha_transform(sha_info); } memcpy(sha_info->data, buffer, count); --- 255,283 ---- clo = sha_info->count_lo + ((SHA_INT32) count << 3); if (clo < sha_info->count_lo) { ! ++sha_info->count_hi; } sha_info->count_lo = clo; sha_info->count_hi += (SHA_INT32) count >> 29; if (sha_info->local) { ! i = SHA_BLOCKSIZE - sha_info->local; ! if (i > count) { ! i = count; ! } ! memcpy(((SHA_BYTE *) sha_info->data) + sha_info->local, buffer, i); ! count -= i; ! buffer += i; ! sha_info->local += i; ! if (sha_info->local == SHA_BLOCKSIZE) { ! sha_transform(sha_info); ! } ! else { ! return; ! } } while (count >= SHA_BLOCKSIZE) { ! memcpy(sha_info->data, buffer, SHA_BLOCKSIZE); ! buffer += SHA_BLOCKSIZE; ! count -= SHA_BLOCKSIZE; ! sha_transform(sha_info); } memcpy(sha_info->data, buffer, count); *************** *** 297,303 **** static void ! sha_final(digest, sha_info) ! unsigned char digest[20]; ! SHAobject *sha_info; { int count; --- 288,292 ---- static void ! sha_final(unsigned char digest[20], SHAobject *sha_info) { int count; *************** *** 308,313 **** count = (int) ((lo_bit_count >> 3) & 0x3f); ((SHA_BYTE *) sha_info->data)[count++] = 0x80; ! if (count > SHA_BLOCKSIZE - 8) ! { memset(((SHA_BYTE *) sha_info->data) + count, 0, SHA_BLOCKSIZE - count); --- 297,301 ---- count = (int) ((lo_bit_count >> 3) & 0x3f); ((SHA_BYTE *) sha_info->data)[count++] = 0x80; ! if (count > SHA_BLOCKSIZE - 8) { memset(((SHA_BYTE *) sha_info->data) + count, 0, SHA_BLOCKSIZE - count); *************** *** 315,320 **** memset((SHA_BYTE *) sha_info->data, 0, SHA_BLOCKSIZE - 8); } ! else ! { memset(((SHA_BYTE *) sha_info->data) + count, 0, SHA_BLOCKSIZE - 8 - count); --- 303,307 ---- memset((SHA_BYTE *) sha_info->data, 0, SHA_BLOCKSIZE - 8); } ! else { memset(((SHA_BYTE *) sha_info->data) + count, 0, SHA_BLOCKSIZE - 8 - count); *************** *** 366,370 **** newSHAobject() { ! return (SHAobject *)PyObject_New(SHAobject, &SHAtype); } --- 353,357 ---- newSHAobject() { ! return (SHAobject *)PyObject_New(SHAobject, &SHAtype); } *************** *** 372,379 **** static void ! SHA_dealloc(ptr) ! PyObject *ptr; { ! PyObject_Del(ptr); } --- 359,365 ---- static void ! SHA_dealloc(PyObject *ptr) { ! PyObject_Del(ptr); } *************** *** 385,403 **** static PyObject * ! SHA_copy(self, args) ! SHAobject *self; ! PyObject *args; ! { ! SHAobject *newobj; ! ! if (!PyArg_NoArgs(args)) { ! return NULL; ! } ! if ( (newobj = newSHAobject())==NULL) ! return NULL; ! ! SHAcopy(self, newobj); ! return (PyObject *)newobj; } --- 371,386 ---- static PyObject * ! SHA_copy(SHAobject *self, PyObject *args) ! { ! SHAobject *newobj; ! if (!PyArg_ParseTuple(args, ":copy")) { ! return NULL; ! } ! if ( (newobj = newSHAobject())==NULL) ! return NULL; ! ! SHAcopy(self, newobj); ! return (PyObject *)newobj; } *************** *** 406,422 **** static PyObject * ! SHA_digest(self, args) ! SHAobject *self; ! PyObject *args; ! { ! unsigned char digest[SHA_DIGESTSIZE]; ! SHAobject temp; ! ! if (!PyArg_NoArgs(args)) ! return NULL; ! ! SHAcopy(self, &temp); ! sha_final(digest, &temp); ! return PyString_FromStringAndSize((const char *)digest, sizeof(digest)); } --- 389,403 ---- static PyObject * ! SHA_digest(SHAobject *self, PyObject *args) ! { ! unsigned char digest[SHA_DIGESTSIZE]; ! SHAobject temp; ! ! if (!PyArg_ParseTuple(args, ":digest")) ! return NULL; ! ! SHAcopy(self, &temp); ! sha_final(digest, &temp); ! return PyString_FromStringAndSize((const char *)digest, sizeof(digest)); } *************** *** 425,460 **** static PyObject * ! SHA_hexdigest(self, args) ! SHAobject *self; ! PyObject *args; ! { ! unsigned char digest[SHA_DIGESTSIZE]; ! SHAobject temp; ! PyObject *retval; ! char *hex_digest; ! int i, j; ! ! if (!PyArg_NoArgs(args)) ! return NULL; ! ! /* Get the raw (binary) digest value */ ! SHAcopy(self, &temp); ! sha_final(digest, &temp); ! ! /* Create a new string */ ! retval = PyString_FromStringAndSize(NULL, sizeof(digest) * 2); ! hex_digest = PyString_AsString(retval); ! ! /* Make hex version of the digest */ ! for(i=j=0; i9) ? c+'a'-10 : c + '0'; ! hex_digest[j++] = c; ! c = digest[i] % 16; c = (c>9) ? c+'a'-10 : c + '0'; ! hex_digest[j++] = c; ! } ! ! return retval; } --- 406,437 ---- static PyObject * ! SHA_hexdigest(SHAobject *self, PyObject *args) ! { ! unsigned char digest[SHA_DIGESTSIZE]; ! SHAobject temp; ! PyObject *retval; ! char *hex_digest; ! int i, j; ! ! if (!PyArg_ParseTuple(args, ":hexdigest")) ! return NULL; ! ! /* Get the raw (binary) digest value */ ! SHAcopy(self, &temp); ! sha_final(digest, &temp); ! ! /* Create a new string */ ! retval = PyString_FromStringAndSize(NULL, sizeof(digest) * 2); ! hex_digest = PyString_AsString(retval); ! ! /* Make hex version of the digest */ ! for(i=j=0; i9) ? c+'a'-10 : c + '0'; ! hex_digest[j++] = c; ! c = digest[i] % 16; c = (c>9) ? c+'a'-10 : c + '0'; ! hex_digest[j++] = c; ! } ! return retval; } *************** *** 463,513 **** static PyObject * ! SHA_update(self, args) ! SHAobject *self; ! PyObject *args; { ! unsigned char *cp; ! int len; ! if (!PyArg_Parse(args, "s#", &cp, &len)) ! return NULL; ! sha_update(self, cp, len); ! Py_INCREF(Py_None); ! return Py_None; } static PyMethodDef SHA_methods[] = { ! {"copy", (PyCFunction)SHA_copy, 0, SHA_copy__doc__}, ! {"digest", (PyCFunction)SHA_digest, 0, SHA_digest__doc__}, ! {"hexdigest", (PyCFunction)SHA_hexdigest, 0, SHA_hexdigest__doc__}, ! {"update", (PyCFunction)SHA_update, 0, SHA_update__doc__}, ! {NULL, NULL} /* sentinel */ }; static PyObject * ! SHA_getattr(self, name) ! PyObject *self; ! char *name; ! { ! if (strcmp(name, "blocksize")==0) ! return PyInt_FromLong(1); ! if (strcmp(name, "digestsize")==0) ! return PyInt_FromLong(20); ! ! return Py_FindMethod(SHA_methods, self, name); } static PyTypeObject SHAtype = { ! PyObject_HEAD_INIT(NULL) ! 0, /*ob_size*/ ! "SHA", /*tp_name*/ ! sizeof(SHAobject), /*tp_size*/ ! 0, /*tp_itemsize*/ ! /* methods */ ! SHA_dealloc, /*tp_dealloc*/ ! 0, /*tp_print*/ ! SHA_getattr, /*tp_getattr*/ }; --- 440,486 ---- static PyObject * ! SHA_update(SHAobject *self, PyObject *args) { ! unsigned char *cp; ! int len; ! if (!PyArg_ParseTuple(args, "s#:update", &cp, &len)) ! return NULL; ! sha_update(self, cp, len); ! Py_INCREF(Py_None); ! return Py_None; } static PyMethodDef SHA_methods[] = { ! {"copy", (PyCFunction)SHA_copy, METH_VARARGS, SHA_copy__doc__}, ! {"digest", (PyCFunction)SHA_digest, METH_VARARGS, SHA_digest__doc__}, ! {"hexdigest", (PyCFunction)SHA_hexdigest, METH_VARARGS, SHA_hexdigest__doc__}, ! {"update", (PyCFunction)SHA_update, METH_VARARGS, SHA_update__doc__}, ! {NULL, NULL} /* sentinel */ }; static PyObject * ! SHA_getattr(PyObject *self, char *name) ! { ! if (strcmp(name, "blocksize")==0) ! return PyInt_FromLong(1); ! if (strcmp(name, "digestsize")==0) ! return PyInt_FromLong(20); ! ! return Py_FindMethod(SHA_methods, self, name); } static PyTypeObject SHAtype = { ! PyObject_HEAD_INIT(NULL) ! 0, /*ob_size*/ ! "SHA", /*tp_name*/ ! sizeof(SHAobject), /*tp_size*/ ! 0, /*tp_itemsize*/ ! /* methods */ ! SHA_dealloc, /*tp_dealloc*/ ! 0, /*tp_print*/ ! SHA_getattr, /*tp_getattr*/ }; *************** *** 521,553 **** static PyObject * ! SHA_new(self, args, kwdict) ! PyObject *self; ! PyObject *args; ! PyObject *kwdict; ! { ! static char *kwlist[] = {"string", NULL}; ! SHAobject *new; ! unsigned char *cp = NULL; ! int len; ! if ((new = newSHAobject()) == NULL) ! return NULL; ! if (!PyArg_ParseTupleAndKeywords(args, kwdict, "|s#:new", kwlist, ! &cp, &len)) { ! Py_DECREF(new); ! return NULL; ! } ! ! sha_init(new); ! ! if (PyErr_Occurred()) { ! Py_DECREF(new); ! return NULL; ! } ! if (cp) ! sha_update(new, cp, len); ! return (PyObject *)new; } --- 494,523 ---- static PyObject * ! SHA_new(PyObject *self, PyObject *args, PyObject *kwdict) ! { ! static char *kwlist[] = {"string", NULL}; ! SHAobject *new; ! unsigned char *cp = NULL; ! int len; ! if ((new = newSHAobject()) == NULL) ! return NULL; ! if (!PyArg_ParseTupleAndKeywords(args, kwdict, "|s#:new", kwlist, ! &cp, &len)) { ! Py_DECREF(new); ! return NULL; ! } ! ! sha_init(new); ! if (PyErr_Occurred()) { ! Py_DECREF(new); ! return NULL; ! } ! if (cp) ! sha_update(new, cp, len); ! ! return (PyObject *)new; } *************** *** 556,562 **** static struct PyMethodDef SHA_functions[] = { ! {"new", (PyCFunction)SHA_new, METH_VARARGS|METH_KEYWORDS, SHA_new__doc__}, ! {"sha", (PyCFunction)SHA_new, METH_VARARGS|METH_KEYWORDS, SHA_new__doc__}, ! {NULL, NULL} /* Sentinel */ }; --- 526,532 ---- static struct PyMethodDef SHA_functions[] = { ! {"new", (PyCFunction)SHA_new, METH_VARARGS|METH_KEYWORDS, SHA_new__doc__}, ! {"sha", (PyCFunction)SHA_new, METH_VARARGS|METH_KEYWORDS, SHA_new__doc__}, ! {NULL, NULL} /* Sentinel */ }; *************** *** 571,589 **** initsha() { ! PyObject *d, *m; ! SHAtype.ob_type = &PyType_Type; ! m = Py_InitModule("sha", SHA_functions); ! /* Add some symbolic constants to the module */ ! d = PyModule_GetDict(m); ! insint("blocksize", 1); /* For future use, in case some hash ! functions require an integral number of ! blocks */ ! insint("digestsize", 20); ! ! /* Check for errors */ ! if (PyErr_Occurred()) ! Py_FatalError("can't initialize module SHA"); } - --- 541,558 ---- initsha() { ! PyObject *d, *m; ! SHAtype.ob_type = &PyType_Type; ! m = Py_InitModule("sha", SHA_functions); ! /* Add some symbolic constants to the module */ ! d = PyModule_GetDict(m); ! insint("blocksize", 1); /* For future use, in case some hash ! functions require an integral number of ! blocks */ ! insint("digestsize", 20); ! ! /* Check for errors */ ! if (PyErr_Occurred()) ! Py_FatalError("can't initialize module SHA"); } From python-dev@python.org Sat Jul 8 13:04:59 2000 From: python-dev@python.org (Skip Montanaro) Date: Sat, 8 Jul 2000 05:04:59 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects classobject.c,2.97,2.98 Message-ID: <200007081204.FAA28621@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv28607 Modified Files: classobject.c Log Message: _Py_RefTotal should only be declared here when Py_TRACE_REFS are #define'd Index: classobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/classobject.c,v retrieving revision 2.97 retrieving revision 2.98 diff -C2 -r2.97 -r2.98 *** classobject.c 2000/07/01 01:00:38 2.97 --- classobject.c 2000/07/08 12:04:57 2.98 *************** *** 524,528 **** --- 524,530 ---- PyObject *del; static PyObject *delstr; + #ifdef Py_TRACE_REFS extern long _Py_RefTotal; + #endif PyObject_GC_Fini(inst); /* Call the __del__ method if it exists. First temporarily From python-dev@python.org Sat Jul 8 13:06:38 2000 From: python-dev@python.org (Skip Montanaro) Date: Sat, 8 Jul 2000 05:06:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects object.c,2.81,2.82 Message-ID: <200007081206.FAA29188@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv29144 Modified Files: object.c Log Message: delete unused local variable from _PyTrash_deposit_object Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.81 retrieving revision 2.82 diff -C2 -r2.81 -r2.82 *** object.c 2000/07/03 09:57:53 2.81 --- object.c 2000/07/08 12:06:36 2.82 *************** *** 1170,1174 **** { int typecode; - PyObject *hold = _PyTrash_delete_later; if (PyTuple_Check(op)) --- 1170,1173 ---- From python-dev@python.org Sat Jul 8 17:56:29 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 09:56:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules grpmodule.c,2.11,2.12 Message-ID: <200007081656.JAA06016@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6006 Modified Files: grpmodule.c Log Message: ANSI-fication of the sources, convert to 4-space indents. Use PyArg_ParseTuple() to get better error messages. Add docstrings all around. Index: grpmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/grpmodule.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** grpmodule.c 2000/06/30 23:58:05 2.11 --- grpmodule.c 2000/07/08 16:56:26 2.12 *************** *** 16,111 **** #include ! static PyObject *mkgrent(p) ! struct group *p; { ! PyObject *v, *w; ! char **member; ! if ((w = PyList_New(0)) == NULL) { ! return NULL; ! } ! for (member = p->gr_mem; *member != NULL; member++) { ! PyObject *x = PyString_FromString(*member); ! if (x == NULL || PyList_Append(w, x) != 0) { ! Py_XDECREF(x); ! Py_DECREF(w); ! return NULL; ! } ! Py_DECREF(x); ! } ! v = Py_BuildValue("(sslO)", ! p->gr_name, ! p->gr_passwd, #if defined(NeXT) && defined(_POSIX_SOURCE) && defined(__LITTLE_ENDIAN__) /* Correct a bug present on Intel machines in NextStep 3.2 and 3.3; for later versions you may have to remove this */ ! (long)p->gr_short_pad, /* ugh-NeXT broke the padding */ #else ! (long)p->gr_gid, #endif ! w); ! Py_DECREF(w); ! return v; } ! static PyObject *grp_getgrgid(self, args) ! PyObject *self, *args; { ! int gid; ! struct group *p; ! if (!PyArg_Parse((args),"i",(&gid))) ! return NULL; ! if ((p = getgrgid(gid)) == NULL) { ! PyErr_SetString(PyExc_KeyError, "getgrgid(): gid not found"); ! return NULL; ! } ! return mkgrent(p); } ! static PyObject *grp_getgrnam(self, args) ! PyObject *self, *args; { ! char *name; ! struct group *p; ! if (!PyArg_Parse((args),"s",(&name))) ! return NULL; ! if ((p = getgrnam(name)) == NULL) { ! PyErr_SetString(PyExc_KeyError, "getgrnam(): name not found"); ! return NULL; ! } ! return mkgrent(p); } ! static PyObject *grp_getgrall(self, args) ! PyObject *self, *args; { ! PyObject *d; ! struct group *p; ! if (!PyArg_NoArgs(args)) ! return NULL; ! if ((d = PyList_New(0)) == NULL) ! return NULL; ! setgrent(); ! while ((p = getgrent()) != NULL) { ! PyObject *v = mkgrent(p); ! if (v == NULL || PyList_Append(d, v) != 0) { ! Py_XDECREF(v); ! Py_DECREF(d); ! return NULL; ! } ! Py_DECREF(v); ! } ! return d; } static PyMethodDef grp_methods[] = { ! {"getgrgid", grp_getgrgid}, ! {"getgrnam", grp_getgrnam}, ! {"getgrall", grp_getgrall}, ! {NULL, NULL} /* sentinel */ }; DL_EXPORT(void) initgrp() { ! Py_InitModule("grp", grp_methods); } --- 16,138 ---- #include ! ! static PyObject * ! mkgrent(struct group *p) { ! PyObject *v, *w; ! char **member; ! if ((w = PyList_New(0)) == NULL) { ! return NULL; ! } ! for (member = p->gr_mem; *member != NULL; member++) { ! PyObject *x = PyString_FromString(*member); ! if (x == NULL || PyList_Append(w, x) != 0) { ! Py_XDECREF(x); ! Py_DECREF(w); ! return NULL; ! } ! Py_DECREF(x); ! } ! v = Py_BuildValue("(sslO)", ! p->gr_name, ! p->gr_passwd, #if defined(NeXT) && defined(_POSIX_SOURCE) && defined(__LITTLE_ENDIAN__) /* Correct a bug present on Intel machines in NextStep 3.2 and 3.3; for later versions you may have to remove this */ ! (long)p->gr_short_pad, /* ugh-NeXT broke the padding */ #else ! (long)p->gr_gid, #endif ! w); ! Py_DECREF(w); ! return v; } ! static PyObject * ! grp_getgrgid(PyObject *self, PyObject *args) { ! int gid; ! struct group *p; ! if (!PyArg_ParseTuple(args, "i:getgrgid", &gid)) ! return NULL; ! if ((p = getgrgid(gid)) == NULL) { ! PyErr_SetString(PyExc_KeyError, "getgrgid(): gid not found"); ! return NULL; ! } ! return mkgrent(p); } ! static PyObject * ! grp_getgrnam(PyObject *self, PyObject *args) { ! char *name; ! struct group *p; ! if (!PyArg_ParseTuple(args, "s:getgrnam", &name)) ! return NULL; ! if ((p = getgrnam(name)) == NULL) { ! PyErr_SetString(PyExc_KeyError, "getgrnam(): name not found"); ! return NULL; ! } ! return mkgrent(p); } ! static PyObject * ! grp_getgrall(PyObject *self, PyObject *args) { ! PyObject *d; ! struct group *p; ! ! if (!PyArg_ParseTuple(args, ":getgrall")) ! return NULL; ! if ((d = PyList_New(0)) == NULL) ! return NULL; ! setgrent(); ! while ((p = getgrent()) != NULL) { ! PyObject *v = mkgrent(p); ! if (v == NULL || PyList_Append(d, v) != 0) { ! Py_XDECREF(v); ! Py_DECREF(d); ! return NULL; ! } ! Py_DECREF(v); ! } ! return d; } static PyMethodDef grp_methods[] = { ! {"getgrgid", grp_getgrgid, METH_VARARGS, ! "getgrgid(id) -> tuple\n\ ! Return the group database entry for the given numeric group ID. If\n\ ! id is not valid, raise KeyError."}, ! {"getgrnam", grp_getgrnam, METH_VARARGS, ! "getgrnam(name) -> tuple\n\ ! Return the group database entry for the given group name. If\n\ ! name is not valid, raise KeyError."}, ! {"getgrall", grp_getgrall, METH_VARARGS, ! "getgrall() -> list of tuples\n\ ! Return a list of all available group entries, in arbitrary order."}, ! {NULL, NULL} /* sentinel */ }; + static char grp__doc__[] = + "Access to the Unix group database.\n\ + \n\ + Group entries are reported as 4-tuples containing the following fields\n\ + from the group database, in order:\n\ + \n\ + name - name of the group\n\ + passwd - group password (encrypted); often empty\n\ + gid - numeric ID of the group\n\ + mem - list of members\n\ + \n\ + The gid is an integer, name and password are strings. (Note that most\n\ + users are not explicitly listed as members of the groups they are in\n\ + according to the password database. Check both databases to get\n\ + complete membership information.)"; + + DL_EXPORT(void) initgrp() { ! Py_InitModule3("grp", grp_methods, grp__doc__); } From python-dev@python.org Sat Jul 8 17:59:05 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 09:59:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libgrp.tex,1.14,1.15 Message-ID: <200007081659.JAA06087@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv6080/lib Modified Files: libgrp.tex Log Message: Minor revisions similar to some information in the new docstrings. Index: libgrp.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libgrp.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** libgrp.tex 2000/04/03 20:13:53 1.14 --- libgrp.tex 2000/07/08 16:59:03 1.15 *************** *** 23,28 **** list is a list of strings. (Note that most users are not explicitly listed as members of the ! group they are in according to the password database.) ! \exception{KeyError} is raised if the entry asked for cannot be found. It defines the following items: --- 23,28 ---- list is a list of strings. (Note that most users are not explicitly listed as members of the ! group they are in according to the password database. Check both ! databases to get complete membership information.) It defines the following items: *************** *** 30,37 **** --- 30,39 ---- \begin{funcdesc}{getgrgid}{gid} Return the group database entry for the given numeric group ID. + \exception{KeyError} is raised if the entry asked for cannot be found. \end{funcdesc} \begin{funcdesc}{getgrnam}{name} Return the group database entry for the given group name. + \exception{KeyError} is raised if the entry asked for cannot be found. \end{funcdesc} From python-dev@python.org Sat Jul 8 18:25:57 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 10:25:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include modsupport.h,2.30,2.31 pyerrors.h,2.37,2.38 Message-ID: <200007081725.KAA13990@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv13980 Modified Files: modsupport.h pyerrors.h Log Message: ANSI-fication of the sources -- remove Py_PROTO! Index: modsupport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/modsupport.h,v retrieving revision 2.30 retrieving revision 2.31 diff -C2 -r2.30 -r2.31 *** modsupport.h 2000/06/30 23:58:04 2.30 --- modsupport.h 2000/07/08 17:25:54 2.31 *************** *** 1,8 **** - #ifndef Py_MODSUPPORT_H - #define Py_MODSUPPORT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 15,18 **** --- 9,18 ---- ******************************************************************/ + #ifndef Py_MODSUPPORT_H + #define Py_MODSUPPORT_H + #ifdef __cplusplus + extern "C" { + #endif + /* Module support interface */ *************** *** 21,29 **** #include ! extern DL_IMPORT(int) PyArg_Parse Py_PROTO((PyObject *, char *, ...)); ! extern DL_IMPORT(int) PyArg_ParseTuple Py_PROTO((PyObject *, char *, ...)); ! extern DL_IMPORT(int) PyArg_ParseTupleAndKeywords Py_PROTO((PyObject *, PyObject *, ! char *, char **, ...)); ! extern DL_IMPORT(PyObject *) Py_BuildValue Py_PROTO((char *, ...)); #else --- 21,29 ---- #include ! extern DL_IMPORT(int) PyArg_Parse(PyObject *, char *, ...); ! extern DL_IMPORT(int) PyArg_ParseTuple(PyObject *, char *, ...); ! extern DL_IMPORT(int) PyArg_ParseTupleAndKeywords(PyObject *, PyObject *, ! char *, char **, ...); ! extern DL_IMPORT(PyObject *) Py_BuildValue(char *, ...); #else *************** *** 38,43 **** #endif ! extern DL_IMPORT(int) PyArg_VaParse Py_PROTO((PyObject *, char *, va_list)); ! extern DL_IMPORT(PyObject *) Py_VaBuildValue Py_PROTO((char *, va_list)); #define PYTHON_API_VERSION 1009 --- 38,43 ---- #endif ! extern DL_IMPORT(int) PyArg_VaParse(PyObject *, char *, va_list); ! extern DL_IMPORT(PyObject *) Py_VaBuildValue(char *, va_list); #define PYTHON_API_VERSION 1009 *************** *** 90,96 **** #define Py_InitModule4 Py_InitModule4TraceRefs #endif - extern DL_IMPORT(PyObject *) Py_InitModule4 Py_PROTO((char *, PyMethodDef *, - char *, PyObject *, int)); #define Py_InitModule(name, methods) \ Py_InitModule4(name, methods, (char *)NULL, (PyObject *)NULL, \ --- 90,98 ---- #define Py_InitModule4 Py_InitModule4TraceRefs #endif + + extern DL_IMPORT(PyObject *) Py_InitModule4(char *name, PyMethodDef *methods, + char *doc, PyObject *self, + int apiver); #define Py_InitModule(name, methods) \ Py_InitModule4(name, methods, (char *)NULL, (PyObject *)NULL, \ Index: pyerrors.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyerrors.h,v retrieving revision 2.37 retrieving revision 2.38 diff -C2 -r2.37 -r2.38 *** pyerrors.h 2000/06/30 23:58:04 2.37 --- pyerrors.h 2000/07/08 17:25:55 2.38 *************** *** 17,32 **** /* Error handling definitions */ ! DL_IMPORT(void) PyErr_SetNone Py_PROTO((PyObject *)); ! DL_IMPORT(void) PyErr_SetObject Py_PROTO((PyObject *, PyObject *)); ! DL_IMPORT(void) PyErr_SetString Py_PROTO((PyObject *, const char *)); ! DL_IMPORT(PyObject *) PyErr_Occurred Py_PROTO((void)); ! DL_IMPORT(void) PyErr_Clear Py_PROTO((void)); ! DL_IMPORT(void) PyErr_Fetch Py_PROTO((PyObject **, PyObject **, PyObject **)); ! DL_IMPORT(void) PyErr_Restore Py_PROTO((PyObject *, PyObject *, PyObject *)); /* Error testing and normalization */ ! DL_IMPORT(int) PyErr_GivenExceptionMatches Py_PROTO((PyObject *, PyObject *)); ! DL_IMPORT(int) PyErr_ExceptionMatches Py_PROTO((PyObject *)); ! DL_IMPORT(void) PyErr_NormalizeException Py_PROTO((PyObject**, PyObject**, PyObject**)); --- 17,32 ---- /* Error handling definitions */ ! DL_IMPORT(void) PyErr_SetNone(PyObject *); ! DL_IMPORT(void) PyErr_SetObject(PyObject *, PyObject *); ! DL_IMPORT(void) PyErr_SetString(PyObject *, const char *); ! DL_IMPORT(PyObject *) PyErr_Occurred(void); ! DL_IMPORT(void) PyErr_Clear(void); ! DL_IMPORT(void) PyErr_Fetch(PyObject **, PyObject **, PyObject **); ! DL_IMPORT(void) PyErr_Restore(PyObject *, PyObject *, PyObject *); /* Error testing and normalization */ ! DL_IMPORT(int) PyErr_GivenExceptionMatches(PyObject *, PyObject *); ! DL_IMPORT(int) PyErr_ExceptionMatches(PyObject *); ! DL_IMPORT(void) PyErr_NormalizeException(PyObject**, PyObject**, PyObject**); *************** *** 55,58 **** --- 55,60 ---- extern DL_IMPORT(PyObject *) PyExc_NotImplementedError; extern DL_IMPORT(PyObject *) PyExc_SyntaxError; + extern DL_IMPORT(PyObject *) PyExc_IndentationError; + extern DL_IMPORT(PyObject *) PyExc_TabError; extern DL_IMPORT(PyObject *) PyExc_SystemError; extern DL_IMPORT(PyObject *) PyExc_SystemExit; *************** *** 71,79 **** /* Convenience functions */ ! extern DL_IMPORT(int) PyErr_BadArgument Py_PROTO((void)); ! extern DL_IMPORT(PyObject *) PyErr_NoMemory Py_PROTO((void)); ! extern DL_IMPORT(PyObject *) PyErr_SetFromErrno Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyErr_SetFromErrnoWithFilename Py_PROTO((PyObject *, char *)); ! extern DL_IMPORT(PyObject *) PyErr_Format Py_PROTO((PyObject *, const char *, ...)); #ifdef MS_WINDOWS extern DL_IMPORT(PyObject *) PyErr_SetFromWindowsErrWithFilename(int, const char *); --- 73,81 ---- /* Convenience functions */ ! extern DL_IMPORT(int) PyErr_BadArgument(void); ! extern DL_IMPORT(PyObject *) PyErr_NoMemory(void); ! extern DL_IMPORT(PyObject *) PyErr_SetFromErrno(PyObject *); ! extern DL_IMPORT(PyObject *) PyErr_SetFromErrnoWithFilename(PyObject *, char *); ! extern DL_IMPORT(PyObject *) PyErr_Format(PyObject *, const char *, ...); #ifdef MS_WINDOWS extern DL_IMPORT(PyObject *) PyErr_SetFromWindowsErrWithFilename(int, const char *); *************** *** 81,93 **** #endif ! extern DL_IMPORT(void) PyErr_BadInternalCall Py_PROTO((void)); /* Function to create a new exception */ ! DL_IMPORT(PyObject *) PyErr_NewException Py_PROTO((char *name, PyObject *base, ! PyObject *dict)); /* In sigcheck.c or signalmodule.c */ ! extern DL_IMPORT(int) PyErr_CheckSignals Py_PROTO((void)); ! extern DL_IMPORT(void) PyErr_SetInterrupt Py_PROTO((void)); --- 83,95 ---- #endif ! extern DL_IMPORT(void) PyErr_BadInternalCall(void); /* Function to create a new exception */ ! DL_IMPORT(PyObject *) PyErr_NewException(char *name, PyObject *base, ! PyObject *dict); /* In sigcheck.c or signalmodule.c */ ! extern DL_IMPORT(int) PyErr_CheckSignals(void); ! extern DL_IMPORT(void) PyErr_SetInterrupt(void); From python-dev@python.org Sat Jul 8 18:43:35 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 8 Jul 2000 10:43:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects object.c,2.82,2.83 Message-ID: <200007081743.KAA14976@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv14846/Objects Modified Files: object.c Log Message: - changed __repr__ to use "unicode escape" encoding for unicode strings, instead of the default encoding. (see "minidom" thread for discussion, and also patch #100706) Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.82 retrieving revision 2.83 diff -C2 -r2.82 -r2.83 *** object.c 2000/07/08 12:06:36 2.82 --- object.c 2000/07/08 17:43:32 2.83 *************** *** 268,272 **** if (PyUnicode_Check(res)) { PyObject* str; ! str = PyUnicode_AsEncodedString(res, NULL, NULL); Py_DECREF(res); if (str) --- 268,272 ---- if (PyUnicode_Check(res)) { PyObject* str; ! str = PyUnicode_AsUnicodeEscapeString(res); Py_DECREF(res); if (str) From python-dev@python.org Sat Jul 8 19:06:44 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 8 Jul 2000 11:06:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC WinMain.c,1.3,1.4 Message-ID: <200007081806.LAA23038@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv20032/PC Modified Files: WinMain.c Log Message: - this is a tentative checkin of the #100764 patch (by Barry Scott). it appears to solve the problem on NT and 2000, but not on Windows 95. in other words, it's better than before, but not per- fect. I'll leave the patch open for now. Index: WinMain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/WinMain.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** WinMain.c 1998/08/08 20:00:49 1.3 --- WinMain.c 2000/07/08 18:06:41 1.4 *************** *** 1,5 **** --- 1,9 ---- /* Minimal main program -- everything is loaded from the library. */ + #define WINDOWS_LEAN_AND_MEAN #include + #include + #include + #include "Python.h" *************** *** 7,16 **** int WINAPI WinMain( ! HINSTANCE hInstance, // handle to current instance ! HINSTANCE hPrevInstance, // handle to previous instance ! LPSTR lpCmdLine, // pointer to command line ! int nCmdShow // show state of window ) { ! return Py_Main(__argc, __argv); } --- 11,48 ---- int WINAPI WinMain( ! HINSTANCE hInstance, /* handle to current instance */ ! HINSTANCE hPrevInstance, /* handle to previous instance */ ! LPSTR lpCmdLine, /* pointer to command line */ ! int nCmdShow /* show state of window */ ) { ! int null_file; ! ! /* ! * make sure that the C RTL has valid file descriptors for ! * stdin, stdout, stderr. Use the NUL device if necessary. ! * This allows popen to work under pythonw. ! * ! * When pythonw.exe starts the C RTL function _ioinit is called ! * first. WinMain is called later hence the need to check for ! * invalid handles. ! * ! * Note: FILE stdin, stdout, stderr do not use the file descriptors ! * setup here. They are already initialised before WinMain was called. ! */ ! ! null_file = open("NUL", _O_RDWR); ! ! if (_get_osfhandle(0) == -1) ! dup2(null_file, 0); ! ! if (_get_osfhandle(1) == -1) ! dup2(null_file, 1); ! ! if (_get_osfhandle(2) == -1) ! dup2(null_file, 2); ! ! close(null_file); ! ! return Py_Main(__argc, __argv); } From python-dev@python.org Sat Jul 8 20:57:41 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 8 Jul 2000 12:57:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _localemodule.c,2.9,2.10 Message-ID: <200007081957.MAA02398@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2292/Modules Modified Files: _localemodule.c Log Message: - added _getdefaultlocale implementation for WIN32 - ansified, reindentified, spacified, nullified Index: _localemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_localemodule.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** _localemodule.c 2000/06/28 21:23:33 2.9 --- _localemodule.c 2000/07/08 19:57:37 2.10 *************** *** 7,10 **** --- 7,11 ---- This software comes with no warranty. Use at your own risk. + ******************************************************************/ *************** *** 15,24 **** #include #include #include "Python.h" #ifdef macintosh ! char *strdup Py_PROTO((char *)); #endif ! static char locale__doc__[]="Support for POSIX locales."; static PyObject *Error; --- 16,32 ---- #include #include + #include "Python.h" + + #if defined(MS_WIN32) + #define WINDOWS_LEAN_AND_MEAN + #include + #endif + #ifdef macintosh ! char *strdup(char *); #endif ! static char locale__doc__[] = "Support for POSIX locales."; static PyObject *Error; *************** *** 26,310 **** /* support functions for formatting floating point numbers */ ! static char setlocale__doc__[]= "(integer,string=None) -> string. Activates/queries locale processing." ; /* to record the LC_NUMERIC settings */ ! static PyObject* grouping=0; ! static PyObject* thousands_sep=0; ! static PyObject* decimal_point=0; /* if non-null, indicates that LC_NUMERIC is different from "C" */ ! static char* saved_numeric=0; /* the grouping is terminated by either 0 or CHAR_MAX */ static PyObject* ! copy_grouping(s) ! char* s; { ! int i; ! PyObject *result,*val=0; ! if(s[0]=='\0') ! /* empty string: no grouping at all */ ! return PyList_New(0); ! for(i=0;s[i]!='\0' && s[i]!=CHAR_MAX;i++) ! /* nothing */; ! result = PyList_New(i+1); ! if(!result)return NULL; ! i=-1; ! do{ ! i++; ! val=PyInt_FromLong(s[i]); ! if(!val)break; ! if(PyList_SetItem(result,i,val)){ ! Py_DECREF(val); ! val=0; ! break; } ! }while(s[i]!='\0' && s[i]!=CHAR_MAX); ! if(!val){ ! Py_DECREF(result); ! return NULL; ! } ! return result; } static void ! fixup_ulcase() { ! PyObject *mods,*strop,*string,*ulo; ! unsigned char ul[256]; ! int n,c; ! ! /* finding sys.modules */ ! mods=PyImport_GetModuleDict(); ! if(!mods)return; ! /* finding the module */ ! string=PyDict_GetItemString(mods,"string"); ! if(string) ! string=PyModule_GetDict(string); ! strop=PyDict_GetItemString(mods,"strop"); ! if(strop) ! strop=PyModule_GetDict(strop); ! if(!string && !strop)return; ! /* create uppercase */ ! n = 0; ! for (c = 0; c < 256; c++) { ! if (isupper(c)) ! ul[n++] = c; ! } ! ulo=PyString_FromStringAndSize((const char *)ul,n); ! if(!ulo)return; ! if(string) ! PyDict_SetItemString(string,"uppercase",ulo); ! if(strop) ! PyDict_SetItemString(strop,"uppercase",ulo); ! Py_DECREF(ulo); ! /* create lowercase */ ! n = 0; ! for (c = 0; c < 256; c++) { ! if (islower(c)) ! ul[n++] = c; ! } ! ulo=PyString_FromStringAndSize((const char *)ul,n); ! if(!ulo)return; ! if(string) ! PyDict_SetItemString(string,"lowercase",ulo); ! if(strop) ! PyDict_SetItemString(strop,"lowercase",ulo); ! Py_DECREF(ulo); ! /* create letters */ ! n = 0; ! for (c = 0; c < 256; c++) { ! if (isalpha(c)) ! ul[n++] = c; ! } ! ulo=PyString_FromStringAndSize((const char *)ul,n); ! if(!ulo)return; ! if(string) ! PyDict_SetItemString(string,"letters",ulo); ! Py_DECREF(ulo); } static PyObject* ! PyLocale_setlocale(self,args) ! PyObject *self; ! PyObject *args; { ! int category; ! char *locale=0,*result; ! PyObject *result_object; ! struct lconv *lc; ! if(!PyArg_ParseTuple(args,"i|z:setlocale",&category,&locale))return 0; ! if(locale){ ! /* set locale */ ! result=setlocale(category,locale); ! if(!result){ ! /* operation failed, no setting was changed */ ! PyErr_SetString(Error,"locale setting not supported"); ! return NULL; ! } ! result_object=PyString_FromString(result); ! if(!result)return NULL; ! /* record changes to LC_NUMERIC */ ! if(category==LC_NUMERIC || category==LC_ALL){ ! if(strcmp(locale,"C")==0 || strcmp(locale,"POSIX")==0){ ! /* user just asked for default numeric locale */ ! if(saved_numeric)free(saved_numeric); ! saved_numeric=0; ! }else{ ! /* remember values */ ! lc=localeconv(); ! Py_XDECREF(grouping); ! grouping=copy_grouping(lc->grouping); ! Py_XDECREF(thousands_sep); ! thousands_sep=PyString_FromString(lc->thousands_sep); ! Py_XDECREF(decimal_point); ! decimal_point=PyString_FromString(lc->decimal_point); ! saved_numeric = strdup(locale); ! ! /* restore to "C" */ ! setlocale(LC_NUMERIC,"C"); ! } ! } ! /* record changes to LC_CTYPE */ ! if(category==LC_CTYPE || category==LC_ALL) ! fixup_ulcase(); ! /* things that got wrong up to here are ignored */ ! PyErr_Clear(); ! }else{ ! /* get locale */ ! /* restore LC_NUMERIC first, if appropriate */ ! if(saved_numeric) ! setlocale(LC_NUMERIC,saved_numeric); ! result=setlocale(category,NULL); ! if(!result){ ! PyErr_SetString(Error,"locale query failed"); ! return NULL; } ! result_object=PyString_FromString(result); ! /* restore back to "C" */ ! if(saved_numeric) ! setlocale(LC_NUMERIC,"C"); ! } ! return result_object; } ! static char localeconv__doc__[]= "() -> dict. Returns numeric and monetary locale-specific parameters." ; static PyObject* ! PyLocale_localeconv(self,args) ! PyObject *self; ! PyObject *args; { ! PyObject* result; ! struct lconv *l; ! PyObject *x; ! if(!PyArg_NoArgs(args))return 0; ! result = PyDict_New(); ! if(!result)return 0; ! /* if LC_NUMERIC is different in the C library, use saved value */ ! l = localeconv(); ! /* hopefully, the localeconv result survives the C library calls ! involved herein */ ! #define RESULT_STRING(s) \ ! x=PyString_FromString(l->s);if(!x)goto failed;PyDict_SetItemString(result,#s,x);Py_XDECREF(x) ! #define RESULT_INT(i) \ ! x=PyInt_FromLong(l->i);if(!x)goto failed;PyDict_SetItemString(result,#i,x);Py_XDECREF(x) /* Numeric information */ ! if(saved_numeric){ ! /* cannot use localeconv results */ ! PyDict_SetItemString(result,"decimal_point",decimal_point); ! PyDict_SetItemString(result,"grouping",grouping); ! PyDict_SetItemString(result,"thousands_sep",thousands_sep); ! }else{ ! RESULT_STRING(decimal_point); ! RESULT_STRING(thousands_sep); ! x=copy_grouping(l->grouping); ! if(!x)goto failed; ! PyDict_SetItemString(result,"grouping",x); ! Py_XDECREF(x); ! } ! ! /* Monetary information */ ! RESULT_STRING(int_curr_symbol); ! RESULT_STRING(currency_symbol); ! RESULT_STRING(mon_decimal_point); ! RESULT_STRING(mon_thousands_sep); ! x=copy_grouping(l->mon_grouping); ! if(!x)goto failed; ! PyDict_SetItemString(result,"mon_grouping",x); ! Py_XDECREF(x); ! RESULT_STRING(positive_sign); ! RESULT_STRING(negative_sign); ! RESULT_INT(int_frac_digits); ! RESULT_INT(frac_digits); ! RESULT_INT(p_cs_precedes); ! RESULT_INT(p_sep_by_space); ! RESULT_INT(n_cs_precedes); ! RESULT_INT(n_sep_by_space); ! RESULT_INT(p_sign_posn); ! RESULT_INT(n_sign_posn); ! ! return result; ! failed: ! Py_XDECREF(result); ! Py_XDECREF(x); ! return NULL; } ! static char strcoll__doc__[]= "string,string -> int. Compares two strings according to the locale." ; static PyObject* ! PyLocale_strcoll(self,args) ! PyObject *self; ! PyObject *args; { char *s1,*s2; ! if(!PyArg_ParseTuple(args,"ss:strcoll",&s1,&s2)) ! return NULL; ! return PyInt_FromLong(strcoll(s1,s2)); } ! static char strxfrm__doc__[]= "string -> string. Returns a string that behaves for cmp locale-aware." ; static PyObject* ! PyLocale_strxfrm(self,args) ! PyObject* self; ! PyObject* args; { ! char *s,*buf; ! size_t n1,n2; ! PyObject *result; ! if(!PyArg_ParseTuple(args,"s:strxfrm",&s)) ! return NULL; ! /* assume no change in size, first */ ! n1=strlen(s)+1; ! buf=PyMem_Malloc(n1); ! if(!buf)return PyErr_NoMemory(); ! n2=strxfrm(buf,s,n1); ! if(n2>n1){ ! /* more space needed */ ! buf=PyMem_Realloc(buf,n2); ! if(!buf)return PyErr_NoMemory(); ! strxfrm(buf,s,n2); ! } ! result=PyString_FromString(buf); ! PyMem_Free(buf); ! return result; } static struct PyMethodDef PyLocale_Methods[] = { ! {"setlocale",(PyCFunction)PyLocale_setlocale,1,setlocale__doc__}, ! {"localeconv",(PyCFunction)PyLocale_localeconv,0,localeconv__doc__}, ! {"strcoll",(PyCFunction)PyLocale_strcoll,1,strcoll__doc__}, ! {"strxfrm",(PyCFunction)PyLocale_strxfrm,1,strxfrm__doc__}, {NULL, NULL} }; --- 34,389 ---- /* support functions for formatting floating point numbers */ ! static char setlocale__doc__[] = "(integer,string=None) -> string. Activates/queries locale processing." ; /* to record the LC_NUMERIC settings */ ! static PyObject* grouping = NULL; ! static PyObject* thousands_sep = NULL; ! static PyObject* decimal_point = NULL; /* if non-null, indicates that LC_NUMERIC is different from "C" */ ! static char* saved_numeric = NULL; /* the grouping is terminated by either 0 or CHAR_MAX */ static PyObject* ! copy_grouping(char* s) { ! int i; ! PyObject *result, *val = NULL; ! ! if (s[0] == '\0') ! /* empty string: no grouping at all */ ! return PyList_New(0); ! ! for (i = 0; s[i] != '\0' && s[i] != CHAR_MAX; i++) ! ; /* nothing */ ! ! result = PyList_New(i+1); ! if (!result) ! return NULL; ! ! i = -1; ! do { ! i++; ! val = PyInt_FromLong(s[i]); ! if (!val) ! break; ! if (PyList_SetItem(result, i, val)) { ! Py_DECREF(val); ! val = 0; ! break; ! } ! } while (s[i] != '\0' && s[i] != CHAR_MAX); ! ! if (!val) { ! Py_DECREF(result); ! return NULL; } ! ! return result; } static void ! fixup_ulcase(void) { ! PyObject *mods, *strop, *string, *ulo; ! unsigned char ul[256]; ! int n, c; ! ! /* find the string and strop modules */ ! mods = PyImport_GetModuleDict(); ! if (!mods) ! return; ! string = PyDict_GetItemString(mods, "string"); ! if (string) ! string = PyModule_GetDict(string); ! strop=PyDict_GetItemString(mods, "strop"); ! if (strop) ! strop = PyModule_GetDict(strop); ! if (!string && !strop) ! return; ! ! /* create uppercase map string */ ! n = 0; ! for (c = 0; c < 256; c++) { ! if (isupper(c)) ! ul[n++] = c; ! } ! ulo = PyString_FromStringAndSize((const char *)ul, n); ! if(!ulo) ! return; ! if (string) ! PyDict_SetItemString(string, "uppercase", ulo); ! if (strop) ! PyDict_SetItemString(strop, "uppercase", ulo); ! Py_DECREF(ulo); ! ! /* create lowercase string */ ! n = 0; ! for (c = 0; c < 256; c++) { ! if (islower(c)) ! ul[n++] = c; ! } ! ulo = PyString_FromStringAndSize((const char *)ul, n); ! if (!ulo) ! return; ! if (string) ! PyDict_SetItemString(string, "lowercase", ulo); ! if (strop) ! PyDict_SetItemString(strop, "lowercase", ulo); ! Py_DECREF(ulo); ! ! /* create letters string */ ! n = 0; ! for (c = 0; c < 256; c++) { ! if (isalpha(c)) ! ul[n++] = c; ! } ! ulo = PyString_FromStringAndSize((const char *)ul, n); ! if (!ulo) ! return; ! if (string) ! PyDict_SetItemString(string, "letters", ulo); ! Py_DECREF(ulo); } static PyObject* ! PyLocale_setlocale(PyObject* self, PyObject* args) { ! int category; ! char *locale = NULL, *result; ! PyObject *result_object; ! struct lconv *lc; ! ! if (!PyArg_ParseTuple(args, "i|z:setlocale", &category, &locale)) ! return 0; ! ! if (locale) { ! /* set locale */ ! result = setlocale(category, locale); ! if (!result) { ! /* operation failed, no setting was changed */ ! PyErr_SetString(Error, "locale setting not supported"); ! return NULL; ! } ! result_object = PyString_FromString(result); ! if (!result) ! return NULL; ! /* record changes to LC_NUMERIC */ ! if (category == LC_NUMERIC || category == LC_ALL) { ! if (strcmp(locale, "C") == 0 || strcmp(locale, "POSIX") == 0) { ! /* user just asked for default numeric locale */ ! if (saved_numeric) ! free(saved_numeric); ! saved_numeric = NULL; ! } else { ! /* remember values */ ! lc = localeconv(); ! Py_XDECREF(grouping); ! grouping = copy_grouping(lc->grouping); ! Py_XDECREF(thousands_sep); ! thousands_sep = PyString_FromString(lc->thousands_sep); ! Py_XDECREF(decimal_point); ! decimal_point = PyString_FromString(lc->decimal_point); ! saved_numeric = strdup(locale); ! /* restore to "C" */ ! setlocale(LC_NUMERIC, "C"); ! } ! } ! /* record changes to LC_CTYPE */ ! if (category == LC_CTYPE || category == LC_ALL) ! fixup_ulcase(); ! /* things that got wrong up to here are ignored */ ! PyErr_Clear(); ! } else { ! /* get locale */ ! /* restore LC_NUMERIC first, if appropriate */ ! if (saved_numeric) ! setlocale(LC_NUMERIC, saved_numeric); ! result = setlocale(category, NULL); ! if (!result) { ! PyErr_SetString(Error, "locale query failed"); ! return NULL; ! } ! result_object = PyString_FromString(result); ! /* restore back to "C" */ ! if (saved_numeric) ! setlocale(LC_NUMERIC, "C"); } ! return result_object; } ! static char localeconv__doc__[] = "() -> dict. Returns numeric and monetary locale-specific parameters." ; static PyObject* ! PyLocale_localeconv(PyObject* self, PyObject* args) { ! PyObject* result; ! struct lconv *l; ! PyObject *x; ! ! if (!PyArg_NoArgs(args)) ! return 0; ! ! result = PyDict_New(); ! if(!result) ! return 0; ! ! /* if LC_NUMERIC is different in the C library, use saved value */ ! l = localeconv(); ! ! /* hopefully, the localeconv result survives the C library calls ! involved herein */ ! ! #define RESULT_STRING(s)\ ! x = PyString_FromString(l->s);\ ! if (!x) goto failed;\ ! PyDict_SetItemString(result, #s, x);\ ! Py_XDECREF(x) ! ! #define RESULT_INT(i)\ ! x = PyInt_FromLong(l->i);\ ! if (!x) goto failed;\ ! PyDict_SetItemString(result, #i, x);\ ! Py_XDECREF(x) /* Numeric information */ ! if (saved_numeric){ ! /* cannot use localeconv results */ ! PyDict_SetItemString(result, "decimal_point", decimal_point); ! PyDict_SetItemString(result, "grouping", grouping); ! PyDict_SetItemString(result, "thousands_sep", thousands_sep); ! } else { ! RESULT_STRING(decimal_point); ! RESULT_STRING(thousands_sep); ! x = copy_grouping(l->grouping); ! if (!x) ! goto failed; ! PyDict_SetItemString(result, "grouping", x); ! Py_XDECREF(x); ! } ! ! /* Monetary information */ ! RESULT_STRING(int_curr_symbol); ! RESULT_STRING(currency_symbol); ! RESULT_STRING(mon_decimal_point); ! RESULT_STRING(mon_thousands_sep); ! x = copy_grouping(l->mon_grouping); ! if (!x) ! goto failed; ! PyDict_SetItemString(result, "mon_grouping", x); ! Py_XDECREF(x); ! RESULT_STRING(positive_sign); ! RESULT_STRING(negative_sign); ! RESULT_INT(int_frac_digits); ! RESULT_INT(frac_digits); ! RESULT_INT(p_cs_precedes); ! RESULT_INT(p_sep_by_space); ! RESULT_INT(n_cs_precedes); ! RESULT_INT(n_sep_by_space); ! RESULT_INT(p_sign_posn); ! RESULT_INT(n_sign_posn); ! return result; ! ! failed: ! Py_XDECREF(result); ! Py_XDECREF(x); ! return NULL; } ! static char strcoll__doc__[] = "string,string -> int. Compares two strings according to the locale." ; static PyObject* ! PyLocale_strcoll(PyObject* self, PyObject* args) { char *s1,*s2; ! ! if (!PyArg_ParseTuple(args, "ss:strcoll", &s1, &s2)) ! return NULL; ! return PyInt_FromLong(strcoll(s1, s2)); } ! static char strxfrm__doc__[] = "string -> string. Returns a string that behaves for cmp locale-aware." ; static PyObject* ! PyLocale_strxfrm(PyObject* self, PyObject* args) { ! char *s, *buf; ! size_t n1, n2; ! PyObject *result; ! ! if(!PyArg_ParseTuple(args, "s:strxfrm", &s)) ! return NULL; ! ! /* assume no change in size, first */ ! n1 = strlen(s) + 1; ! buf = PyMem_Malloc(n1); ! if (!buf) ! return PyErr_NoMemory(); ! n2 = strxfrm(buf, s, n1); ! if (n2 > n1) { ! /* more space needed */ ! buf = PyMem_Realloc(buf, n2); ! if (!buf) ! return PyErr_NoMemory(); ! strxfrm(buf, s, n2); ! } ! result = PyString_FromString(buf); ! PyMem_Free(buf); ! return result; } + #if defined(MS_WIN32) + static PyObject* + PyLocale_getdefaultlocale(PyObject* self, PyObject* args) + { + char encoding[100]; + char locale[100]; + + sprintf(encoding, "cp%d", GetACP()); + + if (GetLocaleInfo(LOCALE_USER_DEFAULT, + LOCALE_SISO639LANGNAME, + locale, sizeof(locale))) { + int i = strlen(locale); + locale[i++] = '_'; + if (GetLocaleInfo(LOCALE_USER_DEFAULT, + LOCALE_SISO3166CTRYNAME, + locale+i, sizeof(locale)-i)) + return Py_BuildValue("ss", locale, encoding); + } + + /* If we end up here, this windows version didn't know about + ISO639/ISO3166 names (it's probably Windows 95). Return the + Windows language identifier instead (a hexadecimal number) */ + + locale[0] = '0'; + locale[1] = 'x'; + if (GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_IDEFAULTLANGUAGE, + locale+2, sizeof(locale)-2)) { + return Py_BuildValue("ss", locale, encoding); + } + + /* cannot determine the language code (very unlikely) */ + Py_INCREF(Py_None); + return Py_BuildValue("Os", Py_None, encoding); + } + #endif + static struct PyMethodDef PyLocale_Methods[] = { ! {"setlocale", (PyCFunction) PyLocale_setlocale, 1, setlocale__doc__}, ! {"localeconv", (PyCFunction) PyLocale_localeconv, 0, localeconv__doc__}, ! {"strcoll", (PyCFunction) PyLocale_strcoll, 1, strcoll__doc__}, ! {"strxfrm", (PyCFunction) PyLocale_strxfrm, 1, strxfrm__doc__}, ! #if defined(MS_WIN32) ! {"_getdefaultlocale", (PyCFunction) PyLocale_getdefaultlocale, 1}, ! #endif {NULL, NULL} }; *************** *** 313,361 **** init_locale() { ! PyObject *m,*d,*x; ! m=Py_InitModule("_locale",PyLocale_Methods); ! d = PyModule_GetDict(m); ! x=PyInt_FromLong(LC_CTYPE); ! PyDict_SetItemString(d,"LC_CTYPE",x); ! Py_XDECREF(x); ! ! x=PyInt_FromLong(LC_TIME); ! PyDict_SetItemString(d,"LC_TIME",x); ! Py_XDECREF(x); ! ! x=PyInt_FromLong(LC_COLLATE); ! PyDict_SetItemString(d,"LC_COLLATE",x); ! Py_XDECREF(x); ! ! x=PyInt_FromLong(LC_MONETARY); ! PyDict_SetItemString(d,"LC_MONETARY",x); ! Py_XDECREF(x); #ifdef LC_MESSAGES ! x=PyInt_FromLong(LC_MESSAGES); ! PyDict_SetItemString(d,"LC_MESSAGES",x); ! Py_XDECREF(x); #endif /* LC_MESSAGES */ ! x=PyInt_FromLong(LC_NUMERIC); ! PyDict_SetItemString(d,"LC_NUMERIC",x); ! Py_XDECREF(x); ! ! x=PyInt_FromLong(LC_ALL); ! PyDict_SetItemString(d,"LC_ALL",x); ! Py_XDECREF(x); ! ! x=PyInt_FromLong(CHAR_MAX); ! PyDict_SetItemString(d,"CHAR_MAX",x); ! Py_XDECREF(x); ! ! Error = PyErr_NewException("locale.Error", NULL, NULL); ! PyDict_SetItemString(d, "Error", Error); ! ! x=PyString_FromString(locale__doc__); ! PyDict_SetItemString(d,"__doc__",x); ! Py_XDECREF(x); ! if(PyErr_Occurred()) ! Py_FatalError("Can't initialize module locale"); } --- 392,443 ---- init_locale() { ! PyObject *m, *d, *x; ! ! m = Py_InitModule("_locale", PyLocale_Methods); ! ! d = PyModule_GetDict(m); ! ! x = PyInt_FromLong(LC_CTYPE); ! PyDict_SetItemString(d, "LC_CTYPE", x); ! Py_XDECREF(x); ! ! x = PyInt_FromLong(LC_TIME); ! PyDict_SetItemString(d, "LC_TIME", x); ! Py_XDECREF(x); + x = PyInt_FromLong(LC_COLLATE); + PyDict_SetItemString(d, "LC_COLLATE", x); + Py_XDECREF(x); + + x = PyInt_FromLong(LC_MONETARY); + PyDict_SetItemString(d, "LC_MONETARY", x); + Py_XDECREF(x); + #ifdef LC_MESSAGES ! x = PyInt_FromLong(LC_MESSAGES); ! PyDict_SetItemString(d, "LC_MESSAGES", x); ! Py_XDECREF(x); #endif /* LC_MESSAGES */ + + x = PyInt_FromLong(LC_NUMERIC); + PyDict_SetItemString(d, "LC_NUMERIC", x); + Py_XDECREF(x); ! x = PyInt_FromLong(LC_ALL); ! PyDict_SetItemString(d, "LC_ALL", x); ! Py_XDECREF(x); ! ! x = PyInt_FromLong(CHAR_MAX); ! PyDict_SetItemString(d, "CHAR_MAX", x); ! Py_XDECREF(x); ! ! Error = PyErr_NewException("locale.Error", NULL, NULL); ! PyDict_SetItemString(d, "Error", Error); ! ! x = PyString_FromString(locale__doc__); ! PyDict_SetItemString(d, "__doc__", x); ! Py_XDECREF(x); ! if (PyErr_Occurred()) ! Py_FatalError("Can't initialize module locale"); } From python-dev@python.org Sat Jul 8 21:07:27 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 8 Jul 2000 13:07:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _localemodule.c,2.10,2.11 Message-ID: <200007082007.NAA09408@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv9392/Modules Modified Files: _localemodule.c Log Message: - _getdefaultlocale shouldn't accept arguments - some more spacification... Index: _localemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_localemodule.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** _localemodule.c 2000/07/08 19:57:37 2.10 --- _localemodule.c 2000/07/08 20:07:24 2.11 *************** *** 71,75 **** if (PyList_SetItem(result, i, val)) { Py_DECREF(val); ! val = 0; break; } --- 71,75 ---- if (PyList_SetItem(result, i, val)) { Py_DECREF(val); ! val = NULL; break; } *************** *** 111,115 **** } ulo = PyString_FromStringAndSize((const char *)ul, n); ! if(!ulo) return; if (string) --- 111,115 ---- } ulo = PyString_FromStringAndSize((const char *)ul, n); ! if (!ulo) return; if (string) *************** *** 158,162 **** if (!PyArg_ParseTuple(args, "i|z:setlocale", &category, &locale)) ! return 0; if (locale) { --- 158,162 ---- if (!PyArg_ParseTuple(args, "i|z:setlocale", &category, &locale)) ! return NULL; if (locale) { *************** *** 227,235 **** if (!PyArg_NoArgs(args)) ! return 0; result = PyDict_New(); ! if(!result) ! return 0; /* if LC_NUMERIC is different in the C library, use saved value */ --- 227,235 ---- if (!PyArg_NoArgs(args)) ! return NULL; result = PyDict_New(); ! if (!result) ! return NULL; /* if LC_NUMERIC is different in the C library, use saved value */ *************** *** 320,324 **** PyObject *result; ! if(!PyArg_ParseTuple(args, "s:strxfrm", &s)) return NULL; --- 320,324 ---- PyObject *result; ! if (!PyArg_ParseTuple(args, "s:strxfrm", &s)) return NULL; *************** *** 348,351 **** --- 348,354 ---- char locale[100]; + if (!PyArg_NoArgs(args)) + return NULL; + sprintf(encoding, "cp%d", GetACP()); *************** *** 384,388 **** {"strxfrm", (PyCFunction) PyLocale_strxfrm, 1, strxfrm__doc__}, #if defined(MS_WIN32) ! {"_getdefaultlocale", (PyCFunction) PyLocale_getdefaultlocale, 1}, #endif {NULL, NULL} --- 387,391 ---- {"strxfrm", (PyCFunction) PyLocale_strxfrm, 1, strxfrm__doc__}, #if defined(MS_WIN32) ! {"_getdefaultlocale", (PyCFunction) PyLocale_getdefaultlocale, 0}, #endif {NULL, NULL} From python-dev@python.org Sat Jul 8 21:50:01 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 8 Jul 2000 13:50:01 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC WinMain.c,1.4,1.5 Message-ID: <200007082050.NAA11818@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv11792/PC Modified Files: WinMain.c Log Message: - removed barry's workaround, to make room for bill's more complete solution. Index: WinMain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/WinMain.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** WinMain.c 2000/07/08 18:06:41 1.4 --- WinMain.c 2000/07/08 20:49:58 1.5 *************** *** 3,8 **** #define WINDOWS_LEAN_AND_MEAN #include - #include - #include #include "Python.h" --- 3,6 ---- *************** *** 17,48 **** ) { - int null_file; - - /* - * make sure that the C RTL has valid file descriptors for - * stdin, stdout, stderr. Use the NUL device if necessary. - * This allows popen to work under pythonw. - * - * When pythonw.exe starts the C RTL function _ioinit is called - * first. WinMain is called later hence the need to check for - * invalid handles. - * - * Note: FILE stdin, stdout, stderr do not use the file descriptors - * setup here. They are already initialised before WinMain was called. - */ - - null_file = open("NUL", _O_RDWR); - - if (_get_osfhandle(0) == -1) - dup2(null_file, 0); - - if (_get_osfhandle(1) == -1) - dup2(null_file, 1); - - if (_get_osfhandle(2) == -1) - dup2(null_file, 2); - - close(null_file); - return Py_Main(__argc, __argv); } --- 15,18 ---- From python-dev@python.org Sat Jul 8 23:05:04 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 8 Jul 2000 15:05:04 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.17,2.18 Message-ID: <200007082205.PAA28756@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv28682/Modules Modified Files: mmapmodule.c Log Message: -- ANSI-fying, names (patch #100762 by Peter Schneider-Kamp, minus the indentation changes) -- added INT_PTR workaround to make it build under VC 5.0 Index: mmapmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** mmapmodule.c 2000/07/05 12:22:14 2.17 --- mmapmodule.c 2000/07/08 22:05:01 2.18 *************** *** 25,29 **** --- 25,32 ---- #ifdef MS_WIN32 #include + #if _MSC_VER < 1200 + #define INT_PTR unsigned long #endif + #endif #ifdef UNIX *************** *** 56,60 **** static void ! mmap_object_dealloc(mmap_object * m_obj) { #ifdef MS_WIN32 --- 59,63 ---- static void ! mmap_object_dealloc(mmap_object *m_obj) { #ifdef MS_WIN32 *************** *** 75,79 **** static PyObject * ! mmap_close_method (mmap_object * self, PyObject * args) { if (!PyArg_ParseTuple(args, ":close")) --- 78,82 ---- static PyObject * ! mmap_close_method(mmap_object *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":close")) *************** *** 116,124 **** static PyObject * ! mmap_read_byte_method (mmap_object * self, ! PyObject * args) { char value; ! char * where; CHECK_VALID(NULL); if (!PyArg_ParseTuple(args, ":read_byte")) --- 119,127 ---- static PyObject * ! mmap_read_byte_method(mmap_object *self, ! PyObject *args) { char value; ! char *where; CHECK_VALID(NULL); if (!PyArg_ParseTuple(args, ":read_byte")) *************** *** 136,146 **** static PyObject * ! mmap_read_line_method (mmap_object * self, ! PyObject * args) { ! char * start = self->data+self->pos; ! char * eof = self->data+self->size; ! char * eol; ! PyObject * result; CHECK_VALID(NULL); --- 139,149 ---- static PyObject * ! mmap_read_line_method(mmap_object *self, ! PyObject *args) { ! char *start = self->data+self->pos; ! char *eof = self->data+self->size; ! char *eol; ! PyObject *result; CHECK_VALID(NULL); *************** *** 160,165 **** static PyObject * ! mmap_read_method (mmap_object * self, ! PyObject * args) { long num_bytes; --- 163,168 ---- static PyObject * ! mmap_read_method(mmap_object *self, ! PyObject *args) { long num_bytes; *************** *** 167,171 **** CHECK_VALID(NULL); ! if (!PyArg_ParseTuple (args, "l", &num_bytes)) return(NULL); --- 170,174 ---- CHECK_VALID(NULL); ! if (!PyArg_ParseTuple(args, "l:read", &num_bytes)) return(NULL); *************** *** 180,199 **** static PyObject * ! mmap_find_method (mmap_object *self, ! PyObject *args) { int start = self->pos; ! char * needle; int len; CHECK_VALID(NULL); ! if (!PyArg_ParseTuple (args, "s#|i", &needle, &len, &start)) { return NULL; } else { ! char * p = self->data+self->pos; ! char * e = self->data+self->size; while (p < e) { ! char * s = p; ! char * n = needle; while ((spos; ! char *needle; int len; CHECK_VALID(NULL); ! if (!PyArg_ParseTuple (args, "s#|i:find", &needle, &len, &start)) { return NULL; } else { ! char *p = self->data+self->pos; ! char *e = self->data+self->size; while (p < e) { ! char *s = p; ! char *n = needle; while ((ssize; CHECK_VALID(NULL); ! if (!PyArg_ParseTuple (args, "|ll", &offset, &size)) { return NULL; } else if ((offset + size) > self->size) { --- 376,385 ---- static PyObject * ! mmap_flush_method(mmap_object *self, PyObject *args) { size_t offset = 0; size_t size = self->size; CHECK_VALID(NULL); ! if (!PyArg_ParseTuple (args, "|ll:flush", &offset, &size)) { return NULL; } else if ((offset + size) > self->size) { *************** *** 404,413 **** static PyObject * ! mmap_seek_method (mmap_object * self, PyObject * args) { int dist; int how=0; CHECK_VALID(NULL); ! if (!PyArg_ParseTuple (args, "i|i", &dist, &how)) { return(NULL); } else { --- 407,416 ---- static PyObject * ! mmap_seek_method(mmap_object *self, PyObject *args) { int dist; int how=0; CHECK_VALID(NULL); ! if (!PyArg_ParseTuple (args, "i|i:seek", &dist, &how)) { return(NULL); } else { *************** *** 447,455 **** static PyObject * ! mmap_move_method (mmap_object * self, PyObject * args) { unsigned long dest, src, count; CHECK_VALID(NULL); ! if (!PyArg_ParseTuple (args, "iii", &dest, &src, &count)) { return NULL; } else { --- 450,458 ---- static PyObject * ! mmap_move_method(mmap_object *self, PyObject *args) { unsigned long dest, src, count; CHECK_VALID(NULL); ! if (!PyArg_ParseTuple (args, "iii:move", &dest, &src, &count)) { return NULL; } else { *************** *** 503,510 **** static int ! mmap_buffer_getwritebuf(self, index, ptr) ! mmap_object *self; ! int index; ! const void **ptr; { CHECK_VALID(-1); --- 506,510 ---- static int ! mmap_buffer_getwritebuf(mmap_object *self, int index, const void **ptr) { CHECK_VALID(-1); *************** *** 519,525 **** static int ! mmap_buffer_getsegcount(self, lenp) ! mmap_object *self; ! int *lenp; { CHECK_VALID(-1); --- 519,523 ---- static int ! mmap_buffer_getsegcount(mmap_object *self, int *lenp) { CHECK_VALID(-1); *************** *** 530,537 **** static int ! mmap_buffer_getcharbuffer(self, index, ptr) ! mmap_object *self; ! int index; ! const void **ptr; { if ( index != 0 ) { --- 528,532 ---- static int ! mmap_buffer_getcharbuffer(mmap_object *self, int index, const void **ptr) { if ( index != 0 ) { *************** *** 545,549 **** static PyObject * ! mmap_object_getattr(mmap_object * self, char * name) { return Py_FindMethod (mmap_object_methods, (PyObject *)self, name); --- 540,544 ---- static PyObject * ! mmap_object_getattr(mmap_object *self, char *name) { return Py_FindMethod (mmap_object_methods, (PyObject *)self, name); *************** *** 551,556 **** static int ! mmap_length(self) ! mmap_object *self; { CHECK_VALID(-1); --- 546,550 ---- static int ! mmap_length(mmap_object *self) { CHECK_VALID(-1); *************** *** 559,565 **** static PyObject * ! mmap_item(self, i) ! mmap_object *self; ! int i; { CHECK_VALID(NULL); --- 553,557 ---- static PyObject * ! mmap_item(mmap_object *self, int i) { CHECK_VALID(NULL); *************** *** 572,578 **** static PyObject * ! mmap_slice(self, ilow, ihigh) ! mmap_object *self; ! int ilow, ihigh; { CHECK_VALID(NULL); --- 564,568 ---- static PyObject * ! mmap_slice(mmap_object *self, int ilow, int ihigh) { CHECK_VALID(NULL); *************** *** 592,598 **** static PyObject * ! mmap_concat(self, bb) ! mmap_object *self; ! PyObject *bb; { CHECK_VALID(NULL); --- 582,586 ---- static PyObject * ! mmap_concat(mmap_object *self, PyObject *bb) { CHECK_VALID(NULL); *************** *** 603,609 **** static PyObject * ! mmap_repeat(self, n) ! mmap_object *self; ! int n; { CHECK_VALID(NULL); --- 591,595 ---- static PyObject * ! mmap_repeat(mmap_object *self, int n) { CHECK_VALID(NULL); *************** *** 614,621 **** static int ! mmap_ass_slice(self, ilow, ihigh, v) ! mmap_object *self; ! int ilow, ihigh; ! PyObject *v; { const char *buf; --- 600,604 ---- static int ! mmap_ass_slice(mmap_object *self, int ilow, int ihigh, PyObject *v) { const char *buf; *************** *** 649,656 **** static int ! mmap_ass_item(self, i, v) ! mmap_object *self; ! int i; ! PyObject *v; { const char *buf; --- 632,636 ---- static int ! mmap_ass_item(mmap_object *self, int i, PyObject *v) { const char *buf; *************** *** 725,730 **** success, the map size is returned. */ static int ! _GetMapSize(o) ! PyObject *o; { if (PyInt_Check(o)) { --- 705,709 ---- success, the map size is returned. */ static int ! _GetMapSize(PyObject *o) { if (PyInt_Check(o)) { *************** *** 773,779 **** #ifdef UNIX static PyObject * ! new_mmap_object (PyObject * self, PyObject * args, PyObject *kwdict) { ! mmap_object * m_obj; PyObject *map_size_obj = NULL; int map_size; --- 752,758 ---- #ifdef UNIX static PyObject * ! new_mmap_object(PyObject *self, PyObject *args, PyObject *kwdict) { ! mmap_object *m_obj; PyObject *map_size_obj = NULL; int map_size; *************** *** 810,819 **** #ifdef MS_WIN32 static PyObject * ! new_mmap_object (PyObject * self, PyObject * args) { ! mmap_object * m_obj; PyObject *map_size_obj = NULL; int map_size; ! char * tagname = ""; DWORD dwErr = 0; --- 789,798 ---- #ifdef MS_WIN32 static PyObject * ! new_mmap_object(PyObject *self, PyObject *args) { ! mmap_object *m_obj; PyObject *map_size_obj = NULL; int map_size; ! char *tagname = ""; DWORD dwErr = 0; From python-dev@python.org Sat Jul 8 23:48:56 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 8 Jul 2000 15:48:56 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.142,2.143 Message-ID: <200007082248.PAA31053@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv30977/Modules Modified Files: posixmodule.c Log Message: this one's a bit risky, but I've spent some considerable time staring at the diffs before checking this one in. let me know asap if it breaks things on your platform. -- ANSI-fying (patch #100763 by Peter Schneider-Kamp, minus the indentation changes and minus the changes the broke the windows build) Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.142 retrieving revision 2.143 diff -C2 -r2.142 -r2.143 *** posixmodule.c 2000/07/06 19:42:19 2.142 --- posixmodule.c 2000/07/08 22:48:53 2.143 *************** *** 138,170 **** #else /* !HAVE_UNISTD_H */ #if defined(PYCC_VACPP) ! extern int mkdir Py_PROTO((char *)); #else #if ( defined(__WATCOMC__) || defined(_MSC_VER) ) && !defined(__QNX__) ! extern int mkdir Py_PROTO((const char *)); #else ! extern int mkdir Py_PROTO((const char *, mode_t)); #endif #endif [...1650 lines suppressed...] static PyObject * ! posix_abort(PyObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":abort")) *************** *** 4740,4747 **** static int ! ins(d, symbol, value) ! PyObject* d; ! char* symbol; ! long value; { PyObject* v = PyInt_FromLong(value); --- 4535,4539 ---- static int ! ins(PyObject *d, char *symbol, long value) { PyObject* v = PyInt_FromLong(value); From python-dev@python.org Sun Jul 9 00:37:31 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 16:37:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include bitset.h,2.11,2.12 ceval.h,2.33,2.34 eval.h,2.12,2.13 import.h,2.24,2.25 intrcheck.h,2.7,2.8 marshal.h,2.8,2.9 node.h,2.15,2.16 parsetok.h,2.12,2.13 pydebug.h,2.13,2.14 pystate.h,2.11,2.12 structmember.h,2.14,2.15 traceback.h,2.16,2.17 Message-ID: <200007082337.QAA07411@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv7393 Modified Files: bitset.h ceval.h eval.h import.h intrcheck.h marshal.h node.h parsetok.h pydebug.h pystate.h structmember.h traceback.h Log Message: ANSI-fication and Py_PROTO extermination. Index: bitset.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/bitset.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** bitset.h 2000/06/30 23:58:04 2.11 --- bitset.h 2000/07/08 23:37:28 2.12 *************** *** 1,8 **** - #ifndef Py_BITSET_H - #define Py_BITSET_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 15,18 **** --- 9,18 ---- ******************************************************************/ + #ifndef Py_BITSET_H + #define Py_BITSET_H + #ifdef __cplusplus + extern "C" { + #endif + /* Bitset interface */ *************** *** 21,30 **** typedef BYTE *bitset; ! bitset newbitset Py_PROTO((int nbits)); ! void delbitset Py_PROTO((bitset bs)); #define testbit(ss, ibit) (((ss)[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0) ! int addbit Py_PROTO((bitset bs, int ibit)); /* Returns 0 if already set */ ! int samebitset Py_PROTO((bitset bs1, bitset bs2, int nbits)); ! void mergebitset Py_PROTO((bitset bs1, bitset bs2, int nbits)); #define BITSPERBYTE (8*sizeof(BYTE)) --- 21,30 ---- typedef BYTE *bitset; ! bitset newbitset(int nbits); ! void delbitset(bitset bs); #define testbit(ss, ibit) (((ss)[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0) ! int addbit(bitset bs, int ibit); /* Returns 0 if already set */ ! int samebitset(bitset bs1, bitset bs2, int nbits); ! void mergebitset(bitset bs1, bitset bs2, int nbits); #define BITSPERBYTE (8*sizeof(BYTE)) Index: ceval.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/ceval.h,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -r2.33 -r2.34 *** ceval.h 2000/06/30 23:58:04 2.33 --- ceval.h 2000/07/08 23:37:28 2.34 *************** *** 18,26 **** DL_IMPORT(PyObject *) PyEval_CallObjectWithKeywords ! Py_PROTO((PyObject *, PyObject *, PyObject *)); /* DLL-level Backwards compatibility: */ #undef PyEval_CallObject ! DL_IMPORT(PyObject *) PyEval_CallObject Py_PROTO((PyObject *, PyObject *)); /* Inline this */ --- 18,26 ---- DL_IMPORT(PyObject *) PyEval_CallObjectWithKeywords ! (PyObject *, PyObject *, PyObject *); /* DLL-level Backwards compatibility: */ #undef PyEval_CallObject ! DL_IMPORT(PyObject *) PyEval_CallObject(PyObject *, PyObject *); /* Inline this */ *************** *** 29,35 **** #ifdef HAVE_STDARG_PROTOTYPES ! DL_IMPORT(PyObject *) PyEval_CallFunction Py_PROTO((PyObject *obj, char *format, ...)); ! DL_IMPORT(PyObject *) PyEval_CallMethod Py_PROTO((PyObject *obj, ! char *methodname, char *format, ...)); #else /* Better to have no prototypes at all for varargs functions in this case */ --- 29,35 ---- #ifdef HAVE_STDARG_PROTOTYPES ! DL_IMPORT(PyObject *) PyEval_CallFunction(PyObject *obj, char *format, ...); ! DL_IMPORT(PyObject *) PyEval_CallMethod(PyObject *obj, ! char *methodname, char *format, ...); #else /* Better to have no prototypes at all for varargs functions in this case */ *************** *** 38,52 **** #endif ! DL_IMPORT(PyObject *) PyEval_GetBuiltins Py_PROTO((void)); ! DL_IMPORT(PyObject *) PyEval_GetGlobals Py_PROTO((void)); ! DL_IMPORT(PyObject *) PyEval_GetLocals Py_PROTO((void)); ! DL_IMPORT(PyObject *) PyEval_GetOwner Py_PROTO((void)); ! DL_IMPORT(PyObject *) PyEval_GetFrame Py_PROTO((void)); ! DL_IMPORT(int) PyEval_GetRestricted Py_PROTO((void)); ! DL_IMPORT(int) Py_FlushLine Py_PROTO((void)); ! DL_IMPORT(int) Py_AddPendingCall Py_PROTO((int (*func) Py_PROTO((ANY *)), ANY *arg)); ! DL_IMPORT(int) Py_MakePendingCalls Py_PROTO((void)); --- 38,52 ---- #endif ! DL_IMPORT(PyObject *) PyEval_GetBuiltins(void); ! DL_IMPORT(PyObject *) PyEval_GetGlobals(void); ! DL_IMPORT(PyObject *) PyEval_GetLocals(void); ! DL_IMPORT(PyObject *) PyEval_GetOwner(void); ! DL_IMPORT(PyObject *) PyEval_GetFrame(void); ! DL_IMPORT(int) PyEval_GetRestricted(void); ! DL_IMPORT(int) Py_FlushLine(void); ! DL_IMPORT(int) Py_AddPendingCall(int (*func)(ANY *), ANY *arg); ! DL_IMPORT(int) Py_MakePendingCalls(void); *************** *** 96,109 **** */ ! extern DL_IMPORT(PyThreadState *) PyEval_SaveThread Py_PROTO((void)); ! extern DL_IMPORT(void) PyEval_RestoreThread Py_PROTO((PyThreadState *)); #ifdef WITH_THREAD ! extern DL_IMPORT(void) PyEval_InitThreads Py_PROTO((void)); ! extern DL_IMPORT(void) PyEval_AcquireLock Py_PROTO((void)); ! extern DL_IMPORT(void) PyEval_ReleaseLock Py_PROTO((void)); ! extern DL_IMPORT(void) PyEval_AcquireThread Py_PROTO((PyThreadState *tstate)); ! extern DL_IMPORT(void) PyEval_ReleaseThread Py_PROTO((PyThreadState *tstate)); #define Py_BEGIN_ALLOW_THREADS { \ --- 96,109 ---- */ ! extern DL_IMPORT(PyThreadState *) PyEval_SaveThread(void); ! extern DL_IMPORT(void) PyEval_RestoreThread(PyThreadState *); #ifdef WITH_THREAD ! extern DL_IMPORT(void) PyEval_InitThreads(void); ! extern DL_IMPORT(void) PyEval_AcquireLock(void); ! extern DL_IMPORT(void) PyEval_ReleaseLock(void); ! extern DL_IMPORT(void) PyEval_AcquireThread(PyThreadState *tstate); ! extern DL_IMPORT(void) PyEval_ReleaseThread(PyThreadState *tstate); #define Py_BEGIN_ALLOW_THREADS { \ *************** *** 124,128 **** #endif /* !WITH_THREAD */ ! extern DL_IMPORT(int) _PyEval_SliceIndex Py_PROTO((PyObject *, int *)); --- 124,128 ---- #endif /* !WITH_THREAD */ ! extern DL_IMPORT(int) _PyEval_SliceIndex(PyObject *, int *); Index: eval.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/eval.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** eval.h 2000/06/30 23:58:04 2.12 --- eval.h 2000/07/08 23:37:28 2.13 *************** *** 1,8 **** - #ifndef Py_EVAL_H - #define Py_EVAL_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 16,21 **** /* Interface to execute compiled code */ ! DL_IMPORT(PyObject *) PyEval_EvalCode Py_PROTO((PyCodeObject *, PyObject *, PyObject *)); #ifdef __cplusplus --- 10,21 ---- /* Interface to execute compiled code */ + + #ifndef Py_EVAL_H + #define Py_EVAL_H + #ifdef __cplusplus + extern "C" { + #endif ! DL_IMPORT(PyObject *) PyEval_EvalCode(PyCodeObject *, PyObject *, PyObject *); #ifdef __cplusplus Index: import.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/import.h,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -r2.24 -r2.25 *** import.h 2000/06/30 23:58:04 2.24 --- import.h 2000/07/08 23:37:28 2.25 *************** *** 1,8 **** - #ifndef Py_IMPORT_H - #define Py_IMPORT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 16,51 **** /* Module definition and import interface */ ! DL_IMPORT(long) PyImport_GetMagicNumber Py_PROTO((void)); ! DL_IMPORT(PyObject *) PyImport_ExecCodeModule Py_PROTO((char *name, PyObject *co)); ! DL_IMPORT(PyObject *) PyImport_ExecCodeModuleEx Py_PROTO(( ! char *name, PyObject *co, char *pathname)); ! DL_IMPORT(PyObject *) PyImport_GetModuleDict Py_PROTO((void)); ! DL_IMPORT(PyObject *) PyImport_AddModule Py_PROTO((char *name)); ! DL_IMPORT(PyObject *) PyImport_ImportModule Py_PROTO((char *name)); ! DL_IMPORT(PyObject *) PyImport_ImportModuleEx Py_PROTO(( ! char *name, PyObject *globals, PyObject *locals, PyObject *fromlist)); ! DL_IMPORT(PyObject *) PyImport_Import Py_PROTO((PyObject *name)); ! DL_IMPORT(PyObject *) PyImport_ReloadModule Py_PROTO((PyObject *m)); ! DL_IMPORT(void) PyImport_Cleanup Py_PROTO((void)); ! DL_IMPORT(int) PyImport_ImportFrozenModule Py_PROTO((char *)); ! extern DL_IMPORT(PyObject *)_PyImport_FindExtension Py_PROTO((char *, char *)); ! extern DL_IMPORT(PyObject *)_PyImport_FixupExtension Py_PROTO((char *, char *)); struct _inittab { ! char *name; ! void (*initfunc)(); }; extern DL_IMPORT(struct _inittab *) PyImport_Inittab; ! extern DL_IMPORT(int) PyImport_AppendInittab Py_PROTO((char *name, void (*initfunc)())); ! extern DL_IMPORT(int) PyImport_ExtendInittab Py_PROTO((struct _inittab *newtab)); struct _frozen { ! char *name; ! unsigned char *code; ! int size; }; --- 10,51 ---- /* Module definition and import interface */ + + #ifndef Py_IMPORT_H + #define Py_IMPORT_H + #ifdef __cplusplus + extern "C" { + #endif ! DL_IMPORT(long) PyImport_GetMagicNumber(void); ! DL_IMPORT(PyObject *) PyImport_ExecCodeModule(char *name, PyObject *co); ! DL_IMPORT(PyObject *) PyImport_ExecCodeModuleEx( ! char *name, PyObject *co, char *pathname); ! DL_IMPORT(PyObject *) PyImport_GetModuleDict(void); ! DL_IMPORT(PyObject *) PyImport_AddModule(char *name); ! DL_IMPORT(PyObject *) PyImport_ImportModule(char *name); ! DL_IMPORT(PyObject *) PyImport_ImportModuleEx( ! char *name, PyObject *globals, PyObject *locals, PyObject *fromlist); ! DL_IMPORT(PyObject *) PyImport_Import(PyObject *name); ! DL_IMPORT(PyObject *) PyImport_ReloadModule(PyObject *m); ! DL_IMPORT(void) PyImport_Cleanup(void); ! DL_IMPORT(int) PyImport_ImportFrozenModule(char *); ! extern DL_IMPORT(PyObject *)_PyImport_FindExtension(char *, char *); ! extern DL_IMPORT(PyObject *)_PyImport_FixupExtension(char *, char *); struct _inittab { ! char *name; ! void (*initfunc)(); }; extern DL_IMPORT(struct _inittab *) PyImport_Inittab; ! extern DL_IMPORT(int) PyImport_AppendInittab(char *name, void (*initfunc)()); ! extern DL_IMPORT(int) PyImport_ExtendInittab(struct _inittab *newtab); struct _frozen { ! char *name; ! unsigned char *code; ! int size; }; Index: intrcheck.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/intrcheck.h,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** intrcheck.h 2000/06/30 23:58:04 2.7 --- intrcheck.h 2000/07/08 23:37:28 2.8 *************** *** 1,8 **** - #ifndef Py_INTRCHECK_H - #define Py_INTRCHECK_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 14,21 **** redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ ! extern DL_IMPORT(int) PyOS_InterruptOccurred Py_PROTO((void)); ! extern DL_IMPORT(void) PyOS_InitInterrupts Py_PROTO((void)); ! DL_IMPORT(void) PyOS_AfterFork Py_PROTO((void)); #ifdef __cplusplus --- 8,21 ---- redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ + + #ifndef Py_INTRCHECK_H + #define Py_INTRCHECK_H + #ifdef __cplusplus + extern "C" { + #endif ! extern DL_IMPORT(int) PyOS_InterruptOccurred(void); ! extern DL_IMPORT(void) PyOS_InitInterrupts(void); ! DL_IMPORT(void) PyOS_AfterFork(void); #ifdef __cplusplus Index: marshal.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/marshal.h,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** marshal.h 2000/06/30 23:58:04 2.8 --- marshal.h 2000/07/08 23:37:28 2.9 *************** *** 1,8 **** - #ifndef Py_MARSHAL_H - #define Py_MARSHAL_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 16,29 **** /* Interface for marshal.c */ ! DL_IMPORT(void) PyMarshal_WriteLongToFile Py_PROTO((long, FILE *)); ! DL_IMPORT(void) PyMarshal_WriteShortToFile Py_PROTO((int, FILE *)); ! DL_IMPORT(void) PyMarshal_WriteObjectToFile Py_PROTO((PyObject *, FILE *)); ! DL_IMPORT(PyObject *) PyMarshal_WriteObjectToString Py_PROTO((PyObject *)); ! DL_IMPORT(long) PyMarshal_ReadLongFromFile Py_PROTO((FILE *)); ! DL_IMPORT(int) PyMarshal_ReadShortFromFile Py_PROTO((FILE *)); ! DL_IMPORT(PyObject *) PyMarshal_ReadObjectFromFile Py_PROTO((FILE *)); ! DL_IMPORT(PyObject *) PyMarshal_ReadObjectFromString Py_PROTO((char *, int)); #ifdef __cplusplus --- 10,29 ---- /* Interface for marshal.c */ + + #ifndef Py_MARSHAL_H + #define Py_MARSHAL_H + #ifdef __cplusplus + extern "C" { + #endif ! DL_IMPORT(void) PyMarshal_WriteLongToFile(long, FILE *); ! DL_IMPORT(void) PyMarshal_WriteShortToFile(int, FILE *); ! DL_IMPORT(void) PyMarshal_WriteObjectToFile(PyObject *, FILE *); ! DL_IMPORT(PyObject *) PyMarshal_WriteObjectToString(PyObject *); ! DL_IMPORT(long) PyMarshal_ReadLongFromFile(FILE *); ! DL_IMPORT(int) PyMarshal_ReadShortFromFile(FILE *); ! DL_IMPORT(PyObject *) PyMarshal_ReadObjectFromFile(FILE *); ! DL_IMPORT(PyObject *) PyMarshal_ReadObjectFromString(char *, int); #ifdef __cplusplus Index: node.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/node.h,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** node.h 2000/06/30 23:58:04 2.15 --- node.h 2000/07/08 23:37:28 2.16 *************** *** 1,8 **** - #ifndef Py_NODE_H - #define Py_NODE_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,31 **** /* Parse tree node interface */ typedef struct _node { ! short n_type; ! char *n_str; ! short n_lineno; ! short n_nchildren; ! struct _node *n_child; } node; ! extern DL_IMPORT(node *) PyNode_New Py_PROTO((int type)); ! extern DL_IMPORT(int) PyNode_AddChild Py_PROTO((node *n, int type, char *str, int lineno)); ! extern DL_IMPORT(void) PyNode_Free Py_PROTO((node *n)); /* Node access functions */ --- 11,32 ---- /* Parse tree node interface */ + #ifndef Py_NODE_H + #define Py_NODE_H + #ifdef __cplusplus + extern "C" { + #endif + typedef struct _node { ! short n_type; ! char *n_str; ! short n_lineno; ! short n_nchildren; ! struct _node *n_child; } node; ! extern DL_IMPORT(node *) PyNode_New(int type); ! extern DL_IMPORT(int) PyNode_AddChild(node *n, int type, ! char *str, int lineno); ! extern DL_IMPORT(void) PyNode_Free(node *n); /* Node access functions */ *************** *** 41,51 **** #define REQ(n, type) \ { if (TYPE(n) != (type)) { \ ! fprintf(stderr, "FATAL: node type %d, required %d\n", \ ! TYPE(n), type); \ ! abort(); \ } } #endif ! extern DL_IMPORT(void) PyNode_ListTree Py_PROTO((node *)); #ifdef __cplusplus --- 42,52 ---- #define REQ(n, type) \ { if (TYPE(n) != (type)) { \ ! fprintf(stderr, "FATAL: node type %d, required %d\n", \ ! TYPE(n), type); \ ! abort(); \ } } #endif ! extern DL_IMPORT(void) PyNode_ListTree(node *); #ifdef __cplusplus Index: parsetok.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/parsetok.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** parsetok.h 2000/06/30 23:58:04 2.12 --- parsetok.h 2000/07/08 23:37:28 2.13 *************** *** 1,8 **** - #ifndef Py_PARSETOK_H - #define Py_PARSETOK_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,31 **** /* Parser-tokenizer link interface */ typedef struct { ! int error; ! char *filename; ! int lineno; ! int offset; ! char *text; } perrdetail; ! extern DL_IMPORT(node *) PyParser_ParseString Py_PROTO((char *, grammar *, int, perrdetail *)); ! extern DL_IMPORT(node *) PyParser_ParseFile Py_PROTO((FILE *, char *, grammar *, int, ! char *, char *, perrdetail *)); #ifdef __cplusplus --- 11,32 ---- /* Parser-tokenizer link interface */ + #ifndef Py_PARSETOK_H + #define Py_PARSETOK_H + #ifdef __cplusplus + extern "C" { + #endif + typedef struct { ! int error; ! char *filename; ! int lineno; ! int offset; ! char *text; } perrdetail; ! extern DL_IMPORT(node *) PyParser_ParseString(char *, grammar *, int, ! perrdetail *); ! extern DL_IMPORT(node *) PyParser_ParseFile (FILE *, char *, grammar *, int, ! char *, char *, perrdetail *); #ifdef __cplusplus Index: pydebug.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pydebug.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** pydebug.h 2000/06/30 23:58:04 2.13 --- pydebug.h 2000/07/08 23:37:28 2.14 *************** *** 25,29 **** extern DL_IMPORT(int) Py_UnicodeFlag; ! DL_IMPORT(void) Py_FatalError Py_PROTO((char *)); #ifdef __cplusplus --- 25,29 ---- extern DL_IMPORT(int) Py_UnicodeFlag; ! DL_IMPORT(void) Py_FatalError(char *message); #ifdef __cplusplus Index: pystate.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pystate.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** pystate.h 2000/06/30 23:58:04 2.11 --- pystate.h 2000/07/08 23:37:28 2.12 *************** *** 1,8 **** - #ifndef Py_PYSTATE_H - #define Py_PYSTATE_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 18,21 **** --- 12,21 ---- + #ifndef Py_PYSTATE_H + #define Py_PYSTATE_H + #ifdef __cplusplus + extern "C" { + #endif + /* State shared between threads */ *************** *** 25,36 **** typedef struct _is { ! struct _is *next; ! struct _ts *tstate_head; ! PyObject *modules; ! PyObject *sysdict; ! PyObject *builtins; ! int checkinterval; } PyInterpreterState; --- 25,36 ---- typedef struct _is { ! struct _is *next; ! struct _ts *tstate_head; ! PyObject *modules; ! PyObject *sysdict; ! PyObject *builtins; ! int checkinterval; } PyInterpreterState; *************** *** 43,83 **** typedef struct _ts { ! struct _ts *next; ! PyInterpreterState *interp; ! struct _frame *frame; ! int recursion_depth; ! int ticker; ! int tracing; ! PyObject *sys_profilefunc; ! PyObject *sys_tracefunc; ! PyObject *curexc_type; ! PyObject *curexc_value; ! PyObject *curexc_traceback; ! PyObject *exc_type; ! PyObject *exc_value; ! PyObject *exc_traceback; ! PyObject *dict; ! /* XXX signal handlers should also be here */ } PyThreadState; ! DL_IMPORT(PyInterpreterState *) PyInterpreterState_New Py_PROTO((void)); ! DL_IMPORT(void) PyInterpreterState_Clear Py_PROTO((PyInterpreterState *)); ! DL_IMPORT(void) PyInterpreterState_Delete Py_PROTO((PyInterpreterState *)); ! ! DL_IMPORT(PyThreadState *) PyThreadState_New Py_PROTO((PyInterpreterState *)); ! DL_IMPORT(void) PyThreadState_Clear Py_PROTO((PyThreadState *)); ! DL_IMPORT(void) PyThreadState_Delete Py_PROTO((PyThreadState *)); ! ! DL_IMPORT(PyThreadState *) PyThreadState_Get Py_PROTO((void)); ! DL_IMPORT(PyThreadState *) PyThreadState_Swap Py_PROTO((PyThreadState *)); ! DL_IMPORT(PyObject *) PyThreadState_GetDict Py_PROTO((void)); --- 43,83 ---- typedef struct _ts { ! struct _ts *next; ! PyInterpreterState *interp; ! struct _frame *frame; ! int recursion_depth; ! int ticker; ! int tracing; ! PyObject *sys_profilefunc; ! PyObject *sys_tracefunc; ! PyObject *curexc_type; ! PyObject *curexc_value; ! PyObject *curexc_traceback; ! PyObject *exc_type; ! PyObject *exc_value; ! PyObject *exc_traceback; ! PyObject *dict; ! /* XXX signal handlers should also be here */ } PyThreadState; ! DL_IMPORT(PyInterpreterState *) PyInterpreterState_New(void); ! DL_IMPORT(void) PyInterpreterState_Clear(PyInterpreterState *); ! DL_IMPORT(void) PyInterpreterState_Delete(PyInterpreterState *); ! ! DL_IMPORT(PyThreadState *) PyThreadState_New(PyInterpreterState *); ! DL_IMPORT(void) PyThreadState_Clear(PyThreadState *); ! DL_IMPORT(void) PyThreadState_Delete(PyThreadState *); ! ! DL_IMPORT(PyThreadState *) PyThreadState_Get(void); ! DL_IMPORT(PyThreadState *) PyThreadState_Swap(PyThreadState *); ! DL_IMPORT(PyObject *) PyThreadState_GetDict(void); Index: structmember.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/structmember.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** structmember.h 2000/06/30 23:58:04 2.14 --- structmember.h 2000/07/08 23:37:28 2.15 *************** *** 72,77 **** #define RO READONLY /* Shorthand */ ! DL_IMPORT(PyObject *) PyMember_Get Py_PROTO((char *, struct memberlist *, char *)); ! DL_IMPORT(int) PyMember_Set Py_PROTO((char *, struct memberlist *, char *, PyObject *)); #ifdef __cplusplus --- 72,77 ---- #define RO READONLY /* Shorthand */ ! DL_IMPORT(PyObject *) PyMember_Get(char *, struct memberlist *, char *); ! DL_IMPORT(int) PyMember_Set(char *, struct memberlist *, char *, PyObject *); #ifdef __cplusplus Index: traceback.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/traceback.h,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** traceback.h 2000/06/30 23:58:04 2.16 --- traceback.h 2000/07/08 23:37:28 2.17 *************** *** 1,8 **** - #ifndef Py_TRACEBACK_H - #define Py_TRACEBACK_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 15,26 **** ******************************************************************/ /* Traceback interface */ struct _frame; ! DL_IMPORT(int) PyTraceBack_Here Py_PROTO((struct _frame *)); ! DL_IMPORT(PyObject *) PyTraceBack_Fetch Py_PROTO((void)); ! DL_IMPORT(int) PyTraceBack_Store Py_PROTO((PyObject *)); ! DL_IMPORT(int) PyTraceBack_Print Py_PROTO((PyObject *, PyObject *)); /* Reveale traceback type so we can typecheck traceback objects */ --- 9,26 ---- ******************************************************************/ + #ifndef Py_TRACEBACK_H + #define Py_TRACEBACK_H + #ifdef __cplusplus + extern "C" { + #endif + /* Traceback interface */ struct _frame; ! DL_IMPORT(int) PyTraceBack_Here(struct _frame *); ! DL_IMPORT(PyObject *) PyTraceBack_Fetch(void); ! DL_IMPORT(int) PyTraceBack_Store(PyObject *); ! DL_IMPORT(int) PyTraceBack_Print(PyObject *, PyObject *); /* Reveale traceback type so we can typecheck traceback objects */ From python-dev@python.org Sun Jul 9 01:20:39 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 17:20:39 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include abstract.h,2.20,2.21 bufferobject.h,2.4,2.5 classobject.h,2.30,2.31 cobject.h,2.7,2.8 compile.h,2.21,2.22 complexobject.h,2.6,2.7 fileobject.h,2.19,2.20 floatobject.h,2.15,2.16 frameobject.h,2.26,2.27 funcobject.h,2.18,2.19 grammar.h,2.12,2.13 intobject.h,2.19,2.20 listobject.h,2.19,2.20 methodobject.h,2.18,2.19 Message-ID: <200007090020.RAA15740@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv15720 Modified Files: abstract.h bufferobject.h classobject.h cobject.h compile.h complexobject.h fileobject.h floatobject.h frameobject.h funcobject.h grammar.h intobject.h listobject.h methodobject.h Log Message: ANSI-fication and Py_PROTO extermination. Index: abstract.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/abstract.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** abstract.h 2000/06/30 23:58:04 2.20 --- abstract.h 2000/07/09 00:20:36 2.21 *************** *** 234,238 **** #define PyObject_DelAttr(O,A) PyObject_SetAttr((O),(A),NULL) ! DL_IMPORT(int) PyObject_Cmp Py_PROTO((PyObject *o1, PyObject *o2, int *result)); /* --- 234,238 ---- #define PyObject_DelAttr(O,A) PyObject_SetAttr((O),(A),NULL) ! DL_IMPORT(int) PyObject_Cmp(PyObject *o1, PyObject *o2, int *result); /* *************** *** 282,286 **** */ ! DL_IMPORT(int) PyCallable_Check Py_PROTO((PyObject *o)); /* --- 282,286 ---- */ ! DL_IMPORT(int) PyCallable_Check(PyObject *o); /* *************** *** 294,299 **** ! DL_IMPORT(PyObject *) PyObject_CallObject Py_PROTO((PyObject *callable_object, ! PyObject *args)); /* --- 294,299 ---- ! DL_IMPORT(PyObject *) PyObject_CallObject(PyObject *callable_object, ! PyObject *args); /* *************** *** 307,312 **** */ ! DL_IMPORT(PyObject *) PyObject_CallFunction Py_PROTO((PyObject *callable_object, ! char *format, ...)); /* --- 307,312 ---- */ ! DL_IMPORT(PyObject *) PyObject_CallFunction(PyObject *callable_object, ! char *format, ...); /* *************** *** 321,326 **** ! DL_IMPORT(PyObject *) PyObject_CallMethod Py_PROTO((PyObject *o, char *m, ! char *format, ...)); /* --- 321,326 ---- ! DL_IMPORT(PyObject *) PyObject_CallMethod(PyObject *o, char *m, ! char *format, ...); /* *************** *** 374,378 **** */ ! DL_IMPORT(PyObject *) PyObject_Type Py_PROTO((PyObject *o)); /* --- 374,378 ---- */ ! DL_IMPORT(PyObject *) PyObject_Type(PyObject *o); /* *************** *** 382,386 **** */ ! DL_IMPORT(int) PyObject_Length Py_PROTO((PyObject *o)); /* --- 382,386 ---- */ ! DL_IMPORT(int) PyObject_Length(PyObject *o); /* *************** *** 392,396 **** */ ! DL_IMPORT(PyObject *) PyObject_GetItem Py_PROTO((PyObject *o, PyObject *key)); /* --- 392,396 ---- */ ! DL_IMPORT(PyObject *) PyObject_GetItem(PyObject *o, PyObject *key); /* *************** *** 401,405 **** */ ! DL_IMPORT(int) PyObject_SetItem Py_PROTO((PyObject *o, PyObject *key, PyObject *v)); /* --- 401,405 ---- */ ! DL_IMPORT(int) PyObject_SetItem(PyObject *o, PyObject *key, PyObject *v); /* *************** *** 409,413 **** */ ! DL_IMPORT(int) PyObject_DelItem Py_PROTO((PyObject *o, PyObject *key)); /* --- 409,413 ---- */ ! DL_IMPORT(int) PyObject_DelItem(PyObject *o, PyObject *key); /* *************** *** 465,469 **** /* Number Protocol:*/ ! DL_IMPORT(int) PyNumber_Check Py_PROTO((PyObject *o)); /* --- 465,469 ---- /* Number Protocol:*/ ! DL_IMPORT(int) PyNumber_Check(PyObject *o); /* *************** *** 475,479 **** */ ! DL_IMPORT(PyObject *) PyNumber_Add Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 475,479 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Add(PyObject *o1, PyObject *o2); /* *************** *** 484,488 **** */ ! DL_IMPORT(PyObject *) PyNumber_Subtract Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 484,488 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Subtract(PyObject *o1, PyObject *o2); /* *************** *** 493,497 **** */ ! DL_IMPORT(PyObject *) PyNumber_Multiply Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 493,497 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Multiply(PyObject *o1, PyObject *o2); /* *************** *** 503,507 **** */ ! DL_IMPORT(PyObject *) PyNumber_Divide Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 503,507 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Divide(PyObject *o1, PyObject *o2); /* *************** *** 512,516 **** */ ! DL_IMPORT(PyObject *) PyNumber_Remainder Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 512,516 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Remainder(PyObject *o1, PyObject *o2); /* *************** *** 522,526 **** */ ! DL_IMPORT(PyObject *) PyNumber_Divmod Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 522,526 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Divmod(PyObject *o1, PyObject *o2); /* *************** *** 532,536 **** */ ! DL_IMPORT(PyObject *) PyNumber_Power Py_PROTO((PyObject *o1, PyObject *o2, PyObject *o3)); /* --- 532,537 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Power(PyObject *o1, PyObject *o2, ! PyObject *o3); /* *************** *** 541,545 **** */ ! DL_IMPORT(PyObject *) PyNumber_Negative Py_PROTO((PyObject *o)); /* --- 542,546 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Negative(PyObject *o); /* *************** *** 549,553 **** */ ! DL_IMPORT(PyObject *) PyNumber_Positive Py_PROTO((PyObject *o)); /* --- 550,554 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Positive(PyObject *o); /* *************** *** 557,561 **** */ ! DL_IMPORT(PyObject *) PyNumber_Absolute Py_PROTO((PyObject *o)); /* --- 558,562 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Absolute(PyObject *o); /* *************** *** 565,569 **** */ ! DL_IMPORT(PyObject *) PyNumber_Invert Py_PROTO((PyObject *o)); /* --- 566,570 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Invert(PyObject *o); /* *************** *** 575,579 **** */ ! DL_IMPORT(PyObject *) PyNumber_Lshift Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 576,580 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Lshift(PyObject *o1, PyObject *o2); /* *************** *** 585,589 **** */ ! DL_IMPORT(PyObject *) PyNumber_Rshift Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 586,590 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Rshift(PyObject *o1, PyObject *o2); /* *************** *** 594,598 **** */ ! DL_IMPORT(PyObject *) PyNumber_And Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 595,599 ---- */ ! DL_IMPORT(PyObject *) PyNumber_And(PyObject *o1, PyObject *o2); /* *************** *** 604,608 **** */ ! DL_IMPORT(PyObject *) PyNumber_Xor Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 605,609 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Xor(PyObject *o1, PyObject *o2); /* *************** *** 614,618 **** */ ! DL_IMPORT(PyObject *) PyNumber_Or Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 615,619 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Or(PyObject *o1, PyObject *o2); /* *************** *** 642,646 **** */ ! DL_IMPORT(PyObject *) PyNumber_Int Py_PROTO((PyObject *o)); /* --- 643,647 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Int(PyObject *o); /* *************** *** 651,655 **** */ ! DL_IMPORT(PyObject *) PyNumber_Long Py_PROTO((PyObject *o)); /* --- 652,656 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Long(PyObject *o); /* *************** *** 660,664 **** */ ! DL_IMPORT(PyObject *) PyNumber_Float Py_PROTO((PyObject *o)); /* --- 661,665 ---- */ ! DL_IMPORT(PyObject *) PyNumber_Float(PyObject *o); /* *************** *** 671,675 **** /* Sequence protocol:*/ ! DL_IMPORT(int) PySequence_Check Py_PROTO((PyObject *o)); /* --- 672,676 ---- /* Sequence protocol:*/ ! DL_IMPORT(int) PySequence_Check(PyObject *o); /* *************** *** 681,685 **** */ ! DL_IMPORT(int) PySequence_Length Py_PROTO((PyObject *o)); /* --- 682,686 ---- */ ! DL_IMPORT(int) PySequence_Length(PyObject *o); /* *************** *** 688,692 **** */ ! DL_IMPORT(PyObject *) PySequence_Concat Py_PROTO((PyObject *o1, PyObject *o2)); /* --- 689,693 ---- */ ! DL_IMPORT(PyObject *) PySequence_Concat(PyObject *o1, PyObject *o2); /* *************** *** 697,701 **** */ ! DL_IMPORT(PyObject *) PySequence_Repeat Py_PROTO((PyObject *o, int count)); /* --- 698,702 ---- */ ! DL_IMPORT(PyObject *) PySequence_Repeat(PyObject *o, int count); /* *************** *** 706,710 **** */ ! DL_IMPORT(PyObject *) PySequence_GetItem Py_PROTO((PyObject *o, int i)); /* --- 707,711 ---- */ ! DL_IMPORT(PyObject *) PySequence_GetItem(PyObject *o, int i); /* *************** *** 713,717 **** */ ! DL_IMPORT(PyObject *) PySequence_GetSlice Py_PROTO((PyObject *o, int i1, int i2)); /* --- 714,718 ---- */ ! DL_IMPORT(PyObject *) PySequence_GetSlice(PyObject *o, int i1, int i2); /* *************** *** 722,726 **** */ ! DL_IMPORT(int) PySequence_SetItem Py_PROTO((PyObject *o, int i, PyObject *v)); /* --- 723,727 ---- */ ! DL_IMPORT(int) PySequence_SetItem(PyObject *o, int i, PyObject *v); /* *************** *** 731,735 **** */ ! DL_IMPORT(int) PySequence_DelItem Py_PROTO((PyObject *o, int i)); /* --- 732,736 ---- */ ! DL_IMPORT(int) PySequence_DelItem(PyObject *o, int i); /* *************** *** 739,743 **** */ ! DL_IMPORT(int) PySequence_SetSlice Py_PROTO((PyObject *o, int i1, int i2, PyObject *v)); /* --- 740,745 ---- */ ! DL_IMPORT(int) PySequence_SetSlice(PyObject *o, int i1, int i2, ! PyObject *v); /* *************** *** 747,751 **** */ ! DL_IMPORT(int) PySequence_DelSlice Py_PROTO((PyObject *o, int i1, int i2)); /* --- 749,753 ---- */ ! DL_IMPORT(int) PySequence_DelSlice(PyObject *o, int i1, int i2); /* *************** *** 755,759 **** */ ! DL_IMPORT(PyObject *) PySequence_Tuple Py_PROTO((PyObject *o)); /* --- 757,761 ---- */ ! DL_IMPORT(PyObject *) PySequence_Tuple(PyObject *o); /* *************** *** 763,767 **** ! DL_IMPORT(PyObject *) PySequence_List Py_PROTO((PyObject *o)); /* --- 765,769 ---- ! DL_IMPORT(PyObject *) PySequence_List(PyObject *o); /* *************** *** 770,774 **** */ ! DL_IMPORT(PyObject *) PySequence_Fast Py_PROTO((PyObject *o, const char* m)); /* --- 772,776 ---- */ ! DL_IMPORT(PyObject *) PySequence_Fast(PyObject *o, const char* m); /* *************** *** 789,793 **** */ ! DL_IMPORT(int) PySequence_Count Py_PROTO((PyObject *o, PyObject *value)); /* --- 791,795 ---- */ ! DL_IMPORT(int) PySequence_Count(PyObject *o, PyObject *value); /* *************** *** 798,806 **** */ ! DL_IMPORT(int) PySequence_Contains Py_PROTO((PyObject *o, PyObject *value)); /* For DLL-level backwards compatibility */ #undef PySequence_In ! DL_IMPORT(int) PySequence_In Py_PROTO((PyObject *o, PyObject *value)); /* For source-level backwards compatibility */ --- 800,808 ---- */ ! DL_IMPORT(int) PySequence_Contains(PyObject *o, PyObject *value); /* For DLL-level backwards compatibility */ #undef PySequence_In ! DL_IMPORT(int) PySequence_In(PyObject *o, PyObject *value); /* For source-level backwards compatibility */ *************** *** 813,817 **** */ ! DL_IMPORT(int) PySequence_Index Py_PROTO((PyObject *o, PyObject *value)); /* --- 815,819 ---- */ ! DL_IMPORT(int) PySequence_Index(PyObject *o, PyObject *value); /* *************** *** 823,827 **** /* Mapping protocol:*/ ! DL_IMPORT(int) PyMapping_Check Py_PROTO((PyObject *o)); /* --- 825,829 ---- /* Mapping protocol:*/ ! DL_IMPORT(int) PyMapping_Check(PyObject *o); /* *************** *** 832,836 **** */ ! DL_IMPORT(int) PyMapping_Length Py_PROTO((PyObject *o)); /* --- 834,838 ---- */ ! DL_IMPORT(int) PyMapping_Length(PyObject *o); /* *************** *** 842,846 **** /* implemented as a macro: ! int PyMapping_DelItemString Py_PROTO((PyObject *o, char *key)); Remove the mapping for object, key, from the object *o. --- 844,848 ---- /* implemented as a macro: ! int PyMapping_DelItemString(PyObject *o, char *key); Remove the mapping for object, key, from the object *o. *************** *** 852,856 **** /* implemented as a macro: ! int PyMapping_DelItem Py_PROTO((PyObject *o, PyObject *key)); Remove the mapping for object, key, from the object *o. --- 854,858 ---- /* implemented as a macro: ! int PyMapping_DelItem(PyObject *o, PyObject *key); Remove the mapping for object, key, from the object *o. *************** *** 860,864 **** #define PyMapping_DelItem(O,K) PyDict_DelItem((O),(K)) ! DL_IMPORT(int) PyMapping_HasKeyString Py_PROTO((PyObject *o, char *key)); /* --- 862,866 ---- #define PyMapping_DelItem(O,K) PyDict_DelItem((O),(K)) ! DL_IMPORT(int) PyMapping_HasKeyString(PyObject *o, char *key); /* *************** *** 870,874 **** */ ! DL_IMPORT(int) PyMapping_HasKey Py_PROTO((PyObject *o, PyObject *key)); /* --- 872,876 ---- */ ! DL_IMPORT(int) PyMapping_HasKey(PyObject *o, PyObject *key); /* *************** *** 913,917 **** #define PyMapping_Items(O) PyObject_CallMethod(O,"items",NULL) ! DL_IMPORT(PyObject *) PyMapping_GetItemString Py_PROTO((PyObject *o, char *key)); /* --- 915,919 ---- #define PyMapping_Items(O) PyObject_CallMethod(O,"items",NULL) ! DL_IMPORT(PyObject *) PyMapping_GetItemString(PyObject *o, char *key); /* *************** *** 921,926 **** */ ! DL_IMPORT(int) PyMapping_SetItemString Py_PROTO((PyObject *o, char *key, ! PyObject *value)); /* --- 923,928 ---- */ ! DL_IMPORT(int) PyMapping_SetItemString(PyObject *o, char *key, ! PyObject *value); /* Index: bufferobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/bufferobject.h,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** bufferobject.h 2000/06/30 23:58:04 2.4 --- bufferobject.h 2000/07/09 00:20:36 2.5 *************** *** 1,8 **** - #ifndef Py_BUFFEROBJECT_H - #define Py_BUFFEROBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 19,22 **** --- 13,22 ---- /* Note: the object's structure is private */ + #ifndef Py_BUFFEROBJECT_H + #define Py_BUFFEROBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + extern DL_IMPORT(PyTypeObject) PyBuffer_Type; *************** *** 26,36 **** #define Py_END_OF_BUFFER (-1) ! extern DL_IMPORT(PyObject *) PyBuffer_FromObject Py_PROTO((PyObject *base, int offset, int size)); ! extern DL_IMPORT(PyObject *) PyBuffer_FromReadWriteObject Py_PROTO((PyObject *base, int offset, int size)); ! extern DL_IMPORT(PyObject *) PyBuffer_FromMemory Py_PROTO((void *ptr, int size)); ! extern DL_IMPORT(PyObject *) PyBuffer_FromReadWriteMemory Py_PROTO((void *ptr, int size)); ! extern DL_IMPORT(PyObject *) PyBuffer_New Py_PROTO((int size)); #ifdef __cplusplus --- 26,39 ---- #define Py_END_OF_BUFFER (-1) ! extern DL_IMPORT(PyObject *) PyBuffer_FromObject(PyObject *base, ! int offset, int size); ! extern DL_IMPORT(PyObject *) PyBuffer_FromReadWriteObject(PyObject *base, ! int offset, ! int size); ! extern DL_IMPORT(PyObject *) PyBuffer_FromMemory(void *ptr, int size); ! extern DL_IMPORT(PyObject *) PyBuffer_FromReadWriteMemory(void *ptr, int size); ! extern DL_IMPORT(PyObject *) PyBuffer_New(int size); #ifdef __cplusplus *************** *** 38,40 **** #endif #endif /* !Py_BUFFEROBJECT_H */ - --- 41,42 ---- Index: classobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/classobject.h,v retrieving revision 2.30 retrieving revision 2.31 diff -C2 -r2.30 -r2.31 *** classobject.h 2000/06/30 23:58:04 2.30 --- classobject.h 2000/07/09 00:20:36 2.31 *************** *** 1,8 **** - #ifndef Py_CLASSOBJECT_H - #define Py_CLASSOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 19,44 **** /* Revealing some structures (not for general use) */ typedef struct { ! PyObject_HEAD ! PyObject *cl_bases; /* A tuple of class objects */ ! PyObject *cl_dict; /* A dictionary */ ! PyObject *cl_name; /* A string */ ! /* The following three are functions or NULL */ ! PyObject *cl_getattr; ! PyObject *cl_setattr; ! PyObject *cl_delattr; } PyClassObject; typedef struct { ! PyObject_HEAD ! PyClassObject *in_class; /* The class object */ ! PyObject *in_dict; /* A dictionary */ } PyInstanceObject; typedef struct { ! PyObject_HEAD ! PyObject *im_func; /* The callable object implementing the method */ ! PyObject *im_self; /* The instance it is bound to, or NULL */ ! PyObject *im_class; /* The class that defined the method */ } PyMethodObject; --- 13,44 ---- /* Revealing some structures (not for general use) */ + #ifndef Py_CLASSOBJECT_H + #define Py_CLASSOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + typedef struct { ! PyObject_HEAD ! PyObject *cl_bases; /* A tuple of class objects */ ! PyObject *cl_dict; /* A dictionary */ ! PyObject *cl_name; /* A string */ ! /* The following three are functions or NULL */ ! PyObject *cl_getattr; ! PyObject *cl_setattr; ! PyObject *cl_delattr; } PyClassObject; typedef struct { ! PyObject_HEAD ! PyClassObject *in_class; /* The class object */ ! PyObject *in_dict; /* A dictionary */ } PyInstanceObject; typedef struct { ! PyObject_HEAD ! PyObject *im_func; /* The callable object implementing the method */ ! PyObject *im_self; /* The instance it is bound to, or NULL */ ! PyObject *im_class; /* The class that defined the method */ } PyMethodObject; *************** *** 49,59 **** #define PyMethod_Check(op) ((op)->ob_type == &PyMethod_Type) ! extern DL_IMPORT(PyObject *) PyClass_New Py_PROTO((PyObject *, PyObject *, PyObject *)); ! extern DL_IMPORT(PyObject *) PyInstance_New Py_PROTO((PyObject *, PyObject *, PyObject *)); ! extern DL_IMPORT(PyObject *) PyMethod_New Py_PROTO((PyObject *, PyObject *, PyObject *)); ! ! extern DL_IMPORT(PyObject *) PyMethod_Function Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyMethod_Self Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyMethod_Class Py_PROTO((PyObject *)); /* Macros for direct access to these values. Type checks are *not* --- 49,60 ---- #define PyMethod_Check(op) ((op)->ob_type == &PyMethod_Type) ! extern DL_IMPORT(PyObject *) PyClass_New(PyObject *, PyObject *, PyObject *); ! extern DL_IMPORT(PyObject *) PyInstance_New(PyObject *, PyObject *, ! PyObject *); ! extern DL_IMPORT(PyObject *) PyMethod_New(PyObject *, PyObject *, PyObject *); ! ! extern DL_IMPORT(PyObject *) PyMethod_Function(PyObject *); ! extern DL_IMPORT(PyObject *) PyMethod_Self(PyObject *); ! extern DL_IMPORT(PyObject *) PyMethod_Class(PyObject *); /* Macros for direct access to these values. Type checks are *not* *************** *** 66,75 **** (((PyMethodObject *)meth) -> im_class) ! extern DL_IMPORT(int) PyClass_IsSubclass Py_PROTO((PyObject *, PyObject *)); ! extern DL_IMPORT(PyObject *) PyInstance_DoBinOp ! Py_PROTO((PyObject *, PyObject *, ! char *, char *, ! PyObject * (*) Py_PROTO((PyObject *, PyObject *)) )); #ifdef __cplusplus --- 67,76 ---- (((PyMethodObject *)meth) -> im_class) ! extern DL_IMPORT(int) PyClass_IsSubclass(PyObject *, PyObject *); ! extern DL_IMPORT(PyObject *) PyInstance_DoBinOp(PyObject *, PyObject *, ! char *, char *, ! PyObject * (*)(PyObject *, ! PyObject *)); #ifdef __cplusplus Index: cobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/cobject.h,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** cobject.h 2000/06/30 23:58:04 2.7 --- cobject.h 2000/07/09 00:20:36 2.8 *************** *** 1,8 **** - #ifndef Py_COBJECT_H - #define Py_COBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 24,27 **** --- 18,27 ---- */ + #ifndef Py_COBJECT_H + #define Py_COBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + extern DL_IMPORT(PyTypeObject) PyCObject_Type; *************** *** 35,39 **** */ extern DL_IMPORT(PyObject *) ! PyCObject_FromVoidPtr Py_PROTO((void *cobj, void (*destruct)(void*))); --- 35,39 ---- */ extern DL_IMPORT(PyObject *) ! PyCObject_FromVoidPtr(void *cobj, void (*destruct)(void*)); *************** *** 44,61 **** */ extern DL_IMPORT(PyObject *) ! PyCObject_FromVoidPtrAndDesc Py_PROTO((void *cobj, void *desc, ! void (*destruct)(void*,void*))); /* Retrieve a pointer to a C object from a PyCObject. */ extern DL_IMPORT(void *) ! PyCObject_AsVoidPtr Py_PROTO((PyObject *)); /* Retrieve a pointer to a description object from a PyCObject. */ extern DL_IMPORT(void *) ! PyCObject_GetDesc Py_PROTO((PyObject *)); /* Import a pointer to a C object from a module using a PyCObject. */ extern DL_IMPORT(void *) ! PyCObject_Import Py_PROTO((char *module_name, char *cobject_name)); #ifdef __cplusplus --- 44,61 ---- */ extern DL_IMPORT(PyObject *) ! PyCObject_FromVoidPtrAndDesc(void *cobj, void *desc, ! void (*destruct)(void*,void*)); /* Retrieve a pointer to a C object from a PyCObject. */ extern DL_IMPORT(void *) ! PyCObject_AsVoidPtr(PyObject *); /* Retrieve a pointer to a description object from a PyCObject. */ extern DL_IMPORT(void *) ! PyCObject_GetDesc(PyObject *); /* Import a pointer to a C object from a module using a PyCObject. */ extern DL_IMPORT(void *) ! PyCObject_Import(char *module_name, char *cobject_name); #ifdef __cplusplus Index: compile.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/compile.h,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** compile.h 2000/06/30 23:58:04 2.21 --- compile.h 2000/07/09 00:20:36 2.22 *************** *** 1,8 **** - #ifndef Py_COMPILE_H - #define Py_COMPILE_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,36 **** /* Definitions for bytecode */ /* Bytecode object */ typedef struct { ! PyObject_HEAD ! int co_argcount; /* #arguments, except *args */ ! int co_nlocals; /* #local variables */ ! int co_stacksize; /* #entries needed for evaluation stack */ ! int co_flags; /* CO_..., see below */ ! PyObject *co_code; /* instruction opcodes */ ! PyObject *co_consts; /* list (constants used) */ ! PyObject *co_names; /* list of strings (names used) */ ! PyObject *co_varnames; /* tuple of strings (local variable names) */ ! /* The rest doesn't count for hash/cmp */ ! PyObject *co_filename; /* string (where it was loaded from) */ ! PyObject *co_name; /* string (name, for reference) */ ! int co_firstlineno; /* first source line number */ ! PyObject *co_lnotab; /* string (encoding addr<->lineno mapping) */ } PyCodeObject; --- 11,36 ---- /* Definitions for bytecode */ + #ifndef Py_COMPILE_H + #define Py_COMPILE_H + #ifdef __cplusplus + extern "C" { + #endif + /* Bytecode object */ typedef struct { ! PyObject_HEAD ! int co_argcount; /* #arguments, except *args */ ! int co_nlocals; /* #local variables */ ! int co_stacksize; /* #entries needed for evaluation stack */ ! int co_flags; /* CO_..., see below */ ! PyObject *co_code; /* instruction opcodes */ ! PyObject *co_consts; /* list (constants used) */ ! PyObject *co_names; /* list of strings (names used) */ ! PyObject *co_varnames; /* tuple of strings (local variable names) */ ! /* The rest doesn't count for hash/cmp */ ! PyObject *co_filename; /* string (where it was loaded from) */ ! PyObject *co_name; /* string (name, for reference) */ ! int co_firstlineno; /* first source line number */ ! PyObject *co_lnotab; /* string (encoding addr<->lineno mapping) */ } PyCodeObject; *************** *** 49,57 **** /* Public interface */ struct _node; /* Declare the existence of this type */ ! DL_IMPORT(PyCodeObject *) PyNode_Compile Py_PROTO((struct _node *, char *)); ! DL_IMPORT(PyCodeObject *) PyCode_New Py_PROTO(( int, int, int, int, PyObject *, PyObject *, PyObject *, PyObject *, ! PyObject *, PyObject *, int, PyObject *)); /* same as struct above */ ! DL_IMPORT(int) PyCode_Addr2Line Py_PROTO((PyCodeObject *, int)); /* for internal use only */ --- 49,57 ---- /* Public interface */ struct _node; /* Declare the existence of this type */ ! DL_IMPORT(PyCodeObject *) PyNode_Compile(struct _node *, char *); ! DL_IMPORT(PyCodeObject *) PyCode_New( int, int, int, int, PyObject *, PyObject *, PyObject *, PyObject *, ! PyObject *, PyObject *, int, PyObject *); /* same as struct above */ ! DL_IMPORT(int) PyCode_Addr2Line(PyCodeObject *, int); /* for internal use only */ Index: complexobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/complexobject.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** complexobject.h 1998/12/04 18:47:56 2.6 --- complexobject.h 2000/07/09 00:20:36 2.7 *************** *** 1,2 **** --- 1,4 ---- + /* Complex number structure */ + #ifndef COMPLEXOBJECT_H #define COMPLEXOBJECT_H *************** *** 5,13 **** #endif - /* Complex number structure */ - typedef struct { ! double real; ! double imag; } Py_complex; --- 7,13 ---- #endif typedef struct { ! double real; ! double imag; } Py_complex; *************** *** 21,30 **** #define c_pow _Py_c_pow ! extern DL_IMPORT(Py_complex) c_sum Py_PROTO((Py_complex, Py_complex)); ! extern DL_IMPORT(Py_complex) c_diff Py_PROTO((Py_complex, Py_complex)); ! extern DL_IMPORT(Py_complex) c_neg Py_PROTO((Py_complex)); ! extern DL_IMPORT(Py_complex) c_prod Py_PROTO((Py_complex, Py_complex)); ! extern DL_IMPORT(Py_complex) c_quot Py_PROTO((Py_complex, Py_complex)); ! extern DL_IMPORT(Py_complex) c_pow Py_PROTO((Py_complex, Py_complex)); --- 21,30 ---- #define c_pow _Py_c_pow ! extern DL_IMPORT(Py_complex) c_sum(Py_complex, Py_complex); ! extern DL_IMPORT(Py_complex) c_diff(Py_complex, Py_complex); ! extern DL_IMPORT(Py_complex) c_neg(Py_complex); ! extern DL_IMPORT(Py_complex) c_prod(Py_complex, Py_complex); ! extern DL_IMPORT(Py_complex) c_quot(Py_complex, Py_complex); ! extern DL_IMPORT(Py_complex) c_pow(Py_complex, Py_complex); *************** *** 37,42 **** typedef struct { ! PyObject_HEAD ! Py_complex cval; } PyComplexObject; --- 37,42 ---- typedef struct { ! PyObject_HEAD ! Py_complex cval; } PyComplexObject; *************** *** 45,54 **** #define PyComplex_Check(op) ((op)->ob_type == &PyComplex_Type) ! extern DL_IMPORT(PyObject *) PyComplex_FromCComplex Py_PROTO((Py_complex)); ! extern DL_IMPORT(PyObject *) PyComplex_FromDoubles Py_PROTO((double real, double imag)); ! extern DL_IMPORT(double) PyComplex_RealAsDouble Py_PROTO((PyObject *op)); ! extern DL_IMPORT(double) PyComplex_ImagAsDouble Py_PROTO((PyObject *op)); ! extern DL_IMPORT(Py_complex) PyComplex_AsCComplex Py_PROTO((PyObject *op)); #ifdef __cplusplus --- 45,54 ---- #define PyComplex_Check(op) ((op)->ob_type == &PyComplex_Type) ! extern DL_IMPORT(PyObject *) PyComplex_FromCComplex(Py_complex); ! extern DL_IMPORT(PyObject *) PyComplex_FromDoubles(double real, double imag); ! extern DL_IMPORT(double) PyComplex_RealAsDouble(PyObject *op); ! extern DL_IMPORT(double) PyComplex_ImagAsDouble(PyObject *op); ! extern DL_IMPORT(Py_complex) PyComplex_AsCComplex(PyObject *op); #ifdef __cplusplus Index: fileobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/fileobject.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** fileobject.h 2000/06/30 23:58:04 2.19 --- fileobject.h 2000/07/09 00:20:36 2.20 *************** *** 1,8 **** - #ifndef Py_FILEOBJECT_H - #define Py_FILEOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,34 **** /* File object interface */ extern DL_IMPORT(PyTypeObject) PyFile_Type; #define PyFile_Check(op) ((op)->ob_type == &PyFile_Type) ! extern DL_IMPORT(PyObject *) PyFile_FromString Py_PROTO((char *, char *)); ! extern DL_IMPORT(void) PyFile_SetBufSize Py_PROTO((PyObject *, int)); ! extern DL_IMPORT(PyObject *) PyFile_FromFile ! Py_PROTO((FILE *, char *, char *, int (*)Py_FPROTO((FILE *)))); ! extern DL_IMPORT(FILE *) PyFile_AsFile Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyFile_Name Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyFile_GetLine Py_PROTO((PyObject *, int)); ! extern DL_IMPORT(int) PyFile_WriteObject Py_PROTO((PyObject *, PyObject *, int)); ! extern DL_IMPORT(int) PyFile_SoftSpace Py_PROTO((PyObject *, int)); ! extern DL_IMPORT(int) PyFile_WriteString Py_PROTO((char *, PyObject *)); #ifdef __cplusplus --- 11,34 ---- /* File object interface */ + #ifndef Py_FILEOBJECT_H + #define Py_FILEOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + extern DL_IMPORT(PyTypeObject) PyFile_Type; #define PyFile_Check(op) ((op)->ob_type == &PyFile_Type) ! extern DL_IMPORT(PyObject *) PyFile_FromString(char *, char *); ! extern DL_IMPORT(void) PyFile_SetBufSize(PyObject *, int); ! extern DL_IMPORT(PyObject *) PyFile_FromFile(FILE *, char *, char *, ! int (*)(FILE *)); ! extern DL_IMPORT(FILE *) PyFile_AsFile(PyObject *); ! extern DL_IMPORT(PyObject *) PyFile_Name(PyObject *); ! extern DL_IMPORT(PyObject *) PyFile_GetLine(PyObject *, int); ! extern DL_IMPORT(int) PyFile_WriteObject(PyObject *, PyObject *, int); ! extern DL_IMPORT(int) PyFile_SoftSpace(PyObject *, int); ! extern DL_IMPORT(int) PyFile_WriteString(char *, PyObject *); #ifdef __cplusplus Index: floatobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/floatobject.h,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** floatobject.h 2000/06/30 23:58:04 2.15 --- floatobject.h 2000/07/09 00:20:36 2.16 *************** *** 1,8 **** - #ifndef Py_FLOATOBJECT_H - #define Py_FLOATOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 21,27 **** */ typedef struct { ! PyObject_HEAD ! double ob_fval; } PyFloatObject; --- 15,27 ---- */ + #ifndef Py_FLOATOBJECT_H + #define Py_FLOATOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + typedef struct { ! PyObject_HEAD ! double ob_fval; } PyFloatObject; *************** *** 30,36 **** #define PyFloat_Check(op) ((op)->ob_type == &PyFloat_Type) ! extern DL_IMPORT(PyObject *) PyFloat_FromString Py_PROTO((PyObject*, char**)); ! extern DL_IMPORT(PyObject *) PyFloat_FromDouble Py_PROTO((double)); ! extern DL_IMPORT(double) PyFloat_AsDouble Py_PROTO((PyObject *)); /* Macro, trading safety for speed */ --- 30,36 ---- #define PyFloat_Check(op) ((op)->ob_type == &PyFloat_Type) ! extern DL_IMPORT(PyObject *) PyFloat_FromString(PyObject*, char**); ! extern DL_IMPORT(PyObject *) PyFloat_FromDouble(double); ! extern DL_IMPORT(double) PyFloat_AsDouble(PyObject *); /* Macro, trading safety for speed */ Index: frameobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/frameobject.h,v retrieving revision 2.26 retrieving revision 2.27 diff -C2 -r2.26 -r2.27 *** frameobject.h 2000/06/30 23:58:04 2.26 --- frameobject.h 2000/07/09 00:20:36 2.27 *************** *** 1,8 **** - #ifndef Py_FRAMEOBJECT_H - #define Py_FRAMEOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,46 **** /* Frame object interface */ typedef struct { ! int b_type; /* what kind of block this is */ ! int b_handler; /* where to jump to find handler */ ! int b_level; /* value stack level to pop to */ } PyTryBlock; typedef struct _frame { ! PyObject_HEAD ! struct _frame *f_back; /* previous frame, or NULL */ ! PyCodeObject *f_code; /* code segment */ ! PyObject *f_builtins; /* builtin symbol table (PyDictObject) */ ! PyObject *f_globals; /* global symbol table (PyDictObject) */ ! PyObject *f_locals; /* local symbol table (PyDictObject) */ ! PyObject **f_valuestack; /* points after the last local */ ! PyObject *f_trace; /* Trace function */ ! PyObject *f_exc_type, *f_exc_value, *f_exc_traceback; ! PyThreadState *f_tstate; ! int f_lasti; /* Last instruction if called */ ! int f_lineno; /* Current line number */ ! int f_restricted; /* Flag set if restricted operations in this scope */ ! int f_iblock; /* index in f_blockstack */ ! PyTryBlock f_blockstack[CO_MAXBLOCKS]; /* for try and loop blocks */ ! int f_nlocals; /* number of locals */ ! int f_stacksize; /* size of value stack */ ! PyObject *f_localsplus[1]; /* locals+stack, dynamically sized */ } PyFrameObject; --- 11,46 ---- /* Frame object interface */ + #ifndef Py_FRAMEOBJECT_H + #define Py_FRAMEOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + typedef struct { ! int b_type; /* what kind of block this is */ ! int b_handler; /* where to jump to find handler */ ! int b_level; /* value stack level to pop to */ } PyTryBlock; typedef struct _frame { ! PyObject_HEAD ! struct _frame *f_back; /* previous frame, or NULL */ ! PyCodeObject *f_code; /* code segment */ ! PyObject *f_builtins; /* builtin symbol table (PyDictObject) */ ! PyObject *f_globals; /* global symbol table (PyDictObject) */ ! PyObject *f_locals; /* local symbol table (PyDictObject) */ ! PyObject **f_valuestack; /* points after the last local */ ! PyObject *f_trace; /* Trace function */ ! PyObject *f_exc_type, *f_exc_value, *f_exc_traceback; ! PyThreadState *f_tstate; ! int f_lasti; /* Last instruction if called */ ! int f_lineno; /* Current line number */ ! int f_restricted; /* Flag set if restricted operations in this scope */ ! int f_iblock; /* index in f_blockstack */ ! PyTryBlock f_blockstack[CO_MAXBLOCKS]; /* for try and loop blocks */ ! int f_nlocals; /* number of locals */ ! int f_stacksize; /* size of value stack */ ! PyObject *f_localsplus[1]; /* locals+stack, dynamically sized */ } PyFrameObject; *************** *** 52,58 **** #define PyFrame_Check(op) ((op)->ob_type == &PyFrame_Type) ! DL_IMPORT(PyFrameObject *) PyFrame_New ! Py_PROTO((PyThreadState *, PyCodeObject *, ! PyObject *, PyObject *)); --- 52,57 ---- #define PyFrame_Check(op) ((op)->ob_type == &PyFrame_Type) ! DL_IMPORT(PyFrameObject *) PyFrame_New(PyThreadState *, PyCodeObject *, ! PyObject *, PyObject *); *************** *** 81,95 **** /* Block management functions */ ! DL_IMPORT(void) PyFrame_BlockSetup Py_PROTO((PyFrameObject *, int, int, int)); ! DL_IMPORT(PyTryBlock *) PyFrame_BlockPop Py_PROTO((PyFrameObject *)); /* Extend the value stack */ ! DL_IMPORT(PyObject **) PyFrame_ExtendStack Py_PROTO((PyFrameObject *, int, int)); /* Conversions between "fast locals" and locals in dictionary */ ! DL_IMPORT(void) PyFrame_LocalsToFast Py_PROTO((PyFrameObject *, int)); ! DL_IMPORT(void) PyFrame_FastToLocals Py_PROTO((PyFrameObject *)); #ifdef __cplusplus --- 80,94 ---- /* Block management functions */ ! DL_IMPORT(void) PyFrame_BlockSetup(PyFrameObject *, int, int, int); ! DL_IMPORT(PyTryBlock *) PyFrame_BlockPop(PyFrameObject *); /* Extend the value stack */ ! DL_IMPORT(PyObject **) PyFrame_ExtendStack(PyFrameObject *, int, int); /* Conversions between "fast locals" and locals in dictionary */ ! DL_IMPORT(void) PyFrame_LocalsToFast(PyFrameObject *, int); ! DL_IMPORT(void) PyFrame_FastToLocals(PyFrameObject *); #ifdef __cplusplus Index: funcobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/funcobject.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** funcobject.h 2000/06/30 23:58:04 2.18 --- funcobject.h 2000/07/09 00:20:36 2.19 *************** *** 1,8 **** - #ifndef Py_FUNCOBJECT_H - #define Py_FUNCOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,27 **** /* Function object interface */ typedef struct { ! PyObject_HEAD ! PyObject *func_code; ! PyObject *func_globals; ! PyObject *func_defaults; ! PyObject *func_doc; ! PyObject *func_name; } PyFunctionObject; --- 11,27 ---- /* Function object interface */ + #ifndef Py_FUNCOBJECT_H + #define Py_FUNCOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + typedef struct { ! PyObject_HEAD ! PyObject *func_code; ! PyObject *func_globals; ! PyObject *func_defaults; ! PyObject *func_doc; ! PyObject *func_name; } PyFunctionObject; *************** *** 30,38 **** #define PyFunction_Check(op) ((op)->ob_type == &PyFunction_Type) ! extern DL_IMPORT(PyObject *) PyFunction_New Py_PROTO((PyObject *, PyObject *)); ! extern DL_IMPORT(PyObject *) PyFunction_GetCode Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyFunction_GetGlobals Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyFunction_GetDefaults Py_PROTO((PyObject *)); ! extern DL_IMPORT(int) PyFunction_SetDefaults Py_PROTO((PyObject *, PyObject *)); /* Macros for direct access to these values. Type checks are *not* --- 30,38 ---- #define PyFunction_Check(op) ((op)->ob_type == &PyFunction_Type) ! extern DL_IMPORT(PyObject *) PyFunction_New(PyObject *, PyObject *); ! extern DL_IMPORT(PyObject *) PyFunction_GetCode(PyObject *); ! extern DL_IMPORT(PyObject *) PyFunction_GetGlobals(PyObject *); ! extern DL_IMPORT(PyObject *) PyFunction_GetDefaults(PyObject *); ! extern DL_IMPORT(int) PyFunction_SetDefaults(PyObject *, PyObject *); /* Macros for direct access to these values. Type checks are *not* Index: grammar.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/grammar.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** grammar.h 2000/06/30 23:58:04 2.12 --- grammar.h 2000/07/09 00:20:36 2.13 *************** *** 1,8 **** - #ifndef Py_GRAMMAR_H - #define Py_GRAMMAR_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,20 **** --- 11,20 ---- /* Grammar interface */ + #ifndef Py_GRAMMAR_H + #define Py_GRAMMAR_H + #ifdef __cplusplus + extern "C" { + #endif + #include "bitset.h" /* Sigh... */ *************** *** 22,27 **** typedef struct { ! int lb_type; ! char *lb_str; } label; --- 22,27 ---- typedef struct { ! int lb_type; ! char *lb_str; } label; *************** *** 31,36 **** typedef struct { ! int ll_nlabels; ! label *ll_label; } labellist; --- 31,36 ---- typedef struct { ! int ll_nlabels; ! label *ll_label; } labellist; *************** *** 38,43 **** typedef struct { ! short a_lbl; /* Label of this arc */ ! short a_arrow; /* State where this arc goes to */ } arc; --- 38,43 ---- typedef struct { ! short a_lbl; /* Label of this arc */ ! short a_arrow; /* State where this arc goes to */ } arc; *************** *** 45,56 **** typedef struct { ! int s_narcs; ! arc *s_arc; /* Array of arcs */ ! /* Optional accelerators */ ! int s_lower; /* Lowest label index */ ! int s_upper; /* Highest label index */ ! int *s_accel; /* Accelerator */ ! int s_accept; /* Nonzero for accepting state */ } state; --- 45,56 ---- typedef struct { ! int s_narcs; ! arc *s_arc; /* Array of arcs */ ! /* Optional accelerators */ ! int s_lower; /* Lowest label index */ ! int s_upper; /* Highest label index */ ! int *s_accel; /* Accelerator */ ! int s_accept; /* Nonzero for accepting state */ } state; *************** *** 58,67 **** typedef struct { ! int d_type; /* Non-terminal this represents */ ! char *d_name; /* For printing */ ! int d_initial; /* Initial state */ ! int d_nstates; ! state *d_state; /* Array of states */ ! bitset d_first; } dfa; --- 58,67 ---- typedef struct { ! int d_type; /* Non-terminal this represents */ ! char *d_name; /* For printing */ ! int d_initial; /* Initial state */ ! int d_nstates; ! state *d_state; /* Array of states */ ! bitset d_first; } dfa; *************** *** 69,100 **** typedef struct { ! int g_ndfas; ! dfa *g_dfa; /* Array of DFAs */ ! labellist g_ll; ! int g_start; /* Start symbol of the grammar */ ! int g_accel; /* Set if accelerators present */ } grammar; /* FUNCTIONS */ ! grammar *newgrammar Py_PROTO((int start)); ! dfa *adddfa Py_PROTO((grammar *g, int type, char *name)); ! int addstate Py_PROTO((dfa *d)); ! void addarc Py_PROTO((dfa *d, int from, int to, int lbl)); ! dfa *PyGrammar_FindDFA Py_PROTO((grammar *g, int type)); ! char *typename Py_PROTO((grammar *g, int lbl)); ! ! int addlabel Py_PROTO((labellist *ll, int type, char *str)); ! int findlabel Py_PROTO((labellist *ll, int type, char *str)); ! char *PyGrammar_LabelRepr Py_PROTO((label *lb)); ! void translatelabels Py_PROTO((grammar *g)); ! void addfirstsets Py_PROTO((grammar *g)); ! void PyGrammar_AddAccelerators Py_PROTO((grammar *g)); ! void PyGrammar_RemoveAccelerators Py_PROTO((grammar *)); ! void printgrammar Py_PROTO((grammar *g, FILE *fp)); ! void printnonterminals Py_PROTO((grammar *g, FILE *fp)); #ifdef __cplusplus --- 69,100 ---- typedef struct { ! int g_ndfas; ! dfa *g_dfa; /* Array of DFAs */ ! labellist g_ll; ! int g_start; /* Start symbol of the grammar */ ! int g_accel; /* Set if accelerators present */ } grammar; /* FUNCTIONS */ ! grammar *newgrammar(int start); ! dfa *adddfa(grammar *g, int type, char *name); ! int addstate(dfa *d); ! void addarc(dfa *d, int from, int to, int lbl); ! dfa *PyGrammar_FindDFA(grammar *g, int type); ! char *typename(grammar *g, int lbl); ! ! int addlabel(labellist *ll, int type, char *str); ! int findlabel(labellist *ll, int type, char *str); ! char *PyGrammar_LabelRepr(label *lb); ! void translatelabels(grammar *g); ! void addfirstsets(grammar *g); ! void PyGrammar_AddAccelerators(grammar *g); ! void PyGrammar_RemoveAccelerators(grammar *); ! void printgrammar(grammar *g, FILE *fp); ! void printnonterminals(grammar *g, FILE *fp); #ifdef __cplusplus Index: intobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/intobject.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** intobject.h 2000/06/30 23:58:04 2.19 --- intobject.h 2000/07/09 00:20:36 2.20 *************** *** 1,8 **** - #ifndef Py_INTOBJECT_H - #define Py_INTOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 30,36 **** */ typedef struct { ! PyObject_HEAD ! long ob_ival; } PyIntObject; --- 24,36 ---- */ + #ifndef Py_INTOBJECT_H + #define Py_INTOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + typedef struct { ! PyObject_HEAD ! long ob_ival; } PyIntObject; *************** *** 39,47 **** #define PyInt_Check(op) ((op)->ob_type == &PyInt_Type) ! extern DL_IMPORT(PyObject *) PyInt_FromString Py_PROTO((char*, char**, int)); ! extern DL_IMPORT(PyObject *) PyInt_FromUnicode Py_PROTO((Py_UNICODE*, int, int)); ! extern DL_IMPORT(PyObject *) PyInt_FromLong Py_PROTO((long)); ! extern DL_IMPORT(long) PyInt_AsLong Py_PROTO((PyObject *)); ! extern DL_IMPORT(long) PyInt_GetMax Py_PROTO((void)); --- 39,47 ---- #define PyInt_Check(op) ((op)->ob_type == &PyInt_Type) ! extern DL_IMPORT(PyObject *) PyInt_FromString(char*, char**, int); ! extern DL_IMPORT(PyObject *) PyInt_FromUnicode(Py_UNICODE*, int, int); ! extern DL_IMPORT(PyObject *) PyInt_FromLong(long); ! extern DL_IMPORT(long) PyInt_AsLong(PyObject *); ! extern DL_IMPORT(long) PyInt_GetMax(void); *************** *** 69,74 **** * building it this way. :-) [cjh] */ ! extern DL_IMPORT(unsigned long) PyOS_strtoul Py_PROTO((char *, char **, int)); ! extern DL_IMPORT(long) PyOS_strtol Py_PROTO((char *, char **, int)); #ifdef __cplusplus --- 69,74 ---- * building it this way. :-) [cjh] */ ! extern DL_IMPORT(unsigned long) PyOS_strtoul(char *, char **, int); ! extern DL_IMPORT(long) PyOS_strtol(char *, char **, int); #ifdef __cplusplus Index: listobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/listobject.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** listobject.h 2000/06/30 23:58:04 2.19 --- listobject.h 2000/07/09 00:20:36 2.20 *************** *** 1,8 **** - #ifndef Py_LISTOBJECT_H - #define Py_LISTOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 29,35 **** */ typedef struct { ! PyObject_VAR_HEAD ! PyObject **ob_item; } PyListObject; --- 23,35 ---- */ + #ifndef Py_LISTOBJECT_H + #define Py_LISTOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + typedef struct { ! PyObject_VAR_HEAD ! PyObject **ob_item; } PyListObject; *************** *** 38,52 **** #define PyList_Check(op) ((op)->ob_type == &PyList_Type) ! extern DL_IMPORT(PyObject *) PyList_New Py_PROTO((int size)); ! extern DL_IMPORT(int) PyList_Size Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyList_GetItem Py_PROTO((PyObject *, int)); ! extern DL_IMPORT(int) PyList_SetItem Py_PROTO((PyObject *, int, PyObject *)); ! extern DL_IMPORT(int) PyList_Insert Py_PROTO((PyObject *, int, PyObject *)); ! extern DL_IMPORT(int) PyList_Append Py_PROTO((PyObject *, PyObject *)); ! extern DL_IMPORT(PyObject *) PyList_GetSlice Py_PROTO((PyObject *, int, int)); ! extern DL_IMPORT(int) PyList_SetSlice Py_PROTO((PyObject *, int, int, PyObject *)); ! extern DL_IMPORT(int) PyList_Sort Py_PROTO((PyObject *)); ! extern DL_IMPORT(int) PyList_Reverse Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyList_AsTuple Py_PROTO((PyObject *)); /* Macro, trading safety for speed */ --- 38,52 ---- #define PyList_Check(op) ((op)->ob_type == &PyList_Type) ! extern DL_IMPORT(PyObject *) PyList_New(int size); ! extern DL_IMPORT(int) PyList_Size(PyObject *); ! extern DL_IMPORT(PyObject *) PyList_GetItem(PyObject *, int); ! extern DL_IMPORT(int) PyList_SetItem(PyObject *, int, PyObject *); ! extern DL_IMPORT(int) PyList_Insert(PyObject *, int, PyObject *); ! extern DL_IMPORT(int) PyList_Append(PyObject *, PyObject *); ! extern DL_IMPORT(PyObject *) PyList_GetSlice(PyObject *, int, int); ! extern DL_IMPORT(int) PyList_SetSlice(PyObject *, int, int, PyObject *); ! extern DL_IMPORT(int) PyList_Sort(PyObject *); ! extern DL_IMPORT(int) PyList_Reverse(PyObject *); ! extern DL_IMPORT(PyObject *) PyList_AsTuple(PyObject *); /* Macro, trading safety for speed */ Index: methodobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/methodobject.h,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** methodobject.h 2000/06/30 23:58:04 2.18 --- methodobject.h 2000/07/09 00:20:36 2.19 *************** *** 1,8 **** - #ifndef Py_METHODOBJECT_H - #define Py_METHODOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,20 **** --- 11,20 ---- /* Method object interface */ + #ifndef Py_METHODOBJECT_H + #define Py_METHODOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + extern DL_IMPORT(PyTypeObject) PyCFunction_Type; *************** *** 25,31 **** Py_FPROTO((PyObject *, PyObject *, PyObject *)); ! extern DL_IMPORT(PyCFunction) PyCFunction_GetFunction Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyCFunction_GetSelf Py_PROTO((PyObject *)); ! extern DL_IMPORT(int) PyCFunction_GetFlags Py_PROTO((PyObject *)); /* Macros for direct access to these values. Type checks are *not* --- 25,31 ---- Py_FPROTO((PyObject *, PyObject *, PyObject *)); ! extern DL_IMPORT(PyCFunction) PyCFunction_GetFunction(PyObject *); ! extern DL_IMPORT(PyObject *) PyCFunction_GetSelf(PyObject *); ! extern DL_IMPORT(int) PyCFunction_GetFlags(PyObject *); /* Macros for direct access to these values. Type checks are *not* *************** *** 39,54 **** struct PyMethodDef { ! char *ml_name; ! PyCFunction ml_meth; ! int ml_flags; ! char *ml_doc; }; typedef struct PyMethodDef PyMethodDef; ! extern DL_IMPORT(PyObject *) Py_FindMethod ! Py_PROTO((PyMethodDef[], PyObject *, char *)); ! extern DL_IMPORT(PyObject *) PyCFunction_New ! Py_PROTO((PyMethodDef *, PyObject *)); /* Flag passed to newmethodobject */ --- 39,52 ---- struct PyMethodDef { ! char *ml_name; ! PyCFunction ml_meth; ! int ml_flags; ! char *ml_doc; }; typedef struct PyMethodDef PyMethodDef; ! extern DL_IMPORT(PyObject *) Py_FindMethod(PyMethodDef[], PyObject *, char *); ! extern DL_IMPORT(PyObject *) PyCFunction_New(PyMethodDef *, PyObject *); /* Flag passed to newmethodobject */ *************** *** 57,71 **** typedef struct PyMethodChain { ! PyMethodDef *methods; /* Methods of this type */ ! struct PyMethodChain *link; /* NULL or base type */ } PyMethodChain; ! extern DL_IMPORT(PyObject *) Py_FindMethodInChain ! Py_PROTO((PyMethodChain *, PyObject *, char *)); typedef struct { ! PyObject_HEAD ! PyMethodDef *m_ml; ! PyObject *m_self; } PyCFunctionObject; --- 55,69 ---- typedef struct PyMethodChain { ! PyMethodDef *methods; /* Methods of this type */ ! struct PyMethodChain *link; /* NULL or base type */ } PyMethodChain; ! extern DL_IMPORT(PyObject *) Py_FindMethodInChain(PyMethodChain *, PyObject *, ! char *); typedef struct { ! PyObject_HEAD ! PyMethodDef *m_ml; ! PyObject *m_self; } PyCFunctionObject; From python-dev@python.org Sun Jul 9 01:55:09 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 17:55:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include moduleobject.h,2.15,2.16 objimpl.h,2.20,2.21 pythonrun.h,2.30,2.31 pythread.h,2.15,2.16 rangeobject.h,2.13,2.14 sliceobject.h,2.4,2.5 stringobject.h,2.20,2.21 sysmodule.h,2.19,2.20 token.h,2.14,2.15 tupleobject.h,2.22,2.23 Message-ID: <200007090055.RAA17033@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv17017 Modified Files: moduleobject.h objimpl.h pythonrun.h pythread.h rangeobject.h sliceobject.h stringobject.h sysmodule.h token.h tupleobject.h Log Message: ANSI-fication and Py_PROTO extermination. Index: moduleobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/moduleobject.h,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** moduleobject.h 2000/06/30 23:58:04 2.15 --- moduleobject.h 2000/07/09 00:55:06 2.16 *************** *** 1,8 **** - #ifndef Py_MODULEOBJECT_H - #define Py_MODULEOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,29 **** /* Module object interface */ extern DL_IMPORT(PyTypeObject) PyModule_Type; #define PyModule_Check(op) ((op)->ob_type == &PyModule_Type) ! extern DL_IMPORT(PyObject *) PyModule_New Py_PROTO((char *)); ! extern DL_IMPORT(PyObject *) PyModule_GetDict Py_PROTO((PyObject *)); ! extern DL_IMPORT(char *) PyModule_GetName Py_PROTO((PyObject *)); ! extern DL_IMPORT(char *) PyModule_GetFilename Py_PROTO((PyObject *)); ! extern DL_IMPORT(void) _PyModule_Clear Py_PROTO((PyObject *)); #ifdef __cplusplus --- 11,29 ---- /* Module object interface */ + #ifndef Py_MODULEOBJECT_H + #define Py_MODULEOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + extern DL_IMPORT(PyTypeObject) PyModule_Type; #define PyModule_Check(op) ((op)->ob_type == &PyModule_Type) ! extern DL_IMPORT(PyObject *) PyModule_New(char *); ! extern DL_IMPORT(PyObject *) PyModule_GetDict(PyObject *); ! extern DL_IMPORT(char *) PyModule_GetName(PyObject *); ! extern DL_IMPORT(char *) PyModule_GetFilename(PyObject *); ! extern DL_IMPORT(void) _PyModule_Clear(PyObject *); #ifdef __cplusplus Index: objimpl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/objimpl.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** objimpl.h 2000/07/01 01:00:35 2.20 --- objimpl.h 2000/07/09 00:55:06 2.21 *************** *** 1,8 **** - #ifndef Py_OBJIMPL_H - #define Py_OBJIMPL_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 15,18 **** --- 9,18 ---- ******************************************************************/ + #ifndef Py_OBJIMPL_H + #define Py_OBJIMPL_H + #ifdef __cplusplus + extern "C" { + #endif + #include "mymalloc.h" *************** *** 138,144 **** bytes returns a non-NULL pointer. Returned pointers must be checked for NULL explicitly; no action is performed on failure. */ ! extern DL_IMPORT(ANY *) PyObject_Malloc Py_PROTO((size_t)); ! extern DL_IMPORT(ANY *) PyObject_Realloc Py_PROTO((ANY *, size_t)); ! extern DL_IMPORT(void) PyObject_Free Py_PROTO((ANY *)); /* Macros */ --- 138,144 ---- bytes returns a non-NULL pointer. Returned pointers must be checked for NULL explicitly; no action is performed on failure. */ ! extern DL_IMPORT(ANY *) PyObject_Malloc(size_t); ! extern DL_IMPORT(ANY *) PyObject_Realloc(ANY *, size_t); ! extern DL_IMPORT(void) PyObject_Free(ANY *); /* Macros */ *************** *** 153,161 **** /* Functions */ ! extern DL_IMPORT(PyObject *) PyObject_Init Py_PROTO((PyObject *, PyTypeObject *)); ! extern DL_IMPORT(PyVarObject *) PyObject_InitVar Py_PROTO((PyVarObject *, PyTypeObject *, int)); ! extern DL_IMPORT(PyObject *) _PyObject_New Py_PROTO((PyTypeObject *)); ! extern DL_IMPORT(PyVarObject *) _PyObject_NewVar Py_PROTO((PyTypeObject *, int)); ! extern DL_IMPORT(void) _PyObject_Del Py_PROTO((PyObject *)); #define PyObject_New(type, typeobj) \ --- 153,162 ---- /* Functions */ ! extern DL_IMPORT(PyObject *) PyObject_Init(PyObject *, PyTypeObject *); ! extern DL_IMPORT(PyVarObject *) PyObject_InitVar(PyVarObject *, ! PyTypeObject *, int); ! extern DL_IMPORT(PyObject *) _PyObject_New(PyTypeObject *); ! extern DL_IMPORT(PyVarObject *) _PyObject_NewVar(PyTypeObject *, int); ! extern DL_IMPORT(void) _PyObject_Del(PyObject *); #define PyObject_New(type, typeobj) \ *************** *** 241,248 **** /* Add the object into the container set */ ! extern DL_IMPORT(void) _PyGC_Insert Py_PROTO((PyObject *)); /* Remove the object from the container set */ ! extern DL_IMPORT(void) _PyGC_Remove Py_PROTO((PyObject *)); #define PyObject_GC_Init(op) _PyGC_Insert((PyObject *)op) --- 242,249 ---- /* Add the object into the container set */ ! extern DL_IMPORT(void) _PyGC_Insert(PyObject *); /* Remove the object from the container set */ ! extern DL_IMPORT(void) _PyGC_Remove(PyObject *); #define PyObject_GC_Init(op) _PyGC_Insert((PyObject *)op) Index: pythonrun.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pythonrun.h,v retrieving revision 2.30 retrieving revision 2.31 diff -C2 -r2.30 -r2.31 *** pythonrun.h 2000/06/30 23:58:04 2.30 --- pythonrun.h 2000/07/09 00:55:06 2.31 *************** *** 1,8 **** - #ifndef Py_PYTHONRUN_H - #define Py_PYTHONRUN_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 16,91 **** /* Interfaces to parse and execute pieces of python code */ ! DL_IMPORT(void) Py_SetProgramName Py_PROTO((char *)); ! DL_IMPORT(char *) Py_GetProgramName Py_PROTO((void)); ! DL_IMPORT(void) Py_SetPythonHome Py_PROTO((char *)); ! DL_IMPORT(char *) Py_GetPythonHome Py_PROTO((void)); ! DL_IMPORT(void) Py_Initialize Py_PROTO((void)); ! DL_IMPORT(void) Py_Finalize Py_PROTO((void)); ! DL_IMPORT(int) Py_IsInitialized Py_PROTO((void)); ! DL_IMPORT(PyThreadState *) Py_NewInterpreter Py_PROTO((void)); ! DL_IMPORT(void) Py_EndInterpreter Py_PROTO((PyThreadState *)); ! DL_IMPORT(int) PyRun_AnyFile Py_PROTO((FILE *, char *)); ! DL_IMPORT(int) PyRun_SimpleString Py_PROTO((char *)); ! DL_IMPORT(int) PyRun_SimpleFile Py_PROTO((FILE *, char *)); ! DL_IMPORT(int) PyRun_InteractiveOne Py_PROTO((FILE *, char *)); ! DL_IMPORT(int) PyRun_InteractiveLoop Py_PROTO((FILE *, char *)); ! DL_IMPORT(struct _node *) PyParser_SimpleParseString Py_PROTO((char *, int)); ! DL_IMPORT(struct _node *) PyParser_SimpleParseFile Py_PROTO((FILE *, char *, int)); ! DL_IMPORT(PyObject *) PyRun_String Py_PROTO((char *, int, PyObject *, PyObject *)); ! DL_IMPORT(PyObject *) PyRun_File Py_PROTO((FILE *, char *, int, PyObject *, PyObject *)); ! DL_IMPORT(PyObject *) Py_CompileString Py_PROTO((char *, char *, int)); ! DL_IMPORT(void) PyErr_Print Py_PROTO((void)); ! DL_IMPORT(void) PyErr_PrintEx Py_PROTO((int)); ! DL_IMPORT(int) Py_AtExit Py_PROTO((void (*func) Py_PROTO((void)))); ! DL_IMPORT(void) Py_Exit Py_PROTO((int)); ! DL_IMPORT(int) Py_FdIsInteractive Py_PROTO((FILE *, char *)); /* In getpath.c */ ! DL_IMPORT(char *) Py_GetProgramFullPath Py_PROTO((void)); ! DL_IMPORT(char *) Py_GetPrefix Py_PROTO((void)); ! DL_IMPORT(char *) Py_GetExecPrefix Py_PROTO((void)); ! DL_IMPORT(char *) Py_GetPath Py_PROTO((void)); /* In their own files */ ! DL_IMPORT(const char *) Py_GetVersion Py_PROTO((void)); ! DL_IMPORT(const char *) Py_GetPlatform Py_PROTO((void)); ! DL_IMPORT(const char *) Py_GetCopyright Py_PROTO((void)); ! DL_IMPORT(const char *) Py_GetCompiler Py_PROTO((void)); ! DL_IMPORT(const char *) Py_GetBuildInfo Py_PROTO((void)); /* Internal -- various one-time initializations */ ! DL_IMPORT(PyObject *) _PyBuiltin_Init Py_PROTO((void)); ! DL_IMPORT(PyObject *) _PySys_Init Py_PROTO((void)); ! DL_IMPORT(void) _PyImport_Init Py_PROTO((void)); ! DL_IMPORT(void) init_exceptions Py_PROTO((void)); /* Various internal finalizers */ ! DL_IMPORT(void) fini_exceptions Py_PROTO((void)); ! DL_IMPORT(void) _PyImport_Fini Py_PROTO((void)); ! DL_IMPORT(void) PyMethod_Fini Py_PROTO((void)); ! DL_IMPORT(void) PyFrame_Fini Py_PROTO((void)); ! DL_IMPORT(void) PyCFunction_Fini Py_PROTO((void)); ! DL_IMPORT(void) PyTuple_Fini Py_PROTO((void)); ! DL_IMPORT(void) PyString_Fini Py_PROTO((void)); ! DL_IMPORT(void) PyInt_Fini Py_PROTO((void)); ! DL_IMPORT(void) PyFloat_Fini Py_PROTO((void)); ! DL_IMPORT(void) PyOS_FiniInterrupts Py_PROTO((void)); /* Stuff with no proper home (yet) */ ! DL_IMPORT(char *) PyOS_Readline Py_PROTO((char *)); ! extern DL_IMPORT(int) (*PyOS_InputHook) Py_PROTO((void)); ! extern DL_IMPORT(char) *(*PyOS_ReadlineFunctionPointer) Py_PROTO((char *)); #ifdef __cplusplus --- 10,91 ---- /* Interfaces to parse and execute pieces of python code */ + + #ifndef Py_PYTHONRUN_H + #define Py_PYTHONRUN_H + #ifdef __cplusplus + extern "C" { + #endif ! DL_IMPORT(void) Py_SetProgramName(char *); ! DL_IMPORT(char *) Py_GetProgramName(void); ! DL_IMPORT(void) Py_SetPythonHome(char *); ! DL_IMPORT(char *) Py_GetPythonHome(void); ! DL_IMPORT(void) Py_Initialize(void); ! DL_IMPORT(void) Py_Finalize(void); ! DL_IMPORT(int) Py_IsInitialized(void); ! DL_IMPORT(PyThreadState *) Py_NewInterpreter(void); ! DL_IMPORT(void) Py_EndInterpreter(PyThreadState *); ! DL_IMPORT(int) PyRun_AnyFile(FILE *, char *); ! DL_IMPORT(int) PyRun_SimpleString(char *); ! DL_IMPORT(int) PyRun_SimpleFile(FILE *, char *); ! DL_IMPORT(int) PyRun_InteractiveOne(FILE *, char *); ! DL_IMPORT(int) PyRun_InteractiveLoop(FILE *, char *); ! DL_IMPORT(struct _node *) PyParser_SimpleParseString(char *, int); ! DL_IMPORT(struct _node *) PyParser_SimpleParseFile(FILE *, char *, int); ! DL_IMPORT(PyObject *) PyRun_String(char *, int, PyObject *, PyObject *); ! DL_IMPORT(PyObject *) PyRun_File(FILE *, char *, int, PyObject *, PyObject *); ! DL_IMPORT(PyObject *) Py_CompileString(char *, char *, int); ! DL_IMPORT(void) PyErr_Print(void); ! DL_IMPORT(void) PyErr_PrintEx(int); ! DL_IMPORT(int) Py_AtExit(void (*func)(void)); ! DL_IMPORT(void) Py_Exit(int); ! DL_IMPORT(int) Py_FdIsInteractive(FILE *, char *); /* In getpath.c */ ! DL_IMPORT(char *) Py_GetProgramFullPath(void); ! DL_IMPORT(char *) Py_GetPrefix(void); ! DL_IMPORT(char *) Py_GetExecPrefix(void); ! DL_IMPORT(char *) Py_GetPath(void); /* In their own files */ ! DL_IMPORT(const char *) Py_GetVersion(void); ! DL_IMPORT(const char *) Py_GetPlatform(void); ! DL_IMPORT(const char *) Py_GetCopyright(void); ! DL_IMPORT(const char *) Py_GetCompiler(void); ! DL_IMPORT(const char *) Py_GetBuildInfo(void); /* Internal -- various one-time initializations */ ! DL_IMPORT(PyObject *) _PyBuiltin_Init(void); ! DL_IMPORT(PyObject *) _PySys_Init(void); ! DL_IMPORT(void) _PyImport_Init(void); ! DL_IMPORT(void) init_exceptions(void); /* Various internal finalizers */ ! DL_IMPORT(void) fini_exceptions(void); ! DL_IMPORT(void) _PyImport_Fini(void); ! DL_IMPORT(void) PyMethod_Fini(void); ! DL_IMPORT(void) PyFrame_Fini(void); ! DL_IMPORT(void) PyCFunction_Fini(void); ! DL_IMPORT(void) PyTuple_Fini(void); ! DL_IMPORT(void) PyString_Fini(void); ! DL_IMPORT(void) PyInt_Fini(void); ! DL_IMPORT(void) PyFloat_Fini(void); ! DL_IMPORT(void) PyOS_FiniInterrupts(void); /* Stuff with no proper home (yet) */ ! DL_IMPORT(char *) PyOS_Readline(char *); ! extern DL_IMPORT(int) (*PyOS_InputHook)(void); ! extern DL_IMPORT(char) *(*PyOS_ReadlineFunctionPointer)(char *); #ifdef __cplusplus Index: pythread.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pythread.h,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** pythread.h 2000/06/30 23:58:04 2.15 --- pythread.h 2000/07/09 00:55:06 2.16 *************** *** 1,5 **** - #ifndef Py_PYTHREAD_H - #define Py_PYTHREAD_H - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 12,26 **** ******************************************************************/ #define NO_EXIT_PROG /* don't define PyThread_exit_prog() */ /* (the result is no use of signals on SGI) */ - #ifndef Py_PROTO - #if defined(__STDC__) || defined(__cplusplus) - #define Py_PROTO(args) args - #else - #define Py_PROTO(args) () - #endif - #endif - typedef void *PyThread_type_lock; typedef void *PyThread_type_sema; --- 9,18 ---- ******************************************************************/ + #ifndef Py_PYTHREAD_H + #define Py_PYTHREAD_H + #define NO_EXIT_PROG /* don't define PyThread_exit_prog() */ /* (the result is no use of signals on SGI) */ typedef void *PyThread_type_lock; typedef void *PyThread_type_sema; *************** *** 30,62 **** #endif ! DL_IMPORT(void) PyThread_init_thread Py_PROTO((void)); ! DL_IMPORT(int) PyThread_start_new_thread Py_PROTO((void (*)(void *), void *)); ! DL_IMPORT(void) PyThread_exit_thread Py_PROTO((void)); ! DL_IMPORT(void) PyThread__PyThread_exit_thread Py_PROTO((void)); ! DL_IMPORT(long) PyThread_get_thread_ident Py_PROTO((void)); ! ! DL_IMPORT(PyThread_type_lock) PyThread_allocate_lock Py_PROTO((void)); ! DL_IMPORT(void) PyThread_free_lock Py_PROTO((PyThread_type_lock)); ! DL_IMPORT(int) PyThread_acquire_lock Py_PROTO((PyThread_type_lock, int)); #define WAIT_LOCK 1 #define NOWAIT_LOCK 0 ! DL_IMPORT(void) PyThread_release_lock Py_PROTO((PyThread_type_lock)); ! DL_IMPORT(PyThread_type_sema) PyThread_allocate_sema Py_PROTO((int)); ! DL_IMPORT(void) PyThread_free_sema Py_PROTO((PyThread_type_sema)); ! DL_IMPORT(int) PyThread_down_sema Py_PROTO((PyThread_type_sema, int)); #define WAIT_SEMA 1 #define NOWAIT_SEMA 0 ! DL_IMPORT(void) PyThread_up_sema Py_PROTO((PyThread_type_sema)); #ifndef NO_EXIT_PROG ! DL_IMPORT(void) PyThread_exit_prog Py_PROTO((int)); ! DL_IMPORT(void) PyThread__PyThread_exit_prog Py_PROTO((int)); #endif ! DL_IMPORT(int) PyThread_create_key Py_PROTO((void)); ! DL_IMPORT(void) PyThread_delete_key Py_PROTO((int)); ! DL_IMPORT(int) PyThread_set_key_value Py_PROTO((int, void *)); ! DL_IMPORT(void *) PyThread_get_key_value Py_PROTO((int)); #ifdef __cplusplus --- 22,54 ---- #endif ! DL_IMPORT(void) PyThread_init_thread(void); ! DL_IMPORT(int) PyThread_start_new_thread(void (*)(void *), void *); ! DL_IMPORT(void) PyThread_exit_thread(void); ! DL_IMPORT(void) PyThread__PyThread_exit_thread(void); ! DL_IMPORT(long) PyThread_get_thread_ident(void); ! ! DL_IMPORT(PyThread_type_lock) PyThread_allocate_lock(void); ! DL_IMPORT(void) PyThread_free_lock(PyThread_type_lock); ! DL_IMPORT(int) PyThread_acquire_lock(PyThread_type_lock, int); #define WAIT_LOCK 1 #define NOWAIT_LOCK 0 ! DL_IMPORT(void) PyThread_release_lock(PyThread_type_lock); ! DL_IMPORT(PyThread_type_sema) PyThread_allocate_sema(int); ! DL_IMPORT(void) PyThread_free_sema(PyThread_type_sema); ! DL_IMPORT(int) PyThread_down_sema(PyThread_type_sema, int); #define WAIT_SEMA 1 #define NOWAIT_SEMA 0 ! DL_IMPORT(void) PyThread_up_sema(PyThread_type_sema); #ifndef NO_EXIT_PROG ! DL_IMPORT(void) PyThread_exit_prog(int); ! DL_IMPORT(void) PyThread__PyThread_exit_prog(int); #endif ! DL_IMPORT(int) PyThread_create_key(void); ! DL_IMPORT(void) PyThread_delete_key(int); ! DL_IMPORT(int) PyThread_set_key_value(int, void *); ! DL_IMPORT(void *) PyThread_get_key_value(int); #ifdef __cplusplus Index: rangeobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/rangeobject.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** rangeobject.h 2000/06/30 23:58:04 2.13 --- rangeobject.h 2000/07/09 00:55:06 2.14 *************** *** 23,25 **** #define PyRange_Check(op) ((op)->ob_type == &PyRange_Type) ! extern DL_IMPORT(PyObject *) PyRange_New Py_PROTO((long, long, long, int)); --- 23,25 ---- #define PyRange_Check(op) ((op)->ob_type == &PyRange_Type) ! extern DL_IMPORT(PyObject *) PyRange_New(long, long, long, int); Index: sliceobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/sliceobject.h,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** sliceobject.h 1998/12/04 18:48:20 2.4 --- sliceobject.h 2000/07/09 00:55:06 2.5 *************** *** 21,26 **** typedef struct { ! PyObject_HEAD ! PyObject *start, *stop, *step; } PySliceObject; --- 21,26 ---- typedef struct { ! PyObject_HEAD ! PyObject *start, *stop, *step; } PySliceObject; *************** *** 29,36 **** #define PySlice_Check(op) ((op)->ob_type == &PySlice_Type) ! DL_IMPORT(PyObject *) PySlice_New Py_PROTO(( ! PyObject* start, PyObject* stop, PyObject* step)); ! DL_IMPORT(int) PySlice_GetIndices Py_PROTO(( ! PySliceObject *r, int length, int *start, int *stop, int *step)); #ifdef __cplusplus --- 29,36 ---- #define PySlice_Check(op) ((op)->ob_type == &PySlice_Type) ! DL_IMPORT(PyObject *) PySlice_New(PyObject* start, PyObject* stop, ! PyObject* step); ! DL_IMPORT(int) PySlice_GetIndices(PySliceObject *r, int length, ! int *start, int *stop, int *step); #ifdef __cplusplus Index: stringobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/stringobject.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** stringobject.h 2000/07/06 11:25:40 2.20 --- stringobject.h 2000/07/09 00:55:06 2.21 *************** *** 1,8 **** - #ifndef Py_STRINGOBJECT_H - #define Py_STRINGOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,20 **** --- 11,20 ---- /* String object interface */ + #ifndef Py_STRINGOBJECT_H + #define Py_STRINGOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + /* Type PyStringObject represents a character string. An extra zero byte is *************** *** 47,58 **** typedef struct { ! PyObject_VAR_HEAD #ifdef CACHE_HASH ! long ob_shash; #endif #ifdef INTERN_STRINGS ! PyObject *ob_sinterned; #endif ! char ob_sval[1]; } PyStringObject; --- 47,58 ---- typedef struct { ! PyObject_VAR_HEAD #ifdef CACHE_HASH ! long ob_shash; #endif #ifdef INTERN_STRINGS ! PyObject *ob_sinterned; #endif ! char ob_sval[1]; } PyStringObject; *************** *** 61,76 **** #define PyString_Check(op) ((op)->ob_type == &PyString_Type) ! extern DL_IMPORT(PyObject *) PyString_FromStringAndSize Py_PROTO((const char *, int)); ! extern DL_IMPORT(PyObject *) PyString_FromString Py_PROTO((const char *)); ! extern DL_IMPORT(int) PyString_Size Py_PROTO((PyObject *)); ! extern DL_IMPORT(char *) PyString_AsString Py_PROTO((PyObject *)); ! extern DL_IMPORT(void) PyString_Concat Py_PROTO((PyObject **, PyObject *)); ! extern DL_IMPORT(void) PyString_ConcatAndDel Py_PROTO((PyObject **, PyObject *)); ! extern DL_IMPORT(int) _PyString_Resize Py_PROTO((PyObject **, int)); ! extern DL_IMPORT(PyObject *) PyString_Format Py_PROTO((PyObject *, PyObject *)); #ifdef INTERN_STRINGS ! extern DL_IMPORT(void) PyString_InternInPlace Py_PROTO((PyObject **)); ! extern DL_IMPORT(PyObject *) PyString_InternFromString Py_PROTO((const char *)); #else #define PyString_InternInPlace(p) --- 61,76 ---- #define PyString_Check(op) ((op)->ob_type == &PyString_Type) ! extern DL_IMPORT(PyObject *) PyString_FromStringAndSize(const char *, int); ! extern DL_IMPORT(PyObject *) PyString_FromString(const char *); ! extern DL_IMPORT(int) PyString_Size(PyObject *); ! extern DL_IMPORT(char *) PyString_AsString(PyObject *); ! extern DL_IMPORT(void) PyString_Concat(PyObject **, PyObject *); ! extern DL_IMPORT(void) PyString_ConcatAndDel(PyObject **, PyObject *); ! extern DL_IMPORT(int) _PyString_Resize(PyObject **, int); ! extern DL_IMPORT(PyObject *) PyString_Format(PyObject *, PyObject *); #ifdef INTERN_STRINGS ! extern DL_IMPORT(void) PyString_InternInPlace(PyObject **); ! extern DL_IMPORT(PyObject *) PyString_InternFromString(const char *); #else #define PyString_InternInPlace(p) Index: sysmodule.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/sysmodule.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** sysmodule.h 2000/06/30 23:58:04 2.19 --- sysmodule.h 2000/07/09 00:55:06 2.20 *************** *** 1,8 **** - #ifndef Py_SYSMODULE_H - #define Py_SYSMODULE_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 16,25 **** /* System module interface */ ! DL_IMPORT(PyObject *) PySys_GetObject Py_PROTO((char *)); ! DL_IMPORT(int) PySys_SetObject Py_PROTO((char *, PyObject *)); ! DL_IMPORT(FILE *) PySys_GetFile Py_PROTO((char *, FILE *)); ! DL_IMPORT(void) PySys_SetArgv Py_PROTO((int, char **)); ! DL_IMPORT(void) PySys_SetPath Py_PROTO((char *)); #ifdef HAVE_STDARG_PROTOTYPES --- 10,25 ---- /* System module interface */ + + #ifndef Py_SYSMODULE_H + #define Py_SYSMODULE_H + #ifdef __cplusplus + extern "C" { + #endif ! DL_IMPORT(PyObject *) PySys_GetObject(char *); ! DL_IMPORT(int) PySys_SetObject(char *, PyObject *); ! DL_IMPORT(FILE *) PySys_GetFile(char *, FILE *); ! DL_IMPORT(void) PySys_SetArgv(int, char **); ! DL_IMPORT(void) PySys_SetPath(char *); #ifdef HAVE_STDARG_PROTOTYPES Index: token.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/token.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** token.h 2000/06/30 23:58:04 2.14 --- token.h 2000/07/09 00:55:06 2.15 *************** *** 1,8 **** - #ifndef Py_TOKEN_H - #define Py_TOKEN_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,20 **** --- 11,20 ---- /* Token types */ + #ifndef Py_TOKEN_H + #define Py_TOKEN_H + #ifdef __cplusplus + extern "C" { + #endif + #define ENDMARKER 0 #define NAME 1 *************** *** 69,74 **** extern DL_IMPORT(char *) _PyParser_TokenNames[]; /* Token names */ ! extern DL_IMPORT(int) PyToken_OneChar Py_PROTO((int)); ! extern DL_IMPORT(int) PyToken_TwoChars Py_PROTO((int, int)); #ifdef __cplusplus --- 69,74 ---- extern DL_IMPORT(char *) _PyParser_TokenNames[]; /* Token names */ ! extern DL_IMPORT(int) PyToken_OneChar(int); ! extern DL_IMPORT(int) PyToken_TwoChars(int, int); #ifdef __cplusplus Index: tupleobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/tupleobject.h,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** tupleobject.h 2000/06/30 23:58:04 2.22 --- tupleobject.h 2000/07/09 00:55:06 2.23 *************** *** 1,8 **** - #ifndef Py_TUPLEOBJECT_H - #define Py_TUPLEOBJECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 17,20 **** --- 11,20 ---- /* Tuple object interface */ + #ifndef Py_TUPLEOBJECT_H + #define Py_TUPLEOBJECT_H + #ifdef __cplusplus + extern "C" { + #endif + /* Another generally useful object type is an tuple of object pointers. *************** *** 30,35 **** typedef struct { ! PyObject_VAR_HEAD ! PyObject *ob_item[1]; } PyTupleObject; --- 30,35 ---- typedef struct { ! PyObject_VAR_HEAD ! PyObject *ob_item[1]; } PyTupleObject; *************** *** 38,47 **** #define PyTuple_Check(op) ((op)->ob_type == &PyTuple_Type) ! extern DL_IMPORT(PyObject *) PyTuple_New Py_PROTO((int size)); ! extern DL_IMPORT(int) PyTuple_Size Py_PROTO((PyObject *)); ! extern DL_IMPORT(PyObject *) PyTuple_GetItem Py_PROTO((PyObject *, int)); ! extern DL_IMPORT(int) PyTuple_SetItem Py_PROTO((PyObject *, int, PyObject *)); ! extern DL_IMPORT(PyObject *) PyTuple_GetSlice Py_PROTO((PyObject *, int, int)); ! extern DL_IMPORT(int) _PyTuple_Resize Py_PROTO((PyObject **, int, int)); /* Macro, trading safety for speed */ --- 38,47 ---- #define PyTuple_Check(op) ((op)->ob_type == &PyTuple_Type) ! extern DL_IMPORT(PyObject *) PyTuple_New(int size); ! extern DL_IMPORT(int) PyTuple_Size(PyObject *); ! extern DL_IMPORT(PyObject *) PyTuple_GetItem(PyObject *, int); ! extern DL_IMPORT(int) PyTuple_SetItem(PyObject *, int, PyObject *); ! extern DL_IMPORT(PyObject *) PyTuple_GetSlice(PyObject *, int, int); ! extern DL_IMPORT(int) _PyTuple_Resize(PyObject **, int, int); /* Macro, trading safety for speed */ From python-dev@python.org Sun Jul 9 03:11:21 2000 From: python-dev@python.org (Tim Peters) Date: Sat, 8 Jul 2000 19:11:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.167,2.168 Message-ID: <200007090211.TAA00345@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv32685/python/dist/src/Python Modified Files: bltinmodule.c Log Message: Get rid of unused vars in builtin_unicode (they were causing legit warnings). Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.167 retrieving revision 2.168 diff -C2 -r2.167 -r2.168 *** bltinmodule.c 2000/07/07 13:48:25 2.167 --- bltinmodule.c 2000/07/09 02:11:18 2.168 *************** *** 149,154 **** { PyObject *v; - const void *buffer; - int len; char *encoding = NULL; char *errors = NULL; --- 149,152 ---- From python-dev@python.org Sun Jul 9 04:09:59 2000 From: python-dev@python.org (Tim Peters) Date: Sat, 8 Jul 2000 20:09:59 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/freeze makefreeze.py,1.10,1.11 Message-ID: <200007090309.UAA10478@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/freeze In directory slayer.i.sourceforge.net:/tmp/cvs-serv8264/python/dist/src/Tools/freeze Modified Files: makefreeze.py Log Message: Nuke all remaining occurrences of Py_PROTO and Py_FPROTO. Index: makefreeze.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/freeze/makefreeze.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** makefreeze.py 1999/11/02 15:44:40 1.10 --- makefreeze.py 2000/07/09 03:09:57 1.11 *************** *** 23,27 **** char **argv; { ! extern int Py_FrozenMain Py_PROTO((int, char **)); """ + ((not __debug__ and """ Py_OptimizeFlag++; --- 23,27 ---- char **argv; { ! extern int Py_FrozenMain(int, char **); """ + ((not __debug__ and """ Py_OptimizeFlag++; From python-dev@python.org Sun Jul 9 04:09:58 2000 From: python-dev@python.org (Tim Peters) Date: Sat, 8 Jul 2000 20:09:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include cStringIO.h,2.11,2.12 methodobject.h,2.19,2.20 mymalloc.h,2.21,2.22 mymath.h,2.9,2.10 myproto.h,2.8,2.9 Message-ID: <200007090309.UAA10425@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv8264/python/dist/src/Include Modified Files: cStringIO.h methodobject.h mymalloc.h mymath.h myproto.h Log Message: Nuke all remaining occurrences of Py_PROTO and Py_FPROTO. Index: cStringIO.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/cStringIO.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** cStringIO.h 1999/01/25 21:36:13 2.11 --- cStringIO.h 2000/07/09 03:09:55 2.12 *************** *** 77,96 **** /* Read a string. If the last argument is -1, the remainder will be read. */ ! int(*cread) Py_FPROTO((PyObject *, char **, int)); /* Read a line */ ! int(*creadline) Py_FPROTO((PyObject *, char **)); /* Write a string */ ! int(*cwrite) Py_FPROTO((PyObject *, char *, int)); /* Get the cStringIO object as a Python string */ ! PyObject *(*cgetvalue) Py_FPROTO((PyObject *)); /* Create a new output object */ ! PyObject *(*NewOutput) Py_FPROTO((int)); /* Create an input object from a Python string */ ! PyObject *(*NewInput) Py_FPROTO((PyObject *)); /* The Python types for cStringIO input and output objects. --- 77,96 ---- /* Read a string. If the last argument is -1, the remainder will be read. */ ! int(*cread)(PyObject *, char **, int); /* Read a line */ ! int(*creadline)(PyObject *, char **); /* Write a string */ ! int(*cwrite)(PyObject *, char *, int); /* Get the cStringIO object as a Python string */ ! PyObject *(*cgetvalue)(PyObject *); /* Create a new output object */ ! PyObject *(*NewOutput)(int); /* Create an input object from a Python string */ ! PyObject *(*NewInput)(PyObject *); /* The Python types for cStringIO input and output objects. Index: methodobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/methodobject.h,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** methodobject.h 2000/07/09 00:20:36 2.19 --- methodobject.h 2000/07/09 03:09:55 2.20 *************** *** 21,27 **** #define PyCFunction_Check(op) ((op)->ob_type == &PyCFunction_Type) ! typedef PyObject *(*PyCFunction) Py_FPROTO((PyObject *, PyObject *)); ! typedef PyObject *(*PyCFunctionWithKeywords) ! Py_FPROTO((PyObject *, PyObject *, PyObject *)); extern DL_IMPORT(PyCFunction) PyCFunction_GetFunction(PyObject *); --- 21,27 ---- #define PyCFunction_Check(op) ((op)->ob_type == &PyCFunction_Type) ! typedef PyObject *(*PyCFunction)(PyObject *, PyObject *); ! typedef PyObject *(*PyCFunctionWithKeywords)(PyObject *, PyObject *, ! PyObject *); extern DL_IMPORT(PyCFunction) PyCFunction_GetFunction(PyObject *); Index: mymalloc.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mymalloc.h,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** mymalloc.h 2000/06/30 23:58:04 2.21 --- mymalloc.h 2000/07/09 03:09:55 2.22 *************** *** 91,97 **** #undef PyCore_REALLOC_PROTO #undef PyCore_FREE_PROTO ! #define PyCore_MALLOC_PROTO Py_PROTO((size_t)) ! #define PyCore_REALLOC_PROTO Py_PROTO((ANY *, size_t)) ! #define PyCore_FREE_PROTO Py_PROTO((ANY *)) #endif --- 91,97 ---- #undef PyCore_REALLOC_PROTO #undef PyCore_FREE_PROTO ! #define PyCore_MALLOC_PROTO (size_t) ! #define PyCore_REALLOC_PROTO (ANY *, size_t) ! #define PyCore_FREE_PROTO (ANY *) #endif *************** *** 139,145 **** doesn't. Returned pointers must be checked for NULL explicitly. No action is performed on failure. */ ! extern DL_IMPORT(ANY *) PyMem_Malloc Py_PROTO((size_t)); ! extern DL_IMPORT(ANY *) PyMem_Realloc Py_PROTO((ANY *, size_t)); ! extern DL_IMPORT(void) PyMem_Free Py_PROTO((ANY *)); /* Starting from Python 1.6, the wrappers Py_{Malloc,Realloc,Free} are --- 139,145 ---- doesn't. Returned pointers must be checked for NULL explicitly. No action is performed on failure. */ ! extern DL_IMPORT(ANY *) PyMem_Malloc(size_t); ! extern DL_IMPORT(ANY *) PyMem_Realloc(ANY *, size_t); ! extern DL_IMPORT(void) PyMem_Free(ANY *); /* Starting from Python 1.6, the wrappers Py_{Malloc,Realloc,Free} are *************** *** 199,203 **** #define PyCore_MALLOC_FUNC d_malloc ... ! #define PyCore_MALLOC_PROTO Py_PROTO((size_t, char *, unsigned long)) ... #define NEED_TO_DECLARE_MALLOC_AND_FRIEND --- 199,203 ---- #define PyCore_MALLOC_FUNC d_malloc ... ! #define PyCore_MALLOC_PROTO (size_t, char *, unsigned long) ... #define NEED_TO_DECLARE_MALLOC_AND_FRIEND Index: mymath.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mymath.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** mymath.h 2000/05/11 18:19:41 2.9 --- mymath.h 2000/07/09 03:09:55 2.10 *************** *** 11,15 **** #ifndef HAVE_HYPOT ! extern double hypot Py_PROTO((double, double)); #ifdef MWERKS_BEFORE_PRO4 #define hypot we_dont_want_faulty_hypot_decl --- 11,15 ---- #ifndef HAVE_HYPOT ! extern double hypot(double, double); #ifdef MWERKS_BEFORE_PRO4 #define hypot we_dont_want_faulty_hypot_decl Index: myproto.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/myproto.h,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** myproto.h 2000/06/30 23:58:04 2.8 --- myproto.h 2000/07/09 03:09:55 2.9 *************** *** 15,18 **** --- 15,23 ---- ******************************************************************/ + /*************************************** + THIS FILE IS OBSOLETE + DON'T USE Py_PROTO or Py_FPROTO anymore. + ***************************************/ + #ifdef HAVE_PROTOTYPES #define Py_PROTO(x) x From python-dev@python.org Sun Jul 9 04:09:58 2000 From: python-dev@python.org (Tim Peters) Date: Sat, 8 Jul 2000 20:09:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.37,2.38 classobject.c,2.98,2.99 cobject.c,2.10,2.11 fileobject.c,2.78,2.79 floatobject.c,2.61,2.62 object.c,2.83,2.84 Message-ID: <200007090309.UAA10457@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv8264/python/dist/src/Objects Modified Files: abstract.c classobject.c cobject.c fileobject.c floatobject.c object.c Log Message: Nuke all remaining occurrences of Py_PROTO and Py_FPROTO. Index: abstract.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v retrieving revision 2.37 retrieving revision 2.38 diff -C2 -r2.37 -r2.38 *** abstract.c 2000/06/30 23:58:05 2.37 --- abstract.c 2000/07/09 03:09:56 2.38 *************** *** 311,315 **** if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyNumber_Coerce(&v, &w) != 0) return NULL; --- 311,315 ---- if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyNumber_Coerce(&v, &w) != 0) return NULL; *************** *** 333,337 **** if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyNumber_Coerce(&v, &w) != 0) return NULL; --- 333,337 ---- if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyNumber_Coerce(&v, &w) != 0) return NULL; *************** *** 353,357 **** if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyNumber_Coerce(&v, &w) != 0) return NULL; --- 353,357 ---- if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyNumber_Coerce(&v, &w) != 0) return NULL; *************** *** 373,377 **** if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyNumber_Coerce(&v, &w) != 0) return NULL; --- 373,377 ---- if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyNumber_Coerce(&v, &w) != 0) return NULL; *************** *** 393,397 **** if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyNumber_Coerce(&v, &w) != 0) return NULL; --- 393,397 ---- if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyNumber_Coerce(&v, &w) != 0) return NULL; *************** *** 418,422 **** else if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyNumber_Coerce(&v, &w) != 0) return NULL; --- 418,422 ---- else if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyNumber_Coerce(&v, &w) != 0) return NULL; *************** *** 438,442 **** if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyNumber_Coerce(&v, &w) != 0) return NULL; --- 438,442 ---- if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyNumber_Coerce(&v, &w) != 0) return NULL; *************** *** 470,474 **** if (tp->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyInstance_Check(v)) { /* Instances of user-defined classes get their --- 470,474 ---- if (tp->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyInstance_Check(v)) { /* Instances of user-defined classes get their *************** *** 516,520 **** if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyNumber_Coerce(&v, &w) != 0) return NULL; --- 516,520 ---- if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyNumber_Coerce(&v, &w) != 0) return NULL; *************** *** 540,544 **** if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyNumber_Coerce(&v, &w) != 0) return NULL; --- 540,544 ---- if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyNumber_Coerce(&v, &w) != 0) return NULL; *************** *** 560,564 **** if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *)); if (PyNumber_Coerce(&v, &w) != 0) return NULL; --- 560,564 ---- if (v->ob_type->tp_as_number != NULL) { PyObject *x = NULL; ! PyObject * (*f)(PyObject *, PyObject *); if (PyNumber_Coerce(&v, &w) != 0) return NULL; *************** *** 580,584 **** { PyObject *res; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *, PyObject *)); BINOP(v, w, "__pow__", "__rpow__", do_pow); if (v->ob_type->tp_as_number == NULL || --- 580,584 ---- { PyObject *res; ! PyObject * (*f)(PyObject *, PyObject *, PyObject *); BINOP(v, w, "__pow__", "__rpow__", do_pow); if (v->ob_type->tp_as_number == NULL || *************** *** 605,609 **** PyObject *res; PyObject *v1, *z1, *w2, *z2; ! PyObject * (*f) Py_FPROTO((PyObject *, PyObject *, PyObject *)); if (z == Py_None) --- 605,609 ---- PyObject *res; PyObject *v1, *z1, *w2, *z2; ! PyObject * (*f)(PyObject *, PyObject *, PyObject *); if (z == Py_None) Index: classobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/classobject.c,v retrieving revision 2.98 retrieving revision 2.99 diff -C2 -r2.98 -r2.99 *** classobject.c 2000/07/08 12:04:57 2.98 --- classobject.c 2000/07/09 03:09:56 2.99 *************** *** 15,22 **** /* Forward */ ! static PyObject *class_lookup ! Py_PROTO((PyClassObject *, PyObject *, PyClassObject **)); ! static PyObject *instance_getattr1 Py_PROTO((PyInstanceObject *, PyObject *)); ! static PyObject *instance_getattr2 Py_PROTO((PyInstanceObject *, PyObject *)); static PyObject *getattrstr, *setattrstr, *delattrstr; --- 15,22 ---- /* Forward */ ! static PyObject *class_lookup(PyClassObject *, PyObject *, ! PyClassObject **); ! static PyObject *instance_getattr1(PyInstanceObject *, PyObject *); ! static PyObject *instance_getattr2(PyInstanceObject *, PyObject *); static PyObject *getattrstr, *setattrstr, *delattrstr; *************** *** 1204,1209 **** /* Forward */ ! static int halfbinop Py_PROTO((PyObject *, PyObject *, char *, PyObject **, ! PyObject * (*) Py_PROTO((PyObject *, PyObject *)), int )); --- 1204,1209 ---- /* Forward */ ! static int halfbinop(PyObject *, PyObject *, char *, PyObject **, ! PyObject * (*)(PyObject *, PyObject *), int); *************** *** 1216,1220 **** char *opname; char *ropname; ! PyObject * (*thisfunc) Py_PROTO((PyObject *, PyObject *)); { char buf[256]; --- 1216,1220 ---- char *opname; char *ropname; ! PyObject * (*thisfunc)(PyObject *, PyObject *); { char buf[256]; *************** *** 1250,1254 **** char *opname; PyObject **r_result; ! PyObject * (*thisfunc) Py_PROTO((PyObject *, PyObject *)); int swapped; { --- 1250,1254 ---- char *opname; PyObject **r_result; ! PyObject * (*thisfunc)(PyObject *, PyObject *); int swapped; { Index: cobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/cobject.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** cobject.c 2000/06/30 23:58:05 2.10 --- cobject.c 2000/07/09 03:09:56 2.11 *************** *** 16,21 **** /* Declarations for objects of type PyCObject */ ! typedef void (*destructor1) Py_PROTO((void *)); ! typedef void (*destructor2) Py_PROTO((void *, void*)); typedef struct { --- 16,21 ---- /* Declarations for objects of type PyCObject */ ! typedef void (*destructor1)(void *); ! typedef void (*destructor2)(void *, void*); typedef struct { *************** *** 23,27 **** void *cobject; void *desc; ! void (*destructor) Py_PROTO((void *)); } PyCObject; --- 23,27 ---- void *cobject; void *desc; ! void (*destructor)(void *); } PyCObject; *************** *** 29,33 **** PyCObject_FromVoidPtr(cobj, destr) void *cobj; ! void (*destr) Py_PROTO((void *)); { PyCObject *self; --- 29,33 ---- PyCObject_FromVoidPtr(cobj, destr) void *cobj; ! void (*destr)(void *); { PyCObject *self; *************** *** 46,50 **** void *cobj; void *desc; ! void (*destr) Py_PROTO((void *, void *)); { PyCObject *self; --- 46,50 ---- void *cobj; void *desc; ! void (*destr)(void *, void *); { PyCObject *self; Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.78 retrieving revision 2.79 diff -C2 -r2.78 -r2.79 *** fileobject.c 2000/07/05 15:32:40 2.78 --- fileobject.c 2000/07/09 03:09:56 2.79 *************** *** 70,74 **** PyObject *f_name; PyObject *f_mode; ! int (*f_close) Py_PROTO((FILE *)); int f_softspace; /* Flag used by 'print' command */ int f_binary; /* Flag which indicates whether the file is open --- 70,74 ---- PyObject *f_name; PyObject *f_mode; ! int (*f_close)(FILE *); int f_softspace; /* Flag used by 'print' command */ int f_binary; /* Flag which indicates whether the file is open *************** *** 101,105 **** char *name; char *mode; ! int (*close) Py_FPROTO((FILE *)); { PyFileObject *f = PyObject_NEW(PyFileObject, &PyFile_Type); --- 101,105 ---- char *name; char *mode; ! int (*close)(FILE *); { PyFileObject *f = PyObject_NEW(PyFileObject, &PyFile_Type); *************** *** 127,131 **** char *name, *mode; { ! extern int fclose Py_PROTO((FILE *)); PyFileObject *f; f = (PyFileObject *) PyFile_FromFile((FILE *)NULL, name, mode, fclose); --- 127,131 ---- char *name, *mode; { ! extern int fclose(FILE *); PyFileObject *f; f = (PyFileObject *) PyFile_FromFile((FILE *)NULL, name, mode, fclose); Index: floatobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v retrieving revision 2.61 retrieving revision 2.62 diff -C2 -r2.61 -r2.62 *** floatobject.c 2000/06/30 23:58:05 2.61 --- floatobject.c 2000/07/09 03:09:56 2.62 *************** *** 65,70 **** #if !defined(__STDC__) && !defined(macintosh) ! extern double fmod Py_PROTO((double, double)); ! extern double pow Py_PROTO((double, double)); #endif --- 65,70 ---- #if !defined(__STDC__) && !defined(macintosh) ! extern double fmod(double, double); ! extern double pow(double, double); #endif *************** *** 138,142 **** char **pend; { ! extern double strtod Py_PROTO((const char *, char **)); const char *s, *last, *end; double x; --- 138,142 ---- char **pend; { ! extern double strtod(const char *, char **); const char *s, *last, *end; double x; Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.83 retrieving revision 2.84 diff -C2 -r2.83 -r2.84 *** object.c 2000/07/08 17:43:32 2.83 --- object.c 2000/07/09 03:09:56 2.84 *************** *** 1002,1006 **** /* Hack to force loading of abstract.o */ ! int (*_Py_abstract_hack) Py_FPROTO((PyObject *)) = &PyObject_Length; --- 1002,1006 ---- /* Hack to force loading of abstract.o */ ! int (*_Py_abstract_hack)(PyObject *) = &PyObject_Length; From python-dev@python.org Sun Jul 9 04:09:58 2000 From: python-dev@python.org (Tim Peters) Date: Sat, 8 Jul 2000 20:09:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules arraymodule.c,2.46,2.47 cgensupport.h,2.13,2.14 cmathmodule.c,2.13,2.14 glmodule.c,2.5,2.6 mpzmodule.c,2.27,2.28 nismodule.c,2.16,2.17 readline.c,2.19,2.20 rgbimgmodule.c,2.18,2.19 signalmodule.c,2.44,2.45 socketmodule.c,1.113,1.114 stropmodule.c,2.65,2.66 structmodule.c,2.33,2.34 svmodule.c,2.13,2.14 timemodule.c,2.89,2.90 Message-ID: <200007090309.UAA10460@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8264/python/dist/src/Modules Modified Files: arraymodule.c cgensupport.h cmathmodule.c glmodule.c mpzmodule.c nismodule.c readline.c rgbimgmodule.c signalmodule.c socketmodule.c stropmodule.c structmodule.c svmodule.c timemodule.c Log Message: Nuke all remaining occurrences of Py_PROTO and Py_FPROTO. Index: arraymodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** arraymodule.c 2000/07/01 01:09:43 2.46 --- arraymodule.c 2000/07/09 03:09:55 2.47 *************** *** 32,37 **** int typecode; int itemsize; ! PyObject * (*getitem) Py_FPROTO((struct arrayobject *, int)); ! int (*setitem) Py_FPROTO((struct arrayobject *, int, PyObject *)); }; --- 32,37 ---- int typecode; int itemsize; ! PyObject * (*getitem)(struct arrayobject *, int); ! int (*setitem)(struct arrayobject *, int, PyObject *); }; *************** *** 47,59 **** /* Forward */ ! static PyObject *newarrayobject Py_PROTO((int, struct arraydescr *)); #if 0 ! static int getarraysize Py_PROTO((PyObject *)); #endif ! static PyObject *getarrayitem Py_PROTO((PyObject *, int)); ! static int setarrayitem Py_PROTO((PyObject *, int, PyObject *)); #if 0 ! static int insarrayitem Py_PROTO((PyObject *, int, PyObject *)); ! static int addarrayitem Py_PROTO((PyObject *, PyObject *)); #endif --- 47,59 ---- /* Forward */ ! static PyObject *newarrayobject(int, struct arraydescr *); #if 0 ! static int getarraysize(PyObject *); #endif ! static PyObject *getarrayitem(PyObject *, int); ! static int setarrayitem(PyObject *, int, PyObject *); #if 0 ! static int insarrayitem(PyObject *, int, PyObject *); ! static int addarrayitem(PyObject *, PyObject *); #endif Index: cgensupport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cgensupport.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** cgensupport.h 2000/06/30 23:58:05 2.13 --- cgensupport.h 2000/07/09 03:09:55 2.14 *************** *** 39,70 **** #define getistringarg PyArg_GetString ! extern int PyArg_GetObject Py_PROTO((PyObject *args, int nargs, ! int i, PyObject **p_a)); ! extern int PyArg_GetLong Py_PROTO((PyObject *args, int nargs, ! int i, long *p_a)); ! extern int PyArg_GetShort Py_PROTO((PyObject *args, int nargs, ! int i, short *p_a)); ! extern int PyArg_GetFloat Py_PROTO((PyObject *args, int nargs, ! int i, float *p_a)); ! extern int PyArg_GetString Py_PROTO((PyObject *args, int nargs, ! int i, string *p_a)); ! extern int PyArg_GetChar Py_PROTO((PyObject *args, int nargs, ! int i, char *p_a)); ! extern int PyArg_GetLongArray Py_PROTO((PyObject *args, int nargs, ! int i, int n, long *p_a)); ! extern int PyArg_GetShortArray Py_PROTO((PyObject *args, int nargs, ! int i, int n, short *p_a)); ! extern int PyArg_GetDoubleArray Py_PROTO((PyObject *args, int nargs, ! int i, int n, double *p_a)); ! extern int PyArg_GetFloatArray Py_PROTO((PyObject *args, int nargs, ! int i, int n, float *p_a)); ! extern int PyArg_GetLongArraySize Py_PROTO((PyObject *args, int nargs, ! int i, long *p_a)); ! extern int PyArg_GetShortArraySize Py_PROTO((PyObject *args, int nargs, ! int i, short *p_a)); ! extern int PyArg_GetDoubleArraySize Py_PROTO((PyObject *args, int nargs, ! int i, double *p_a)); ! extern int PyArg_GetFloatArraySize Py_PROTO((PyObject *args, int nargs, ! int i, float *p_a)); #ifdef __cplusplus --- 39,70 ---- #define getistringarg PyArg_GetString ! extern int PyArg_GetObject(PyObject *args, int nargs, ! int i, PyObject **p_a); ! extern int PyArg_GetLong(PyObject *args, int nargs, ! int i, long *p_a); ! extern int PyArg_GetShort(PyObject *args, int nargs, ! int i, short *p_a); ! extern int PyArg_GetFloat(PyObject *args, int nargs, ! int i, float *p_a); ! extern int PyArg_GetString(PyObject *args, int nargs, ! int i, string *p_a); ! extern int PyArg_GetChar(PyObject *args, int nargs, ! int i, char *p_a); ! extern int PyArg_GetLongArray(PyObject *args, int nargs, ! int i, int n, long *p_a); ! extern int PyArg_GetShortArray(PyObject *args, int nargs, ! int i, int n, short *p_a); ! extern int PyArg_GetDoubleArray(PyObject *args, int nargs, ! int i, int n, double *p_a); ! extern int PyArg_GetFloatArray(PyObject *args, int nargs, ! int i, int n, float *p_a); ! extern int PyArg_GetLongArraySize(PyObject *args, int nargs, ! int i, long *p_a); ! extern int PyArg_GetShortArraySize(PyObject *args, int nargs, ! int i, short *p_a); ! extern int PyArg_GetDoubleArraySize(PyObject *args, int nargs, ! int i, double *p_a); ! extern int PyArg_GetFloatArraySize(PyObject *args, int nargs, ! int i, float *p_a); #ifdef __cplusplus Index: cmathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cmathmodule.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** cmathmodule.c 2000/06/30 02:29:22 2.13 --- cmathmodule.c 2000/07/09 03:09:55 2.14 *************** *** 348,352 **** math_1(args, func) PyObject *args; ! Py_complex (*func) Py_FPROTO((Py_complex)); { Py_complex x; --- 348,352 ---- math_1(args, func) PyObject *args; ! Py_complex (*func)(Py_complex); { Py_complex x; Index: glmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/glmodule.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** glmodule.c 2000/06/30 23:58:05 2.5 --- glmodule.c 2000/07/09 03:09:55 2.6 *************** *** 108,112 **** int i, n, width; double vec[3]; ! PyObject * (*getitem) Py_FPROTO((PyObject *, int)); if (!PyArg_GetObject(args, 1, 0, &v)) --- 108,112 ---- int i, n, width; double vec[3]; ! PyObject * (*getitem)(PyObject *, int); if (!PyArg_GetObject(args, 1, 0, &v)) *************** *** 209,213 **** int i, n; float norm[3], vec[3]; ! PyObject * (*getitem) Py_FPROTO((PyObject *, int)); if (!PyArg_GetObject(args, 1, 0, &v)) --- 209,213 ---- int i, n; float norm[3], vec[3]; ! PyObject * (*getitem)(PyObject *, int); if (!PyArg_GetObject(args, 1, 0, &v)) Index: mpzmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mpzmodule.c,v retrieving revision 2.27 retrieving revision 2.28 diff -C2 -r2.27 -r2.28 *** mpzmodule.c 2000/06/30 23:58:05 2.27 --- mpzmodule.c 2000/07/09 03:09:55 2.28 *************** *** 1013,1018 **** /* Forward */ ! static void mpz_divm Py_PROTO((MP_INT *res, const MP_INT *num, ! const MP_INT *den, const MP_INT *mod)); static PyObject * --- 1013,1018 ---- /* Forward */ ! static void mpz_divm(MP_INT *res, const MP_INT *num, ! const MP_INT *den, const MP_INT *mod); static PyObject * Index: nismodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/nismodule.c,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** nismodule.c 2000/05/03 23:44:32 2.16 --- nismodule.c 2000/07/09 03:09:55 2.17 *************** *** 72,76 **** } ! typedef int (*foreachfunc) Py_PROTO((int, char *, int, char *, int, char *)); struct ypcallback_data { --- 72,76 ---- } ! typedef int (*foreachfunc)(int, char *, int, char *, int, char *); struct ypcallback_data { Index: readline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** readline.c 2000/07/06 18:55:12 2.19 --- readline.c 2000/07/09 03:09:55 2.20 *************** *** 40,44 **** /* Pointers needed from outside (but not declared in a header file). */ extern int (*PyOS_InputHook)(); ! extern char *(*PyOS_ReadlineFunctionPointer) Py_PROTO((char *)); --- 40,44 ---- /* Pointers needed from outside (but not declared in a header file). */ extern int (*PyOS_InputHook)(); ! extern char *(*PyOS_ReadlineFunctionPointer)(char *); Index: rgbimgmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/rgbimgmodule.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** rgbimgmodule.c 1998/12/04 18:50:03 2.18 --- rgbimgmodule.c 2000/07/09 03:09:55 2.19 *************** *** 96,105 **** #define CHANOFFSET(z) (3-(z)) /* this is byte order dependent */ ! static void expandrow Py_PROTO((unsigned char *, unsigned char *, int)); ! static void setalpha Py_PROTO((unsigned char *, int)); ! static void copybw Py_PROTO((Py_Int32 *, int)); ! static void interleaverow Py_PROTO((unsigned char*, unsigned char*, int, int)); ! static int compressrow Py_PROTO((unsigned char *, unsigned char *, int, int)); ! static void lumrow Py_PROTO((unsigned char *, unsigned char *, int)); #ifdef ADD_TAGS --- 96,105 ---- #define CHANOFFSET(z) (3-(z)) /* this is byte order dependent */ ! static void expandrow(unsigned char *, unsigned char *, int); ! static void setalpha(unsigned char *, int); ! static void copybw(Py_Int32 *, int); ! static void interleaverow(unsigned char*, unsigned char*, int, int); ! static int compressrow(unsigned char *, unsigned char *, int, int); ! static void lumrow(unsigned char *, unsigned char *, int); #ifdef ADD_TAGS Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.44 retrieving revision 2.45 diff -C2 -r2.44 -r2.45 *** signalmodule.c 2000/07/04 14:17:33 2.44 --- signalmodule.c 2000/07/09 03:09:55 2.45 *************** *** 124,128 **** Handlers[sig_num].tripped = 1; Py_AddPendingCall( ! (int (*) Py_PROTO((ANY *)))PyErr_CheckSignals, NULL); #ifdef WITH_THREAD } --- 124,128 ---- Handlers[sig_num].tripped = 1; Py_AddPendingCall( ! (int (*)(ANY *))PyErr_CheckSignals, NULL); #ifdef WITH_THREAD } *************** *** 639,643 **** is_tripped++; Handlers[SIGINT].tripped = 1; ! Py_AddPendingCall((int (*) Py_PROTO((ANY *)))PyErr_CheckSignals, NULL); } --- 639,643 ---- is_tripped++; Handlers[SIGINT].tripped = 1; ! Py_AddPendingCall((int (*)(ANY *))PyErr_CheckSignals, NULL); } Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -r1.113 -r1.114 *** socketmodule.c 2000/07/07 14:13:29 1.113 --- socketmodule.c 2000/07/09 03:09:55 1.114 *************** *** 1113,1117 **** BUILD_FUNC_DEF_2(PySocketSock_makefile,PySocketSockObject *,s, PyObject *,args) { ! extern int fclose Py_PROTO((FILE *)); char *mode = "r"; int bufsize = -1; --- 1113,1117 ---- BUILD_FUNC_DEF_2(PySocketSock_makefile,PySocketSockObject *,s, PyObject *,args) { ! extern int fclose(FILE *); char *mode = "r"; int bufsize = -1; Index: stropmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/stropmodule.c,v retrieving revision 2.65 retrieving revision 2.66 diff -C2 -r2.65 -r2.66 *** stropmodule.c 2000/06/30 23:58:05 2.65 --- stropmodule.c 2000/07/09 03:09:55 2.66 *************** *** 879,883 **** PyObject *args; { ! extern double strtod Py_PROTO((const char *, char **)); char *s, *end; double x; --- 879,883 ---- PyObject *args; { ! extern double strtod(const char *, char **); char *s, *end; double x; Index: structmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/structmodule.c,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -r2.33 -r2.34 *** structmodule.c 2000/06/30 23:58:05 2.33 --- structmodule.c 2000/07/09 03:09:56 2.34 *************** *** 407,415 **** int size; int alignment; ! PyObject* (*unpack) Py_PROTO((const char *, ! const struct _formatdef *)); ! int (*pack) Py_PROTO((char *, ! PyObject *, ! const struct _formatdef *)); } formatdef; --- 407,414 ---- int size; int alignment; ! PyObject* (*unpack)(const char *, ! const struct _formatdef *); ! int (*pack)(char *, PyObject *, ! const struct _formatdef *); } formatdef; Index: svmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/svmodule.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** svmodule.c 2000/06/30 23:58:05 2.13 --- svmodule.c 2000/07/09 03:09:56 2.14 *************** *** 38,42 **** static PyObject *SvError; /* exception sv.error */ ! static PyObject *newcaptureobject Py_PROTO((svobject *, void *, int)); /* Set a SV-specific error from svideo_errno and return NULL */ --- 38,42 ---- static PyObject *SvError; /* exception sv.error */ ! static PyObject *newcaptureobject(svobject *, void *, int); /* Set a SV-specific error from svideo_errno and return NULL */ Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.89 retrieving revision 2.90 diff -C2 -r2.89 -r2.90 *** timemodule.c 2000/07/03 21:37:27 2.89 --- timemodule.c 2000/07/09 03:09:56 2.90 *************** *** 91,96 **** /* Forward declarations */ ! static int floatsleep Py_PROTO((double)); ! static double floattime Py_PROTO(()); /* For Y2K check */ --- 91,96 ---- /* Forward declarations */ ! static int floatsleep(double); ! static double floattime(); /* For Y2K check */ *************** *** 256,260 **** time_convert(when, function) time_t when; ! struct tm * (*function) Py_PROTO((const time_t *)); { struct tm *p; --- 256,260 ---- time_convert(when, function) time_t when; ! struct tm * (*function)(const time_t *); { struct tm *p; *************** *** 787,792 **** struct timeb t1, t2; double frac; ! extern double fmod Py_PROTO((double, double)); ! extern double floor Py_PROTO((double)); if (secs <= 0.0) return; --- 787,792 ---- struct timeb t1, t2; double frac; ! extern double fmod(double, double); ! extern double floor(double); if (secs <= 0.0) return; From python-dev@python.org Sun Jul 9 04:09:59 2000 From: python-dev@python.org (Tim Peters) Date: Sat, 8 Jul 2000 20:09:59 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser acceler.c,2.14,2.15 firstsets.c,2.9,2.10 grammar.c,2.15,2.16 intrcheck.c,2.32,2.33 listnode.c,2.11,2.12 myreadline.c,2.21,2.22 node.c,2.10,2.11 parser.c,2.13,2.14 parser.h,2.11,2.12 parsetok.c,2.20,2.21 pgen.c,2.14,2.15 pgen.h,2.11,2.12 pgenmain.c,2.19,2.20 printgrammar.c,2.10,2.11 tokenizer.c,2.44,2.45 tokenizer.h,2.14,2.15 Message-ID: <200007090309.UAA10488@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv8264/python/dist/src/Parser Modified Files: acceler.c firstsets.c grammar.c intrcheck.c listnode.c myreadline.c node.c parser.c parser.h parsetok.c pgen.c pgen.h pgenmain.c printgrammar.c tokenizer.c tokenizer.h Log Message: Nuke all remaining occurrences of Py_PROTO and Py_FPROTO. Index: acceler.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/acceler.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** acceler.c 2000/06/30 23:58:05 2.14 --- acceler.c 2000/07/09 03:09:56 2.15 *************** *** 27,32 **** /* Forward references */ ! static void fixdfa Py_PROTO((grammar *, dfa *)); ! static void fixstate Py_PROTO((grammar *, state *)); void --- 27,32 ---- /* Forward references */ ! static void fixdfa(grammar *, dfa *); ! static void fixstate(grammar *, state *); void Index: firstsets.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/firstsets.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** firstsets.c 2000/06/30 23:58:05 2.9 --- firstsets.c 2000/07/09 03:09:56 2.10 *************** *** 18,22 **** /* Forward */ ! static void calcfirstset Py_PROTO((grammar *, dfa *)); void --- 18,22 ---- /* Forward */ ! static void calcfirstset(grammar *, dfa *); void Index: grammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/grammar.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** grammar.c 2000/06/30 23:58:05 2.15 --- grammar.c 2000/07/09 03:09:56 2.16 *************** *** 143,147 **** /* Forward */ ! static void translabel Py_PROTO((grammar *, label *)); void --- 143,147 ---- /* Forward */ ! static void translabel(grammar *, label *); void Index: intrcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/intrcheck.c,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -r2.32 -r2.33 *** intrcheck.c 2000/06/30 23:58:05 2.32 --- intrcheck.c 2000/07/09 03:09:56 2.33 *************** *** 23,27 **** /* Copied here from ceval.h -- can't include that file. */ ! int Py_AddPendingCall Py_PROTO((int (*func) Py_PROTO((ANY *)), ANY *arg)); --- 23,27 ---- /* Copied here from ceval.h -- can't include that file. */ ! int Py_AddPendingCall(int (*func)(ANY *), ANY *arg); *************** *** 153,157 **** #endif /* _M_IX86 */ { ! extern void Py_Exit Py_PROTO((int)); static char message[] = "python: to interrupt a truly hanging Python program, interrupt once more.\n"; --- 153,157 ---- #endif /* _M_IX86 */ { ! extern void Py_Exit(int); static char message[] = "python: to interrupt a truly hanging Python program, interrupt once more.\n"; Index: listnode.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/listnode.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** listnode.c 2000/06/30 23:58:05 2.11 --- listnode.c 2000/07/09 03:09:56 2.12 *************** *** 16,21 **** /* Forward */ ! static void list1node Py_PROTO((FILE *, node *)); ! static void listnode Py_PROTO((FILE *, node *)); void --- 16,21 ---- /* Forward */ ! static void list1node(FILE *, node *); ! static void listnode(FILE *, node *); void Index: myreadline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/myreadline.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** myreadline.c 2000/07/03 21:39:47 2.21 --- myreadline.c 2000/07/09 03:09:56 2.22 *************** *** 119,123 **** Note: Python expects in return a buffer allocated with PyMem_Malloc. */ ! char *(*PyOS_ReadlineFunctionPointer) Py_PROTO((char *)); --- 119,123 ---- Note: Python expects in return a buffer allocated with PyMem_Malloc. */ ! char *(*PyOS_ReadlineFunctionPointer)(char *); Index: node.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/node.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** node.c 2000/06/30 23:58:05 2.10 --- node.c 2000/07/09 03:09:56 2.11 *************** *** 65,69 **** /* Forward */ ! static void freechildren Py_PROTO((node *)); --- 65,69 ---- /* Forward */ ! static void freechildren(node *); Index: parser.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parser.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** parser.c 2000/06/30 23:58:05 2.13 --- parser.c 2000/07/09 03:09:56 2.14 *************** *** 34,38 **** /* STACK DATA TYPE */ ! static void s_reset Py_PROTO((stack *)); static void --- 34,38 ---- /* STACK DATA TYPE */ ! static void s_reset(stack *); static void *************** *** 45,49 **** #define s_empty(s) ((s)->s_top == &(s)->s_base[MAXSTACK]) ! static int s_push Py_PROTO((stack *, dfa *, node *)); static int --- 45,49 ---- #define s_empty(s) ((s)->s_top == &(s)->s_base[MAXSTACK]) ! static int s_push(stack *, dfa *, node *); static int *************** *** 67,71 **** #ifdef Py_DEBUG ! static void s_pop Py_PROTO((stack *)); static void --- 67,71 ---- #ifdef Py_DEBUG ! static void s_pop(stack *); static void *************** *** 123,127 **** /* PARSER STACK OPERATIONS */ ! static int shift Py_PROTO((stack *, int, char *, int, int)); static int --- 123,127 ---- /* PARSER STACK OPERATIONS */ ! static int shift(stack *, int, char *, int, int); static int *************** *** 142,146 **** } ! static int push Py_PROTO((stack *, int, dfa *, int, int)); static int --- 142,146 ---- } ! static int push(stack *, int, dfa *, int, int); static int *************** *** 166,170 **** /* PARSER PROPER */ ! static int classify Py_PROTO((grammar *, int, char *)); static int --- 166,170 ---- /* PARSER PROPER */ ! static int classify(grammar *, int, char *); static int Index: parser.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parser.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** parser.h 2000/06/30 23:58:05 2.11 --- parser.h 2000/07/09 03:09:56 2.12 *************** *** 37,45 **** } parser_state; ! parser_state *PyParser_New Py_PROTO((grammar *g, int start)); ! void PyParser_Delete Py_PROTO((parser_state *ps)); ! int PyParser_AddToken ! Py_PROTO((parser_state *ps, int type, char *str, int lineno)); ! void PyGrammar_AddAccelerators Py_PROTO((grammar *g)); #ifdef __cplusplus --- 37,44 ---- } parser_state; ! parser_state *PyParser_New(grammar *g, int start); ! void PyParser_Delete(parser_state *ps); ! int PyParser_AddToken(parser_state *ps, int type, char *str, int lineno); ! void PyGrammar_AddAccelerators(grammar *g); #ifdef __cplusplus Index: parsetok.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parsetok.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** parsetok.c 2000/06/30 23:58:05 2.20 --- parsetok.c 2000/07/09 03:09:56 2.21 *************** *** 23,28 **** /* Forward */ ! static node *parsetok Py_PROTO((struct tok_state *, grammar *, int, ! perrdetail *)); /* Parse input coming from a string. Return error code, print some errors. */ --- 23,27 ---- /* Forward */ ! static node *parsetok(struct tok_state *, grammar *, int, perrdetail *); /* Parse input coming from a string. Return error code, print some errors. */ Index: pgen.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgen.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** pgen.c 2000/06/30 23:58:05 2.14 --- pgen.c 2000/07/09 03:09:56 2.15 *************** *** 46,57 **** /* Forward */ ! static void compile_rhs Py_PROTO((labellist *ll, ! nfa *nf, node *n, int *pa, int *pb)); ! static void compile_alt Py_PROTO((labellist *ll, ! nfa *nf, node *n, int *pa, int *pb)); ! static void compile_item Py_PROTO((labellist *ll, ! nfa *nf, node *n, int *pa, int *pb)); ! static void compile_atom Py_PROTO((labellist *ll, ! nfa *nf, node *n, int *pa, int *pb)); static int --- 46,57 ---- /* Forward */ ! static void compile_rhs(labellist *ll, ! nfa *nf, node *n, int *pa, int *pb); ! static void compile_alt(labellist *ll, ! nfa *nf, node *n, int *pa, int *pb); ! static void compile_item(labellist *ll, ! nfa *nf, node *n, int *pa, int *pb); ! static void compile_atom(labellist *ll, ! nfa *nf, node *n, int *pa, int *pb); static int *************** *** 112,116 **** /* Forward */ ! static void compile_rule Py_PROTO((nfagrammar *gr, node *n)); static nfagrammar * --- 112,116 ---- /* Forward */ ! static void compile_rule(nfagrammar *gr, node *n); static nfagrammar * *************** *** 421,428 **** /* Forward */ ! static void printssdfa Py_PROTO((int xx_nstates, ss_state *xx_state, int nbits, ! labellist *ll, char *msg)); ! static void simplify Py_PROTO((int xx_nstates, ss_state *xx_state)); ! static void convert Py_PROTO((dfa *d, int xx_nstates, ss_state *xx_state)); static void --- 421,428 ---- /* Forward */ ! static void printssdfa(int xx_nstates, ss_state *xx_state, int nbits, ! labellist *ll, char *msg); ! static void simplify(int xx_nstates, ss_state *xx_state); ! static void convert(dfa *d, int xx_nstates, ss_state *xx_state); static void Index: pgen.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgen.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** pgen.h 2000/06/30 23:58:05 2.11 --- pgen.h 2000/07/09 03:09:56 2.12 *************** *** 17,24 **** /* Parser generator interface */ ! extern grammar *meta_grammar Py_PROTO((void)); struct _node; ! extern grammar *pgen Py_PROTO((struct _node *)); #ifdef __cplusplus --- 17,24 ---- /* Parser generator interface */ ! extern grammar *meta_grammar(void); struct _node; ! extern grammar *pgen(struct _node *); #ifdef __cplusplus Index: pgenmain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgenmain.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** pgenmain.c 2000/06/30 23:58:05 2.19 --- pgenmain.c 2000/07/09 03:09:56 2.20 *************** *** 33,40 **** /* Forward */ ! grammar *getgrammar Py_PROTO((char *filename)); #ifdef THINK_C ! int main Py_PROTO((int, char **)); ! char *askfile Py_PROTO((void)); #endif --- 33,40 ---- /* Forward */ ! grammar *getgrammar(char *filename); #ifdef THINK_C ! int main(int, char **); ! char *askfile(void); #endif Index: printgrammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/printgrammar.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** printgrammar.c 2000/06/30 23:58:05 2.10 --- printgrammar.c 2000/07/09 03:09:56 2.11 *************** *** 15,22 **** /* Forward */ ! static void printarcs Py_PROTO((int, dfa *, FILE *)); ! static void printstates Py_PROTO((grammar *, FILE *)); ! static void printdfas Py_PROTO((grammar *, FILE *)); ! static void printlabels Py_PROTO((grammar *, FILE *)); void --- 15,22 ---- /* Forward */ ! static void printarcs(int, dfa *, FILE *); ! static void printstates(grammar *, FILE *); ! static void printdfas(grammar *, FILE *); ! static void printlabels(grammar *, FILE *); void Index: tokenizer.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/tokenizer.c,v retrieving revision 2.44 retrieving revision 2.45 diff -C2 -r2.44 -r2.45 *** tokenizer.c 2000/06/30 23:58:05 2.44 --- tokenizer.c 2000/07/09 03:09:56 2.45 *************** *** 18,22 **** #include "errcode.h" ! extern char *PyOS_Readline Py_PROTO((char *)); /* Return malloc'ed string including trailing \n; empty malloc'ed string for EOF; --- 18,22 ---- #include "errcode.h" ! extern char *PyOS_Readline(char *); /* Return malloc'ed string including trailing \n; empty malloc'ed string for EOF; *************** *** 35,41 **** /* Forward */ ! static struct tok_state *tok_new Py_PROTO((void)); ! static int tok_nextc Py_PROTO((struct tok_state *tok)); ! static void tok_backup Py_PROTO((struct tok_state *tok, int c)); /* Token names */ --- 35,41 ---- /* Forward */ ! static struct tok_state *tok_new(void); ! static int tok_nextc(struct tok_state *tok); ! static void tok_backup(struct tok_state *tok, int c); /* Token names */ Index: tokenizer.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/tokenizer.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** tokenizer.h 2000/06/30 23:58:05 2.14 --- tokenizer.h 2000/07/09 03:09:56 2.15 *************** *** 50,58 **** }; ! extern struct tok_state *PyTokenizer_FromString Py_PROTO((char *)); ! extern struct tok_state *PyTokenizer_FromFile ! Py_PROTO((FILE *, char *, char *)); ! extern void PyTokenizer_Free Py_PROTO((struct tok_state *)); ! extern int PyTokenizer_Get Py_PROTO((struct tok_state *, char **, char **)); #ifdef __cplusplus --- 50,57 ---- }; ! extern struct tok_state *PyTokenizer_FromString(char *); ! extern struct tok_state *PyTokenizer_FromFile(FILE *, char *, char *); ! extern void PyTokenizer_Free(struct tok_state *); ! extern int PyTokenizer_Get(struct tok_state *, char **, char **); #ifdef __cplusplus From python-dev@python.org Sun Jul 9 04:09:59 2000 From: python-dev@python.org (Tim Peters) Date: Sat, 8 Jul 2000 20:09:59 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.168,2.169 ceval.c,2.182,2.183 compile.c,2.113,2.114 errors.c,2.47,2.48 getargs.c,2.38,2.39 import.c,2.139,2.140 importdl.h,2.14,2.15 marshal.c,1.51,1.52 modsupport.c,2.47,2.48 pythonrun.c,2.100,2.101 sysmodule.c,2.68,2.69 Message-ID: <200007090309.UAA10498@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv8264/python/dist/src/Python Modified Files: bltinmodule.c ceval.c compile.c errors.c getargs.c import.c importdl.h marshal.c modsupport.c pythonrun.c sysmodule.c Log Message: Nuke all remaining occurrences of Py_PROTO and Py_FPROTO. Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.168 retrieving revision 2.169 diff -C2 -r2.168 -r2.169 *** bltinmodule.c 2000/07/09 02:11:18 2.168 --- bltinmodule.c 2000/07/09 03:09:56 2.169 *************** *** 29,34 **** /* Forward */ ! static PyObject *filterstring Py_PROTO((PyObject *, PyObject *)); ! static PyObject *filtertuple Py_PROTO((PyObject *, PyObject *)); static PyObject * --- 29,34 ---- /* Forward */ ! static PyObject *filterstring(PyObject *, PyObject *); ! static PyObject *filtertuple (PyObject *, PyObject *); static PyObject * *************** *** 429,433 **** PyObject *v; { ! extern double strtod Py_PROTO((const char *, char **)); const char *s, *start; char *end; --- 429,433 ---- PyObject *v; { ! extern double strtod(const char *, char **); const char *s, *start; char *end; *************** *** 1226,1230 **** ! static PyObject *builtin_raw_input Py_PROTO((PyObject *, PyObject *)); static PyObject * --- 1226,1230 ---- ! static PyObject *builtin_raw_input(PyObject *, PyObject *); static PyObject * Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.182 retrieving revision 2.183 diff -C2 -r2.182 -r2.183 *** ceval.c 2000/06/30 23:58:05 2.182 --- ceval.c 2000/07/09 03:09:56 2.183 *************** *** 44,75 **** /* Forward declarations */ ! static PyObject *eval_code2 Py_PROTO((PyCodeObject *, ! PyObject *, PyObject *, ! PyObject **, int, ! PyObject **, int, ! PyObject **, int, ! PyObject *)); #ifdef LLTRACE ! static int prtrace Py_PROTO((PyObject *, char *)); #endif ! static void call_exc_trace Py_PROTO((PyObject **, PyObject**, ! PyFrameObject *)); ! static int call_trace Py_PROTO((PyObject **, PyObject **, ! PyFrameObject *, char *, PyObject *)); ! static PyObject *call_builtin Py_PROTO((PyObject *, PyObject *, PyObject *)); ! static PyObject *call_function Py_PROTO((PyObject *, PyObject *, PyObject *)); ! static PyObject *loop_subscript Py_PROTO((PyObject *, PyObject *)); ! static PyObject *apply_slice Py_PROTO((PyObject *, PyObject *, PyObject *)); ! static int assign_slice Py_PROTO((PyObject *, PyObject *, ! PyObject *, PyObject *)); ! static PyObject *cmp_outcome Py_PROTO((int, PyObject *, PyObject *)); ! static int import_from Py_PROTO((PyObject *, PyObject *, PyObject *)); ! static PyObject *build_class Py_PROTO((PyObject *, PyObject *, PyObject *)); ! static int exec_statement Py_PROTO((PyFrameObject *, ! PyObject *, PyObject *, PyObject *)); ! static PyObject *find_from_args Py_PROTO((PyFrameObject *, int)); ! static void set_exc_info Py_PROTO((PyThreadState *, ! PyObject *, PyObject *, PyObject *)); ! static void reset_exc_info Py_PROTO((PyThreadState *)); --- 44,73 ---- /* Forward declarations */ ! static PyObject *eval_code2(PyCodeObject *, ! PyObject *, PyObject *, ! PyObject **, int, ! PyObject **, int, ! PyObject **, int, ! PyObject *); #ifdef LLTRACE ! static int prtrace(PyObject *, char *); #endif ! static void call_exc_trace(PyObject **, PyObject**, PyFrameObject *); ! static int call_trace(PyObject **, PyObject **, ! PyFrameObject *, char *, PyObject *); ! static PyObject *call_builtin(PyObject *, PyObject *, PyObject *); ! static PyObject *call_function(PyObject *, PyObject *, PyObject *); ! static PyObject *loop_subscript(PyObject *, PyObject *); ! static PyObject *apply_slice(PyObject *, PyObject *, PyObject *); ! static int assign_slice(PyObject *, PyObject *, ! PyObject *, PyObject *); ! static PyObject *cmp_outcome(int, PyObject *, PyObject *); ! static int import_from(PyObject *, PyObject *, PyObject *); ! static PyObject *build_class(PyObject *, PyObject *, PyObject *); ! static int exec_statement(PyFrameObject *, ! PyObject *, PyObject *, PyObject *); ! static PyObject *find_from_args(PyFrameObject *, int); ! static void set_exc_info(PyThreadState *, PyObject *, PyObject *, PyObject *); ! static void reset_exc_info(PyThreadState *); *************** *** 212,216 **** #define NPENDINGCALLS 32 static struct { ! int (*func) Py_PROTO((ANY *)); ANY *arg; } pendingcalls[NPENDINGCALLS]; --- 210,214 ---- #define NPENDINGCALLS 32 static struct { ! int (*func)(ANY *); ANY *arg; } pendingcalls[NPENDINGCALLS]; *************** *** 221,225 **** int Py_AddPendingCall(func, arg) ! int (*func) Py_PROTO((ANY *)); ANY *arg; { --- 219,223 ---- int Py_AddPendingCall(func, arg) ! int (*func)(ANY *); ANY *arg; { *************** *** 259,263 **** for (;;) { int i; ! int (*func) Py_PROTO((ANY *)); ANY *arg; i = pendingfirst; --- 257,261 ---- for (;;) { int i; ! int (*func)(ANY *); ANY *arg; i = pendingfirst; *************** *** 288,293 **** }; ! static enum why_code do_raise Py_PROTO((PyObject *, PyObject *, PyObject *)); ! static int unpack_sequence Py_PROTO((PyObject *, int, PyObject **)); --- 286,291 ---- }; ! static enum why_code do_raise(PyObject *, PyObject *, PyObject *); ! static int unpack_sequence(PyObject *, int, PyObject **); Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.113 retrieving revision 2.114 diff -C2 -r2.113 -r2.114 *** compile.c 2000/07/03 21:39:47 2.113 --- compile.c 2000/07/09 03:09:56 2.114 *************** *** 376,403 **** /* Prototype forward declarations */ ! static int com_init Py_PROTO((struct compiling *, char *)); ! static void com_free Py_PROTO((struct compiling *)); ! static void com_push Py_PROTO((struct compiling *, int)); ! static void com_pop Py_PROTO((struct compiling *, int)); ! static void com_done Py_PROTO((struct compiling *)); ! static void com_node Py_PROTO((struct compiling *, struct _node *)); ! static void com_factor Py_PROTO((struct compiling *, struct _node *)); ! static void com_addbyte Py_PROTO((struct compiling *, int)); ! static void com_addint Py_PROTO((struct compiling *, int)); ! static void com_addoparg Py_PROTO((struct compiling *, int, int)); ! static void com_addfwref Py_PROTO((struct compiling *, int, int *)); ! static void com_backpatch Py_PROTO((struct compiling *, int)); ! static int com_add Py_PROTO((struct compiling *, PyObject *, PyObject *, PyObject *)); ! static int com_addconst Py_PROTO((struct compiling *, PyObject *)); ! static int com_addname Py_PROTO((struct compiling *, PyObject *)); ! static void com_addopname Py_PROTO((struct compiling *, int, node *)); ! static void com_list Py_PROTO((struct compiling *, node *, int)); ! static int com_argdefs Py_PROTO((struct compiling *, node *)); ! static int com_newlocal Py_PROTO((struct compiling *, char *)); ! static PyCodeObject *icompile Py_PROTO((struct _node *, struct compiling *)); ! static PyCodeObject *jcompile Py_PROTO((struct _node *, char *, ! struct compiling *)); ! static PyObject *parsestrplus Py_PROTO((node *)); ! static PyObject *parsestr Py_PROTO((char *)); static int --- 376,403 ---- /* Prototype forward declarations */ ! static int com_init(struct compiling *, char *); ! static void com_free(struct compiling *); ! static void com_push(struct compiling *, int); ! static void com_pop(struct compiling *, int); ! static void com_done(struct compiling *); ! static void com_node(struct compiling *, struct _node *); ! static void com_factor(struct compiling *, struct _node *); ! static void com_addbyte(struct compiling *, int); ! static void com_addint(struct compiling *, int); ! static void com_addoparg(struct compiling *, int, int); ! static void com_addfwref(struct compiling *, int, int *); ! static void com_backpatch(struct compiling *, int); ! static int com_add(struct compiling *, PyObject *, PyObject *, PyObject *); ! static int com_addconst(struct compiling *, PyObject *); ! static int com_addname(struct compiling *, PyObject *); ! static void com_addopname(struct compiling *, int, node *); ! static void com_list(struct compiling *, node *, int); ! static int com_argdefs(struct compiling *, node *); ! static int com_newlocal(struct compiling *, char *); ! static PyCodeObject *icompile(struct _node *, struct compiling *); ! static PyCodeObject *jcompile(struct _node *, char *, ! struct compiling *); ! static PyObject *parsestrplus(node *); ! static PyObject *parsestr(char *); static int *************** *** 814,818 **** char *s; { ! extern double atof Py_PROTO((const char *)); char *end; long x; --- 814,818 ---- char *s; { ! extern double atof(const char *); char *end; long x; *************** *** 1824,1829 **** /* Begin of assignment compilation */ ! static void com_assign_name Py_PROTO((struct compiling *, node *, int)); ! static void com_assign Py_PROTO((struct compiling *, node *, int)); static void --- 1824,1829 ---- /* Begin of assignment compilation */ ! static void com_assign_name(struct compiling *, node *, int); ! static void com_assign(struct compiling *, node *, int); static void *************** *** 2014,2018 **** } ! /* Forward */ static node *get_rawdocstring Py_PROTO((node *)); static void --- 2014,2018 ---- } ! /* Forward */ static node *get_rawdocstring(node *); static void *************** *** 3042,3046 **** } ! static void com_fplist Py_PROTO((struct compiling *, node *)); static void --- 3042,3046 ---- } ! static void com_fplist(struct compiling *, node *); static void Index: errors.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/errors.c,v retrieving revision 2.47 retrieving revision 2.48 diff -C2 -r2.47 -r2.48 *** errors.c 2000/06/30 23:58:06 2.47 --- errors.c 2000/07/09 03:09:56 2.48 *************** *** 18,22 **** #ifdef macintosh ! extern char *PyMac_StrError Py_PROTO((int)); #undef strerror #define strerror PyMac_StrError --- 18,22 ---- #ifdef macintosh ! extern char *PyMac_StrError(int); #undef strerror #define strerror PyMac_StrError *************** *** 25,29 **** #ifndef __STDC__ #ifndef MS_WINDOWS ! extern char *strerror Py_PROTO((int)); #endif #endif --- 25,29 ---- #ifndef __STDC__ #ifndef MS_WINDOWS ! extern char *strerror(int); #endif #endif Index: getargs.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v retrieving revision 2.38 retrieving revision 2.39 diff -C2 -r2.38 -r2.39 *** getargs.c 2000/07/06 12:22:00 2.38 --- getargs.c 2000/07/09 03:09:56 2.39 *************** *** 24,47 **** ! int PyArg_Parse Py_PROTO((PyObject *, char *, ...)); ! int PyArg_ParseTuple Py_PROTO((PyObject *, char *, ...)); ! int PyArg_VaParse Py_PROTO((PyObject *, char *, va_list)); ! int PyArg_ParseTupleAndKeywords Py_PROTO((PyObject *, PyObject *, ! char *, char **, ...)); /* Forward */ ! static int vgetargs1 Py_PROTO((PyObject *, char *, va_list *, int)); ! static void seterror Py_PROTO((int, char *, int *, char *, char *)); ! static char *convertitem Py_PROTO((PyObject *, char **, va_list *, ! int *, char *)); ! static char *converttuple Py_PROTO((PyObject *, char **, va_list *, ! int *, char *, int)); ! static char *convertsimple Py_PROTO((PyObject *, char **, va_list *, char *)); ! static char *convertsimple1 Py_PROTO((PyObject *, char **, va_list *)); ! ! static int vgetargskeywords Py_PROTO((PyObject *, PyObject *, ! char *, char **, va_list *)); ! static char *skipitem Py_PROTO((char **, va_list *)); #ifdef HAVE_STDARG_PROTOTYPES --- 24,46 ---- ! int PyArg_Parse(PyObject *, char *, ...); ! int PyArg_ParseTuple(PyObject *, char *, ...); ! int PyArg_VaParse(PyObject *, char *, va_list); ! int PyArg_ParseTupleAndKeywords(PyObject *, PyObject *, ! char *, char **, ...); /* Forward */ ! static int vgetargs1(PyObject *, char *, va_list *, int); ! static void seterror(int, char *, int *, char *, char *); ! static char *convertitem(PyObject *, char **, va_list *, int *, char *); ! static char *converttuple(PyObject *, char **, va_list *, ! int *, char *, int); ! static char *convertsimple(PyObject *, char **, va_list *, char *); ! static char *convertsimple1(PyObject *, char **, va_list *); ! ! static int vgetargskeywords(PyObject *, PyObject *, ! char *, char **, va_list *); ! static char *skipitem(char **, va_list *); #ifdef HAVE_STDARG_PROTOTYPES *************** *** 887,892 **** } else if (*format == '&') { ! typedef int (*converter) ! Py_PROTO((PyObject *, void *)); converter convert = va_arg(*p_va, converter); void *addr = va_arg(*p_va, void *); --- 886,890 ---- } else if (*format == '&') { ! typedef int (*converter)(PyObject *, void *); converter convert = va_arg(*p_va, converter); void *addr = va_arg(*p_va, void *); *************** *** 1324,1329 **** #endif else if (*format == '&') { ! typedef int (*converter) ! Py_PROTO((PyObject *, void *)); (void) va_arg(*p_va, converter); (void) va_arg(*p_va, void *); --- 1322,1326 ---- #endif else if (*format == '&') { ! typedef int (*converter)(PyObject *, void *); (void) va_arg(*p_va, converter); (void) va_arg(*p_va, void *); Index: import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.139 retrieving revision 2.140 diff -C2 -r2.139 -r2.140 *** import.c 2000/07/01 01:06:56 2.139 --- import.c 2000/07/09 03:09:56 2.140 *************** *** 764,771 **** /* Forward */ ! static PyObject *load_module Py_PROTO((char *, FILE *, char *, int)); ! static struct filedescr *find_module Py_PROTO((char *, PyObject *, ! char *, size_t, FILE **)); ! static struct _frozen *find_frozen Py_PROTO((char *name)); /* Load a package and return its module object WITH INCREMENTED --- 764,771 ---- /* Forward */ ! static PyObject *load_module(char *, FILE *, char *, int); ! static struct filedescr *find_module(char *, PyObject *, ! char *, size_t, FILE **); ! static struct _frozen *find_frozen(char *name); /* Load a package and return its module object WITH INCREMENTED *************** *** 856,860 **** #endif ! static int find_init_module Py_PROTO((char *)); /* Forward */ static struct filedescr * --- 856,860 ---- #endif ! static int find_init_module(char *); /* Forward */ static struct filedescr * *************** *** 1207,1211 **** ! static int init_builtin Py_PROTO((char *)); /* Forward */ /* Load an external module using the default search path and return --- 1207,1211 ---- ! static int init_builtin(char *); /* Forward */ /* Load an external module using the default search path and return *************** *** 1456,1468 **** /* Forward declarations for helper routines */ ! static PyObject *get_parent Py_PROTO((PyObject *globals, ! char *buf, int *p_buflen)); ! static PyObject *load_next Py_PROTO((PyObject *mod, PyObject *altmod, ! char **p_name, char *buf, int *p_buflen)); ! static int mark_miss Py_PROTO((char *name)); ! static int ensure_fromlist Py_PROTO((PyObject *mod, PyObject *fromlist, ! char *buf, int buflen, int recursive)); ! static PyObject * import_submodule Py_PROTO((PyObject *mod, ! char *name, char *fullname)); /* The Magnum Opus of dotted-name import :-) */ --- 1456,1466 ---- /* Forward declarations for helper routines */ ! static PyObject *get_parent(PyObject *globals, char *buf, int *p_buflen); ! static PyObject *load_next(PyObject *mod, PyObject *altmod, ! char **p_name, char *buf, int *p_buflen); ! static int mark_miss(char *name); ! static int ensure_fromlist(PyObject *mod, PyObject *fromlist, ! char *buf, int buflen, int recursive); ! static PyObject * import_submodule(PyObject *mod, char *name, char *fullname); /* The Magnum Opus of dotted-name import :-) */ *************** *** 2007,2011 **** PyObject *path; /* list or None or NULL */ { ! extern int fclose Py_PROTO((FILE *)); PyObject *fob, *ret; struct filedescr *fdp; --- 2005,2009 ---- PyObject *path; /* list or None or NULL */ { ! extern int fclose(FILE *); PyObject *fob, *ret; struct filedescr *fdp; Index: importdl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/importdl.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** importdl.h 2000/06/30 23:58:06 2.14 --- importdl.h 2000/07/09 03:09:56 2.15 *************** *** 37,42 **** extern const struct filedescr _PyImport_DynLoadFiletab[]; ! extern PyObject *_PyImport_LoadDynamicModule ! Py_PROTO((char *name, char *pathname, FILE *)); /* Max length of module suffix searched for -- accommodates "module.slb" */ --- 37,42 ---- extern const struct filedescr _PyImport_DynLoadFiletab[]; ! extern PyObject *_PyImport_LoadDynamicModule(char *name, char *pathname, ! FILE *); /* Max length of module suffix searched for -- accommodates "module.slb" */ Index: marshal.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/marshal.c,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -r1.51 -r1.52 *** marshal.c 2000/06/30 23:58:06 1.51 --- marshal.c 2000/07/09 03:09:56 1.52 *************** *** 172,177 **** } else if (PyFloat_Check(v)) { ! extern void PyFloat_AsString ! Py_PROTO((char *, PyFloatObject *)); char buf[256]; /* Plenty to format any double */ PyFloat_AsString(buf, (PyFloatObject *)v); --- 172,176 ---- } else if (PyFloat_Check(v)) { ! extern void PyFloat_AsString(char *, PyFloatObject *); char buf[256]; /* Plenty to format any double */ PyFloat_AsString(buf, (PyFloatObject *)v); *************** *** 183,188 **** #ifndef WITHOUT_COMPLEX else if (PyComplex_Check(v)) { ! extern void PyFloat_AsString ! Py_PROTO((char *, PyFloatObject *)); char buf[256]; /* Plenty to format any double */ PyFloatObject *temp; --- 182,186 ---- #ifndef WITHOUT_COMPLEX else if (PyComplex_Check(v)) { ! extern void PyFloat_AsString(char *, PyFloatObject *); char buf[256]; /* Plenty to format any double */ PyFloatObject *temp; *************** *** 439,443 **** case TYPE_FLOAT: { ! extern double atof Py_PROTO((const char *)); char buf[256]; double dx; --- 437,441 ---- case TYPE_FLOAT: { ! extern double atof(const char *); char buf[256]; double dx; *************** *** 458,462 **** case TYPE_COMPLEX: { ! extern double atof Py_PROTO((const char *)); char buf[256]; Py_complex c; --- 456,460 ---- case TYPE_COMPLEX: { ! extern double atof(const char *); char buf[256]; Py_complex c; Index: modsupport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/modsupport.c,v retrieving revision 2.47 retrieving revision 2.48 diff -C2 -r2.47 -r2.48 *** modsupport.c 2000/07/06 12:22:00 2.47 --- modsupport.c 2000/07/09 03:09:56 2.48 *************** *** 85,89 **** /* Helper for mkvalue() to scan the length of a format */ ! static int countformat Py_PROTO((char *format, int endchar)); static int countformat(format, endchar) char *format; --- 85,89 ---- /* Helper for mkvalue() to scan the length of a format */ ! static int countformat(char *format, int endchar); static int countformat(format, endchar) char *format; *************** *** 131,138 **** /* After an original idea and first implementation by Steven Miale */ ! static PyObject *do_mktuple Py_PROTO((char**, va_list *, int, int)); ! static PyObject *do_mklist Py_PROTO((char**, va_list *, int, int)); ! static PyObject *do_mkdict Py_PROTO((char**, va_list *, int, int)); ! static PyObject *do_mkvalue Py_PROTO((char**, va_list *)); --- 131,138 ---- /* After an original idea and first implementation by Steven Miale */ ! static PyObject *do_mktuple(char**, va_list *, int, int); ! static PyObject *do_mklist(char**, va_list *, int, int); ! static PyObject *do_mkdict(char**, va_list *, int, int); ! static PyObject *do_mkvalue(char**, va_list *); *************** *** 359,363 **** case 'O': if (**p_format == '&') { ! typedef PyObject *(*converter) Py_PROTO((void *)); converter func = va_arg(*p_va, converter); void *arg = va_arg(*p_va, void *); --- 359,363 ---- case 'O': if (**p_format == '&') { ! typedef PyObject *(*converter)(void *); converter func = va_arg(*p_va, converter); void *arg = va_arg(*p_va, void *); Index: pythonrun.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v retrieving revision 2.100 retrieving revision 2.101 diff -C2 -r2.100 -r2.101 *** pythonrun.c 2000/06/30 23:58:06 2.100 --- pythonrun.c 2000/07/09 03:09:56 2.101 *************** *** 39,54 **** /* Forward */ ! static void initmain Py_PROTO((void)); ! static void initsite Py_PROTO((void)); ! static PyObject *run_err_node Py_PROTO((node *n, char *filename, ! PyObject *globals, PyObject *locals)); ! static PyObject *run_node Py_PROTO((node *n, char *filename, ! PyObject *globals, PyObject *locals)); ! static PyObject *run_pyc_file Py_PROTO((FILE *fp, char *filename, ! PyObject *globals, PyObject *locals)); ! static void err_input Py_PROTO((perrdetail *)); ! static void initsigs Py_PROTO((void)); ! static void call_sys_exitfunc Py_PROTO((void)); ! static void call_ll_exitfuncs Py_PROTO((void)); #ifdef Py_TRACE_REFS --- 39,54 ---- /* Forward */ ! static void initmain(void); ! static void initsite(void); ! static PyObject *run_err_node(node *n, char *filename, ! PyObject *globals, PyObject *locals); ! static PyObject *run_node(node *n, char *filename, ! PyObject *globals, PyObject *locals); ! static PyObject *run_pyc_file(FILE *fp, char *filename, ! PyObject *globals, PyObject *locals); ! static void err_input(perrdetail *); ! static void initsigs(void); ! static void call_sys_exitfunc(void); ! static void call_ll_exitfuncs(void); #ifdef Py_TRACE_REFS *************** *** 164,168 **** #ifdef COUNT_ALLOCS ! extern void dump_counts Py_PROTO((void)); #endif --- 164,168 ---- #ifdef COUNT_ALLOCS ! extern void dump_counts(void); #endif *************** *** 1060,1064 **** int Py_AtExit(func) ! void (*func) Py_PROTO((void)); { if (nexitfuncs >= NEXITFUNCS) --- 1060,1064 ---- int Py_AtExit(func) ! void (*func)(void); { if (nexitfuncs >= NEXITFUNCS) Index: sysmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v retrieving revision 2.68 retrieving revision 2.69 diff -C2 -r2.68 -r2.69 *** sysmodule.c 2000/06/30 23:58:06 2.68 --- sysmodule.c 2000/07/09 03:09:56 2.69 *************** *** 271,275 **** PyObject *self, *args; { ! extern PyObject *get_counts Py_PROTO((void)); if (!PyArg_ParseTuple(args, ":getcounts")) --- 271,275 ---- PyObject *self, *args; { ! extern PyObject *get_counts(void); if (!PyArg_ParseTuple(args, ":getcounts")) *************** *** 281,290 **** #ifdef Py_TRACE_REFS /* Defined in objects.c because it uses static globals if that file */ ! extern PyObject *_Py_GetObjects Py_PROTO((PyObject *, PyObject *)); #endif #ifdef DYNAMIC_EXECUTION_PROFILE /* Defined in ceval.c because it uses static globals if that file */ ! extern PyObject *_Py_GetDXProfile Py_PROTO((PyObject *, PyObject *)); #endif --- 281,290 ---- #ifdef Py_TRACE_REFS /* Defined in objects.c because it uses static globals if that file */ ! extern PyObject *_Py_GetObjects(PyObject *, PyObject *); #endif #ifdef DYNAMIC_EXECUTION_PROFILE /* Defined in ceval.c because it uses static globals if that file */ ! extern PyObject *_Py_GetDXProfile(PyObject *, PyObject *); #endif *************** *** 410,414 **** _PySys_Init() { ! extern int fclose Py_PROTO((FILE *)); PyObject *m, *v, *sysdict; PyObject *sysin, *sysout, *syserr; --- 410,414 ---- _PySys_Init() { ! extern int fclose(FILE *); PyObject *m, *v, *sysdict; PyObject *sysin, *sysout, *syserr; From python-dev@python.org Sun Jul 9 04:35:13 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 20:35:13 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/ext ext.tex,1.78,1.79 Message-ID: <200007090335.UAA11510@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ext In directory slayer.i.sourceforge.net:/tmp/cvs-serv11500 Modified Files: ext.tex Log Message: Remove the only Py_PROTO in the docs. Index: ext.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ext/ext.tex,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -r1.78 -r1.79 *** ext.tex 2000/06/30 17:58:34 1.78 --- ext.tex 2000/07/09 03:35:10 1.79 *************** *** 1604,1608 **** #define PySpam_System_NUM 0 #define PySpam_System_RETURN int ! #define PySpam_System_PROTO Py_PROTO((char *command)) /* Total number of C API pointers */ --- 1604,1608 ---- #define PySpam_System_NUM 0 #define PySpam_System_RETURN int ! #define PySpam_System_PROTO(char *command) /* Total number of C API pointers */ From python-dev@python.org Sun Jul 9 05:06:14 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 21:06:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.38,2.39 bufferobject.c,2.10,2.11 classobject.c,2.99,2.100 Message-ID: <200007090406.VAA19317@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv19308 Modified Files: abstract.c bufferobject.c classobject.c Log Message: ANSI-fication of the sources. Index: abstract.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v retrieving revision 2.38 retrieving revision 2.39 diff -C2 -r2.38 -r2.39 *** abstract.c 2000/07/09 03:09:56 2.38 --- abstract.c 2000/07/09 04:06:11 2.39 *************** *** 17,22 **** static PyObject * ! type_error(msg) ! char *msg; { PyErr_SetString(PyExc_TypeError, msg); --- 17,21 ---- static PyObject * ! type_error(char *msg) { PyErr_SetString(PyExc_TypeError, msg); *************** *** 25,29 **** static PyObject * ! null_error() { if (!PyErr_Occurred()) --- 24,28 ---- static PyObject * ! null_error(void) { if (!PyErr_Occurred()) *************** *** 36,43 **** int ! PyObject_Cmp(o1, o2, result) ! PyObject *o1; ! PyObject *o2; ! int *result; { int r; --- 35,39 ---- int ! PyObject_Cmp(PyObject *o1, PyObject *o2, int *result) { int r; *************** *** 55,60 **** PyObject * ! PyObject_Type(o) ! PyObject *o; { PyObject *v; --- 51,55 ---- PyObject * ! PyObject_Type(PyObject *o) { PyObject *v; *************** *** 68,73 **** int ! PyObject_Length(o) ! PyObject *o; { PySequenceMethods *m; --- 63,67 ---- int ! PyObject_Length(PyObject *o) { PySequenceMethods *m; *************** *** 86,92 **** PyObject * ! PyObject_GetItem(o, key) ! PyObject *o; ! PyObject *key; { PyMappingMethods *m; --- 80,84 ---- PyObject * ! PyObject_GetItem(PyObject *o, PyObject *key) { PyMappingMethods *m; *************** *** 115,122 **** int ! PyObject_SetItem(o, key, value) ! PyObject *o; ! PyObject *key; ! PyObject *value; { PyMappingMethods *m; --- 107,111 ---- int ! PyObject_SetItem(PyObject *o, PyObject *key, PyObject *value) { PyMappingMethods *m; *************** *** 148,154 **** int ! PyObject_DelItem(o, key) ! PyObject *o; ! PyObject *key; { PyMappingMethods *m; --- 137,141 ---- int ! PyObject_DelItem(PyObject *o, PyObject *key) { PyMappingMethods *m; *************** *** 290,295 **** int ! PyNumber_Check(o) ! PyObject *o; { return o && o->ob_type->tp_as_number; --- 277,281 ---- int ! PyNumber_Check(PyObject *o) { return o && o->ob_type->tp_as_number; *************** *** 303,308 **** PyObject * ! PyNumber_Or(v, w) ! PyObject *v, *w; { extern int PyNumber_Coerce(); --- 289,293 ---- PyObject * ! PyNumber_Or(PyObject *v, PyObject *w) { extern int PyNumber_Coerce(); *************** *** 325,330 **** PyObject * ! PyNumber_Xor(v, w) ! PyObject *v, *w; { extern int PyNumber_Coerce(); --- 310,314 ---- PyObject * ! PyNumber_Xor(PyObject *v, PyObject *w) { extern int PyNumber_Coerce(); *************** *** 347,352 **** PyObject * ! PyNumber_And(v, w) ! PyObject *v, *w; { BINOP(v, w, "__and__", "__rand__", PyNumber_And); --- 331,335 ---- PyObject * ! PyNumber_And(PyObject *v, PyObject *w) { BINOP(v, w, "__and__", "__rand__", PyNumber_And); *************** *** 367,372 **** PyObject * ! PyNumber_Lshift(v, w) ! PyObject *v, *w; { BINOP(v, w, "__lshift__", "__rlshift__", PyNumber_Lshift); --- 350,354 ---- PyObject * ! PyNumber_Lshift(PyObject *v, PyObject *w) { BINOP(v, w, "__lshift__", "__rlshift__", PyNumber_Lshift); *************** *** 387,392 **** PyObject * ! PyNumber_Rshift(v, w) ! PyObject *v, *w; { BINOP(v, w, "__rshift__", "__rrshift__", PyNumber_Rshift); --- 369,373 ---- PyObject * ! PyNumber_Rshift(PyObject *v, PyObject *w) { BINOP(v, w, "__rshift__", "__rrshift__", PyNumber_Rshift); *************** *** 407,412 **** PyObject * ! PyNumber_Add(v, w) ! PyObject *v, *w; { PySequenceMethods *m; --- 388,392 ---- PyObject * ! PyNumber_Add(PyObject *v, PyObject *w) { PySequenceMethods *m; *************** *** 432,437 **** PyObject * ! PyNumber_Subtract(v, w) ! PyObject *v, *w; { BINOP(v, w, "__sub__", "__rsub__", PyNumber_Subtract); --- 412,416 ---- PyObject * ! PyNumber_Subtract(PyObject *v, PyObject *w) { BINOP(v, w, "__sub__", "__rsub__", PyNumber_Subtract); *************** *** 452,457 **** PyObject * ! PyNumber_Multiply(v, w) ! PyObject *v, *w; { PyTypeObject *tp = v->ob_type; --- 431,435 ---- PyObject * ! PyNumber_Multiply(PyObject *v, PyObject *w) { PyTypeObject *tp = v->ob_type; *************** *** 510,515 **** PyObject * ! PyNumber_Divide(v, w) ! PyObject *v, *w; { BINOP(v, w, "__div__", "__rdiv__", PyNumber_Divide); --- 488,492 ---- PyObject * ! PyNumber_Divide(PyObject *v, PyObject *w) { BINOP(v, w, "__div__", "__rdiv__", PyNumber_Divide); *************** *** 530,535 **** PyObject * ! PyNumber_Remainder(v, w) ! PyObject *v, *w; { if (PyString_Check(v)) --- 507,511 ---- PyObject * ! PyNumber_Remainder(PyObject *v, PyObject *w) { if (PyString_Check(v)) *************** *** 554,559 **** PyObject * ! PyNumber_Divmod(v, w) ! PyObject *v, *w; { BINOP(v, w, "__divmod__", "__rdivmod__", PyNumber_Divmod); --- 530,534 ---- PyObject * ! PyNumber_Divmod(PyObject *v, PyObject *w) { BINOP(v, w, "__divmod__", "__rdivmod__", PyNumber_Divmod); *************** *** 576,581 **** static PyObject * ! do_pow(v, w) ! PyObject *v, *w; { PyObject *res; --- 551,555 ---- static PyObject * ! do_pow(PyObject *v, PyObject *w) { PyObject *res; *************** *** 600,605 **** PyObject * ! PyNumber_Power(v, w, z) ! PyObject *v, *w, *z; { PyObject *res; --- 574,578 ---- PyObject * ! PyNumber_Power(PyObject *v, PyObject *w, PyObject *z) { PyObject *res; *************** *** 647,652 **** PyObject * ! PyNumber_Negative(o) ! PyObject *o; { PyNumberMethods *m; --- 620,624 ---- PyObject * ! PyNumber_Negative(PyObject *o) { PyNumberMethods *m; *************** *** 662,667 **** PyObject * ! PyNumber_Positive(o) ! PyObject *o; { PyNumberMethods *m; --- 634,638 ---- PyObject * ! PyNumber_Positive(PyObject *o) { PyNumberMethods *m; *************** *** 677,682 **** PyObject * ! PyNumber_Invert(o) ! PyObject *o; { PyNumberMethods *m; --- 648,652 ---- PyObject * ! PyNumber_Invert(PyObject *o) { PyNumberMethods *m; *************** *** 692,697 **** PyObject * ! PyNumber_Absolute(o) ! PyObject *o; { PyNumberMethods *m; --- 662,666 ---- PyObject * ! PyNumber_Absolute(PyObject *o) { PyNumberMethods *m; *************** *** 708,714 **** /* Add a check for embedded NULL-bytes in the argument. */ static PyObject * ! int_from_string(s, len) ! const char *s; ! int len; { char *end; --- 677,681 ---- /* Add a check for embedded NULL-bytes in the argument. */ static PyObject * ! int_from_string(const char *s, int len) { char *end; *************** *** 728,733 **** PyObject * ! PyNumber_Int(o) ! PyObject *o; { PyNumberMethods *m; --- 695,699 ---- PyObject * ! PyNumber_Int(PyObject *o) { PyNumberMethods *m; *************** *** 759,765 **** /* Add a check for embedded NULL-bytes in the argument. */ static PyObject * ! long_from_string(s, len) ! const char *s; ! int len; { char *end; --- 725,729 ---- /* Add a check for embedded NULL-bytes in the argument. */ static PyObject * ! long_from_string(const char *s, int len) { char *end; *************** *** 779,784 **** PyObject * ! PyNumber_Long(o) ! PyObject *o; { PyNumberMethods *m; --- 743,747 ---- PyObject * ! PyNumber_Long(PyObject *o) { PyNumberMethods *m; *************** *** 814,819 **** PyObject * ! PyNumber_Float(o) ! PyObject *o; { PyNumberMethods *m; --- 777,781 ---- PyObject * ! PyNumber_Float(PyObject *o) { PyNumberMethods *m; *************** *** 836,841 **** int ! PySequence_Check(s) ! PyObject *s; { return s != NULL && s->ob_type->tp_as_sequence; --- 798,802 ---- int ! PySequence_Check(PyObject *s) { return s != NULL && s->ob_type->tp_as_sequence; *************** *** 843,848 **** int ! PySequence_Length(s) ! PyObject *s; { PySequenceMethods *m; --- 804,808 ---- int ! PySequence_Length(PyObject *s) { PySequenceMethods *m; *************** *** 862,868 **** PyObject * ! PySequence_Concat(s, o) ! PyObject *s; ! PyObject *o; { PySequenceMethods *m; --- 822,826 ---- PyObject * ! PySequence_Concat(PyObject *s, PyObject *o) { PySequenceMethods *m; *************** *** 879,885 **** PyObject * ! PySequence_Repeat(o, count) ! PyObject *o; ! int count; { PySequenceMethods *m; --- 837,841 ---- PyObject * ! PySequence_Repeat(PyObject *o, int count) { PySequenceMethods *m; *************** *** 896,902 **** PyObject * ! PySequence_GetItem(s, i) ! PyObject *s; ! int i; { PySequenceMethods *m; --- 852,856 ---- PyObject * ! PySequence_GetItem(PyObject *s, int i) { PySequenceMethods *m; *************** *** 922,929 **** PyObject * ! PySequence_GetSlice(s, i1, i2) ! PyObject *s; ! int i1; ! int i2; { PySequenceMethods *m; --- 876,880 ---- PyObject * ! PySequence_GetSlice(PyObject *s, int i1, int i2) { PySequenceMethods *m; *************** *** 951,958 **** int ! PySequence_SetItem(s, i, o) ! PyObject *s; ! int i; ! PyObject *o; { PySequenceMethods *m; --- 902,906 ---- int ! PySequence_SetItem(PyObject *s, int i, PyObject *o) { PySequenceMethods *m; *************** *** 981,987 **** int ! PySequence_DelItem(s, i) ! PyObject *s; ! int i; { PySequenceMethods *m; --- 929,933 ---- int ! PySequence_DelItem(PyObject *s, int i) { PySequenceMethods *m; *************** *** 1010,1018 **** int ! PySequence_SetSlice(s, i1, i2, o) ! PyObject *s; ! int i1; ! int i2; ! PyObject *o; { PySequenceMethods *m; --- 956,960 ---- int ! PySequence_SetSlice(PyObject *s, int i1, int i2, PyObject *o) { PySequenceMethods *m; *************** *** 1043,1050 **** int ! PySequence_DelSlice(s, i1, i2) ! PyObject *s; ! int i1; ! int i2; { PySequenceMethods *m; --- 985,989 ---- int ! PySequence_DelSlice(PyObject *s, int i1, int i2) { PySequenceMethods *m; *************** *** 1075,1080 **** PyObject * ! PySequence_Tuple(v) ! PyObject *v; { PySequenceMethods *m; --- 1014,1018 ---- PyObject * ! PySequence_Tuple(PyObject *v) { PySequenceMethods *m; *************** *** 1136,1141 **** PyObject * ! PySequence_List(v) ! PyObject *v; { PySequenceMethods *m; --- 1074,1078 ---- PyObject * ! PySequence_List(PyObject *v) { PySequenceMethods *m; *************** *** 1188,1194 **** PyObject * ! PySequence_Fast(v, m) ! PyObject *v; ! const char* m; { if (v == NULL) --- 1125,1129 ---- PyObject * ! PySequence_Fast(PyObject *v, const char *m) { if (v == NULL) *************** *** 1208,1214 **** int ! PySequence_Count(s, o) ! PyObject *s; ! PyObject *o; { int l, i, n, cmp, err; --- 1143,1147 ---- int ! PySequence_Count(PyObject *s, PyObject *o) { int l, i, n, cmp, err; *************** *** 1240,1246 **** int ! PySequence_Contains(w, v) /* v in w */ ! PyObject *w; ! PyObject *v; { int i, cmp; --- 1173,1177 ---- int ! PySequence_Contains(PyObject *w, PyObject *v) /* v in w */ { int i, cmp; *************** *** 1286,1292 **** #undef PySequence_In int ! PySequence_In(w, v) ! PyObject *w; ! PyObject *v; { return PySequence_Contains(w, v); --- 1217,1221 ---- #undef PySequence_In int ! PySequence_In(PyObject *w, PyObject *v) { return PySequence_Contains(w, v); *************** *** 1294,1300 **** int ! PySequence_Index(s, o) ! PyObject *s; ! PyObject *o; { int l, i, cmp, err; --- 1223,1227 ---- int ! PySequence_Index(PyObject *s, PyObject *o) { int l, i, cmp, err; *************** *** 1329,1334 **** int ! PyMapping_Check(o) ! PyObject *o; { return o && o->ob_type->tp_as_mapping; --- 1256,1260 ---- int ! PyMapping_Check(PyObject *o) { return o && o->ob_type->tp_as_mapping; *************** *** 1336,1341 **** int ! PyMapping_Length(o) ! PyObject *o; { PyMappingMethods *m; --- 1262,1266 ---- int ! PyMapping_Length(PyObject *o) { PyMappingMethods *m; *************** *** 1355,1361 **** PyObject * ! PyMapping_GetItemString(o, key) ! PyObject *o; ! char *key; { PyObject *okey, *r; --- 1280,1284 ---- PyObject * ! PyMapping_GetItemString(PyObject *o, char *key) { PyObject *okey, *r; *************** *** 1373,1380 **** int ! PyMapping_SetItemString(o, key, value) ! PyObject *o; ! char *key; ! PyObject *value; { PyObject *okey; --- 1296,1300 ---- int ! PyMapping_SetItemString(PyObject *o, char *key, PyObject *value) { PyObject *okey; *************** *** 1395,1401 **** int ! PyMapping_HasKeyString(o, key) ! PyObject *o; ! char *key; { PyObject *v; --- 1315,1319 ---- int ! PyMapping_HasKeyString(PyObject *o, char *key) { PyObject *v; *************** *** 1411,1417 **** int ! PyMapping_HasKey(o, key) ! PyObject *o; ! PyObject *key; { PyObject *v; --- 1329,1333 ---- int ! PyMapping_HasKey(PyObject *o, PyObject *key) { PyObject *v; *************** *** 1431,1436 **** PyObject * ! PyObject_CallObject(o, a) ! PyObject *o, *a; { PyObject *r; --- 1347,1351 ---- PyObject * ! PyObject_CallObject(PyObject *o, PyObject *a) { PyObject *r; Index: bufferobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/bufferobject.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** bufferobject.c 2000/06/30 23:58:05 2.10 --- bufferobject.c 2000/07/09 04:06:11 2.11 *************** *** 27,35 **** static PyObject * ! _PyBuffer_FromMemory(base, ptr, size, readonly) ! PyObject *base; ! void *ptr; ! int size; ! int readonly; { PyBufferObject * b; --- 27,31 ---- static PyObject * ! _PyBuffer_FromMemory(PyObject *base, void *ptr, int size, int readonly) { PyBufferObject * b; *************** *** 58,67 **** static PyObject * ! _PyBuffer_FromObject(base, offset, size, proc, readonly) ! PyObject *base; ! int offset; ! int size; ! getreadbufferproc proc; ! int readonly; { PyBufferProcs *pb = base->ob_type->tp_as_buffer; --- 54,59 ---- static PyObject * ! _PyBuffer_FromObject(PyObject *base, int offset, int size, ! getreadbufferproc proc, int readonly) { PyBufferProcs *pb = base->ob_type->tp_as_buffer; *************** *** 101,108 **** PyObject * ! PyBuffer_FromObject(base, offset, size) ! PyObject *base; ! int offset; ! int size; { PyBufferProcs *pb = base->ob_type->tp_as_buffer; --- 93,97 ---- PyObject * ! PyBuffer_FromObject(PyObject *base, int offset, int size) { PyBufferProcs *pb = base->ob_type->tp_as_buffer; *************** *** 121,128 **** PyObject * ! PyBuffer_FromReadWriteObject(base, offset, size) ! PyObject *base; ! int offset; ! int size; { PyBufferProcs *pb = base->ob_type->tp_as_buffer; --- 110,114 ---- PyObject * ! PyBuffer_FromReadWriteObject(PyObject *base, int offset, int size) { PyBufferProcs *pb = base->ob_type->tp_as_buffer; *************** *** 142,148 **** PyObject * ! PyBuffer_FromMemory(ptr, size) ! void *ptr; ! int size; { return _PyBuffer_FromMemory(NULL, ptr, size, 1); --- 128,132 ---- PyObject * ! PyBuffer_FromMemory(void *ptr, int size) { return _PyBuffer_FromMemory(NULL, ptr, size, 1); *************** *** 150,156 **** PyObject * ! PyBuffer_FromReadWriteMemory(ptr, size) ! void *ptr; ! int size; { return _PyBuffer_FromMemory(NULL, ptr, size, 0); --- 134,138 ---- PyObject * ! PyBuffer_FromReadWriteMemory(void *ptr, int size) { return _PyBuffer_FromMemory(NULL, ptr, size, 0); *************** *** 158,163 **** PyObject * ! PyBuffer_New(size) ! int size; { PyBufferObject * b; --- 140,144 ---- PyObject * ! PyBuffer_New(int size) { PyBufferObject * b; *************** *** 188,193 **** static void ! buffer_dealloc(self) ! PyBufferObject *self; { Py_XDECREF(self->b_base); --- 169,173 ---- static void ! buffer_dealloc(PyBufferObject *self) { Py_XDECREF(self->b_base); *************** *** 196,202 **** static int ! buffer_compare(self, other) ! PyBufferObject *self; ! PyBufferObject *other; { int len_self = self->b_size; --- 176,180 ---- static int ! buffer_compare(PyBufferObject *self, PyBufferObject *other) { int len_self = self->b_size; *************** *** 213,218 **** static PyObject * ! buffer_repr(self) ! PyBufferObject *self; { char buf[300]; --- 191,195 ---- static PyObject * ! buffer_repr(PyBufferObject *self) { char buf[300]; *************** *** 241,246 **** static long ! buffer_hash(self) ! PyBufferObject *self; { register int len; --- 218,222 ---- static long ! buffer_hash(PyBufferObject *self) { register int len; *************** *** 275,280 **** static PyObject * ! buffer_str(self) ! PyBufferObject *self; { return PyString_FromStringAndSize(self->b_ptr, self->b_size); --- 251,255 ---- static PyObject * ! buffer_str(PyBufferObject *self) { return PyString_FromStringAndSize(self->b_ptr, self->b_size); *************** *** 284,289 **** static int ! buffer_length(self) ! PyBufferObject *self; { return self->b_size; --- 259,263 ---- static int ! buffer_length(PyBufferObject *self) { return self->b_size; *************** *** 291,297 **** static PyObject * ! buffer_concat(self, other) ! PyBufferObject *self; ! PyObject *other; { PyBufferProcs *pb = other->ob_type->tp_as_buffer; --- 265,269 ---- static PyObject * ! buffer_concat(PyBufferObject *self, PyObject *other) { PyBufferProcs *pb = other->ob_type->tp_as_buffer; *************** *** 345,351 **** static PyObject * ! buffer_repeat(self, count) ! PyBufferObject *self; ! int count; { PyObject *ob; --- 317,321 ---- static PyObject * ! buffer_repeat(PyBufferObject *self, int count) { PyObject *ob; *************** *** 374,380 **** static PyObject * ! buffer_item(self, idx) ! PyBufferObject *self; ! int idx; { if ( idx < 0 || idx >= self->b_size ) --- 344,348 ---- static PyObject * ! buffer_item(PyBufferObject *self, int idx) { if ( idx < 0 || idx >= self->b_size ) *************** *** 387,394 **** static PyObject * ! buffer_slice(self, left, right) ! PyBufferObject *self; ! int left; ! int right; { if ( left < 0 ) --- 355,359 ---- static PyObject * ! buffer_slice(PyBufferObject *self, int left, int right) { if ( left < 0 ) *************** *** 411,418 **** static int ! buffer_ass_item(self, idx, other) ! PyBufferObject *self; ! int idx; ! PyObject *other; { PyBufferProcs *pb; --- 376,380 ---- static int ! buffer_ass_item(PyBufferObject *self, int idx, PyObject *other) { PyBufferProcs *pb; *************** *** 461,469 **** static int ! buffer_ass_slice(self, left, right, other) ! PyBufferObject *self; ! int left; ! int right; ! PyObject *other; { PyBufferProcs *pb; --- 423,427 ---- static int ! buffer_ass_slice(PyBufferObject *self, int left, int right, PyObject *other) { PyBufferProcs *pb; *************** *** 522,529 **** static int ! buffer_getreadbuf(self, idx, pp) ! PyBufferObject *self; ! int idx; ! void ** pp; { if ( idx != 0 ) { --- 480,484 ---- static int ! buffer_getreadbuf(PyBufferObject *self, int idx, void **pp) { if ( idx != 0 ) { *************** *** 537,544 **** static int ! buffer_getwritebuf(self, idx, pp) ! PyBufferObject *self; ! int idx; ! void ** pp; { if ( self->b_readonly ) --- 492,496 ---- static int ! buffer_getwritebuf(PyBufferObject *self, int idx, void **pp) { if ( self->b_readonly ) *************** *** 551,557 **** static int ! buffer_getsegcount(self, lenp) ! PyBufferObject *self; ! int *lenp; { if ( lenp ) --- 503,507 ---- static int ! buffer_getsegcount(PyBufferObject *self, int *lenp) { if ( lenp ) *************** *** 561,568 **** static int ! buffer_getcharbuf(self, idx, pp) ! PyBufferObject *self; ! int idx; ! const char ** pp; { if ( idx != 0 ) { --- 511,515 ---- static int ! buffer_getcharbuf(PyBufferObject *self, int idx, const char **pp) { if ( idx != 0 ) { *************** *** 617,619 **** 0, /*tp_doc*/ }; - --- 564,565 ---- Index: classobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/classobject.c,v retrieving revision 2.99 retrieving revision 2.100 diff -C2 -r2.99 -r2.100 *** classobject.c 2000/07/09 03:09:56 2.99 --- classobject.c 2000/07/09 04:06:11 2.100 *************** *** 22,30 **** static PyObject *getattrstr, *setattrstr, *delattrstr; PyObject * ! PyClass_New(bases, dict, name) ! PyObject *bases; /* NULL or tuple of classobjects! */ ! PyObject *dict; ! PyObject *name; { PyClassObject *op, *dummy; --- 22,29 ---- static PyObject *getattrstr, *setattrstr, *delattrstr; + PyObject * ! PyClass_New(PyObject *bases, PyObject *dict, PyObject *name) ! /* bases is NULL or tuple of classobjects! */ { PyClassObject *op, *dummy; *************** *** 119,124 **** static void ! class_dealloc(op) ! PyClassObject *op; { PyObject_GC_Fini(op); --- 118,122 ---- static void ! class_dealloc(PyClassObject *op) { PyObject_GC_Fini(op); *************** *** 134,141 **** static PyObject * ! class_lookup(cp, name, pclass) ! PyClassObject *cp; ! PyObject *name; ! PyClassObject **pclass; { int i, n; --- 132,136 ---- static PyObject * ! class_lookup(PyClassObject *cp, PyObject *name, PyClassObject **pclass) { int i, n; *************** *** 158,164 **** static PyObject * ! class_getattr(op, name) ! register PyClassObject *op; ! PyObject *name; { register PyObject *v; --- 153,157 ---- static PyObject * ! class_getattr(register PyClassObject *op, PyObject *name) { register PyObject *v; *************** *** 204,210 **** static void ! set_slot(slot, v) ! PyObject **slot; ! PyObject *v; { PyObject *temp = *slot; --- 197,201 ---- static void ! set_slot(PyObject **slot, PyObject *v) { PyObject *temp = *slot; *************** *** 215,220 **** static void ! set_attr_slots(c) ! PyClassObject *c; { PyClassObject *dummy; --- 206,210 ---- static void ! set_attr_slots(PyClassObject *c) { PyClassObject *dummy; *************** *** 226,232 **** static char * ! set_dict(c, v) ! PyClassObject *c; ! PyObject *v; { if (v == NULL || !PyDict_Check(v)) --- 216,220 ---- static char * ! set_dict(PyClassObject *c, PyObject *v) { if (v == NULL || !PyDict_Check(v)) *************** *** 238,244 **** static char * ! set_bases(c, v) ! PyClassObject *c; ! PyObject *v; { int i, n; --- 226,230 ---- static char * ! set_bases(PyClassObject *c, PyObject *v) { int i, n; *************** *** 260,266 **** static char * ! set_name(c, v) ! PyClassObject *c; ! PyObject *v; { if (v == NULL || !PyString_Check(v)) --- 246,250 ---- static char * ! set_name(PyClassObject *c, PyObject *v) { if (v == NULL || !PyString_Check(v)) *************** *** 273,280 **** static int ! class_setattr(op, name, v) ! PyClassObject *op; ! PyObject *name; ! PyObject *v; { char *sname; --- 257,261 ---- static int ! class_setattr(PyClassObject *op, PyObject *name, PyObject *v) { char *sname; *************** *** 323,328 **** static PyObject * ! class_repr(op) ! PyClassObject *op; { PyObject *mod = PyDict_GetItemString(op->cl_dict, "__module__"); --- 304,308 ---- static PyObject * ! class_repr(PyClassObject *op) { PyObject *mod = PyDict_GetItemString(op->cl_dict, "__module__"); *************** *** 343,348 **** static PyObject * ! class_str(op) ! PyClassObject *op; { PyObject *mod = PyDict_GetItemString(op->cl_dict, "__module__"); --- 323,327 ---- static PyObject * ! class_str(PyClassObject *op) { PyObject *mod = PyDict_GetItemString(op->cl_dict, "__module__"); *************** *** 434,440 **** int ! PyClass_IsSubclass(class, base) ! PyObject *class; ! PyObject *base; { int i, n; --- 413,417 ---- int ! PyClass_IsSubclass(PyObject *class, PyObject *base) { int i, n; *************** *** 457,464 **** PyObject * ! PyInstance_New(class, arg, kw) ! PyObject *class; ! PyObject *arg; ! PyObject *kw; { register PyInstanceObject *inst; --- 434,438 ---- PyObject * ! PyInstance_New(PyObject *class, PyObject *arg, PyObject *kw) { register PyInstanceObject *inst; *************** *** 518,523 **** static void ! instance_dealloc(inst) ! register PyInstanceObject *inst; { PyObject *error_type, *error_value, *error_traceback; --- 492,496 ---- static void ! instance_dealloc(register PyInstanceObject *inst) { PyObject *error_type, *error_value, *error_traceback; *************** *** 598,604 **** static PyObject * ! instance_getattr1(inst, name) ! register PyInstanceObject *inst; ! PyObject *name; { register PyObject *v; --- 571,575 ---- static PyObject * ! instance_getattr1(register PyInstanceObject *inst, PyObject *name) { register PyObject *v; *************** *** 628,634 **** static PyObject * ! instance_getattr2(inst, name) ! register PyInstanceObject *inst; ! PyObject *name; { register PyObject *v; --- 599,603 ---- static PyObject * ! instance_getattr2(register PyInstanceObject *inst, PyObject *name) { register PyObject *v; *************** *** 665,671 **** static PyObject * ! instance_getattr(inst, name) ! register PyInstanceObject *inst; ! PyObject *name; { register PyObject *func, *res; --- 634,638 ---- static PyObject * ! instance_getattr(register PyInstanceObject *inst, PyObject *name) { register PyObject *func, *res; *************** *** 684,691 **** static int ! instance_setattr1(inst, name, v) ! PyInstanceObject *inst; ! PyObject *name; ! PyObject *v; { if (v == NULL) { --- 651,655 ---- static int ! instance_setattr1(PyInstanceObject *inst, PyObject *name, PyObject *v) { if (v == NULL) { *************** *** 701,708 **** static int ! instance_setattr(inst, name, v) ! PyInstanceObject *inst; ! PyObject *name; ! PyObject *v; { PyObject *func, *args, *res, *tmp; --- 665,669 ---- static int ! instance_setattr(PyInstanceObject *inst, PyObject *name, PyObject *v) { PyObject *func, *args, *res, *tmp; *************** *** 768,773 **** static PyObject * ! instance_repr(inst) ! PyInstanceObject *inst; { PyObject *func; --- 729,733 ---- static PyObject * ! instance_repr(PyInstanceObject *inst) { PyObject *func; *************** *** 804,809 **** static PyObject * ! instance_compare1(inst, other) ! PyObject *inst, *other; { return PyInstance_DoBinOp(inst, other, "__cmp__", "__rcmp__", --- 764,768 ---- static PyObject * ! instance_compare1(PyObject *inst, PyObject *other) { return PyInstance_DoBinOp(inst, other, "__cmp__", "__rcmp__", *************** *** 812,817 **** static int ! instance_compare(inst, other) ! PyObject *inst, *other; { PyObject *result; --- 771,775 ---- static int ! instance_compare(PyObject *inst, PyObject *other) { PyObject *result; *************** *** 836,841 **** static long ! instance_hash(inst) ! PyInstanceObject *inst; { PyObject *func; --- 794,798 ---- static long ! instance_hash(PyInstanceObject *inst) { PyObject *func; *************** *** 899,904 **** static int ! instance_length(inst) ! PyInstanceObject *inst; { PyObject *func; --- 856,860 ---- static int ! instance_length(PyInstanceObject *inst) { PyObject *func; *************** *** 931,937 **** static PyObject * ! instance_subscript(inst, key) ! PyInstanceObject *inst; ! PyObject *key; { PyObject *func; --- 887,891 ---- static PyObject * ! instance_subscript(PyInstanceObject *inst, PyObject *key) { PyObject *func; *************** *** 956,963 **** static int ! instance_ass_subscript(inst, key, value) ! PyInstanceObject*inst; ! PyObject *key; ! PyObject *value; { PyObject *func; --- 910,914 ---- static int ! instance_ass_subscript(PyInstanceObject *inst, PyObject *key, PyObject *value) { PyObject *func; *************** *** 1001,1007 **** static PyObject * ! instance_item(inst, i) ! PyInstanceObject *inst; ! int i; { PyObject *func, *arg, *res; --- 952,956 ---- static PyObject * ! instance_item(PyInstanceObject *inst, int i) { PyObject *func, *arg, *res; *************** *** 1024,1030 **** static PyObject * ! instance_slice(inst, i, j) ! PyInstanceObject *inst; ! int i, j; { PyObject *func, *arg, *res; --- 973,977 ---- static PyObject * ! instance_slice(PyInstanceObject *inst, int i, int j) { PyObject *func, *arg, *res; *************** *** 1048,1055 **** static int ! instance_ass_item(inst, i, item) ! PyInstanceObject *inst; ! int i; ! PyObject *item; { PyObject *func, *arg, *res; --- 995,999 ---- static int ! instance_ass_item(PyInstanceObject *inst, int i, PyObject *item) { PyObject *func, *arg, *res; *************** *** 1085,1092 **** static int ! instance_ass_slice(inst, i, j, value) ! PyInstanceObject *inst; ! int i, j; ! PyObject *value; { PyObject *func, *arg, *res; --- 1029,1033 ---- static int ! instance_ass_slice(PyInstanceObject *inst, int i, int j, PyObject *value) { PyObject *func, *arg, *res; *************** *** 1177,1181 **** } ! static PySequenceMethods instance_as_sequence = { (inquiry)instance_length, /*sq_length*/ 0, /*sq_concat*/ --- 1118,1123 ---- } ! static PySequenceMethods ! instance_as_sequence = { (inquiry)instance_length, /*sq_length*/ 0, /*sq_concat*/ *************** *** 1189,1195 **** static PyObject * ! generic_unary_op(self, methodname) ! PyInstanceObject *self; ! PyObject *methodname; { PyObject *func, *res; --- 1131,1135 ---- static PyObject * ! generic_unary_op(PyInstanceObject *self, PyObject *methodname) { PyObject *func, *res; *************** *** 1204,1209 **** /* Forward */ ! static int halfbinop(PyObject *, PyObject *, char *, PyObject **, ! PyObject * (*)(PyObject *, PyObject *), int); --- 1144,1150 ---- /* Forward */ ! static int ! halfbinop(PyObject *, PyObject *, char *, PyObject **, ! PyObject * (*)(PyObject *, PyObject *), int); *************** *** 1211,1220 **** PyObject * ! PyInstance_DoBinOp(v, w, opname, ropname, thisfunc) ! PyObject *v; ! PyObject *w; ! char *opname; ! char *ropname; ! PyObject * (*thisfunc)(PyObject *, PyObject *); { char buf[256]; --- 1152,1157 ---- PyObject * ! PyInstance_DoBinOp(PyObject *v, PyObject *w, char *opname, char *ropname, ! PyObject * (*thisfunc)(PyObject *, PyObject *)) { char buf[256]; *************** *** 1245,1255 **** static int ! halfbinop(v, w, opname, r_result, thisfunc, swapped) ! PyObject *v; ! PyObject *w; ! char *opname; ! PyObject **r_result; ! PyObject * (*thisfunc)(PyObject *, PyObject *); ! int swapped; { PyObject *func; --- 1182,1187 ---- static int ! halfbinop(PyObject *v, PyObject *w, char *opname, PyObject **r_result, ! PyObject * (*thisfunc)(PyObject *, PyObject *), int swapped) { PyObject *func; *************** *** 1327,1333 **** static int ! instance_coerce(pv, pw) ! PyObject **pv; ! PyObject **pw; { PyObject *v = *pv; --- 1259,1263 ---- static int ! instance_coerce(PyObject **pv, PyObject **pw) { PyObject *v = *pv; *************** *** 1396,1401 **** static int ! instance_nonzero(self) ! PyInstanceObject *self; { PyObject *func, *res; --- 1326,1330 ---- static int ! instance_nonzero(PyInstanceObject *self) { PyObject *func, *res; *************** *** 1445,1452 **** /* This version is for ternary calls only (z != None) */ static PyObject * ! instance_pow(v, w, z) ! PyObject *v; ! PyObject *w; ! PyObject *z; { /* XXX Doesn't do coercions... */ --- 1374,1378 ---- /* This version is for ternary calls only (z != None) */ static PyObject * ! instance_pow(PyObject *v, PyObject *w, PyObject *z) { /* XXX Doesn't do coercions... */ *************** *** 1534,1541 **** PyObject * ! PyMethod_New(func, self, class) ! PyObject *func; ! PyObject *self; ! PyObject *class; { register PyMethodObject *im; --- 1460,1464 ---- PyObject * ! PyMethod_New(PyObject *func, PyObject *self, PyObject *class) { register PyMethodObject *im; *************** *** 1565,1570 **** PyObject * ! PyMethod_Function(im) ! register PyObject *im; { if (!PyMethod_Check(im)) { --- 1488,1492 ---- PyObject * ! PyMethod_Function(register PyObject *im) { if (!PyMethod_Check(im)) { *************** *** 1576,1581 **** PyObject * ! PyMethod_Self(im) ! register PyObject *im; { if (!PyMethod_Check(im)) { --- 1498,1502 ---- PyObject * ! PyMethod_Self(register PyObject *im) { if (!PyMethod_Check(im)) { *************** *** 1587,1592 **** PyObject * ! PyMethod_Class(im) ! register PyObject *im; { if (!PyMethod_Check(im)) { --- 1508,1512 ---- PyObject * ! PyMethod_Class(register PyObject *im) { if (!PyMethod_Check(im)) { *************** *** 1612,1618 **** static PyObject * ! instancemethod_getattr(im, name) ! register PyMethodObject *im; ! PyObject *name; { char *sname = PyString_AsString(name); --- 1532,1536 ---- static PyObject * ! instancemethod_getattr(register PyMethodObject *im, PyObject *name) { char *sname = PyString_AsString(name); *************** *** 1633,1638 **** static void ! instancemethod_dealloc(im) ! register PyMethodObject *im; { PyObject_GC_Fini(im); --- 1551,1555 ---- static void ! instancemethod_dealloc(register PyMethodObject *im) { PyObject_GC_Fini(im); *************** *** 1645,1650 **** static int ! instancemethod_compare(a, b) ! PyMethodObject *a, *b; { if (a->im_self != b->im_self) --- 1562,1566 ---- static int ! instancemethod_compare(PyMethodObject *a, PyMethodObject *b) { if (a->im_self != b->im_self) *************** *** 1654,1659 **** static PyObject * ! instancemethod_repr(a) ! PyMethodObject *a; { char buf[240]; --- 1570,1574 ---- static PyObject * ! instancemethod_repr(PyMethodObject *a) { char buf[240]; *************** *** 1697,1702 **** static long ! instancemethod_hash(a) ! PyMethodObject *a; { long x, y; --- 1612,1616 ---- static long ! instancemethod_hash(PyMethodObject *a) { long x, y; *************** *** 1764,1768 **** void ! PyMethod_Fini() { while (free_list) { --- 1678,1682 ---- void ! PyMethod_Fini(void) { while (free_list) { From python-dev@python.org Sun Jul 9 05:14:44 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 21:14:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects cobject.c,2.11,2.12 Message-ID: <200007090414.VAA19706@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv19698 Modified Files: cobject.c Log Message: ANSI-fication of the source. Make the indentation and brace placement internally consistent. Index: cobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/cobject.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** cobject.c 2000/07/09 03:09:56 2.11 --- cobject.c 2000/07/09 04:14:42 2.12 *************** *** 20,135 **** typedef struct { ! PyObject_HEAD ! void *cobject; ! void *desc; ! void (*destructor)(void *); } PyCObject; PyObject * ! PyCObject_FromVoidPtr(cobj, destr) ! void *cobj; ! void (*destr)(void *); ! { ! PyCObject *self; ! ! self = PyObject_NEW(PyCObject, &PyCObject_Type); ! if (self == NULL) ! return NULL; ! self->cobject=cobj; ! self->destructor=destr; ! self->desc=NULL; ! return (PyObject *)self; } PyObject * ! PyCObject_FromVoidPtrAndDesc(cobj, desc, destr) ! void *cobj; ! void *desc; ! void (*destr)(void *, void *); ! { ! PyCObject *self; ! ! if(!desc) { ! PyErr_SetString(PyExc_TypeError, ! "PyCObject_FromVoidPtrAndDesc called with null description"); ! return NULL; ! } ! ! self = PyObject_NEW(PyCObject, &PyCObject_Type); ! if (self == NULL) ! return NULL; ! self->cobject=cobj; ! self->destructor=(destructor1)destr; ! self->desc=desc; ! return (PyObject *)self; } void * ! PyCObject_AsVoidPtr(self) ! PyObject *self; { ! if(self) ! { ! if(self->ob_type == &PyCObject_Type) ! return ((PyCObject *)self)->cobject; ! PyErr_SetString(PyExc_TypeError, ! "PyCObject_AsVoidPtr with non-C-object"); ! } ! if(! PyErr_Occurred()) ! PyErr_SetString(PyExc_TypeError, ! "PyCObject_AsVoidPtr called with null pointer"); ! return NULL; } void * ! PyCObject_GetDesc(self) ! PyObject *self; { ! if(self) ! { ! if(self->ob_type == &PyCObject_Type) ! return ((PyCObject *)self)->desc; ! PyErr_SetString(PyExc_TypeError, ! "PyCObject_GetDesc with non-C-object"); ! } ! if(! PyErr_Occurred()) ! PyErr_SetString(PyExc_TypeError, ! "PyCObject_GetDesc called with null pointer"); ! return NULL; } void * ! PyCObject_Import(module_name, name) ! char *module_name; ! char *name; ! { ! PyObject *m, *c; ! void *r=NULL; ! ! if((m=PyImport_ImportModule(module_name))) ! { ! if((c=PyObject_GetAttrString(m,name))) ! { ! r=PyCObject_AsVoidPtr(c); ! Py_DECREF(c); } ! Py_DECREF(m); } ! ! return r; } static void ! PyCObject_dealloc(self) ! PyCObject *self; { ! if(self->destructor) ! { ! if(self->desc) ! ((destructor2)(self->destructor))(self->cobject, self->desc); ! else ! (self->destructor)(self->cobject); ! } ! PyObject_DEL(self); } --- 20,122 ---- typedef struct { ! PyObject_HEAD ! void *cobject; ! void *desc; ! void (*destructor)(void *); } PyCObject; PyObject * ! PyCObject_FromVoidPtr(void *cobj, void (*destr)(void *)) ! { ! PyCObject *self; ! ! self = PyObject_NEW(PyCObject, &PyCObject_Type); ! if (self == NULL) ! return NULL; ! self->cobject=cobj; ! self->destructor=destr; ! self->desc=NULL; ! ! return (PyObject *)self; } PyObject * ! PyCObject_FromVoidPtrAndDesc(void *cobj, void *desc, ! void (*destr)(void *, void *)) ! { ! PyCObject *self; ! ! if (!desc) { ! PyErr_SetString(PyExc_TypeError, ! "PyCObject_FromVoidPtrAndDesc called with null" ! " description"); ! return NULL; ! } ! self = PyObject_NEW(PyCObject, &PyCObject_Type); ! if (self == NULL) ! return NULL; ! self->cobject=cobj; ! self->destructor=(destructor1)destr; ! self->desc=desc; ! ! return (PyObject *)self; } void * ! PyCObject_AsVoidPtr(PyObject *self) { ! if (self) { ! if (self->ob_type == &PyCObject_Type) ! return ((PyCObject *)self)->cobject; ! PyErr_SetString(PyExc_TypeError, ! "PyCObject_AsVoidPtr with non-C-object"); ! } ! if (!PyErr_Occurred()) ! PyErr_SetString(PyExc_TypeError, ! "PyCObject_AsVoidPtr called with null pointer"); ! return NULL; } void * ! PyCObject_GetDesc(PyObject *self) { ! if (self) { ! if (self->ob_type == &PyCObject_Type) ! return ((PyCObject *)self)->desc; ! PyErr_SetString(PyExc_TypeError, ! "PyCObject_GetDesc with non-C-object"); ! } ! if (!PyErr_Occurred()) ! PyErr_SetString(PyExc_TypeError, ! "PyCObject_GetDesc called with null pointer"); ! return NULL; } void * ! PyCObject_Import(char *module_name, char *name) ! { ! PyObject *m, *c; ! void *r = NULL; ! ! if ((m = PyImport_ImportModule(module_name))) { ! if ((c = PyObject_GetAttrString(m,name))) { ! r = PyCObject_AsVoidPtr(c); ! Py_DECREF(c); } ! Py_DECREF(m); } ! return r; } static void ! PyCObject_dealloc(PyCObject *self) { ! if (self->destructor) { ! if(self->desc) ! ((destructor2)(self->destructor))(self->cobject, self->desc); ! else ! (self->destructor)(self->cobject); ! } ! PyObject_DEL(self); } *************** *** 141,169 **** provide a way for an extension module to export a C interface to other\n\ extension modules, so that extension modules can use the Python import\n\ ! mechanism to link to one another.\n" ! ; PyTypeObject PyCObject_Type = { ! PyObject_HEAD_INIT(&PyType_Type) ! 0, /*ob_size*/ ! "PyCObject", /*tp_name*/ ! sizeof(PyCObject), /*tp_basicsize*/ ! 0, /*tp_itemsize*/ ! /* methods */ ! (destructor)PyCObject_dealloc, /*tp_dealloc*/ ! (printfunc)0, /*tp_print*/ ! (getattrfunc)0, /*tp_getattr*/ ! (setattrfunc)0, /*tp_setattr*/ ! (cmpfunc)0, /*tp_compare*/ ! (reprfunc)0, /*tp_repr*/ ! 0, /*tp_as_number*/ ! 0, /*tp_as_sequence*/ ! 0, /*tp_as_mapping*/ ! (hashfunc)0, /*tp_hash*/ ! (ternaryfunc)0, /*tp_call*/ ! (reprfunc)0, /*tp_str*/ ! ! /* Space for future expansion */ ! 0L,0L,0L,0L, ! PyCObject_Type__doc__ /* Documentation string */ }; --- 128,155 ---- provide a way for an extension module to export a C interface to other\n\ extension modules, so that extension modules can use the Python import\n\ ! mechanism to link to one another."; PyTypeObject PyCObject_Type = { ! PyObject_HEAD_INIT(&PyType_Type) ! 0, /*ob_size*/ ! "PyCObject", /*tp_name*/ ! sizeof(PyCObject), /*tp_basicsize*/ ! 0, /*tp_itemsize*/ ! /* methods */ ! (destructor)PyCObject_dealloc, /*tp_dealloc*/ ! (printfunc)0, /*tp_print*/ ! (getattrfunc)0, /*tp_getattr*/ ! (setattrfunc)0, /*tp_setattr*/ ! (cmpfunc)0, /*tp_compare*/ ! (reprfunc)0, /*tp_repr*/ ! 0, /*tp_as_number*/ ! 0, /*tp_as_sequence*/ ! 0, /*tp_as_mapping*/ ! (hashfunc)0, /*tp_hash*/ ! (ternaryfunc)0, /*tp_call*/ ! (reprfunc)0, /*tp_str*/ ! ! /* Space for future expansion */ ! 0L,0L,0L,0L, ! PyCObject_Type__doc__ /* Documentation string */ }; From python-dev@python.org Sun Jul 9 05:34:15 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 21:34:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.39,2.40 Message-ID: <200007090434.VAA20481@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv20473 Modified Files: abstract.c Log Message: type_error(): Added "const" to signature to eliminate warning with -Wall. Index: abstract.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v retrieving revision 2.39 retrieving revision 2.40 diff -C2 -r2.39 -r2.40 *** abstract.c 2000/07/09 04:06:11 2.39 --- abstract.c 2000/07/09 04:34:13 2.40 *************** *** 17,21 **** static PyObject * ! type_error(char *msg) { PyErr_SetString(PyExc_TypeError, msg); --- 17,21 ---- static PyObject * ! type_error(const char *msg) { PyErr_SetString(PyExc_TypeError, msg); From python-dev@python.org Sun Jul 9 05:36:07 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 21:36:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects complexobject.c,2.27,2.28 Message-ID: <200007090436.VAA20540@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv20533 Modified Files: complexobject.c Log Message: ANSI-fication of the sources. Index: complexobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/complexobject.c,v retrieving revision 2.27 retrieving revision 2.28 diff -C2 -r2.27 -r2.28 *** complexobject.c 2000/06/30 23:58:05 2.27 --- complexobject.c 2000/07/09 04:36:04 2.28 *************** *** 29,34 **** static Py_complex c_1 = {1., 0.}; ! Py_complex c_sum(a,b) ! Py_complex a,b; { Py_complex r; --- 29,33 ---- static Py_complex c_1 = {1., 0.}; ! Py_complex c_sum(Py_complex a, Py_complex b) { Py_complex r; *************** *** 38,43 **** } ! Py_complex c_diff(a,b) ! Py_complex a,b; { Py_complex r; --- 37,41 ---- } ! Py_complex c_diff(Py_complex a, Py_complex b) { Py_complex r; *************** *** 47,52 **** } ! Py_complex c_neg(a) ! Py_complex a; { Py_complex r; --- 45,49 ---- } ! Py_complex c_neg(Py_complex a) { Py_complex r; *************** *** 56,61 **** } ! Py_complex c_prod(a,b) ! Py_complex a,b; { Py_complex r; --- 53,57 ---- } ! Py_complex c_prod(Py_complex a, Py_complex b) { Py_complex r; *************** *** 65,70 **** } ! Py_complex c_quot(a,b) ! Py_complex a,b; { Py_complex r; --- 61,65 ---- } ! Py_complex c_quot(Py_complex a, Py_complex b) { Py_complex r; *************** *** 77,82 **** } ! Py_complex c_pow(a,b) ! Py_complex a,b; { Py_complex r; --- 72,76 ---- } ! Py_complex c_pow(Py_complex a, Py_complex b) { Py_complex r; *************** *** 107,113 **** } ! static Py_complex c_powu(x, n) ! Py_complex x; ! long n; { Py_complex r, p; --- 101,105 ---- } ! static Py_complex c_powu(Py_complex x, long n) { Py_complex r, p; *************** *** 124,130 **** } ! static Py_complex c_powi(x, n) ! Py_complex x; ! long n; { Py_complex cn; --- 116,120 ---- } ! static Py_complex c_powi(Py_complex x, long n) { Py_complex cn; *************** *** 143,148 **** PyObject * ! PyComplex_FromCComplex(cval) ! Py_complex cval; { register PyComplexObject *op; --- 133,137 ---- PyObject * ! PyComplex_FromCComplex(Py_complex cval) { register PyComplexObject *op; *************** *** 158,163 **** PyObject * ! PyComplex_FromDoubles(real, imag) ! double real, imag; { Py_complex c; --- 147,151 ---- PyObject * ! PyComplex_FromDoubles(double real, double imag) { Py_complex c; *************** *** 168,177 **** double ! PyComplex_RealAsDouble(op) ! PyObject *op; { if (PyComplex_Check(op)) { return ((PyComplexObject *)op)->cval.real; ! } else { return PyFloat_AsDouble(op); } --- 156,165 ---- double ! PyComplex_RealAsDouble(PyObject *op) { if (PyComplex_Check(op)) { return ((PyComplexObject *)op)->cval.real; ! } ! else { return PyFloat_AsDouble(op); } *************** *** 179,188 **** double ! PyComplex_ImagAsDouble(op) ! PyObject *op; { if (PyComplex_Check(op)) { return ((PyComplexObject *)op)->cval.imag; ! } else { return 0.0; } --- 167,176 ---- double ! PyComplex_ImagAsDouble(PyObject *op) { if (PyComplex_Check(op)) { return ((PyComplexObject *)op)->cval.imag; ! } ! else { return 0.0; } *************** *** 190,200 **** Py_complex ! PyComplex_AsCComplex(op) ! PyObject *op; { Py_complex cv; if (PyComplex_Check(op)) { return ((PyComplexObject *)op)->cval; ! } else { cv.real = PyFloat_AsDouble(op); cv.imag = 0.; --- 178,188 ---- Py_complex ! PyComplex_AsCComplex(PyObject *op) { Py_complex cv; if (PyComplex_Check(op)) { return ((PyComplexObject *)op)->cval; ! } ! else { cv.real = PyFloat_AsDouble(op); cv.imag = 0.; *************** *** 204,209 **** static void ! complex_dealloc(op) ! PyObject *op; { PyObject_DEL(op); --- 192,196 ---- static void ! complex_dealloc(PyObject *op) { PyObject_DEL(op); *************** *** 212,218 **** static void ! complex_buf_repr(buf, v) ! char *buf; ! PyComplexObject *v; { if (v->cval.real == 0.) --- 199,203 ---- static void ! complex_buf_repr(char *buf, PyComplexObject *v) { if (v->cval.real == 0.) *************** *** 223,230 **** static int ! complex_print(v, fp, flags) ! PyComplexObject *v; ! FILE *fp; ! int flags; /* Not used but required by interface */ { char buf[100]; --- 208,213 ---- static int ! complex_print(PyComplexObject *v, FILE *fp, int flags) ! /* flags -- not used but required by interface */ { char buf[100]; *************** *** 235,240 **** static PyObject * ! complex_repr(v) ! PyComplexObject *v; { char buf[100]; --- 218,222 ---- static PyObject * ! complex_repr(PyComplexObject *v) { char buf[100]; *************** *** 244,266 **** static int ! complex_compare(v, w) ! PyComplexObject *v, *w; { ! /* Note: "greater" and "smaller" have no meaning for complex numbers, ! but Python requires that they be defined nevertheless. */ Py_complex i, j; i = v->cval; j = w->cval; if (i.real == j.real && i.imag == j.imag) ! return 0; else if (i.real != j.real) ! return (i.real < j.real) ? -1 : 1; else ! return (i.imag < j.imag) ? -1 : 1; } static long ! complex_hash(v) ! PyComplexObject *v; { double intpart, fractpart; --- 226,246 ---- static int ! complex_compare(PyComplexObject *v, PyComplexObject *w) { ! /* Note: "greater" and "smaller" have no meaning for complex numbers, ! but Python requires that they be defined nevertheless. */ Py_complex i, j; i = v->cval; j = w->cval; if (i.real == j.real && i.imag == j.imag) ! return 0; else if (i.real != j.real) ! return (i.real < j.real) ? -1 : 1; else ! return (i.imag < j.imag) ? -1 : 1; } static long ! complex_hash(PyComplexObject *v) { double intpart, fractpart; *************** *** 313,319 **** static PyObject * ! complex_add(v, w) ! PyComplexObject *v; ! PyComplexObject *w; { Py_complex result; --- 293,297 ---- static PyObject * ! complex_add(PyComplexObject *v, PyComplexObject *w) { Py_complex result; *************** *** 325,331 **** static PyObject * ! complex_sub(v, w) ! PyComplexObject *v; ! PyComplexObject *w; { Py_complex result; --- 303,307 ---- static PyObject * ! complex_sub(PyComplexObject *v, PyComplexObject *w) { Py_complex result; *************** *** 337,343 **** static PyObject * ! complex_mul(v, w) ! PyComplexObject *v; ! PyComplexObject *w; { Py_complex result; --- 313,317 ---- static PyObject * ! complex_mul(PyComplexObject *v, PyComplexObject *w) { Py_complex result; *************** *** 349,355 **** static PyObject * ! complex_div(v, w) ! PyComplexObject *v; ! PyComplexObject *w; { Py_complex quot; --- 323,327 ---- static PyObject * ! complex_div(PyComplexObject *v, PyComplexObject *w) { Py_complex quot; *************** *** 366,372 **** static PyObject * ! complex_remainder(v, w) ! PyComplexObject *v; ! PyComplexObject *w; { Py_complex div, mod; --- 338,342 ---- static PyObject * ! complex_remainder(PyComplexObject *v, PyComplexObject *w) { Py_complex div, mod; *************** *** 386,392 **** static PyObject * ! complex_divmod(v, w) ! PyComplexObject *v; ! PyComplexObject *w; { Py_complex div, mod; --- 356,360 ---- static PyObject * ! complex_divmod(PyComplexObject *v, PyComplexObject *w) { Py_complex div, mod; *************** *** 410,417 **** static PyObject * ! complex_pow(v, w, z) ! PyComplexObject *v; ! PyObject *w; ! PyComplexObject *z; { Py_complex p; --- 378,382 ---- static PyObject * ! complex_pow(PyComplexObject *v, PyObject *w, PyComplexObject *z) { Py_complex p; *************** *** 423,427 **** return NULL; } - PyFPE_START_PROTECT("complex_pow", return 0) errno = 0; --- 388,391 ---- *************** *** 439,449 **** return NULL; } - return PyComplex_FromCComplex(p); } static PyObject * ! complex_neg(v) ! PyComplexObject *v; { Py_complex neg; --- 403,411 ---- return NULL; } return PyComplex_FromCComplex(p); } static PyObject * ! complex_neg(PyComplexObject *v) { Py_complex neg; *************** *** 454,459 **** static PyObject * ! complex_pos(v) ! PyComplexObject *v; { Py_INCREF(v); --- 416,420 ---- static PyObject * ! complex_pos(PyComplexObject *v) { Py_INCREF(v); *************** *** 462,467 **** static PyObject * ! complex_abs(v) ! PyComplexObject *v; { double result; --- 423,427 ---- static PyObject * ! complex_abs(PyComplexObject *v) { double result; *************** *** 473,478 **** static int ! complex_nonzero(v) ! PyComplexObject *v; { return v->cval.real != 0.0 || v->cval.imag != 0.0; --- 433,437 ---- static int ! complex_nonzero(PyComplexObject *v) { return v->cval.real != 0.0 || v->cval.imag != 0.0; *************** *** 480,486 **** static int ! complex_coerce(pv, pw) ! PyObject **pv; ! PyObject **pw; { Py_complex cval; --- 439,443 ---- static int ! complex_coerce(PyObject **pv, PyObject **pw) { Py_complex cval; *************** *** 508,513 **** static PyObject * ! complex_int(v) ! PyObject *v; { PyErr_SetString(PyExc_TypeError, --- 465,469 ---- static PyObject * ! complex_int(PyObject *v) { PyErr_SetString(PyExc_TypeError, *************** *** 517,522 **** static PyObject * ! complex_long(v) ! PyObject *v; { PyErr_SetString(PyExc_TypeError, --- 473,477 ---- static PyObject * ! complex_long(PyObject *v) { PyErr_SetString(PyExc_TypeError, *************** *** 526,531 **** static PyObject * ! complex_float(v) ! PyObject *v; { PyErr_SetString(PyExc_TypeError, --- 481,485 ---- static PyObject * ! complex_float(PyObject *v) { PyErr_SetString(PyExc_TypeError, *************** *** 535,541 **** static PyObject * ! complex_conjugate(self, args) ! PyObject *self; ! PyObject *args; { Py_complex c; --- 489,493 ---- static PyObject * ! complex_conjugate(PyObject *self, PyObject *args) { Py_complex c; *************** *** 554,560 **** static PyObject * ! complex_getattr(self, name) ! PyComplexObject *self; ! char *name; { if (strcmp(name, "real") == 0) --- 506,510 ---- static PyObject * ! complex_getattr(PyComplexObject *self, char *name) { if (strcmp(name, "real") == 0) From python-dev@python.org Sun Jul 9 05:56:27 2000 From: python-dev@python.org (Barry Warsaw) Date: Sat, 8 Jul 2000 21:56:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python exceptions.c,1.4,1.5 Message-ID: <200007090456.VAA21329@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv21321 Modified Files: exceptions.c Log Message: EnvironmentError__init__(): The two case clauses were missing `break's. This first missing break caused a memory leak when case 3 fell through case 2 in the following example: import os os.chmod('/missing', 0600) Index: exceptions.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** exceptions.c 2000/07/01 04:45:52 1.4 --- exceptions.c 2000/07/09 04:56:25 1.5 *************** *** 441,446 **** switch (PySequence_Length(args)) { case 3: ! /* open() errors give third argument which is the filename. But so ! * common in-place unpacking doesn't break, e.g.: * * except IOError, (errno, strerror): --- 441,448 ---- switch (PySequence_Length(args)) { case 3: ! /* Where a function has a single filename, such as open() or some ! * of the os module functions, PyErr_SetFromErrnoWithFilename() is ! * called, giving a third argument which is the filename. But, so ! * that old code using in-place unpacking doesn't break, e.g.: * * except IOError, (errno, strerror): *************** *** 466,472 **** if (!subslice || PyObject_SetAttrString(self, "args", subslice)) goto finally; case 2: ! /* common case: PyErr_SetFromErrno() */ item0 = PySequence_GetItem(args, 0); item1 = PySequence_GetItem(args, 1); --- 468,477 ---- if (!subslice || PyObject_SetAttrString(self, "args", subslice)) goto finally; + break; case 2: ! /* Used when PyErr_SetFromErrno() is called and no filename ! * argument is given. ! */ item0 = PySequence_GetItem(args, 0); item1 = PySequence_GetItem(args, 1); *************** *** 479,482 **** --- 484,488 ---- goto finally; } + break; } From python-dev@python.org Sun Jul 9 06:02:21 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 22:02:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects fileobject.c,2.79,2.80 floatobject.c,2.62,2.63 Message-ID: <200007090502.WAA28233@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv28114 Modified Files: fileobject.c floatobject.c Log Message: ANSI-fication of the sources. Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.79 retrieving revision 2.80 diff -C2 -r2.79 -r2.80 *** fileobject.c 2000/07/09 03:09:56 2.79 --- fileobject.c 2000/07/09 05:02:18 2.80 *************** *** 77,82 **** FILE * ! PyFile_AsFile(f) ! PyObject *f; { if (f == NULL || !PyFile_Check(f)) --- 77,81 ---- FILE * ! PyFile_AsFile(PyObject *f) { if (f == NULL || !PyFile_Check(f)) *************** *** 87,92 **** PyObject * ! PyFile_Name(f) ! PyObject *f; { if (f == NULL || !PyFile_Check(f)) --- 86,90 ---- PyObject * ! PyFile_Name(PyObject *f) { if (f == NULL || !PyFile_Check(f)) *************** *** 97,105 **** PyObject * ! PyFile_FromFile(fp, name, mode, close) ! FILE *fp; ! char *name; ! char *mode; ! int (*close)(FILE *); { PyFileObject *f = PyObject_NEW(PyFileObject, &PyFile_Type); --- 95,99 ---- PyObject * ! PyFile_FromFile(FILE *fp, char *name, char *mode, int (*close)(FILE *)) { PyFileObject *f = PyObject_NEW(PyFileObject, &PyFile_Type); *************** *** 124,129 **** PyObject * ! PyFile_FromString(name, mode) ! char *name, *mode; { extern int fclose(FILE *); --- 118,122 ---- PyObject * ! PyFile_FromString(char *name, char *mode) { extern int fclose(FILE *); *************** *** 161,167 **** void ! PyFile_SetBufSize(f, bufsize) ! PyObject *f; ! int bufsize; { if (bufsize >= 0) { --- 154,158 ---- void ! PyFile_SetBufSize(PyObject *f, int bufsize) { if (bufsize >= 0) { *************** *** 189,193 **** static PyObject * ! err_closed() { PyErr_SetString(PyExc_ValueError, "I/O operation on closed file"); --- 180,184 ---- static PyObject * ! err_closed(void) { PyErr_SetString(PyExc_ValueError, "I/O operation on closed file"); *************** *** 198,203 **** static void ! file_dealloc(f) ! PyFileObject *f; { if (f->f_fp != NULL && f->f_close != NULL) { --- 189,193 ---- static void ! file_dealloc(PyFileObject *f) { if (f->f_fp != NULL && f->f_close != NULL) { *************** *** 216,221 **** static PyObject * ! file_repr(f) ! PyFileObject *f; { char buf[300]; --- 206,210 ---- static PyObject * ! file_repr(PyFileObject *f) { char buf[300]; *************** *** 229,235 **** static PyObject * ! file_close(f, args) ! PyFileObject *f; ! PyObject *args; { int sts = 0; --- 218,222 ---- static PyObject * ! file_close(PyFileObject *f, PyObject *args) { int sts = 0; *************** *** 254,260 **** static PyObject * ! file_seek(f, args) ! PyFileObject *f; ! PyObject *args; { int whence; --- 241,245 ---- static PyObject * ! file_seek(PyFileObject *f, PyObject *args) { int whence; *************** *** 297,303 **** #ifdef HAVE_FTRUNCATE static PyObject * ! file_truncate(f, args) ! PyFileObject *f; ! PyObject *args; { int ret; --- 282,286 ---- #ifdef HAVE_FTRUNCATE static PyObject * ! file_truncate(PyFileObject *f, PyObject *args) { int ret; *************** *** 359,365 **** static PyObject * ! file_tell(f, args) ! PyFileObject *f; ! PyObject *args; { off_t offset; --- 342,346 ---- static PyObject * ! file_tell(PyFileObject *f, PyObject *args) { off_t offset; *************** *** 391,397 **** static PyObject * ! file_fileno(f, args) ! PyFileObject *f; ! PyObject *args; { if (f->f_fp == NULL) --- 372,376 ---- static PyObject * ! file_fileno(PyFileObject *f, PyObject *args) { if (f->f_fp == NULL) *************** *** 403,409 **** static PyObject * ! file_flush(f, args) ! PyFileObject *f; ! PyObject *args; { int res; --- 382,386 ---- static PyObject * ! file_flush(PyFileObject *f, PyObject *args) { int res; *************** *** 427,433 **** static PyObject * ! file_isatty(f, args) ! PyFileObject *f; ! PyObject *args; { long res; --- 404,408 ---- static PyObject * ! file_isatty(PyFileObject *f, PyObject *args) { long res; *************** *** 456,462 **** static size_t ! new_buffersize(f, currentsize) ! PyFileObject *f; ! size_t currentsize; { #ifdef HAVE_FSTAT --- 431,435 ---- static size_t ! new_buffersize(PyFileObject *f, size_t currentsize) { #ifdef HAVE_FSTAT *************** *** 496,502 **** static PyObject * ! file_read(f, args) ! PyFileObject *f; ! PyObject *args; { long bytesrequested = -1; --- 469,473 ---- static PyObject * ! file_read(PyFileObject *f, PyObject *args) { long bytesrequested = -1; *************** *** 545,551 **** static PyObject * ! file_readinto(f, args) ! PyFileObject *f; ! PyObject *args; { char *ptr; --- 516,520 ---- static PyObject * ! file_readinto(PyFileObject *f, PyObject *args) { char *ptr; *************** *** 584,590 **** static PyObject * ! get_line(f, n) ! PyFileObject *f; ! int n; { register FILE *fp; --- 553,557 ---- static PyObject * ! get_line(PyFileObject *f, int n) { register FILE *fp; *************** *** 649,655 **** PyObject * ! PyFile_GetLine(f, n) ! PyObject *f; ! int n; { if (f == NULL) { --- 616,620 ---- PyObject * ! PyFile_GetLine(PyObject *f, int n) { if (f == NULL) { *************** *** 712,718 **** static PyObject * ! file_readline(f, args) ! PyFileObject *f; ! PyObject *args; { int n = -1; --- 677,681 ---- static PyObject * ! file_readline(PyFileObject *f, PyObject *args) { int n = -1; *************** *** 730,736 **** static PyObject * ! file_readlines(f, args) ! PyFileObject *f; ! PyObject *args; { long sizehint = 0; --- 693,697 ---- static PyObject * ! file_readlines(PyFileObject *f, PyObject *args) { long sizehint = 0; *************** *** 843,849 **** static PyObject * ! file_write(f, args) ! PyFileObject *f; ! PyObject *args; { char *s; --- 804,808 ---- static PyObject * ! file_write(PyFileObject *f, PyObject *args) { char *s; *************** *** 868,874 **** static PyObject * ! file_writelines(f, args) ! PyFileObject *f; ! PyObject *args; { #define CHUNKSIZE 1000 --- 827,831 ---- static PyObject * ! file_writelines(PyFileObject *f, PyObject *args) { #define CHUNKSIZE 1000 *************** *** 993,999 **** static PyObject * ! file_getattr(f, name) ! PyFileObject *f; ! char *name; { PyObject *res; --- 950,954 ---- static PyObject * ! file_getattr(PyFileObject *f, char *name) { PyObject *res; *************** *** 1009,1016 **** static int ! file_setattr(f, name, v) ! PyFileObject *f; ! char *name; ! PyObject *v; { if (v == NULL) { --- 964,968 ---- static int ! file_setattr(PyFileObject *f, char *name, PyObject *v) { if (v == NULL) { *************** *** 1039,1045 **** int ! PyFile_SoftSpace(f, newflag) ! PyObject *f; ! int newflag; { int oldflag = 0; --- 991,995 ---- int ! PyFile_SoftSpace(PyObject *f, int newflag) { int oldflag = 0; *************** *** 1076,1083 **** int ! PyFile_WriteObject(v, f, flags) ! PyObject *v; ! PyObject *f; ! int flags; { PyObject *writer, *value, *args, *result; --- 1026,1030 ---- int ! PyFile_WriteObject(PyObject *v, PyObject *f, int flags) { PyObject *writer, *value, *args, *result; *************** *** 1122,1132 **** int ! PyFile_WriteString(s, f) ! char *s; ! PyObject *f; { if (f == NULL) { /* Should be caused by a pre-existing error */ ! if(!PyErr_Occurred()) PyErr_SetString(PyExc_SystemError, "null file for PyFile_WriteString"); --- 1069,1077 ---- int ! PyFile_WriteString(char *s, PyObject *f) { if (f == NULL) { /* Should be caused by a pre-existing error */ ! if (!PyErr_Occurred()) PyErr_SetString(PyExc_SystemError, "null file for PyFile_WriteString"); Index: floatobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v retrieving revision 2.62 retrieving revision 2.63 diff -C2 -r2.62 -r2.63 *** floatobject.c 2000/07/09 03:09:56 2.62 --- floatobject.c 2000/07/09 05:02:18 2.63 *************** *** 95,99 **** static PyFloatObject * ! fill_free_list() { PyFloatObject *p, *q; --- 95,99 ---- static PyFloatObject * ! fill_free_list(void) { PyFloatObject *p, *q; *************** *** 134,140 **** PyObject * ! PyFloat_FromString(v, pend) ! PyObject *v; ! char **pend; { extern double strtod(const char *, char **); --- 134,138 ---- PyObject * ! PyFloat_FromString(PyObject *v, char **pend) { extern double strtod(const char *, char **); *************** *** 208,213 **** static void ! float_dealloc(op) ! PyFloatObject *op; { op->ob_type = (struct _typeobject *)free_list; --- 206,210 ---- static void ! float_dealloc(PyFloatObject *op) { op->ob_type = (struct _typeobject *)free_list; *************** *** 216,221 **** double ! PyFloat_AsDouble(op) ! PyObject *op; { PyNumberMethods *nb; --- 213,217 ---- double ! PyFloat_AsDouble(PyObject *op) { PyNumberMethods *nb; *************** *** 250,257 **** void ! PyFloat_AsStringEx(buf, v, precision) ! char *buf; ! PyFloatObject *v; ! int precision; { register char *cp; --- 246,250 ---- void ! PyFloat_AsStringEx(char *buf, PyFloatObject *v, int precision) { register char *cp; *************** *** 296,302 **** void ! PyFloat_AsString(buf, v) ! char *buf; ! PyFloatObject *v; { PyFloat_AsStringEx(buf, v, PREC_STR); --- 289,293 ---- void ! PyFloat_AsString(char *buf, PyFloatObject *v) { PyFloat_AsStringEx(buf, v, PREC_STR); *************** *** 305,312 **** /* ARGSUSED */ static int ! float_print(v, fp, flags) ! PyFloatObject *v; ! FILE *fp; ! int flags; /* Not used but required by interface */ { char buf[100]; --- 296,301 ---- /* ARGSUSED */ static int ! float_print(PyFloatObject *v, FILE *fp, int flags) ! /* flags -- not used but required by interface */ { char buf[100]; *************** *** 317,322 **** static PyObject * ! float_repr(v) ! PyFloatObject *v; { char buf[100]; --- 306,310 ---- static PyObject * ! float_repr(PyFloatObject *v) { char buf[100]; *************** *** 326,331 **** static PyObject * ! float_str(v) ! PyFloatObject *v; { char buf[100]; --- 314,318 ---- static PyObject * ! float_str(PyFloatObject *v) { char buf[100]; *************** *** 335,340 **** static int ! float_compare(v, w) ! PyFloatObject *v, *w; { double i = v->ob_fval; --- 322,326 ---- static int ! float_compare(PyFloatObject *v, PyFloatObject *w) { double i = v->ob_fval; *************** *** 345,350 **** static long ! float_hash(v) ! PyFloatObject *v; { double intpart, fractpart; --- 331,335 ---- static long ! float_hash(PyFloatObject *v) { double intpart, fractpart; *************** *** 389,395 **** static PyObject * ! float_add(v, w) ! PyFloatObject *v; ! PyFloatObject *w; { double result; --- 374,378 ---- static PyObject * ! float_add(PyFloatObject *v, PyFloatObject *w) { double result; *************** *** 401,407 **** static PyObject * ! float_sub(v, w) ! PyFloatObject *v; ! PyFloatObject *w; { double result; --- 384,388 ---- static PyObject * ! float_sub(PyFloatObject *v, PyFloatObject *w) { double result; *************** *** 413,419 **** static PyObject * ! float_mul(v, w) ! PyFloatObject *v; ! PyFloatObject *w; { double result; --- 394,398 ---- static PyObject * ! float_mul(PyFloatObject *v, PyFloatObject *w) { double result; *************** *** 426,432 **** static PyObject * ! float_div(v, w) ! PyFloatObject *v; ! PyFloatObject *w; { double result; --- 405,409 ---- static PyObject * ! float_div(PyFloatObject *v, PyFloatObject *w) { double result; *************** *** 442,448 **** static PyObject * ! float_rem(v, w) ! PyFloatObject *v; ! PyFloatObject *w; { double vx, wx; --- 419,423 ---- static PyObject * ! float_rem(PyFloatObject *v, PyFloatObject *w) { double vx, wx; *************** *** 466,472 **** static PyObject * ! float_divmod(v, w) ! PyFloatObject *v; ! PyFloatObject *w; { double vx, wx; --- 441,445 ---- static PyObject * ! float_divmod(PyFloatObject *v, PyFloatObject *w) { double vx, wx; *************** *** 501,507 **** } ! static double powu(x, n) ! double x; ! long n; { double r = 1.; --- 474,478 ---- } ! static double powu(double x, long n) { double r = 1.; *************** *** 518,525 **** static PyObject * ! float_pow(v, w, z) ! PyFloatObject *v; ! PyObject *w; ! PyFloatObject *z; { double iv, iw, ix; --- 489,493 ---- static PyObject * ! float_pow(PyFloatObject *v, PyObject *w, PyFloatObject *z) { double iv, iw, ix; *************** *** 592,597 **** static PyObject * ! float_neg(v) ! PyFloatObject *v; { return PyFloat_FromDouble(-v->ob_fval); --- 560,564 ---- static PyObject * ! float_neg(PyFloatObject *v) { return PyFloat_FromDouble(-v->ob_fval); *************** *** 599,604 **** static PyObject * ! float_pos(v) ! PyFloatObject *v; { Py_INCREF(v); --- 566,570 ---- static PyObject * ! float_pos(PyFloatObject *v) { Py_INCREF(v); *************** *** 607,612 **** static PyObject * ! float_abs(v) ! PyFloatObject *v; { if (v->ob_fval < 0) --- 573,577 ---- static PyObject * ! float_abs(PyFloatObject *v) { if (v->ob_fval < 0) *************** *** 617,622 **** static int ! float_nonzero(v) ! PyFloatObject *v; { return v->ob_fval != 0.0; --- 582,586 ---- static int ! float_nonzero(PyFloatObject *v) { return v->ob_fval != 0.0; *************** *** 624,630 **** static int ! float_coerce(pv, pw) ! PyObject **pv; ! PyObject **pw; { if (PyInt_Check(*pw)) { --- 588,592 ---- static int ! float_coerce(PyObject **pv, PyObject **pw) { if (PyInt_Check(*pw)) { *************** *** 643,648 **** static PyObject * ! float_int(v) ! PyObject *v; { double x = PyFloat_AsDouble(v); --- 605,609 ---- static PyObject * ! float_int(PyObject *v) { double x = PyFloat_AsDouble(v); *************** *** 657,662 **** static PyObject * ! float_long(v) ! PyObject *v; { double x = PyFloat_AsDouble(v); --- 618,622 ---- static PyObject * ! float_long(PyObject *v) { double x = PyFloat_AsDouble(v); *************** *** 665,670 **** static PyObject * ! float_float(v) ! PyObject *v; { Py_INCREF(v); --- 625,629 ---- static PyObject * ! float_float(PyObject *v) { Py_INCREF(v); *************** *** 720,724 **** void ! PyFloat_Fini() { PyFloatObject *p; --- 679,683 ---- void ! PyFloat_Fini(void) { PyFloatObject *p; From python-dev@python.org Sun Jul 9 06:31:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 22:31:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects floatobject.c,2.63,2.64 Message-ID: <200007090531.WAA29792@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv29782 Modified Files: floatobject.c Log Message: Remove legacy use of __SC__; no longer needed now that ANSI source is the standard for Python implementation. Index: floatobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v retrieving revision 2.63 retrieving revision 2.64 diff -C2 -r2.63 -r2.64 *** floatobject.c 2000/07/09 05:02:18 2.63 --- floatobject.c 2000/07/09 05:31:24 2.64 *************** *** 113,122 **** PyObject * - #ifdef __SC__ PyFloat_FromDouble(double fval) - #else - PyFloat_FromDouble(fval) - double fval; - #endif { register PyFloatObject *op; --- 113,117 ---- From python-dev@python.org Sun Jul 9 06:40:58 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 22:40:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects frameobject.c,2.41,2.42 Message-ID: <200007090540.WAA30134@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv30126 Modified Files: frameobject.c Log Message: ANSI-fication of the sources. Index: frameobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/frameobject.c,v retrieving revision 2.41 retrieving revision 2.42 diff -C2 -r2.41 -r2.42 *** frameobject.c 2000/06/30 23:58:05 2.41 --- frameobject.c 2000/07/09 05:40:56 2.42 *************** *** 37,43 **** static PyObject * ! frame_getattr(f, name) ! PyFrameObject *f; ! char *name; { if (strcmp(name, "f_locals") == 0) --- 37,41 ---- static PyObject * ! frame_getattr(PyFrameObject *f, char *name) { if (strcmp(name, "f_locals") == 0) *************** *** 47,54 **** static int ! frame_setattr(f, name, value) ! PyFrameObject *f; ! char *name; ! PyObject *value; { return PyMember_Set((char *)f, frame_memberlist, name, value); --- 45,49 ---- static int ! frame_setattr(PyFrameObject *f, char *name, PyObject *value) { return PyMember_Set((char *)f, frame_memberlist, name, value); *************** *** 77,82 **** static void ! frame_dealloc(f) ! PyFrameObject *f; { int i; --- 72,76 ---- static void ! frame_dealloc(PyFrameObject *f) { int i; *************** *** 122,130 **** PyFrameObject * ! PyFrame_New(tstate, code, globals, locals) ! PyThreadState *tstate; ! PyCodeObject *code; ! PyObject *globals; ! PyObject *locals; { PyFrameObject *back = tstate->frame; --- 116,121 ---- PyFrameObject * ! PyFrame_New(PyThreadState *tstate, PyCodeObject *code, ! PyObject *globals, PyObject *locals) { PyFrameObject *back = tstate->frame; *************** *** 239,247 **** void ! PyFrame_BlockSetup(f, type, handler, level) ! PyFrameObject *f; ! int type; ! int handler; ! int level; { PyTryBlock *b; --- 230,234 ---- void ! PyFrame_BlockSetup(PyFrameObject *f, int type, int handler, int level) { PyTryBlock *b; *************** *** 255,260 **** PyTryBlock * ! PyFrame_BlockPop(f) ! PyFrameObject *f; { PyTryBlock *b; --- 242,246 ---- PyTryBlock * ! PyFrame_BlockPop(PyFrameObject *f) { PyTryBlock *b; *************** *** 268,273 **** void ! PyFrame_FastToLocals(f) ! PyFrameObject *f; { /* Merge fast locals into f->f_locals */ --- 254,258 ---- void ! PyFrame_FastToLocals(PyFrameObject *f) { /* Merge fast locals into f->f_locals */ *************** *** 313,319 **** void ! PyFrame_LocalsToFast(f, clear) ! PyFrameObject *f; ! int clear; { /* Merge f->f_locals into fast locals */ --- 298,302 ---- void ! PyFrame_LocalsToFast(PyFrameObject *f, int clear) { /* Merge f->f_locals into fast locals */ *************** *** 350,354 **** void ! PyFrame_Fini() { while (free_list != NULL) { --- 333,337 ---- void ! PyFrame_Fini(void) { while (free_list != NULL) { From python-dev@python.org Sun Jul 9 07:03:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 23:03:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects funcobject.c,2.28,2.29 methodobject.c,2.31,2.32 moduleobject.c,2.27,2.28 Message-ID: <200007090603.XAA05112@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv5102 Modified Files: funcobject.c methodobject.c moduleobject.c Log Message: ANSI-fication of the sources. Index: funcobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/funcobject.c,v retrieving revision 2.28 retrieving revision 2.29 diff -C2 -r2.28 -r2.29 *** funcobject.c 2000/07/01 01:00:38 2.28 --- funcobject.c 2000/07/09 06:03:25 2.29 *************** *** 16,22 **** PyObject * ! PyFunction_New(code, globals) ! PyObject *code; ! PyObject *globals; { PyFunctionObject *op = PyObject_NEW(PyFunctionObject, --- 16,20 ---- PyObject * ! PyFunction_New(PyObject *code, PyObject *globals) { PyFunctionObject *op = PyObject_NEW(PyFunctionObject, *************** *** 48,53 **** PyObject * ! PyFunction_GetCode(op) ! PyObject *op; { if (!PyFunction_Check(op)) { --- 46,50 ---- PyObject * ! PyFunction_GetCode(PyObject *op) { if (!PyFunction_Check(op)) { *************** *** 59,64 **** PyObject * ! PyFunction_GetGlobals(op) ! PyObject *op; { if (!PyFunction_Check(op)) { --- 56,60 ---- PyObject * ! PyFunction_GetGlobals(PyObject *op) { if (!PyFunction_Check(op)) { *************** *** 70,75 **** PyObject * ! PyFunction_GetDefaults(op) ! PyObject *op; { if (!PyFunction_Check(op)) { --- 66,70 ---- PyObject * ! PyFunction_GetDefaults(PyObject *op) { if (!PyFunction_Check(op)) { *************** *** 81,87 **** int ! PyFunction_SetDefaults(op, defaults) ! PyObject *op; ! PyObject *defaults; { if (!PyFunction_Check(op)) { --- 76,80 ---- int ! PyFunction_SetDefaults(PyObject *op, PyObject *defaults) { if (!PyFunction_Check(op)) { *************** *** 119,125 **** static PyObject * ! func_getattr(op, name) ! PyFunctionObject *op; ! char *name; { if (name[0] != '_' && PyEval_GetRestricted()) { --- 112,116 ---- static PyObject * ! func_getattr(PyFunctionObject *op, char *name) { if (name[0] != '_' && PyEval_GetRestricted()) { *************** *** 132,139 **** static int ! func_setattr(op, name, value) ! PyFunctionObject *op; ! char *name; ! PyObject *value; { if (PyEval_GetRestricted()) { --- 123,127 ---- static int ! func_setattr(PyFunctionObject *op, char *name, PyObject *value) { if (PyEval_GetRestricted()) { *************** *** 164,169 **** static void ! func_dealloc(op) ! PyFunctionObject *op; { PyObject_GC_Fini(op); --- 152,156 ---- static void ! func_dealloc(PyFunctionObject *op) { PyObject_GC_Fini(op); *************** *** 178,183 **** static PyObject* ! func_repr(op) ! PyFunctionObject *op; { char buf[140]; --- 165,169 ---- static PyObject* ! func_repr(PyFunctionObject *op) { char buf[140]; *************** *** 192,197 **** static int ! func_compare(f, g) ! PyFunctionObject *f, *g; { int c; --- 178,182 ---- static int ! func_compare(PyFunctionObject *f, PyFunctionObject *g) { int c; *************** *** 211,216 **** static long ! func_hash(f) ! PyFunctionObject *f; { long h,x; --- 196,200 ---- static long ! func_hash(PyFunctionObject *f) { long h,x; Index: methodobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/methodobject.c,v retrieving revision 2.31 retrieving revision 2.32 diff -C2 -r2.31 -r2.32 *** methodobject.c 2000/06/30 23:58:05 2.31 --- methodobject.c 2000/07/09 06:03:25 2.32 *************** *** 18,24 **** PyObject * ! PyCFunction_New(ml, self) ! PyMethodDef *ml; ! PyObject *self; { PyCFunctionObject *op; --- 18,22 ---- PyObject * ! PyCFunction_New(PyMethodDef *ml, PyObject *self) { PyCFunctionObject *op; *************** *** 40,45 **** PyCFunction ! PyCFunction_GetFunction(op) ! PyObject *op; { if (!PyCFunction_Check(op)) { --- 38,42 ---- PyCFunction ! PyCFunction_GetFunction(PyObject *op) { if (!PyCFunction_Check(op)) { *************** *** 51,56 **** PyObject * ! PyCFunction_GetSelf(op) ! PyObject *op; { if (!PyCFunction_Check(op)) { --- 48,52 ---- PyObject * ! PyCFunction_GetSelf(PyObject *op) { if (!PyCFunction_Check(op)) { *************** *** 62,67 **** int ! PyCFunction_GetFlags(op) ! PyObject *op; { if (!PyCFunction_Check(op)) { --- 58,62 ---- int ! PyCFunction_GetFlags(PyObject *op) { if (!PyCFunction_Check(op)) { *************** *** 75,80 **** static void ! meth_dealloc(m) ! PyCFunctionObject *m; { Py_XDECREF(m->m_self); --- 70,74 ---- static void ! meth_dealloc(PyCFunctionObject *m) { Py_XDECREF(m->m_self); *************** *** 84,90 **** static PyObject * ! meth_getattr(m, name) ! PyCFunctionObject *m; ! char *name; { if (strcmp(name, "__name__") == 0) { --- 78,82 ---- static PyObject * ! meth_getattr(PyCFunctionObject *m, char *name) { if (strcmp(name, "__name__") == 0) { *************** *** 120,125 **** static PyObject * ! meth_repr(m) ! PyCFunctionObject *m; { char buf[200]; --- 112,116 ---- static PyObject * ! meth_repr(PyCFunctionObject *m) { char buf[200]; *************** *** 135,140 **** static int ! meth_compare(a, b) ! PyCFunctionObject *a, *b; { if (a->m_self != b->m_self) --- 126,130 ---- static int ! meth_compare(PyCFunctionObject *a, PyCFunctionObject *b) { if (a->m_self != b->m_self) *************** *** 149,154 **** static long ! meth_hash(a) ! PyCFunctionObject *a; { long x,y; --- 139,143 ---- static long ! meth_hash(PyCFunctionObject *a) { long x,y; *************** *** 190,195 **** static PyObject * ! listmethodchain(chain) ! PyMethodChain *chain; { PyMethodChain *c; --- 179,183 ---- static PyObject * ! listmethodchain(PyMethodChain *chain) { PyMethodChain *c; *************** *** 224,231 **** PyObject * ! Py_FindMethodInChain(chain, self, name) ! PyMethodChain *chain; ! PyObject *self; ! char *name; { if (name[0] == '_' && name[1] == '_') { --- 212,216 ---- PyObject * ! Py_FindMethodInChain(PyMethodChain *chain, PyObject *self, char *name) { if (name[0] == '_' && name[1] == '_') { *************** *** 254,261 **** PyObject * ! Py_FindMethod(methods, self, name) ! PyMethodDef *methods; ! PyObject *self; ! char *name; { PyMethodChain chain; --- 239,243 ---- PyObject * ! Py_FindMethod(PyMethodDef *methods, PyObject *self, char *name) { PyMethodChain chain; *************** *** 268,272 **** void ! PyCFunction_Fini() { while (free_list) { --- 250,254 ---- void ! PyCFunction_Fini(void) { while (free_list) { Index: moduleobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/moduleobject.c,v retrieving revision 2.27 retrieving revision 2.28 diff -C2 -r2.27 -r2.28 *** moduleobject.c 2000/06/30 23:58:05 2.27 --- moduleobject.c 2000/07/09 06:03:25 2.28 *************** *** 19,24 **** PyObject * ! PyModule_New(name) ! char *name; { PyModuleObject *m; --- 19,23 ---- PyObject * ! PyModule_New(char *name) { PyModuleObject *m; *************** *** 45,50 **** PyObject * ! PyModule_GetDict(m) ! PyObject *m; { if (!PyModule_Check(m)) { --- 44,48 ---- PyObject * ! PyModule_GetDict(PyObject *m) { if (!PyModule_Check(m)) { *************** *** 56,61 **** char * ! PyModule_GetName(m) ! PyObject *m; { PyObject *nameobj; --- 54,58 ---- char * ! PyModule_GetName(PyObject *m) { PyObject *nameobj; *************** *** 74,79 **** char * ! PyModule_GetFilename(m) ! PyObject *m; { PyObject *fileobj; --- 71,75 ---- char * ! PyModule_GetFilename(PyObject *m) { PyObject *fileobj; *************** *** 92,97 **** void ! _PyModule_Clear(m) ! PyObject *m; { /* To make the execution order of destructors for global --- 88,92 ---- void ! _PyModule_Clear(PyObject *m) { /* To make the execution order of destructors for global *************** *** 143,148 **** static void ! module_dealloc(m) ! PyModuleObject *m; { if (m->md_dict != NULL) { --- 138,142 ---- static void ! module_dealloc(PyModuleObject *m) { if (m->md_dict != NULL) { *************** *** 154,159 **** static PyObject * ! module_repr(m) ! PyModuleObject *m; { char buf[400]; --- 148,152 ---- static PyObject * ! module_repr(PyModuleObject *m) { char buf[400]; *************** *** 177,183 **** static PyObject * ! module_getattr(m, name) ! PyModuleObject *m; ! char *name; { PyObject *res; --- 170,174 ---- static PyObject * ! module_getattr(PyModuleObject *m, char *name) { PyObject *res; *************** *** 195,202 **** static int ! module_setattr(m, name, v) ! PyModuleObject *m; ! char *name; ! PyObject *v; { if (name[0] == '_' && strcmp(name, "__dict__") == 0) { --- 186,190 ---- static int ! module_setattr(PyModuleObject *m, char *name, PyObject *v) { if (name[0] == '_' && strcmp(name, "__dict__") == 0) { From python-dev@python.org Sun Jul 9 07:21:30 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 8 Jul 2000 23:21:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects rangeobject.c,2.15,2.16 sliceobject.c,2.4,2.5 typeobject.c,2.14,2.15 Message-ID: <200007090621.XAA05940@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv5928 Modified Files: rangeobject.c sliceobject.c typeobject.c Log Message: ANSI-fication of the sources. Index: rangeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/rangeobject.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** rangeobject.c 2000/06/30 23:58:05 2.15 --- rangeobject.c 2000/07/09 06:21:27 2.16 *************** *** 23,29 **** PyObject * ! PyRange_New(start, len, step, reps) ! long start, len, step; ! int reps; { rangeobject *obj = PyObject_NEW(rangeobject, &PyRange_Type); --- 23,27 ---- PyObject * ! PyRange_New(long start, long len, long step, int reps) { rangeobject *obj = PyObject_NEW(rangeobject, &PyRange_Type); *************** *** 38,43 **** static void ! range_dealloc(r) ! rangeobject *r; { PyObject_DEL(r); --- 36,40 ---- static void ! range_dealloc(rangeobject *r) { PyObject_DEL(r); *************** *** 45,51 **** static PyObject * ! range_item(r, i) ! rangeobject *r; ! int i; { if (i < 0 || i >= r->len * r->reps) { --- 42,46 ---- static PyObject * ! range_item(rangeobject *r, int i) { if (i < 0 || i >= r->len * r->reps) { *************** *** 59,64 **** static int ! range_length(r) ! rangeobject *r; { return r->len * r->reps; --- 54,58 ---- static int ! range_length(rangeobject *r) { return r->len * r->reps; *************** *** 66,73 **** static int ! range_print(r, fp, flags) ! rangeobject *r; ! FILE *fp; ! int flags; { int i, j; --- 60,64 ---- static int ! range_print(rangeobject *r, FILE *fp, int flags) { int i, j; *************** *** 89,94 **** static PyObject * ! range_repr(r) ! rangeobject *r; { char buf[80]; --- 80,84 ---- static PyObject * ! range_repr(rangeobject *r) { char buf[80]; *************** *** 102,108 **** static PyObject * ! range_concat(r, obj) ! rangeobject *r; ! PyObject *obj; { PyErr_SetString(PyExc_TypeError, "cannot concatenate xrange objects"); --- 92,96 ---- static PyObject * ! range_concat(rangeobject *r, PyObject *obj) { PyErr_SetString(PyExc_TypeError, "cannot concatenate xrange objects"); *************** *** 111,117 **** static PyObject * ! range_repeat(r, n) ! rangeobject *r; ! int n; { if (n < 0) --- 99,103 ---- static PyObject * ! range_repeat(rangeobject *r, int n) { if (n < 0) *************** *** 132,137 **** static int ! range_compare(r1, r2) ! rangeobject *r1, *r2; { if (r1->start != r2->start) --- 118,122 ---- static int ! range_compare(rangeobject *r1, rangeobject *r2) { if (r1->start != r2->start) *************** *** 149,155 **** static PyObject * ! range_slice(r, low, high) ! rangeobject *r; ! int low, high; { if (r->reps != 1) { --- 134,138 ---- static PyObject * ! range_slice(rangeobject *r, int low, int high) { if (r->reps != 1) { *************** *** 182,188 **** static PyObject * ! range_tolist(self, args) ! rangeobject *self; ! PyObject *args; { PyObject *thelist; --- 165,169 ---- static PyObject * ! range_tolist(rangeobject *self, PyObject *args) { PyObject *thelist; *************** *** 205,211 **** static PyObject * ! range_getattr(r, name) ! rangeobject *r; ! char *name; { static PyMethodDef range_methods[] = { --- 186,190 ---- static PyObject * ! range_getattr(rangeobject *r, char *name) { static PyMethodDef range_methods[] = { *************** *** 218,224 **** static int ! range_contains(r, obj) ! rangeobject * r; ! PyObject * obj; { long num = PyInt_AsLong(obj); --- 197,201 ---- static int ! range_contains(rangeobject *r, PyObject *obj) { long num = PyInt_AsLong(obj); Index: sliceobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/sliceobject.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** sliceobject.c 2000/05/03 23:44:35 2.4 --- sliceobject.c 2000/07/09 06:21:27 2.5 *************** *** 17,22 **** static PyObject * ! ellipsis_repr(op) ! PyObject *op; { return PyString_FromString("Ellipsis"); --- 17,21 ---- static PyObject * ! ellipsis_repr(PyObject *op) { return PyString_FromString("Ellipsis"); *************** *** 53,60 **** PyObject * ! PySlice_New(start, stop, step) ! PyObject *start; ! PyObject *stop; ! PyObject *step; { PySliceObject *obj = PyObject_NEW(PySliceObject, &PySlice_Type); --- 52,56 ---- PyObject * ! PySlice_New(PyObject *start, PyObject *stop, PyObject *step) { PySliceObject *obj = PyObject_NEW(PySliceObject, &PySlice_Type); *************** *** 75,84 **** int ! PySlice_GetIndices(r, length, start, stop, step) ! PySliceObject *r; ! int length; ! int *start; ! int *stop; ! int *step; { if (r->step == Py_None) { --- 71,76 ---- int ! PySlice_GetIndices(PySliceObject *r, int length, ! int *start, int *stop, int *step) { if (r->step == Py_None) { *************** *** 109,114 **** static void ! slice_dealloc(r) ! PySliceObject *r; { Py_DECREF(r->step); --- 101,105 ---- static void ! slice_dealloc(PySliceObject *r) { Py_DECREF(r->step); *************** *** 119,124 **** static PyObject * ! slice_repr(r) ! PySliceObject *r; { PyObject *s, *comma; --- 110,114 ---- static PyObject * ! slice_repr(PySliceObject *r) { PyObject *s, *comma; *************** *** 137,143 **** ! static PyObject *slice_getattr(self, name) ! PySliceObject *self; ! char *name; { PyObject *ret; --- 127,131 ---- ! static PyObject *slice_getattr(PySliceObject *self, char *name) { PyObject *ret; Index: typeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** typeobject.c 2000/06/30 23:58:05 2.14 --- typeobject.c 2000/07/09 06:21:27 2.15 *************** *** 16,22 **** static PyObject * ! type_getattr(t, name) ! PyTypeObject *t; ! char *name; { if (strcmp(name, "__name__") == 0) --- 16,20 ---- static PyObject * ! type_getattr(PyTypeObject *t, char *name) { if (strcmp(name, "__name__") == 0) *************** *** 36,41 **** static PyObject * ! type_repr(v) ! PyTypeObject *v; { char buf[100]; --- 34,38 ---- static PyObject * ! type_repr(PyTypeObject *v) { char buf[100]; From python-dev@python.org Sun Jul 9 08:04:38 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 9 Jul 2000 00:04:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.74,2.75 tupleobject.c,2.42,2.43 xxobject.c,2.17,2.18 Message-ID: <200007090704.AAA14053@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv14044 Modified Files: stringobject.c tupleobject.c xxobject.c Log Message: ANSI-fication of the sources. Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.74 retrieving revision 2.75 diff -C2 -r2.74 -r2.75 *** stringobject.c 2000/07/06 11:29:01 2.74 --- stringobject.c 2000/07/09 07:04:36 2.75 *************** *** 49,55 **** */ PyObject * ! PyString_FromStringAndSize(str, size) ! const char *str; ! int size; { register PyStringObject *op; --- 49,53 ---- */ PyObject * ! PyString_FromStringAndSize(const char *str, int size) { register PyStringObject *op; *************** *** 101,106 **** PyObject * ! PyString_FromString(str) ! const char *str; { register size_t size = strlen(str); --- 99,103 ---- PyObject * ! PyString_FromString(const char *str) { register size_t size = strlen(str); *************** *** 248,253 **** static void ! string_dealloc(op) ! PyObject *op; { PyObject_DEL(op); --- 245,249 ---- static void ! string_dealloc(PyObject *op) { PyObject_DEL(op); *************** *** 255,260 **** int ! PyString_Size(op) ! register PyObject *op; { if (!PyString_Check(op)) { --- 251,255 ---- int ! PyString_Size(register PyObject *op) { if (!PyString_Check(op)) { *************** *** 266,271 **** /*const*/ char * ! PyString_AsString(op) ! register PyObject *op; { if (!PyString_Check(op)) { --- 261,265 ---- /*const*/ char * ! PyString_AsString(register PyObject *op) { if (!PyString_Check(op)) { *************** *** 279,286 **** static int ! string_print(op, fp, flags) ! PyStringObject *op; ! FILE *fp; ! int flags; { int i; --- 273,277 ---- static int ! string_print(PyStringObject *op, FILE *fp, int flags) { int i; *************** *** 313,318 **** static PyObject * ! string_repr(op) ! register PyStringObject *op; { size_t newsize = 2 + 4 * op->ob_size * sizeof(char); --- 304,308 ---- static PyObject * ! string_repr(register PyStringObject *op) { size_t newsize = 2 + 4 * op->ob_size * sizeof(char); *************** *** 360,365 **** static int ! string_length(a) ! PyStringObject *a; { return a->ob_size; --- 350,354 ---- static int ! string_length(PyStringObject *a) { return a->ob_size; *************** *** 367,373 **** static PyObject * ! string_concat(a, bb) ! register PyStringObject *a; ! register PyObject *bb; { register unsigned int size; --- 356,360 ---- static PyObject * ! string_concat(register PyStringObject *a, register PyObject *bb) { register unsigned int size; *************** *** 412,418 **** static PyObject * ! string_repeat(a, n) ! register PyStringObject *a; ! register int n; { register int i; --- 399,403 ---- static PyObject * ! string_repeat(register PyStringObject *a, register int n) { register int i; *************** *** 447,453 **** static PyObject * ! string_slice(a, i, j) ! register PyStringObject *a; ! register int i, j; /* May be negative! */ { if (i < 0) --- 432,437 ---- static PyObject * ! string_slice(register PyStringObject *a, register int i, register int j) ! /* j -- may be negative! */ { if (i < 0) *************** *** 467,472 **** static int ! string_contains(a, el) ! PyObject *a, *el; { register char *s, *end; --- 451,455 ---- static int ! string_contains(PyObject *a, PyObject *el) { register char *s, *end; *************** *** 490,496 **** static PyObject * ! string_item(a, i) ! PyStringObject *a; ! register int i; { int c; --- 473,477 ---- static PyObject * ! string_item(PyStringObject *a, register int i) { int c; *************** *** 518,523 **** static int ! string_compare(a, b) ! PyStringObject *a, *b; { int len_a = a->ob_size, len_b = b->ob_size; --- 499,503 ---- static int ! string_compare(PyStringObject *a, PyStringObject *b) { int len_a = a->ob_size, len_b = b->ob_size; *************** *** 535,540 **** static long ! string_hash(a) ! PyStringObject *a; { register int len; --- 515,519 ---- static long ! string_hash(PyStringObject *a) { register int len; *************** *** 566,573 **** static int ! string_buffer_getreadbuf(self, index, ptr) ! PyStringObject *self; ! int index; ! const void **ptr; { if ( index != 0 ) { --- 545,549 ---- static int ! string_buffer_getreadbuf(PyStringObject *self, int index, const void **ptr) { if ( index != 0 ) { *************** *** 581,588 **** static int ! string_buffer_getwritebuf(self, index, ptr) ! PyStringObject *self; ! int index; ! const void **ptr; { PyErr_SetString(PyExc_TypeError, --- 557,561 ---- static int ! string_buffer_getwritebuf(PyStringObject *self, int index, const void **ptr) { PyErr_SetString(PyExc_TypeError, *************** *** 592,598 **** static int ! string_buffer_getsegcount(self, lenp) ! PyStringObject *self; ! int *lenp; { if ( lenp ) --- 565,569 ---- static int ! string_buffer_getsegcount(PyStringObject *self, int *lenp) { if ( lenp ) *************** *** 602,609 **** static int ! string_buffer_getcharbuf(self, index, ptr) ! PyStringObject *self; ! int index; ! const char **ptr; { if ( index != 0 ) { --- 573,577 ---- static int ! string_buffer_getcharbuf(PyStringObject *self, int index, const char **ptr) { if ( index != 0 ) { *************** *** 642,649 **** static PyObject * ! split_whitespace(s, len, maxsplit) ! char *s; ! int len; ! int maxsplit; { int i, j, err; --- 610,614 ---- static PyObject * ! split_whitespace(char *s, int len, int maxsplit) { int i, j, err; *************** *** 700,706 **** static PyObject * ! string_split(self, args) ! PyStringObject *self; ! PyObject *args; { int len = PyString_GET_SIZE(self), n, i, j, err; --- 665,669 ---- static PyObject * ! string_split(PyStringObject *self, PyObject *args) { int len = PyString_GET_SIZE(self), n, i, j, err; *************** *** 772,778 **** static PyObject * ! string_join(self, args) ! PyStringObject *self; ! PyObject *args; { char *sep = PyString_AS_STRING(self); --- 735,739 ---- static PyObject * ! string_join(PyStringObject *self, PyObject *args) { char *sep = PyString_AS_STRING(self); *************** *** 897,904 **** static long ! string_find_internal(self, args, dir) ! PyStringObject *self; ! PyObject *args; ! int dir; { const char *s = PyString_AS_STRING(self), *sub; --- 858,862 ---- static long ! string_find_internal(PyStringObject *self, PyObject *args, int dir) { const char *s = PyString_AS_STRING(self), *sub; *************** *** 962,968 **** static PyObject * ! string_find(self, args) ! PyStringObject *self; ! PyObject *args; { long result = string_find_internal(self, args, +1); --- 920,924 ---- static PyObject * ! string_find(PyStringObject *self, PyObject *args) { long result = string_find_internal(self, args, +1); *************** *** 979,985 **** static PyObject * ! string_index(self, args) ! PyStringObject *self; ! PyObject *args; { long result = string_find_internal(self, args, +1); --- 935,939 ---- static PyObject * ! string_index(PyStringObject *self, PyObject *args) { long result = string_find_internal(self, args, +1); *************** *** 1005,1011 **** static PyObject * ! string_rfind(self, args) ! PyStringObject *self; ! PyObject *args; { long result = string_find_internal(self, args, -1); --- 959,963 ---- static PyObject * ! string_rfind(PyStringObject *self, PyObject *args) { long result = string_find_internal(self, args, -1); *************** *** 1022,1028 **** static PyObject * ! string_rindex(self, args) ! PyStringObject *self; ! PyObject *args; { long result = string_find_internal(self, args, -1); --- 974,978 ---- static PyObject * ! string_rindex(PyStringObject *self, PyObject *args) { long result = string_find_internal(self, args, -1); *************** *** 1039,1046 **** static PyObject * ! do_strip(self, args, striptype) ! PyStringObject *self; ! PyObject *args; ! int striptype; { char *s = PyString_AS_STRING(self); --- 989,993 ---- static PyObject * ! do_strip(PyStringObject *self, PyObject *args, int striptype) { char *s = PyString_AS_STRING(self); *************** *** 1081,1087 **** static PyObject * ! string_strip(self, args) ! PyStringObject *self; ! PyObject *args; { return do_strip(self, args, BOTHSTRIP); --- 1028,1032 ---- static PyObject * ! string_strip(PyStringObject *self, PyObject *args) { return do_strip(self, args, BOTHSTRIP); *************** *** 1095,1101 **** static PyObject * ! string_lstrip(self, args) ! PyStringObject *self; ! PyObject *args; { return do_strip(self, args, LEFTSTRIP); --- 1040,1044 ---- static PyObject * ! string_lstrip(PyStringObject *self, PyObject *args) { return do_strip(self, args, LEFTSTRIP); *************** *** 1109,1115 **** static PyObject * ! string_rstrip(self, args) ! PyStringObject *self; ! PyObject *args; { return do_strip(self, args, RIGHTSTRIP); --- 1052,1056 ---- static PyObject * ! string_rstrip(PyStringObject *self, PyObject *args) { return do_strip(self, args, RIGHTSTRIP); *************** *** 1123,1129 **** static PyObject * ! string_lower(self, args) ! PyStringObject *self; ! PyObject *args; { char *s = PyString_AS_STRING(self), *s_new; --- 1064,1068 ---- static PyObject * ! string_lower(PyStringObject *self, PyObject *args) { char *s = PyString_AS_STRING(self), *s_new; *************** *** 1155,1161 **** static PyObject * ! string_upper(self, args) ! PyStringObject *self; ! PyObject *args; { char *s = PyString_AS_STRING(self), *s_new; --- 1094,1098 ---- static PyObject * ! string_upper(PyStringObject *self, PyObject *args) { char *s = PyString_AS_STRING(self), *s_new; *************** *** 1225,1231 **** static PyObject * ! string_capitalize(self, args) ! PyStringObject *self; ! PyObject *args; { char *s = PyString_AS_STRING(self), *s_new; --- 1162,1166 ---- static PyObject * ! string_capitalize(PyStringObject *self, PyObject *args) { char *s = PyString_AS_STRING(self), *s_new; *************** *** 1267,1273 **** static PyObject * ! string_count(self, args) ! PyStringObject *self; ! PyObject *args; { const char *s = PyString_AS_STRING(self), *sub; --- 1202,1206 ---- static PyObject * ! string_count(PyStringObject *self, PyObject *args) { const char *s = PyString_AS_STRING(self), *sub; *************** *** 1325,1331 **** static PyObject * ! string_swapcase(self, args) ! PyStringObject *self; ! PyObject *args; { char *s = PyString_AS_STRING(self), *s_new; --- 1258,1262 ---- static PyObject * ! string_swapcase(PyStringObject *self, PyObject *args) { char *s = PyString_AS_STRING(self), *s_new; *************** *** 1364,1370 **** static PyObject * ! string_translate(self, args) ! PyStringObject *self; ! PyObject *args; { register char *input, *output; --- 1295,1299 ---- static PyObject * ! string_translate(PyStringObject *self, PyObject *args) { register char *input, *output; *************** *** 1484,1492 **** */ static int ! mymemfind(mem, len, pat, pat_len) ! char *mem; ! int len; ! char *pat; ! int pat_len; { register int ii; --- 1413,1417 ---- */ static int ! mymemfind(char *mem, int len, char *pat, int pat_len) { register int ii; *************** *** 1511,1519 **** */ static int ! mymemcnt(mem, len, pat, pat_len) ! char *mem; ! int len; ! char *pat; ! int pat_len; { register int offset = 0; --- 1436,1440 ---- */ static int ! mymemcnt(char *mem, int len, char *pat, int pat_len) { register int offset = 0; *************** *** 1551,1564 **** */ static char * ! mymemreplace(str, len, pat, pat_len, sub, sub_len, count, out_len) ! char *str; ! int len; /* input string */ ! char *pat; ! int pat_len; /* pattern string to find */ ! char *sub; ! int sub_len; /* substitution string */ ! int count; /* number of replacements */ ! int *out_len; ! { char *out_s; --- 1472,1480 ---- */ static char * ! mymemreplace(char *str, int len, /* input string */ ! char *pat, int pat_len, /* pattern string to find */ ! char *sub, int sub_len, /* substitution string */ ! int count, /* number of replacements */ ! int *out_len) { char *out_s; *************** *** 1623,1629 **** static PyObject * ! string_replace(self, args) ! PyStringObject *self; ! PyObject *args; { const char *str = PyString_AS_STRING(self), *sub, *repl; --- 1539,1543 ---- static PyObject * ! string_replace(PyStringObject *self, PyObject *args) { const char *str = PyString_AS_STRING(self), *sub, *repl; *************** *** 1688,1694 **** static PyObject * ! string_startswith(self, args) ! PyStringObject *self; ! PyObject *args; { const char* str = PyString_AS_STRING(self); --- 1602,1606 ---- static PyObject * ! string_startswith(PyStringObject *self, PyObject *args) { const char* str = PyString_AS_STRING(self); *************** *** 1742,1748 **** static PyObject * ! string_endswith(self, args) ! PyStringObject *self; ! PyObject *args; { const char* str = PyString_AS_STRING(self); --- 1654,1658 ---- static PyObject * ! string_endswith(PyStringObject *self, PyObject *args) { const char* str = PyString_AS_STRING(self); *************** *** 2014,2018 **** string_isspace(PyStringObject *self, PyObject *args) { ! register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; --- 1924,1929 ---- string_isspace(PyStringObject *self, PyObject *args) { ! register const unsigned char *p ! = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; *************** *** 2047,2051 **** string_isalpha(PyUnicodeObject *self, PyObject *args) { ! register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; --- 1958,1963 ---- string_isalpha(PyUnicodeObject *self, PyObject *args) { ! register const unsigned char *p ! = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; *************** *** 2080,2084 **** string_isalnum(PyUnicodeObject *self, PyObject *args) { ! register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; --- 1992,1997 ---- string_isalnum(PyUnicodeObject *self, PyObject *args) { ! register const unsigned char *p ! = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; *************** *** 2113,2117 **** string_isdigit(PyStringObject *self, PyObject *args) { ! register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; --- 2026,2031 ---- string_isdigit(PyStringObject *self, PyObject *args) { ! register const unsigned char *p ! = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; *************** *** 2146,2150 **** string_islower(PyStringObject *self, PyObject *args) { ! register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; int cased; --- 2060,2065 ---- string_islower(PyStringObject *self, PyObject *args) { ! register const unsigned char *p ! = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; int cased; *************** *** 2182,2186 **** string_isupper(PyStringObject *self, PyObject *args) { ! register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; int cased; --- 2097,2102 ---- string_isupper(PyStringObject *self, PyObject *args) { ! register const unsigned char *p ! = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; int cased; *************** *** 2219,2223 **** string_istitle(PyStringObject *self, PyObject *args) { ! register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; int cased, previous_is_cased; --- 2135,2140 ---- string_istitle(PyStringObject *self, PyObject *args) { ! register const unsigned char *p ! = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; int cased, previous_is_cased; *************** *** 2376,2382 **** static PyObject * ! string_getattr(s, name) ! PyStringObject *s; ! char *name; { return Py_FindMethod(string_methods, (PyObject*)s, name); --- 2293,2297 ---- static PyObject * ! string_getattr(PyStringObject *s, char *name) { return Py_FindMethod(string_methods, (PyObject*)s, name); *************** *** 2410,2416 **** void ! PyString_Concat(pv, w) ! register PyObject **pv; ! register PyObject *w; { register PyObject *v; --- 2325,2329 ---- void ! PyString_Concat(register PyObject **pv, register PyObject *w) { register PyObject *v; *************** *** 2428,2434 **** void ! PyString_ConcatAndDel(pv, w) ! register PyObject **pv; ! register PyObject *w; { PyString_Concat(pv, w); --- 2341,2345 ---- void ! PyString_ConcatAndDel(register PyObject **pv, register PyObject *w) { PyString_Concat(pv, w); *************** *** 2445,2451 **** int ! _PyString_Resize(pv, newsize) ! PyObject **pv; ! int newsize; { register PyObject *v; --- 2356,2360 ---- int ! _PyString_Resize(PyObject **pv, int newsize) { register PyObject *v; *************** *** 2481,2488 **** static PyObject * ! getnextarg(args, arglen, p_argidx) ! PyObject *args; ! int arglen; ! int *p_argidx; { int argidx = *p_argidx; --- 2390,2394 ---- static PyObject * ! getnextarg(PyObject *args, int arglen, int *p_argidx) { int argidx = *p_argidx; *************** *** 2506,2516 **** static int ! formatfloat(buf, buflen, flags, prec, type, v) ! char *buf; ! size_t buflen; ! int flags; ! int prec; ! int type; ! PyObject *v; { /* fmt = '%#.' + `prec` + `type` --- 2412,2417 ---- static int ! formatfloat(char *buf, size_t buflen, int flags, ! int prec, int type, PyObject *v) { /* fmt = '%#.' + `prec` + `type` *************** *** 2542,2552 **** static int ! formatint(buf, buflen, flags, prec, type, v) ! char *buf; ! size_t buflen; ! int flags; ! int prec; ! int type; ! PyObject *v; { /* fmt = '%#.' + `prec` + 'l' + `type` --- 2443,2448 ---- static int ! formatint(char *buf, size_t buflen, int flags, ! int prec, int type, PyObject *v) { /* fmt = '%#.' + `prec` + 'l' + `type` *************** *** 2571,2578 **** static int ! formatchar(buf, buflen, v) ! char *buf; ! size_t buflen; ! PyObject *v; { /* presume that the buffer is at least 2 characters long */ --- 2467,2471 ---- static int ! formatchar(char *buf, size_t buflen, PyObject *v) { /* presume that the buffer is at least 2 characters long */ *************** *** 2601,2607 **** PyObject * ! PyString_Format(format, args) ! PyObject *format; ! PyObject *args; { char *fmt, *res; --- 2494,2498 ---- PyObject * ! PyString_Format(PyObject *format, PyObject *args) { char *fmt, *res; *************** *** 3002,3007 **** void ! PyString_InternInPlace(p) ! PyObject **p; { register PyStringObject *s = (PyStringObject *)(*p); --- 2893,2897 ---- void ! PyString_InternInPlace(PyObject **p) { register PyStringObject *s = (PyStringObject *)(*p); *************** *** 3038,3043 **** PyObject * ! PyString_InternFromString(cp) ! const char *cp; { PyObject *s = PyString_FromString(cp); --- 2928,2932 ---- PyObject * ! PyString_InternFromString(const char *cp) { PyObject *s = PyString_FromString(cp); *************** *** 3051,3055 **** void ! PyString_Fini() { int i; --- 2940,2944 ---- void ! PyString_Fini(void) { int i; Index: tupleobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/tupleobject.c,v retrieving revision 2.42 retrieving revision 2.43 diff -C2 -r2.42 -r2.43 *** tupleobject.c 2000/07/01 01:00:38 2.42 --- tupleobject.c 2000/07/09 07:04:36 2.43 *************** *** 34,39 **** PyObject * ! PyTuple_New(size) ! register int size; { register int i; --- 34,38 ---- PyObject * ! PyTuple_New(register int size) { register int i; *************** *** 100,105 **** int ! PyTuple_Size(op) ! register PyObject *op; { if (!PyTuple_Check(op)) { --- 99,103 ---- int ! PyTuple_Size(register PyObject *op) { if (!PyTuple_Check(op)) { *************** *** 112,118 **** PyObject * ! PyTuple_GetItem(op, i) ! register PyObject *op; ! register int i; { if (!PyTuple_Check(op)) { --- 110,114 ---- PyObject * ! PyTuple_GetItem(register PyObject *op, register int i) { if (!PyTuple_Check(op)) { *************** *** 128,135 **** int ! PyTuple_SetItem(op, i, newitem) ! register PyObject *op; ! register int i; ! PyObject *newitem; { register PyObject *olditem; --- 124,128 ---- int ! PyTuple_SetItem(register PyObject *op, register int i, PyObject *newitem) { register PyObject *olditem; *************** *** 156,161 **** static void ! tupledealloc(op) ! register PyTupleObject *op; { register int i; --- 149,153 ---- static void ! tupledealloc(register PyTupleObject *op) { register int i; *************** *** 183,190 **** static int ! tupleprint(op, fp, flags) ! PyTupleObject *op; ! FILE *fp; ! int flags; { int i; --- 175,179 ---- static int ! tupleprint(PyTupleObject *op, FILE *fp, int flags) { int i; *************** *** 203,208 **** static PyObject * ! tuplerepr(v) ! PyTupleObject *v; { PyObject *s, *comma; --- 192,196 ---- static PyObject * ! tuplerepr(PyTupleObject *v) { PyObject *s, *comma; *************** *** 223,228 **** static int ! tuplecompare(v, w) ! register PyTupleObject *v, *w; { register int len = --- 211,215 ---- static int ! tuplecompare(register PyTupleObject *v, register PyTupleObject *w) { register int len = *************** *** 238,243 **** static long ! tuplehash(v) ! PyTupleObject *v; { register long x, y; --- 225,229 ---- static long ! tuplehash(PyTupleObject *v) { register long x, y; *************** *** 259,264 **** static int ! tuplelength(a) ! PyTupleObject *a; { return a->ob_size; --- 245,249 ---- static int ! tuplelength(PyTupleObject *a) { return a->ob_size; *************** *** 266,272 **** static int ! tuplecontains(a, el) ! PyTupleObject *a; ! PyObject *el; { int i, cmp; --- 251,255 ---- static int ! tuplecontains(PyTupleObject *a, PyObject *el) { int i, cmp; *************** *** 283,289 **** static PyObject * ! tupleitem(a, i) ! register PyTupleObject *a; ! register int i; { if (i < 0 || i >= a->ob_size) { --- 266,270 ---- static PyObject * ! tupleitem(register PyTupleObject *a, register int i) { if (i < 0 || i >= a->ob_size) { *************** *** 296,302 **** static PyObject * ! tupleslice(a, ilow, ihigh) ! register PyTupleObject *a; ! register int ilow, ihigh; { register PyTupleObject *np; --- 277,281 ---- static PyObject * ! tupleslice(register PyTupleObject *a, register int ilow, register int ihigh) { register PyTupleObject *np; *************** *** 325,331 **** PyObject * ! PyTuple_GetSlice(op, i, j) ! PyObject *op; ! int i, j; { if (op == NULL || !PyTuple_Check(op)) { --- 304,308 ---- PyObject * ! PyTuple_GetSlice(PyObject *op, int i, int j) { if (op == NULL || !PyTuple_Check(op)) { *************** *** 337,343 **** static PyObject * ! tupleconcat(a, bb) ! register PyTupleObject *a; ! register PyObject *bb; { register int size; --- 314,318 ---- static PyObject * ! tupleconcat(register PyTupleObject *a, register PyObject *bb) { register int size; *************** *** 371,377 **** static PyObject * ! tuplerepeat(a, n) ! PyTupleObject *a; ! int n; { int i, j; --- 346,350 ---- static PyObject * ! tuplerepeat(PyTupleObject *a, int n) { int i, j; *************** *** 468,475 **** int ! _PyTuple_Resize(pv, newsize, last_is_sticky) ! PyObject **pv; ! int newsize; ! int last_is_sticky; { register PyTupleObject *v; --- 441,445 ---- int ! _PyTuple_Resize(PyObject **pv, int newsize, int last_is_sticky) { register PyTupleObject *v; *************** *** 583,587 **** void ! PyTuple_Fini() { #if MAXSAVESIZE > 0 --- 553,557 ---- void ! PyTuple_Fini(void) { #if MAXSAVESIZE > 0 Index: xxobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/xxobject.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** xxobject.c 2000/06/30 23:58:05 2.17 --- xxobject.c 2000/07/09 07:04:36 2.18 *************** *** 33,38 **** static xxobject * ! newxxobject(arg) ! PyObject *arg; { xxobject *xp; --- 33,37 ---- static xxobject * ! newxxobject(PyObject *arg) { xxobject *xp; *************** *** 47,52 **** static void ! xx_dealloc(xp) ! xxobject *xp; { Py_XDECREF(xp->x_attr); --- 46,50 ---- static void ! xx_dealloc(xxobject *xp) { Py_XDECREF(xp->x_attr); *************** *** 55,63 **** static PyObject * ! xx_demo(self, args) ! xxobject *self; ! PyObject *args; { ! if (!PyArg_NoArgs(args)) return NULL; Py_INCREF(Py_None); --- 53,59 ---- static PyObject * ! xx_demo(xxobject *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":demo")) return NULL; Py_INCREF(Py_None); *************** *** 66,77 **** static PyMethodDef xx_methods[] = { ! {"demo", (PyCFunction)xx_demo}, {NULL, NULL} /* sentinel */ }; static PyObject * ! xx_getattr(xp, name) ! xxobject *xp; ! char *name; { if (xp->x_attr != NULL) { --- 62,71 ---- static PyMethodDef xx_methods[] = { ! {"demo", (PyCFunction)xx_demo, METH_VARARGS}, {NULL, NULL} /* sentinel */ }; static PyObject * ! xx_getattr(xxobject *xp, char *name) { if (xp->x_attr != NULL) { *************** *** 86,93 **** static int ! xx_setattr(xp, name, v) ! xxobject *xp; ! char *name; ! PyObject *v; { if (xp->x_attr == NULL) { --- 80,84 ---- static int ! xx_setattr(xxobject *xp, char *name, PyObject *v) { if (xp->x_attr == NULL) { *************** *** 100,104 **** if (rv < 0) PyErr_SetString(PyExc_AttributeError, ! "delete non-existing xx attribute"); return rv; } --- 91,95 ---- if (rv < 0) PyErr_SetString(PyExc_AttributeError, ! "delete non-existing xx attribute"); return rv; } From python-dev@python.org Sun Jul 9 09:02:24 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 9 Jul 2000 01:02:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.75,2.76 Message-ID: <200007090802.BAA23405@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv16442/python/dist/src/objects Modified Files: stringobject.c Log Message: Somebody started playing with const, so of course the outcome was cascades of warnings about mismatching const decls. Overall, I think const creates lots of headaches and solves almost nothing. Added enough consts to shut up the warnings, but this did require casting away const in one spot too (another usual outcome of starting down this path): the function mymemreplace can't return const char*, but sometimes wants to return its first argument as-is, which latter must be declared const char* in order to avoid const warnings at mymemreplace's call sites. So, in the case the function wants to return the first arg, that arg's declared constness must be subverted. Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.75 retrieving revision 2.76 diff -C2 -r2.75 -r2.76 *** stringobject.c 2000/07/09 07:04:36 2.75 --- stringobject.c 2000/07/09 08:02:21 2.76 *************** *** 610,614 **** static PyObject * ! split_whitespace(char *s, int len, int maxsplit) { int i, j, err; --- 610,614 ---- static PyObject * ! split_whitespace(const char *s, int len, int maxsplit) { int i, j, err; *************** *** 1413,1417 **** */ static int ! mymemfind(char *mem, int len, char *pat, int pat_len) { register int ii; --- 1413,1417 ---- */ static int ! mymemfind(const char *mem, int len, const char *pat, int pat_len) { register int ii; *************** *** 1436,1440 **** */ static int ! mymemcnt(char *mem, int len, char *pat, int pat_len) { register int offset = 0; --- 1436,1440 ---- */ static int ! mymemcnt(const char *mem, int len, const char *pat, int pat_len) { register int offset = 0; *************** *** 1472,1479 **** */ static char * ! mymemreplace(char *str, int len, /* input string */ ! char *pat, int pat_len, /* pattern string to find */ ! char *sub, int sub_len, /* substitution string */ ! int count, /* number of replacements */ int *out_len) { --- 1472,1479 ---- */ static char * ! mymemreplace(const char *str, int len, /* input string */ ! const char *pat, int pat_len, /* pattern string to find */ ! const char *sub, int sub_len, /* substitution string */ ! int count, /* number of replacements */ int *out_len) { *************** *** 1527,1531 **** return_same: *out_len = -1; ! return str; } --- 1527,1531 ---- return_same: *out_len = -1; ! return (char*)str; /* have to cast away constness here */ } From python-dev@python.org Sun Jul 9 12:35:39 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 04:35:39 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC w9xpopen.c,NONE,1.1 Message-ID: <200007091135.EAA05552@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv5434/PC Added Files: w9xpopen.c Log Message: - win95/98 helper for new os.popen code this should be built as a console application (link with USER32.LIB), and installed in the same directory as the Python DLL. --- NEW FILE --- /* * w9xpopen.c * * Serves as an intermediate stub Win32 console application to * avoid a hanging pipe when redirecting 16-bit console based * programs (including MS-DOS console based programs and batch * files) on Window 95 and Windows 98. * * This program is to be launched with redirected standard * handles. It will launch the command line specified 16-bit * console based application in the same console, forwarding * it's own redirected standard handles to the 16-bit child. * AKA solution to the problem described in KB: Q150956. */ #define WINDOWS_LEAN_AND_MEAN #include const char *usage = "This program is used by Python's os.pipe function to\n" "to work around a limitation in Windows 95/98. It is\n" "not designed to be used as stand-alone program."; int main(int argc, char *argv[]) { BOOL bRet; STARTUPINFO si; PROCESS_INFORMATION pi; if (argc != 2) { MessageBox(NULL, usage, argv[0], MB_OK); return 1; } /* Make child process use this app's standard files. */ ZeroMemory(&si, sizeof si); si.cb = sizeof si; si.dwFlags = STARTF_USESTDHANDLES; si.hStdInput = GetStdHandle(STD_INPUT_HANDLE); si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); si.hStdError = GetStdHandle(STD_ERROR_HANDLE); bRet = CreateProcess( NULL, argv[1], NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi ); if (bRet) { WaitForSingleObject(pi.hProcess, INFINITE); CloseHandle(pi.hProcess); CloseHandle(pi.hThread); return 0; } return 1; } From python-dev@python.org Sun Jul 9 14:10:48 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 06:10:48 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.143,2.144 Message-ID: <200007091310.GAA27888@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv27646/Modules Modified Files: posixmodule.c Log Message: - fixed pointer size test in spawn functions. also added cast to make sure Py_BuildValue gets the right thing. this change eliminates bogus return codes from successful spawn calls (e.g. 2167387144924954624 instead of 0). Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.143 retrieving revision 2.144 diff -C2 -r2.143 -r2.144 *** posixmodule.c 2000/07/08 22:48:53 2.143 --- posixmodule.c 2000/07/09 13:10:40 2.144 *************** *** 1541,1548 **** return posix_error(); else ! #if SIZEOF_LONG == SIZE_VOID_P ! return Py_BuildValue("l", spawnval); #else ! return Py_BuildValue("L", spawnval); #endif } --- 1541,1548 ---- return posix_error(); else ! #if SIZEOF_LONG == SIZEOF_VOID_P ! return Py_BuildValue("l", (long) spawnval); #else ! return Py_BuildValue("L", (LONG_LONG) spawnval); #endif } *************** *** 1649,1656 **** (void) posix_error(); else ! #if SIZEOF_LONG == SIZE_VOID_P ! res = Py_BuildValue("l", spawnval); #else ! res = Py_BuildValue("L", spawnval); #endif --- 1649,1656 ---- (void) posix_error(); else ! #if SIZEOF_LONG == SIZEOF_VOID_P ! res = Py_BuildValue("l", (long) spawnval); #else ! res = Py_BuildValue("L", (LONG_LONG) spawnval); #endif From python-dev@python.org Sun Jul 9 14:16:16 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 06:16:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.18,2.19 Message-ID: <200007091316.GAA28115@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv27974/Modules Modified Files: mmapmodule.c Log Message: - added (long) casts to a couple of Py_BuildValue calls, just for the sake of it. note that this only covers the unlikely case that size_t is smaller than a long; it's probably more likely that there are platforms out there where size_t is *larger* than a long, and mmapmodule cannot really deal with that today. Index: mmapmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** mmapmodule.c 2000/07/08 22:05:01 2.18 --- mmapmodule.c 2000/07/09 13:16:13 2.19 *************** *** 261,268 **** if (self->file_handle != (INT_PTR) -1) { return (Py_BuildValue ( ! "l", GetFileSize ((HANDLE)self->file_handle, NULL))); } else { ! return (Py_BuildValue ("l", self->size) ); } #endif /* MS_WIN32 */ --- 261,268 ---- if (self->file_handle != (INT_PTR) -1) { return (Py_BuildValue ( ! "l", (long) GetFileSize ((HANDLE)self->file_handle, NULL))); } else { ! return (Py_BuildValue ("l", (long) self->size) ); } #endif /* MS_WIN32 */ *************** *** 275,279 **** return NULL; } ! return (Py_BuildValue ("l", buf.st_size) ); } #endif /* UNIX */ --- 275,279 ---- return NULL; } ! return (Py_BuildValue ("l", (long) buf.st_size) ); } #endif /* UNIX */ *************** *** 372,376 **** if (!PyArg_ParseTuple(args, ":tell")) return NULL; ! return (Py_BuildValue ("l", self->pos) ); } --- 372,376 ---- if (!PyArg_ParseTuple(args, ":tell")) return NULL; ! return (Py_BuildValue ("l", (long) self->pos) ); } *************** *** 389,394 **** } else { #ifdef MS_WIN32 ! return (Py_BuildValue ( ! "l", FlushViewOfFile (self->data+offset, size))); #endif /* MS_WIN32 */ #ifdef UNIX --- 389,394 ---- } else { #ifdef MS_WIN32 ! return (Py_BuildValue("l", (long) ! FlushViewOfFile(self->data+offset, size))); #endif /* MS_WIN32 */ #ifdef UNIX *************** *** 401,405 **** return NULL; } ! return Py_BuildValue ("l", 0); #endif /* UNIX */ } --- 401,405 ---- return NULL; } ! return Py_BuildValue ("l", (long) 0); #endif /* UNIX */ } From python-dev@python.org Sun Jul 9 15:22:11 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 9 Jul 2000 07:22:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include object.h,2.61,2.62 Message-ID: <200007091422.HAA05320@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv5313 Modified Files: object.h Log Message: Remove legacy use of __SC__; no longer needed now that ANSI source is the standard for Python implementation. Index: object.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/object.h,v retrieving revision 2.61 retrieving revision 2.62 diff -C2 -r2.61 -r2.62 *** object.h 2000/07/08 00:46:19 2.61 --- object.h 2000/07/09 14:22:08 2.62 *************** *** 453,461 **** #ifdef BAD_STATIC_FORWARD #define staticforward extern - #ifdef __SC__ - #define statichere - #else #define statichere static - #endif /* __SC__ */ #else /* !BAD_STATIC_FORWARD */ #define staticforward static --- 453,457 ---- From python-dev@python.org Sun Jul 9 15:35:02 2000 From: python-dev@python.org (A.M. Kuchling) Date: Sun, 9 Jul 2000 07:35:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.30,2.31 Message-ID: <200007091435.HAA06025@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv5845 Modified Files: _cursesmodule.c Log Message: Patch from Peter Schneider-Kamp: convert curses module to ANSI prototypes, and substitute the conventional "args" instead of "arg". Index: _cursesmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v retrieving revision 2.30 retrieving revision 2.31 diff -C2 -r2.30 -r2.31 *** _cursesmodule.c 2000/07/06 19:38:49 2.30 --- _cursesmodule.c 2000/07/09 14:35:00 2.31 *************** *** 96,102 **** static PyObject * ! PyCursesCheckERR(code, fname) ! int code; ! char *fname; { if (code != ERR) { --- 96,100 ---- static PyObject * [...2407 lines suppressed...] ! PyCurses_Use_Env(PyObject *self, PyObject *args) { int flag; *************** *** 2227,2233 **** PyCursesInitialised ! switch(ARG_COUNT(arg)) { case 1: ! if (!PyArg_Parse(arg,"i;True(1), False(0)",&flag)) return NULL; break; --- 2071,2077 ---- PyCursesInitialised ! switch(ARG_COUNT(args)) { case 1: ! if (!PyArg_Parse(args,"i;True(1), False(0)",&flag)) return NULL; break; From python-dev@python.org Sun Jul 9 15:36:15 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 9 Jul 2000 07:36:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules parsermodule.c,2.43,2.44 Message-ID: <200007091436.HAA06088@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6079 Modified Files: parsermodule.c Log Message: Remove use of HAVE_OLD_CPP to support non-ANSI preprocessors. Index: parsermodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v retrieving revision 2.43 retrieving revision 2.44 diff -C2 -r2.43 -r2.44 *** parsermodule.c 2000/07/04 18:48:46 2.43 --- parsermodule.c 2000/07/09 14:36:13 2.44 *************** *** 859,867 **** - #ifdef HAVE_OLD_CPP - #define VALIDATER(n) static int validate_/**/n(node *tree) - #else #define VALIDATER(n) static int validate_##n(node *tree) - #endif --- 859,863 ---- From python-dev@python.org Sun Jul 9 15:39:31 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 9 Jul 2000 07:39:31 -0700 Subject: [Python-checkins] CVS: python/dist/src acconfig.h,1.32,1.33 config.h.in,2.61,2.62 configure,1.124,1.125 configure.in,1.133,1.134 Message-ID: <200007091439.HAA06369@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv6355 Modified Files: acconfig.h config.h.in configure configure.in Log Message: Remove setup of HAVE_OLD_CPP; it is no longer used in the Python sources. The actual test for it is only commented out in configure.in, so it can be re-enabled if we ever run across the need for it again. Index: acconfig.h =================================================================== RCS file: /cvsroot/python/python/dist/src/acconfig.h,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** acconfig.h 2000/07/08 04:17:21 1.32 --- acconfig.h 2000/07/09 14:39:28 1.33 *************** *** 60,66 **** #undef HAVE_LONG_LONG - /* Define this if you have a K&R style C preprocessor */ - #undef HAVE_OLD_CPP - /* Define if your compiler supports function prototypes */ #undef HAVE_PROTOTYPES --- 60,63 ---- Index: config.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/config.h.in,v retrieving revision 2.61 retrieving revision 2.62 diff -C2 -r2.61 -r2.62 *** config.h.in 2000/06/30 16:02:58 2.61 --- config.h.in 2000/07/09 14:39:28 2.62 *************** *** 128,134 **** #undef HAVE_LONG_LONG - /* Define this if you have a K&R style C preprocessor */ - #undef HAVE_OLD_CPP - /* Define if your compiler supports function prototypes */ #undef HAVE_PROTOTYPES --- 128,131 ---- *************** *** 231,234 **** --- 228,236 ---- /* Defined when any dynamic module loading is enabled */ #undef HAVE_DYNAMIC_LOADING + + /* Define if i>>j for signed int i does not extend the sign bit + when i < 0 + */ + #undef SIGNED_RIGHT_SHIFT_ZERO_FILLS /* The number of bytes in a char. */ Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.124 retrieving revision 1.125 diff -C2 -r1.124 -r1.125 *** configure 2000/07/05 10:38:09 1.124 --- configure 2000/07/09 14:39:28 1.125 *************** *** 1,8 **** #! /bin/sh ! # From configure.in Revision: 1.132 # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # --- 1,8 ---- #! /bin/sh [...4188 lines suppressed...] ! echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) --- 5759,5763 ---- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.14.1" exit 0 ;; -help | --help | --hel | --he | --h) *************** *** 6061,6064 **** chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 --- 6058,6061 ---- chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.133 retrieving revision 1.134 diff -C2 -r1.133 -r1.134 *** configure.in 2000/07/05 10:38:09 1.133 --- configure.in 2000/07/09 14:39:29 1.134 *************** *** 343,354 **** fi ! # check for ANSI or K&R ("traditional") preprocessor ! AC_MSG_CHECKING(for C preprocessor type) ! AC_TRY_COMPILE([ ! #define spam(name, doc) {#name, &name, #name "() -- " doc} ! int foo; ! struct {char *name; int *addr; char *doc;} desc = spam(foo, "something"); ! ], [;], cpp_type=ansi, AC_DEFINE(HAVE_OLD_CPP) cpp_type=traditional) ! AC_MSG_RESULT($cpp_type) # checks for header files --- 343,354 ---- fi ! dnl # check for ANSI or K&R ("traditional") preprocessor ! dnl AC_MSG_CHECKING(for C preprocessor type) ! dnl AC_TRY_COMPILE([ ! dnl #define spam(name, doc) {#name, &name, #name "() -- " doc} ! dnl int foo; ! dnl struct {char *name; int *addr; char *doc;} desc = spam(foo, "something"); ! dnl ], [;], cpp_type=ansi, AC_DEFINE(HAVE_OLD_CPP) cpp_type=traditional) ! dnl AC_MSG_RESULT($cpp_type) # checks for header files From python-dev@python.org Sun Jul 9 15:49:53 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 07:49:53 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.144,2.145 Message-ID: <200007091449.HAA07304@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv7152/Modules Modified Files: posixmodule.c Log Message: - improved os.popen support for windows, based on win32pipe by Bill Tutt. note: to run this on Windows 95/98, you need to have the w9xpopen.exe helper in the same directory as the python DLL. Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.144 retrieving revision 2.145 diff -C2 -r2.144 -r2.145 *** posixmodule.c 2000/07/09 13:10:40 2.144 --- posixmodule.c 2000/07/09 14:49:51 2.145 *************** *** 223,226 **** --- 223,227 ---- #include #include + #define WINDOWS_LEAN_AND_MEAN #include #ifdef MS_WIN32 *************** *** 354,357 **** --- 355,370 ---- } + #ifdef MS_WIN32 + static PyObject * + win32_error(char* function, char* filename) + { + /* XXX this could be improved */ + errno = GetLastError(); + if (filename) + return PyErr_SetFromErrnoWithFilename(PyExc_OSError, filename); + else + return PyErr_SetFromErrno(PyExc_OSError); + } + #endif #if defined(PYOS_OS2) *************** *** 846,850 **** if (errno == ERROR_FILE_NOT_FOUND) return PyList_New(0); ! return posix_error_with_filename(name); } do { --- 859,863 ---- if (errno == ERROR_FILE_NOT_FOUND) return PyList_New(0); ! return win32_error("FindFirstFile", name); } do { *************** *** 869,876 **** } while (FindNextFile(hFindFile, &FileData) == TRUE); ! if (FindClose(hFindFile) == FALSE) { ! errno = GetLastError(); ! return posix_error_with_filename(name); ! } return d; --- 882,887 ---- } while (FindNextFile(hFindFile, &FileData) == TRUE); ! if (FindClose(hFindFile) == FALSE) ! return win32_error("FindClose", name); return d; *************** *** 2109,2112 **** --- 2120,2563 ---- } + #elif defined(MS_WIN32) + + /* + * Portable 'popen' replacement for Win32. + * + * Written by Bill Tutt . Minor tweaks + * and 2.0 integration by Fredrik Lundh + */ + + #include + #include + #include + + /* These tell _PyPopen() wether to return 1, 2, or 3 file objects. */ + #define POPEN_1 1 + #define POPEN_2 2 + #define POPEN_3 3 + #define POPEN_4 4 + + static PyObject *_PyPopen(char *, int, int); + + /* popen that works from a GUI. + * + * The result of this function is a pipe (file) connected to the + * processes stdin or stdout, depending on the requested mode. + */ + + static PyObject * + posix_popen(PyObject *self, PyObject *args) + { + int bufsize = -1; + PyObject *f, *s; + int tm = 0; + + char *cmdstring; + char *mode = "r"; + if (!PyArg_ParseTuple(args, "s|s:popen", &cmdstring, &mode)) + return NULL; + + s = PyTuple_New(0); + + if (*mode == 'r') + tm = _O_RDONLY; + else if (*mode != 'w') { + PyErr_SetString(PyExc_ValueError, "mode must be 'r' or 'w'"); + return NULL; + } else + tm = _O_WRONLY; + + if (*(mode+1) == 't') + f = _PyPopen(cmdstring, tm | _O_TEXT , POPEN_1); + else if (*(mode+1) == 'b') + f = _PyPopen(cmdstring, tm | _O_BINARY , POPEN_1); + else + f = _PyPopen(cmdstring, tm | _O_TEXT, POPEN_1); + + return f; + } + + /* Variation on win32pipe.popen + * + * The result of this function is a pipe (file) connected to the + * process's stdin, and a pipe connected to the process's stdout. + */ + + static PyObject * + win32_popen2(PyObject *self, PyObject *args) + { + PyObject *f; + int tm=0; + + char *cmdstring; + char *mode = "t"; + if (!PyArg_ParseTuple(args, "s|s:popen2", &cmdstring, &mode)) + return NULL; + + if (*mode == 't') + tm = _O_TEXT; + else if (*mode != 'b') { + PyErr_SetString(PyExc_ValueError, "mode must be 't' or 'b'"); + return NULL; + } else + tm = _O_BINARY; + + f = _PyPopen(cmdstring, tm , POPEN_2); + + return f; + } + + /* + * Variation on + * The result of this function is 3 pipes - the process's stdin, + * stdout and stderr + * + */ + + static PyObject * + win32_popen3(PyObject *self, PyObject *args) + { + PyObject *f; + int tm = 0; + + char *cmdstring; + char *mode = "t"; + if (!PyArg_ParseTuple(args, "s|s:Popen3", &cmdstring, &mode)) + return NULL; + + if (*mode == 't') + tm = _O_TEXT; + else if (*mode != 'b') { + PyErr_SetString(PyExc_ValueError, "mode must be 't' or 'b'"); + return NULL; + } else + tm = _O_BINARY; + + f = _PyPopen(cmdstring, tm, POPEN_3); + + return f; + } + + /* + * Variation on win32pipe.popen + * + * The result of this function is 2 pipes - the processes stdin, + * and stdout+stderr combined as a single pipe. + */ + + static PyObject * + win32_popen4(PyObject *self, PyObject *args) + { + PyObject *f; + int tm = 0; + + char *cmdstring; + char *mode = "t"; + if (!PyArg_ParseTuple(args, "s|s:popen4", &cmdstring, &mode)) + return NULL; + + if (*mode == 't') + tm = _O_TEXT; + else if (*mode != 'b') { + PyErr_SetString(PyExc_ValueError, "mode must be 't' or 'b'"); + return NULL; + } else + tm = _O_BINARY; + + f = _PyPopen(cmdstring, tm , POPEN_4); + + return f; + } + + static int + _PyPopenCreateProcess(char *cmdstring, + HANDLE hStdin, + HANDLE hStdout, + HANDLE hStderr) + { + PROCESS_INFORMATION piProcInfo; + STARTUPINFO siStartInfo; + char *s1,*s2, *s3 = " /c "; + const char *szConsoleSpawn = "w9xpopen.exe \""; + int i; + int x; + + if (i = GetEnvironmentVariable("COMSPEC",NULL,0)) { + s1 = (char *)_alloca(i); + if (!(x = GetEnvironmentVariable("COMSPEC", s1, i))) + return x; + if (GetVersion() < 0x80000000) { + /* + * NT/2000 + */ + x = i + strlen(s3) + strlen(cmdstring) + 1; + s2 = (char *)_alloca(x); + ZeroMemory(s2, x); + sprintf(s2, "%s%s%s", s1, s3, cmdstring); + } + else { + /* + * Oh gag, we're on Win9x. Use the workaround listed in + * KB: Q150956 + */ + char modulepath[256]; + GetModuleFileName(NULL, modulepath, sizeof(modulepath)); + for (i = x = 0; modulepath[i]; i++) + if (modulepath[i] == '\\') + x = i+1; + modulepath[x] = '\0'; + x = i + strlen(s3) + strlen(cmdstring) + 1 + + strlen(modulepath) + + strlen(szConsoleSpawn) + 1; + s2 = (char *)_alloca(x); + ZeroMemory(s2, x); + sprintf( + s2, + "%s%s%s%s%s\"", + modulepath, + szConsoleSpawn, + s1, + s3, + cmdstring); + } + } + + /* Could be an else here to try cmd.exe / command.com in the path + Now we'll just error out.. */ + else + return -1; + + ZeroMemory(&siStartInfo, sizeof(STARTUPINFO)); + siStartInfo.cb = sizeof(STARTUPINFO); + siStartInfo.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW; + siStartInfo.hStdInput = hStdin; + siStartInfo.hStdOutput = hStdout; + siStartInfo.hStdError = hStderr; + siStartInfo.wShowWindow = SW_HIDE; + + if (CreateProcess(NULL, + s2, + NULL, + NULL, + TRUE, + CREATE_NEW_CONSOLE, + NULL, + NULL, + &siStartInfo, + &piProcInfo) ) { + /* Close the handles now so anyone waiting is woken. */ + CloseHandle(piProcInfo.hProcess); + CloseHandle(piProcInfo.hThread); + return TRUE; + } + return FALSE; + } + + /* The following code is based off of KB: Q190351 */ + + static PyObject * + _PyPopen(char *cmdstring, int mode, int n) + { + HANDLE hChildStdinRd, hChildStdinWr, hChildStdoutRd, hChildStdoutWr, + hChildStderrRd, hChildStderrWr, hChildStdinWrDup, hChildStdoutRdDup, + hChildStderrRdDup; /* hChildStdoutWrDup; */ + + SECURITY_ATTRIBUTES saAttr; + BOOL fSuccess; + int fd1, fd2, fd3; + FILE *f1, *f2, *f3; + PyObject *f; + + saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); + saAttr.bInheritHandle = TRUE; + saAttr.lpSecurityDescriptor = NULL; + + if (!CreatePipe(&hChildStdinRd, &hChildStdinWr, &saAttr, 0)) + return win32_error("CreatePipe", NULL); + + /* Create new output read handle and the input write handle. Set + * the inheritance properties to FALSE. Otherwise, the child inherits + * the these handles; resulting in non-closeable handles to the pipes + * being created. */ + fSuccess = DuplicateHandle(GetCurrentProcess(), hChildStdinWr, + GetCurrentProcess(), &hChildStdinWrDup, 0, + FALSE, + DUPLICATE_SAME_ACCESS); + if (!fSuccess) + return win32_error("DuplicateHandle", NULL); + + /* Close the inheritable version of ChildStdin + that we're using. */ + CloseHandle(hChildStdinWr); + + if (!CreatePipe(&hChildStdoutRd, &hChildStdoutWr, &saAttr, 0)) + return win32_error("CreatePipe", NULL); + + fSuccess = DuplicateHandle(GetCurrentProcess(), hChildStdoutRd, + GetCurrentProcess(), &hChildStdoutRdDup, 0, + FALSE, + DUPLICATE_SAME_ACCESS); + if (!fSuccess) + return win32_error("DuplicateHandle", NULL); + + /* Close the inheritable version of ChildStdout + that we're using. */ + CloseHandle(hChildStdoutRd); + + if (n != POPEN_4) { + if (!CreatePipe(&hChildStderrRd, &hChildStderrWr, &saAttr, 0)) + return win32_error("CreatePipe", NULL); + fSuccess = DuplicateHandle(GetCurrentProcess(), hChildStderrRd, + GetCurrentProcess(), &hChildStderrRdDup, 0, + FALSE, + DUPLICATE_SAME_ACCESS); + if (!fSuccess) + return win32_error("DuplicateHandle", NULL); + /* Close the inheritable version of ChildStdErr that we're using. */ + CloseHandle(hChildStderrRd); + } + + switch (n) { + case POPEN_1: + switch (mode & (_O_RDONLY | _O_TEXT | _O_BINARY | _O_WRONLY)) { + case _O_WRONLY | _O_TEXT: + /* Case for writing to child Stdin in text mode. */ + fd1 = _open_osfhandle((long)hChildStdinWrDup, mode); + f1 = _fdopen(fd1, "w"); + f = PyFile_FromFile(f1, cmdstring, "w", fclose); + PyFile_SetBufSize(f, 0); + /* We don't care about these pipes anymore, so close them. */ + CloseHandle(hChildStdoutRdDup); + CloseHandle(hChildStderrRdDup); + break; + + case _O_RDONLY | _O_TEXT: + /* Case for reading from child Stdout in text mode. */ + fd1 = _open_osfhandle((long)hChildStdoutRdDup, mode); + f1 = _fdopen(fd1, "r"); + f = PyFile_FromFile(f1, cmdstring, "r", fclose); + PyFile_SetBufSize(f, 0); + /* We don't care about these pipes anymore, so close them. */ + CloseHandle(hChildStdinWrDup); + CloseHandle(hChildStderrRdDup); + break; + + case _O_RDONLY | _O_BINARY: + /* Case for readinig from child Stdout in binary mode. */ + fd1 = _open_osfhandle((long)hChildStdoutRdDup, mode); + f1 = _fdopen(fd1, "rb"); + f = PyFile_FromFile(f1, cmdstring, "rb", fclose); + PyFile_SetBufSize(f, 0); + /* We don't care about these pipes anymore, so close them. */ + CloseHandle(hChildStdinWrDup); + CloseHandle(hChildStderrRdDup); + break; + + case _O_WRONLY | _O_BINARY: + /* Case for writing to child Stdin in binary mode. */ + fd1 = _open_osfhandle((long)hChildStdinWrDup, mode); + f1 = _fdopen(fd1, "wb"); + f = PyFile_FromFile(f1, cmdstring, "wb", fclose); + PyFile_SetBufSize(f, 0); + /* We don't care about these pipes anymore, so close them. */ + CloseHandle(hChildStdoutRdDup); + CloseHandle(hChildStderrRdDup); + break; + } + break; + + case POPEN_2: + case POPEN_4: + { + char *m1, *m2; + PyObject *p1, *p2; + + if (mode && _O_TEXT) { + m1 = "r"; + m2 = "w"; + } else { + m1 = "rb"; + m2 = "wb"; + } + + fd1 = _open_osfhandle((long)hChildStdinWrDup, mode); + f1 = _fdopen(fd1, m2); + fd2 = _open_osfhandle((long)hChildStdoutRdDup, mode); + f2 = _fdopen(fd2, m1); + p1 = PyFile_FromFile(f1, cmdstring, m2, fclose); + PyFile_SetBufSize(p1, 0); + p2 = PyFile_FromFile(f2, cmdstring, m1, fclose); + PyFile_SetBufSize(p2, 0); + + if (n != 4) + CloseHandle(hChildStderrRdDup); + + f = Py_BuildValue("OO",p1,p2); + break; + } + + case POPEN_3: + { + char *m1, *m2; + PyObject *p1, *p2, *p3; + + if (mode && _O_TEXT) { + m1 = "r"; + m2 = "w"; + } else { + m1 = "rb"; + m2 = "wb"; + } + + fd1 = _open_osfhandle((long)hChildStdinWrDup, mode); + f1 = _fdopen(fd1, m2); + fd2 = _open_osfhandle((long)hChildStdoutRdDup, mode); + f2 = _fdopen(fd2, m1); + fd3 = _open_osfhandle((long)hChildStderrRdDup, mode); + f3 = _fdopen(fd3, m1); + p1 = PyFile_FromFile(f1, cmdstring, m2, fclose); + p2 = PyFile_FromFile(f2, cmdstring, m1, fclose); + p3 = PyFile_FromFile(f3, cmdstring, m1, fclose); + PyFile_SetBufSize(p1, 0); + PyFile_SetBufSize(p2, 0); + PyFile_SetBufSize(p3, 0); + f = Py_BuildValue("OOO",p1,p2,p3); + break; + } + } + + if (n == POPEN_4) { + if (!_PyPopenCreateProcess(cmdstring, + hChildStdinRd, + hChildStdoutWr, + hChildStdoutWr)) + return win32_error("CreateProcess", NULL); + } + else { + if (!_PyPopenCreateProcess(cmdstring, + hChildStdinRd, + hChildStdoutWr, + hChildStderrWr)) + return win32_error("CreateProcess", NULL); + } + + /* Child is launched. Close the parents copy of those pipe + * handles that only the child should have open. You need to + * make sure that no handles to the write end of the output pipe + * are maintained in this process or else the pipe will not close + * when the child process exits and the ReadFile will hang. */ + + if (!CloseHandle(hChildStdinRd)) + return win32_error("CloseHandle", NULL); + + if (!CloseHandle(hChildStdoutWr)) + return win32_error("CloseHandle", NULL); + + if ((n != 4) && (!CloseHandle(hChildStderrWr))) + return win32_error("CloseHandle", NULL); + + return f; + } #else static PyObject * *************** *** 2729,2733 **** Py_END_ALLOW_THREADS if (!ok) ! return posix_error(); read_fd = _open_osfhandle((intptr_t)read, 0); write_fd = _open_osfhandle((intptr_t)write, 1); --- 3180,3184 ---- Py_END_ALLOW_THREADS if (!ok) ! return win32_error("CreatePipe", NULL); read_fd = _open_osfhandle((intptr_t)read, 0); write_fd = _open_osfhandle((intptr_t)write, 1); *************** *** 4424,4427 **** --- 4875,4883 ---- #ifdef HAVE_POPEN {"popen", posix_popen, METH_VARARGS, posix_popen__doc__}, + #ifdef MS_WIN32 + {"popen2", win32_popen2, METH_VARARGS}, + {"popen3", win32_popen3, METH_VARARGS}, + {"popen4", win32_popen4, METH_VARARGS}, + #endif #endif /* HAVE_POPEN */ #ifdef HAVE_SETUID From python-dev@python.org Sun Jul 9 16:09:58 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 08:09:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.114,1.115 Message-ID: <200007091509.IAA14596@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv14488/Modules Modified Files: socketmodule.c Log Message: - ANSI-ification (patch #100770 by Peter Schneider-Kamp) Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.114 retrieving revision 1.115 diff -C2 -r1.114 -r1.115 *** socketmodule.c 2000/07/09 03:09:55 1.114 --- socketmodule.c 2000/07/09 15:09:56 1.115 *************** *** 185,193 **** #endif /* USE_SSL */ - /* Here we have some hacks to choose between K&R or ANSI style function - definitions. For NT to build this as an extension module (ie, DLL) - it must be compiled by the C++ compiler, as it takes the address of - a static data item exported from the main Python DLL. - */ #if defined(MS_WINDOWS) || defined(__BEOS__) /* BeOS suffers from the same socket dichotomy as Win32... - [cjh] */ --- 185,188 ---- *************** *** 195,199 **** #define SOCKETCLOSE closesocket #define NO_DUP /* Actually it exists on NT 3.5, but what the heck... */ - #define FORCE_ANSI_FUNC_DEFS #endif --- 190,193 ---- *************** *** 215,219 **** #define SOCKETCLOSE soclose #define NO_DUP /* Sockets are Not Actual File Handles under OS/2 */ - #define FORCE_ANSI_FUNC_DEFS #endif --- 209,212 ---- *************** *** 222,263 **** #endif - #ifdef FORCE_ANSI_FUNC_DEFS - #define BUILD_FUNC_DEF_1( fnname, arg1type, arg1name ) \ - fnname( arg1type arg1name ) - - #define BUILD_FUNC_DEF_2( fnname, arg1type, arg1name, arg2type, arg2name ) \ - fnname( arg1type arg1name, arg2type arg2name ) - - #define BUILD_FUNC_DEF_3( fnname, arg1type, arg1name, arg2type, arg2name , arg3type, arg3name ) \ - fnname( arg1type arg1name, arg2type arg2name, arg3type arg3name ) - - #define BUILD_FUNC_DEF_4( fnname, arg1type, arg1name, arg2type, arg2name , arg3type, arg3name, arg4type, arg4name ) \ - fnname( arg1type arg1name, arg2type arg2name, arg3type arg3name, arg4type arg4name ) - - #else /* !FORCE_ANSI_FN_DEFS */ - #define BUILD_FUNC_DEF_1( fnname, arg1type, arg1name ) \ - fnname( arg1name ) \ - arg1type arg1name; - - #define BUILD_FUNC_DEF_2( fnname, arg1type, arg1name, arg2type, arg2name ) \ - fnname( arg1name, arg2name ) \ - arg1type arg1name; \ - arg2type arg2name; - - #define BUILD_FUNC_DEF_3( fnname, arg1type, arg1name, arg2type, arg2name, arg3type, arg3name ) \ - fnname( arg1name, arg2name, arg3name ) \ - arg1type arg1name; \ - arg2type arg2name; \ - arg3type arg3name; - - #define BUILD_FUNC_DEF_4( fnname, arg1type, arg1name, arg2type, arg2name, arg3type, arg3name, arg4type, arg4name ) \ - fnname( arg1name, arg2name, arg3name, arg4name ) \ - arg1type arg1name; \ - arg2type arg2name; \ - arg3type arg3name; \ - arg4type arg4name; - - #endif /* !FORCE_ANSI_FN_DEFS */ - /* Global variable holding the exception type for errors detected by this module (but not argument type or memory errors, etc.). */ --- 215,218 ---- *************** *** 377,381 **** static PySocketSockObject * ! BUILD_FUNC_DEF_4(PySocketSock_New,SOCKET_T,fd, int,family, int,type, int,proto) { PySocketSockObject *s; --- 332,336 ---- static PySocketSockObject * ! PySocketSock_New(SOCKET_T fd, int family, int type, int proto) { PySocketSockObject *s; *************** *** 406,410 **** static int ! BUILD_FUNC_DEF_2(setipaddr, char*,name, struct sockaddr_in *,addr_ret) { struct hostent *hp; --- 361,365 ---- static int ! setipaddr(char* name, struct sockaddr_in * addr_ret) { struct hostent *hp; *************** *** 489,493 **** static PyObject * ! BUILD_FUNC_DEF_1(makeipaddr, struct sockaddr_in *,addr) { long x = ntohl(addr->sin_addr.s_addr); --- 444,448 ---- static PyObject * ! makeipaddr(struct sockaddr_in *addr) { long x = ntohl(addr->sin_addr.s_addr); *************** *** 507,511 **** /*ARGSUSED*/ static PyObject * ! BUILD_FUNC_DEF_2(makesockaddr,struct sockaddr *,addr, int,addrlen) { if (addrlen == 0) { --- 462,466 ---- /*ARGSUSED*/ static PyObject * ! makesockaddr(struct sockaddr *addr, int addrlen) { if (addrlen == 0) { *************** *** 562,567 **** static int ! BUILD_FUNC_DEF_4( ! getsockaddrarg,PySocketSockObject *,s, PyObject *,args, struct sockaddr **,addr_ret, int *,len_ret) { switch (s->sock_family) { --- 517,521 ---- static int ! getsockaddrarg(PySocketSockObject *s, PyObject *args, struct sockaddr **addr_ret, int *len_ret) { switch (s->sock_family) { *************** *** 622,626 **** static int ! BUILD_FUNC_DEF_2(getsockaddrlen,PySocketSockObject *,s, int *,len_ret) { switch (s->sock_family) { --- 576,580 ---- static int ! getsockaddrlen(PySocketSockObject *s, int *len_ret) { switch (s->sock_family) { *************** *** 653,657 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_accept,PySocketSockObject *,s, PyObject *,args) { char addrbuf[256]; --- 607,611 ---- static PyObject * ! PySocketSock_accept(PySocketSockObject *s, PyObject *args) { char addrbuf[256]; *************** *** 709,713 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_setblocking,PySocketSockObject*,s,PyObject*,args) { int block; --- 663,667 ---- static PyObject * ! PySocketSock_setblocking(PySocketSockObject *s, PyObject *args) { int block; *************** *** 759,763 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_setsockopt,PySocketSockObject *,s, PyObject *,args) { int level; --- 713,717 ---- static PyObject * ! PySocketSock_setsockopt(PySocketSockObject *s, PyObject *args) { int level; *************** *** 799,803 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_getsockopt,PySocketSockObject *,s, PyObject *,args) { int level; --- 753,757 ---- static PyObject * ! PySocketSock_getsockopt(PySocketSockObject *s, PyObject *args) { int level; *************** *** 856,860 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_bind,PySocketSockObject *,s, PyObject *,args) { struct sockaddr *addr; --- 810,814 ---- static PyObject * ! PySocketSock_bind(PySocketSockObject *s, PyObject *args) { struct sockaddr *addr; *************** *** 887,891 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_close,PySocketSockObject *,s, PyObject *,args) { if (!PyArg_ParseTuple(args, ":close")) --- 841,845 ---- static PyObject * ! PySocketSock_close(PySocketSockObject *s, PyObject *args) { if (!PyArg_ParseTuple(args, ":close")) *************** *** 910,914 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_connect,PySocketSockObject *,s, PyObject *,args) { struct sockaddr *addr; --- 864,868 ---- static PyObject * ! PySocketSock_connect(PySocketSockObject *s, PyObject *args) { struct sockaddr *addr; *************** *** 939,943 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_connect_ex,PySocketSockObject *,s, PyObject *,args) { struct sockaddr *addr; --- 893,897 ---- static PyObject * ! PySocketSock_connect_ex(PySocketSockObject *s, PyObject *args) { struct sockaddr *addr; *************** *** 967,971 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_fileno,PySocketSockObject *,s, PyObject *,args) { if (!PyArg_ParseTuple(args, ":fileno")) --- 921,925 ---- static PyObject * ! PySocketSock_fileno(PySocketSockObject *s, PyObject *args) { if (!PyArg_ParseTuple(args, ":fileno")) *************** *** 988,992 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_dup,PySocketSockObject *,s, PyObject *,args) { SOCKET_T newfd; --- 942,946 ---- static PyObject * ! PySocketSock_dup(PySocketSockObject *s, PyObject *args) { SOCKET_T newfd; *************** *** 1017,1021 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_getsockname,PySocketSockObject *,s, PyObject *,args) { char addrbuf[256]; --- 971,975 ---- static PyObject * ! PySocketSock_getsockname(PySocketSockObject *s, PyObject *args) { char addrbuf[256]; *************** *** 1047,1051 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_getpeername,PySocketSockObject *,s, PyObject *,args) { char addrbuf[256]; --- 1001,1005 ---- static PyObject * ! PySocketSock_getpeername(PySocketSockObject *s, PyObject *args) { char addrbuf[256]; *************** *** 1077,1081 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_listen,PySocketSockObject *,s, PyObject *,args) { int backlog; --- 1031,1035 ---- static PyObject * ! PySocketSock_listen(PySocketSockObject *s, PyObject *args) { int backlog; *************** *** 1111,1115 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_makefile,PySocketSockObject *,s, PyObject *,args) { extern int fclose(FILE *); --- 1065,1069 ---- static PyObject * ! PySocketSock_makefile(PySocketSockObject *s, PyObject *args) { extern int fclose(FILE *); *************** *** 1155,1159 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_recv,PySocketSockObject *,s, PyObject *,args) { int len, n, flags = 0; --- 1109,1113 ---- static PyObject * ! PySocketSock_recv(PySocketSockObject *s, PyObject *args) { int len, n, flags = 0; *************** *** 1188,1192 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_recvfrom,PySocketSockObject *,s, PyObject *,args) { char addrbuf[256]; --- 1142,1146 ---- static PyObject * ! PySocketSock_recvfrom(PySocketSockObject *s, PyObject *args) { char addrbuf[256]; *************** *** 1243,1247 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_send,PySocketSockObject *,s, PyObject *,args) { char *buf; --- 1197,1201 ---- static PyObject * ! PySocketSock_send(PySocketSockObject *s, PyObject *args) { char *buf; *************** *** 1267,1271 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_sendto,PySocketSockObject *,s, PyObject *,args) { PyObject *addro; --- 1221,1225 ---- static PyObject * ! PySocketSock_sendto(PySocketSockObject *s, PyObject *args) { PyObject *addro; *************** *** 1300,1304 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_shutdown,PySocketSockObject *,s, PyObject *,args) { int how; --- 1254,1258 ---- static PyObject * ! PySocketSock_shutdown(PySocketSockObject *s, PyObject *args) { int how; *************** *** 1377,1381 **** static void ! BUILD_FUNC_DEF_1(PySocketSock_dealloc,PySocketSockObject *,s) { if (s->sock_fd != -1) --- 1331,1335 ---- static void ! PySocketSock_dealloc(PySocketSockObject *s) { if (s->sock_fd != -1) *************** *** 1388,1392 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocketSock_getattr,PySocketSockObject *,s, char *,name) { return Py_FindMethod(PySocketSock_methods, (PyObject *) s, name); --- 1342,1346 ---- static PyObject * ! PySocketSock_getattr(PySocketSockObject *s, char *name) { return Py_FindMethod(PySocketSock_methods, (PyObject *) s, name); *************** *** 1395,1399 **** static PyObject * ! BUILD_FUNC_DEF_1(PySocketSock_repr,PySocketSockObject *,s) { char buf[512]; --- 1349,1353 ---- static PyObject * ! PySocketSock_repr(PySocketSockObject *s) { char buf[512]; *************** *** 1439,1443 **** /*ARGSUSED*/ static PyObject * ! BUILD_FUNC_DEF_2(PySocket_gethostname,PyObject *,self, PyObject *,args) { char buf[1024]; --- 1393,1397 ---- /*ARGSUSED*/ static PyObject * ! PySocket_gethostname(PyObject *self, PyObject *args) { char buf[1024]; *************** *** 1464,1468 **** /*ARGSUSED*/ static PyObject * ! BUILD_FUNC_DEF_2(PySocket_gethostbyname,PyObject *,self, PyObject *,args) { char *name; --- 1418,1422 ---- /*ARGSUSED*/ static PyObject * ! PySocket_gethostbyname(PyObject *self, PyObject *args) { char *name; *************** *** 1540,1544 **** /*ARGSUSED*/ static PyObject * ! BUILD_FUNC_DEF_2(PySocket_gethostbyname_ex,PyObject *,self, PyObject *,args) { char *name; --- 1494,1498 ---- /*ARGSUSED*/ static PyObject * ! PySocket_gethostbyname_ex(PyObject *self, PyObject *args) { char *name; *************** *** 1599,1603 **** /*ARGSUSED*/ static PyObject * ! BUILD_FUNC_DEF_2(PySocket_gethostbyaddr,PyObject *,self, PyObject *, args) { struct sockaddr_in addr; --- 1553,1557 ---- /*ARGSUSED*/ static PyObject * ! PySocket_gethostbyaddr(PyObject *self, PyObject *args) { struct sockaddr_in addr; *************** *** 1671,1675 **** /*ARGSUSED*/ static PyObject * ! BUILD_FUNC_DEF_2(PySocket_getservbyname,PyObject *,self, PyObject *,args) { char *name, *proto; --- 1625,1629 ---- /*ARGSUSED*/ static PyObject * ! PySocket_getservbyname(PyObject *self, PyObject *args) { char *name, *proto; *************** *** 1700,1704 **** /*ARGSUSED*/ static PyObject * ! BUILD_FUNC_DEF_2(PySocket_getprotobyname,PyObject *,self, PyObject *,args) { char *name; --- 1654,1658 ---- /*ARGSUSED*/ static PyObject * ! PySocket_getprotobyname(PyObject *self, PyObject *args) { char *name; *************** *** 1734,1738 **** /*ARGSUSED*/ static PyObject * ! BUILD_FUNC_DEF_2(PySocket_socket,PyObject *,self, PyObject *,args) { PySocketSockObject *s; --- 1688,1692 ---- /*ARGSUSED*/ static PyObject * ! PySocket_socket(PyObject *self, PyObject *args) { PySocketSockObject *s; *************** *** 1780,1784 **** /*ARGSUSED*/ static PyObject * ! BUILD_FUNC_DEF_2(PySocket_fromfd,PyObject *,self, PyObject *,args) { PySocketSockObject *s; --- 1734,1738 ---- /*ARGSUSED*/ static PyObject * ! PySocket_fromfd(PyObject *self, PyObject *args) { PySocketSockObject *s; *************** *** 1811,1815 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocket_ntohs, PyObject *, self, PyObject *, args) { int x1, x2; --- 1765,1769 ---- static PyObject * ! PySocket_ntohs(PyObject *self, PyObject *args) { int x1, x2; *************** *** 1829,1833 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocket_ntohl, PyObject *, self, PyObject *, args) { int x1, x2; --- 1783,1787 ---- static PyObject * ! PySocket_ntohl(PyObject *self, PyObject *args) { int x1, x2; *************** *** 1847,1851 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocket_htons, PyObject *, self, PyObject *, args) { int x1, x2; --- 1801,1805 ---- static PyObject * ! PySocket_htons(PyObject *self, PyObject *args) { int x1, x2; *************** *** 1865,1869 **** static PyObject * ! BUILD_FUNC_DEF_2(PySocket_htonl, PyObject *, self, PyObject *, args) { int x1, x2; --- 1819,1823 ---- static PyObject * ! PySocket_htonl(PyObject *self, PyObject *args) { int x1, x2; *************** *** 1895,1899 **** static PyObject* ! BUILD_FUNC_DEF_2(PySocket_inet_aton, PyObject *, self, PyObject *, args) { #ifndef INADDR_NONE --- 1849,1853 ---- static PyObject* ! PySocket_inet_aton(PyObject *self, PyObject *args) { #ifndef INADDR_NONE *************** *** 1930,1934 **** static PyObject* ! BUILD_FUNC_DEF_2(PySocket_inet_ntoa, PyObject *, self, PyObject *, args) { char *packed_str; --- 1884,1888 ---- static PyObject* ! PySocket_inet_ntoa(PyObject *self, PyObject *args) { char *packed_str; *************** *** 1956,1961 **** /* This is a C function to be called for new object initialization */ static SSLObject * ! BUILD_FUNC_DEF_3(newSSLObject, ! PySocketSockObject *,Sock, char*,key_file, char*,cert_file) { SSLObject *self; --- 1910,1914 ---- /* This is a C function to be called for new object initialization */ static SSLObject * ! newSSLObject(PySocketSockObject *Sock, char *key_file, char *cert_file) { SSLObject *self; *************** *** 2047,2051 **** /* This is the Python function called for new object initialization */ static PyObject * ! BUILD_FUNC_DEF_2(PySocket_ssl, PyObject *, self, PyObject *, args) { SSLObject *rv; --- 2000,2004 ---- /* This is the Python function called for new object initialization */ static PyObject * ! PySocket_ssl(PyObject *self, PyObject *args) { SSLObject *rv; *************** *** 2069,2073 **** static PyObject * ! BUILD_FUNC_DEF_2(SSL_server, SSLObject *, self, PyObject *, args) { return PyString_FromString(self->server); --- 2022,2026 ---- static PyObject * ! SSL_server(SSLObject *self, PyObject *args) { return PyString_FromString(self->server); *************** *** 2075,2079 **** static PyObject * ! BUILD_FUNC_DEF_2(SSL_issuer, SSLObject *, self, PyObject *, args) { return PyString_FromString(self->issuer); --- 2028,2032 ---- static PyObject * ! SSL_issuer(SSLObject *self, PyObject *args) { return PyString_FromString(self->issuer); *************** *** 2218,2222 **** */ static void ! BUILD_FUNC_DEF_3(insint,PyObject *,d, char *,name, int,value) { PyObject *v = PyInt_FromLong((long) value); --- 2171,2175 ---- */ static void ! insint(PyObject *d, char *name, int value) { PyObject *v = PyInt_FromLong((long) value); From python-dev@python.org Sun Jul 9 16:14:54 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 08:14:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules errnomodule.c,2.11,2.12 Message-ID: <200007091514.IAA14844@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv14811/Modules Modified Files: errnomodule.c Log Message: - ANSI-fication (patch #100784 by Peter Schneider-Kamp) Index: errnomodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/errnomodule.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** errnomodule.c 2000/06/30 23:58:05 2.11 --- errnomodule.c 2000/07/09 15:14:52 2.12 *************** *** 34,42 **** static void ! _inscode(d, de, name, code) ! PyObject *d; ! PyObject *de; ! char *name; ! int code; { PyObject *u; --- 34,38 ---- static void ! _inscode(PyObject *d, PyObject *de, char *name, int code) { PyObject *u; From python-dev@python.org Sun Jul 9 16:16:53 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 9 Jul 2000 08:16:53 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects intobject.c,2.46,2.47 listobject.c,2.79,2.80 Message-ID: <200007091516.IAA14941@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv14927 Modified Files: intobject.c listobject.c Log Message: ANSI-fication of the sources. Index: intobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/intobject.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** intobject.c 2000/07/08 04:17:21 2.46 --- intobject.c 2000/07/09 15:16:51 2.47 *************** *** 35,39 **** long ! PyInt_GetMax() { return LONG_MAX; /* To initialize sys.maxint */ --- 35,39 ---- long ! PyInt_GetMax(void) { return LONG_MAX; /* To initialize sys.maxint */ *************** *** 53,58 **** static PyObject * ! err_ovf(msg) ! char *msg; { PyErr_SetString(PyExc_OverflowError, msg); --- 53,57 ---- static PyObject * ! err_ovf(char *msg) { PyErr_SetString(PyExc_OverflowError, msg); *************** *** 85,89 **** static PyIntObject * ! fill_free_list() { PyIntObject *p, *q; --- 84,88 ---- static PyIntObject * ! fill_free_list(void) { PyIntObject *p, *q; *************** *** 121,126 **** PyObject * ! PyInt_FromLong(ival) ! long ival; { register PyIntObject *v; --- 120,124 ---- PyObject * ! PyInt_FromLong(long ival) { register PyIntObject *v; *************** *** 158,163 **** static void ! int_dealloc(v) ! PyIntObject *v; { v->ob_type = (struct _typeobject *)free_list; --- 156,160 ---- static void ! int_dealloc(PyIntObject *v) { v->ob_type = (struct _typeobject *)free_list; *************** *** 166,171 **** long ! PyInt_AsLong(op) ! register PyObject *op; { PyNumberMethods *nb; --- 163,167 ---- long ! PyInt_AsLong(register PyObject *op) { PyNumberMethods *nb; *************** *** 198,205 **** PyObject * ! PyInt_FromString(s, pend, base) ! char *s; ! char **pend; ! int base; { char *end; --- 194,198 ---- PyObject * ! PyInt_FromString(char *s, char **pend, int base) { char *end; *************** *** 240,247 **** PyObject * ! PyInt_FromUnicode(s, length, base) ! Py_UNICODE *s; ! int length; ! int base; { char buffer[256]; --- 233,237 ---- PyObject * ! PyInt_FromUnicode(Py_UNICODE *s, int length, int base) { char buffer[256]; *************** *** 261,268 **** /* ARGSUSED */ static int ! int_print(v, fp, flags) ! PyIntObject *v; ! FILE *fp; ! int flags; /* Not used but required by interface */ { fprintf(fp, "%ld", v->ob_ival); --- 251,256 ---- /* ARGSUSED */ static int ! int_print(PyIntObject *v, FILE *fp, int flags) ! /* flags -- not used but required by interface */ { fprintf(fp, "%ld", v->ob_ival); *************** *** 271,276 **** static PyObject * ! int_repr(v) ! PyIntObject *v; { char buf[20]; --- 259,263 ---- static PyObject * ! int_repr(PyIntObject *v) { char buf[20]; *************** *** 280,285 **** static int ! int_compare(v, w) ! PyIntObject *v, *w; { register long i = v->ob_ival; --- 267,271 ---- static int ! int_compare(PyIntObject *v, PyIntObject *w) { register long i = v->ob_ival; *************** *** 289,294 **** static long ! int_hash(v) ! PyIntObject *v; { /* XXX If this is changed, you also need to change the way --- 275,279 ---- static long ! int_hash(PyIntObject *v) { /* XXX If this is changed, you also need to change the way *************** *** 301,307 **** static PyObject * ! int_add(v, w) ! PyIntObject *v; ! PyIntObject *w; { register long a, b, x; --- 286,290 ---- static PyObject * ! int_add(PyIntObject *v, PyIntObject *w) { register long a, b, x; *************** *** 315,321 **** static PyObject * ! int_sub(v, w) ! PyIntObject *v; ! PyIntObject *w; { register long a, b, x; --- 298,302 ---- static PyObject * ! int_sub(PyIntObject *v, PyIntObject *w) { register long a, b, x; *************** *** 358,364 **** static PyObject * ! int_mul(v, w) ! PyIntObject *v; ! PyIntObject *w; { long a, b, ah, bh, x, y; --- 339,343 ---- static PyObject * ! int_mul(PyIntObject *v, PyIntObject *w) { long a, b, ah, bh, x, y; *************** *** 459,465 **** static int ! i_divmod(x, y, p_xdivy, p_xmody) ! register PyIntObject *x, *y; ! long *p_xdivy, *p_xmody; { long xi = x->ob_ival; --- 438,443 ---- static int ! i_divmod(register PyIntObject *x, register PyIntObject *y, ! long *p_xdivy, long *p_xmody) { long xi = x->ob_ival; *************** *** 501,507 **** static PyObject * ! int_div(x, y) ! PyIntObject *x; ! PyIntObject *y; { long d, m; --- 479,483 ---- static PyObject * ! int_div(PyIntObject *x, PyIntObject *y) { long d, m; *************** *** 512,518 **** static PyObject * ! int_mod(x, y) ! PyIntObject *x; ! PyIntObject *y; { long d, m; --- 488,492 ---- static PyObject * ! int_mod(PyIntObject *x, PyIntObject *y) { long d, m; *************** *** 523,529 **** static PyObject * ! int_divmod(x, y) ! PyIntObject *x; ! PyIntObject *y; { long d, m; --- 497,501 ---- static PyObject * ! int_divmod(PyIntObject *x, PyIntObject *y) { long d, m; *************** *** 534,541 **** static PyObject * ! int_pow(v, w, z) ! PyIntObject *v; ! PyIntObject *w; ! PyIntObject *z; { #if 1 --- 506,510 ---- static PyObject * ! int_pow(PyIntObject *v, PyIntObject *w, PyIntObject *z) { #if 1 *************** *** 633,638 **** static PyObject * ! int_neg(v) ! PyIntObject *v; { register long a, x; --- 602,606 ---- static PyObject * ! int_neg(PyIntObject *v) { register long a, x; *************** *** 645,650 **** static PyObject * ! int_pos(v) ! PyIntObject *v; { Py_INCREF(v); --- 613,617 ---- static PyObject * ! int_pos(PyIntObject *v) { Py_INCREF(v); *************** *** 653,658 **** static PyObject * ! int_abs(v) ! PyIntObject *v; { if (v->ob_ival >= 0) --- 620,624 ---- static PyObject * ! int_abs(PyIntObject *v) { if (v->ob_ival >= 0) *************** *** 663,668 **** static int ! int_nonzero(v) ! PyIntObject *v; { return v->ob_ival != 0; --- 629,633 ---- static int ! int_nonzero(PyIntObject *v) { return v->ob_ival != 0; *************** *** 670,675 **** static PyObject * ! int_invert(v) ! PyIntObject *v; { return PyInt_FromLong(~v->ob_ival); --- 635,639 ---- static PyObject * ! int_invert(PyIntObject *v) { return PyInt_FromLong(~v->ob_ival); *************** *** 677,683 **** static PyObject * ! int_lshift(v, w) ! PyIntObject *v; ! PyIntObject *w; { register long a, b; --- 641,645 ---- static PyObject * ! int_lshift(PyIntObject *v, PyIntObject *w) { register long a, b; *************** *** 700,706 **** static PyObject * ! int_rshift(v, w) ! PyIntObject *v; ! PyIntObject *w; { register long a, b; --- 662,666 ---- static PyObject * ! int_rshift(PyIntObject *v, PyIntObject *w) { register long a, b; *************** *** 728,734 **** static PyObject * ! int_and(v, w) ! PyIntObject *v; ! PyIntObject *w; { register long a, b; --- 688,692 ---- static PyObject * ! int_and(PyIntObject *v, PyIntObject *w) { register long a, b; *************** *** 739,745 **** static PyObject * ! int_xor(v, w) ! PyIntObject *v; ! PyIntObject *w; { register long a, b; --- 697,701 ---- static PyObject * ! int_xor(PyIntObject *v, PyIntObject *w) { register long a, b; *************** *** 750,756 **** static PyObject * ! int_or(v, w) ! PyIntObject *v; ! PyIntObject *w; { register long a, b; --- 706,710 ---- static PyObject * ! int_or(PyIntObject *v, PyIntObject *w) { register long a, b; *************** *** 761,766 **** static PyObject * ! int_int(v) ! PyIntObject *v; { Py_INCREF(v); --- 715,719 ---- static PyObject * ! int_int(PyIntObject *v) { Py_INCREF(v); *************** *** 769,774 **** static PyObject * ! int_long(v) ! PyIntObject *v; { return PyLong_FromLong((v -> ob_ival)); --- 722,726 ---- static PyObject * ! int_long(PyIntObject *v) { return PyLong_FromLong((v -> ob_ival)); *************** *** 776,781 **** static PyObject * ! int_float(v) ! PyIntObject *v; { return PyFloat_FromDouble((double)(v -> ob_ival)); --- 728,732 ---- static PyObject * ! int_float(PyIntObject *v) { return PyFloat_FromDouble((double)(v -> ob_ival)); *************** *** 783,788 **** static PyObject * ! int_oct(v) ! PyIntObject *v; { char buf[100]; --- 734,738 ---- static PyObject * ! int_oct(PyIntObject *v) { char buf[100]; *************** *** 796,801 **** static PyObject * ! int_hex(v) ! PyIntObject *v; { char buf[100]; --- 746,750 ---- static PyObject * ! int_hex(PyIntObject *v) { char buf[100]; *************** *** 850,854 **** void ! PyInt_Fini() { PyIntObject *p; --- 799,803 ---- void ! PyInt_Fini(void) { PyIntObject *p; Index: listobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v retrieving revision 2.79 retrieving revision 2.80 diff -C2 -r2.79 -r2.80 *** listobject.c 2000/07/01 01:00:38 2.79 --- listobject.c 2000/07/09 15:16:51 2.80 *************** *** 23,28 **** static int ! roundupsize(n) ! int n; { if (n < 500) --- 23,27 ---- static int ! roundupsize(int n) { if (n < 500) *************** *** 35,40 **** PyObject * ! PyList_New(size) ! int size; { int i; --- 34,38 ---- PyObject * ! PyList_New(int size) { int i; *************** *** 75,80 **** int ! PyList_Size(op) ! PyObject *op; { if (!PyList_Check(op)) { --- 73,77 ---- int ! PyList_Size(PyObject *op) { if (!PyList_Check(op)) { *************** *** 89,95 **** PyObject * ! PyList_GetItem(op, i) ! PyObject *op; ! int i; { if (!PyList_Check(op)) { --- 86,90 ---- PyObject * ! PyList_GetItem(PyObject *op, int i) { if (!PyList_Check(op)) { *************** *** 108,115 **** int ! PyList_SetItem(op, i, newitem) ! register PyObject *op; ! register int i; ! register PyObject *newitem; { register PyObject *olditem; --- 103,108 ---- int ! PyList_SetItem(register PyObject *op, register int i, ! register PyObject *newitem) { register PyObject *olditem; *************** *** 134,141 **** static int ! ins1(self, where, v) ! PyListObject *self; ! int where; ! PyObject *v; { int i; --- 127,131 ---- static int ! ins1(PyListObject *self, int where, PyObject *v) { int i; *************** *** 165,172 **** int ! PyList_Insert(op, where, newitem) ! PyObject *op; ! int where; ! PyObject *newitem; { if (!PyList_Check(op)) { --- 155,159 ---- int ! PyList_Insert(PyObject *op, int where, PyObject *newitem) { if (!PyList_Check(op)) { *************** *** 178,184 **** int ! PyList_Append(op, newitem) ! PyObject *op; ! PyObject *newitem; { if (!PyList_Check(op)) { --- 165,169 ---- int ! PyList_Append(PyObject *op, PyObject *newitem) { if (!PyList_Check(op)) { *************** *** 193,198 **** static void ! list_dealloc(op) ! PyListObject *op; { int i; --- 178,182 ---- static void ! list_dealloc(PyListObject *op) { int i; *************** *** 216,223 **** static int ! list_print(op, fp, flags) ! PyListObject *op; ! FILE *fp; ! int flags; { int i; --- 200,204 ---- static int ! list_print(PyListObject *op, FILE *fp, int flags) { int i; *************** *** 245,250 **** static PyObject * ! list_repr(v) ! PyListObject *v; { PyObject *s, *comma; --- 226,230 ---- static PyObject * ! list_repr(PyListObject *v) { PyObject *s, *comma; *************** *** 271,276 **** static int ! list_compare(v, w) ! PyListObject *v, *w; { int i; --- 251,255 ---- static int ! list_compare(PyListObject *v, PyListObject *w) { int i; *************** *** 284,289 **** static int ! list_length(a) ! PyListObject *a; { return a->ob_size; --- 263,267 ---- static int ! list_length(PyListObject *a) { return a->ob_size; *************** *** 293,299 **** static int ! list_contains(a, el) ! PyListObject *a; ! PyObject *el; { int i, cmp; --- 271,275 ---- static int ! list_contains(PyListObject *a, PyObject *el) { int i, cmp; *************** *** 311,317 **** static PyObject * ! list_item(a, i) ! PyListObject *a; ! int i; { if (i < 0 || i >= a->ob_size) { --- 287,291 ---- static PyObject * ! list_item(PyListObject *a, int i) { if (i < 0 || i >= a->ob_size) { *************** *** 327,333 **** static PyObject * ! list_slice(a, ilow, ihigh) ! PyListObject *a; ! int ilow, ihigh; { PyListObject *np; --- 301,305 ---- static PyObject * ! list_slice(PyListObject *a, int ilow, int ihigh) { PyListObject *np; *************** *** 353,359 **** PyObject * ! PyList_GetSlice(a, ilow, ihigh) ! PyObject *a; ! int ilow, ihigh; { if (!PyList_Check(a)) { --- 325,329 ---- PyObject * ! PyList_GetSlice(PyObject *a, int ilow, int ihigh) { if (!PyList_Check(a)) { *************** *** 365,371 **** static PyObject * ! list_concat(a, bb) ! PyListObject *a; ! PyObject *bb; { int size; --- 335,339 ---- static PyObject * ! list_concat(PyListObject *a, PyObject *bb) { int size; *************** *** 399,405 **** static PyObject * ! list_repeat(a, n) ! PyListObject *a; ! int n; { int i, j; --- 367,371 ---- static PyObject * ! list_repeat(PyListObject *a, int n) { int i, j; *************** *** 425,432 **** static int ! list_ass_slice(a, ilow, ihigh, v) ! PyListObject *a; ! int ilow, ihigh; ! PyObject *v; { /* Because [X]DECREF can recursively invoke list operations on --- 391,395 ---- static int ! list_ass_slice(PyListObject *a, int ilow, int ihigh, PyObject *v) { /* Because [X]DECREF can recursively invoke list operations on *************** *** 516,523 **** int ! PyList_SetSlice(a, ilow, ihigh, v) ! PyObject *a; ! int ilow, ihigh; ! PyObject *v; { if (!PyList_Check(a)) { --- 479,483 ---- int ! PyList_SetSlice(PyObject *a, int ilow, int ihigh, PyObject *v) { if (!PyList_Check(a)) { *************** *** 529,536 **** static int ! list_ass_item(a, i, v) ! PyListObject *a; ! int i; ! PyObject *v; { PyObject *old_value; --- 489,493 ---- static int ! list_ass_item(PyListObject *a, int i, PyObject *v) { PyObject *old_value; *************** *** 550,557 **** static PyObject * ! ins(self, where, v) ! PyListObject *self; ! int where; ! PyObject *v; { if (ins1(self, where, v) != 0) --- 507,511 ---- static PyObject * ! ins(PyListObject *self, int where, PyObject *v) { if (ins1(self, where, v) != 0) *************** *** 562,568 **** static PyObject * ! listinsert(self, args) ! PyListObject *self; ! PyObject *args; { int i; --- 516,520 ---- static PyObject * ! listinsert(PyListObject *self, PyObject *args) { int i; *************** *** 588,594 **** static PyObject * ! listappend(self, args) ! PyListObject *self; ! PyObject *args; { PyObject *v; --- 540,544 ---- static PyObject * ! listappend(PyListObject *self, PyObject *args) { PyObject *v; *************** *** 599,605 **** static PyObject * ! listextend(self, args) ! PyListObject *self; ! PyObject *args; { PyObject *b = NULL, *res = NULL; --- 549,553 ---- static PyObject * ! listextend(PyListObject *self, PyObject *args) { PyObject *b = NULL, *res = NULL; *************** *** 665,671 **** static PyObject * ! listpop(self, args) ! PyListObject *self; ! PyObject *args; { int i = -1; --- 613,617 ---- static PyObject * ! listpop(PyListObject *self, PyObject *args) { int i = -1; *************** *** 707,714 **** static int ! docompare(x, y, compare) ! PyObject *x; ! PyObject *y; ! PyObject *compare; { PyObject *args, *res; --- 653,657 ---- static int ! docompare(PyObject *x, PyObject *y, PyObject *compare) { PyObject *args, *res; *************** *** 796,804 **** static int ! binarysort(lo, hi, start, compare) ! PyObject **lo; ! PyObject **hi; ! PyObject **start; ! PyObject *compare;/* Comparison function object, or NULL for default */ { /* assert lo <= start <= hi --- 739,744 ---- static int ! binarysort(PyObject **lo, PyObject **hi, PyObject **start, PyObject *compare) ! /* compare -- comparison function object, or NULL for default */ { /* assert lo <= start <= hi *************** *** 930,937 **** static int ! samplesortslice(lo, hi, compare) ! PyObject **lo; ! PyObject **hi; ! PyObject *compare;/* Comparison function object, or NULL for default */ { register PyObject **l, **r; --- 870,875 ---- static int ! samplesortslice(PyObject **lo, PyObject **hi, PyObject *compare) ! /* compare -- comparison function object, or NULL for default */ { register PyObject **l, **r; *************** *** 1236,1242 **** static PyObject * ! listsort(self, args) ! PyListObject *self; ! PyObject *args; { int err; --- 1174,1178 ---- static PyObject * ! listsort(PyListObject *self, PyObject *args) { int err; *************** *** 1259,1264 **** int ! PyList_Sort(v) ! PyObject *v; { if (v == NULL || !PyList_Check(v)) { --- 1195,1199 ---- int ! PyList_Sort(PyObject *v) { if (v == NULL || !PyList_Check(v)) { *************** *** 1274,1280 **** static PyObject * ! listreverse(self, args) ! PyListObject *self; ! PyObject *args; { register PyObject **p, **q; --- 1209,1213 ---- static PyObject * ! listreverse(PyListObject *self, PyObject *args) { register PyObject **p, **q; *************** *** 1298,1303 **** int ! PyList_Reverse(v) ! PyObject *v; { if (v == NULL || !PyList_Check(v)) { --- 1231,1235 ---- int ! PyList_Reverse(PyObject *v) { if (v == NULL || !PyList_Check(v)) { *************** *** 1313,1318 **** PyObject * ! PyList_AsTuple(v) ! PyObject *v; { PyObject *w; --- 1245,1249 ---- PyObject * ! PyList_AsTuple(PyObject *v) { PyObject *w; *************** *** 1339,1345 **** static PyObject * ! listindex(self, args) ! PyListObject *self; ! PyObject *args; { int i; --- 1270,1274 ---- static PyObject * ! listindex(PyListObject *self, PyObject *args) { int i; *************** *** 1359,1365 **** static PyObject * ! listcount(self, args) ! PyListObject *self; ! PyObject *args; { int count = 0; --- 1288,1292 ---- static PyObject * ! listcount(PyListObject *self, PyObject *args) { int count = 0; *************** *** 1379,1385 **** static PyObject * ! listremove(self, args) ! PyListObject *self; ! PyObject *args; { int i; --- 1306,1310 ---- static PyObject * ! listremove(PyListObject *self, PyObject *args) { int i; *************** *** 1460,1466 **** static PyObject * ! list_getattr(f, name) ! PyListObject *f; ! char *name; { return Py_FindMethod(list_methods, (PyObject *)f, name); --- 1385,1389 ---- static PyObject * ! list_getattr(PyListObject *f, char *name) { return Py_FindMethod(list_methods, (PyObject *)f, name); *************** *** 1513,1517 **** static PyObject * ! immutable_list_op(/*No args!*/) { PyErr_SetString(PyExc_TypeError, --- 1436,1440 ---- static PyObject * ! immutable_list_op(void) { PyErr_SetString(PyExc_TypeError, *************** *** 1532,1538 **** static PyObject * ! immutable_list_getattr(f, name) ! PyListObject *f; ! char *name; { return Py_FindMethod(immutable_list_methods, (PyObject *)f, name); --- 1455,1459 ---- static PyObject * ! immutable_list_getattr(PyListObject *f, char *name) { return Py_FindMethod(immutable_list_methods, (PyObject *)f, name); *************** *** 1540,1544 **** static int ! immutable_list_ass(/*No args!*/) { immutable_list_op(); --- 1461,1465 ---- static int ! immutable_list_ass(void) { immutable_list_op(); *************** *** 1582,1584 **** (traverseproc)list_traverse, /* tp_traverse */ }; - --- 1503,1504 ---- From python-dev@python.org Sun Jul 9 16:48:52 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 9 Jul 2000 08:48:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects object.c,2.84,2.85 Message-ID: <200007091548.IAA16653@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv16646 Modified Files: object.c Log Message: ANSI-fication of the sources. Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.84 retrieving revision 2.85 diff -C2 -r2.84 -r2.85 *** object.c 2000/07/09 03:09:56 2.84 --- object.c 2000/07/09 15:48:49 2.85 *************** *** 34,38 **** extern int null_strings, one_strings; void ! dump_counts() { PyTypeObject *tp; --- 34,38 ---- extern int null_strings, one_strings; void ! dump_counts(void) { PyTypeObject *tp; *************** *** 51,55 **** PyObject * ! get_counts() { PyTypeObject *tp; --- 51,55 ---- PyObject * ! get_counts(void) { PyTypeObject *tp; *************** *** 78,83 **** void ! inc_count(tp) ! PyTypeObject *tp; { if (tp->tp_alloc == 0) { --- 78,82 ---- void ! inc_count(PyTypeObject *tp) { if (tp->tp_alloc == 0) { *************** *** 95,101 **** PyObject * ! PyObject_Init(op, tp) ! PyObject *op; ! PyTypeObject *tp; { if (op == NULL) { --- 94,98 ---- PyObject * ! PyObject_Init(PyObject *op, PyTypeObject *tp) { if (op == NULL) { *************** *** 115,122 **** PyVarObject * ! PyObject_InitVar(op, tp, size) ! PyVarObject *op; ! PyTypeObject *tp; ! int size; { if (op == NULL) { --- 112,116 ---- PyVarObject * ! PyObject_InitVar(PyVarObject *op, PyTypeObject *tp, int size) { if (op == NULL) { *************** *** 137,142 **** PyObject * ! _PyObject_New(tp) ! PyTypeObject *tp; { PyObject *op; --- 131,135 ---- PyObject * ! _PyObject_New(PyTypeObject *tp) { PyObject *op; *************** *** 152,158 **** PyVarObject * ! _PyObject_NewVar(tp, size) ! PyTypeObject *tp; ! int size; { PyVarObject *op; --- 145,149 ---- PyVarObject * ! _PyObject_NewVar(PyTypeObject *tp, int size) { PyVarObject *op; *************** *** 168,173 **** void ! _PyObject_Del(op) ! PyObject *op; { #ifdef WITH_CYCLE_GC --- 159,163 ---- void ! _PyObject_Del(PyObject *op) { #ifdef WITH_CYCLE_GC *************** *** 186,193 **** int ! PyObject_Print(op, fp, flags) ! PyObject *op; ! FILE *fp; ! int flags; { int ret = 0; --- 176,180 ---- int ! PyObject_Print(PyObject *op, FILE *fp, int flags) { int ret = 0; *************** *** 242,247 **** PyObject * ! PyObject_Repr(v) ! PyObject *v; { if (PyErr_CheckSignals()) --- 229,233 ---- PyObject * ! PyObject_Repr(PyObject *v) { if (PyErr_CheckSignals()) *************** *** 287,292 **** PyObject * ! PyObject_Str(v) ! PyObject *v; { PyObject *res; --- 273,277 ---- PyObject * ! PyObject_Str(PyObject *v) { PyObject *res; *************** *** 332,337 **** static PyObject * ! do_cmp(v, w) ! PyObject *v, *w; { long c; --- 317,321 ---- static PyObject * ! do_cmp(PyObject *v, PyObject *w) { long c; *************** *** 358,362 **** static PyObject* ! get_inprogress_dict() { PyObject *tstate_dict, *inprogress; --- 342,346 ---- static PyObject* ! get_inprogress_dict(void) { PyObject *tstate_dict, *inprogress; *************** *** 384,389 **** static PyObject * ! make_pair(v, w) ! PyObject *v, *w; { PyObject *pair; --- 368,372 ---- static PyObject * ! make_pair(PyObject *v, PyObject *w) { PyObject *pair; *************** *** 404,409 **** int ! PyObject_Compare(v, w) ! PyObject *v, *w; { PyTypeObject *vtp, *wtp; --- 387,391 ---- int ! PyObject_Compare(PyObject *v, PyObject *w) { PyTypeObject *vtp, *wtp; *************** *** 542,547 **** long ! _Py_HashDouble(v) ! double v; { /* Use frexp to get at the bits in the double. --- 524,528 ---- long ! _Py_HashDouble(double v) { /* Use frexp to get at the bits in the double. *************** *** 567,572 **** long ! _Py_HashPointer(p) ! void *p; { #if SIZEOF_LONG >= SIZEOF_VOID_P --- 548,552 ---- long ! _Py_HashPointer(void *p) { #if SIZEOF_LONG >= SIZEOF_VOID_P *************** *** 591,596 **** long ! PyObject_Hash(v) ! PyObject *v; { PyTypeObject *tp = v->ob_type; --- 571,575 ---- long ! PyObject_Hash(PyObject *v) { PyTypeObject *tp = v->ob_type; *************** *** 606,612 **** PyObject * ! PyObject_GetAttrString(v, name) ! PyObject *v; ! char *name; { if (v->ob_type->tp_getattro != NULL) { --- 585,589 ---- PyObject * ! PyObject_GetAttrString(PyObject *v, char *name) { if (v->ob_type->tp_getattro != NULL) { *************** *** 633,639 **** int ! PyObject_HasAttrString(v, name) ! PyObject *v; ! char *name; { PyObject *res = PyObject_GetAttrString(v, name); --- 610,614 ---- int ! PyObject_HasAttrString(PyObject *v, char *name) { PyObject *res = PyObject_GetAttrString(v, name); *************** *** 647,654 **** int ! PyObject_SetAttrString(v, name, w) ! PyObject *v; ! char *name; ! PyObject *w; { if (v->ob_type->tp_setattro != NULL) { --- 622,626 ---- int ! PyObject_SetAttrString(PyObject *v, char *name, PyObject *w) { if (v->ob_type->tp_setattro != NULL) { *************** *** 678,684 **** PyObject * ! PyObject_GetAttr(v, name) ! PyObject *v; ! PyObject *name; { if (v->ob_type->tp_getattro != NULL) --- 650,654 ---- PyObject * ! PyObject_GetAttr(PyObject *v, PyObject *name) { if (v->ob_type->tp_getattro != NULL) *************** *** 694,700 **** int ! PyObject_HasAttr(v, name) ! PyObject *v; ! PyObject *name; { PyObject *res = PyObject_GetAttr(v, name); --- 664,668 ---- int ! PyObject_HasAttr(PyObject *v, PyObject *name) { PyObject *res = PyObject_GetAttr(v, name); *************** *** 708,715 **** int ! PyObject_SetAttr(v, name, value) ! PyObject *v; ! PyObject *name; ! PyObject *value; { int err; --- 676,680 ---- int ! PyObject_SetAttr(PyObject *v, PyObject *name, PyObject *value) { int err; *************** *** 736,741 **** int ! PyObject_IsTrue(v) ! PyObject *v; { int res; --- 701,705 ---- int ! PyObject_IsTrue(PyObject *v) { int res; *************** *** 762,767 **** int ! PyObject_Not(v) ! PyObject *v; { int res; --- 726,730 ---- int ! PyObject_Not(PyObject *v) { int res; *************** *** 779,784 **** int ! PyNumber_CoerceEx(pv, pw) ! PyObject **pv, **pw; { register PyObject *v = *pv; --- 742,746 ---- int ! PyNumber_CoerceEx(PyObject **pv, PyObject **pw) { register PyObject *v = *pv; *************** *** 805,810 **** int ! PyNumber_Coerce(pv, pw) ! PyObject **pv, **pw; { int err = PyNumber_CoerceEx(pv, pw); --- 767,771 ---- int ! PyNumber_Coerce(PyObject **pv, PyObject **pw) { int err = PyNumber_CoerceEx(pv, pw); *************** *** 819,824 **** int ! PyCallable_Check(x) ! PyObject *x; { if (x == NULL) --- 780,784 ---- int ! PyCallable_Check(PyObject *x) { if (x == NULL) *************** *** 853,858 **** /* ARGSUSED */ static PyObject * ! none_repr(op) ! PyObject *op; { return PyString_FromString("None"); --- 813,817 ---- /* ARGSUSED */ static PyObject * ! none_repr(PyObject *op) { return PyString_FromString("None"); *************** *** 887,891 **** void ! _Py_ResetReferences() { refchain._ob_prev = refchain._ob_next = &refchain; --- 846,850 ---- void ! _Py_ResetReferences(void) { refchain._ob_prev = refchain._ob_next = &refchain; *************** *** 894,899 **** void ! _Py_NewReference(op) ! PyObject *op; { _Py_RefTotal++; --- 853,857 ---- void ! _Py_NewReference(PyObject *op) { _Py_RefTotal++; *************** *** 909,914 **** void ! _Py_ForgetReference(op) ! register PyObject *op; { #ifdef SLOW_UNREF_CHECK --- 867,871 ---- void ! _Py_ForgetReference(register PyObject *op) { #ifdef SLOW_UNREF_CHECK *************** *** 937,942 **** void ! _Py_Dealloc(op) ! PyObject *op; { destructor dealloc = op->ob_type->tp_dealloc; --- 894,898 ---- void ! _Py_Dealloc(PyObject *op) { destructor dealloc = op->ob_type->tp_dealloc; *************** *** 950,955 **** void ! _Py_PrintReferences(fp) ! FILE *fp; { PyObject *op; --- 906,910 ---- void ! _Py_PrintReferences(FILE *fp) { PyObject *op; *************** *** 964,970 **** PyObject * ! _Py_GetObjects(self, args) ! PyObject *self; ! PyObject *args; { int i, n; --- 919,923 ---- PyObject * ! _Py_GetObjects(PyObject *self, PyObject *args) { int i, n; *************** *** 1008,1013 **** ANY * ! PyMem_Malloc(nbytes) ! size_t nbytes; { #if _PyMem_EXTRA > 0 --- 961,965 ---- ANY * ! PyMem_Malloc(size_t nbytes) { #if _PyMem_EXTRA > 0 *************** *** 1019,1025 **** ANY * ! PyMem_Realloc(p, nbytes) ! ANY *p; ! size_t nbytes; { #if _PyMem_EXTRA > 0 --- 971,975 ---- ANY * ! PyMem_Realloc(ANY *p, size_t nbytes) { #if _PyMem_EXTRA > 0 *************** *** 1031,1036 **** void ! PyMem_Free(p) ! ANY *p; { PyMem_FREE(p); --- 981,985 ---- void ! PyMem_Free(ANY *p) { PyMem_FREE(p); *************** *** 1041,1046 **** ANY * ! PyObject_Malloc(nbytes) ! size_t nbytes; { return PyObject_MALLOC(nbytes); --- 990,994 ---- ANY * ! PyObject_Malloc(size_t nbytes) { return PyObject_MALLOC(nbytes); *************** *** 1048,1054 **** ANY * ! PyObject_Realloc(p, nbytes) ! ANY *p; ! size_t nbytes; { return PyObject_REALLOC(p, nbytes); --- 996,1000 ---- ANY * ! PyObject_Realloc(ANY *p, size_t nbytes) { return PyObject_REALLOC(p, nbytes); *************** *** 1056,1061 **** void ! PyObject_Free(p) ! ANY *p; { PyObject_FREE(p); --- 1002,1006 ---- void ! PyObject_Free(ANY *p) { PyObject_FREE(p); *************** *** 1078,1083 **** int ! Py_ReprEnter(obj) ! PyObject *obj; { PyObject *dict; --- 1023,1027 ---- int ! Py_ReprEnter(PyObject *obj) { PyObject *dict; *************** *** 1107,1112 **** void ! Py_ReprLeave(obj) ! PyObject *obj; { PyObject *dict; --- 1051,1055 ---- void ! Py_ReprLeave(PyObject *obj) { PyObject *dict; *************** *** 1166,1171 **** void ! _PyTrash_deposit_object(op) ! PyObject *op; { int typecode; --- 1109,1113 ---- void ! _PyTrash_deposit_object(PyObject *op) { int typecode; *************** *** 1188,1192 **** void ! _PyTrash_destroy_chain() { while (_PyTrash_delete_later) { --- 1130,1134 ---- void ! _PyTrash_destroy_chain(void) { while (_PyTrash_delete_later) { *************** *** 1218,1220 **** } } - --- 1160,1161 ---- From python-dev@python.org Sun Jul 9 17:27:35 2000 From: python-dev@python.org (Greg Stein) Date: Sun, 9 Jul 2000 09:27:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/ext ext.tex,1.79,1.80 Message-ID: <200007091627.JAA25676@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ext In directory slayer.i.sourceforge.net:/tmp/cvs-serv25663 Modified Files: ext.tex Log Message: needs a space Index: ext.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ext/ext.tex,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -r1.79 -r1.80 *** ext.tex 2000/07/09 03:35:10 1.79 --- ext.tex 2000/07/09 16:27:33 1.80 *************** *** 1604,1608 **** #define PySpam_System_NUM 0 #define PySpam_System_RETURN int ! #define PySpam_System_PROTO(char *command) /* Total number of C API pointers */ --- 1604,1608 ---- #define PySpam_System_NUM 0 #define PySpam_System_RETURN int ! #define PySpam_System_PROTO (char *command) /* Total number of C API pointers */ From python-dev@python.org Sun Jul 9 17:44:29 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 9 Jul 2000 09:44:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib mailbox.py,1.19,1.20 shlex.py,1.8,1.9 Message-ID: <200007091644.JAA26722@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv26713 Modified Files: mailbox.py shlex.py Log Message: Make tabnanny happy. mailbox.py: Convert to 4-space indents. Index: mailbox.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/mailbox.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** mailbox.py 2000/04/04 03:31:39 1.19 --- mailbox.py 2000/07/09 16:44:26 1.20 *************** *** 8,279 **** class _Mailbox: ! def __init__(self, fp): ! self.fp = fp ! self.seekp = 0 ! ! def seek(self, pos, whence=0): ! if whence==1: # Relative to current position ! self.pos = self.pos + pos ! if whence==2: # Relative to file's end ! self.pos = self.stop + pos ! else: # Default - absolute position ! self.pos = self.start + pos ! ! def next(self): ! while 1: ! self.fp.seek(self.seekp) ! try: ! self._search_start() ! except EOFError: ! self.seekp = self.fp.tell() ! return None ! start = self.fp.tell() ! self._search_end() ! self.seekp = stop = self.fp.tell() ! if start <> stop: ! break ! return rfc822.Message(_Subfile(self.fp, start, stop)) class _Subfile: ! def __init__(self, fp, start, stop): ! self.fp = fp ! self.start = start ! self.stop = stop ! self.pos = self.start ! ! def read(self, length = None): ! if self.pos >= self.stop: ! return '' ! remaining = self.stop - self.pos ! if length is None or length < 0: ! length = remaining ! elif length > remaining: ! length = remaining ! self.fp.seek(self.pos) ! data = self.fp.read(length) ! self.pos = self.fp.tell() ! return data ! ! def readline(self, length = None): ! if self.pos >= self.stop: ! return '' ! if length is None: ! length = self.stop - self.pos ! self.fp.seek(self.pos) ! data = self.fp.readline(length) ! self.pos = self.fp.tell() ! return data ! ! def readlines(self, sizehint = -1): ! lines = [] ! while 1: ! line = self.readline() ! if not line: ! break ! lines.append(line) ! if sizehint >= 0: ! sizehint = sizehint - len(line) ! if sizehint <= 0: ! break ! return lines ! ! def tell(self): ! return self.pos - self.start ! ! def seek(self, pos, whence=0): ! if whence == 0: ! self.pos = self.start + pos ! elif whence == 1: ! self.pos = self.pos + pos ! elif whence == 2: ! self.pos = self.stop + pos ! def close(self): ! del self.fp class UnixMailbox(_Mailbox): ! def _search_start(self): ! while 1: ! pos = self.fp.tell() ! line = self.fp.readline() ! if not line: ! raise EOFError ! if line[:5] == 'From ' and self._isrealfromline(line): ! self.fp.seek(pos) ! return ! ! def _search_end(self): ! self.fp.readline() # Throw away header line ! while 1: ! pos = self.fp.tell() ! line = self.fp.readline() ! if not line: ! return ! if line[:5] == 'From ' and self._isrealfromline(line): ! self.fp.seek(pos) ! return ! ! # An overridable mechanism to test for From-line-ness. ! # You can either specify a different regular expression ! # or define a whole new _isrealfromline() method. ! # Note that this only gets called for lines starting with ! # the 5 characters "From ". ! ! _fromlinepattern = r"From \s*[^\s]+\s+\w\w\w\s+\w\w\w\s+\d?\d\s+" \ ! r"\d?\d:\d\d(:\d\d)?(\s+[^\s]+)?\s+\d\d\d\d\s*$" ! _regexp = None ! ! def _isrealfromline(self, line): ! if not self._regexp: ! import re ! self._regexp = re.compile(self._fromlinepattern) ! return self._regexp.match(line) class MmdfMailbox(_Mailbox): - def _search_start(self): - while 1: - line = self.fp.readline() - if not line: - raise EOFError - if line[:5] == '\001\001\001\001\n': - return - - def _search_end(self): - while 1: - pos = self.fp.tell() - line = self.fp.readline() - if not line: - return - if line == '\001\001\001\001\n': - self.fp.seek(pos) - return class MHMailbox: - def __init__(self, dirname): - import re - pat = re.compile('^[0-9][0-9]*$') - self.dirname = dirname - files = os.listdir(self.dirname) - self.boxes = [] - for f in files: - if pat.match(f): - self.boxes.append(f) - - def next(self): - if not self.boxes: - return None - fn = self.boxes[0] - del self.boxes[0] - fp = open(os.path.join(self.dirname, fn)) - return rfc822.Message(fp) class Maildir: ! # Qmail directory mailbox - def __init__(self, dirname): - import string - self.dirname = dirname - self.boxes = [] - - # check for new mail - newdir = os.path.join(self.dirname, 'new') - for file in os.listdir(newdir): - if len(string.split(file, '.')) > 2: - self.boxes.append(os.path.join(newdir, file)) - - # Now check for current mail in this maildir - curdir = os.path.join(self.dirname, 'cur') - for file in os.listdir(curdir): - if len(string.split(file, '.')) > 2: - self.boxes.append(os.path.join(curdir, file)) - - def next(self): - if not self.boxes: - return None - fn = self.boxes[0] - del self.boxes[0] - fp = open(os.path.join(self.dirname, fn)) - return rfc822.Message(fp) class BabylMailbox(_Mailbox): ! def _search_start(self): ! while 1: ! line = self.fp.readline() ! if not line: ! raise EOFError ! if line == '*** EOOH ***\n': ! return ! ! def _search_end(self): ! while 1: ! pos = self.fp.tell() ! line = self.fp.readline() ! if not line: ! return ! if line == '\037\014\n': ! self.fp.seek(pos) ! return def _test(): ! import time ! import sys ! import string ! import os ! ! args = sys.argv[1:] ! if not args: ! for key in 'MAILDIR', 'MAIL', 'LOGNAME', 'USER': ! if os.environ.has_key(key): ! mbox = os.environ[key] ! break ! else: ! print "$MAIL, $LOGNAME nor $USER set -- who are you?" ! return else: ! mbox = args[0] ! if mbox[:1] == '+': ! mbox = os.environ['HOME'] + '/Mail/' + mbox[1:] ! elif not '/' in mbox: ! mbox = '/usr/mail/' + mbox ! if os.path.isdir(mbox): ! if os.path.isdir(os.path.join(mbox, 'cur')): ! mb = Maildir(mbox) ! else: ! mb = MHMailbox(mbox) ! else: ! fp = open(mbox, 'r') ! mb = UnixMailbox(fp) ! ! msgs = [] ! while 1: ! msg = mb.next() ! if msg is None: ! break ! msgs.append(msg) ! if len(args) <= 1: ! msg.fp = None ! if len(args) > 1: ! num = string.atoi(args[1]) ! print 'Message %d body:'%num ! msg = msgs[num-1] ! msg.rewindbody() ! sys.stdout.write(msg.fp.read()) else: ! print 'Mailbox',mbox,'has',len(msgs),'messages:' ! for msg in msgs: ! f = msg.getheader('from') or "" ! s = msg.getheader('subject') or "" ! d = msg.getheader('date') or "" ! print '%20.20s %18.18s %-30.30s'%(f, d[5:], s) if __name__ == '__main__': ! _test() --- 8,278 ---- class _Mailbox: + def __init__(self, fp): + self.fp = fp + self.seekp = 0 + + def seek(self, pos, whence=0): + if whence==1: # Relative to current position + self.pos = self.pos + pos + if whence==2: # Relative to file's end + self.pos = self.stop + pos + else: # Default - absolute position + self.pos = self.start + pos ! def next(self): ! while 1: ! self.fp.seek(self.seekp) ! try: ! self._search_start() ! except EOFError: ! self.seekp = self.fp.tell() ! return None ! start = self.fp.tell() ! self._search_end() ! self.seekp = stop = self.fp.tell() ! if start <> stop: ! break ! return rfc822.Message(_Subfile(self.fp, start, stop)) ! class _Subfile: + def __init__(self, fp, start, stop): + self.fp = fp + self.start = start + self.stop = stop + self.pos = self.start + + def read(self, length = None): + if self.pos >= self.stop: + return '' + remaining = self.stop - self.pos + if length is None or length < 0: + length = remaining + elif length > remaining: + length = remaining + self.fp.seek(self.pos) + data = self.fp.read(length) + self.pos = self.fp.tell() + return data + + def readline(self, length = None): + if self.pos >= self.stop: + return '' + if length is None: + length = self.stop - self.pos + self.fp.seek(self.pos) + data = self.fp.readline(length) + self.pos = self.fp.tell() + return data ! def readlines(self, sizehint = -1): ! lines = [] ! while 1: ! line = self.readline() ! if not line: ! break ! lines.append(line) ! if sizehint >= 0: ! sizehint = sizehint - len(line) ! if sizehint <= 0: ! break ! return lines ! ! def tell(self): ! return self.pos - self.start ! ! def seek(self, pos, whence=0): ! if whence == 0: ! self.pos = self.start + pos ! elif whence == 1: ! self.pos = self.pos + pos ! elif whence == 2: ! self.pos = self.stop + pos ! def close(self): ! del self.fp + class UnixMailbox(_Mailbox): + def _search_start(self): + while 1: + pos = self.fp.tell() + line = self.fp.readline() + if not line: + raise EOFError + if line[:5] == 'From ' and self._isrealfromline(line): + self.fp.seek(pos) + return ! def _search_end(self): ! self.fp.readline() # Throw away header line ! while 1: ! pos = self.fp.tell() ! line = self.fp.readline() ! if not line: ! return ! if line[:5] == 'From ' and self._isrealfromline(line): ! self.fp.seek(pos) ! return ! ! # An overridable mechanism to test for From-line-ness. ! # You can either specify a different regular expression ! # or define a whole new _isrealfromline() method. ! # Note that this only gets called for lines starting with ! # the 5 characters "From ". ! ! _fromlinepattern = r"From \s*[^\s]+\s+\w\w\w\s+\w\w\w\s+\d?\d\s+" \ ! r"\d?\d:\d\d(:\d\d)?(\s+[^\s]+)?\s+\d\d\d\d\s*$" ! _regexp = None ! ! def _isrealfromline(self, line): ! if not self._regexp: ! import re ! self._regexp = re.compile(self._fromlinepattern) ! return self._regexp.match(line) ! class MmdfMailbox(_Mailbox): + def _search_start(self): + while 1: + line = self.fp.readline() + if not line: + raise EOFError + if line[:5] == '\001\001\001\001\n': + return + + def _search_end(self): + while 1: + pos = self.fp.tell() + line = self.fp.readline() + if not line: + return + if line == '\001\001\001\001\n': + self.fp.seek(pos) + return class MHMailbox: + def __init__(self, dirname): + import re + pat = re.compile('^[0-9][0-9]*$') + self.dirname = dirname + files = os.listdir(self.dirname) + self.boxes = [] + for f in files: + if pat.match(f): + self.boxes.append(f) + + def next(self): + if not self.boxes: + return None + fn = self.boxes[0] + del self.boxes[0] + fp = open(os.path.join(self.dirname, fn)) + return rfc822.Message(fp) class Maildir: + # Qmail directory mailbox + + def __init__(self, dirname): + import string + self.dirname = dirname + self.boxes = [] ! # check for new mail ! newdir = os.path.join(self.dirname, 'new') ! for file in os.listdir(newdir): ! if len(string.split(file, '.')) > 2: ! self.boxes.append(os.path.join(newdir, file)) ! ! # Now check for current mail in this maildir ! curdir = os.path.join(self.dirname, 'cur') ! for file in os.listdir(curdir): ! if len(string.split(file, '.')) > 2: ! self.boxes.append(os.path.join(curdir, file)) ! ! def next(self): ! if not self.boxes: ! return None ! fn = self.boxes[0] ! del self.boxes[0] ! fp = open(os.path.join(self.dirname, fn)) ! return rfc822.Message(fp) class BabylMailbox(_Mailbox): + def _search_start(self): + while 1: + line = self.fp.readline() + if not line: + raise EOFError + if line == '*** EOOH ***\n': + return ! def _search_end(self): ! while 1: ! pos = self.fp.tell() ! line = self.fp.readline() ! if not line: ! return ! if line == '\037\014\n': ! self.fp.seek(pos) ! return def _test(): ! import time ! import sys ! import string ! import os ! ! args = sys.argv[1:] ! if not args: ! for key in 'MAILDIR', 'MAIL', 'LOGNAME', 'USER': ! if os.environ.has_key(key): ! mbox = os.environ[key] ! break else: ! print "$MAIL, $LOGNAME nor $USER set -- who are you?" ! return ! else: ! mbox = args[0] ! if mbox[:1] == '+': ! mbox = os.environ['HOME'] + '/Mail/' + mbox[1:] ! elif not '/' in mbox: ! mbox = '/usr/mail/' + mbox ! if os.path.isdir(mbox): ! if os.path.isdir(os.path.join(mbox, 'cur')): ! mb = Maildir(mbox) else: ! mb = MHMailbox(mbox) ! else: ! fp = open(mbox, 'r') ! mb = UnixMailbox(fp) ! ! msgs = [] ! while 1: ! msg = mb.next() ! if msg is None: ! break ! msgs.append(msg) ! if len(args) <= 1: ! msg.fp = None ! if len(args) > 1: ! num = string.atoi(args[1]) ! print 'Message %d body:'%num ! msg = msgs[num-1] ! msg.rewindbody() ! sys.stdout.write(msg.fp.read()) ! else: ! print 'Mailbox',mbox,'has',len(msgs),'messages:' ! for msg in msgs: ! f = msg.getheader('from') or "" ! s = msg.getheader('subject') or "" ! d = msg.getheader('date') or "" ! print '%20.20s %18.18s %-30.30s'%(f, d[5:], s) if __name__ == '__main__': ! _test() Index: shlex.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/shlex.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** shlex.py 2000/07/03 09:56:23 1.8 --- shlex.py 2000/07/09 16:44:26 1.9 *************** *** 18,22 **** self.infile = None self.commenters = '#' ! self.wordchars = 'abcdfeghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_' self.whitespace = ' \t\r\n' self.quotes = '\'"' --- 18,23 ---- self.infile = None self.commenters = '#' ! self.wordchars = ('abcdfeghijklmnopqrstuvwxyz' ! 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_') self.whitespace = ' \t\r\n' self.quotes = '\'"' *************** *** 26,30 **** self.debug = 0 self.token = '' ! self.filestack = [] self.source = None if self.debug: --- 27,31 ---- self.debug = 0 self.token = '' ! self.filestack = [] self.source = None if self.debug: *************** *** 46,50 **** print "shlex: popping token " + `tok` return tok ! # No pushback. Get a token. raw = self.read_token() # Handle inclusions --- 47,51 ---- print "shlex: popping token " + `tok` return tok ! # No pushback. Get a token. raw = self.read_token() # Handle inclusions *************** *** 89,98 **** print "shlex: in state", repr(self.state), \ "I see character:", repr(nextchar) ! if self.state == None: ! self.token = ''; # past end of file break elif self.state == ' ': if not nextchar: ! self.state = None; # end of file break elif nextchar in self.whitespace: --- 90,99 ---- print "shlex: in state", repr(self.state), \ "I see character:", repr(nextchar) ! if self.state is None: ! self.token = ''; # past end of file break elif self.state == ' ': if not nextchar: ! self.state = None; # end of file break elif nextchar in self.whitespace: *************** *** 100,104 **** print "shlex: I see whitespace in whitespace state" if self.token: ! break # emit current token else: continue --- 101,105 ---- print "shlex: I see whitespace in whitespace state" if self.token: ! break # emit current token else: continue *************** *** 115,119 **** self.token = nextchar if self.token: ! break # emit current token else: continue --- 116,120 ---- self.token = nextchar if self.token: ! break # emit current token else: continue *************** *** 125,129 **** elif self.state == 'a': if not nextchar: ! self.state = None; # end of file break elif nextchar in self.whitespace: --- 126,130 ---- elif self.state == 'a': if not nextchar: ! self.state = None; # end of file break elif nextchar in self.whitespace: *************** *** 132,136 **** self.state = ' ' if self.token: ! break # emit current token else: continue --- 133,137 ---- self.state = ' ' if self.token: ! break # emit current token else: continue *************** *** 146,150 **** self.state = ' ' if self.token: ! break # emit current token else: continue --- 147,151 ---- self.state = ' ' if self.token: ! break # emit current token else: continue From python-dev@python.org Sun Jul 9 17:45:58 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 9 Jul 2000 09:45:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib webbrowser.py,NONE,1.1 Message-ID: <200007091645.JAA26779@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv26773 Added Files: webbrowser.py Log Message: New module to control Web browsers; see the documentation for more information. --- NEW FILE --- """Remote-control interfaces to some browsers.""" import os import sys PROCESS_CREATION_DELAY = 4 class Error(Exception): pass _browsers = {} def register(name, klass, instance=None): """Register a browser connector and, optionally, connection.""" _browsers[name.lower()] = [klass, instance] def get(name=None): """Retrieve a connection to a browser by type name, or the default browser.""" name = name or DEFAULT_BROWSER try: L = _browsers[name.lower()] except KeyError: raise ValueError, "unknown browser type: " + `name` if L[1] is None: L[1] = L[0]() return L[1] # Please note: the following definition hides a builtin function. def open(url, new=0): get().open(url, new) def open_new(url): get().open_new(url) def _iscommand(cmd): """Return true if cmd can be found on the executable search path.""" path = os.environ.get("PATH") if not path: return 0 for d in path.split(os.pathsep): exe = os.path.join(d, cmd) if os.path.isfile(exe): return 1 return 0 class CommandLineBrowser: _browsers = [] if os.environ.get("DISPLAY"): _browsers.extend([ ("netscape", "netscape %s >/dev/null &"), ("mosaic", "mosaic %s >/dev/null &"), ]) _browsers.extend([ ("lynx", "lynx %s"), ("w3m", "w3m %s"), ]) def open(self, url, new=0): for exe, cmd in self._browsers: if _iscommand(exe): os.system(cmd % url) return raise Error("could not locate runnable browser") def open_new(self, url): self.open(url) register("command-line", CommandLineBrowser) class Netscape: autoRaise = 1 def _remote(self, action): raise_opt = ("-noraise", "-raise")[self.autoRaise] cmd = "netscape %s -remote '%s' >/dev/null 2>&1" % (raise_opt, action) rc = os.system(cmd) if rc: import time os.system("netscape -no-about-splash &") time.sleep(PROCESS_CREATION_DELAY) rc = os.system(cmd) return not rc def open(self, url, new=0): if new: self.open_new(url) else: self._remote("openURL(%s)" % url) def open_new(self, url): self._remote("openURL(%s, new-window)" % url) register("netscape", Netscape) class Konquerer: """Controller for the KDE File Manager (kfm, or Konquerer). See http://developer.kde.org/documentation/other/kfmclient.html for more information on the Konquerer remote-control interface. """ def _remote(self, action): cmd = "kfmclient %s >/dev/null 2>&1" % action rc = os.system(cmd) if rc: import time os.system("kfm -d &") time.sleep(PROCESS_CREATION_DELAY) rc = os.system(cmd) return not rc def open(self, url, new=1): # XXX currently I know no way to prevent KFM from opening a new win. self.open_new(url) def open_new(self, url): self._remote("openURL %s" % url) register("kfm", Konquerer) class Grail: # There should be a way to maintain a connection to Grail, but the # Grail remote control protocol doesn't really allow that at this # point. It probably never will! def _find_grail_rc(self): import glob import pwd import socket import tempfile tempdir = os.path.join(tempfile.gettempdir(), ".grail-unix") user = pwd.getpwuid(_os.getuid())[0] filename = os.path.join(tempdir, user + "-*") maybes = glob.glob(filename) if not maybes: return None s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) for fn in maybes: # need to PING each one until we find one that's live try: s.connect(fn) except socket.error: # no good; attempt to clean it out, but don't fail: try: os.unlink(fn) except IOError: pass else: return s def _remote(self, action): s = self._find_grail_rc() if not s: return 0 s.send(action) s.close() return 1 def open(self, url, new=0): if new: self.open_new(url) else: self._remote("LOAD " + url) def open_new(self, url): self._remote("LOADNEW " + url) register("grail", Grail) class WindowsDefault: def open(self, url, new=0): import win32api, win32con win32api.ShellExecute(0, "open", url, None, ".", win32con.SW_SHOWNORMAL) def open_new(self, url): self.open(url) DEFAULT_BROWSER = "command-line" if sys.platform[:3] == "win": del _browsers["kfm"] register("windows-default", WindowsDefault) DEFAULT_BROWSER = "windows-default" elif os.environ.get("DISPLAY"): if os.environ.get("KDEDIR"): DEFAULT_BROWSER = "kfm" elif _iscommand("netscape"): DEFAULT_BROWSER = "netscape" # If the $BROWSER environment variable is set and true, let that be # the name of the browser to use: # DEFAULT_BROWSER = os.environ.get("BROWSER") or DEFAULT_BROWSER # Now try to support the MacOS world. This is the only supported # controller on that platform, so don't mess with the default! try: import ic except ImportError: pass else: class InternetConfig: def open(self, url, new=0): ic.launcurl(url) def open_new(self, url): self.open(url) _browsers.clear() register("internet-config", InternetConfig) DEFAULT_BROWSER = "internet-config" From python-dev@python.org Sun Jul 9 18:13:00 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 10:13:00 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib locale.py,1.7,1.8 Message-ID: <200007091713.KAA02613@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv2501/Lib Modified Files: locale.py Log Message: - merged setlocale and set_locale. the internal setlocale function is overridden by a python version which accepts *either* a string (old behaviour) or a locale tuple. - renamed a few methods (for consistency): get_locale => getlocale get_default_locale => getdefaultlocale set_to_default => resetlocale (!) - the _locale implementation module can now implement an optional _getdefaultlocale function. if that function isn't available, a POSIX-based approach is used (checking LANG and other environment variables, as usual). (patch #100765) Index: locale.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/locale.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** locale.py 2000/06/28 14:48:01 1.7 --- locale.py 2000/07/09 17:12:58 1.8 *************** *** 12,24 **** """ ! import string ! ### Load C lib locale APIs or use an emulation try: from _locale import * except ImportError: CHAR_MAX = 127 LC_ALL = 6 --- 12,30 ---- """ ! import string, sys ! # Try importing the _locale module. ! # ! # If this fails, fall back on a basic 'C' locale emulation. ! # try: + from _locale import * except ImportError: + # Locale emulation + CHAR_MAX = 127 LC_ALL = 6 *************** *** 32,36 **** def localeconv(): ! """ localeconv() -> dict. Returns numeric and monetary locale-specific parameters. """ --- 38,42 ---- def localeconv(): ! """ localeconv() -> dict. Returns numeric and monetary locale-specific parameters. """ *************** *** 39,69 **** 'currency_symbol': '', 'n_sign_posn': 127, ! 'p_cs_precedes': 127, ! 'n_cs_precedes': 127, ! 'mon_grouping': [], 'n_sep_by_space': 127, 'decimal_point': '.', 'negative_sign': '', 'positive_sign': '', ! 'p_sep_by_space': 127, 'int_curr_symbol': '', ! 'p_sign_posn': 127, 'thousands_sep': '', ! 'mon_thousands_sep': '', ! 'frac_digits': 127, 'mon_decimal_point': '', 'int_frac_digits': 127} ! def setlocale(category, value=None): ! """ setlocale(integer,string=None) -> string. Activates/queries locale processing. """ if value is not None and \ value is not 'C': ! raise Error,'_locale emulation only supports "C" locale' return 'C' def strcoll(a,b): ! """ strcoll(string,string) -> int. Compares two strings according to the locale. """ --- 45,75 ---- 'currency_symbol': '', 'n_sign_posn': 127, ! 'p_cs_precedes': 127, ! 'n_cs_precedes': 127, ! 'mon_grouping': [], 'n_sep_by_space': 127, 'decimal_point': '.', 'negative_sign': '', 'positive_sign': '', ! 'p_sep_by_space': 127, 'int_curr_symbol': '', ! 'p_sign_posn': 127, 'thousands_sep': '', ! 'mon_thousands_sep': '', ! 'frac_digits': 127, 'mon_decimal_point': '', 'int_frac_digits': 127} ! def setlocale(category, value=None): ! """ setlocale(integer,string=None) -> string. Activates/queries locale processing. """ if value is not None and \ value is not 'C': ! raise Error, '_locale emulation only supports "C" locale' return 'C' def strcoll(a,b): ! """ strcoll(string,string) -> int. Compares two strings according to the locale. """ *************** *** 71,75 **** def strxfrm(s): ! """ strxfrm(string) -> string. Returns a string that behaves for cmp locale-aware. """ --- 77,81 ---- def strxfrm(s): ! """ strxfrm(string) -> string. Returns a string that behaves for cmp locale-aware. """ *************** *** 87,91 **** result="" while s and grouping: ! # if grouping is -1, we are done if grouping[0]==CHAR_MAX: break --- 93,97 ---- result="" while s and grouping: ! # if grouping is -1, we are done if grouping[0]==CHAR_MAX: break *************** *** 108,112 **** def format(f,val,grouping=0): """Formats a value in the same way that the % formatting would use, ! but takes the current locale into account. Grouping is applied if the third parameter is true.""" result = f % val --- 114,118 ---- def format(f,val,grouping=0): """Formats a value in the same way that the % formatting would use, ! but takes the current locale into account. Grouping is applied if the third parameter is true.""" result = f % val *************** *** 119,124 **** return fields[0] else: ! raise Error,"Too many decimal points in result string" ! def str(val): """Convert float to integer, taking the locale into account.""" --- 125,130 ---- return fields[0] else: ! raise Error, "Too many decimal points in result string" ! def str(val): """Convert float to integer, taking the locale into account.""" *************** *** 136,140 **** if dd: s=string.split(str,dd) ! str=string.join(s,'.') #finally, parse the string return func(str) --- 142,146 ---- if dd: s=string.split(str,dd) ! str=string.join(s, '.') #finally, parse the string return func(str) *************** *** 145,159 **** def _test(): ! setlocale(LC_ALL,"") #do grouping ! s1=format("%d",123456789,1) ! print s1,"is",atoi(s1) #standard formatting s1=str(3.14) ! print s1,"is",atof(s1) ### Locale name aliasing engine # Author: Marc-Andre Lemburg, mal@lemburg.com def normalize(localename): --- 151,170 ---- def _test(): ! setlocale(LC_ALL, "") #do grouping ! s1=format("%d", 123456789,1) ! print s1, "is", atoi(s1) #standard formatting s1=str(3.14) ! print s1, "is", atof(s1) ### Locale name aliasing engine # Author: Marc-Andre Lemburg, mal@lemburg.com + # Various tweaks by Fredrik Lundh + + # store away the low-level version of setlocale (it's + # overridden below) + _setlocale = setlocale def normalize(localename): *************** *** 230,234 **** return None, None else: ! raise ValueError,'unknown locale: %s' % localename return l --- 241,245 ---- return None, None else: ! raise ValueError, 'unknown locale: %s' % localename return l *************** *** 248,253 **** else: return language + '.' + encoding ! ! def get_default(envvars=('LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LANG')): """ Tries to determine the default locale settings and returns --- 259,264 ---- else: return language + '.' + encoding ! ! def getdefaultlocale(envvars=('LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LANG')): """ Tries to determine the default locale settings and returns *************** *** 255,260 **** According to POSIX, a program which has not called ! setlocale(LC_ALL,"") runs using the portable 'C' locale. ! Calling setlocale(LC_ALL,"") lets it use the default locale as defined by the LANG variable. Since we don't want to interfere with the current locale setting we thus emulate the behaviour --- 266,271 ---- According to POSIX, a program which has not called ! setlocale(LC_ALL, "") runs using the portable 'C' locale. ! Calling setlocale(LC_ALL, "") lets it use the default locale as defined by the LANG variable. Since we don't want to interfere with the current locale setting we thus emulate the behaviour *************** *** 272,275 **** --- 283,297 ---- """ + try: + # check if it's supported by the _locale module + import _locale + code, encoding = _locale._getdefaultlocale() + if sys.platform == "win32" and code and code[:2] == "0x": + # map windows language identifier to language name + code = windows_locale.get(int(code, 0)) + return code, encoding + except (ImportError, NameError): + pass + # fall back on POSIX behaviour import os lookup = os.environ.get *************** *** 281,286 **** localename = 'C' return _parse_localename(localename) ! def get_locale(category=LC_CTYPE): """ Returns the current setting for the given locale category as --- 303,311 ---- localename = 'C' return _parse_localename(localename) + + # compatibility + get_default = getdefaultlocale ! def getlocale(category=LC_CTYPE): """ Returns the current setting for the given locale category as *************** *** 295,326 **** """ ! localename = setlocale(category) if category == LC_ALL and ';' in localename: ! raise TypeError,'category LC_ALL is not supported' return _parse_localename(localename) ! def set_locale(localetuple, category=LC_ALL): ! """ Set the locale according to the localetuple (language code, ! encoding) as returned by get_locale() and get_default(). ! The given codes are passed through the locale aliasing engine ! before being given to setlocale() for processing. ! category may be given as one of the LC_* values. It defaults ! to LC_ALL. """ ! setlocale(category, normalize(_build_localename(localetuple))) ! def set_to_default(category=LC_ALL): """ Sets the locale for category to the default setting. The default setting is determined by calling ! get_default(). category defaults to LC_ALL. ! """ ! setlocale(category, _build_localename(get_default())) ### Database --- 320,353 ---- """ ! localename = _setlocale(category) if category == LC_ALL and ';' in localename: ! raise TypeError, 'category LC_ALL is not supported' return _parse_localename(localename) ! def setlocale(category, locale=None): ! """ Set the locale for the given category. The locale can be ! a string, a locale tuple (language code, encoding), or None. ! Locale tuples are converted to strings the locale aliasing ! engine. Locale strings are passed directly to the C lib. ! category may be given as one of the LC_* values. """ ! if locale and type(locale) is not type(""): ! # convert to string ! locale = normalize(_build_localename(locale)) ! return _setlocale(category, locale) ! def resetlocale(category=LC_ALL): """ Sets the locale for category to the default setting. The default setting is determined by calling ! getdefaultlocale(). category defaults to LC_ALL. ! """ ! _setlocale(category, _build_localename(getdefaultlocale())) ### Database *************** *** 330,334 **** # definitions and adding some more aliases. The file is usually # available as /usr/lib/X11/locale/locale.alias. ! # # --- 357,361 ---- # definitions and adding some more aliases. The file is usually # available as /usr/lib/X11/locale/locale.alias. ! # # *************** *** 337,374 **** # encoding_alias = { ! '437': 'C', ! 'c': 'C', ! 'iso8859': 'ISO8859-1', ! '8859': 'ISO8859-1', ! '88591': 'ISO8859-1', ! 'ascii': 'ISO8859-1', ! 'en': 'ISO8859-1', ! 'iso88591': 'ISO8859-1', ! 'iso_8859-1': 'ISO8859-1', ! '885915': 'ISO8859-15', ! 'iso885915': 'ISO8859-15', ! 'iso_8859-15': 'ISO8859-15', ! 'iso8859-2': 'ISO8859-2', ! 'iso88592': 'ISO8859-2', ! 'iso_8859-2': 'ISO8859-2', ! 'iso88595': 'ISO8859-5', ! 'iso88596': 'ISO8859-6', ! 'iso88597': 'ISO8859-7', ! 'iso88598': 'ISO8859-8', ! 'iso88599': 'ISO8859-9', ! 'iso-2022-jp': 'JIS7', ! 'jis': 'JIS7', ! 'jis7': 'JIS7', ! 'sjis': 'SJIS', ! 'tis620': 'TACTIS', ! 'ajec': 'eucJP', ! 'eucjp': 'eucJP', ! 'ujis': 'eucJP', ! 'utf-8': 'utf', ! 'utf8': 'utf', ! 'utf8@ucs4': 'utf', } ! # # The locale_alias table maps lowercase alias names to C locale names # (case-sensitive). Encodings are always separated from the locale --- 364,401 ---- # encoding_alias = { ! '437': 'C', ! 'c': 'C', ! 'iso8859': 'ISO8859-1', ! '8859': 'ISO8859-1', ! '88591': 'ISO8859-1', ! 'ascii': 'ISO8859-1', ! 'en': 'ISO8859-1', ! 'iso88591': 'ISO8859-1', ! 'iso_8859-1': 'ISO8859-1', ! '885915': 'ISO8859-15', ! 'iso885915': 'ISO8859-15', ! 'iso_8859-15': 'ISO8859-15', ! 'iso8859-2': 'ISO8859-2', ! 'iso88592': 'ISO8859-2', ! 'iso_8859-2': 'ISO8859-2', ! 'iso88595': 'ISO8859-5', ! 'iso88596': 'ISO8859-6', ! 'iso88597': 'ISO8859-7', ! 'iso88598': 'ISO8859-8', ! 'iso88599': 'ISO8859-9', ! 'iso-2022-jp': 'JIS7', ! 'jis': 'JIS7', ! 'jis7': 'JIS7', ! 'sjis': 'SJIS', ! 'tis620': 'TACTIS', ! 'ajec': 'eucJP', ! 'eucjp': 'eucJP', ! 'ujis': 'eucJP', ! 'utf-8': 'utf', ! 'utf8': 'utf', ! 'utf8@ucs4': 'utf', } ! # # The locale_alias table maps lowercase alias names to C locale names # (case-sensitive). Encodings are always separated from the locale *************** *** 562,565 **** --- 589,632 ---- } + # + # this maps windows language identifiers (as used on Windows 95 and + # earlier) to locale strings. + # + # NOTE: this mapping is incomplete. If your language is missing, send + # a note with the missing language identifier and the suggested locale + # code to Fredrik Lundh . Thanks /F + + windows_locale = { + 0x0404: "zh_TW", # Chinese (Taiwan) + 0x0804: "zh_CN", # Chinese (PRC) + 0x0406: "da_DK", # Danish + 0x0413: "nl_NL", # Dutch (Netherlands) + 0x0409: "en_US", # English (United States) + 0x0809: "en_UK", # English (United Kingdom) + 0x0c09: "en_AU", # English (Australian) + 0x1009: "en_CA", # English (Canadian) + 0x1409: "en_NZ", # English (New Zealand) + 0x1809: "en_IE", # English (Ireland) + 0x1c09: "en_ZA", # English (South Africa) + 0x040b: "fi_FI", # Finnish + 0x040c: "fr_FR", # French (Standard) + 0x080c: "fr_BE", # French (Belgian) + 0x0c0c: "fr_CA", # French (Canadian) + 0x100c: "fr_CH", # French (Switzerland) + 0x0407: "de_DE", # German (Standard) + 0x0408: "el_GR", # Greek + 0x040d: "iw_IL", # Hebrew + 0x040f: "is_IS", # Icelandic + 0x0410: "it_IT", # Italian (Standard) + 0x0411: "ja_JA", # Japanese + 0x0414: "no_NO", # Norwegian (Bokmal) + 0x0816: "pt_PT", # Portuguese (Standard) + 0x0c0a: "es_ES", # Spanish (Modern Sort) + 0x0441: "sw_KE", # Swahili (Kenya) + 0x041d: "sv_SE", # Swedish + 0x081d: "sv_FI", # Swedish (Finland) + 0x041f: "tr_TR", # Turkish + } + def _print_locale(): *************** *** 574,580 **** del categories['LC_ALL'] ! print 'Locale defaults as determined by get_default():' print '-'*72 ! lang, enc = get_default() print 'Language: ', lang or '(undefined)' print 'Encoding: ', enc or '(undefined)' --- 641,647 ---- del categories['LC_ALL'] ! print 'Locale defaults as determined by getdefaultlocale():' print '-'*72 ! lang, enc = getdefaultlocale() print 'Language: ', lang or '(undefined)' print 'Encoding: ', enc or '(undefined)' *************** *** 584,621 **** print '-'*72 for name,category in categories.items(): ! print name,'...' ! lang, enc = get_locale(category) print ' Language: ', lang or '(undefined)' print ' Encoding: ', enc or '(undefined)' print - set_to_default() print ! print 'Locale settings after calling set_to_default():' print '-'*72 for name,category in categories.items(): ! print name,'...' ! lang, enc = get_locale(category) print ' Language: ', lang or '(undefined)' print ' Encoding: ', enc or '(undefined)' print ! try: ! setlocale(LC_ALL,"") except: print 'NOTE:' ! print 'setlocale(LC_ALL,"") does not support the default locale' print 'given in the OS environment variables.' else: print ! print 'Locale settings after calling setlocale(LC_ALL,""):' print '-'*72 for name,category in categories.items(): ! print name,'...' ! lang, enc = get_locale(category) print ' Language: ', lang or '(undefined)' print ' Encoding: ', enc or '(undefined)' print ! ### --- 651,688 ---- print '-'*72 for name,category in categories.items(): ! print name, '...' ! lang, enc = getlocale(category) print ' Language: ', lang or '(undefined)' print ' Encoding: ', enc or '(undefined)' print print ! print 'Locale settings after calling resetlocale():' print '-'*72 + resetlocale() for name,category in categories.items(): ! print name, '...' ! lang, enc = getlocale(category) print ' Language: ', lang or '(undefined)' print ' Encoding: ', enc or '(undefined)' print ! try: ! setlocale(LC_ALL, "") except: print 'NOTE:' ! print 'setlocale(LC_ALL, "") does not support the default locale' print 'given in the OS environment variables.' else: print ! print 'Locale settings after calling setlocale(LC_ALL, ""):' print '-'*72 for name,category in categories.items(): ! print name, '...' ! lang, enc = getlocale(category) print ' Language: ', lang or '(undefined)' print ' Encoding: ', enc or '(undefined)' print ! ### From python-dev@python.org Sun Jul 9 18:41:04 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 10:41:04 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.145,2.146 Message-ID: <200007091741.KAA03939@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv3773/Modules Modified Files: posixmodule.c Log Message: - added optional bufsize argument to new popen methods. for the moment, this argument must be left out or set to -1 (only the default bufsize is supported, that is) Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.145 retrieving revision 2.146 diff -C2 -r2.145 -r2.146 *** posixmodule.c 2000/07/09 14:49:51 2.145 --- posixmodule.c 2000/07/09 17:41:01 2.146 *************** *** 2156,2160 **** char *cmdstring; char *mode = "r"; ! if (!PyArg_ParseTuple(args, "s|s:popen", &cmdstring, &mode)) return NULL; --- 2156,2160 ---- char *cmdstring; char *mode = "r"; ! if (!PyArg_ParseTuple(args, "s|si:popen", &cmdstring, &mode, &bufsize)) return NULL; *************** *** 2169,2172 **** --- 2169,2177 ---- tm = _O_WRONLY; + if (bufsize != -1) { + PyErr_SetString(PyExc_ValueError, "bufsize must be -1"); + return NULL; + } + if (*(mode+1) == 't') f = _PyPopen(cmdstring, tm | _O_TEXT , POPEN_1); *************** *** 2193,2197 **** char *cmdstring; char *mode = "t"; ! if (!PyArg_ParseTuple(args, "s|s:popen2", &cmdstring, &mode)) return NULL; --- 2198,2203 ---- char *cmdstring; char *mode = "t"; ! int bufsize = -1; ! if (!PyArg_ParseTuple(args, "s|si:popen2", &cmdstring, &mode, &bufsize)) return NULL; *************** *** 2204,2208 **** tm = _O_BINARY; ! f = _PyPopen(cmdstring, tm , POPEN_2); return f; --- 2210,2219 ---- tm = _O_BINARY; ! if (bufsize != -1) { ! PyErr_SetString(PyExc_ValueError, "bufsize must be -1"); ! return NULL; ! } ! ! f = _PyPopen(cmdstring, tm, POPEN_2); return f; *************** *** 2224,2228 **** char *cmdstring; char *mode = "t"; ! if (!PyArg_ParseTuple(args, "s|s:Popen3", &cmdstring, &mode)) return NULL; --- 2235,2240 ---- char *cmdstring; char *mode = "t"; ! int bufsize = -1; ! if (!PyArg_ParseTuple(args, "s|si:popen3", &cmdstring, &mode, &bufsize)) return NULL; *************** *** 2235,2238 **** --- 2247,2255 ---- tm = _O_BINARY; + if (bufsize != -1) { + PyErr_SetString(PyExc_ValueError, "bufsize must be -1"); + return NULL; + } + f = _PyPopen(cmdstring, tm, POPEN_3); *************** *** 2255,2259 **** char *cmdstring; char *mode = "t"; ! if (!PyArg_ParseTuple(args, "s|s:popen4", &cmdstring, &mode)) return NULL; --- 2272,2277 ---- char *cmdstring; char *mode = "t"; ! int bufsize = -1; ! if (!PyArg_ParseTuple(args, "s|si:popen4", &cmdstring, &mode, &bufsize)) return NULL; *************** *** 2265,2271 **** } else tm = _O_BINARY; ! f = _PyPopen(cmdstring, tm , POPEN_4); ! return f; } --- 2283,2294 ---- } else tm = _O_BINARY; ! ! if (bufsize != -1) { ! PyErr_SetString(PyExc_ValueError, "bufsize must be -1"); ! return NULL; ! } ! f = _PyPopen(cmdstring, tm , POPEN_4); ! return f; } From python-dev@python.org Sun Jul 9 18:59:34 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 10:59:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.146,2.147 Message-ID: <200007091759.KAA04879@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv4740/Modules Modified Files: posixmodule.c Log Message: - added popen.popen2/popen3/popen4 support for windows. - added optional mode argument to popen2/popen3 for unix; if the second argument is an integer, it's assumed to be the buffer size. - changed nt.popen2/popen3/popen4 return values to match the popen2 module (stdout first, not stdin). Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.146 retrieving revision 2.147 diff -C2 -r2.146 -r2.147 *** posixmodule.c 2000/07/09 17:41:01 2.146 --- posixmodule.c 2000/07/09 17:59:32 2.147 *************** *** 2150,2154 **** posix_popen(PyObject *self, PyObject *args) { - int bufsize = -1; PyObject *f, *s; int tm = 0; --- 2150,2153 ---- *************** *** 2156,2159 **** --- 2155,2159 ---- char *cmdstring; char *mode = "r"; + int bufsize = -1; if (!PyArg_ParseTuple(args, "s|si:popen", &cmdstring, &mode, &bufsize)) return NULL; *************** *** 2175,2181 **** if (*(mode+1) == 't') ! f = _PyPopen(cmdstring, tm | _O_TEXT , POPEN_1); else if (*(mode+1) == 'b') ! f = _PyPopen(cmdstring, tm | _O_BINARY , POPEN_1); else f = _PyPopen(cmdstring, tm | _O_TEXT, POPEN_1); --- 2175,2181 ---- if (*(mode+1) == 't') ! f = _PyPopen(cmdstring, tm | _O_TEXT, POPEN_1); else if (*(mode+1) == 'b') ! f = _PyPopen(cmdstring, tm | _O_BINARY, POPEN_1); else f = _PyPopen(cmdstring, tm | _O_TEXT, POPEN_1); *************** *** 2222,2228 **** /* * Variation on * The result of this function is 3 pipes - the process's stdin, * stdout and stderr - * */ --- 2222,2228 ---- /* * Variation on + * * The result of this function is 3 pipes - the process's stdin, * stdout and stderr */ *************** *** 2289,2293 **** } ! f = _PyPopen(cmdstring, tm , POPEN_4); return f; --- 2289,2293 ---- } ! f = _PyPopen(cmdstring, tm, POPEN_4); return f; *************** *** 2517,2521 **** CloseHandle(hChildStderrRdDup); ! f = Py_BuildValue("OO",p1,p2); break; } --- 2517,2521 ---- CloseHandle(hChildStderrRdDup); ! f = Py_BuildValue("OO",p2,p1); break; } *************** *** 2546,2550 **** PyFile_SetBufSize(p2, 0); PyFile_SetBufSize(p3, 0); ! f = Py_BuildValue("OOO",p1,p2,p3); break; } --- 2546,2550 ---- PyFile_SetBufSize(p2, 0); PyFile_SetBufSize(p3, 0); ! f = Py_BuildValue("OOO",p2,p1,p3); break; } From python-dev@python.org Sun Jul 9 18:59:34 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 10:59:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib popen2.py,1.9,1.10 Message-ID: <200007091759.KAA04874@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv4740/Lib Modified Files: popen2.py Log Message: - added popen.popen2/popen3/popen4 support for windows. - added optional mode argument to popen2/popen3 for unix; if the second argument is an integer, it's assumed to be the buffer size. - changed nt.popen2/popen3/popen4 return values to match the popen2 module (stdout first, not stdin). Index: popen2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/popen2.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** popen2.py 2000/02/04 15:10:34 1.9 --- popen2.py 2000/07/09 17:59:31 1.10 *************** *** 90,118 **** return self.sts ! def popen2(cmd, bufsize=-1): ! """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is ! specified, it sets the buffer size for the I/O pipes. The file objects ! (child_stdout, child_stdin) are returned.""" ! _cleanup() ! inst = Popen3(cmd, 0, bufsize) ! return inst.fromchild, inst.tochild ! def popen3(cmd, bufsize=-1): ! """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is ! specified, it sets the buffer size for the I/O pipes. The file objects ! (child_stdout, child_stdin, child_stderr) are returned.""" ! _cleanup() ! inst = Popen3(cmd, 1, bufsize) ! return inst.fromchild, inst.tochild, inst.childerr def _test(): teststr = "abc\n" print "testing popen2..." r, w = popen2('cat') w.write(teststr) w.close() assert r.read() == teststr print "testing popen3..." ! r, w, e = popen3(['cat']) w.write(teststr) w.close() --- 90,142 ---- return self.sts ! try: ! from os import popen2 ! except NameError: ! def popen2(cmd, mode='t', bufsize=-1): ! """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is ! specified, it sets the buffer size for the I/O pipes. The file objects ! (child_stdout, child_stdin) are returned.""" ! if type(mode) is type(0) and bufsize == -1: ! bufsize = mode ! mode = 't' ! assert mode in ('t', 'b') ! _cleanup() ! inst = Popen3(cmd, 0, bufsize) ! return inst.fromchild, inst.tochild ! try: ! from os import popen3 ! except NameError: ! def popen3(cmd, mode='t', bufsize=-1): ! """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is ! specified, it sets the buffer size for the I/O pipes. The file objects ! (child_stdout, child_stdin, child_stderr) are returned.""" ! if type(mode) is type(0) and bufsize == -1: ! bufsize = mode ! mode = 't' ! assert mode in ('t', 'b') ! _cleanup() ! inst = Popen3(cmd, 1, bufsize) ! return inst.fromchild, inst.tochild, inst.childerr + try: + from os import popen4 + except NameError: + pass # not on unix + def _test(): teststr = "abc\n" print "testing popen2..." r, w = popen2('cat') + print r, w w.write(teststr) w.close() assert r.read() == teststr print "testing popen3..." ! try: ! r, w, e = popen3(['cat']) ! except: ! r, w, e = popen3('cat') ! print r, w, e w.write(teststr) w.close() From python-dev@python.org Sun Jul 9 20:10:22 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 9 Jul 2000 12:10:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/idle EditorWindow.py,1.34,1.35 Message-ID: <200007091910.MAA22797@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/idle In directory slayer.i.sourceforge.net:/tmp/cvs-serv22787 Modified Files: EditorWindow.py Log Message: Update to use the new standard webbrowser module if available, otherwise uses the BrowserControl module. BrowserControl is not removed to allow IDLE to be distributed separately and still be used with Python 1.5.2. Index: EditorWindow.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/idle/EditorWindow.py,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** EditorWindow.py 2000/05/10 17:28:42 1.34 --- EditorWindow.py 2000/07/09 19:10:19 1.35 *************** *** 7,11 **** import tkSimpleDialog import tkMessageBox ! import BrowserControl import idlever import WindowList --- 7,16 ---- import tkSimpleDialog import tkMessageBox ! try: ! import webbrowser ! except ImportError: ! import BrowserControl ! webbrowser = BrowserControl ! del BrowserControl import idlever import WindowList *************** *** 28,31 **** --- 33,37 ---- #$ event <> + #$ unix #$ unix *************** *** 299,303 **** def python_docs(self, event=None): ! BrowserControl.open(self.help_url) def select_all(self, event=None): --- 305,309 ---- def python_docs(self, event=None): ! webbrowser.open(self.help_url) def select_all(self, event=None): From python-dev@python.org Sun Jul 9 21:35:18 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 13:35:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules python.c,2.4,2.5 Message-ID: <200007092035.NAA01855@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv1751/Modules Modified Files: python.c Log Message: - ANSI-fication (patch #100805 by Peter Schneider-Kamp) Index: python.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/python.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** python.c 1998/12/07 14:28:47 2.4 --- python.c 2000/07/09 20:35:15 2.5 *************** *** 6,12 **** int ! main(argc, argv) ! int argc; ! char **argv; { return Py_Main(argc, argv); --- 6,10 ---- int ! main(int argc, char **argv) { return Py_Main(argc, argv); From python-dev@python.org Sun Jul 9 21:42:36 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 13:42:36 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules main.c,1.40,1.41 Message-ID: <200007092042.NAA02112@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2071/Modules Modified Files: main.c Log Message: - changed 1.5 to 2.0 in the help text (the PYTHONHOMEHELP define) - ANSI-fication (patch #100794 by Peter Schneider-Kamp) Index: main.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/main.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -r1.40 -r1.41 *** main.c 2000/06/30 23:58:05 1.40 --- main.c 2000/07/09 20:42:34 1.41 *************** *** 25,29 **** #define PYTHONHOMEHELP "\\lib" #else ! #define PYTHONHOMEHELP "/python1.5" #endif --- 25,29 ---- #define PYTHONHOMEHELP "\\lib" #else ! #define PYTHONHOMEHELP "/python2.0" #endif *************** *** 76,82 **** DL_EXPORT(int) ! Py_Main(argc, argv) ! int argc; ! char **argv; { int c; --- 76,80 ---- DL_EXPORT(int) ! Py_Main(int argc, char **argv) { int c; *************** *** 291,297 **** void ! Py_GetArgcArgv(argc, argv) ! int *argc; ! char ***argv; { *argc = orig_argc; --- 289,293 ---- void ! Py_GetArgcArgv(int *argc, char ***argv) { *argc = orig_argc; From python-dev@python.org Sun Jul 9 22:24:34 2000 From: python-dev@python.org (Barry Warsaw) Date: Sun, 9 Jul 2000 14:24:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib smtplib.py,1.23,1.24 Message-ID: <200007092124.OAA11926@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv11916 Modified Files: smtplib.py Log Message: Use TQSQ (triple quoted single quote) module docstring for better font-locking. This complets the merge with Mailman's version. Index: smtplib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/smtplib.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** smtplib.py 2000/03/28 21:45:46 1.23 --- smtplib.py 2000/07/09 21:24:31 1.24 *************** *** 1,5 **** #! /usr/bin/env python ! """SMTP/ESMTP client class. This should follow RFC 821 (SMTP) and RFC 1869 (ESMTP). --- 1,5 ---- #! /usr/bin/env python ! '''SMTP/ESMTP client class. This should follow RFC 821 (SMTP) and RFC 1869 (ESMTP). *************** *** 30,34 **** (250, "Somebody OverHere ") >>> s.quit() ! """ # Author: The Dragon De Monsyne --- 30,34 ---- (250, "Somebody OverHere ") >>> s.quit() ! ''' # Author: The Dragon De Monsyne From python-dev@python.org Sun Jul 9 23:27:13 2000 From: python-dev@python.org (Barry Warsaw) Date: Sun, 9 Jul 2000 15:27:13 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python exceptions.c,1.5,1.6 Message-ID: <200007092227.PAA22256@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv22242 Modified Files: exceptions.c Log Message: Exception__str__(): In case 1, be sure to decref the tmp local variable. This crushes another memory leak. Slight rewrite included. Index: exceptions.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** exceptions.c 2000/07/09 04:56:25 1.5 --- exceptions.c 2000/07/09 22:27:10 1.6 *************** *** 232,236 **** { PyObject* out; - PyObject* tmp; if (!PyArg_ParseTuple(args, "O", &self)) --- 232,235 ---- *************** *** 246,254 **** break; case 1: ! if (!(tmp = PySequence_GetItem(args, 0))) ! out = NULL; ! else out = PyObject_Str(tmp); break; default: out = PyObject_Str(args); --- 245,258 ---- break; case 1: ! { ! PyObject* tmp = PySequence_GetItem(args, 0); ! if (tmp) { out = PyObject_Str(tmp); + Py_DECREF(tmp); + } + else + out = NULL; break; + } default: out = PyObject_Str(args); From python-dev@python.org Mon Jul 10 00:16:13 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 16:16:13 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib locale.py,1.8,1.9 Message-ID: <200007092316.QAA32289@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv32044/Lib Modified Files: locale.py Log Message: - repaired locale.py for non-windows platforms. the try/except checked for the wrong exception. my fault. sorry. (first reported by Alex Coventry) Index: locale.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/locale.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** locale.py 2000/07/09 17:12:58 1.8 --- locale.py 2000/07/09 23:16:10 1.9 *************** *** 283,296 **** """ try: # check if it's supported by the _locale module import _locale code, encoding = _locale._getdefaultlocale() if sys.platform == "win32" and code and code[:2] == "0x": # map windows language identifier to language name code = windows_locale.get(int(code, 0)) return code, encoding ! except (ImportError, NameError): ! pass # fall back on POSIX behaviour import os --- 283,299 ---- """ + try: # check if it's supported by the _locale module import _locale code, encoding = _locale._getdefaultlocale() + except (ImportError, AttributeError): + pass + else: if sys.platform == "win32" and code and code[:2] == "0x": # map windows language identifier to language name code = windows_locale.get(int(code, 0)) return code, encoding ! # fall back on POSIX behaviour import os From python-dev@python.org Mon Jul 10 00:35:27 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 16:35:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib popen2.py,1.10,1.11 Message-ID: <200007092335.QAA00901@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv840/Lib Modified Files: popen2.py Log Message: - changed the nt.popen2 return values back to (write, read, ...), based on feedback from GvR. - added tuple-swapping code to popen2.py - fixed some runaway indentation in posixmodule.c Index: popen2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/popen2.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** popen2.py 2000/07/09 17:59:31 1.10 --- popen2.py 2000/07/09 23:35:24 1.11 *************** *** 90,100 **** return self.sts ! try: ! from os import popen2 ! except NameError: def popen2(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin) are returned.""" if type(mode) is type(0) and bufsize == -1: bufsize = mode --- 90,105 ---- return self.sts ! if hasattr(os, "popen2"): def popen2(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin) are returned.""" + w, r = os.popen2(cmd, mode, bufsize) + return r, w + else: + def popen2(cmd, mode='t', bufsize=-1): + """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is + specified, it sets the buffer size for the I/O pipes. The file objects + (child_stdout, child_stdin) are returned.""" if type(mode) is type(0) and bufsize == -1: bufsize = mode *************** *** 105,111 **** return inst.fromchild, inst.tochild ! try: ! from os import popen3 ! except NameError: def popen3(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is --- 110,121 ---- return inst.fromchild, inst.tochild ! if hasattr(os, "popen3"): ! def popen3(cmd, mode='t', bufsize=-1): ! """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is ! specified, it sets the buffer size for the I/O pipes. The file objects ! (child_stdout, child_stdin, child_stderr) are returned.""" ! w, r, e = os.popen3(cmd, mode, bufsize) ! return r, w, e ! else: def popen3(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is *************** *** 120,127 **** return inst.fromchild, inst.tochild, inst.childerr ! try: ! from os import popen4 ! except NameError: ! pass # not on unix def _test(): --- 130,142 ---- return inst.fromchild, inst.tochild, inst.childerr ! if hasattr(os, "popen4"): ! def popen4(cmd, mode='t', bufsize=-1): ! """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is ! specified, it sets the buffer size for the I/O pipes. The file objects ! (child_stdout_stderr, child_stdin) are returned.""" ! w, r = os.popen4(cmd, mode, bufsize) ! return r, w ! else: ! pass # not yet on unix def _test(): From python-dev@python.org Mon Jul 10 00:35:27 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 9 Jul 2000 16:35:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.147,2.148 Message-ID: <200007092335.QAA00897@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv840/Modules Modified Files: posixmodule.c Log Message: - changed the nt.popen2 return values back to (write, read, ...), based on feedback from GvR. - added tuple-swapping code to popen2.py - fixed some runaway indentation in posixmodule.c Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.147 retrieving revision 2.148 diff -C2 -r2.147 -r2.148 *** posixmodule.c 2000/07/09 17:59:32 2.147 --- posixmodule.c 2000/07/09 23:35:24 2.148 *************** *** 2296,2302 **** static int _PyPopenCreateProcess(char *cmdstring, ! HANDLE hStdin, ! HANDLE hStdout, ! HANDLE hStderr) { PROCESS_INFORMATION piProcInfo; --- 2296,2302 ---- static int _PyPopenCreateProcess(char *cmdstring, ! HANDLE hStdin, ! HANDLE hStdout, ! HANDLE hStderr) { PROCESS_INFORMATION piProcInfo; *************** *** 2361,2373 **** if (CreateProcess(NULL, ! s2, ! NULL, ! NULL, ! TRUE, ! CREATE_NEW_CONSOLE, ! NULL, ! NULL, ! &siStartInfo, ! &piProcInfo) ) { /* Close the handles now so anyone waiting is woken. */ CloseHandle(piProcInfo.hProcess); --- 2361,2373 ---- if (CreateProcess(NULL, ! s2, ! NULL, ! NULL, ! TRUE, ! CREATE_NEW_CONSOLE, ! NULL, ! NULL, ! &siStartInfo, ! &piProcInfo) ) { /* Close the handles now so anyone waiting is woken. */ CloseHandle(piProcInfo.hProcess); *************** *** 2405,2411 **** * being created. */ fSuccess = DuplicateHandle(GetCurrentProcess(), hChildStdinWr, ! GetCurrentProcess(), &hChildStdinWrDup, 0, ! FALSE, ! DUPLICATE_SAME_ACCESS); if (!fSuccess) return win32_error("DuplicateHandle", NULL); --- 2405,2411 ---- * being created. */ fSuccess = DuplicateHandle(GetCurrentProcess(), hChildStdinWr, ! GetCurrentProcess(), &hChildStdinWrDup, 0, ! FALSE, ! DUPLICATE_SAME_ACCESS); if (!fSuccess) return win32_error("DuplicateHandle", NULL); *************** *** 2419,2425 **** fSuccess = DuplicateHandle(GetCurrentProcess(), hChildStdoutRd, ! GetCurrentProcess(), &hChildStdoutRdDup, 0, ! FALSE, ! DUPLICATE_SAME_ACCESS); if (!fSuccess) return win32_error("DuplicateHandle", NULL); --- 2419,2424 ---- fSuccess = DuplicateHandle(GetCurrentProcess(), hChildStdoutRd, ! GetCurrentProcess(), &hChildStdoutRdDup, 0, ! FALSE, DUPLICATE_SAME_ACCESS); if (!fSuccess) return win32_error("DuplicateHandle", NULL); *************** *** 2432,2439 **** if (!CreatePipe(&hChildStderrRd, &hChildStderrWr, &saAttr, 0)) return win32_error("CreatePipe", NULL); ! fSuccess = DuplicateHandle(GetCurrentProcess(), hChildStderrRd, ! GetCurrentProcess(), &hChildStderrRdDup, 0, ! FALSE, ! DUPLICATE_SAME_ACCESS); if (!fSuccess) return win32_error("DuplicateHandle", NULL); --- 2431,2439 ---- if (!CreatePipe(&hChildStderrRd, &hChildStderrWr, &saAttr, 0)) return win32_error("CreatePipe", NULL); ! fSuccess = DuplicateHandle(GetCurrentProcess(), ! hChildStderrRd, ! GetCurrentProcess(), ! &hChildStderrRdDup, 0, ! FALSE, DUPLICATE_SAME_ACCESS); if (!fSuccess) return win32_error("DuplicateHandle", NULL); *************** *** 2517,2521 **** CloseHandle(hChildStderrRdDup); ! f = Py_BuildValue("OO",p2,p1); break; } --- 2517,2521 ---- CloseHandle(hChildStderrRdDup); ! f = Py_BuildValue("OO",p1,p2); break; } *************** *** 2546,2550 **** PyFile_SetBufSize(p2, 0); PyFile_SetBufSize(p3, 0); ! f = Py_BuildValue("OOO",p2,p1,p3); break; } --- 2546,2550 ---- PyFile_SetBufSize(p2, 0); PyFile_SetBufSize(p3, 0); ! f = Py_BuildValue("OOO",p1,p2,p3); break; } *************** *** 2553,2566 **** if (n == POPEN_4) { if (!_PyPopenCreateProcess(cmdstring, ! hChildStdinRd, ! hChildStdoutWr, ! hChildStdoutWr)) return win32_error("CreateProcess", NULL); } else { if (!_PyPopenCreateProcess(cmdstring, ! hChildStdinRd, ! hChildStdoutWr, ! hChildStderrWr)) return win32_error("CreateProcess", NULL); } --- 2553,2566 ---- if (n == POPEN_4) { if (!_PyPopenCreateProcess(cmdstring, ! hChildStdinRd, ! hChildStdoutWr, ! hChildStdoutWr)) return win32_error("CreateProcess", NULL); } else { if (!_PyPopenCreateProcess(cmdstring, ! hChildStdinRd, ! hChildStdoutWr, ! hChildStderrWr)) return win32_error("CreateProcess", NULL); } From python-dev@python.org Mon Jul 10 05:21:00 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 9 Jul 2000 21:21:00 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules md5.h,2.5,2.6 md5c.c,2.3,2.4 Message-ID: <200007100421.VAA16454@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv16446 Modified Files: md5.h md5c.c Log Message: Guido said include these in the Great ANSI-fication, so here they are! Index: md5.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/md5.h,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** md5.h 1996/07/21 02:34:55 2.5 --- md5.h 2000/07/10 04:20:57 2.6 *************** *** 28,43 **** */ - /* PROTOTYPES should be set to one if and only if the compiler supports - function argument prototyping. - The following makes PROTOTYPES default to 0 if it has not already - been defined with C compiler flags. - */ - #ifdef HAVE_PROTOTYPES - #define PROTOTYPES 1 - #endif - #ifndef PROTOTYPES - #define PROTOTYPES 0 - #endif - /* POINTER defines a generic pointer type */ typedef unsigned char *POINTER; --- 28,31 ---- *************** *** 63,82 **** #endif - /* PROTO_LIST is defined depending on how PROTOTYPES is defined above. - If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it - returns an empty list. - */ - #if PROTOTYPES - #define PROTO_LIST(list) list - #else - #define PROTO_LIST(list) () - #endif /* ========== End global.h; continue md5.h ========== */ /* MD5 context. */ typedef struct { ! UINT4 state[4]; /* state (ABCD) */ ! UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ ! unsigned char buffer[64]; /* input buffer */ } MD5_CTX; --- 51,61 ---- #endif /* ========== End global.h; continue md5.h ========== */ /* MD5 context. */ typedef struct { ! UINT4 state[4]; /* state (ABCD) */ ! UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ ! unsigned char buffer[64]; /* input buffer */ } MD5_CTX; *************** *** 88,93 **** #define MD5Final _Py_MD5Final ! void MD5Init PROTO_LIST ((MD5_CTX *)); ! void MD5Update PROTO_LIST ! ((MD5_CTX *, unsigned char *, unsigned int)); ! void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *)); --- 67,71 ---- #define MD5Final _Py_MD5Final ! void MD5Init(MD5_CTX *); ! void MD5Update(MD5_CTX *, unsigned char *, unsigned int); ! void MD5Final(unsigned char [16], MD5_CTX *); Index: md5c.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/md5c.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** md5c.c 1996/08/19 22:03:48 2.3 --- md5c.c 2000/07/10 04:20:57 2.4 *************** *** 27,32 **** #include "md5.h" ! /* Constants for MD5Transform routine. ! */ #define S11 7 --- 27,31 ---- #include "md5.h" ! /* Constants for MD5Transform routine. */ #define S11 7 *************** *** 47,66 **** #define S44 21 ! static void MD5Transform PROTO_LIST ((UINT4 [4], unsigned char [64])); ! static void Encode PROTO_LIST ! ((unsigned char *, UINT4 *, unsigned int)); ! static void Decode PROTO_LIST ! ((UINT4 *, unsigned char *, unsigned int)); ! static void MD5_memcpy PROTO_LIST ((POINTER, POINTER, unsigned int)); ! static void MD5_memset PROTO_LIST ((POINTER, int, unsigned int)); static unsigned char PADDING[64] = { ! 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; ! /* F, G, H and I are basic MD5 functions. ! */ #define F(x, y, z) (((x) & (y)) | ((~x) & (z))) #define G(x, y, z) (((x) & (z)) | ((y) & (~z))) --- 46,62 ---- #define S44 21 ! static void MD5Transform(UINT4[4], unsigned char[64]); ! static void Encode(unsigned char *, UINT4 *, unsigned int); ! static void Decode(UINT4 *, unsigned char *, unsigned int); ! static void MD5_memcpy(POINTER, POINTER, unsigned int); ! static void MD5_memset(POINTER, int, unsigned int); static unsigned char PADDING[64] = { ! 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; ! /* F, G, H and I are basic MD5 functions. */ #define F(x, y, z) (((x) & (y)) | ((~x) & (z))) #define G(x, y, z) (((x) & (z)) | ((y) & (~z))) *************** *** 68,335 **** #define I(x, y, z) ((y) ^ ((x) | (~z))) ! /* ROTATE_LEFT rotates x left n bits. ! */ #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) /* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. ! Rotation is separate from addition to prevent recomputation. */ #define FF(a, b, c, d, x, s, ac) { \ ! (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \ ! (a) = ROTATE_LEFT ((a), (s)); \ ! (a) += (b); \ ! } #define GG(a, b, c, d, x, s, ac) { \ ! (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \ ! (a) = ROTATE_LEFT ((a), (s)); \ ! (a) += (b); \ ! } #define HH(a, b, c, d, x, s, ac) { \ ! (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \ ! (a) = ROTATE_LEFT ((a), (s)); \ ! (a) += (b); \ ! } #define II(a, b, c, d, x, s, ac) { \ ! (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \ ! (a) = ROTATE_LEFT ((a), (s)); \ ! (a) += (b); \ ! } ! /* MD5 initialization. Begins an MD5 operation, writing a new context. ! */ ! void MD5Init (context) ! MD5_CTX *context; /* context */ { ! context->count[0] = context->count[1] = 0; ! /* Load magic initialization constants. ! */ ! context->state[0] = 0x67452301; ! context->state[1] = 0xefcdab89; ! context->state[2] = 0x98badcfe; ! context->state[3] = 0x10325476; } /* MD5 block update operation. Continues an MD5 message-digest ! operation, processing another message block, and updating the ! context. */ ! void MD5Update (context, input, inputLen) ! MD5_CTX *context; /* context */ ! unsigned char *input; /* input block */ ! unsigned int inputLen; /* length of input block */ { ! unsigned int i, index, partLen; ! /* Compute number of bytes mod 64 */ ! index = (unsigned int)((context->count[0] >> 3) & 0x3F); ! /* Update number of bits */ ! if ((context->count[0] += ((UINT4)inputLen << 3)) ! < ((UINT4)inputLen << 3)) ! context->count[1]++; ! context->count[1] += ((UINT4)inputLen >> 29); ! ! partLen = 64 - index; ! ! /* Transform as many times as possible. ! */ ! if (inputLen >= partLen) { ! MD5_memcpy ! ((POINTER)&context->buffer[index], (POINTER)input, partLen); ! MD5Transform (context->state, context->buffer); ! ! for (i = partLen; i + 63 < inputLen; i += 64) ! MD5Transform (context->state, &input[i]); ! ! index = 0; ! } ! else ! i = 0; ! ! /* Buffer remaining input */ ! MD5_memcpy ! ((POINTER)&context->buffer[index], (POINTER)&input[i], ! inputLen-i); } /* MD5 finalization. Ends an MD5 message-digest operation, writing the ! the message digest and zeroizing the context. */ ! void MD5Final (digest, context) ! unsigned char digest[16]; /* message digest */ ! MD5_CTX *context; /* context */ { ! unsigned char bits[8]; ! unsigned int index, padLen; ! /* Save number of bits */ ! Encode (bits, context->count, 8); ! /* Pad out to 56 mod 64. ! */ ! index = (unsigned int)((context->count[0] >> 3) & 0x3f); ! padLen = (index < 56) ? (56 - index) : (120 - index); ! MD5Update (context, PADDING, padLen); ! ! /* Append length (before padding) */ ! MD5Update (context, bits, 8); ! ! /* Store state in digest */ ! Encode (digest, context->state, 16); ! ! /* Zeroize sensitive information. ! */ ! MD5_memset ((POINTER)context, 0, sizeof (*context)); } ! /* MD5 basic transformation. Transforms state based on block. ! */ ! static void MD5Transform (state, block) ! UINT4 state[4]; ! unsigned char block[64]; { ! UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; ! Decode (x, block, 64); ! /* Round 1 */ ! FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */ ! FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */ ! FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */ ! FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */ ! FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */ ! FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */ ! FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */ ! FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */ ! FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */ ! FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */ ! FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */ ! FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */ ! FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */ ! FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */ ! FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */ ! FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */ ! ! /* Round 2 */ ! GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */ ! GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */ ! GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */ ! GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */ ! GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */ ! GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */ ! GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */ ! GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */ ! GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */ ! GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */ ! GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */ ! GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */ ! GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */ ! GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */ ! GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */ ! GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */ ! ! /* Round 3 */ ! HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */ ! HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */ ! HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */ ! HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */ ! HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */ ! HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */ ! HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */ ! HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */ ! HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */ ! HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */ ! HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */ ! HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */ ! HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */ ! HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */ ! HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */ ! HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */ ! ! /* Round 4 */ ! II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */ ! II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */ ! II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */ ! II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */ ! II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */ ! II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */ ! II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */ ! II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */ ! II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */ ! II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */ ! II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */ ! II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */ ! II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */ ! II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */ ! II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */ ! II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */ ! ! state[0] += a; ! state[1] += b; ! state[2] += c; ! state[3] += d; ! ! /* Zeroize sensitive information. ! */ ! MD5_memset ((POINTER)x, 0, sizeof (x)); } /* Encodes input (UINT4) into output (unsigned char). Assumes len is ! a multiple of 4. */ ! static void Encode (output, input, len) ! unsigned char *output; ! UINT4 *input; ! unsigned int len; { ! unsigned int i, j; ! for (i = 0, j = 0; j < len; i++, j += 4) { ! output[j] = (unsigned char)(input[i] & 0xff); ! output[j+1] = (unsigned char)((input[i] >> 8) & 0xff); ! output[j+2] = (unsigned char)((input[i] >> 16) & 0xff); ! output[j+3] = (unsigned char)((input[i] >> 24) & 0xff); ! } } /* Decodes input (unsigned char) into output (UINT4). Assumes len is ! a multiple of 4. */ ! static void Decode (output, input, len) ! UINT4 *output; ! unsigned char *input; ! unsigned int len; { ! unsigned int i, j; ! for (i = 0, j = 0; j < len; i++, j += 4) ! output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) | ! (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); } - /* Note: Replace "for loop" with standard memcpy if possible. - */ ! static void MD5_memcpy (output, input, len) ! POINTER output; ! POINTER input; ! unsigned int len; { ! unsigned int i; ! for (i = 0; i < len; i++) ! output[i] = input[i]; } ! /* Note: Replace "for loop" with standard memset if possible. ! */ ! static void MD5_memset (output, value, len) ! POINTER output; ! int value; ! unsigned int len; { ! unsigned int i; ! for (i = 0; i < len; i++) ! ((char *)output)[i] = (char)value; } --- 64,314 ---- #define I(x, y, z) ((y) ^ ((x) | (~z))) ! /* ROTATE_LEFT rotates x left n bits. */ #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) /* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. ! Rotation is separate from addition to prevent recomputation. */ #define FF(a, b, c, d, x, s, ac) { \ ! (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \ ! (a) = ROTATE_LEFT ((a), (s)); \ ! (a) += (b); \ ! } #define GG(a, b, c, d, x, s, ac) { \ ! (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \ ! (a) = ROTATE_LEFT ((a), (s)); \ ! (a) += (b); \ ! } #define HH(a, b, c, d, x, s, ac) { \ ! (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \ ! (a) = ROTATE_LEFT ((a), (s)); \ ! (a) += (b); \ ! } #define II(a, b, c, d, x, s, ac) { \ ! (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \ ! (a) = ROTATE_LEFT ((a), (s)); \ ! (a) += (b); \ ! } ! ! /* MD5 initialization. Begins an MD5 operation, writing a new context. */ ! void ! MD5Init(MD5_CTX *context) { ! context->count[0] = context->count[1] = 0; ! /* Load magic initialization constants. */ ! context->state[0] = 0x67452301; ! context->state[1] = 0xefcdab89; ! context->state[2] = 0x98badcfe; ! context->state[3] = 0x10325476; } + /* MD5 block update operation. Continues an MD5 message-digest ! operation, processing another message block, and updating the ! context. */ ! void ! MD5Update(MD5_CTX *context, unsigned char *input, unsigned int inputLen) { ! unsigned int i, index, partLen; ! /* Compute number of bytes mod 64 */ ! index = (unsigned int)((context->count[0] >> 3) & 0x3F); ! /* Update number of bits */ ! if ((context->count[0] += ((UINT4)inputLen << 3)) ! < ((UINT4)inputLen << 3)) ! context->count[1]++; ! context->count[1] += ((UINT4)inputLen >> 29); ! ! partLen = 64 - index; ! ! /* Transform as many times as possible. */ ! if (inputLen >= partLen) { ! MD5_memcpy((POINTER)&context->buffer[index], (POINTER)input, partLen); ! MD5Transform(context->state, context->buffer); ! ! for (i = partLen; i + 63 < inputLen; i += 64) ! MD5Transform(context->state, &input[i]); ! ! index = 0; ! } ! else ! i = 0; ! ! /* Buffer remaining input */ ! MD5_memcpy((POINTER)&context->buffer[index], ! (POINTER)&input[i], inputLen-i); } /* MD5 finalization. Ends an MD5 message-digest operation, writing the ! the message digest and zeroizing the context. */ ! void ! MD5Final(unsigned char digest[16], MD5_CTX *context) { ! unsigned char bits[8]; ! unsigned int index, padLen; ! ! /* Save number of bits */ ! Encode (bits, context->count, 8); ! ! /* Pad out to 56 mod 64. */ ! index = (unsigned int)((context->count[0] >> 3) & 0x3f); ! padLen = (index < 56) ? (56 - index) : (120 - index); ! MD5Update(context, PADDING, padLen); ! ! /* Append length (before padding) */ ! MD5Update(context, bits, 8); ! /* Store state in digest */ ! Encode(digest, context->state, 16); ! /* Zeroize sensitive information. */ ! MD5_memset((POINTER)context, 0, sizeof (*context)); } ! ! /* MD5 basic transformation. Transforms state based on block. */ ! static void ! MD5Transform(UINT4 state[4], unsigned char block[64]) { ! UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; ! Decode (x, block, 64); ! /* Round 1 */ ! FF(a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */ ! FF(d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */ ! FF(c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */ ! FF(b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */ ! FF(a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */ ! FF(d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */ ! FF(c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */ ! FF(b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */ ! FF(a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */ ! FF(d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */ ! FF(c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */ ! FF(b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */ ! FF(a, b, c, d, x[12], S11, 0x6b901122); /* 13 */ ! FF(d, a, b, c, x[13], S12, 0xfd987193); /* 14 */ ! FF(c, d, a, b, x[14], S13, 0xa679438e); /* 15 */ ! FF(b, c, d, a, x[15], S14, 0x49b40821); /* 16 */ ! ! /* Round 2 */ ! GG(a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */ ! GG(d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */ ! GG(c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */ ! GG(b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */ ! GG(a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */ ! GG(d, a, b, c, x[10], S22, 0x2441453); /* 22 */ ! GG(c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */ ! GG(b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */ ! GG(a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */ ! GG(d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */ ! GG(c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */ ! GG(b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */ ! GG(a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */ ! GG(d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */ ! GG(c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */ ! GG(b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */ ! ! /* Round 3 */ ! HH(a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */ ! HH(d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */ ! HH(c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */ ! HH(b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */ ! HH(a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */ ! HH(d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */ ! HH(c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */ ! HH(b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */ ! HH(a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */ ! HH(d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */ ! HH(c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */ ! HH(b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */ ! HH(a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */ ! HH(d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */ ! HH(c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */ ! HH(b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */ ! ! /* Round 4 */ ! II(a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */ ! II(d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */ ! II(c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */ ! II(b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */ ! II(a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */ ! II(d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */ ! II(c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */ ! II(b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */ ! II(a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */ ! II(d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */ ! II(c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */ ! II(b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */ ! II(a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */ ! II(d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */ ! II(c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */ ! II(b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */ ! ! state[0] += a; ! state[1] += b; ! state[2] += c; ! state[3] += d; ! ! /* Zeroize sensitive information. */ ! MD5_memset((POINTER)x, 0, sizeof (x)); } + /* Encodes input (UINT4) into output (unsigned char). Assumes len is ! a multiple of 4. */ ! static void ! Encode(unsigned char *output, UINT4 *input, unsigned int len) { ! unsigned int i, j; ! for (i = 0, j = 0; j < len; i++, j += 4) { ! output[j] = (unsigned char)(input[i] & 0xff); ! output[j+1] = (unsigned char)((input[i] >> 8) & 0xff); ! output[j+2] = (unsigned char)((input[i] >> 16) & 0xff); ! output[j+3] = (unsigned char)((input[i] >> 24) & 0xff); ! } } + /* Decodes input (unsigned char) into output (UINT4). Assumes len is ! a multiple of 4. */ ! static void ! Decode(UINT4 *output, unsigned char *input, unsigned int len) { ! unsigned int i, j; ! for (i = 0, j = 0; j < len; i++, j += 4) { ! output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) | ! (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); ! } } ! /* Note: Replace "for loop" with standard memcpy if possible. */ ! static void ! MD5_memcpy(POINTER output, POINTER input, unsigned int len) { ! unsigned int i; ! for (i = 0; i < len; i++) ! output[i] = input[i]; } ! ! /* Note: Replace "for loop" with standard memset if possible. */ ! static void ! MD5_memset(POINTER output, int value, unsigned int len) { ! unsigned int i; ! for (i = 0; i < len; i++) ! ((char *)output)[i] = (char)value; } From python-dev@python.org Mon Jul 10 05:30:59 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Sun, 9 Jul 2000 21:30:59 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include objimpl.h,2.21,2.22 Message-ID: <200007100430.VAA16909@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv16857 Modified Files: objimpl.h Log Message: A small comment fix just to make sure I got my cvs/ssh setup right. Index: objimpl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/objimpl.h,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** objimpl.h 2000/07/09 00:55:06 2.21 --- objimpl.h 2000/07/10 04:30:56 2.22 *************** *** 70,74 **** */ ! /* The purpose of the object allocator is to make make the distinction between "object memory" and the rest within the Python heap. --- 70,74 ---- */ ! /* The purpose of the object allocator is to make the distinction between "object memory" and the rest within the Python heap. From python-dev@python.org Mon Jul 10 05:59:52 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Sun, 9 Jul 2000 21:59:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include pyport.h,2.1,2.2 Message-ID: <200007100459.VAA18203@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv18165 Modified Files: pyport.h Log Message: Remove the "1" that Tim sticked to the preprocessor symbol for unknown reasons (cf. the rest of the headers in the distribution) Index: pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.1 retrieving revision 2.2 diff -C2 -r2.1 -r2.2 *** pyport.h 2000/07/08 04:17:21 2.1 --- pyport.h 2000/07/10 04:59:49 2.2 *************** *** 8,12 **** #ifndef Py_PYPORT_H ! #define Py_PYPORT_H 1 /************************************************************************** --- 8,12 ---- #ifndef Py_PYPORT_H ! #define Py_PYPORT_H /************************************************************************** From python-dev@python.org Mon Jul 10 06:37:42 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Sun, 9 Jul 2000 22:37:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules gcmodule.c,2.1,2.2 Message-ID: <200007100537.WAA26490@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv26362 Modified Files: gcmodule.c Log Message: Initialize the return value in collect_generations() since it is updated conditionally in the code. Index: gcmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v retrieving revision 2.1 retrieving revision 2.2 diff -C2 -r2.1 -r2.2 *** gcmodule.c 2000/06/30 05:02:53 2.1 --- gcmodule.c 2000/07/10 05:37:39 2.2 *************** *** 456,460 **** static long collections0 = 0; static long collections1 = 0; ! long n; --- 456,460 ---- static long collections0 = 0; static long collections1 = 0; ! long n = 0; From python-dev@python.org Mon Jul 10 09:09:51 2000 From: python-dev@python.org (Sjoerd Mullender) Date: Mon, 10 Jul 2000 01:09:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib xmllib.py,1.20,1.21 Message-ID: <200007100809.BAA21042@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv21011 Modified Files: xmllib.py Log Message: Better error handling of bad entity references. Before when an & in an attribute value was not escaped, you could get two syntax errors: one about a missing semicolon and one about an unknown entity. Now you get only one about a bogus ampersand. Index: xmllib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xmllib.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** xmllib.py 2000/07/04 14:53:12 1.20 --- xmllib.py 2000/07/10 08:09:48 1.21 *************** *** 182,197 **** if res is None: return data ! res = ref.match(data, res.start(0)) if res is None: self.syntax_error("bogus `&'") ! i =i+1 continue i = res.end(0) - if data[i - 1] != ';': - self.syntax_error("`;' missing after entity/char reference") - i = i-1 str = res.group(1) ! pre = data[:res.start(0)] ! post = data[i:] if str[0] == '#': if str[1] == 'x': --- 182,194 ---- if res is None: return data ! s = res.start(0) ! res = ref.match(data, s) if res is None: self.syntax_error("bogus `&'") ! i = s+1 continue i = res.end(0) str = res.group(1) ! rescan = 0 if str[0] == '#': if str[1] == 'x': *************** *** 199,216 **** else: str = chr(string.atoi(str[1:])) ! data = pre + str + post ! i = res.start(0)+len(str) elif all: if self.entitydefs.has_key(str): ! data = pre + self.entitydefs[str] + post ! i = res.start(0) # rescan substituted text else: self.syntax_error("reference to unknown entity `&%s;'" % str) ! # can't do it, so keep the entity ref in ! data = pre + '&' + str + ';' + post ! i = res.start(0) + len(str) + 2 else: ! # just translating character references ! pass # i is already postioned correctly # Internal -- handle data as far as reasonable. May leave state --- 196,225 ---- else: str = chr(string.atoi(str[1:])) ! if data[i - 1] != ';': ! self.syntax_error("`;' missing after char reference") ! i = i-1 elif all: if self.entitydefs.has_key(str): ! str = self.entitydefs[str] ! rescan = 1 ! elif data[i - 1] != ';': ! self.syntax_error("bogus `&'") ! i = s + 1 # just past the & ! continue else: self.syntax_error("reference to unknown entity `&%s;'" % str) ! str = '&' + str + ';' ! elif data[i - 1] != ';': ! self.syntax_error("bogus `&'") ! i = s + 1 # just past the & ! continue ! ! # when we get here, str contains the translated text and i points ! # to the end of the string that is to be replaced ! data = data[:s] + str + data[i:] ! if rescan: ! i = s else: ! i = s + len(str) # Internal -- handle data as far as reasonable. May leave state From python-dev@python.org Mon Jul 10 10:26:44 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 02:26:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules tkappinit.c,1.7,1.8 Message-ID: <200007100926.CAA02580@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2537 Modified Files: tkappinit.c Log Message: ANSI-fication (and test if committing files works now) Index: tkappinit.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/tkappinit.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** tkappinit.c 1999/11/05 18:11:23 1.7 --- tkappinit.c 2000/07/10 09:26:41 1.8 *************** *** 17,22 **** int ! Tcl_AppInit(interp) ! Tcl_Interp *interp; { Tk_Window main; --- 17,21 ---- int ! Tcl_AppInit(Tcl_Interp *interp) { Tk_Window main; From python-dev@python.org Mon Jul 10 10:31:37 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 02:31:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules cmathmodule.c,2.14,2.15 Message-ID: <200007100931.CAA03260@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv3201 Modified Files: cmathmodule.c Log Message: ANSI-fication Index: cmathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cmathmodule.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** cmathmodule.c 2000/07/09 03:09:55 2.14 --- cmathmodule.c 2000/07/10 09:31:34 2.15 *************** *** 42,47 **** ! static Py_complex c_acos(x) ! Py_complex x; { return c_neg(c_prodi(c_log(c_sum(x,c_prod(c_i, --- 42,46 ---- ! static Py_complex c_acos(Py_complex x) { return c_neg(c_prodi(c_log(c_sum(x,c_prod(c_i, *************** *** 55,60 **** ! static Py_complex c_acosh(x) ! Py_complex x; { Py_complex z; --- 54,58 ---- ! static Py_complex c_acosh(Py_complex x) { Py_complex z; *************** *** 71,76 **** ! static Py_complex c_asin(x) ! Py_complex x; { Py_complex z; --- 69,73 ---- ! static Py_complex c_asin(Py_complex x) { Py_complex z; *************** *** 87,92 **** ! static Py_complex c_asinh(x) ! Py_complex x; { /* Break up long expression for WATCOM */ --- 84,88 ---- ! static Py_complex c_asinh(Py_complex x) { /* Break up long expression for WATCOM */ *************** *** 102,107 **** ! static Py_complex c_atan(x) ! Py_complex x; { return c_prod(c_i2,c_log(c_quot(c_sum(c_i,x),c_diff(c_i,x)))); --- 98,102 ---- ! static Py_complex c_atan(Py_complex x) { return c_prod(c_i2,c_log(c_quot(c_sum(c_i,x),c_diff(c_i,x)))); *************** *** 114,119 **** ! static Py_complex c_atanh(x) ! Py_complex x; { return c_prod(c_half,c_log(c_quot(c_sum(c_1,x),c_diff(c_1,x)))); --- 109,113 ---- ! static Py_complex c_atanh(Py_complex x) { return c_prod(c_half,c_log(c_quot(c_sum(c_1,x),c_diff(c_1,x)))); *************** *** 126,131 **** ! static Py_complex c_cos(x) ! Py_complex x; { Py_complex r; --- 120,124 ---- ! static Py_complex c_cos(Py_complex x) { Py_complex r; *************** *** 141,146 **** ! static Py_complex c_cosh(x) ! Py_complex x; { Py_complex r; --- 134,138 ---- ! static Py_complex c_cosh(Py_complex x) { Py_complex r; *************** *** 156,161 **** ! static Py_complex c_exp(x) ! Py_complex x; { Py_complex r; --- 148,152 ---- ! static Py_complex c_exp(Py_complex x) { Py_complex r; *************** *** 172,177 **** ! static Py_complex c_log(x) ! Py_complex x; { Py_complex r; --- 163,167 ---- ! static Py_complex c_log(Py_complex x) { Py_complex r; *************** *** 188,193 **** ! static Py_complex c_log10(x) ! Py_complex x; { Py_complex r; --- 178,182 ---- ! static Py_complex c_log10(Py_complex x) { Py_complex r; *************** *** 205,210 **** /* internal function not available from Python */ ! static Py_complex c_prodi(x) ! Py_complex x; { Py_complex r; --- 194,198 ---- /* internal function not available from Python */ ! static Py_complex c_prodi(Py_complex x) { Py_complex r; *************** *** 215,220 **** ! static Py_complex c_sin(x) ! Py_complex x; { Py_complex r; --- 203,207 ---- ! static Py_complex c_sin(Py_complex x) { Py_complex r; *************** *** 230,235 **** ! static Py_complex c_sinh(x) ! Py_complex x; { Py_complex r; --- 217,221 ---- ! static Py_complex c_sinh(Py_complex x) { Py_complex r; *************** *** 245,250 **** ! static Py_complex c_sqrt(x) ! Py_complex x; { Py_complex r; --- 231,235 ---- ! static Py_complex c_sqrt(Py_complex x) { Py_complex r; *************** *** 277,282 **** ! static Py_complex c_tan(x) ! Py_complex x; { Py_complex r; --- 262,266 ---- ! static Py_complex c_tan(Py_complex x) { Py_complex r; *************** *** 304,309 **** ! static Py_complex c_tanh(x) ! Py_complex x; { Py_complex r; --- 288,292 ---- ! static Py_complex c_tanh(Py_complex x) { Py_complex r; *************** *** 346,352 **** static PyObject * ! math_1(args, func) ! PyObject *args; ! Py_complex (*func)(Py_complex); { Py_complex x; --- 329,333 ---- static PyObject * ! math_1(PyObject *args, Py_complex (*func)(Py_complex)) { Py_complex x; *************** *** 366,370 **** #define FUNC1(stubname, func) \ ! static PyObject * stubname(self, args) PyObject *self, *args; { \ return math_1(args, func); \ } --- 347,351 ---- #define FUNC1(stubname, func) \ ! static PyObject * stubname(PyObject *self, PyObject *args) { \ return math_1(args, func); \ } From python-dev@python.org Mon Jul 10 10:43:27 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 02:43:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules stropmodule.c,2.66,2.67 Message-ID: <200007100943.CAA04678@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv4667 Modified Files: stropmodule.c Log Message: ANSI-fication Index: stropmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/stropmodule.c,v retrieving revision 2.66 retrieving revision 2.67 diff -C2 -r2.66 -r2.67 *** stropmodule.c 2000/07/09 03:09:55 2.66 --- stropmodule.c 2000/07/10 09:43:24 2.67 *************** *** 39,46 **** static PyObject * ! split_whitespace(s, len, maxsplit) ! char *s; ! int len; ! int maxsplit; { int i = 0, j, err; --- 39,43 ---- static PyObject * ! split_whitespace(char *s, int len, int maxsplit) { int i = 0, j, err; *************** *** 108,114 **** static PyObject * ! strop_splitfields(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { int len, n, i, j, err; --- 105,109 ---- static PyObject * ! strop_splitfields(PyObject *self, PyObject *args) { int len, n, i, j, err; *************** *** 179,185 **** static PyObject * ! strop_joinfields(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { PyObject *seq; --- 174,178 ---- static PyObject * ! strop_joinfields(PyObject *self, PyObject *args) { PyObject *seq; *************** *** 311,317 **** static PyObject * ! strop_find(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *s, *sub; --- 304,308 ---- static PyObject * ! strop_find(PyObject *self, PyObject *args) { char *s, *sub; *************** *** 355,361 **** static PyObject * ! strop_rfind(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *s, *sub; --- 346,350 ---- static PyObject * ! strop_rfind(PyObject *self, PyObject *args) { char *s, *sub; *************** *** 390,396 **** static PyObject * ! do_strip(args, striptype) ! PyObject *args; ! int striptype; { char *s; --- 379,383 ---- static PyObject * ! do_strip(PyObject *args, int striptype) { char *s; *************** *** 432,438 **** static PyObject * ! strop_strip(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { return do_strip(args, BOTHSTRIP); --- 419,423 ---- static PyObject * ! strop_strip(PyObject *self, PyObject *args) { return do_strip(args, BOTHSTRIP); *************** *** 446,452 **** static PyObject * ! strop_lstrip(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { return do_strip(args, LEFTSTRIP); --- 431,435 ---- static PyObject * ! strop_lstrip(PyObject *self, PyObject *args) { return do_strip(args, LEFTSTRIP); *************** *** 460,466 **** static PyObject * ! strop_rstrip(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { return do_strip(args, RIGHTSTRIP); --- 443,447 ---- static PyObject * ! strop_rstrip(PyObject *self, PyObject *args) { return do_strip(args, RIGHTSTRIP); *************** *** 474,480 **** static PyObject * ! strop_lower(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *s, *s_new; --- 455,459 ---- static PyObject * ! strop_lower(PyObject *self, PyObject *args) { char *s, *s_new; *************** *** 514,520 **** static PyObject * ! strop_upper(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *s, *s_new; --- 493,497 ---- static PyObject * ! strop_upper(PyObject *self, PyObject *args) { char *s, *s_new; *************** *** 555,561 **** static PyObject * ! strop_capitalize(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *s, *s_new; --- 532,536 ---- static PyObject * ! strop_capitalize(PyObject *self, PyObject *args) { char *s, *s_new; *************** *** 607,613 **** static PyObject * ! strop_expandtabs(self, args) ! PyObject *self; ! PyObject *args; { /* Original by Fredrik Lundh */ --- 582,586 ---- static PyObject * ! strop_expandtabs(PyObject *self, PyObject *args) { /* Original by Fredrik Lundh */ *************** *** 679,685 **** static PyObject * ! strop_count(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *s, *sub; --- 652,656 ---- static PyObject * ! strop_count(PyObject *self, PyObject *args) { char *s, *sub; *************** *** 724,730 **** static PyObject * ! strop_swapcase(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *s, *s_new; --- 695,699 ---- static PyObject * ! strop_swapcase(PyObject *self, PyObject *args) { char *s, *s_new; *************** *** 774,780 **** static PyObject * ! strop_atoi(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *s, *end; --- 743,747 ---- static PyObject * ! strop_atoi(PyObject *self, PyObject *args) { char *s, *end; *************** *** 829,835 **** static PyObject * ! strop_atol(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *s, *end; --- 796,800 ---- static PyObject * ! strop_atol(PyObject *self, PyObject *args) { char *s, *end; *************** *** 875,881 **** static PyObject * ! strop_atof(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { extern double strtod(const char *, char **); --- 840,844 ---- static PyObject * ! strop_atof(PyObject *self, PyObject *args) { extern double strtod(const char *, char **); *************** *** 920,926 **** static PyObject * ! strop_maketrans(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { unsigned char *c, *from=NULL, *to=NULL; --- 883,887 ---- static PyObject * ! strop_maketrans(PyObject *self, PyObject *args) { unsigned char *c, *from=NULL, *to=NULL; *************** *** 959,965 **** static PyObject * ! strop_translate(self, args) ! PyObject *self; ! PyObject *args; { register char *input, *table, *output; --- 920,924 ---- static PyObject * ! strop_translate(PyObject *self, PyObject *args) { register char *input, *table, *output; *************** *** 1039,1047 **** MEM, the function returns -1. */ ! static int mymemfind(mem, len, pat, pat_len) ! char *mem; ! int len; ! char *pat; ! int pat_len; { register int ii; --- 998,1002 ---- MEM, the function returns -1. */ ! static int mymemfind(char *mem, int len, char *pat, int pat_len) { register int ii; *************** *** 1067,1075 **** mem=11111 and pat==11 also return 2. */ ! static int mymemcnt(mem, len, pat, pat_len) ! char *mem; ! int len; ! char *pat; ! int pat_len; { register int offset = 0; --- 1022,1026 ---- mem=11111 and pat==11 also return 2. */ ! static int mymemcnt(char *mem, int len, char *pat, int pat_len) { register int offset = 0; *************** *** 1106,1119 **** NULL if an error occurred. */ ! static char *mymemreplace(str, len, pat, pat_len, sub, sub_len, count, out_len) ! char *str; ! int len; /* input string */ ! char *pat; ! int pat_len; /* pattern string to find */ ! char *sub; ! int sub_len; /* substitution string */ ! int count; /* number of replacements, 0 == all */ ! int *out_len; ! { char *out_s; --- 1057,1061 ---- NULL if an error occurred. */ ! static char *mymemreplace(char *str, int len, char *pat, int pat_len, char *sub, int sub_len, int count, int *out_len) { char *out_s; *************** *** 1176,1182 **** static PyObject * ! strop_replace(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *str, *pat,*sub,*new_s; --- 1118,1122 ---- static PyObject * ! strop_replace(PyObject *self, PyObject *args) { char *str, *pat,*sub,*new_s; From python-dev@python.org Mon Jul 10 10:49:22 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 02:49:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules binascii.c,2.20,2.21 Message-ID: <200007100949.CAA05325@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv5291 Modified Files: binascii.c Log Message: ANSI-fication Index: binascii.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/binascii.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** binascii.c 2000/06/30 23:50:38 2.20 --- binascii.c 2000/07/10 09:49:19 2.21 *************** *** 188,194 **** static PyObject * ! binascii_a2b_uu(self, args) ! PyObject *self; ! PyObject *args; { unsigned char *ascii_data, *bin_data; --- 188,192 ---- static PyObject * ! binascii_a2b_uu(PyObject *self, PyObject *args) { unsigned char *ascii_data, *bin_data; *************** *** 265,271 **** static PyObject * ! binascii_b2a_uu(self, args) ! PyObject *self; ! PyObject *args; { unsigned char *ascii_data, *bin_data; --- 263,267 ---- static PyObject * ! binascii_b2a_uu(PyObject *self, PyObject *args) { unsigned char *ascii_data, *bin_data; *************** *** 316,323 **** static int ! binascii_find_valid(s, slen, num) ! char *s; ! int slen; ! int num; { /* Finds & returns the (num+1)th --- 312,316 ---- static int ! binascii_find_valid(unsigned char *s, int slen, int num) { /* Finds & returns the (num+1)th *************** *** 346,352 **** static PyObject * ! binascii_a2b_base64(self, args) ! PyObject *self; ! PyObject *args; { unsigned char *ascii_data, *bin_data; --- 339,343 ---- static PyObject * ! binascii_a2b_base64(PyObject *self, PyObject *args) { unsigned char *ascii_data, *bin_data; *************** *** 431,437 **** static PyObject * ! binascii_b2a_base64(self, args) ! PyObject *self; ! PyObject *args; { unsigned char *ascii_data, *bin_data; --- 422,426 ---- static PyObject * ! binascii_b2a_base64(PyObject *self, PyObject *args) { unsigned char *ascii_data, *bin_data; *************** *** 484,490 **** static PyObject * ! binascii_a2b_hqx(self, args) ! PyObject *self; ! PyObject *args; { unsigned char *ascii_data, *bin_data; --- 473,477 ---- static PyObject * ! binascii_a2b_hqx(PyObject *self, PyObject *args) { unsigned char *ascii_data, *bin_data; *************** *** 550,556 **** static PyObject * ! binascii_rlecode_hqx(self, args) ! PyObject *self; ! PyObject *args; { unsigned char *in_data, *out_data; --- 537,541 ---- static PyObject * ! binascii_rlecode_hqx(PyObject *self, PyObject *args) { unsigned char *in_data, *out_data; *************** *** 599,605 **** static PyObject * ! binascii_b2a_hqx(self, args) ! PyObject *self; ! PyObject *args; { unsigned char *ascii_data, *bin_data; --- 584,588 ---- static PyObject * ! binascii_b2a_hqx(PyObject *self, PyObject *args) { unsigned char *ascii_data, *bin_data; *************** *** 641,647 **** static PyObject * ! binascii_rledecode_hqx(self, args) ! PyObject *self; ! PyObject *args; { unsigned char *in_data, *out_data; --- 624,628 ---- static PyObject * ! binascii_rledecode_hqx(PyObject *self, PyObject *args) { unsigned char *in_data, *out_data; *************** *** 740,746 **** static PyObject * ! binascii_crc_hqx(self, args) ! PyObject *self; ! PyObject *args; { unsigned char *bin_data; --- 721,725 ---- static PyObject * ! binascii_crc_hqx(PyObject *self, PyObject *args) { unsigned char *bin_data; *************** *** 880,886 **** static PyObject * ! binascii_crc32(self, args) ! PyObject *self; ! PyObject *args; { /* By Jim Ahlstrom; All rights transferred to CNRI */ unsigned char *bin_data; --- 859,863 ---- static PyObject * ! binascii_crc32(PyObject *self, PyObject *args) { /* By Jim Ahlstrom; All rights transferred to CNRI */ unsigned char *bin_data; From python-dev@python.org Mon Jul 10 10:51:19 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 02:51:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules cryptmodule.c,2.6,2.7 Message-ID: <200007100951.CAA05670@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv5607 Modified Files: cryptmodule.c Log Message: ANSI-fication Index: cryptmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cryptmodule.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** cryptmodule.c 2000/02/01 20:12:39 2.6 --- cryptmodule.c 2000/07/10 09:51:17 2.7 *************** *** 10,15 **** ! static PyObject *crypt_crypt(self, args) ! PyObject *self, *args; { char *word, *salt; --- 10,14 ---- ! static PyObject *crypt_crypt(PyObject *self, PyObject *args) { char *word, *salt; From python-dev@python.org Mon Jul 10 10:53:14 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 02:53:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules readline.c,2.20,2.21 Message-ID: <200007100953.CAA06074@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6009 Modified Files: readline.c Log Message: ANSI-fication Index: readline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** readline.c 2000/07/09 03:09:55 2.20 --- readline.c 2000/07/10 09:53:12 2.21 *************** *** 46,52 **** static PyObject * ! parse_and_bind(self, args) ! PyObject *self; ! PyObject *args; { char *s, *copy; --- 46,50 ---- static PyObject * ! parse_and_bind(PyObject *self, PyObject *args) { char *s, *copy; *************** *** 74,80 **** static PyObject * ! read_init_file(self, args) ! PyObject *self; ! PyObject *args; { char *s = NULL; --- 72,76 ---- static PyObject * ! read_init_file(PyObject *self, PyObject *args) { char *s = NULL; *************** *** 98,104 **** static PyObject * ! read_history_file(self, args) ! PyObject *self; ! PyObject *args; { char *s = NULL; --- 94,98 ---- static PyObject * ! read_history_file(PyObject *self, PyObject *args) { char *s = NULL; *************** *** 122,128 **** static PyObject * ! write_history_file(self, args) ! PyObject *self; ! PyObject *args; { char *s = NULL; --- 116,120 ---- static PyObject * ! write_history_file(PyObject *self, PyObject *args) { char *s = NULL; *************** *** 153,159 **** /* get the beginning index for the scope of the tab-completion */ static PyObject * ! get_begidx(self, args) ! PyObject *self; ! PyObject *args; { if(!PyArg_NoArgs(args)) { --- 145,149 ---- /* get the beginning index for the scope of the tab-completion */ static PyObject * ! get_begidx(PyObject *self, PyObject *args) { if(!PyArg_NoArgs(args)) { *************** *** 170,176 **** /* get the ending index for the scope of the tab-completion */ static PyObject * ! get_endidx(self, args) ! PyObject *self; ! PyObject *args; { if(!PyArg_NoArgs(args)) { --- 160,164 ---- /* get the ending index for the scope of the tab-completion */ static PyObject * ! get_endidx(PyObject *self, PyObject *args) { if(!PyArg_NoArgs(args)) { *************** *** 189,195 **** static PyObject * ! set_completer_delims(self, args) ! PyObject *self; ! PyObject *args; { char *break_chars; --- 177,181 ---- static PyObject * ! set_completer_delims(PyObject *self, PyObject *args) { char *break_chars; *************** *** 212,218 **** static PyObject * ! get_completer_delims(self, args) ! PyObject *self; ! PyObject *args; { if(!PyArg_NoArgs(args)) { --- 198,202 ---- static PyObject * ! get_completer_delims(PyObject *self, PyObject *args) { if(!PyArg_NoArgs(args)) { *************** *** 227,233 **** static PyObject * ! set_completer(self, args) ! PyObject *self; ! PyObject *args; { PyObject *function = Py_None; --- 211,215 ---- static PyObject * ! set_completer(PyObject *self, PyObject *args) { PyObject *function = Py_None; *************** *** 266,272 **** static PyObject * ! get_line_buffer(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_NoArgs(args)) --- 248,252 ---- static PyObject * ! get_line_buffer(PyObject *self, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 283,289 **** static PyObject * ! insert_text(self, args) ! PyObject *self; ! PyObject *args; { char *s; --- 263,267 ---- static PyObject * ! insert_text(PyObject *self, PyObject *args) { char *s; *************** *** 326,332 **** static char * ! on_completion(text, state) ! char *text; ! int state; { char *result = NULL; --- 304,308 ---- static char * ! on_completion(char *text, int state) { char *result = NULL; *************** *** 367,374 **** char ** ! flex_complete(text, start, end) ! char *text; ! int start; ! int end; { Py_XDECREF(begidx); --- 343,347 ---- char ** ! flex_complete(char *text, int start, int end) { Py_XDECREF(begidx); *************** *** 414,419 **** /* ARGSUSED */ static RETSIGTYPE ! onintr(sig) ! int sig; { longjmp(jbuf, 1); --- 387,391 ---- /* ARGSUSED */ static RETSIGTYPE ! onintr(int sig) { longjmp(jbuf, 1); *************** *** 424,429 **** static char * ! call_readline(prompt) ! char *prompt; { size_t n; --- 396,400 ---- static char * ! call_readline(char *prompt) { size_t n; From python-dev@python.org Mon Jul 10 10:55:34 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 02:55:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules imageop.c,2.22,2.23 Message-ID: <200007100955.CAA06377@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6307 Modified Files: imageop.c Log Message: ANSI-fication Index: imageop.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/imageop.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** imageop.c 2000/06/30 23:58:05 2.22 --- imageop.c 2000/07/10 09:55:32 2.23 *************** *** 36,42 **** static PyObject * ! imageop_crop(self, args) ! PyObject *self; ! PyObject *args; { char *cp, *ncp; --- 36,40 ---- static PyObject * ! imageop_crop(PyObject *self, PyObject *args) { char *cp, *ncp; *************** *** 92,98 **** static PyObject * ! imageop_scale(self, args) ! PyObject *self; ! PyObject *args; { char *cp, *ncp; --- 90,94 ---- static PyObject * ! imageop_scale(PyObject *self, PyObject *args) { char *cp, *ncp; *************** *** 141,147 **** static PyObject * ! imageop_tovideo(self, args) ! PyObject *self; ! PyObject *args; { int maxx, maxy, x, y, len; --- 137,141 ---- static PyObject * ! imageop_tovideo(PyObject *self, PyObject *args) { int maxx, maxy, x, y, len; *************** *** 197,203 **** static PyObject * ! imageop_grey2mono(self, args) ! PyObject *self; ! PyObject *args; { int tres, x, y, len; --- 191,195 ---- static PyObject * ! imageop_grey2mono(PyObject *self, PyObject *args) { int tres, x, y, len; *************** *** 239,245 **** static PyObject * ! imageop_grey2grey4(self, args) ! PyObject *self; ! PyObject *args; { int x, y, len; --- 231,235 ---- static PyObject * ! imageop_grey2grey4(PyObject *self, PyObject *args) { int x, y, len; *************** *** 280,286 **** static PyObject * ! imageop_grey2grey2(self, args) ! PyObject *self; ! PyObject *args; { int x, y, len; --- 270,274 ---- static PyObject * ! imageop_grey2grey2(PyObject *self, PyObject *args) { int x, y, len; *************** *** 321,327 **** static PyObject * ! imageop_dither2mono(self, args) ! PyObject *self; ! PyObject *args; { int sum, x, y, len; --- 309,313 ---- static PyObject * ! imageop_dither2mono(PyObject *self, PyObject *args) { int sum, x, y, len; *************** *** 367,373 **** static PyObject * ! imageop_dither2grey2(self, args) ! PyObject *self; ! PyObject *args; { int x, y, len; --- 353,357 ---- static PyObject * ! imageop_dither2grey2(PyObject *self, PyObject *args) { int x, y, len; *************** *** 412,418 **** static PyObject * ! imageop_mono2grey(self, args) ! PyObject *self; ! PyObject *args; { int v0, v1, x, y, len, nlen; --- 396,400 ---- static PyObject * ! imageop_mono2grey(PyObject *self, PyObject *args) { int v0, v1, x, y, len, nlen; *************** *** 451,457 **** static PyObject * ! imageop_grey22grey(self, args) ! PyObject *self; ! PyObject *args; { int x, y, len, nlen; --- 433,437 ---- static PyObject * ! imageop_grey22grey(PyObject *self, PyObject *args) { int x, y, len, nlen; *************** *** 489,495 **** static PyObject * ! imageop_grey42grey(self, args) ! PyObject *self; ! PyObject *args; { int x, y, len, nlen; --- 469,473 ---- static PyObject * ! imageop_grey42grey(PyObject *self, PyObject *args) { int x, y, len, nlen; *************** *** 526,532 **** static PyObject * ! imageop_rgb2rgb8(self, args) ! PyObject *self; ! PyObject *args; { int x, y, len, nlen; --- 504,508 ---- static PyObject * ! imageop_rgb2rgb8(PyObject *self, PyObject *args) { int x, y, len, nlen; *************** *** 570,576 **** static PyObject * ! imageop_rgb82rgb(self, args) ! PyObject *self; ! PyObject *args; { int x, y, len, nlen; --- 546,550 ---- static PyObject * ! imageop_rgb82rgb(PyObject *self, PyObject *args) { int x, y, len, nlen; *************** *** 613,619 **** static PyObject * ! imageop_rgb2grey(self, args) ! PyObject *self; ! PyObject *args; { int x, y, len, nlen; --- 587,591 ---- static PyObject * ! imageop_rgb2grey(PyObject *self, PyObject *args) { int x, y, len, nlen; *************** *** 651,657 **** static PyObject * ! imageop_grey2rgb(self, args) ! PyObject *self; ! PyObject *args; { int x, y, len, nlen; --- 623,627 ---- static PyObject * ! imageop_grey2rgb(PyObject *self, PyObject *args) { int x, y, len, nlen; *************** *** 685,691 **** /* static object * ! imageop_mul(self, args) ! object *self; ! object *args; { char *cp, *ncp; --- 655,659 ---- /* static object * ! imageop_mul(object *self, object *args) { char *cp, *ncp; From python-dev@python.org Mon Jul 10 10:57:22 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 02:57:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules zlibmodule.c,2.32,2.33 Message-ID: <200007100957.CAA06662@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6609 Modified Files: zlibmodule.c Log Message: ANSI-fication Index: zlibmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/zlibmodule.c,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -r2.32 -r2.33 *** zlibmodule.c 2000/05/03 23:44:33 2.32 --- zlibmodule.c 2000/07/10 09:57:19 2.33 *************** *** 43,48 **** static compobject * ! newcompobject(type) ! PyTypeObject *type; { compobject *self; --- 43,47 ---- static compobject * ! newcompobject(PyTypeObject *type) { compobject *self; *************** *** 63,69 **** static PyObject * ! PyZlib_compress(self, args) ! PyObject *self; ! PyObject *args; { PyObject *ReturnVal; --- 62,66 ---- static PyObject * ! PyZlib_compress(PyObject *self, PyObject *args) { PyObject *ReturnVal; *************** *** 161,167 **** static PyObject * ! PyZlib_decompress(self, args) ! PyObject *self; ! PyObject *args; { PyObject *result_str; --- 158,162 ---- static PyObject * ! PyZlib_decompress(PyObject *self, PyObject *args) { PyObject *result_str; *************** *** 268,274 **** static PyObject * ! PyZlib_compressobj(selfptr, args) ! PyObject *selfptr; ! PyObject *args; { compobject *self; --- 263,267 ---- static PyObject * ! PyZlib_compressobj(PyObject *selfptr, PyObject *args) { compobject *self; *************** *** 317,323 **** static PyObject * ! PyZlib_decompressobj(selfptr, args) ! PyObject *selfptr; ! PyObject *args; { int wbits=DEF_WBITS, err; --- 310,314 ---- static PyObject * ! PyZlib_decompressobj(PyObject *selfptr, PyObject *args) { int wbits=DEF_WBITS, err; *************** *** 364,369 **** static void ! Comp_dealloc(self) ! compobject *self; { if (self->is_initialised) --- 355,359 ---- static void ! Comp_dealloc(compobject *self) { if (self->is_initialised) *************** *** 374,379 **** static void ! Decomp_dealloc(self) ! compobject *self; { inflateEnd(&self->zst); --- 364,368 ---- static void ! Decomp_dealloc(compobject *self) { inflateEnd(&self->zst); *************** *** 391,397 **** static PyObject * ! PyZlib_objcompress(self, args) ! compobject *self; ! PyObject *args; { int err = Z_OK, inplen; --- 380,384 ---- static PyObject * ! PyZlib_objcompress(compobject *self, PyObject *args) { int err = Z_OK, inplen; *************** *** 450,456 **** static PyObject * ! PyZlib_objdecompress(self, args) ! compobject *self; ! PyObject *args; { int length, err, inplen; --- 437,441 ---- static PyObject * ! PyZlib_objdecompress(compobject *self, PyObject *args) { int length, err, inplen; *************** *** 524,530 **** static PyObject * ! PyZlib_flush(self, args) ! compobject *self; ! PyObject *args; { int length=DEFAULTALLOC, err = Z_OK; --- 509,513 ---- static PyObject * ! PyZlib_flush(compobject *self, PyObject *args) { int length=DEFAULTALLOC, err = Z_OK; *************** *** 623,629 **** static PyObject * ! PyZlib_unflush(self, args) ! compobject *self; ! PyObject *args; { int length=0, err; --- 606,610 ---- static PyObject * ! PyZlib_unflush(compobject *self, PyObject *args) { int length=0, err; *************** *** 708,714 **** static PyObject * ! Comp_getattr(self, name) ! compobject *self; ! char *name; { return Py_FindMethod(comp_methods, (PyObject *)self, name); --- 689,693 ---- static PyObject * ! Comp_getattr(compobject *self, char *name) { return Py_FindMethod(comp_methods, (PyObject *)self, name); *************** *** 716,722 **** static PyObject * ! Decomp_getattr(self, name) ! compobject *self; ! char *name; { if (strcmp(name, "unused_data") == 0) --- 695,699 ---- static PyObject * ! Decomp_getattr(compobject *self, char *name) { if (strcmp(name, "unused_data") == 0) *************** *** 736,741 **** static PyObject * ! PyZlib_adler32(self, args) ! PyObject *self, *args; { uLong adler32val=adler32(0L, Z_NULL, 0); --- 713,717 ---- static PyObject * ! PyZlib_adler32(PyObject *self, PyObject *args) { uLong adler32val=adler32(0L, Z_NULL, 0); *************** *** 759,764 **** static PyObject * ! PyZlib_crc32(self, args) ! PyObject *self, *args; { uLong crc32val=crc32(0L, Z_NULL, 0); --- 735,739 ---- static PyObject * ! PyZlib_crc32(PyObject *self, PyObject *args) { uLong crc32val=crc32(0L, Z_NULL, 0); *************** *** 825,832 **** For simplicity, errors (which are unlikely anyway) are ignored. */ static void ! insint(d, name, value) ! PyObject *d; ! char *name; ! int value; { PyObject *v = PyInt_FromLong((long) value); --- 800,804 ---- For simplicity, errors (which are unlikely anyway) are ignored. */ static void ! insint(PyObject *d, char *name, int value) { PyObject *v = PyInt_FromLong((long) value); From python-dev@python.org Mon Jul 10 11:04:00 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 03:04:00 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules threadmodule.c,2.33,2.34 Message-ID: <200007101004.DAA08474@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8410 Modified Files: threadmodule.c Log Message: ANSI-fication Index: threadmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/threadmodule.c,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -r2.33 -r2.34 *** threadmodule.c 2000/06/30 23:58:05 2.33 --- threadmodule.c 2000/07/10 10:03:58 2.34 *************** *** 51,56 **** static void ! lock_dealloc(self) ! lockobject *self; { /* Unlock the lock so it's safe to free it */ --- 51,55 ---- static void ! lock_dealloc(lockobject *self) { /* Unlock the lock so it's safe to free it */ *************** *** 63,69 **** static PyObject * ! lock_PyThread_acquire_lock(self, args) ! lockobject *self; ! PyObject *args; { int i; --- 62,66 ---- static PyObject * ! lock_PyThread_acquire_lock(lockobject *self, PyObject *args) { int i; *************** *** 100,106 **** static PyObject * ! lock_PyThread_release_lock(self, args) ! lockobject *self; ! PyObject *args; { if (!PyArg_NoArgs(args)) --- 97,101 ---- static PyObject * ! lock_PyThread_release_lock(lockobject *self, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 128,134 **** static PyObject * ! lock_locked_lock(self, args) ! lockobject *self; ! PyObject *args; { if (!PyArg_NoArgs(args)) --- 123,127 ---- static PyObject * ! lock_locked_lock(lockobject *self, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 159,165 **** static PyObject * ! lock_getattr(self, name) ! lockobject *self; ! char *name; { return Py_FindMethod(lock_methods, (PyObject *)self, name); --- 152,156 ---- static PyObject * ! lock_getattr(lockobject *self, char *name) { return Py_FindMethod(lock_methods, (PyObject *)self, name); *************** *** 192,197 **** static void ! t_bootstrap(boot_raw) ! void *boot_raw; { struct bootstate *boot = (struct bootstate *) boot_raw; --- 183,187 ---- static void ! t_bootstrap(void *boot_raw) { struct bootstate *boot = (struct bootstate *) boot_raw; *************** *** 224,230 **** static PyObject * ! thread_PyThread_start_new_thread(self, fargs) ! PyObject *self; /* Not used */ ! PyObject *fargs; { PyObject *func, *args = NULL, *keyw = NULL; --- 214,218 ---- static PyObject * ! thread_PyThread_start_new_thread(PyObject *self, PyObject *fargs) { PyObject *func, *args = NULL, *keyw = NULL; *************** *** 283,289 **** static PyObject * ! thread_PyThread_exit_thread(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { if (!PyArg_NoArgs(args)) --- 271,275 ---- static PyObject * ! thread_PyThread_exit_thread(PyObject *self, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 302,308 **** #ifndef NO_EXIT_PROG static PyObject * ! thread_PyThread_exit_prog(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { int sts; --- 288,292 ---- #ifndef NO_EXIT_PROG static PyObject * ! thread_PyThread_exit_prog(PyObject *self, PyObject *args) { int sts; *************** *** 315,321 **** static PyObject * ! thread_PyThread_allocate_lock(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { if (!PyArg_NoArgs(args)) --- 299,303 ---- static PyObject * ! thread_PyThread_allocate_lock(PyObject *self, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 331,337 **** static PyObject * ! thread_get_ident(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { long ident; --- 313,317 ---- static PyObject * ! thread_get_ident(PyObject *self, PyObject *args) { long ident; From python-dev@python.org Mon Jul 10 11:49:33 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 03:49:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules rgbimgmodule.c,2.19,2.20 Message-ID: <200007101049.DAA20502@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv20482 Modified Files: rgbimgmodule.c Log Message: ANSI-fication Index: rgbimgmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/rgbimgmodule.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** rgbimgmodule.c 2000/07/09 03:09:55 2.19 --- rgbimgmodule.c 2000/07/10 10:49:30 2.20 *************** *** 120,126 **** */ static void ! addlongimgtag(dptr, xsize, ysize) ! Py_UInt32 *dptr; ! int xsize, ysize; { dptr = dptr + (xsize * ysize); --- 120,124 ---- */ static void ! addlongimgtag(Py_UInt32 *dptr, int xsize, int ysize) { dptr = dptr + (xsize * ysize); *************** *** 138,143 **** */ static unsigned short ! getshort(inf) ! FILE *inf; { unsigned char buf[2]; --- 136,140 ---- */ static unsigned short ! getshort(FILE *inf) { unsigned char buf[2]; *************** *** 148,153 **** static Py_UInt32 ! getlong(inf) ! FILE *inf; { unsigned char buf[4]; --- 145,149 ---- static Py_UInt32 ! getlong(FILE *inf) { unsigned char buf[4]; *************** *** 158,164 **** static void ! putshort(outf, val) ! FILE *outf; ! unsigned short val; { unsigned char buf[2]; --- 154,158 ---- static void ! putshort(FILE *outf, unsigned short val) { unsigned char buf[2]; *************** *** 170,176 **** static int ! putlong(outf, val) ! FILE *outf; ! Py_UInt32 val; { unsigned char buf[4]; --- 164,168 ---- static int ! putlong(FILE *outf, Py_UInt32 val) { unsigned char buf[4]; *************** *** 184,190 **** static void ! readheader(inf, image) ! FILE *inf; ! IMAGE *image; { memset(image ,0, sizeof(IMAGE)); --- 176,180 ---- static void ! readheader(FILE *inf, IMAGE *image) { memset(image ,0, sizeof(IMAGE)); *************** *** 198,204 **** static int ! writeheader(outf, image) ! FILE *outf; ! IMAGE *image; { IMAGE t; --- 188,192 ---- static int ! writeheader(FILE *outf, IMAGE *image) { IMAGE t; *************** *** 220,227 **** static int ! writetab(outf, tab, len) ! FILE *outf; ! /*unsigned*/ Py_Int32 *tab; ! int len; { int r = 0; --- 208,212 ---- static int ! writetab(FILE *outf, /*unsigned*/ Py_Int32 *tab, int len) { int r = 0; *************** *** 235,242 **** static void ! readtab(inf, tab, len) ! FILE *inf; ! /*unsigned*/ Py_Int32 *tab; ! int len; { while(len) { --- 220,224 ---- static void ! readtab(FILE *inf, /*unsigned*/ Py_Int32 *tab, int len) { while(len) { *************** *** 252,257 **** */ static PyObject * ! sizeofimage(self, args) ! PyObject *self, *args; { char *name; --- 234,238 ---- */ static PyObject * ! sizeofimage(PyObject *self, PyObject *args) { char *name; *************** *** 284,289 **** */ static PyObject * ! longimagedata(self, args) ! PyObject *self, *args; { char *name; --- 265,269 ---- */ static PyObject * ! longimagedata(PyObject *self, PyObject *args) { char *name; *************** *** 466,472 **** static void ! interleaverow(lptr, cptr, z, n) ! unsigned char *lptr, *cptr; ! int z, n; { lptr += z; --- 446,450 ---- static void ! interleaverow(unsigned char *lptr, unsigned char *cptr, int z, int n) { lptr += z; *************** *** 478,484 **** static void ! copybw(lptr, n) ! Py_Int32 *lptr; ! int n; { while (n >= 8) { --- 456,460 ---- static void ! copybw(Py_Int32 *lptr, int n) { while (n >= 8) { *************** *** 501,506 **** static void ! setalpha(lptr, n) ! unsigned char *lptr; { while (n >= 8) { --- 477,481 ---- static void ! setalpha(unsigned char *lptr, int n) { while (n >= 8) { *************** *** 523,529 **** static void ! expandrow(optr, iptr, z) ! unsigned char *optr, *iptr; ! int z; { unsigned char pixel, count; --- 498,502 ---- static void ! expandrow(unsigned char *optr, unsigned char *iptr, int z) { unsigned char pixel, count; *************** *** 587,592 **** */ static PyObject * ! longstoimage(self, args) ! PyObject *self, *args; { unsigned char *lptr; --- 560,564 ---- */ static PyObject * ! longstoimage(PyObject *self, PyObject *args) { unsigned char *lptr; *************** *** 688,694 **** static void ! lumrow(rgbptr, lumptr, n) ! unsigned char *rgbptr, *lumptr; ! int n; { lumptr += CHANOFFSET(0); --- 660,664 ---- static void ! lumrow(unsigned char *rgbptr, unsigned char *lumptr, int n) { lumptr += CHANOFFSET(0); *************** *** 703,709 **** static int ! compressrow(lbuf, rlebuf, z, cnt) ! unsigned char *lbuf, *rlebuf; ! int z, cnt; { unsigned char *iptr, *ibufend, *sptr, *optr; --- 673,677 ---- static int ! compressrow(unsigned char *lbuf, unsigned char *rlebuf, int z, int cnt) { unsigned char *iptr, *ibufend, *sptr, *optr; *************** *** 766,772 **** static PyObject * ! ttob(self, args) ! PyObject *self; ! PyObject *args; { int order, oldorder; --- 734,738 ---- static PyObject * ! ttob(PyObject *self, PyObject *args) { int order, oldorder; From python-dev@python.org Mon Jul 10 12:56:06 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 04:56:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules dlmodule.c,2.9,2.10 newmodule.c,2.23,2.24 xxmodule.c,2.18,2.19 Message-ID: <200007101156.EAA09858@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv9813 Modified Files: dlmodule.c newmodule.c xxmodule.c Log Message: ANSI-fication Index: dlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/dlmodule.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** dlmodule.c 2000/06/30 23:58:05 2.9 --- dlmodule.c 2000/07/10 11:56:03 2.10 *************** *** 30,35 **** static PyObject * ! newdlobject(handle) ! PyUnivPtr *handle; { dlobject *xp; --- 30,34 ---- static PyObject * ! newdlobject(PyUnivPtr *handle) { dlobject *xp; *************** *** 42,47 **** static void ! dl_dealloc(xp) ! dlobject *xp; { if (xp->dl_handle != NULL) --- 41,45 ---- static void ! dl_dealloc(dlobject *xp) { if (xp->dl_handle != NULL) *************** *** 51,57 **** static PyObject * ! dl_close(xp, args) ! dlobject *xp; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 49,53 ---- static PyObject * ! dl_close(dlobject *xp, PyObject *args) { if (!PyArg_Parse(args, "")) *************** *** 66,72 **** static PyObject * ! dl_sym(xp, args) ! dlobject *xp; ! PyObject *args; { char *name; --- 62,66 ---- static PyObject * ! dl_sym(dlobject *xp, PyObject *args) { char *name; *************** *** 83,89 **** static PyObject * ! dl_call(xp, args) ! dlobject *xp; ! PyObject *args; /* (varargs) */ { PyObject *name; --- 77,81 ---- static PyObject * ! dl_call(dlobject *xp, PyObject *args) { PyObject *name; *************** *** 142,148 **** static PyObject * ! dl_getattr(xp, name) ! dlobject *xp; ! char *name; { return Py_FindMethod(dlobject_methods, (PyObject *)xp, name); --- 134,138 ---- static PyObject * ! dl_getattr(dlobject *xp, char *name) { return Py_FindMethod(dlobject_methods, (PyObject *)xp, name); *************** *** 170,176 **** static PyObject * ! dl_open(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 160,164 ---- static PyObject * ! dl_open(PyObject *self, PyObject *args) { char *name; Index: newmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/newmodule.c,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** newmodule.c 2000/06/30 23:58:05 2.23 --- newmodule.c 2000/07/10 11:56:03 2.24 *************** *** 18,24 **** static PyObject * ! new_instance(unused, args) ! PyObject* unused; ! PyObject* args; { PyObject* klass; --- 18,22 ---- static PyObject * ! new_instance(PyObject* unused, PyObject* args) { PyObject* klass; *************** *** 44,50 **** static PyObject * ! new_instancemethod(unused, args) ! PyObject* unused; ! PyObject* args; { PyObject* func; --- 42,46 ---- static PyObject * ! new_instancemethod(PyObject* unused, PyObject* args) { PyObject* func; *************** *** 76,82 **** static PyObject * ! new_function(unused, args) ! PyObject* unused; ! PyObject* args; { PyObject* code; --- 72,76 ---- static PyObject * ! new_function(PyObject* unused, PyObject* args) { PyObject* code; *************** *** 115,121 **** static PyObject * ! new_code(unused, args) ! PyObject* unused; ! PyObject* args; { int argcount; --- 109,113 ---- static PyObject * ! new_code(PyObject* unused, PyObject* args) { int argcount; *************** *** 163,169 **** static PyObject * ! new_module(unused, args) ! PyObject* unused; ! PyObject* args; { char *name; --- 155,159 ---- static PyObject * ! new_module(PyObject* unused, PyObject* args) { char *name; *************** *** 178,184 **** static PyObject * ! new_class(unused, args) ! PyObject* unused; ! PyObject* args; { PyObject * name; --- 168,172 ---- static PyObject * ! new_class(PyObject* unused, PyObject* args) { PyObject * name; Index: xxmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/xxmodule.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** xxmodule.c 2000/06/30 23:58:05 2.18 --- xxmodule.c 2000/07/10 11:56:03 2.19 *************** *** 38,43 **** static XxoObject * ! newXxoObject(arg) ! PyObject *arg; { XxoObject *self; --- 38,42 ---- static XxoObject * ! newXxoObject(PyObject *arg) { XxoObject *self; *************** *** 52,57 **** static void ! Xxo_dealloc(self) ! XxoObject *self; { Py_XDECREF(self->x_attr); --- 51,55 ---- static void ! Xxo_dealloc(XxoObject *self) { Py_XDECREF(self->x_attr); *************** *** 60,66 **** static PyObject * ! Xxo_demo(self, args) ! XxoObject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, ":demo")) --- 58,62 ---- static PyObject * ! Xxo_demo(XxoObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":demo")) *************** *** 76,82 **** static PyObject * ! Xxo_getattr(self, name) ! XxoObject *self; ! char *name; { if (self->x_attr != NULL) { --- 72,76 ---- static PyObject * ! Xxo_getattr(XxoObject *self, char *name) { if (self->x_attr != NULL) { *************** *** 91,98 **** static int ! Xxo_setattr(self, name, v) ! XxoObject *self; ! char *name; ! PyObject *v; { if (self->x_attr == NULL) { --- 85,89 ---- static int ! Xxo_setattr(XxoObject *self, char *name, PyObject *v) { if (self->x_attr == NULL) { *************** *** 137,143 **** static PyObject * ! xx_foo(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { long i, j; --- 128,132 ---- static PyObject * ! xx_foo(PyObject *self, PyObject *args) { long i, j; *************** *** 153,159 **** static PyObject * ! xx_new(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { XxoObject *rv; --- 142,146 ---- static PyObject * ! xx_new(PyObject *self, PyObject *args) { XxoObject *rv; *************** *** 170,176 **** static PyObject * ! xx_bug(self, args) ! PyObject *self; ! PyObject *args; { PyObject *list, *item; --- 157,161 ---- static PyObject * ! xx_bug(PyObject *self, PyObject *args) { PyObject *list, *item; *************** *** 193,199 **** static PyObject * ! xx_roj(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { PyObject *a; --- 178,182 ---- static PyObject * ! xx_roj(PyObject *self, PyObject *args) { PyObject *a; From python-dev@python.org Mon Jul 10 13:04:21 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 05:04:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules signalmodule.c,2.45,2.46 timingmodule.c,2.5,2.6 Message-ID: <200007101204.FAA12383@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv12134 Modified Files: signalmodule.c timingmodule.c Log Message: ANSI-fication Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** signalmodule.c 2000/07/09 03:09:55 2.45 --- signalmodule.c 2000/07/10 12:04:18 2.46 *************** *** 98,104 **** static PyObject * ! signal_default_int_handler(self, arg) ! PyObject *self; ! PyObject *arg; { PyErr_SetNone(PyExc_KeyboardInterrupt); --- 98,102 ---- static PyObject * ! signal_default_int_handler(PyObject *self, PyObject *args) { PyErr_SetNone(PyExc_KeyboardInterrupt); *************** *** 114,119 **** static RETSIGTYPE ! signal_handler(sig_num) ! int sig_num; { #ifdef WITH_THREAD --- 112,116 ---- static RETSIGTYPE ! signal_handler(int sig_num) { #ifdef WITH_THREAD *************** *** 147,153 **** #ifdef HAVE_ALARM static PyObject * ! signal_alarm(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { int t; --- 144,148 ---- #ifdef HAVE_ALARM static PyObject * ! signal_alarm(PyObject *self, PyObject *args) { int t; *************** *** 166,172 **** #ifdef HAVE_PAUSE static PyObject * ! signal_pause(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { if (!PyArg_NoArgs(args)) --- 161,165 ---- #ifdef HAVE_PAUSE static PyObject * ! signal_pause(PyObject *self, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 194,200 **** static PyObject * ! signal_signal(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { PyObject *obj; --- 187,191 ---- static PyObject * ! signal_signal(PyObject *self, PyObject *args) { PyObject *obj; *************** *** 254,260 **** static PyObject * ! signal_getsignal(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { int sig_num; --- 245,249 ---- static PyObject * ! signal_getsignal(PyObject *self, PyObject *args) { int sig_num; Index: timingmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timingmodule.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** timingmodule.c 1998/12/04 18:50:16 2.5 --- timingmodule.c 2000/07/10 12:04:18 2.6 *************** *** 9,15 **** static PyObject * ! start_timing(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 9,13 ---- static PyObject * ! start_timing(PyObject *self, PyObject *args) { if (!PyArg_Parse(args, "")) *************** *** 22,28 **** static PyObject * ! finish_timing(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 20,24 ---- static PyObject * ! finish_timing(PyObject *self, PyObject *args) { if (!PyArg_Parse(args, "")) *************** *** 35,41 **** static PyObject * ! seconds(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 31,35 ---- static PyObject * ! seconds(PyObject *self, PyObject *args) { if (!PyArg_Parse(args, "")) *************** *** 47,53 **** static PyObject * ! milli(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 41,45 ---- static PyObject * ! milli(PyObject *self, PyObject *args) { if (!PyArg_Parse(args, "")) *************** *** 58,64 **** } static PyObject * ! micro(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 50,54 ---- } static PyObject * ! micro(PyObject *self, PyObject *args) { if (!PyArg_Parse(args, "")) From python-dev@python.org Mon Jul 10 13:15:56 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 05:15:56 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules resource.c,2.12,2.13 termios.c,2.11,2.12 timemodule.c,2.90,2.91 Message-ID: <200007101215.FAA17987@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv17857 Modified Files: resource.c termios.c timemodule.c Log Message: ANSI-fication Index: resource.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/resource.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** resource.c 2000/06/30 23:58:05 2.12 --- resource.c 2000/07/10 12:15:54 2.13 *************** *** 33,39 **** static PyObject * ! resource_getrusage(self, args) ! PyObject *self; ! PyObject *args; { int who; --- 33,37 ---- static PyObject * ! resource_getrusage(PyObject *self, PyObject *args) { int who; *************** *** 80,86 **** static PyObject * ! resource_getrlimit(self, args) ! PyObject *self; ! PyObject *args; { struct rlimit rl; --- 78,82 ---- static PyObject * ! resource_getrlimit(PyObject *self, PyObject *args) { struct rlimit rl; *************** *** 112,118 **** static PyObject * ! resource_setrlimit(self, args) ! PyObject *self; ! PyObject *args; { struct rlimit rl; --- 108,112 ---- static PyObject * ! resource_setrlimit(PyObject *self, PyObject *args) { struct rlimit rl; *************** *** 158,164 **** static PyObject * ! resource_getpagesize(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, ":getpagesize")) --- 152,156 ---- static PyObject * ! resource_getpagesize(PyObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":getpagesize")) Index: termios.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/termios.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** termios.c 1999/01/14 19:31:42 2.11 --- termios.c 2000/07/10 12:15:54 2.12 *************** *** 47,53 **** static PyObject * ! termios_tcgetattr(self, args) ! PyObject *self; ! PyObject *args; { int fd; --- 47,51 ---- static PyObject * ! termios_tcgetattr(PyObject *self, PyObject *args) { int fd; *************** *** 127,133 **** static PyObject * ! termios_tcsetattr(self, args) ! PyObject *self; ! PyObject *args; { int fd, when; --- 125,129 ---- static PyObject * ! termios_tcsetattr(PyObject *self, PyObject *args) { int fd, when; *************** *** 196,202 **** static PyObject * ! termios_tcsendbreak(self, args) ! PyObject *self; ! PyObject *args; { int fd, duration; --- 192,196 ---- static PyObject * ! termios_tcsendbreak(PyObject *self, PyObject *args) { int fd, duration; *************** *** 220,226 **** static PyObject * ! termios_tcdrain(self, args) ! PyObject *self; ! PyObject *args; { int fd; --- 214,218 ---- static PyObject * ! termios_tcdrain(PyObject *self, PyObject *args) { int fd; *************** *** 247,253 **** static PyObject * ! termios_tcflush(self, args) ! PyObject *self; ! PyObject *args; { int fd, queue; --- 239,243 ---- static PyObject * ! termios_tcflush(PyObject *self, PyObject *args) { int fd, queue; *************** *** 274,280 **** static PyObject * ! termios_tcflow(self, args) ! PyObject *self; ! PyObject *args; { int fd, action; --- 264,268 ---- static PyObject * ! termios_tcflow(PyObject *self, PyObject *args) { int fd, action; Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.90 retrieving revision 2.91 diff -C2 -r2.90 -r2.91 *** timemodule.c 2000/07/09 03:09:56 2.90 --- timemodule.c 2000/07/10 12:15:54 2.91 *************** *** 129,135 **** static PyObject * ! time_time(self, args) ! PyObject *self; ! PyObject *args; { double secs; --- 129,133 ---- static PyObject * ! time_time(PyObject *self, PyObject *args) { double secs; *************** *** 161,167 **** static PyObject * ! time_clock(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_NoArgs(args)) --- 159,163 ---- static PyObject * ! time_clock(PyObject *self, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 174,180 **** /* Due to Mark Hammond */ static PyObject * ! time_clock(self, args) ! PyObject *self; ! PyObject *args; { static LARGE_INTEGER ctrStart; --- 170,174 ---- /* Due to Mark Hammond */ static PyObject * ! time_clock(PyObject *self, PyObject *args) { static LARGE_INTEGER ctrStart; *************** *** 218,224 **** static PyObject * ! time_sleep(self, args) ! PyObject *self; ! PyObject *args; { double secs; --- 212,216 ---- static PyObject * ! time_sleep(PyObject *self, PyObject *args) { double secs; *************** *** 238,243 **** static PyObject * ! tmtotuple(p) ! struct tm *p; { return Py_BuildValue("(iiiiiiiii)", --- 230,234 ---- static PyObject * ! tmtotuple(struct tm *p) { return Py_BuildValue("(iiiiiiiii)", *************** *** 254,260 **** static PyObject * ! time_convert(when, function) ! time_t when; ! struct tm * (*function)(const time_t *); { struct tm *p; --- 245,249 ---- static PyObject * ! time_convert(time_t when, struct tm * (*function)(const time_t *)) { struct tm *p; *************** *** 275,281 **** static PyObject * ! time_gmtime(self, args) ! PyObject *self; ! PyObject *args; { double when; --- 264,268 ---- static PyObject * ! time_gmtime(PyObject *self, PyObject *args) { double when; *************** *** 291,297 **** static PyObject * ! time_localtime(self, args) ! PyObject *self; ! PyObject *args; { double when; --- 278,282 ---- static PyObject * ! time_localtime(PyObject *self, PyObject *args) { double when; *************** *** 306,312 **** static int ! gettmarg(args, p) ! PyObject *args; ! struct tm *p; { int y; --- 291,295 ---- static int ! gettmarg(PyObject *args, struct tm *p) { int y; *************** *** 352,358 **** #ifdef HAVE_STRFTIME static PyObject * ! time_strftime(self, args) ! PyObject *self; ! PyObject *args; { PyObject *tup; --- 335,339 ---- #ifdef HAVE_STRFTIME static PyObject * ! time_strftime(PyObject *self, PyObject *args) { PyObject *tup; *************** *** 408,414 **** static PyObject * ! time_strptime(self, args) ! PyObject *self; ! PyObject *args; { struct tm tm; --- 389,393 ---- static PyObject * ! time_strptime(PyObject *self, PyObject *args) { struct tm tm; *************** *** 442,448 **** static PyObject * ! time_asctime(self, args) ! PyObject *self; ! PyObject *args; { PyObject *tup; --- 421,425 ---- static PyObject * ! time_asctime(PyObject *self, PyObject *args) { PyObject *tup; *************** *** 465,471 **** static PyObject * ! time_ctime(self, args) ! PyObject *self; ! PyObject *args; { double dt; --- 442,446 ---- static PyObject * ! time_ctime(PyObject *self, PyObject *args) { double dt; *************** *** 496,502 **** #ifdef HAVE_MKTIME static PyObject * ! time_mktime(self, args) ! PyObject *self; ! PyObject *args; { PyObject *tup; --- 471,475 ---- #ifdef HAVE_MKTIME static PyObject * ! time_mktime(PyObject *self, PyObject *args) { PyObject *tup; *************** *** 550,557 **** static void ! ins(d, name, v) ! PyObject *d; ! char *name; ! PyObject *v; { if (v == NULL) --- 523,527 ---- static void ! ins(PyObject *d, char *name, PyObject *v) { if (v == NULL) From python-dev@python.org Mon Jul 10 13:29:32 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 05:29:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules selectmodule.c,2.35,2.36 sgimodule.c,1.13,1.14 structmodule.c,2.34,2.35 syslogmodule.c,2.13,2.14 Message-ID: <200007101229.FAA21056@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv21042 Modified Files: selectmodule.c sgimodule.c structmodule.c syslogmodule.c Log Message: ANSI-fication Index: selectmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** selectmodule.c 2000/06/30 23:58:05 2.35 --- selectmodule.c 2000/07/10 12:29:26 2.36 *************** *** 59,64 **** static void ! reap_obj(fd2obj) ! pylist fd2obj[FD_SETSIZE + 3]; { int i; --- 59,63 ---- static void ! reap_obj(pylist fd2obj[FD_SETSIZE + 3]) { int i; *************** *** 75,82 **** */ static int ! list2set(list, set, fd2obj) ! PyObject *list; ! fd_set *set; ! pylist fd2obj[FD_SETSIZE + 3]; { int i; --- 74,78 ---- */ static int ! list2set(PyObject *list, fd_set *set, pylist fd2obj[FD_SETSIZE + 3]) { int i; *************** *** 156,162 **** /* returns NULL and sets the Python exception if an error occurred */ static PyObject * ! set2list(set, fd2obj) ! fd_set *set; ! pylist fd2obj[FD_SETSIZE + 3]; { int i, j, count=0; --- 152,156 ---- /* returns NULL and sets the Python exception if an error occurred */ static PyObject * ! set2list(fd_set *set, pylist fd2obj[FD_SETSIZE + 3]) { int i, j, count=0; *************** *** 200,206 **** static PyObject * ! select_select(self, args) ! PyObject *self; ! PyObject *args; { #ifdef MS_WINDOWS --- 194,198 ---- static PyObject * ! select_select(PyObject *self, PyObject *args) { #ifdef MS_WINDOWS Index: sgimodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sgimodule.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** sgimodule.c 2000/06/30 23:58:05 1.13 --- sgimodule.c 2000/07/10 12:29:26 1.14 *************** *** 19,25 **** static PyObject * ! sgi_nap(self, args) ! PyObject *self; ! PyObject *args; { long ticks; --- 19,23 ---- static PyObject * ! sgi_nap(PyObject *self, PyObject *args) { long ticks; *************** *** 36,42 **** static PyObject * ! sgi__getpty(self, args) ! PyObject *self; ! PyObject *args; { int oflag; --- 34,38 ---- static PyObject * ! sgi__getpty(PyObject *self, PyObject *args) { int oflag; Index: structmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/structmodule.c,v retrieving revision 2.34 retrieving revision 2.35 diff -C2 -r2.34 -r2.35 *** structmodule.c 2000/07/09 03:09:56 2.34 --- structmodule.c 2000/07/10 12:29:26 2.35 *************** *** 85,91 **** static int ! get_long(v, p) ! PyObject *v; ! long *p; { long x = PyInt_AsLong(v); --- 85,89 ---- static int ! get_long(PyObject *v, long *p) { long x = PyInt_AsLong(v); *************** *** 104,110 **** static int ! get_ulong(v, p) ! PyObject *v; ! unsigned long *p; { if (PyLong_Check(v)) { --- 102,106 ---- static int ! get_ulong(PyObject *v, unsigned long *p) { if (PyLong_Check(v)) { *************** *** 130,137 **** static int ! pack_float(x, p, incr) ! double x; /* The number to pack */ ! char *p; /* Where to pack the high order byte */ ! int incr; /* 1 for big-endian; -1 for little-endian */ { int s; --- 126,132 ---- static int ! pack_float(double x, /* The number to pack */ ! char *p, /* Where to pack the high order byte */ ! int incr) /* 1 for big-endian; -1 for little-endian */ { int s; *************** *** 202,209 **** static int ! pack_double(x, p, incr) ! double x; /* The number to pack */ ! char *p; /* Where to pack the high order byte */ ! int incr; /* 1 for big-endian; -1 for little-endian */ { int s; --- 197,203 ---- static int ! pack_double(double x, /* The number to pack */ ! char *p, /* Where to pack the high order byte */ ! int incr) /* 1 for big-endian; -1 for little-endian */ { int s; *************** *** 295,301 **** static PyObject * ! unpack_float(p, incr) ! char *p; /* Where the high order byte is */ ! int incr; /* 1 for big-endian; -1 for little-endian */ { int s; --- 289,294 ---- static PyObject * ! unpack_float(const char *p, /* Where the high order byte is */ ! int incr) /* 1 for big-endian; -1 for little-endian */ { int s; *************** *** 339,345 **** static PyObject * ! unpack_double(p, incr) ! char *p; /* Where the high order byte is */ ! int incr; /* 1 for big-endian; -1 for little-endian */ { int s; --- 332,337 ---- static PyObject * ! unpack_double(const char *p, /* Where the high order byte is */ ! int incr) /* 1 for big-endian; -1 for little-endian */ { int s; *************** *** 414,420 **** static PyObject * ! nu_char(p, f) ! const char *p; ! const formatdef *f; { return PyString_FromStringAndSize(p, 1); --- 406,410 ---- static PyObject * ! nu_char(const char *p, const formatdef *f) { return PyString_FromStringAndSize(p, 1); *************** *** 422,428 **** static PyObject * ! nu_byte(p, f) ! const char *p; ! const formatdef *f; { return PyInt_FromLong((long) *(signed char *)p); --- 412,416 ---- static PyObject * ! nu_byte(const char *p, const formatdef *f) { return PyInt_FromLong((long) *(signed char *)p); *************** *** 430,436 **** static PyObject * ! nu_ubyte(p, f) ! const char *p; ! const formatdef *f; { return PyInt_FromLong((long) *(unsigned char *)p); --- 418,422 ---- static PyObject * ! nu_ubyte(const char *p, const formatdef *f) { return PyInt_FromLong((long) *(unsigned char *)p); *************** *** 438,444 **** static PyObject * ! nu_short(p, f) ! const char *p; ! const formatdef *f; { return PyInt_FromLong((long) *(short *)p); --- 424,428 ---- static PyObject * ! nu_short(const char *p, const formatdef *f) { return PyInt_FromLong((long) *(short *)p); *************** *** 446,452 **** static PyObject * ! nu_ushort(p, f) ! const char *p; ! const formatdef *f; { return PyInt_FromLong((long) *(unsigned short *)p); --- 430,434 ---- static PyObject * ! nu_ushort(const char *p, const formatdef *f) { return PyInt_FromLong((long) *(unsigned short *)p); *************** *** 454,460 **** static PyObject * ! nu_int(p, f) ! const char *p; ! const formatdef *f; { return PyInt_FromLong((long) *(int *)p); --- 436,440 ---- static PyObject * ! nu_int(const char *p, const formatdef *f) { return PyInt_FromLong((long) *(int *)p); *************** *** 462,468 **** static PyObject * ! nu_uint(p, f) ! const char *p; ! const formatdef *f; { unsigned int x = *(unsigned int *)p; --- 442,446 ---- static PyObject * ! nu_uint(const char *p, const formatdef *f) { unsigned int x = *(unsigned int *)p; *************** *** 471,477 **** static PyObject * ! nu_long(p, f) ! const char *p; ! const formatdef *f; { return PyInt_FromLong(*(long *)p); --- 449,453 ---- static PyObject * ! nu_long(const char *p, const formatdef *f) { return PyInt_FromLong(*(long *)p); *************** *** 479,485 **** static PyObject * ! nu_ulong(p, f) ! const char *p; ! const formatdef *f; { return PyLong_FromUnsignedLong(*(unsigned long *)p); --- 455,459 ---- static PyObject * ! nu_ulong(const char *p, const formatdef *f) { return PyLong_FromUnsignedLong(*(unsigned long *)p); *************** *** 487,493 **** static PyObject * ! nu_float(p, f) ! const char *p; ! const formatdef *f; { float x; --- 461,465 ---- static PyObject * ! nu_float(const char *p, const formatdef *f) { float x; *************** *** 497,503 **** static PyObject * ! nu_double(p, f) ! const char *p; ! const formatdef *f; { double x; --- 469,473 ---- static PyObject * ! nu_double(const char *p, const formatdef *f) { double x; *************** *** 507,513 **** static PyObject * ! nu_void_p(p, f) ! const char *p; ! const formatdef *f; { return PyLong_FromVoidPtr(*(void **)p); --- 477,481 ---- static PyObject * ! nu_void_p(const char *p, const formatdef *f) { return PyLong_FromVoidPtr(*(void **)p); *************** *** 515,522 **** static int ! np_byte(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { long x; --- 483,487 ---- static int ! np_byte(char *p, PyObject *v, const formatdef *f) { long x; *************** *** 528,535 **** static int ! np_char(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { if (!PyString_Check(v) || PyString_Size(v) != 1) { --- 493,497 ---- static int ! np_char(char *p, PyObject *v, const formatdef *f) { if (!PyString_Check(v) || PyString_Size(v) != 1) { *************** *** 543,550 **** static int ! np_short(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { long x; --- 505,509 ---- static int ! np_short(char *p, PyObject *v, const formatdef *f) { long x; *************** *** 556,563 **** static int ! np_int(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { long x; --- 515,519 ---- static int ! np_int(char *p, PyObject *v, const formatdef *f) { long x; *************** *** 569,576 **** static int ! np_uint(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { unsigned long x; --- 525,529 ---- static int ! np_uint(char *p, PyObject *v, const formatdef *f) { unsigned long x; *************** *** 582,589 **** static int ! np_long(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { long x; --- 535,539 ---- static int ! np_long(char *p, PyObject *v, const formatdef *f) { long x; *************** *** 595,602 **** static int ! np_ulong(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { unsigned long x; --- 545,549 ---- static int ! np_ulong(char *p, PyObject *v, const formatdef *f) { unsigned long x; *************** *** 608,615 **** static int ! np_float(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { float x = (float)PyFloat_AsDouble(v); --- 555,559 ---- static int ! np_float(char *p, PyObject *v, const formatdef *f) { float x = (float)PyFloat_AsDouble(v); *************** *** 624,631 **** static int ! np_double(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { double x = PyFloat_AsDouble(v); --- 568,572 ---- static int ! np_double(char *p, PyObject *v, const formatdef *f) { double x = PyFloat_AsDouble(v); *************** *** 640,647 **** static int ! np_void_p(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { void *x = PyLong_AsVoidPtr(v); --- 581,585 ---- static int ! np_void_p(char *p, PyObject *v, const formatdef *f) { void *x = PyLong_AsVoidPtr(v); *************** *** 677,683 **** static PyObject * ! bu_int(p, f) ! const char *p; ! const formatdef *f; { long x = 0; --- 615,619 ---- static PyObject * ! bu_int(const char *p, const formatdef *f) { long x = 0; *************** *** 695,701 **** static PyObject * ! bu_uint(p, f) ! const char *p; ! const formatdef *f; { unsigned long x = 0; --- 631,635 ---- static PyObject * ! bu_uint(const char *p, const formatdef *f) { unsigned long x = 0; *************** *** 711,717 **** static PyObject * ! bu_float(p, f) ! const char *p; ! const formatdef *f; { return unpack_float(p, 1); --- 645,649 ---- static PyObject * ! bu_float(const char *p, const formatdef *f) { return unpack_float(p, 1); *************** *** 719,725 **** static PyObject * ! bu_double(p, f) ! const char *p; ! const formatdef *f; { return unpack_double(p, 1); --- 651,655 ---- static PyObject * ! bu_double(const char *p, const formatdef *f) { return unpack_double(p, 1); *************** *** 727,734 **** static int ! bp_int(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { long x; --- 657,661 ---- static int ! bp_int(char *p, PyObject *v, const formatdef *f) { long x; *************** *** 745,752 **** static int ! bp_uint(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { unsigned long x; --- 672,676 ---- static int ! bp_uint(char *p, PyObject *v, const formatdef *f) { unsigned long x; *************** *** 763,770 **** static int ! bp_float(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { double x = PyFloat_AsDouble(v); --- 687,691 ---- static int ! bp_float(char *p, PyObject *v, const formatdef *f) { double x = PyFloat_AsDouble(v); *************** *** 778,785 **** static int ! bp_double(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { double x = PyFloat_AsDouble(v); --- 699,703 ---- static int ! bp_double(char *p, PyObject *v, const formatdef *f) { double x = PyFloat_AsDouble(v); *************** *** 811,817 **** static PyObject * ! lu_int(p, f) ! const char *p; ! const formatdef *f; { long x = 0; --- 729,733 ---- static PyObject * ! lu_int(const char *p, const formatdef *f) { long x = 0; *************** *** 829,835 **** static PyObject * ! lu_uint(p, f) ! const char *p; ! const formatdef *f; { unsigned long x = 0; --- 745,749 ---- static PyObject * ! lu_uint(const char *p, const formatdef *f) { unsigned long x = 0; *************** *** 845,851 **** static PyObject * ! lu_float(p, f) ! const char *p; ! const formatdef *f; { return unpack_float(p+3, -1); --- 759,763 ---- static PyObject * ! lu_float(const char *p, const formatdef *f) { return unpack_float(p+3, -1); *************** *** 853,859 **** static PyObject * ! lu_double(p, f) ! const char *p; ! const formatdef *f; { return unpack_double(p+7, -1); --- 765,769 ---- static PyObject * ! lu_double(const char *p, const formatdef *f) { return unpack_double(p+7, -1); *************** *** 861,868 **** static int ! lp_int(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { long x; --- 771,775 ---- static int ! lp_int(char *p, PyObject *v, const formatdef *f) { long x; *************** *** 879,886 **** static int ! lp_uint(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { unsigned long x; --- 786,790 ---- static int ! lp_uint(char *p, PyObject *v, const formatdef *f) { unsigned long x; *************** *** 897,904 **** static int ! lp_float(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { double x = PyFloat_AsDouble(v); --- 801,805 ---- static int ! lp_float(char *p, PyObject *v, const formatdef *f) { double x = PyFloat_AsDouble(v); *************** *** 912,919 **** static int ! lp_double(p, v, f) ! char *p; ! PyObject *v; ! const formatdef *f; { double x = PyFloat_AsDouble(v); --- 813,817 ---- static int ! lp_double(char *p, PyObject *v, const formatdef *f) { double x = PyFloat_AsDouble(v); *************** *** 946,951 **** static const formatdef * ! whichtable(pfmt) ! const char **pfmt; { const char *fmt = (*pfmt)++; /* May be backed out of later */ --- 844,848 ---- static const formatdef * ! whichtable(char **pfmt) { const char *fmt = (*pfmt)++; /* May be backed out of later */ *************** *** 976,982 **** static const formatdef * ! getentry(c, f) ! int c; ! const formatdef *f; { for (; f->format != '\0'; f++) { --- 873,877 ---- static const formatdef * ! getentry(int c, const formatdef *f) { for (; f->format != '\0'; f++) { *************** *** 993,1000 **** static int ! align(size, c, e) ! int size; ! int c; ! const formatdef *e; { if (e->format == c) { --- 888,892 ---- static int ! align(int size, int c, const formatdef *e) { if (e->format == c) { *************** *** 1012,1018 **** static int ! calcsize(fmt, f) ! const char *fmt; ! const formatdef *f; { const formatdef *e; --- 904,908 ---- static int ! calcsize(const char *fmt, const formatdef *f) { const formatdef *e; *************** *** 1068,1074 **** static PyObject * ! struct_calcsize(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { char *fmt; --- 958,962 ---- static PyObject * ! struct_calcsize(PyObject *self, PyObject *args) { char *fmt; *************** *** 1092,1098 **** static PyObject * ! struct_pack(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { const formatdef *f, *e; --- 980,984 ---- static PyObject * ! struct_pack(PyObject *self, PyObject *args) { const formatdef *f, *e; *************** *** 1232,1238 **** static PyObject * ! struct_unpack(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { const formatdef *f, *e; --- 1118,1122 ---- static PyObject * ! struct_unpack(PyObject *self, PyObject *args) { const formatdef *f, *e; Index: syslogmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/syslogmodule.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** syslogmodule.c 2000/02/29 13:59:24 2.13 --- syslogmodule.c 2000/07/10 12:29:26 2.14 *************** *** 54,60 **** static PyObject * ! syslog_openlog(self, args) ! PyObject * self; ! PyObject * args; { long logopt = 0; --- 54,58 ---- static PyObject * ! syslog_openlog(PyObject * self, PyObject * args) { long logopt = 0; *************** *** 81,87 **** static PyObject * ! syslog_syslog(self, args) ! PyObject * self; ! PyObject * args; { char *message; --- 79,83 ---- static PyObject * ! syslog_syslog(PyObject * self, PyObject * args) { char *message; *************** *** 102,108 **** static PyObject * ! syslog_closelog(self, args) ! PyObject * self; ! PyObject * args; { if (!PyArg_ParseTuple(args, ":closelog")) --- 98,102 ---- static PyObject * ! syslog_closelog(PyObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":closelog")) *************** *** 116,122 **** static PyObject * ! syslog_setlogmask(self, args) ! PyObject * self; ! PyObject * args; { long maskpri, omaskpri; --- 110,114 ---- static PyObject * ! syslog_setlogmask(PyObject *self, PyObject *args) { long maskpri, omaskpri; *************** *** 129,135 **** static PyObject * ! syslog_log_mask(self, args) ! PyObject * self; ! PyObject * args; { long mask; --- 121,125 ---- static PyObject * ! syslog_log_mask(PyObject *self, PyObject *args) { long mask; *************** *** 142,148 **** static PyObject * ! syslog_log_upto(self, args) ! PyObject * self; ! PyObject * args; { long mask; --- 132,136 ---- static PyObject * ! syslog_log_upto(PyObject *self, PyObject *args) { long mask; *************** *** 169,176 **** static void ! ins(d, s, x) ! PyObject *d; ! char *s; ! long x; { PyObject *v = PyInt_FromLong(x); --- 157,161 ---- static void ! ins(PyObject *d, char *s, long x) { PyObject *v = PyInt_FromLong(x); From python-dev@python.org Mon Jul 10 13:44:01 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 05:44:01 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _tkinter.c,1.104,1.105 md5module.c,2.17,2.18 parsermodule.c,2.44,2.45 svmodule.c,2.14,2.15 Message-ID: <200007101244.FAA22140@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv22008 Modified Files: _tkinter.c md5module.c parsermodule.c svmodule.c Log Message: ANSI-fying added excplicit node * parameter to termvalid argument in validate_two_chain_ops of parsermodule.c (as proposed by fred) Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.104 retrieving revision 1.105 diff -C2 -r1.104 -r1.105 *** _tkinter.c 2000/07/08 04:04:38 1.104 --- _tkinter.c 2000/07/10 12:43:58 1.105 *************** *** 266,270 **** /* XXX Too bad if you don't have select(). */ struct timeval t; - double frac; t.tv_sec = milli/1000; t.tv_usec = (milli%1000) * 1000; --- 266,269 ---- *************** *** 1504,1508 **** { PyObject *file; - FileHandler_ClientData *data; int tfile; --- 1503,1506 ---- Index: md5module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/md5module.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** md5module.c 2000/06/30 23:58:05 2.17 --- md5module.c 2000/07/10 12:43:58 2.18 *************** *** 48,53 **** static void ! md5_dealloc(md5p) ! md5object *md5p; { PyObject_Del(md5p); --- 48,52 ---- static void ! md5_dealloc(md5object *md5p) { PyObject_Del(md5p); *************** *** 58,64 **** static PyObject * ! md5_update(self, args) ! md5object *self; ! PyObject *args; { unsigned char *cp; --- 57,61 ---- static PyObject * ! md5_update(md5object *self, PyObject *args) { unsigned char *cp; *************** *** 83,89 **** static PyObject * ! md5_digest(self, args) ! md5object *self; ! PyObject *args; { --- 80,84 ---- static PyObject * ! md5_digest(md5object *self, PyObject *args) { *************** *** 110,116 **** static PyObject * ! md5_copy(self, args) ! md5object *self; ! PyObject *args; { md5object *md5p; --- 105,109 ---- static PyObject * ! md5_copy(md5object *self, PyObject *args) { md5object *md5p; *************** *** 141,147 **** static PyObject * ! md5_getattr(self, name) ! md5object *self; ! char *name; { return Py_FindMethod(md5_methods, (PyObject *)self, name); --- 134,138 ---- static PyObject * ! md5_getattr(md5object *self, char *name) { return Py_FindMethod(md5_methods, (PyObject *)self, name); *************** *** 209,215 **** static PyObject * ! MD5_new(self, args) ! PyObject *self; ! PyObject *args; { md5object *md5p; --- 200,204 ---- static PyObject * ! MD5_new(PyObject *self, PyObject *args) { md5object *md5p; Index: parsermodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v retrieving revision 2.44 retrieving revision 2.45 diff -C2 -r2.44 -r2.45 *** parsermodule.c 2000/07/09 14:36:13 2.44 --- parsermodule.c 2000/07/10 12:43:58 2.45 *************** *** 478,484 **** static PyObject* ! parser_getattr(self, name) ! PyObject *self; ! char *name; { return (Py_FindMethod(parser_methods, self, name)); --- 478,482 ---- static PyObject* ! parser_getattr(PyObject *self, char *name) { return (Py_FindMethod(parser_methods, self, name)); *************** *** 492,497 **** */ static void ! err_string(message) ! char *message; { PyErr_SetString(parser_error, message); --- 490,494 ---- */ static void ! err_string(char *message) { PyErr_SetString(parser_error, message); *************** *** 1633,1638 **** */ static int ! validate_try(tree) ! node *tree; { int nch = NCH(tree); --- 1630,1634 ---- */ static int ! validate_try(node *tree) { int nch = NCH(tree); *************** *** 1883,1891 **** static int ! validate_chain_two_ops(tree, termvalid, op1, op2) ! node *tree; ! int (*termvalid)(); ! int op1; ! int op2; { int pos = 1; --- 1879,1883 ---- static int ! validate_chain_two_ops(node *tree, int (*termvalid)(node *), int op1, int op2) { int pos = 1; Index: svmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/svmodule.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** svmodule.c 2000/07/09 03:09:56 2.14 --- svmodule.c 2000/07/10 12:43:58 2.15 *************** *** 49,57 **** static PyObject * ! svc_conversion(self, args, function, factor) ! captureobject *self; ! PyObject *args; ! void (*function)(); ! float factor; { PyObject *output; --- 49,53 ---- static PyObject * ! svc_conversion(captureobject *self, PyObject *args, void (*function)(), float factor) { PyObject *output; *************** *** 85,91 **** */ static PyObject * ! svc_YUVtoYUV422DC(self, args) ! captureobject *self; ! PyObject *args; { if (self->ob_info.format != SV_YUV411_FRAMES) { --- 81,85 ---- */ static PyObject * ! svc_YUVtoYUV422DC(captureobject *self, PyObject *args) { if (self->ob_info.format != SV_YUV411_FRAMES) { *************** *** 97,103 **** static PyObject * ! svc_YUVtoYUV422DC_quarter(self, args) ! captureobject *self; ! PyObject *args; { if (self->ob_info.format != SV_YUV411_FRAMES) { --- 91,95 ---- static PyObject * ! svc_YUVtoYUV422DC_quarter(captureobject *self, PyObject *args) { if (self->ob_info.format != SV_YUV411_FRAMES) { *************** *** 110,116 **** static PyObject * ! svc_YUVtoYUV422DC_sixteenth(self, args) ! captureobject *self; ! PyObject *args; { if (self->ob_info.format != SV_YUV411_FRAMES) { --- 102,106 ---- static PyObject * ! svc_YUVtoYUV422DC_sixteenth(captureobject *self, PyObject *args) { if (self->ob_info.format != SV_YUV411_FRAMES) { *************** *** 123,129 **** static PyObject * ! svc_YUVtoRGB(self, args) ! captureobject *self; ! PyObject *args; { switch (self->ob_info.format) { --- 113,117 ---- static PyObject * ! svc_YUVtoRGB(captureobject *self, PyObject *args) { switch (self->ob_info.format) { *************** *** 139,145 **** static PyObject * ! svc_RGB8toRGB32(self, args) ! captureobject *self; ! PyObject *args; { if (self->ob_info.format != SV_RGB8_FRAMES) { --- 127,131 ---- static PyObject * ! svc_RGB8toRGB32(captureobject *self, PyObject *args) { if (self->ob_info.format != SV_RGB8_FRAMES) { *************** *** 151,157 **** static PyObject * ! svc_InterleaveFields(self, args) ! captureobject *self; ! PyObject *args; { if (self->ob_info.format != SV_RGB8_FRAMES) { --- 137,141 ---- static PyObject * ! svc_InterleaveFields(captureobject *self, PyObject *args) { if (self->ob_info.format != SV_RGB8_FRAMES) { *************** *** 163,169 **** static PyObject * ! svc_GetFields(self, args) ! captureobject *self; ! PyObject *args; { PyObject *f1 = NULL; --- 147,151 ---- static PyObject * ! svc_GetFields(captureobject *self, PyObject *args) { PyObject *f1 = NULL; *************** *** 195,201 **** static PyObject * ! svc_UnlockCaptureData(self, args) ! captureobject *self; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 177,181 ---- static PyObject * ! svc_UnlockCaptureData(captureobject *self, PyObject *args) { if (!PyArg_Parse(args, "")) *************** *** 220,226 **** static PyObject * ! svc_lrectwrite(self, args) ! captureobject *self; ! PyObject *args; { Screencoord x1, x2, y1, y2; --- 200,204 ---- static PyObject * ! svc_lrectwrite(captureobject *self, PyObject *args) { Screencoord x1, x2, y1, y2; *************** *** 237,243 **** static PyObject * ! svc_writefile(self, args) ! captureobject *self; ! PyObject *args; { PyObject *file; --- 215,219 ---- static PyObject * ! svc_writefile(captureobject *self, PyObject *args) { PyObject *file; *************** *** 268,274 **** static PyObject * ! svc_FindVisibleRegion(self, args) ! captureobject *self; ! PyObject *args; { void *visible; --- 244,248 ---- static PyObject * ! svc_FindVisibleRegion(captureobject *self, PyObject *args) { void *visible; *************** *** 309,314 **** static void ! capture_dealloc(self) ! captureobject *self; { if (self->ob_capture != NULL) { --- 283,287 ---- static void ! capture_dealloc(captureobject *self) { if (self->ob_capture != NULL) { *************** *** 324,330 **** static PyObject * ! capture_getattr(self, name) ! svobject *self; ! char *name; { return Py_FindMethod(capture_methods, (PyObject *)self, name); --- 297,301 ---- static PyObject * ! capture_getattr(svobject *self, char *name) { return Py_FindMethod(capture_methods, (PyObject *)self, name); *************** *** 347,354 **** static PyObject * ! newcaptureobject(self, ptr, mustunlock) ! svobject *self; ! void *ptr; ! int mustunlock; { captureobject *p; --- 318,322 ---- static PyObject * ! newcaptureobject(svobject *self, void *ptr, int mustunlock) { captureobject *p; *************** *** 366,372 **** static PyObject * ! sv_GetCaptureData(self, args) ! svobject *self; ! PyObject *args; { void *ptr; --- 334,338 ---- static PyObject * ! sv_GetCaptureData(svobject *self, PyObject *args) { void *ptr; *************** *** 394,400 **** static PyObject * ! sv_BindGLWindow(self, args) ! svobject *self; ! PyObject *args; { long wid; --- 360,364 ---- static PyObject * ! sv_BindGLWindow(svobject *self, PyObject *args) { long wid; *************** *** 412,418 **** static PyObject * ! sv_EndContinuousCapture(self, args) ! svobject *self; ! PyObject *args; { --- 376,380 ---- static PyObject * ! sv_EndContinuousCapture(svobject *self, PyObject *args) { *************** *** 428,434 **** static PyObject * ! sv_IsVideoDisplayed(self, args) ! svobject *self; ! PyObject *args; { int v; --- 390,394 ---- static PyObject * ! sv_IsVideoDisplayed(svobject *self, PyObject *args) { int v; *************** *** 445,451 **** static PyObject * ! sv_OutputOffset(self, args) ! svobject *self; ! PyObject *args; { int x_offset; --- 405,409 ---- static PyObject * ! sv_OutputOffset(svobject *self, PyObject *args) { int x_offset; *************** *** 463,469 **** static PyObject * ! sv_PutFrame(self, args) ! svobject *self; ! PyObject *args; { char *buffer; --- 421,425 ---- static PyObject * ! sv_PutFrame(svobject *self, PyObject *args) { char *buffer; *************** *** 480,486 **** static PyObject * ! sv_QuerySize(self, args) ! svobject *self; ! PyObject *args; { int w; --- 436,440 ---- static PyObject * ! sv_QuerySize(svobject *self, PyObject *args) { int w; *************** *** 499,505 **** static PyObject * ! sv_SetSize(self, args) ! svobject *self; ! PyObject *args; { int w; --- 453,457 ---- static PyObject * ! sv_SetSize(svobject *self, PyObject *args) { int w; *************** *** 517,523 **** static PyObject * ! sv_SetStdDefaults(self, args) ! svobject *self; ! PyObject *args; { --- 469,473 ---- static PyObject * ! sv_SetStdDefaults(svobject *self, PyObject *args) { *************** *** 533,539 **** static PyObject * ! sv_UseExclusive(self, args) ! svobject *self; ! PyObject *args; { boolean onoff; --- 483,487 ---- static PyObject * ! sv_UseExclusive(svobject *self, PyObject *args) { boolean onoff; *************** *** 551,557 **** static PyObject * ! sv_WindowOffset(self, args) ! svobject *self; ! PyObject *args; { int x_offset; --- 499,503 ---- static PyObject * ! sv_WindowOffset(svobject *self, PyObject *args) { int x_offset; *************** *** 569,575 **** static PyObject * ! sv_CaptureBurst(self, args) ! svobject *self; ! PyObject *args; { int bytes, i; --- 515,519 ---- static PyObject * ! sv_CaptureBurst(svobject *self, PyObject *args) { int bytes, i; *************** *** 662,668 **** static PyObject * ! sv_CaptureOneFrame(self, args) ! svobject *self; ! PyObject *args; { svCaptureInfo info; --- 606,610 ---- static PyObject * ! sv_CaptureOneFrame(svobject *self, PyObject *args) { svCaptureInfo info; *************** *** 704,710 **** static PyObject * ! sv_InitContinuousCapture(self, args) ! svobject *self; ! PyObject *args; { svCaptureInfo info; --- 646,650 ---- static PyObject * ! sv_InitContinuousCapture(svobject *self, PyObject *args) { svCaptureInfo info; *************** *** 725,731 **** static PyObject * ! sv_LoadMap(self, args) ! svobject *self; ! PyObject *args; { PyObject *rgb; --- 665,669 ---- static PyObject * ! sv_LoadMap(svobject *self, PyObject *args) { PyObject *rgb; *************** *** 788,794 **** static PyObject * ! sv_CloseVideo(self, args) ! svobject *self; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 726,730 ---- static PyObject * ! sv_CloseVideo(svobject *self, PyObject *args) { if (!PyArg_Parse(args, "")) *************** *** 804,812 **** static PyObject * ! doParams(self, args, func, modified) ! svobject *self; ! PyObject *args; ! int (*func)(SV_nodeP, long *, int); ! int modified; { PyObject *list; --- 740,745 ---- static PyObject * ! doParams(svobject *self, PyObject *args, ! int (*func)(SV_nodeP, long *, int), int modified) { PyObject *list; *************** *** 870,875 **** static PyObject * ! sv_GetParam(self, args) ! PyObject *self, *args; { return doParams(self, args, svGetParam, 1); --- 803,807 ---- static PyObject * ! sv_GetParam(PyObject *self, PyObject *args) { return doParams(self, args, svGetParam, 1); *************** *** 877,882 **** static PyObject * ! sv_GetParamRange(self, args) ! PyObject *self, *args; { return doParams(self, args, svGetParamRange, 1); --- 809,813 ---- static PyObject * ! sv_GetParamRange(PyObject *self, PyObject *args) { return doParams(self, args, svGetParamRange, 1); *************** *** 884,889 **** static PyObject * ! sv_SetParam(self, args) ! PyObject *self, *args; { return doParams(self, args, svSetParam, 0); --- 815,819 ---- static PyObject * ! sv_SetParam(PyObject *self, PyObject *args) { return doParams(self, args, svSetParam, 0); *************** *** 914,922 **** static PyObject * ! sv_conversion(self, args, function, inputfactor, factor) ! PyObject *self, *args; ! void (*function)(); ! int inputfactor; ! float factor; { int invert, width, height, inputlength; --- 844,849 ---- static PyObject * ! sv_conversion(PyObject *self, PyObject *args, void (*function)(), ! int inputfactor, float factor) { int invert, width, height, inputlength; *************** *** 948,953 **** static PyObject * ! sv_InterleaveFields(self, args) ! PyObject *self, *args; { return sv_conversion(self, args, svInterleaveFields, 1, 1.0); --- 875,879 ---- static PyObject * ! sv_InterleaveFields(PyObject *self, PyObject *args) { return sv_conversion(self, args, svInterleaveFields, 1, 1.0); *************** *** 955,960 **** static PyObject * ! sv_RGB8toRGB32(self, args) ! PyObject *self, *args; { return sv_conversion(self, args, svRGB8toRGB32, 1, (float) sizeof(long)); --- 881,885 ---- static PyObject * ! sv_RGB8toRGB32(PyObject *self, PyObject *args) { return sv_conversion(self, args, svRGB8toRGB32, 1, (float) sizeof(long)); *************** *** 962,967 **** static PyObject * ! sv_YUVtoRGB(self, args) ! PyObject *self, *args; { return sv_conversion(self, args, svYUVtoRGB, 2, (float) sizeof(long)); --- 887,891 ---- static PyObject * ! sv_YUVtoRGB(PyObject *self, PyObject *args) { return sv_conversion(self, args, svYUVtoRGB, 2, (float) sizeof(long)); *************** *** 969,974 **** static void ! svideo_dealloc(self) ! svobject *self; { if (self->ob_svideo != NULL) --- 893,897 ---- static void ! svideo_dealloc(svobject *self) { if (self->ob_svideo != NULL) *************** *** 978,984 **** static PyObject * ! svideo_getattr(self, name) ! svobject *self; ! char *name; { return Py_FindMethod(svideo_methods, (PyObject *)self, name); --- 901,905 ---- static PyObject * ! svideo_getattr(svobject *self, char *name) { return Py_FindMethod(svideo_methods, (PyObject *)self, name); *************** *** 1001,1006 **** static PyObject * ! newsvobject(svp) ! SV_nodeP svp; { svobject *p; --- 922,926 ---- static PyObject * ! newsvobject(SV_nodeP svp) { svobject *p; *************** *** 1019,1024 **** static PyObject * ! sv_OpenVideo(self, args) ! PyObject *self, *args; { SV_nodeP svp; --- 939,943 ---- static PyObject * ! sv_OpenVideo(PyObject *self, PyObject *args) { SV_nodeP svp; From python-dev@python.org Mon Jul 10 14:05:31 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 06:05:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules regexmodule.c,1.36,1.37 regexpr.c,1.30,1.31 rotormodule.c,2.24,2.25 Message-ID: <200007101305.GAA27805@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv27262 Modified Files: regexmodule.c regexpr.c rotormodule.c Log Message: ANSI-fication Index: regexmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/regexmodule.c,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** regexmodule.c 2000/06/30 23:58:05 1.36 --- regexmodule.c 2000/07/10 13:05:28 1.37 *************** *** 41,46 **** static void ! reg_dealloc(re) ! regexobject *re; { if (re->re_patbuf.buffer) --- 41,45 ---- static void ! reg_dealloc(regexobject *re) { if (re->re_patbuf.buffer) *************** *** 55,60 **** static PyObject * ! makeresult(regs) ! struct re_registers *regs; { PyObject *v; --- 54,58 ---- static PyObject * ! makeresult(struct re_registers *regs) { PyObject *v; *************** *** 90,96 **** static PyObject * ! regobj_match(re, args) ! regexobject *re; ! PyObject *args; { PyObject *argstring; --- 88,92 ---- static PyObject * ! regobj_match(regexobject *re, PyObject *args) { PyObject *argstring; *************** *** 128,134 **** static PyObject * ! regobj_search(re, args) ! regexobject *re; ! PyObject *args; { PyObject *argstring; --- 124,128 ---- static PyObject * ! regobj_search(regexobject *re, PyObject *args) { PyObject *argstring; *************** *** 175,181 **** */ static PyObject* ! group_from_index(re, index) ! regexobject *re; ! PyObject *index; { int i, a, b; --- 169,173 ---- */ static PyObject* ! group_from_index(regexobject *re, PyObject *index) { int i, a, b; *************** *** 219,225 **** static PyObject * ! regobj_group(re, args) ! regexobject *re; ! PyObject *args; { int n = PyTuple_Size(args); --- 211,215 ---- static PyObject * ! regobj_group(regexobject *re, PyObject *args) { int n = PyTuple_Size(args); *************** *** 282,288 **** static PyObject * ! regobj_getattr(re, name) ! regexobject *re; ! char *name; { if (strcmp(name, "regs") == 0) { --- 272,276 ---- static PyObject * ! regobj_getattr(regexobject *re, char *name) { if (strcmp(name, "regs") == 0) { *************** *** 381,389 **** */ static PyObject * ! newregexobject(pattern, translate, givenpat, groupindex) ! PyObject *pattern; ! PyObject *translate; ! PyObject *givenpat; ! PyObject *groupindex; { regexobject *re; --- 369,373 ---- */ static PyObject * ! newregexobject(PyObject *pattern, PyObject *translate, PyObject *givenpat, PyObject *groupindex) { regexobject *re; *************** *** 433,439 **** static PyObject * ! regex_compile(self, args) ! PyObject *self; ! PyObject *args; { PyObject *pat = NULL; --- 417,421 ---- static PyObject * ! regex_compile(PyObject *self, PyObject *args) { PyObject *pat = NULL; *************** *** 446,452 **** static PyObject * ! symcomp(pattern, gdict) ! PyObject *pattern; ! PyObject *gdict; { char *opat, *oend, *o, *n, *g, *v; --- 428,432 ---- static PyObject * ! symcomp(PyObject *pattern, PyObject *gdict) { char *opat, *oend, *o, *n, *g, *v; *************** *** 555,561 **** static PyObject * ! regex_symcomp(self, args) ! PyObject *self; ! PyObject *args; { PyObject *pattern; --- 535,539 ---- static PyObject * ! regex_symcomp(PyObject *self, PyObject *args) { PyObject *pattern; *************** *** 584,589 **** static int ! update_cache(pat) ! PyObject *pat; { PyObject *tuple = Py_BuildValue("(O)", pat); --- 562,566 ---- static int ! update_cache(PyObject *pat) { PyObject *tuple = Py_BuildValue("(O)", pat); *************** *** 611,617 **** static PyObject * ! regex_match(self, args) ! PyObject *self; ! PyObject *args; { PyObject *pat, *string; --- 588,592 ---- static PyObject * ! regex_match(PyObject *self, PyObject *args) { PyObject *pat, *string; *************** *** 631,637 **** static PyObject * ! regex_search(self, args) ! PyObject *self; ! PyObject *args; { PyObject *pat, *string; --- 606,610 ---- static PyObject * ! regex_search(PyObject *self, PyObject *args) { PyObject *pat, *string; *************** *** 651,657 **** static PyObject * ! regex_set_syntax(self, args) ! PyObject *self; ! PyObject *args; { int syntax; --- 624,628 ---- static PyObject * ! regex_set_syntax(PyObject *self, PyObject *args) { int syntax; *************** *** 668,674 **** static PyObject * ! regex_get_syntax(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 639,643 ---- static PyObject * ! regex_get_syntax(PyObject *self, PyObject *args) { if (!PyArg_Parse(args, "")) Index: regexpr.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/regexpr.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -r1.30 -r1.31 *** regexpr.c 1999/04/10 15:46:56 1.30 --- regexpr.c 2000/07/10 13:05:28 1.31 *************** *** 547,552 **** } ! int re_set_syntax(syntax) ! int syntax; { int ret; --- 547,551 ---- } ! int re_set_syntax(int syntax) { int ret; *************** *** 559,564 **** } ! static int hex_char_to_decimal(ch) ! int ch; { if (ch >= '0' && ch <= '9') --- 558,562 ---- } ! static int hex_char_to_decimal(int ch) { if (ch >= '0' && ch <= '9') *************** *** 571,584 **** } ! static void re_compile_fastmap_aux(code, ! pos, ! visited, ! can_be_null, ! fastmap) ! unsigned char *code; ! int pos; ! unsigned char *visited; ! unsigned char *can_be_null; ! unsigned char *fastmap; { int a; --- 569,576 ---- } ! static void re_compile_fastmap_aux(unsigned char *code, int pos, ! unsigned char *visited, ! unsigned char *can_be_null, ! unsigned char *fastmap) { int a; *************** *** 707,720 **** } ! static int re_do_compile_fastmap(buffer, ! used, ! pos, ! can_be_null, ! fastmap) ! unsigned char *buffer; ! int used; ! int pos; ! unsigned char *can_be_null; ! unsigned char *fastmap; { unsigned char small_visited[512], *visited; --- 699,705 ---- } ! static int re_do_compile_fastmap(unsigned char *buffer, int used, int pos, ! unsigned char *can_be_null, ! unsigned char *fastmap) { unsigned char small_visited[512], *visited; *************** *** 737,742 **** } ! void re_compile_fastmap(bufp) ! regexp_t bufp; { if (!bufp->fastmap || bufp->fastmap_accurate) --- 722,726 ---- } ! void re_compile_fastmap(regexp_t bufp) { if (!bufp->fastmap || bufp->fastmap_accurate) *************** *** 783,789 **** */ ! static int re_optimize_star_jump(bufp, code) ! regexp_t bufp; ! unsigned char *code; { unsigned char map[256]; --- 767,771 ---- */ ! static int re_optimize_star_jump(regexp_t bufp, unsigned char *code) { unsigned char map[256]; *************** *** 946,951 **** } ! static int re_optimize(bufp) ! regexp_t bufp; { unsigned char *code; --- 928,932 ---- } ! static int re_optimize(regexp_t bufp) { unsigned char *code; *************** *** 1148,1155 **** } ! char *re_compile_pattern(regex, size, bufp) ! unsigned char *regex; ! int size; ! regexp_t bufp; { int a; --- 1129,1133 ---- } ! char *re_compile_pattern(unsigned char *regex, int size, regexp_t bufp) { int a; *************** *** 1418,1423 **** int offset; int range; ! int firstchar; ! SET_LEVEL_START; ALLOC(1+256/8); --- 1396,1401 ---- int offset; int range; ! int firstchar; ! SET_LEVEL_START; ALLOC(1+256/8); *************** *** 1587,1600 **** var = translate[var] ! int re_match(bufp, ! string, ! size, ! pos, ! old_regs) ! regexp_t bufp; ! unsigned char *string; ! int size; ! int pos; ! regexp_registers_t old_regs; { unsigned char *code; --- 1565,1570 ---- var = translate[var] ! int re_match(regexp_t bufp, unsigned char *string, int size, int pos, ! regexp_registers_t old_regs) { unsigned char *code; *************** *** 2022,2037 **** #undef NEXTCHAR ! int re_search(bufp, ! string, ! size, ! pos, ! range, ! regs) ! regexp_t bufp; ! unsigned char *string; ! int size; ! int pos; ! int range; ! regexp_registers_t regs; { unsigned char *fastmap; --- 1992,1997 ---- #undef NEXTCHAR ! int re_search(regexp_t bufp, unsigned char *string, int size, int pos, ! int range, regexp_registers_t regs) { unsigned char *fastmap; Index: rotormodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/rotormodule.c,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -r2.24 -r2.25 *** rotormodule.c 2000/06/28 21:31:10 2.24 --- rotormodule.c 2000/07/10 13:05:29 2.25 *************** *** 88,93 **** static void ! set_seed(r) ! Rotorobj *r; { r->seed[0] = r->key[0]; --- 88,92 ---- static void ! set_seed(Rotorobj *r) { r->seed[0] = r->key[0]; *************** *** 99,104 **** /* Return the next random number in the range [0.0 .. 1.0) */ static double ! r_random(r) ! Rotorobj *r; { int x, y, z; --- 98,102 ---- /* Return the next random number in the range [0.0 .. 1.0) */ static double ! r_random(Rotorobj *r) { int x, y, z; *************** *** 135,141 **** static short ! r_rand(r, s) ! Rotorobj *r; ! short s; { return (short)((short)(r_random(r) * (double)s) % s); --- 133,137 ---- static short ! r_rand(Rotorobj *r, short s) { return (short)((short)(r_random(r) * (double)s) % s); *************** *** 143,149 **** static void ! set_key(r, key) ! Rotorobj *r; ! char *key; { unsigned long k1=995, k2=576, k3=767, k4=671, k5=463; --- 139,143 ---- static void ! set_key(Rotorobj *r, char *key) { unsigned long k1=995, k2=576, k3=767, k4=671, k5=463; *************** *** 173,179 **** /* These define the interface to a rotor object */ static Rotorobj * ! rotorobj_new(num_rotors, key) ! int num_rotors; ! char *key; { Rotorobj *xp; --- 167,171 ---- /* These define the interface to a rotor object */ static Rotorobj * ! rotorobj_new(int num_rotors, char *key) { Rotorobj *xp; *************** *** 252,258 **** /* Set ROTOR to the identity permutation */ static void ! RTR_make_id_rotor(r, rtr) ! Rotorobj *r; ! unsigned char *rtr; { register int j; --- 244,248 ---- /* Set ROTOR to the identity permutation */ static void ! RTR_make_id_rotor(Rotorobj *r, unsigned char *rtr) { register int j; *************** *** 266,271 **** /* The current set of encryption rotors */ static void ! RTR_e_rotors(r) ! Rotorobj *r; { int i; --- 256,260 ---- /* The current set of encryption rotors */ static void ! RTR_e_rotors(Rotorobj *r) { int i; *************** *** 277,282 **** /* The current set of decryption rotors */ static void ! RTR_d_rotors(r) ! Rotorobj *r; { register int i, j; --- 266,270 ---- /* The current set of decryption rotors */ static void ! RTR_d_rotors(Rotorobj *r) { register int i, j; *************** *** 290,295 **** /* The positions of the rotors at this time */ static void ! RTR_positions(r) ! Rotorobj *r; { int i; --- 278,282 ---- /* The positions of the rotors at this time */ static void ! RTR_positions(Rotorobj *r) { int i; *************** *** 301,306 **** /* The number of positions to advance the rotors at a time */ static void ! RTR_advances(r) ! Rotorobj *r; { int i; --- 288,292 ---- /* The number of positions to advance the rotors at a time */ static void ! RTR_advances(Rotorobj *r) { int i; *************** *** 314,321 **** */ static void ! RTR_permute_rotor(r, e, d) ! Rotorobj *r; ! unsigned char *e; ! unsigned char *d; { short i = r->size; --- 300,304 ---- */ static void ! RTR_permute_rotor(Rotorobj *r, unsigned char *e, unsigned char *d) { short i = r->size; *************** *** 339,344 **** */ static void ! RTR_init(r) ! Rotorobj *r; { int i; --- 322,326 ---- */ static void ! RTR_init(Rotorobj *r) { int i; *************** *** 360,365 **** /* Change the RTR-positions vector, using the RTR-advances vector */ static void ! RTR_advance(r) ! Rotorobj *r; { register int i=0, temp=0; --- 342,346 ---- /* Change the RTR-positions vector, using the RTR-advances vector */ static void ! RTR_advance(Rotorobj *r) { register int i=0, temp=0; *************** *** 387,393 **** /* Encrypt the character P with the current rotor machine */ static unsigned char ! RTR_e_char(r, p) ! Rotorobj *r; ! unsigned char p; { register int i=0; --- 368,372 ---- /* Encrypt the character P with the current rotor machine */ static unsigned char ! RTR_e_char(Rotorobj *r, unsigned char p) { register int i=0; *************** *** 414,420 **** /* Decrypt the character C with the current rotor machine */ static unsigned char ! RTR_d_char(r, c) ! Rotorobj *r; ! unsigned char c; { register int i = r->rotors - 1; --- 393,397 ---- /* Decrypt the character C with the current rotor machine */ static unsigned char ! RTR_d_char(Rotorobj *r, unsigned char c) { register int i = r->rotors - 1; *************** *** 441,449 **** /* Perform a rotor encryption of the region from BEG to END by KEY */ static void ! RTR_e_region(r, beg, len, doinit) ! Rotorobj *r; ! unsigned char *beg; ! int len; ! int doinit; { register int i; --- 418,422 ---- /* Perform a rotor encryption of the region from BEG to END by KEY */ static void ! RTR_e_region(Rotorobj *r, unsigned char *beg, int len, int doinit) { register int i; *************** *** 457,465 **** /* Perform a rotor decryption of the region from BEG to END by KEY */ static void ! RTR_d_region(r, beg, len, doinit) ! Rotorobj *r; ! unsigned char *beg; ! int len; ! int doinit; { register int i; --- 430,434 ---- /* Perform a rotor decryption of the region from BEG to END by KEY */ static void ! RTR_d_region(Rotorobj *r, unsigned char *beg, int len, int doinit) { register int i; *************** *** 475,480 **** /* Rotor methods */ static void ! rotor_dealloc(xp) ! Rotorobj *xp; { if (xp->e_rotor) --- 444,448 ---- /* Rotor methods */ static void ! rotor_dealloc(Rotorobj *xp) { if (xp->e_rotor) *************** *** 490,496 **** static PyObject * ! rotorobj_encrypt(self, args) ! Rotorobj *self; ! PyObject * args; { char *string = NULL; --- 458,462 ---- static PyObject * ! rotorobj_encrypt(Rotorobj *self, PyObject *args) { char *string = NULL; *************** *** 514,520 **** static PyObject * ! rotorobj_encrypt_more(self, args) ! Rotorobj *self; ! PyObject * args; { char *string = NULL; --- 480,484 ---- static PyObject * ! rotorobj_encrypt_more(Rotorobj *self, PyObject *args) { char *string = NULL; *************** *** 538,544 **** static PyObject * ! rotorobj_decrypt(self, args) ! Rotorobj *self; ! PyObject * args; { char *string = NULL; --- 502,506 ---- static PyObject * ! rotorobj_decrypt(Rotorobj *self, PyObject *args) { char *string = NULL; *************** *** 562,568 **** static PyObject * ! rotorobj_decrypt_more(self, args) ! Rotorobj *self; ! PyObject * args; { char *string = NULL; --- 524,528 ---- static PyObject * ! rotorobj_decrypt_more(Rotorobj *self, PyObject *args) { char *string = NULL; *************** *** 586,592 **** static PyObject * ! rotorobj_setkey(self, args) ! Rotorobj *self; ! PyObject * args; { char *key; --- 546,550 ---- static PyObject * ! rotorobj_setkey(Rotorobj *self, PyObject *args) { char *key; *************** *** 613,619 **** /* Return a rotor object's named attribute. */ static PyObject * ! rotorobj_getattr(s, name) ! Rotorobj *s; ! char *name; { return Py_FindMethod(rotorobj_methods, (PyObject*)s, name); --- 571,575 ---- /* Return a rotor object's named attribute. */ static PyObject * ! rotorobj_getattr(Rotorobj *s, char *name) { return Py_FindMethod(rotorobj_methods, (PyObject*)s, name); *************** *** 639,645 **** static PyObject * ! rotor_rotor(self, args) ! PyObject * self; ! PyObject * args; { Rotorobj *r; --- 595,599 ---- static PyObject * ! rotor_rotor(PyObject *self, PyObject *args) { Rotorobj *r; From python-dev@python.org Mon Jul 10 14:12:30 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 06:12:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules nismodule.c,2.17,2.18 pcremodule.c,2.21,2.22 pwdmodule.c,1.19,1.20 Message-ID: <200007101312.GAA30272@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv30258 Modified Files: nismodule.c pcremodule.c pwdmodule.c Log Message: ANSI-fication Index: nismodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/nismodule.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** nismodule.c 2000/07/09 03:09:55 2.17 --- nismodule.c 2000/07/10 13:12:27 2.18 *************** *** 27,32 **** static PyObject * ! nis_error (err) ! int err; { PyErr_SetString(NisError, yperr_string(err)); --- 27,31 ---- static PyObject * ! nis_error (int err) { PyErr_SetString(NisError, yperr_string(err)); *************** *** 51,57 **** static char * ! nis_mapname (map, pfix) ! char *map; ! int *pfix; { int i; --- 50,54 ---- static char * ! nis_mapname (char *map, int *pfix) { int i; *************** *** 80,90 **** static int ! nis_foreach (instatus, inkey, inkeylen, inval, invallen, indata) ! int instatus; ! char *inkey; ! int inkeylen; ! char *inval; ! int invallen; ! struct ypcallback_data *indata; { if (instatus == YP_TRUE) { --- 77,82 ---- static int ! nis_foreach (int instatus, char *inkey, int inkeylen, char *inval, ! int invallen, struct ypcallback_data *indata) { if (instatus == YP_TRUE) { *************** *** 119,125 **** static PyObject * ! nis_match (self, args) ! PyObject *self; ! PyObject *args; { char *match; --- 111,115 ---- static PyObject * ! nis_match (PyObject *self, PyObject *args) { char *match; *************** *** 151,157 **** static PyObject * ! nis_cat (self, args) ! PyObject *self; ! PyObject *args; { char *domain; --- 141,145 ---- static PyObject * ! nis_cat (PyObject *self, PyObject *args) { char *domain; *************** *** 229,235 **** static bool_t ! nis_xdr_domainname(xdrs, objp) ! XDR *xdrs; ! domainname *objp; { if (!xdr_string(xdrs, objp, YPMAXDOMAIN)) { --- 217,221 ---- static bool_t ! nis_xdr_domainname(XDR *xdrs, domainname *objp) { if (!xdr_string(xdrs, objp, YPMAXDOMAIN)) { *************** *** 241,247 **** static bool_t ! nis_xdr_mapname(xdrs, objp) ! XDR *xdrs; ! mapname *objp; { if (!xdr_string(xdrs, objp, YPMAXMAP)) { --- 227,231 ---- static bool_t ! nis_xdr_mapname(XDR *xdrs, mapname *objp) { if (!xdr_string(xdrs, objp, YPMAXMAP)) { *************** *** 253,259 **** static bool_t ! nis_xdr_ypmaplist(xdrs, objp) ! XDR *xdrs; ! nismaplist *objp; { if (!nis_xdr_mapname(xdrs, &objp->map)) { --- 237,241 ---- static bool_t ! nis_xdr_ypmaplist(XDR *xdrs, nismaplist *objp) { if (!nis_xdr_mapname(xdrs, &objp->map)) { *************** *** 270,276 **** static bool_t ! nis_xdr_ypstat(xdrs, objp) ! XDR *xdrs; ! nisstat *objp; { if (!xdr_enum(xdrs, (enum_t *)objp)) { --- 252,256 ---- static bool_t ! nis_xdr_ypstat(XDR *xdrs, nisstat *objp) { if (!xdr_enum(xdrs, (enum_t *)objp)) { *************** *** 283,289 **** static bool_t ! nis_xdr_ypresp_maplist(xdrs, objp) ! XDR *xdrs; ! nisresp_maplist *objp; { if (!nis_xdr_ypstat(xdrs, &objp->stat)) { --- 263,267 ---- static bool_t ! nis_xdr_ypresp_maplist(XDR *xdrs, nisresp_maplist *objp) { if (!nis_xdr_ypstat(xdrs, &objp->stat)) { *************** *** 301,307 **** static nisresp_maplist * ! nisproc_maplist_2(argp, clnt) ! domainname *argp; ! CLIENT *clnt; { static nisresp_maplist res; --- 279,283 ---- static nisresp_maplist * ! nisproc_maplist_2(domainname *argp, CLIENT *clnt) { static nisresp_maplist res; *************** *** 363,369 **** static PyObject * ! nis_maps (self, args) ! PyObject *self; ! PyObject *args; { nismaplist *maps; --- 339,343 ---- static PyObject * ! nis_maps (PyObject *self, PyObject *args) { nismaplist *maps; Index: pcremodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pcremodule.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** pcremodule.c 2000/07/06 19:38:49 2.21 --- pcremodule.c 2000/07/10 13:12:27 2.22 *************** *** 61,66 **** static PcreObject * ! newPcreObject(arg) ! PyObject *arg; { PcreObject *self; --- 61,65 ---- static PcreObject * ! newPcreObject(PyObject *args) { PcreObject *self; *************** *** 76,81 **** static void ! PyPcre_dealloc(self) ! PcreObject *self; { if (self->regex) (pcre_free)(self->regex); --- 75,79 ---- static void ! PyPcre_dealloc(PcreObject *self) { if (self->regex) (pcre_free)(self->regex); *************** *** 86,92 **** static PyObject * ! PyPcre_exec(self, args) ! PcreObject *self; ! PyObject *args; { char *string; --- 84,88 ---- static PyObject * ! PyPcre_exec(PcreObject *self, PyObject *args) { char *string; *************** *** 140,146 **** static PyObject * ! PyPcre_getattr(self, name) ! PcreObject *self; ! char *name; { return Py_FindMethod(Pcre_methods, (PyObject *)self, name); --- 136,140 ---- static PyObject * ! PyPcre_getattr(PcreObject *self, char *name) { return Py_FindMethod(Pcre_methods, (PyObject *)self, name); *************** *** 169,175 **** static PyObject * ! PyPcre_compile(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { PcreObject *rv; --- 163,167 ---- static PyObject * ! PyPcre_compile(PyObject *self, PyObject *args) { PcreObject *rv; *************** *** 221,227 **** static PyObject * ! PyPcre_expand_escape(pattern, pattern_len, indexptr, typeptr) ! unsigned char *pattern; ! int pattern_len, *indexptr, *typeptr; { unsigned char c; --- 213,218 ---- static PyObject * ! PyPcre_expand_escape(unsigned char *pattern, int pattern_len, ! int *indexptr, int *typeptr) { unsigned char c; *************** *** 448,454 **** static PyObject * ! PyPcre_expand(self, args) ! PyObject *self; ! PyObject *args; { PyObject *results, *match_obj; --- 439,443 ---- static PyObject * ! PyPcre_expand(PyObject *self, PyObject *args) { PyObject *results, *match_obj; *************** *** 624,631 **** static void ! insint(d, name, value) ! PyObject * d; ! char * name; ! int value; { PyObject *v = PyInt_FromLong((long) value); --- 613,617 ---- static void ! insint(PyObject *d, char *name, int value) { PyObject *v = PyInt_FromLong((long) value); Index: pwdmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pwdmodule.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** pwdmodule.c 2000/06/30 23:58:05 1.19 --- pwdmodule.c 2000/07/10 13:12:27 1.20 *************** *** 28,33 **** static PyObject * ! mkpwent(p) ! struct passwd *p; { #ifdef __BEOS__ --- 28,32 ---- static PyObject * ! mkpwent(struct passwd *p) { #ifdef __BEOS__ *************** *** 67,73 **** static PyObject * ! pwd_getpwuid(self, args) ! PyObject *self; ! PyObject *args; { int uid; --- 66,70 ---- static PyObject * ! pwd_getpwuid(PyObject *self, PyObject *args) { int uid; *************** *** 88,94 **** static PyObject * ! pwd_getpwnam(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 85,89 ---- static PyObject * ! pwd_getpwnam(PyObject *self, PyObject *args) { char *name; *************** *** 111,117 **** static PyObject * ! pwd_getpwall(self, args) ! PyObject *self; ! PyObject *args; { PyObject *d; --- 106,110 ---- static PyObject * ! pwd_getpwall(PyObject *self, PyObject *args) { PyObject *d; From python-dev@python.org Mon Jul 10 14:56:38 2000 From: python-dev@python.org (A.M. Kuchling) Date: Mon, 10 Jul 2000 06:56:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib dumbdbm.py,1.4,1.5 Message-ID: <200007101356.GAA00334@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv32761 Modified Files: dumbdbm.py Log Message: Patch from Joe Eaton (SF#100741) to fix following problem: There is a silly bug in the fall-back dumbdbm.py database package in the Python 1.5.2 standard distro. This bug causes any changes to an existing item to generate a new key, even when the key already exists. After many updates, the .dir file used by dumbdbm grows to a huge size, and can cause filesystem problems. Index: dumbdbm.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dumbdbm.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** dumbdbm.py 1999/04/27 12:21:17 1.4 --- dumbdbm.py 2000/07/10 13:56:35 1.5 *************** *** 121,125 **** pos, siz = self._addval(val) self._index[key] = pos, siz - self._addkey(key, (pos, siz)) def __delitem__(self, key): --- 121,124 ---- From python-dev@python.org Mon Jul 10 15:14:43 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 10 Jul 2000 07:14:43 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_userstring,1.1,1.2 Message-ID: <200007101414.HAA08212@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv8190 Modified Files: test_userstring Log Message: expect message "no regression test case for method 'encode' Index: test_userstring =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_userstring,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_userstring 2000/04/03 03:51:50 1.1 --- test_userstring 2000/07/10 14:14:40 1.2 *************** *** 1 **** --- 1,4 ---- test_userstring + no regression test case for method 'encode' + no regression test case for method 'isalnum' + no regression test case for method 'isalpha' From python-dev@python.org Mon Jul 10 15:28:28 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 10 Jul 2000 07:28:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib popen2.py,1.11,1.12 Message-ID: <200007101428.HAA08984@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv8968 Modified Files: popen2.py Log Message: remove prints of file objects from _test Index: popen2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/popen2.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** popen2.py 2000/07/09 23:35:24 1.11 --- popen2.py 2000/07/10 14:28:25 1.12 *************** *** 144,148 **** print "testing popen2..." r, w = popen2('cat') - print r, w w.write(teststr) w.close() --- 144,147 ---- *************** *** 153,157 **** except: r, w, e = popen3('cat') - print r, w, e w.write(teststr) w.close() --- 152,155 ---- From python-dev@python.org Mon Jul 10 15:35:15 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 10 Jul 2000 07:35:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Demo/embed Makefile,1.3,1.4 Message-ID: <200007101435.HAA09733@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/embed In directory slayer.i.sourceforge.net:/tmp/cvs-serv9724 Modified Files: Makefile Log Message: Adapted for Python 2.0 under RH Linux. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/embed/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Makefile 1997/07/19 20:58:50 1.3 --- Makefile 2000/07/10 14:35:12 1.4 *************** *** 1,4 **** # Makefile for embedded Python use demo. ! # (This version tailored for CNRI and Solaris; edit lines marked with XXX.) # XXX The compiler you are using --- 1,5 ---- # Makefile for embedded Python use demo. ! # (This version tailored for my Red Hat Linux 6.1 setup; ! # edit lines marked with XXX.) # XXX The compiler you are using *************** *** 6,14 **** # XXX Top of the build tree and source tree ! blddir= ../.. srcdir= ../.. # Python version ! VERSION= 1.5 # Compiler flags --- 7,15 ---- # XXX Top of the build tree and source tree ! blddir= ../../linux srcdir= ../.. # Python version ! VERSION= 2.0 # Compiler flags *************** *** 18,25 **** # The Python library ! LIBPYTHON= $(blddir)/libpython$(VERSION).a # XXX edit LIBS (in particular) to match $(blddir)/Modules/Makefile ! LIBS= -lsocket -lnsl -ldl -lreadline -ltermcap SYSLIBS= -lm MODLIBS= --- 19,26 ---- # The Python library ! LIBPYTHON= $(blddir)/libpython$(VERSION).a # XXX edit LIBS (in particular) to match $(blddir)/Modules/Makefile ! LIBS= -lnsl -ldl -lreadline -ltermcap -lieee -lpthread -lutil SYSLIBS= -lm MODLIBS= From python-dev@python.org Mon Jul 10 16:00:35 2000 From: python-dev@python.org (Eric S. Raymond) Date: Mon, 10 Jul 2000 08:00:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib urllib.py,1.96,1.97 Message-ID: <200007101500.IAA13372@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv11503/dist/src/Lib Modified Files: urllib.py Log Message: Moves some test code into the scope of if __name__ == '__main__', where it won't get loaded when we're using the classes in this module. Index: urllib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/urllib.py,v retrieving revision 1.96 retrieving revision 1.97 diff -C2 -r1.96 -r1.97 *** urllib.py 2000/07/01 07:03:30 1.96 --- urllib.py 2000/07/10 15:00:32 1.97 *************** *** 1078,1166 **** return proxies ! ! # Test and time quote() and unquote() ! def test1(): ! import time ! s = '' ! for i in range(256): s = s + chr(i) ! s = s*4 ! t0 = time.time() ! qs = quote(s) ! uqs = unquote(qs) ! t1 = time.time() ! if uqs != s: ! print 'Wrong!' ! print `s` ! print `qs` ! print `uqs` ! print round(t1 - t0, 3), 'sec' ! ! ! def reporthook(blocknum, blocksize, totalsize): ! # Report during remote transfers ! print "Block number: %d, Block size: %d, Total size: %d" % (blocknum, blocksize, totalsize) ! ! # Test program ! def test(args=[]): ! if not args: ! args = [ ! '/etc/passwd', ! 'file:/etc/passwd', ! 'file://localhost/etc/passwd', ! 'ftp://ftp.python.org/etc/passwd', ! ## 'gopher://gopher.micro.umn.edu/1/', ! 'http://www.python.org/index.html', ! ] ! if hasattr(URLopener, "open_https"): ! args.append('https://synergy.as.cmu.edu/~geek/') ! try: ! for url in args: ! print '-'*10, url, '-'*10 ! fn, h = urlretrieve(url, None, reporthook) ! print fn, h ! if h: ! print '======' ! for k in h.keys(): print k + ':', h[k] ! print '======' ! fp = open(fn, 'rb') ! data = fp.read() ! del fp ! if '\r' in data: ! table = string.maketrans("", "") ! data = string.translate(data, table, "\r") ! print data ! fn, h = None, None ! print '-'*40 ! finally: ! urlcleanup() ! def main(): ! import getopt, sys ! try: ! opts, args = getopt.getopt(sys.argv[1:], "th") ! except getopt.error, msg: ! print msg ! print "Use -h for help" ! return ! t = 0 ! for o, a in opts: ! if o == '-t': ! t = t + 1 ! if o == '-h': ! print "Usage: python urllib.py [-t] [url ...]" ! print "-t runs self-test;", ! print "otherwise, contents of urls are printed" ! return ! if t: ! if t > 1: ! test1() ! test(args) ! else: if not args: print "Use -h for help" ! for url in args: ! print urlopen(url).read(), - # Run test program when run as a script - if __name__ == '__main__': main() --- 1078,1165 ---- return proxies ! # Run test program when run as a script ! if __name__ == '__main__': ! # Test and time quote() and unquote() ! def test1(): ! import time ! s = '' ! for i in range(256): s = s + chr(i) ! s = s*4 ! t0 = time.time() ! qs = quote(s) ! uqs = unquote(qs) ! t1 = time.time() ! if uqs != s: ! print 'Wrong!' ! print `s` ! print `qs` ! print `uqs` ! print round(t1 - t0, 3), 'sec' ! ! ! def reporthook(blocknum, blocksize, totalsize): ! # Report during remote transfers ! print "Block number: %d, Block size: %d, Total size: %d" % (blocknum, blocksize, totalsize) ! # Test program ! def test(args=[]): if not args: + args = [ + '/etc/passwd', + 'file:/etc/passwd', + 'file://localhost/etc/passwd', + 'ftp://ftp.python.org/etc/passwd', + ## 'gopher://gopher.micro.umn.edu/1/', + 'http://www.python.org/index.html', + ] + if hasattr(URLopener, "open_https"): + args.append('https://synergy.as.cmu.edu/~geek/') + try: + for url in args: + print '-'*10, url, '-'*10 + fn, h = urlretrieve(url, None, reporthook) + print fn, h + if h: + print '======' + for k in h.keys(): print k + ':', h[k] + print '======' + fp = open(fn, 'rb') + data = fp.read() + del fp + if '\r' in data: + table = string.maketrans("", "") + data = string.translate(data, table, "\r") + print data + fn, h = None, None + print '-'*40 + finally: + urlcleanup() + + def main(): + import getopt, sys + try: + opts, args = getopt.getopt(sys.argv[1:], "th") + except getopt.error, msg: + print msg print "Use -h for help" ! return ! t = 0 ! for o, a in opts: ! if o == '-t': ! t = t + 1 ! if o == '-h': ! print "Usage: python urllib.py [-t] [url ...]" ! print "-t runs self-test;", ! print "otherwise, contents of urls are printed" ! return ! if t: ! if t > 1: ! test1() ! test(args) ! else: ! if not args: ! print "Use -h for help" ! for url in args: ! print urlopen(url).read(), main() From python-dev@python.org Mon Jul 10 16:06:08 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 10 Jul 2000 08:06:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_unicode,1.8,1.9 Message-ID: <200007101506.IAA18485@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv18477 Modified Files: test_unicode Log Message: Added the line 'Testing UTF-16 code point order comparisons... done." to match addition to test_unicode.py. Index: test_unicode =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_unicode,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** test_unicode 2000/06/30 09:14:13 1.8 --- test_unicode 2000/07/10 15:06:06 1.9 *************** *** 1,4 **** --- 1,5 ---- test_unicode Testing Unicode comparisons... done. + Testing UTF-16 code point order comparisons... done. Testing Unicode contains method... done. Testing Unicode formatting strings... done. From python-dev@python.org Mon Jul 10 16:59:33 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 10 Jul 2000 08:59:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.148,2.149 Message-ID: <200007101559.IAA22393@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv21665/Modules Modified Files: posixmodule.c Log Message: -- get rid of a compiler warning on unix. (as reported for #100836, but implemented in a different way) Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.148 retrieving revision 2.149 diff -C2 -r2.148 -r2.149 *** posixmodule.c 2000/07/09 23:35:24 2.148 --- posixmodule.c 2000/07/10 15:59:30 2.149 *************** *** 513,536 **** } - static PyObject * - posix_strintint(PyObject *args, char *format, - int (*func)(const char *, int, int)) - { - char *path; - int i,i2; - int res; - if (!PyArg_ParseTuple(args, format, &path, &i, &i2)) - return NULL; - Py_BEGIN_ALLOW_THREADS - res = (*func)(path, i, i2); - Py_END_ALLOW_THREADS - if (res < 0) - return posix_error_with_filename(path); - Py_INCREF(Py_None); - return Py_None; - } - - /* pack a system stat C structure into the Python stat tuple (used by posix_stat() and posix_fstat()) */ --- 513,517 ---- *************** *** 769,773 **** ! #ifdef HAVE_CHOWN static char posix_chown__doc__[] = "chown(path, uid, gid) -> None\n\ --- 750,754 ---- ! #if HAVE_CHOWN static char posix_chown__doc__[] = "chown(path, uid, gid) -> None\n\ *************** *** 777,781 **** posix_chown(PyObject *self, PyObject *args) { ! return posix_strintint(args, "sii:chown", chown); } #endif /* HAVE_CHOWN */ --- 758,773 ---- posix_chown(PyObject *self, PyObject *args) { ! char *path; ! int uid, gid; ! int res; ! if (!PyArg_ParseTuple(args, "sii:chown", &path, &uid, &gid)) ! return NULL; ! Py_BEGIN_ALLOW_THREADS ! res = chown(path, (uid_t) uid, (gid_t) gid); ! Py_END_ALLOW_THREADS ! if (res < 0) ! return posix_error_with_filename(path); ! Py_INCREF(Py_None); ! return Py_None; } #endif /* HAVE_CHOWN */ From python-dev@python.org Mon Jul 10 17:22:15 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 10 Jul 2000 09:22:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Demo/embed Makefile,1.4,1.5 Message-ID: <200007101622.JAA30458@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/embed In directory slayer.i.sourceforge.net:/tmp/cvs-serv30444 Modified Files: Makefile Log Message: Add linker flag -export-dynamic so symbols in libpython*.a are exported. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/embed/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Makefile 2000/07/10 14:35:12 1.4 --- Makefile 2000/07/10 16:22:12 1.5 *************** *** 23,26 **** --- 23,27 ---- # XXX edit LIBS (in particular) to match $(blddir)/Modules/Makefile LIBS= -lnsl -ldl -lreadline -ltermcap -lieee -lpthread -lutil + LDFLAGS= -Xlinker -export-dynamic SYSLIBS= -lm MODLIBS= *************** *** 30,34 **** all: demo demo: demo.o ! $(CC) demo.o $(ALLLIBS) -o demo # Administrative targets --- 31,35 ---- all: demo demo: demo.o ! $(CC) $(LDFLAGS) demo.o $(ALLLIBS) -o demo # Administrative targets From python-dev@python.org Mon Jul 10 17:38:11 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 10 Jul 2000 09:38:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.149,2.150 Message-ID: <200007101638.JAA31758@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv31226/Modules Modified Files: posixmodule.c Log Message: - stupid typo. Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.149 retrieving revision 2.150 diff -C2 -r2.149 -r2.150 *** posixmodule.c 2000/07/10 15:59:30 2.149 --- posixmodule.c 2000/07/10 16:38:09 2.150 *************** *** 750,754 **** ! #if HAVE_CHOWN static char posix_chown__doc__[] = "chown(path, uid, gid) -> None\n\ --- 750,754 ---- ! #ifdef HAVE_CHOWN static char posix_chown__doc__[] = "chown(path, uid, gid) -> None\n\ From python-dev@python.org Mon Jul 10 18:04:37 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 10:04:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules almodule.c,1.27,1.28 cdmodule.c,1.21,1.22 cgensupport.c,2.13,2.14 flmodule.c,1.39,1.40 fmmodule.c,1.13,1.14 glmodule.c,2.6,2.7 imgfile.c,1.24,1.25 Message-ID: <200007101704.KAA07693@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv7533 Modified Files: almodule.c cdmodule.c cgensupport.c flmodule.c fmmodule.c glmodule.c imgfile.c Log Message: ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c have already been checked in) UNTESTED! Index: almodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/almodule.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** almodule.c 2000/07/06 19:38:49 1.27 --- almodule.c 2000/07/10 17:04:33 1.28 *************** *** 254,261 **** static PyObject * ! SetConfig(self, args, func) ! alcobject *self; ! PyObject *args; ! int (*func)(ALconfig, int); { int par; --- 254,258 ---- [...1103 lines suppressed...] --- 1970,1974 ---- static PyObject * ! al_getdefault(PyObject *self, PyObject *args) { long device, descriptor, value; *************** *** 2128,2133 **** static PyObject * ! al_getminmax(self, args) ! PyObject *self, *args; { long device, descriptor, min, max; --- 1982,1986 ---- static PyObject * ! al_getminmax(PyObject *self, PyObject *args) { long device, descriptor, min, max; Index: cdmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cdmodule.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** cdmodule.c 2000/06/30 23:58:05 1.21 --- cdmodule.c 2000/07/10 17:04:33 1.22 *************** *** 26,32 **** static PyObject * ! CD_allowremoval(self, args) ! cdplayerobject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, ":allowremoval")) --- 26,30 ---- static PyObject * ! CD_allowremoval(cdplayerobject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":allowremoval")) *************** *** 40,46 **** static PyObject * ! CD_preventremoval(self, args) ! cdplayerobject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, ":preventremoval")) --- 38,42 ---- static PyObject * ! CD_preventremoval(cdplayerobject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":preventremoval")) *************** *** 54,60 **** static PyObject * ! CD_bestreadsize(self, args) ! cdplayerobject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, ":bestreadsize")) --- 50,54 ---- static PyObject * ! CD_bestreadsize(cdplayerobject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":bestreadsize")) *************** *** 65,71 **** static PyObject * ! CD_close(self, args) ! cdplayerobject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, ":close")) --- 59,63 ---- static PyObject * ! CD_close(cdplayerobject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":close")) *************** *** 83,89 **** static PyObject * ! CD_eject(self, args) ! cdplayerobject *self; ! PyObject *args; { CDSTATUS status; --- 75,79 ---- static PyObject * ! CD_eject(cdplayerobject *self, PyObject *args) { CDSTATUS status; *************** *** 106,112 **** static PyObject * ! CD_getstatus(self, args) ! cdplayerobject *self; ! PyObject *args; { CDSTATUS status; --- 96,100 ---- static PyObject * ! CD_getstatus(cdplayerobject *self, PyObject *args) { CDSTATUS status; *************** *** 129,135 **** static PyObject * ! CD_gettrackinfo(self, args) ! cdplayerobject *self; ! PyObject *args; { int track; --- 117,121 ---- static PyObject * ! CD_gettrackinfo(cdplayerobject *self, PyObject *args) { int track; *************** *** 155,161 **** static PyObject * ! CD_msftoblock(self, args) ! cdplayerobject *self; ! PyObject *args; { int min, sec, frame; --- 141,145 ---- static PyObject * ! CD_msftoblock(cdplayerobject *self, PyObject *args) { int min, sec, frame; *************** *** 169,175 **** static PyObject * ! CD_play(self, args) ! cdplayerobject *self; ! PyObject *args; { int start, play; --- 153,157 ---- static PyObject * ! CD_play(cdplayerobject *self, PyObject *args) { int start, play; *************** *** 193,199 **** static PyObject * ! CD_playabs(self, args) ! cdplayerobject *self; ! PyObject *args; { int min, sec, frame, play; --- 175,179 ---- static PyObject * ! CD_playabs(cdplayerobject *self, PyObject *args) { int min, sec, frame, play; *************** *** 217,223 **** static PyObject * ! CD_playtrack(self, args) ! cdplayerobject *self; ! PyObject *args; { int start, play; --- 197,201 ---- static PyObject * ! CD_playtrack(cdplayerobject *self, PyObject *args) { int start, play; *************** *** 241,247 **** static PyObject * ! CD_playtrackabs(self, args) ! cdplayerobject *self; ! PyObject *args; { int track, min, sec, frame, play; --- 219,223 ---- static PyObject * ! CD_playtrackabs(cdplayerobject *self, PyObject *args) { int track, min, sec, frame, play; *************** *** 266,272 **** static PyObject * ! CD_readda(self, args) ! cdplayerobject *self; ! PyObject *args; { int numframes, n; --- 242,246 ---- static PyObject * ! CD_readda(cdplayerobject *self, PyObject *args) { int numframes, n; *************** *** 295,301 **** static PyObject * ! CD_seek(self, args) ! cdplayerobject *self; ! PyObject *args; { int min, sec, frame; --- 269,273 ---- static PyObject * ! CD_seek(cdplayerobject *self, PyObject *args) { int min, sec, frame; *************** *** 315,321 **** static PyObject * ! CD_seektrack(self, args) ! cdplayerobject *self; ! PyObject *args; { int track; --- 287,291 ---- static PyObject * ! CD_seektrack(cdplayerobject *self, PyObject *args) { int track; *************** *** 335,341 **** static PyObject * ! CD_seekblock(self, args) ! cdplayerobject *self; ! PyObject *args; { unsigned long PyTryBlock; --- 305,309 ---- static PyObject * ! CD_seekblock(cdplayerobject *self, PyObject *args) { unsigned long PyTryBlock; *************** *** 354,360 **** static PyObject * ! CD_stop(self, args) ! cdplayerobject *self; ! PyObject *args; { CDSTATUS status; --- 322,326 ---- static PyObject * ! CD_stop(cdplayerobject *self, PyObject *args) { CDSTATUS status; *************** *** 377,383 **** static PyObject * ! CD_togglepause(self, args) ! cdplayerobject *self; ! PyObject *args; { CDSTATUS status; --- 343,347 ---- static PyObject * ! CD_togglepause(cdplayerobject *self, PyObject *args) { CDSTATUS status; *************** *** 422,427 **** static void ! cdplayer_dealloc(self) ! cdplayerobject *self; { if (self->ob_cdplayer != NULL) --- 386,390 ---- static void ! cdplayer_dealloc(cdplayerobject *self) { if (self->ob_cdplayer != NULL) *************** *** 431,437 **** static PyObject * ! cdplayer_getattr(self, name) ! cdplayerobject *self; ! char *name; { if (self->ob_cdplayer == NULL) { --- 394,398 ---- static PyObject * ! cdplayer_getattr(cdplayerobject *self, char *name) { if (self->ob_cdplayer == NULL) { *************** *** 458,463 **** static PyObject * ! newcdplayerobject(cdp) ! CDPLAYER *cdp; { cdplayerobject *p; --- 419,423 ---- static PyObject * ! newcdplayerobject(CDPLAYER *cdp) { cdplayerobject *p; *************** *** 471,476 **** static PyObject * ! CD_open(self, args) ! PyObject *self, *args; { char *dev, *direction; --- 431,435 ---- static PyObject * ! CD_open(PyObject *self, PyObject *args) { char *dev, *direction; *************** *** 505,512 **** static void ! CD_callback(arg, type, data) ! void *arg; ! CDDATATYPES type; ! void *data; { PyObject *result, *args, *v = NULL; --- 464,468 ---- static void ! CD_callback(void *arg, CDDATATYPES type, void *data) { PyObject *result, *args, *v = NULL; *************** *** 579,585 **** static PyObject * ! CD_deleteparser(self, args) ! cdparserobject *self; ! PyObject *args; { int i; --- 535,539 ---- static PyObject * ! CD_deleteparser(cdparserobject *self, PyObject *args) { int i; *************** *** 604,610 **** static PyObject * ! CD_parseframe(self, args) ! cdparserobject *self; ! PyObject *args; { char *cdfp; --- 558,562 ---- static PyObject * ! CD_parseframe(cdparserobject *self, PyObject *args) { char *cdfp; *************** *** 634,640 **** static PyObject * ! CD_removecallback(self, args) ! cdparserobject *self; ! PyObject *args; { int type; --- 586,590 ---- static PyObject * ! CD_removecallback(cdparserobject *self, PyObject *args) { int type; *************** *** 661,667 **** static PyObject * ! CD_resetparser(self, args) ! cdparserobject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, ":resetparser")) --- 611,615 ---- static PyObject * ! CD_resetparser(cdparserobject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":resetparser")) *************** *** 675,681 **** static PyObject * ! CD_addcallback(self, args) ! cdparserobject *self; ! PyObject *args; { int type; --- 623,627 ---- static PyObject * ! CD_addcallback(cdparserobject *self, PyObject *args) { int type; *************** *** 729,734 **** static void ! cdparser_dealloc(self) ! cdparserobject *self; { int i; --- 675,679 ---- static void ! cdparser_dealloc(cdparserobject *self) { int i; *************** *** 745,751 **** static PyObject * ! cdparser_getattr(self, name) ! cdparserobject *self; ! char *name; { if (self->ob_cdparser == NULL) { --- 690,694 ---- static PyObject * ! cdparser_getattr(cdparserobject *self, char *name) { if (self->ob_cdparser == NULL) { *************** *** 773,778 **** static PyObject * ! newcdparserobject(cdp) ! CDPARSER *cdp; { cdparserobject *p; --- 716,720 ---- static PyObject * ! newcdparserobject(CDPARSER *cdp) { cdparserobject *p; *************** *** 791,796 **** static PyObject * ! CD_createparser(self, args) ! PyObject *self, *args; { CDPARSER *cdp; --- 733,737 ---- static PyObject * ! CD_createparser(PyObject *self, PyObject *args) { CDPARSER *cdp; *************** *** 808,813 **** static PyObject * ! CD_msftoframe(self, args) ! PyObject *self, *args; { int min, sec, frame; --- 749,753 ---- static PyObject * ! CD_msftoframe(PyObject *self, PyObject *args) { int min, sec, frame; Index: cgensupport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cgensupport.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** cgensupport.c 2000/06/30 23:58:05 2.13 --- cgensupport.c 2000/07/10 17:04:33 2.14 *************** *** 21,28 **** int ! PyArg_GetObject(args, nargs, i, p_arg) ! register PyObject *args; ! int nargs, i; ! PyObject **p_arg; { if (nargs != 1) { --- 21,25 ---- int ! PyArg_GetObject(register PyObject *args, int nargs, int i, PyObject **p_arg) { if (nargs != 1) { *************** *** 44,51 **** int ! PyArg_GetLong(args, nargs, i, p_arg) ! register PyObject *args; ! int nargs, i; ! long *p_arg; { if (nargs != 1) { --- 41,45 ---- int ! PyArg_GetLong(register PyObject *args, int nargs, int i, long *p_arg) { if (nargs != 1) { *************** *** 65,72 **** int ! PyArg_GetShort(args, nargs, i, p_arg) ! register PyObject *args; ! int nargs, i; ! short *p_arg; { long x; --- 59,63 ---- int ! PyArg_GetShort(register PyObject *args, int nargs, int i, short *p_arg) { long x; *************** *** 78,84 **** static int ! extractdouble(v, p_arg) ! register PyObject *v; ! double *p_arg; { if (v == NULL) { --- 69,73 ---- static int ! extractdouble(register PyObject *v, double *p_arg) { if (v == NULL) { *************** *** 101,107 **** static int ! extractfloat(v, p_arg) ! register PyObject *v; ! float *p_arg; { if (v == NULL) { --- 90,94 ---- static int ! extractfloat(register PyObject *v, float *p_arg) { if (v == NULL) { *************** *** 124,131 **** int ! PyArg_GetFloat(args, nargs, i, p_arg) ! register PyObject *args; ! int nargs, i; ! float *p_arg; { PyObject *v; --- 111,115 ---- int ! PyArg_GetFloat(register PyObject *args, int nargs, int i, float *p_arg) { PyObject *v; *************** *** 140,147 **** int ! PyArg_GetString(args, nargs, i, p_arg) ! PyObject *args; ! int nargs, i; ! string *p_arg; { PyObject *v; --- 124,128 ---- int ! PyArg_GetString(PyObject *args, int nargs, int i, string *p_arg) { PyObject *v; *************** *** 156,163 **** int ! PyArg_GetChar(args, nargs, i, p_arg) ! PyObject *args; ! int nargs, i; ! char *p_arg; { string x; --- 137,141 ---- int ! PyArg_GetChar(PyObject *args, int nargs, int i, char *p_arg) { string x; *************** *** 173,180 **** int ! PyArg_GetLongArraySize(args, nargs, i, p_arg) ! PyObject *args; ! int nargs, i; ! long *p_arg; { PyObject *v; --- 151,155 ---- int ! PyArg_GetLongArraySize(PyObject *args, int nargs, int i, long *p_arg) { PyObject *v; *************** *** 193,200 **** int ! PyArg_GetShortArraySize(args, nargs, i, p_arg) ! PyObject *args; ! int nargs, i; ! short *p_arg; { long x; --- 168,172 ---- int ! PyArg_GetShortArraySize(PyObject *args, int nargs, int i, short *p_arg) { long x; *************** *** 208,216 **** int ! PyArg_GetLongArray(args, nargs, i, n, p_arg) ! PyObject *args; ! int nargs, i; ! int n; ! long *p_arg; /* [n] */ { PyObject *v, *w; --- 180,184 ---- int ! PyArg_GetLongArray(PyObject *args, int nargs, int i, int n, long *p_arg) { PyObject *v, *w; *************** *** 249,257 **** int ! PyArg_GetShortArray(args, nargs, i, n, p_arg) ! PyObject *args; ! int nargs, i; ! int n; ! short *p_arg; /* [n] */ { PyObject *v, *w; --- 217,221 ---- int ! PyArg_GetShortArray(PyObject *args, int nargs, int i, int n, short *p_arg) { PyObject *v, *w; *************** *** 290,298 **** int ! PyArg_GetDoubleArray(args, nargs, i, n, p_arg) ! PyObject *args; ! int nargs, i; ! int n; ! double *p_arg; /* [n] */ { PyObject *v, *w; --- 254,258 ---- int ! PyArg_GetDoubleArray(PyObject *args, int nargs, int i, int n, double *p_arg) { PyObject *v, *w; *************** *** 327,335 **** int ! PyArg_GetFloatArray(args, nargs, i, n, p_arg) ! PyObject *args; ! int nargs, i; ! int n; ! float *p_arg; /* [n] */ { PyObject *v, *w; --- 287,291 ---- int ! PyArg_GetFloatArray(PyObject *args, int nargs, int i, int n, float *p_arg) { PyObject *v, *w; Index: flmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/flmodule.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** flmodule.c 2000/06/30 23:58:05 1.39 --- flmodule.c 2000/07/10 17:04:33 1.40 *************** *** 52,57 **** static void ! knowgeneric(g) ! genericobject *g; { int i, n; --- 52,56 ---- static void ! knowgeneric(genericobject *g) [...2636 lines suppressed...] static PyObject * ! forms_get_pattern(PyObject *f, PyObject *args) { return forms_file_selector_func(args, fl_get_pattern); *************** *** 2450,2456 **** static PyObject * ! forms_get_filename(f, args) ! PyObject *f; ! PyObject *args; { return forms_file_selector_func(args, fl_get_filename); --- 2085,2089 ---- static PyObject * ! forms_get_filename(PyObject *f, PyObject *args) { return forms_file_selector_func(args, fl_get_filename); Index: fmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fmmodule.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** fmmodule.c 2000/06/30 23:58:05 1.13 --- fmmodule.c 2000/07/10 17:04:33 1.14 *************** *** 30,35 **** static PyObject * ! newfhobject(fh) ! fmfonthandle fh; { fhobject *fhp; --- 30,34 ---- static PyObject * ! newfhobject(fmfonthandle fh) { fhobject *fhp; *************** *** 49,55 **** static PyObject * ! fh_scalefont(self, args) ! fhobject *self; ! PyObject *args; { double size; --- 48,52 ---- static PyObject * ! fh_scalefont(fhobject *self, PyObject *args) { double size; *************** *** 62,68 **** static PyObject * ! fh_setfont(self, args) ! fhobject *self; ! PyObject *args; { if (!PyArg_NoArgs(args)) --- 59,63 ---- static PyObject * ! fh_setfont(fhobject *self, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 74,80 **** static PyObject * ! fh_getfontname(self, args) ! fhobject *self; ! PyObject *args; { char fontname[256]; --- 69,73 ---- static PyObject * ! fh_getfontname(fhobject *self, PyObject *args) { char fontname[256]; *************** *** 91,97 **** static PyObject * ! fh_getcomment(self, args) ! fhobject *self; ! PyObject *args; { char comment[256]; --- 84,88 ---- static PyObject * ! fh_getcomment(fhobject *self, PyObject *args) { char comment[256]; *************** *** 108,114 **** static PyObject * ! fh_getfontinfo(self, args) ! fhobject *self; ! PyObject *args; { fmfontinfo info; --- 99,103 ---- static PyObject * ! fh_getfontinfo(fhobject *self, PyObject *args) { fmfontinfo info; *************** *** 132,138 **** #if 0 static PyObject * ! fh_getwholemetrics(self, args) ! fhobject *self; ! PyObject *args; { } --- 121,125 ---- #if 0 static PyObject * ! fh_getwholemetrics(fhobject *self, PyObject *args) { } *************** *** 140,146 **** static PyObject * ! fh_getstrwidth(self, args) ! fhobject *self; ! PyObject *args; { char *str; --- 127,131 ---- static PyObject * ! fh_getstrwidth(fhobject *self, PyObject *args) { char *str; *************** *** 164,170 **** static PyObject * ! fh_getattr(fhp, name) ! fhobject *fhp; ! char *name; { return Py_FindMethod(fh_methods, (PyObject *)fhp, name); --- 149,153 ---- static PyObject * ! fh_getattr(fhobject *fhp, char *name) { return Py_FindMethod(fh_methods, (PyObject *)fhp, name); *************** *** 172,177 **** static void ! fh_dealloc(fhp) ! fhobject *fhp; { fmfreefont(fhp->fh_fh); --- 155,159 ---- static void ! fh_dealloc(fhobject *fhp) { fmfreefont(fhp->fh_fh); *************** *** 198,203 **** static PyObject * ! fm_init(self, args) ! PyObject *self, *args; { if (!PyArg_NoArgs(args)) --- 180,184 ---- static PyObject * ! fm_init(PyObject *self, *args) { if (!PyArg_NoArgs(args)) *************** *** 209,214 **** static PyObject * ! fm_findfont(self, args) ! PyObject *self, *args; { char *str; --- 190,194 ---- static PyObject * ! fm_findfont(PyObject *self, *args) { char *str; *************** *** 219,224 **** static PyObject * ! fm_prstr(self, args) ! PyObject *self, *args; { char *str; --- 199,203 ---- static PyObject * ! fm_prstr(PyObject *self, *args) { char *str; *************** *** 235,240 **** static void ! clientproc(fontname) ! char *fontname; { int err; --- 214,218 ---- static void ! clientproc(char *fontname) { int err; *************** *** 256,261 **** static PyObject * ! fm_enumerate(self, args) ! PyObject *self, *args; { PyObject *res; --- 234,238 ---- static PyObject * ! fm_enumerate(PyObject *self, PyObject *args) { PyObject *res; *************** *** 272,277 **** static PyObject * ! fm_setpath(self, args) ! PyObject *self, *args; { char *str; --- 249,253 ---- static PyObject * ! fm_setpath(PyObject *self, PyObject *args) { char *str; *************** *** 284,289 **** static PyObject * ! fm_fontpath(self, args) ! PyObject *self, *args; { if (!PyArg_NoArgs(args)) --- 260,264 ---- static PyObject * ! fm_fontpath(PyObject *self, *args) { if (!PyArg_NoArgs(args)) Index: glmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/glmodule.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** glmodule.c 2000/07/09 03:09:55 2.6 --- glmodule.c 2000/07/10 17:04:33 2.7 *************** *** 70,76 **** static PyObject * ! gl_qread(self, args) ! PyObject *self; ! PyObject *args; { long retval; --- 70,74 ---- static PyObject * [...6474 lines suppressed...] static PyObject * ! gl_qgetfd(PyObject *self, PyObject *args) { long retval; *************** *** 8043,8049 **** static PyObject * ! gl_dither(self, args) ! PyObject *self; ! PyObject *args; { long arg1 ; --- 7187,7191 ---- static PyObject * ! gl_dither(PyObject *self, PyObject *args) { long arg1 ; Index: imgfile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/imgfile.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** imgfile.c 2000/06/30 23:58:05 1.24 --- imgfile.c 2000/07/10 17:04:33 1.25 *************** *** 47,52 **** static void ! imgfile_error(str) ! char *str; { PyErr_SetString(ImgfileError, str); --- 47,51 ---- static void ! imgfile_error(char *str) { PyErr_SetString(ImgfileError, str); *************** *** 60,65 **** static IMAGE * ! imgfile_open(fname) ! char *fname; { IMAGE *image; --- 59,63 ---- static IMAGE * ! imgfile_open(char *fname) { IMAGE *image; *************** *** 82,88 **** static PyObject * ! imgfile_ttob(self, args) ! PyObject *self; ! PyObject *args; { int newval; --- 80,84 ---- static PyObject * ! imgfile_ttob(PyObject *self, PyObject *args) { int newval; *************** *** 97,103 **** static PyObject * ! imgfile_read(self, args) ! PyObject *self; ! PyObject *args; { char *fname; --- 93,97 ---- static PyObject * ! imgfile_read(PyObject *self, PyObject *args) { char *fname; *************** *** 191,197 **** static void ! xs_get(buf, y) ! short *buf; ! int y; { if (top_to_bottom) --- 185,189 ---- static void ! xs_get(short *buf, int y) { if (top_to_bottom) *************** *** 202,208 **** static void ! xs_put_c(buf, y) ! short *buf; ! int y; { char *datap = (char *)glob_datap + y*glob_width; --- 194,198 ---- static void ! xs_put_c(short *buf, int y) { char *datap = (char *)glob_datap + y*glob_width; *************** *** 214,220 **** static void ! xs_put_0(buf, y) ! short *buf; ! int y; { long *datap = glob_datap + y*glob_width; --- 204,208 ---- static void ! xs_put_0(short *buf, int y) { long *datap = glob_datap + y*glob_width; *************** *** 225,231 **** } static void ! xs_put_12(buf, y) ! short *buf; ! int y; { long *datap = glob_datap + y*glob_width; --- 213,217 ---- } static void ! xs_put_12(short *buf, int y) { long *datap = glob_datap + y*glob_width; *************** *** 237,247 **** static void ! xscale(image, xsize, ysize, zsize, datap, xnew, ynew, fmode, blur) ! IMAGE *image; ! int xsize, ysize, zsize; ! long *datap; ! int xnew, ynew; ! int fmode; ! double blur; { glob_image = image; --- 223,228 ---- static void ! xscale(IMAGE *image, int xsize, int ysize, int zsize, ! long *datap, int xnew, int ynew, int fmode, double blur) { glob_image = image; *************** *** 268,274 **** static PyObject * ! imgfile_readscaled(self, args) ! PyObject *self; ! PyObject *args; { char *fname; --- 249,253 ---- static PyObject * ! imgfile_readscaled(PyObject *self, PyObject *args) { char *fname; *************** *** 416,422 **** static PyObject * ! imgfile_getsizes(self, args) ! PyObject *self; ! PyObject *args; { char *fname; --- 395,399 ---- static PyObject * ! imgfile_getsizes(PyObject *self, PyObject *args) { char *fname; *************** *** 435,441 **** static PyObject * ! imgfile_write(self, args) ! PyObject *self; ! PyObject *args; { IMAGE *image; --- 412,416 ---- static PyObject * ! imgfile_write(PyObject *self, PyObject *args) { IMAGE *image; From python-dev@python.org Mon Jul 10 18:06:42 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 10:06:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules bsddbmodule.c,1.21,1.22 dbmmodule.c,2.19,2.20 Message-ID: <200007101706.KAA07841@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv7771 Modified Files: bsddbmodule.c dbmmodule.c Log Message: ANSI-fication, not really tested, but should (hopefully) compile Index: bsddbmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/bsddbmodule.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** bsddbmodule.c 2000/06/30 23:58:05 1.21 --- bsddbmodule.c 2000/07/10 17:06:38 1.22 *************** *** 55,69 **** static PyObject * ! newdbhashobject(file, flags, mode, ! bsize, ffactor, nelem, cachesize, hash, lorder) ! char *file; ! int flags; ! int mode; ! int bsize; ! int ffactor; ! int nelem; ! int cachesize; ! int hash; /* XXX ignored */ ! int lorder; { bsddbobject *dp; --- 55,60 ---- static PyObject * ! newdbhashobject(char *file, int flags, int mode, ! int bsize, int ffactor, int nelem, int cachesize, int hash, int lorder) { bsddbobject *dp; *************** *** 109,123 **** static PyObject * ! newdbbtobject(file, flags, mode, ! btflags, cachesize, maxkeypage, minkeypage, psize, lorder) ! char *file; ! int flags; ! int mode; ! int btflags; ! int cachesize; ! int maxkeypage; ! int minkeypage; ! int psize; ! int lorder; { bsddbobject *dp; --- 100,105 ---- static PyObject * ! newdbbtobject(char *file, int flags, int mode, ! int btflags, int cachesize, int maxkeypage, int minkeypage, int psize, int lorder) { bsddbobject *dp; *************** *** 165,180 **** static PyObject * ! newdbrnobject(file, flags, mode, ! rnflags, cachesize, psize, lorder, reclen, bval, bfname) ! char *file; ! int flags; ! int mode; ! int rnflags; ! int cachesize; ! int psize; ! int lorder; ! size_t reclen; ! u_char bval; ! char *bfname; { bsddbobject *dp; --- 147,152 ---- static PyObject * ! newdbrnobject(char *file, int flags, int mode, ! int rnflags, int cachesize, int psize, int lorder, size_t reclen, u_char bval, char *bfname) { bsddbobject *dp; *************** *** 221,226 **** static void ! bsddb_dealloc(dp) ! bsddbobject *dp; { #ifdef WITH_THREAD --- 193,197 ---- static void ! bsddb_dealloc(bsddbobject *dp) { #ifdef WITH_THREAD *************** *** 254,259 **** static int ! bsddb_length(dp) ! bsddbobject *dp; { if (dp->di_bsddb == NULL) { --- 225,229 ---- static int ! bsddb_length(bsddbobject *dp) { if (dp->di_bsddb == NULL) { *************** *** 283,289 **** static PyObject * ! bsddb_subscript(dp, key) ! bsddbobject *dp; ! PyObject *key; { int status; --- 253,257 ---- static PyObject * ! bsddb_subscript(bsddbobject *dp, PyObject *key) { int status; *************** *** 322,328 **** static int ! bsddb_ass_sub(dp, key, value) ! bsddbobject *dp; ! PyObject *key, *value; { int status; --- 290,294 ---- static int ! bsddb_ass_sub(bsddbobject *dp, PyObject *key, PyObject *value) { int status; *************** *** 388,394 **** static PyObject * ! bsddb_close(dp, args) ! bsddbobject *dp; ! PyObject *args; { if (!PyArg_NoArgs(args)) --- 354,358 ---- static PyObject * ! bsddb_close(bsddbobject *dp, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 411,417 **** static PyObject * ! bsddb_keys(dp, args) ! bsddbobject *dp; ! PyObject *args; { PyObject *list, *item; --- 375,379 ---- static PyObject * ! bsddb_keys(bsddbobject *dp, PyObject *args) { PyObject *list, *item; *************** *** 468,474 **** static PyObject * ! bsddb_has_key(dp, args) ! bsddbobject *dp; ! PyObject *args; { DBT krec, drec; --- 430,434 ---- static PyObject * ! bsddb_has_key(bsddbobject *dp, PyObject *args) { DBT krec, drec; *************** *** 495,501 **** static PyObject * ! bsddb_set_location(dp, key) ! bsddbobject *dp; ! PyObject *key; { int status; --- 455,459 ---- static PyObject * ! bsddb_set_location(bsddbobject *dp, PyObject *key) { int status; *************** *** 533,540 **** static PyObject * ! bsddb_seq(dp, args, sequence_request) ! bsddbobject *dp; ! PyObject *args; ! int sequence_request; { int status; --- 491,495 ---- static PyObject * ! bsddb_seq(bsddbobject *dp, PyObject *args, int sequence_request) { int status; *************** *** 578,612 **** static PyObject * ! bsddb_next(dp, key) ! bsddbobject *dp; ! PyObject *key; { return bsddb_seq(dp, key, R_NEXT); } static PyObject * ! bsddb_previous(dp, key) ! bsddbobject *dp; ! PyObject *key; { return bsddb_seq(dp, key, R_PREV); } static PyObject * ! bsddb_first(dp, key) ! bsddbobject *dp; ! PyObject *key; { return bsddb_seq(dp, key, R_FIRST); } static PyObject * ! bsddb_last(dp, key) ! bsddbobject *dp; ! PyObject *key; { return bsddb_seq(dp, key, R_LAST); } static PyObject * ! bsddb_sync(dp, args) ! bsddbobject *dp; ! PyObject *args; { int status; --- 533,557 ---- static PyObject * ! bsddb_next(bsddbobject *dp, PyObject *key) { return bsddb_seq(dp, key, R_NEXT); } static PyObject * ! bsddb_previous(bsddbobject *dp, PyObject *key) { return bsddb_seq(dp, key, R_PREV); } static PyObject * ! bsddb_first(bsddbobject *dp, PyObject *key) { return bsddb_seq(dp, key, R_FIRST); } static PyObject * ! bsddb_last(bsddbobject *dp, PyObject *key) { return bsddb_seq(dp, key, R_LAST); } static PyObject * ! bsddb_sync(bsddbobject *dp, PyObject *args) { int status; *************** *** 638,644 **** static PyObject * ! bsddb_getattr(dp, name) ! PyObject *dp; ! char *name; { return Py_FindMethod(bsddb_methods, dp, name); --- 583,587 ---- static PyObject * ! bsddb_getattr(PyObject *dp, char *name) { return Py_FindMethod(bsddb_methods, dp, name); *************** *** 663,669 **** static PyObject * ! bsdhashopen(self, args) ! PyObject *self; ! PyObject *args; { char *file; --- 606,610 ---- static PyObject * ! bsdhashopen(PyObject *self, PyObject *args) { char *file; *************** *** 716,722 **** static PyObject * ! bsdbtopen(self, args) ! PyObject *self; ! PyObject *args; { char *file; --- 657,661 ---- static PyObject * ! bsdbtopen(PyObject *self, PyObject *args) { char *file; *************** *** 770,776 **** static PyObject * ! bsdrnopen(self, args) ! PyObject *self; ! PyObject *args; { char *file; --- 709,713 ---- static PyObject * ! bsdrnopen(PyObject *self, PyObject *args) { char *file; Index: dbmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/dbmmodule.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** dbmmodule.c 2000/06/30 23:58:05 2.19 --- dbmmodule.c 2000/07/10 17:06:38 2.20 *************** *** 35,42 **** static PyObject * ! newdbmobject(file, flags, mode) ! char *file; ! int flags; ! int mode; { dbmobject *dp; --- 35,39 ---- static PyObject * ! newdbmobject(char *file, int flags, int mode) { dbmobject *dp; *************** *** 57,62 **** static void ! dbm_dealloc(dp) ! register dbmobject *dp; { if ( dp->di_dbm ) --- 54,58 ---- static void ! dbm_dealloc(register dbmobject *dp) { if ( dp->di_dbm ) *************** *** 66,71 **** static int ! dbm_length(dp) ! dbmobject *dp; { if (dp->di_dbm == NULL) { --- 62,66 ---- static int ! dbm_length(dbmobject *dp) { if (dp->di_dbm == NULL) { *************** *** 87,93 **** static PyObject * ! dbm_subscript(dp, key) ! dbmobject *dp; ! register PyObject *key; { datum drec, krec; --- 82,86 ---- static PyObject * ! dbm_subscript(dbmobject *dp, register PyObject *key) { datum drec, krec; *************** *** 112,118 **** static int ! dbm_ass_sub(dp, v, w) ! dbmobject *dp; ! PyObject *v, *w; { datum krec, drec; --- 105,109 ---- static int ! dbm_ass_sub(dbmobject *dp, PyObject *v, PyObject *w) { datum krec, drec; *************** *** 163,169 **** static PyObject * ! dbm__close(dp, args) ! register dbmobject *dp; ! PyObject *args; { if ( !PyArg_NoArgs(args) ) --- 154,158 ---- static PyObject * ! dbm__close(register dbmobject *dp, PyObject *args) { if ( !PyArg_NoArgs(args) ) *************** *** 177,183 **** static PyObject * ! dbm_keys(dp, args) ! register dbmobject *dp; ! PyObject *args; { register PyObject *v, *item; --- 166,170 ---- static PyObject * ! dbm_keys(register dbmobject *dp, PyObject *args) { register PyObject *v, *item; *************** *** 209,215 **** static PyObject * ! dbm_has_key(dp, args) ! register dbmobject *dp; ! PyObject *args; { datum key, val; --- 196,200 ---- static PyObject * ! dbm_has_key(register dbmobject *dp, PyObject *args) { datum key, val; *************** *** 230,236 **** static PyObject * ! dbm_getattr(dp, name) ! dbmobject *dp; ! char *name; { return Py_FindMethod(dbm_methods, (PyObject *)dp, name); --- 215,219 ---- static PyObject * ! dbm_getattr(dbmobject *dp, char *name) { return Py_FindMethod(dbm_methods, (PyObject *)dp, name); *************** *** 257,263 **** static PyObject * ! dbmopen(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 240,244 ---- static PyObject * ! dbmopen(PyObject *self, PyObject *args) { char *name; From python-dev@python.org Mon Jul 10 18:07:20 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 10 Jul 2000 10:07:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib UserString.py,1.2,1.3 Message-ID: <200007101707.KAA07910@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv7880 Modified Files: UserString.py Log Message: add isalpha and isalnum methods Index: UserString.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/UserString.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** UserString.py 2000/04/11 15:36:10 1.2 --- UserString.py 2000/07/10 17:07:17 1.3 *************** *** 76,79 **** --- 76,81 ---- def index(self, sub, start=0, end=sys.maxint): return self.data.index(sub, start, end) + def isalpha(self): return self.data.isalpha() + def isalnum(self): return self.data.isalnum() def isdecimal(self): return self.data.isdecimal() def isdigit(self): return self.data.isdigit() From python-dev@python.org Mon Jul 10 18:08:44 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 10 Jul 2000 10:08:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_userstring,1.2,1.3 Message-ID: <200007101708.KAA08017@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv7964/test/output Modified Files: test_userstring Log Message: factor out test definitions to string_tests module test_string and test_userstring run same tests for string methods Index: test_userstring =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_userstring,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** test_userstring 2000/07/10 14:14:40 1.2 --- test_userstring 2000/07/10 17:08:42 1.3 *************** *** 1,4 **** test_userstring - no regression test case for method 'encode' - no regression test case for method 'isalnum' - no regression test case for method 'isalpha' --- 1 ---- From python-dev@python.org Mon Jul 10 18:08:44 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 10 Jul 2000 10:08:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test string_tests.py,NONE,1.1 test_string.py,1.9,1.10 test_userstring.py,1.1,1.2 Message-ID: <200007101708.KAA08018@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv7964/test Modified Files: test_string.py test_userstring.py Added Files: string_tests.py Log Message: factor out test definitions to string_tests module test_string and test_userstring run same tests for string methods --- NEW FILE --- """Common tests shared by test_string and test_userstring""" import string transtable = '\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`xyzdefghijklmnopqrstuvwxyz{|}~\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377' class Sequence: def __init__(self): self.seq = 'wxyz' def __len__(self): return len(self.seq) def __getitem__(self, i): return self.seq[i] class BadSeq1(Sequence): def __init__(self): self.seq = [7, 'hello', 123L] class BadSeq2(Sequence): def __init__(self): self.seq = ['a', 'b', 'c'] def __len__(self): return 8 def run_module_tests(test): """Run all tests that exercise a function in the string module""" test('atoi', " 1 ", 1) test('atoi', " 1x", ValueError) test('atoi', " x1 ", ValueError) test('atol', " 1 ", 1L) test('atol', " 1x ", ValueError) test('atol', " x1 ", ValueError) test('atof', " 1 ", 1.0) test('atof', " 1x ", ValueError) test('atof', " x1 ", ValueError) test('maketrans', 'abc', transtable, 'xyz') test('maketrans', 'abc', ValueError, 'xyzq') # join now works with any sequence type test('join', ['a', 'b', 'c', 'd'], 'a b c d') test('join', ('a', 'b', 'c', 'd'), 'abcd', '') test('join', Sequence(), 'w x y z') test('join', 7, TypeError) test('join', BadSeq1(), TypeError) test('join', BadSeq2(), IndexError) # XXX should this test really raise an exception; lots of other core # code will just ignore the lying __len__ method. # test('join', BadSeq2(), 'a b c') # try a few long ones print string.join(['x' * 100] * 100, ':') print string.join(('x' * 100,) * 100, ':') def run_method_tests(test): """Run all tests that exercise a method of a string object""" test('capitalize', ' hello ', ' hello ') test('capitalize', 'hello ', 'Hello ') test('find', 'abcdefghiabc', 0, 'abc') test('find', 'abcdefghiabc', 9, 'abc', 1) test('find', 'abcdefghiabc', -1, 'def', 4) test('rfind', 'abcdefghiabc', 9, 'abc') test('lower', 'HeLLo', 'hello') test('lower', 'hello', 'hello') test('upper', 'HeLLo', 'HELLO') test('upper', 'HELLO', 'HELLO') test('title', ' hello ', ' Hello ') test('title', 'hello ', 'Hello ') test('title', "fOrMaT thIs aS titLe String", 'Format This As Title String') test('title', "fOrMaT,thIs-aS*titLe;String", 'Format,This-As*Title;String') test('title', "getInt", 'Getint') test('expandtabs', 'abc\rab\tdef\ng\thi', 'abc\rab def\ng hi') test('expandtabs', 'abc\rab\tdef\ng\thi', 'abc\rab def\ng hi', 8) test('expandtabs', 'abc\rab\tdef\ng\thi', 'abc\rab def\ng hi', 4) test('expandtabs', 'abc\r\nab\tdef\ng\thi', 'abc\r\nab def\ng hi', 4) test('islower', 'a', 1) test('islower', 'A', 0) test('islower', '\n', 0) test('islower', 'abc', 1) test('islower', 'aBc', 0) test('islower', 'abc\n', 1) test('isupper', 'a', 0) test('isupper', 'A', 1) test('isupper', '\n', 0) test('isupper', 'ABC', 1) test('isupper', 'AbC', 0) test('isupper', 'ABC\n', 1) test('istitle', 'a', 0) test('istitle', 'A', 1) test('istitle', '\n', 0) test('istitle', 'A Titlecased Line', 1) test('istitle', 'A\nTitlecased Line', 1) test('istitle', 'A Titlecased, Line', 1) test('istitle', 'Not a capitalized String', 0) test('istitle', 'Not\ta Titlecase String', 0) test('istitle', 'Not--a Titlecase String', 0) test('isalpha', 'a', 1) test('isalpha', 'A', 1) test('isalpha', '\n', 0) test('isalpha', 'abc', 1) test('isalpha', 'aBc123', 0) test('isalpha', 'abc\n', 0) test('isalnum', 'a', 1) test('isalnum', 'A', 1) test('isalnum', '\n', 0) test('isalnum', '123abc456', 1) test('isalnum', 'a1b3c', 1) test('isalnum', 'aBc000 ', 0) test('isalnum', 'abc\n', 0) # join now works with any sequence type test('join', ' ', 'a b c d', ['a', 'b', 'c', 'd']) test('join', '', 'abcd', ('a', 'b', 'c', 'd')) test('join', ' ', 'w x y z', Sequence()) test('join', ' ', TypeError, BadSeq1()) test('join', ' ', IndexError, BadSeq2()) # XXX should this test really raise an exception; lots of other core # code will just ignore the lying __len__ method. # test('join', BadSeq2(), 'a b c') test('splitlines', "abc\ndef\n\rghi", ['abc', 'def', '', 'ghi']) test('splitlines', "abc\ndef\n\r\nghi", ['abc', 'def', '', 'ghi']) test('splitlines', "abc\ndef\r\nghi", ['abc', 'def', 'ghi']) test('splitlines', "abc\ndef\r\nghi\n", ['abc', 'def', 'ghi']) test('splitlines', "abc\ndef\r\nghi\n\r", ['abc', 'def', 'ghi', '']) test('splitlines', "\nabc\ndef\r\nghi\n\r", ['', 'abc', 'def', 'ghi', '']) test('splitlines', "\nabc\ndef\r\nghi\n\r", ['\n', 'abc\n', 'def\r\n', 'ghi\n', '\r'], 1) test('split', 'this is the split function', ['this', 'is', 'the', 'split', 'function']) test('split', 'a|b|c|d', ['a', 'b', 'c', 'd'], '|') test('split', 'a|b|c|d', ['a', 'b', 'c|d'], '|', 2) test('split', 'a b c d', ['a', 'b c d'], None, 1) test('split', 'a b c d', ['a', 'b', 'c d'], None, 2) test('split', 'a b c d', ['a', 'b', 'c', 'd'], None, 3) test('split', 'a b c d', ['a', 'b', 'c', 'd'], None, 4) test('split', 'a b c d', ['a b c d'], None, 0) test('split', 'a b c d', ['a', 'b', 'c d'], None, 2) test('split', 'a b c d ', ['a', 'b', 'c', 'd']) test('strip', ' hello ', 'hello') test('lstrip', ' hello ', 'hello ') test('rstrip', ' hello ', ' hello') test('strip', 'hello', 'hello') test('swapcase', 'HeLLo cOmpUteRs', 'hEllO CoMPuTErS') test('translate', 'xyzabcdef', 'xyzxyz', transtable, 'def') table = string.maketrans('a', 'A') test('translate', 'abc', 'Abc', table) test('translate', 'xyz', 'xyz', table) test('replace', 'one!two!three!', 'one@two!three!', '!', '@', 1) test('replace', 'one!two!three!', 'onetwothree', '!', '') test('replace', 'one!two!three!', 'one@two@three!', '!', '@', 2) test('replace', 'one!two!three!', 'one@two@three@', '!', '@', 3) test('replace', 'one!two!three!', 'one@two@three@', '!', '@', 4) test('replace', 'one!two!three!', 'one!two!three!', '!', '@', 0) test('replace', 'one!two!three!', 'one@two@three@', '!', '@') test('replace', 'one!two!three!', 'one!two!three!', 'x', '@') test('replace', 'one!two!three!', 'one!two!three!', 'x', '@', 2) test('startswith', 'hello', 1, 'he') test('startswith', 'hello', 1, 'hello') test('startswith', 'hello', 0, 'hello world') test('startswith', 'hello', 1, '') test('startswith', 'hello', 0, 'ello') test('startswith', 'hello', 1, 'ello', 1) test('startswith', 'hello', 1, 'o', 4) test('startswith', 'hello', 0, 'o', 5) test('startswith', 'hello', 1, '', 5) test('startswith', 'hello', 0, 'lo', 6) test('startswith', 'helloworld', 1, 'lowo', 3) test('startswith', 'helloworld', 1, 'lowo', 3, 7) test('startswith', 'helloworld', 0, 'lowo', 3, 6) test('endswith', 'hello', 1, 'lo') test('endswith', 'hello', 0, 'he') test('endswith', 'hello', 1, '') test('endswith', 'hello', 0, 'hello world') test('endswith', 'helloworld', 0, 'worl') test('endswith', 'helloworld', 1, 'worl', 3, 9) test('endswith', 'helloworld', 1, 'world', 3, 12) test('endswith', 'helloworld', 1, 'lowo', 1, 7) test('endswith', 'helloworld', 1, 'lowo', 2, 7) test('endswith', 'helloworld', 1, 'lowo', 3, 7) test('endswith', 'helloworld', 0, 'lowo', 4, 7) test('endswith', 'helloworld', 0, 'lowo', 3, 8) test('endswith', 'ab', 0, 'ab', 0, 1) test('endswith', 'ab', 0, 'ab', 0, 0) Index: test_string.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_string.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** test_string.py 2000/07/05 09:46:26 1.9 --- test_string.py 2000/07/10 17:08:42 1.10 *************** *** 1,3 **** --- 1,4 ---- from test_support import verbose + import string_tests import string, sys *************** *** 29,200 **** print 'yes' ! test('atoi', " 1 ", 1) ! test('atoi', " 1x", ValueError) ! test('atoi', " x1 ", ValueError) ! test('atol', " 1 ", 1L) ! test('atol', " 1x ", ValueError) ! test('atol', " x1 ", ValueError) ! test('atof', " 1 ", 1.0) ! test('atof', " 1x ", ValueError) ! test('atof', " x1 ", ValueError) - test('capitalize', ' hello ', ' hello ') - test('capitalize', 'hello ', 'Hello ') - test('find', 'abcdefghiabc', 0, 'abc') - test('find', 'abcdefghiabc', 9, 'abc', 1) - test('find', 'abcdefghiabc', -1, 'def', 4) - test('rfind', 'abcdefghiabc', 9, 'abc') - test('lower', 'HeLLo', 'hello') - test('lower', 'hello', 'hello') - test('upper', 'HeLLo', 'HELLO') - test('upper', 'HELLO', 'HELLO') - - test('title', ' hello ', ' Hello ') - test('title', 'hello ', 'Hello ') - test('title', "fOrMaT thIs aS titLe String", 'Format This As Title String') - test('title', "fOrMaT,thIs-aS*titLe;String", 'Format,This-As*Title;String') - test('title', "getInt", 'Getint') - - test('expandtabs', 'abc\rab\tdef\ng\thi', 'abc\rab def\ng hi') - test('expandtabs', 'abc\rab\tdef\ng\thi', 'abc\rab def\ng hi', 8) - test('expandtabs', 'abc\rab\tdef\ng\thi', 'abc\rab def\ng hi', 4) - test('expandtabs', 'abc\r\nab\tdef\ng\thi', 'abc\r\nab def\ng hi', 4) - - test('islower', 'a', 1) - test('islower', 'A', 0) - test('islower', '\n', 0) - test('islower', 'abc', 1) - test('islower', 'aBc', 0) - test('islower', 'abc\n', 1) - - test('isupper', 'a', 0) - test('isupper', 'A', 1) - test('isupper', '\n', 0) - test('isupper', 'ABC', 1) - test('isupper', 'AbC', 0) - test('isupper', 'ABC\n', 1) - - test('istitle', 'a', 0) - test('istitle', 'A', 1) - test('istitle', '\n', 0) - test('istitle', 'A Titlecased Line', 1) - test('istitle', 'A\nTitlecased Line', 1) - test('istitle', 'A Titlecased, Line', 1) - test('istitle', 'Not a capitalized String', 0) - test('istitle', 'Not\ta Titlecase String', 0) - test('istitle', 'Not--a Titlecase String', 0) - - test('isalpha', 'a', 1) - test('isalpha', 'A', 1) - test('isalpha', '\n', 0) - test('isalpha', 'abc', 1) - test('isalpha', 'aBc123', 0) - test('isalpha', 'abc\n', 0) - - test('isalnum', 'a', 1) - test('isalnum', 'A', 1) - test('isalnum', '\n', 0) - test('isalnum', '123abc456', 1) - test('isalnum', 'a1b3c', 1) - test('isalnum', 'aBc000 ', 0) - test('isalnum', 'abc\n', 0) - - test('splitlines', "abc\ndef\n\rghi", ['abc', 'def', '', 'ghi']) - test('splitlines', "abc\ndef\n\r\nghi", ['abc', 'def', '', 'ghi']) - test('splitlines', "abc\ndef\r\nghi", ['abc', 'def', 'ghi']) - test('splitlines', "abc\ndef\r\nghi\n", ['abc', 'def', 'ghi']) - test('splitlines', "abc\ndef\r\nghi\n\r", ['abc', 'def', 'ghi', '']) - test('splitlines', "\nabc\ndef\r\nghi\n\r", ['', 'abc', 'def', 'ghi', '']) - test('splitlines', "\nabc\ndef\r\nghi\n\r", ['\n', 'abc\n', 'def\r\n', 'ghi\n', '\r'], 1) - - transtable = '\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`xyzdefghijklmnopqrstuvwxyz{|}~\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377' - - test('maketrans', 'abc', transtable, 'xyz') - test('maketrans', 'abc', ValueError, 'xyzq') - - test('split', 'this is the split function', - ['this', 'is', 'the', 'split', 'function']) - test('split', 'a|b|c|d', ['a', 'b', 'c', 'd'], '|') - test('split', 'a|b|c|d', ['a', 'b', 'c|d'], '|', 2) - test('split', 'a b c d', ['a', 'b c d'], None, 1) - test('split', 'a b c d', ['a', 'b', 'c d'], None, 2) - test('split', 'a b c d', ['a', 'b', 'c', 'd'], None, 3) - test('split', 'a b c d', ['a', 'b', 'c', 'd'], None, 4) - test('split', 'a b c d', ['a b c d'], None, 0) - test('split', 'a b c d', ['a', 'b', 'c d'], None, 2) - test('split', 'a b c d ', ['a', 'b', 'c', 'd']) - - # join now works with any sequence type - class Sequence: - def __init__(self): self.seq = 'wxyz' - def __len__(self): return len(self.seq) - def __getitem__(self, i): return self.seq[i] - - test('join', ['a', 'b', 'c', 'd'], 'a b c d') - test('join', ('a', 'b', 'c', 'd'), 'abcd', '') - test('join', Sequence(), 'w x y z') - test('join', 7, TypeError) - - class BadSeq(Sequence): - def __init__(self): self.seq = [7, 'hello', 123L] - - test('join', BadSeq(), TypeError) - - # try a few long ones - print string.join(['x' * 100] * 100, ':') - print string.join(('x' * 100,) * 100, ':') - - test('strip', ' hello ', 'hello') - test('lstrip', ' hello ', 'hello ') - test('rstrip', ' hello ', ' hello') - test('strip', 'hello', 'hello') - - test('swapcase', 'HeLLo cOmpUteRs', 'hEllO CoMPuTErS') - test('translate', 'xyzabcdef', 'xyzxyz', transtable, 'def') - - table = string.maketrans('a', 'A') - test('translate', 'abc', 'Abc', table) - test('translate', 'xyz', 'xyz', table) - - test('replace', 'one!two!three!', 'one@two!three!', '!', '@', 1) - test('replace', 'one!two!three!', 'onetwothree', '!', '') - test('replace', 'one!two!three!', 'one@two@three!', '!', '@', 2) - test('replace', 'one!two!three!', 'one@two@three@', '!', '@', 3) - test('replace', 'one!two!three!', 'one@two@three@', '!', '@', 4) - test('replace', 'one!two!three!', 'one!two!three!', '!', '@', 0) - test('replace', 'one!two!three!', 'one@two@three@', '!', '@') - test('replace', 'one!two!three!', 'one!two!three!', 'x', '@') - test('replace', 'one!two!three!', 'one!two!three!', 'x', '@', 2) - - test('startswith', 'hello', 1, 'he') - test('startswith', 'hello', 1, 'hello') - test('startswith', 'hello', 0, 'hello world') - test('startswith', 'hello', 1, '') - test('startswith', 'hello', 0, 'ello') - test('startswith', 'hello', 1, 'ello', 1) - test('startswith', 'hello', 1, 'o', 4) - test('startswith', 'hello', 0, 'o', 5) - test('startswith', 'hello', 1, '', 5) - test('startswith', 'hello', 0, 'lo', 6) - test('startswith', 'helloworld', 1, 'lowo', 3) - test('startswith', 'helloworld', 1, 'lowo', 3, 7) - test('startswith', 'helloworld', 0, 'lowo', 3, 6) - - test('endswith', 'hello', 1, 'lo') - test('endswith', 'hello', 0, 'he') - test('endswith', 'hello', 1, '') - test('endswith', 'hello', 0, 'hello world') - test('endswith', 'helloworld', 0, 'worl') - test('endswith', 'helloworld', 1, 'worl', 3, 9) - test('endswith', 'helloworld', 1, 'world', 3, 12) - test('endswith', 'helloworld', 1, 'lowo', 1, 7) - test('endswith', 'helloworld', 1, 'lowo', 2, 7) - test('endswith', 'helloworld', 1, 'lowo', 3, 7) - test('endswith', 'helloworld', 0, 'lowo', 4, 7) - test('endswith', 'helloworld', 0, 'lowo', 3, 8) - test('endswith', 'ab', 0, 'ab', 0, 1) - test('endswith', 'ab', 0, 'ab', 0, 0) - string.whitespace string.lowercase string.uppercase --- 30,38 ---- print 'yes' ! string_tests.run_module_tests(test) ! string_tests.run_method_tests(test) string.whitespace string.lowercase string.uppercase + Index: test_userstring.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_userstring.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_userstring.py 2000/04/03 03:51:50 1.1 --- test_userstring.py 2000/07/10 17:08:42 1.2 *************** *** 2,5 **** --- 2,6 ---- import sys, string from test_support import verbose + import string_tests # UserString is a wrapper around the native builtin string type. # UserString instances should behave similar to builtin string objects. *************** *** 42,227 **** print 'yes' ! test('capitalize', ' hello ') ! test('capitalize', 'hello ') ! ! test('center', 'foo', 0) ! test('center', 'foo', 3) ! test('center', 'foo', 16) ! ! test('ljust', 'foo', 0) ! test('ljust', 'foo', 3) ! test('ljust', 'foo', 16) ! ! test('rjust', 'foo', 0) ! test('rjust', 'foo', 3) ! test('rjust', 'foo', 16) ! ! test('count', 'abcabcabc', 'abc') ! test('count', 'abcabcabc', 'abc', 1) ! test('count', 'abcabcabc', 'abc', -1) ! test('count', 'abcabcabc', 'abc', 7) ! test('count', 'abcabcabc', 'abc', 0, 3) ! test('count', 'abcabcabc', 'abc', 0, 333) ! ! test('find', 'abcdefghiabc', 'abc') ! test('find', 'abcdefghiabc', 'abc', 1) ! test('find', 'abcdefghiabc', 'def', 4) ! test('rfind', 'abcdefghiabc', 'abc') ! ! test('index', 'abcabcabc', 'abc') ! test('index', 'abcabcabc', 'abc', 1) ! test('index', 'abcabcabc', 'abc', -1) ! test('index', 'abcabcabc', 'abc', 7) ! test('index', 'abcabcabc', 'abc', 0, 3) ! test('index', 'abcabcabc', 'abc', 0, 333) ! ! test('rindex', 'abcabcabc', 'abc') ! test('rindex', 'abcabcabc', 'abc', 1) ! test('rindex', 'abcabcabc', 'abc', -1) ! test('rindex', 'abcabcabc', 'abc', 7) ! test('rindex', 'abcabcabc', 'abc', 0, 3) ! test('rindex', 'abcabcabc', 'abc', 0, 333) ! ! ! test('lower', 'HeLLo') ! test('lower', 'hello') ! test('upper', 'HeLLo') ! test('upper', 'HELLO') ! ! test('title', ' hello ') ! test('title', 'hello ') ! test('title', "fOrMaT thIs aS titLe String") ! test('title', "fOrMaT,thIs-aS*titLe;String") ! test('title', "getInt") ! ! test('expandtabs', 'abc\rab\tdef\ng\thi') ! test('expandtabs', 'abc\rab\tdef\ng\thi', 8) ! test('expandtabs', 'abc\rab\tdef\ng\thi', 4) ! test('expandtabs', 'abc\r\nab\tdef\ng\thi', 4) ! ! test('islower', 'a') ! test('islower', 'A') ! test('islower', '\n') ! test('islower', 'abc') ! test('islower', 'aBc') ! test('islower', 'abc\n') ! ! test('isupper', 'a') ! test('isupper', 'A') ! test('isupper', '\n') ! test('isupper', 'ABC') ! test('isupper', 'AbC') ! test('isupper', 'ABC\n') ! ! test('isdigit', ' 0123456789') ! test('isdigit', '56789') ! test('isdigit', '567.89') ! test('isdigit', '0123456789abc') ! ! test('isspace', '') ! test('isspace', ' ') ! test('isspace', ' \t') ! test('isspace', ' \t\f\n') ! ! test('istitle', 'a') ! test('istitle', 'A') ! test('istitle', '\n') ! test('istitle', 'A Titlecased Line') ! test('istitle', 'A\nTitlecased Line') ! test('istitle', 'A Titlecased, Line') ! test('istitle', 'Not a capitalized String') ! test('istitle', 'Not\ta Titlecase String') ! test('istitle', 'Not--a Titlecase String') ! ! test('splitlines', "abc\ndef\n\rghi") ! test('splitlines', "abc\ndef\n\r\nghi") ! test('splitlines', "abc\ndef\r\nghi") ! test('splitlines', "abc\ndef\r\nghi\n") ! test('splitlines', "abc\ndef\r\nghi\n\r") ! test('splitlines', "\nabc\ndef\r\nghi\n\r") ! test('splitlines', "\nabc\ndef\r\nghi\n\r") ! test('splitlines', "\nabc\ndef\r\nghi\n\r") ! ! test('split', 'this is the split function') ! test('split', 'a|b|c|d', '|') ! test('split', 'a|b|c|d', '|', 2) ! test('split', 'a b c d', None, 1) ! test('split', 'a b c d', None, 2) ! test('split', 'a b c d', None, 3) ! test('split', 'a b c d', None, 4) ! test('split', 'a b c d', None, 0) ! test('split', 'a b c d', None, 2) ! test('split', 'a b c d ') ! ! # join now works with any sequence type ! class Sequence: ! def __init__(self): self.seq = 'wxyz' ! def __len__(self): return len(self.seq) ! def __getitem__(self, i): return self.seq[i] ! ! test('join', '', ('a', 'b', 'c', 'd')) ! test('join', '', Sequence()) ! test('join', '', 7) ! ! class BadSeq(Sequence): ! def __init__(self): self.seq = [7, 'hello', 123L] ! ! test('join', '', BadSeq()) ! ! test('strip', ' hello ') ! test('lstrip', ' hello ') ! test('rstrip', ' hello ') ! test('strip', 'hello') ! ! test('swapcase', 'HeLLo cOmpUteRs') ! transtable = string.maketrans("abc", "xyz") ! test('translate', 'xyzabcdef', transtable, 'def') ! ! transtable = string.maketrans('a', 'A') ! test('translate', 'abc', transtable) ! test('translate', 'xyz', transtable) ! ! test('replace', 'one!two!three!', '!', '@', 1) ! test('replace', 'one!two!three!', '!', '') ! test('replace', 'one!two!three!', '!', '@', 2) ! test('replace', 'one!two!three!', '!', '@', 3) ! test('replace', 'one!two!three!', '!', '@', 4) ! test('replace', 'one!two!three!', '!', '@', 0) ! test('replace', 'one!two!three!', '!', '@') ! test('replace', 'one!two!three!', 'x', '@') ! test('replace', 'one!two!three!', 'x', '@', 2) ! ! test('startswith', 'hello', 'he') ! test('startswith', 'hello', 'hello') ! test('startswith', 'hello', 'hello world') ! test('startswith', 'hello', '') ! test('startswith', 'hello', 'ello') ! test('startswith', 'hello', 'ello', 1) ! test('startswith', 'hello', 'o', 4) ! test('startswith', 'hello', 'o', 5) ! test('startswith', 'hello', '', 5) ! test('startswith', 'hello', 'lo', 6) ! test('startswith', 'helloworld', 'lowo', 3) ! test('startswith', 'helloworld', 'lowo', 3, 7) ! test('startswith', 'helloworld', 'lowo', 3, 6) ! ! test('endswith', 'hello', 'lo') ! test('endswith', 'hello', 'he') ! test('endswith', 'hello', '') ! test('endswith', 'hello', 'hello world') ! test('endswith', 'helloworld', 'worl') ! test('endswith', 'helloworld', 'worl', 3, 9) ! test('endswith', 'helloworld', 'world', 3, 12) ! test('endswith', 'helloworld', 'lowo', 1, 7) ! test('endswith', 'helloworld', 'lowo', 2, 7) ! test('endswith', 'helloworld', 'lowo', 3, 7) ! test('endswith', 'helloworld', 'lowo', 4, 7) ! test('endswith', 'helloworld', 'lowo', 3, 8) ! test('endswith', 'ab', 'ab', 0, 1) ! test('endswith', 'ab', 'ab', 0, 0) ! ! # TODO: test cases for: int, long, float, complex, +, * and cmp ! s = "" ! for builtin_method in dir(s): ! if not tested_methods.has_key(builtin_method): ! print "no regression test case for method '"+builtin_method+"'" --- 43,45 ---- print 'yes' ! string_tests.run_method_tests(test) From python-dev@python.org Mon Jul 10 18:10:28 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 10:10:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules fcntlmodule.c,2.21,2.22 gcmodule.c,2.2,2.3 Message-ID: <200007101710.KAA08193@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8179 Modified Files: fcntlmodule.c gcmodule.c Log Message: ANSI-fication Index: fcntlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fcntlmodule.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** fcntlmodule.c 2000/06/30 23:58:05 2.21 --- fcntlmodule.c 2000/07/10 17:10:26 2.22 *************** *** 28,34 **** static PyObject * ! fcntl_fcntl(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { int fd; --- 28,32 ---- static PyObject * ! fcntl_fcntl(PyObject *self, PyObject *args) { int fd; *************** *** 88,94 **** static PyObject * ! fcntl_ioctl(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { int fd; --- 86,90 ---- static PyObject * ! fcntl_ioctl(PyObject *self, PyObject *args) { int fd; *************** *** 147,153 **** static PyObject * ! fcntl_flock(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { int fd; --- 143,147 ---- static PyObject * ! fcntl_flock(PyObject *self, PyObject *args) { int fd; *************** *** 207,213 **** /* lockf(fd, operation) */ static PyObject * ! fcntl_lockf(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { int fd, code, ret, whence = 0; --- 201,205 ---- /* lockf(fd, operation) */ static PyObject * ! fcntl_lockf(PyObject *self, PyObject *args) { int fd, code, ret, whence = 0; *************** *** 300,307 **** static int ! ins(d, symbol, value) ! PyObject* d; ! char* symbol; ! long value; { PyObject* v = PyInt_FromLong(value); --- 292,296 ---- static int ! ins(PyObject* d, char* symbol, long value) { PyObject* v = PyInt_FromLong(value); *************** *** 314,319 **** static int ! all_ins(d) ! PyObject* d; { if (ins(d, "LOCK_SH", (long)LOCK_SH)) return -1; --- 303,307 ---- static int ! all_ins(PyObject* d) { if (ins(d, "LOCK_SH", (long)LOCK_SH)) return -1; Index: gcmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** gcmodule.c 2000/07/10 05:37:39 2.2 --- gcmodule.c 2000/07/10 17:10:26 2.3 *************** *** 528,534 **** static PyObject * ! Py_collect(self, args) ! PyObject *self; ! PyObject *args; { long n; --- 528,532 ---- static PyObject * ! Py_collect(PyObject *self, PyObject *args) { long n; *************** *** 562,568 **** static PyObject * ! Py_set_debug(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, "l", &debug)) --- 560,564 ---- static PyObject * ! Py_set_debug(PyObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, "l", &debug)) *************** *** 580,586 **** static PyObject * ! Py_get_debug(self, args) ! PyObject *self; ! PyObject *args; { if(!PyArg_ParseTuple(args, "")) /* no args */ --- 576,580 ---- static PyObject * ! Py_get_debug(PyObject *self, PyObject *args) { if(!PyArg_ParseTuple(args, "")) /* no args */ *************** *** 598,604 **** static PyObject * ! Py_set_thresh(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, "i|ii", &threshold0, --- 592,596 ---- static PyObject * ! Py_set_thresh(PyObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, "i|ii", &threshold0, *************** *** 617,623 **** static PyObject * ! Py_get_thresh(self, args) ! PyObject *self; ! PyObject *args; { if(!PyArg_ParseTuple(args, "")) /* no args */ --- 609,613 ---- static PyObject * ! Py_get_thresh(PyObject *self, PyObject *args) { if(!PyArg_ParseTuple(args, "")) /* no args */ From python-dev@python.org Mon Jul 10 18:14:02 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 10:14:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mpzmodule.c,2.28,2.29 Message-ID: <200007101714.KAA08377@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8265 Modified Files: mpzmodule.c Log Message: ANSI-fication, added #ifdef construction in mpz_coerce Index: mpzmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mpzmodule.c,v retrieving revision 2.28 retrieving revision 2.29 diff -C2 -r2.28 -r2.29 *** mpzmodule.c 2000/07/09 03:09:55 2.28 --- mpzmodule.c 2000/07/10 17:14:00 2.29 *************** *** 116,123 **** static PyObject * ! mpz_format(objp, base, withname) ! PyObject *objp; ! int base; ! unsigned char withname; { mpzobject *mpzp = (mpzobject *)objp; --- 116,120 ---- static PyObject * ! mpz_format(PyObject *objp, int base, unsigned char withname) { mpzobject *mpzp = (mpzobject *)objp; *************** *** 258,263 **** static void ! mpz_dealloc(mpzp) ! mpzobject *mpzp; { #ifdef MPZ_DEBUG --- 255,259 ---- static void ! mpz_dealloc(mpzobject *mpzp) { #ifdef MPZ_DEBUG *************** *** 273,278 **** static int ! mpz_compare(a, b) ! mpzobject *a, *b; { int cmpres; --- 269,273 ---- static int ! mpz_compare(mpzobject *a, mpzobject *b) { int cmpres; *************** *** 285,291 **** static PyObject * ! mpz_addition(a, b) ! mpzobject *a; ! mpzobject *b; { mpzobject *z; --- 280,284 ---- static PyObject * ! mpz_addition(mpzobject *a, mpzobject *b) { mpzobject *z; *************** *** 312,318 **** static PyObject * ! mpz_substract(a, b) ! mpzobject *a; ! mpzobject *b; { mpzobject *z; --- 305,309 ---- static PyObject * ! mpz_substract(mpzobject *a, mpzobject *b) { mpzobject *z; *************** *** 334,340 **** static PyObject * ! mpz_multiply(a, b) ! mpzobject *a; ! mpzobject *b; { #ifdef MPZ_SPARE_MALLOC --- 325,329 ---- static PyObject * ! mpz_multiply(mpzobject *a, mpzobject *b) { #ifdef MPZ_SPARE_MALLOC *************** *** 373,379 **** static PyObject * ! mpz_divide(a, b) ! mpzobject *a; ! mpzobject *b; { #ifdef MPZ_SPARE_MALLOC --- 362,366 ---- static PyObject * ! mpz_divide(mpzobject *a, mpzobject *b) { #ifdef MPZ_SPARE_MALLOC *************** *** 444,450 **** static PyObject * ! mpz_remainder(a, b) ! mpzobject *a; ! mpzobject *b; { #ifdef MPZ_SPARE_MALLOC --- 431,435 ---- static PyObject * ! mpz_remainder(mpzobject *a, mpzobject *b) { #ifdef MPZ_SPARE_MALLOC *************** *** 515,521 **** static PyObject * ! mpz_div_and_mod(a, b) ! mpzobject *a; ! mpzobject *b; { PyObject *z = NULL; --- 500,504 ---- static PyObject * ! mpz_div_and_mod(mpzobject *a, mpzobject *b) { PyObject *z = NULL; *************** *** 575,582 **** static PyObject * ! mpz_power(a, b, m) ! mpzobject *a; ! mpzobject *b; ! mpzobject *m; { mpzobject *z; --- 558,562 ---- static PyObject * ! mpz_power(mpzobject *a, mpzobject *b, mpzobject *m) { mpzobject *z; *************** *** 669,674 **** static PyObject * ! mpz_negative(v) ! mpzobject *v; { mpzobject *z; --- 649,653 ---- static PyObject * ! mpz_negative(mpzobject *v) { mpzobject *z; *************** *** 692,697 **** static PyObject * ! mpz_positive(v) ! mpzobject *v; { Py_INCREF(v); --- 671,675 ---- static PyObject * ! mpz_positive(mpzobject *v) { Py_INCREF(v); *************** *** 701,706 **** static PyObject * ! mpz_absolute(v) ! mpzobject *v; { mpzobject *z; --- 679,683 ---- static PyObject * ! mpz_absolute(mpzobject *v) { mpzobject *z; *************** *** 720,725 **** static int ! mpz_nonzero(v) ! mpzobject *v; { return mpz_cmp_ui(&v->mpz, (unsigned long int)0) != 0; --- 697,701 ---- static int ! mpz_nonzero(mpzobject *v) { return mpz_cmp_ui(&v->mpz, (unsigned long int)0) != 0; *************** *** 727,732 **** static PyObject * ! py_mpz_invert(v) ! mpzobject *v; { mpzobject *z; --- 703,707 ---- static PyObject * ! py_mpz_invert(mpzobject *v) { mpzobject *z; *************** *** 742,748 **** static PyObject * ! mpz_lshift(a, b) ! mpzobject *a; ! mpzobject *b; { int cmpres; --- 717,721 ---- static PyObject * ! mpz_lshift(mpzobject *a, mpzobject *b) { int cmpres; *************** *** 782,788 **** static PyObject * ! mpz_rshift(a, b) ! mpzobject *a; ! mpzobject *b; { int cmpres; --- 755,759 ---- static PyObject * ! mpz_rshift(mpzobject *a, mpzobject *b) { int cmpres; *************** *** 813,819 **** static PyObject * ! mpz_andfunc(a, b) ! mpzobject *a; ! mpzobject *b; { mpzobject *z; --- 784,788 ---- static PyObject * ! mpz_andfunc(mpzobject *a, mpzobject *b) { mpzobject *z; *************** *** 829,836 **** /* hack Hack HAck HACk HACK, XXX this code is dead slow */ void ! mpz_xor(res, op1, op2) ! MP_INT *res; ! const MP_INT *op1; ! const MP_INT *op2; { MP_INT tmpmpz; --- 798,802 ---- /* hack Hack HAck HACk HACK, XXX this code is dead slow */ void ! mpz_xor(MP_INT *res, const MP_INT *op1, const MP_INT *op2) { MP_INT tmpmpz; *************** *** 847,853 **** static PyObject * ! mpz_xorfunc(a, b) ! mpzobject *a; ! mpzobject *b; { mpzobject *z; --- 813,817 ---- static PyObject * ! mpz_xorfunc(mpzobject *a, mpzobject *b) { mpzobject *z; *************** *** 862,868 **** static PyObject * ! mpz_orfunc(a, b) ! mpzobject *a; ! mpzobject *b; { mpzobject *z; --- 826,830 ---- static PyObject * ! mpz_orfunc(mpzobject *a, mpzobject *b) { mpzobject *z; *************** *** 881,887 **** static PyObject * ! MPZ_mpz(self, args) ! PyObject *self; ! PyObject *args; { mpzobject *mpzp; --- 843,847 ---- static PyObject * ! MPZ_mpz(PyObject *self, PyObject *args) { mpzobject *mpzp; *************** *** 994,999 **** static mpzobject * ! mpz_mpzcoerce(z) ! PyObject *z; { /* shortcut: 9 out of 10 times the type is already ok */ --- 954,958 ---- static mpzobject * ! mpz_mpzcoerce(PyObject *z) { /* shortcut: 9 out of 10 times the type is already ok */ *************** *** 1017,1023 **** static PyObject * ! MPZ_powm(self, args) ! PyObject *self; ! PyObject *args; { PyObject *base, *exp, *mod; --- 976,980 ---- static PyObject * ! MPZ_powm(PyObject *self, PyObject *args) { PyObject *base, *exp, *mod; *************** *** 1070,1076 **** static PyObject * ! MPZ_gcd(self, args) ! PyObject *self; ! PyObject *args; { PyObject *op1, *op2; --- 1027,1031 ---- static PyObject * ! MPZ_gcd(PyObject *self, PyObject *args) { PyObject *op1, *op2; *************** *** 1101,1107 **** static PyObject * ! MPZ_gcdext(self, args) ! PyObject *self; ! PyObject *args; { PyObject *op1, *op2, *z = NULL; --- 1056,1060 ---- static PyObject * ! MPZ_gcdext(PyObject *self, PyObject *args) { PyObject *op1, *op2, *z = NULL; *************** *** 1142,1148 **** static PyObject * ! MPZ_sqrt(self, args) ! PyObject *self; ! PyObject *args; { PyObject *op; --- 1095,1099 ---- static PyObject * ! MPZ_sqrt(PyObject *self, PyObject *args) { PyObject *op; *************** *** 1169,1175 **** static PyObject * ! MPZ_sqrtrem(self, args) ! PyObject *self; ! PyObject *args; { PyObject *op, *z = NULL; --- 1120,1124 ---- static PyObject * ! MPZ_sqrtrem(PyObject *self, PyObject *args) { PyObject *op, *z = NULL; *************** *** 1204,1216 **** static void - #if __STDC__ mpz_divm(MP_INT *res, const MP_INT *num, const MP_INT *den, const MP_INT *mod) - #else - mpz_divm(res, num, den, mod) - MP_INT *res; - const MP_INT *num; - const MP_INT *den; - const MP_INT *mod; - #endif { MP_INT s0, s1, q, r, x, d0, d1; --- 1153,1157 ---- *************** *** 1275,1281 **** static PyObject * ! MPZ_divm(self, args) ! PyObject *self; ! PyObject *args; { PyObject *num, *den, *mod; --- 1216,1220 ---- static PyObject * ! MPZ_divm(PyObject *self, PyObject *args) { PyObject *num, *den, *mod; *************** *** 1317,1327 **** #ifdef MPZ_CONVERSIONS_AS_METHODS static PyObject * ! mpz_int(self, args) ! mpzobject *self; ! PyObject *args; #else /* def MPZ_CONVERSIONS_AS_METHODS */ static PyObject * ! mpz_int(self) ! mpzobject *self; #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ { --- 1256,1263 ---- #ifdef MPZ_CONVERSIONS_AS_METHODS static PyObject * ! mpz_int(mpzobject *self, PyObject *args) #else /* def MPZ_CONVERSIONS_AS_METHODS */ static PyObject * ! mpz_int(mpzobject *self) #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ { *************** *** 1349,1358 **** static PyObject * #ifdef MPZ_CONVERSIONS_AS_METHODS ! mpz_long(self, args) ! mpzobject *self; ! PyObject *args; #else /* def MPZ_CONVERSIONS_AS_METHODS */ ! mpz_long(self) ! mpzobject *self; #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ { --- 1285,1291 ---- static PyObject * #ifdef MPZ_CONVERSIONS_AS_METHODS ! mpz_long(mpzobject *self, PyObject *args) #else /* def MPZ_CONVERSIONS_AS_METHODS */ ! mpz_long(mpzobject *self) #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ { *************** *** 1432,1442 **** #ifdef MPZ_CONVERSIONS_AS_METHODS static PyObject * ! mpz_float(self, args) ! mpzobject *self; ! PyObject *args; #else /* def MPZ_CONVERSIONS_AS_METHODS */ static PyObject * ! mpz_float(self) ! mpzobject *self; #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ { --- 1365,1372 ---- #ifdef MPZ_CONVERSIONS_AS_METHODS static PyObject * ! mpz_float(mpzobject *self, PyObject *args) #else /* def MPZ_CONVERSIONS_AS_METHODS */ static PyObject * ! mpz_float(mpzobject *self) #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ { *************** *** 1489,1499 **** #ifdef MPZ_CONVERSIONS_AS_METHODS static PyObject * ! mpz_hex(self, args) ! mpzobject *self; ! PyObject *args; #else /* def MPZ_CONVERSIONS_AS_METHODS */ static PyObject * ! mpz_hex(self) ! mpzobject *self; #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ { --- 1419,1426 ---- #ifdef MPZ_CONVERSIONS_AS_METHODS static PyObject * ! mpz_hex(mpzobject *self, PyObject *args) #else /* def MPZ_CONVERSIONS_AS_METHODS */ static PyObject * ! mpz_hex(mpzobject *self) #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ { *************** *** 1503,1518 **** #endif /* def MPZ_CONVERSIONS_AS_METHODS */ ! return mpz_format(self, 16, (unsigned char)1); } /* mpz_hex() */ #ifdef MPZ_CONVERSIONS_AS_METHODS static PyObject * ! mpz_oct(self, args) ! mpzobject *self; ! PyObject *args; #else /* def MPZ_CONVERSIONS_AS_METHODS */ static PyObject * ! mpz_oct(self) ! mpzobject *self; #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ { --- 1430,1442 ---- #endif /* def MPZ_CONVERSIONS_AS_METHODS */ ! return mpz_format((PyObject *)self, 16, (unsigned char)1); } /* mpz_hex() */ #ifdef MPZ_CONVERSIONS_AS_METHODS static PyObject * ! mpz_oct(mpzobject *self, PyObject *args) #else /* def MPZ_CONVERSIONS_AS_METHODS */ static PyObject * ! mpz_oct(mpzobject *self) #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ { *************** *** 1522,1532 **** #endif /* def MPZ_CONVERSIONS_AS_METHODS */ ! return mpz_format(self, 8, (unsigned char)1); } /* mpz_oct() */ static PyObject * ! mpz_binary(self, args) ! mpzobject *self; ! PyObject *args; { int size; --- 1446,1454 ---- #endif /* def MPZ_CONVERSIONS_AS_METHODS */ ! return mpz_format((PyObject *)self, 8, (unsigned char)1); } /* mpz_oct() */ static PyObject * ! mpz_binary(mpzobject *self, PyObject *args) { int size; *************** *** 1587,1593 **** static PyObject * ! mpz_getattr(self, name) ! mpzobject *self; ! char *name; { return Py_FindMethod(mpz_methods, (PyObject *)self, name); --- 1509,1513 ---- static PyObject * ! mpz_getattr(mpzobject *self, char *name) { return Py_FindMethod(mpz_methods, (PyObject *)self, name); *************** *** 1596,1602 **** static int ! mpz_coerce(pv, pw) ! PyObject **pv; ! PyObject **pw; { PyObject *z; --- 1516,1520 ---- static int ! mpz_coerce(PyObject **pv, PyObject **pw) { PyObject *z; *************** *** 1617,1622 **** } else { ! if ((z = mpz_float(*pv, NULL)) == NULL) return -1; Py_INCREF(*pw); --- 1535,1545 ---- } else { ! #ifdef MPZ_CONVERSIONS_AS_METHODS ! if ((z = mpz_float((mpzobject *)(*pv), NULL)) == NULL) ! return -1; ! #else /* def MPZ_CONVERSIONS_AS_METHODS */ ! if ((z = mpz_float((mpzobject *)(*pv))) == NULL) return -1; + #endif /* def MPZ_CONVERSIONS_AS_METHODS else */ Py_INCREF(*pw); *************** *** 1629,1634 **** static PyObject * ! mpz_repr(v) ! PyObject *v; { return mpz_format(v, 10, (unsigned char)1); --- 1552,1556 ---- static PyObject * ! mpz_repr(PyObject *v) { return mpz_format(v, 10, (unsigned char)1); *************** *** 1731,1736 **** #endif /* def MP_TEST_ALLOC else */ ! void *mp_allocate( alloc_size ) ! size_t alloc_size; { void *res; --- 1653,1657 ---- #endif /* def MP_TEST_ALLOC else */ ! void *mp_allocate(size_t alloc_size) { void *res; *************** *** 1754,1761 **** ! void *mp_reallocate( ptr, old_size, new_size ) ! void *ptr; ! size_t old_size; ! size_t new_size; { void *res; --- 1675,1679 ---- ! void *mp_reallocate(void *ptr, size_t old_size, size_t new_size) { void *res; *************** *** 1782,1788 **** ! void mp_free( ptr, size ) ! void *ptr; ! size_t size; { --- 1700,1704 ---- ! void mp_free(void *ptr, size_t size) { From python-dev@python.org Mon Jul 10 18:15:09 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 10:15:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules audioop.c,1.38,1.39 Message-ID: <200007101715.KAA08574@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8549 Modified Files: audioop.c Log Message: ANSI-fication Index: audioop.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/audioop.c,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** audioop.c 2000/06/30 23:58:05 1.38 --- audioop.c 2000/07/10 17:15:07 1.39 *************** *** 27,31 **** #if defined(__CHAR_UNSIGNED__) #if defined(signed) - !ERROR!; READ THE SOURCE FILE!; /* This module currently does not work on systems where only unsigned characters are available. Take it out of Setup. Sorry. */ --- 27,30 ---- *************** *** 96,101 **** static unsigned char ! st_linear_to_ulaw( sample ) ! int sample; { static int exp_lut[256] = {0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3, --- 95,99 ---- static unsigned char ! st_linear_to_ulaw(int sample) { static int exp_lut[256] = {0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3, *************** *** 163,169 **** static PyObject * ! audioop_getsample(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 161,165 ---- static PyObject * ! audioop_getsample(PyObject *self, PyObject *args) { signed char *cp; *************** *** 188,194 **** static PyObject * ! audioop_max(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 184,188 ---- static PyObject * ! audioop_max(PyObject *self, PyObject *args) { signed char *cp; *************** *** 214,220 **** static PyObject * ! audioop_minmax(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 208,212 ---- static PyObject * ! audioop_minmax(PyObject *self, PyObject *args) { signed char *cp; *************** *** 240,246 **** static PyObject * ! audioop_avg(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 232,236 ---- static PyObject * ! audioop_avg(PyObject *self, PyObject *args) { signed char *cp; *************** *** 269,275 **** static PyObject * ! audioop_rms(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 259,263 ---- static PyObject * ! audioop_rms(PyObject *self, PyObject *args) { signed char *cp; *************** *** 344,350 **** */ static PyObject * ! audioop_findfit(self, args) ! PyObject *self; ! PyObject *args; { short *cp1, *cp2; --- 332,336 ---- */ static PyObject * ! audioop_findfit(PyObject *self, PyObject *args) { short *cp1, *cp2; *************** *** 404,410 **** */ static PyObject * ! audioop_findfactor(self, args) ! PyObject *self; ! PyObject *args; { short *cp1, *cp2; --- 390,394 ---- */ static PyObject * ! audioop_findfactor(PyObject *self, PyObject *args) { short *cp1, *cp2; *************** *** 436,442 **** */ static PyObject * ! audioop_findmax(self, args) ! PyObject *self; ! PyObject *args; { short *cp1; --- 420,424 ---- */ static PyObject * ! audioop_findmax(PyObject *self, PyObject *args) { short *cp1; *************** *** 482,488 **** static PyObject * ! audioop_avgpp(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 464,468 ---- static PyObject * ! audioop_avgpp(PyObject *self, PyObject *args) { signed char *cp; *************** *** 541,547 **** static PyObject * ! audioop_maxpp(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 521,525 ---- static PyObject * ! audioop_maxpp(PyObject *self, PyObject *args) { signed char *cp; *************** *** 596,602 **** static PyObject * ! audioop_cross(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 574,578 ---- static PyObject * ! audioop_cross(PyObject *self, PyObject *args) { signed char *cp; *************** *** 625,631 **** static PyObject * ! audioop_mul(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp, *ncp; --- 601,605 ---- static PyObject * ! audioop_mul(PyObject *self, PyObject *args) { signed char *cp, *ncp; *************** *** 668,674 **** static PyObject * ! audioop_tomono(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp, *ncp; --- 642,646 ---- static PyObject * ! audioop_tomono(PyObject *self, PyObject *args) { signed char *cp, *ncp; *************** *** 714,720 **** static PyObject * ! audioop_tostereo(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp, *ncp; --- 686,690 ---- static PyObject * ! audioop_tostereo(PyObject *self, PyObject *args) { signed char *cp, *ncp; *************** *** 768,774 **** static PyObject * ! audioop_add(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp1, *cp2, *ncp; --- 738,742 ---- static PyObject * ! audioop_add(PyObject *self, PyObject *args) { signed char *cp1, *cp2, *ncp; *************** *** 823,829 **** static PyObject * ! audioop_bias(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp, *ncp; --- 791,795 ---- static PyObject * ! audioop_bias(PyObject *self, PyObject *args) { signed char *cp, *ncp; *************** *** 861,867 **** static PyObject * ! audioop_reverse(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 827,831 ---- static PyObject * ! audioop_reverse(PyObject *self, PyObject *args) { signed char *cp; *************** *** 900,906 **** static PyObject * ! audioop_lin2lin(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 864,868 ---- static PyObject * ! audioop_lin2lin(PyObject *self, PyObject *args) { signed char *cp; *************** *** 950,956 **** static PyObject * ! audioop_ratecv(self, args) ! PyObject *self; ! PyObject *args; { char *cp, *ncp; --- 912,916 ---- static PyObject * ! audioop_ratecv(PyObject *self, PyObject *args) { char *cp, *ncp; *************** *** 1091,1097 **** static PyObject * ! audioop_lin2ulaw(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 1051,1055 ---- static PyObject * ! audioop_lin2ulaw(PyObject *self, PyObject *args) { signed char *cp; *************** *** 1126,1132 **** static PyObject * ! audioop_ulaw2lin(self, args) ! PyObject *self; ! PyObject *args; { unsigned char *cp; --- 1084,1088 ---- static PyObject * ! audioop_ulaw2lin(PyObject *self, PyObject *args) { unsigned char *cp; *************** *** 1163,1169 **** static PyObject * ! audioop_lin2adpcm(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 1119,1123 ---- static PyObject * ! audioop_lin2adpcm(PyObject *self, PyObject *args) { signed char *cp; *************** *** 1274,1280 **** static PyObject * ! audioop_adpcm2lin(self, args) ! PyObject *self; ! PyObject *args; { signed char *cp; --- 1228,1232 ---- static PyObject * ! audioop_adpcm2lin(PyObject *self, PyObject *args) { signed char *cp; From python-dev@python.org Mon Jul 10 18:25:39 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 10 Jul 2000 10:25:39 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules sunaudiodev.c,1.19,1.20 Message-ID: <200007101725.KAA09295@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv9249 Modified Files: sunaudiodev.c Log Message: ANSI-fication (fixed on parameter list I messed up in the patch) Index: sunaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sunaudiodev.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** sunaudiodev.c 2000/06/30 23:58:05 1.19 --- sunaudiodev.c 2000/07/10 17:25:37 1.20 *************** *** 61,66 **** static sadobject * ! newsadobject(arg) ! PyObject *arg; { sadobject *xp; --- 61,65 ---- static sadobject * ! newsadobject(PyObject *args) { sadobject *xp; *************** *** 73,77 **** /* Check arg for r/w/rw */ ! if (!PyArg_Parse(arg, "s", &mode)) return NULL; if (strcmp(mode, "r") == 0) --- 72,76 ---- /* Check arg for r/w/rw */ ! if (!PyArg_Parse(args, "s", &mode)) return NULL; if (strcmp(mode, "r") == 0) *************** *** 134,139 **** static void ! sad_dealloc(xp) ! sadobject *xp; { close(xp->x_fd); --- 133,137 ---- static void ! sad_dealloc(sadobject *xp) { close(xp->x_fd); *************** *** 142,148 **** static PyObject * ! sad_read(self, args) ! sadobject *self; ! PyObject *args; { int size, count; --- 140,144 ---- static PyObject * ! sad_read(sadobject *self, PyObject *args) { int size, count; *************** *** 181,187 **** static PyObject * ! sad_write(self, args) ! sadobject *self; ! PyObject *args; { char *cp; --- 177,181 ---- static PyObject * ! sad_write(sadobject *self, PyObject *args) { char *cp; *************** *** 207,213 **** static PyObject * ! sad_getinfo(self, args) ! sadobject *self; ! PyObject *args; { sadstatusobject *rv; --- 201,205 ---- static PyObject * ! sad_getinfo(sadobject *self, PyObject *args) { sadstatusobject *rv; *************** *** 227,233 **** static PyObject * ! sad_setinfo(self, arg) ! sadobject *self; ! sadstatusobject *arg; { if (!is_sadstatusobject(arg)) { --- 219,223 ---- static PyObject * ! sad_setinfo(sadobject *self, sadstatusobject *arg) { if (!is_sadstatusobject(arg)) { *************** *** 245,251 **** static PyObject * ! sad_ibufcount(self, args) ! sadobject *self; ! PyObject *args; { audio_info_t ai; --- 235,239 ---- static PyObject * ! sad_ibufcount(sadobject *self, PyObject *args) { audio_info_t ai; *************** *** 261,267 **** static PyObject * ! sad_obufcount(self, args) ! sadobject *self; ! PyObject *args; { audio_info_t ai; --- 249,253 ---- static PyObject * ! sad_obufcount(sadobject *self, PyObject *args) { audio_info_t ai; *************** *** 281,287 **** static PyObject * ! sad_drain(self, args) ! sadobject *self; ! PyObject *args; { --- 267,271 ---- static PyObject * ! sad_drain(sadobject *self, PyObject *args) { *************** *** 298,304 **** #ifdef SOLARIS static PyObject * ! sad_getdev(self, args) ! sadobject *self; ! PyObject *args; { struct audio_device ad; --- 282,286 ---- #ifdef SOLARIS static PyObject * ! sad_getdev(sadobject *self, PyObject *args) { struct audio_device ad; *************** *** 315,321 **** static PyObject * ! sad_flush(self, args) ! sadobject *self; ! PyObject *args; { --- 297,301 ---- static PyObject * ! sad_flush(sadobject *self, PyObject *args) { *************** *** 331,337 **** static PyObject * ! sad_close(self, args) ! sadobject *self; ! PyObject *args; { --- 311,315 ---- static PyObject * ! sad_close(sadobject *self, PyObject *args) { *************** *** 347,353 **** static PyObject * ! sad_fileno(self, args) ! sadobject *self; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 325,329 ---- static PyObject * ! sad_fileno(sadobject *self, PyObject *args) { if (!PyArg_Parse(args, "")) *************** *** 377,383 **** static PyObject * ! sad_getattr(xp, name) ! sadobject *xp; ! char *name; { if (xp->x_isctl) --- 353,357 ---- static PyObject * ! sad_getattr(sadobject *xp, char *name) { if (xp->x_isctl) *************** *** 396,401 **** static void ! sads_dealloc(xp) ! sadstatusobject *xp; { PyMem_DEL(xp); --- 370,374 ---- static void ! sads_dealloc(sadstatusobject *xp) { PyMem_DEL(xp); *************** *** 447,453 **** static PyObject * ! sads_getattr(xp, name) ! sadstatusobject *xp; ! char *name; { return PyMember_Get((char *)&xp->ai, sads_ml, name); --- 420,424 ---- static PyObject * ! sads_getattr(sadstatusobject *xp, char *name) { return PyMember_Get((char *)&xp->ai, sads_ml, name); *************** *** 455,462 **** static int ! sads_setattr(xp, name, v) ! sadstatusobject *xp; ! char *name; ! PyObject *v; { --- 426,430 ---- static int ! sads_setattr(sadstatusobject *xp, char *name, PyObject *v) { *************** *** 504,510 **** static PyObject * ! sadopen(self, args) ! PyObject *self; ! PyObject *args; { return (PyObject *)newsadobject(args); --- 472,476 ---- static PyObject * ! sadopen(PyObject *self, PyObject *args) { return (PyObject *)newsadobject(args); From python-dev@python.org Mon Jul 10 19:11:02 2000 From: python-dev@python.org (Eric S. Raymond) Date: Mon, 10 Jul 2000 11:11:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcfgparser.tex,1.10,1.11 Message-ID: <200007101811.LAA19117@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv18589/dist/src/Doc/lib Modified Files: libcfgparser.tex Log Message: Give ConfigParser the capability to set as well as read options, and to write a representation of the configuration state in .ini format that can be read back in by a future read() call. Thus this class is now a back end for .ini editors as well as parsers. This patch is complete and tested, but exposes a bug in the ConfigParser implementation which I have not yet fixed. Because case information is discarded during parsing, the output of write() has its case smashed. I wrote this for a SourceForge interface script called forgetool. Documentation for the new entry points included. Index: libcfgparser.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcfgparser.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** libcfgparser.tex 2000/05/23 02:28:26 1.10 --- libcfgparser.tex 2000/07/10 18:10:59 1.11 *************** *** 6,9 **** --- 6,10 ---- \moduleauthor{Ken Manheimer}{klm@digicool.com} \moduleauthor{Barry Warsaw}{bwarsaw@python.org} + \moduleauthor{Eric S. Raymond}{esr@thyrsus.com} \sectionauthor{Christopher G. Petrilli}{petrilli@amber.org} *************** *** 114,117 **** --- 115,123 ---- \end{methoddesc} + \begin{methoddesc}{has_option}{section, option} + If the given section exists, and contains the given option. return 1; + otherwise return 0. (New in 1.6) + \end{methoddesc} + \begin{methoddesc}{read}{filenames} Read and parse a list of filenames. If \var{filenames} is a string or *************** *** 148,150 **** --- 154,167 ---- for the option are \samp{0} and \samp{1}, any others will raise \exception{ValueError}. + \end{methoddesc} + + \begin{methoddesc}{set}{section, option, value} + If the given section exists, set the given option to the specified value; + otherwise raise \exception{NoSectionError}. (New in 1.6) + \end{methoddesc} + + \begin{methoddesc}{write}{fileobect} + Write a representation of the configuration to the specified file + object. This representation can be parsed by a future \method{read()} + call. (New in 1.6) \end{methoddesc} From python-dev@python.org Mon Jul 10 19:11:02 2000 From: python-dev@python.org (Eric S. Raymond) Date: Mon, 10 Jul 2000 11:11:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib ConfigParser.py,1.18,1.19 Message-ID: <200007101811.LAA19121@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv18589/dist/src/Lib Modified Files: ConfigParser.py Log Message: Give ConfigParser the capability to set as well as read options, and to write a representation of the configuration state in .ini format that can be read back in by a future read() call. Thus this class is now a back end for .ini editors as well as parsers. This patch is complete and tested, but exposes a bug in the ConfigParser implementation which I have not yet fixed. Because case information is discarded during parsing, the output of write() has its case smashed. I wrote this for a SourceForge interface script called forgetool. Documentation for the new entry points included. Index: ConfigParser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ConfigParser.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** ConfigParser.py 2000/05/09 14:46:40 1.18 --- ConfigParser.py 2000/07/10 18:11:00 1.19 *************** *** 287,290 **** --- 287,326 ---- return string.lower(optionstr) + def has_option(self, section, option): + """Check for the existence of a given option in a given section.""" + if not section or section == "DEFAULT": + return self.__defaults.has_key(option) + elif not self.has_section(section): + return 0 + else: + return self.__sections[section].has_key(option) + + def set(self, section, option, value): + """Set an option.""" + if not section or section == "DEFAULT": + sectdict = self.__defaults + else: + try: + sectdict = self.__sections[section] + except KeyError: + raise NoSectionError(section) + sectdict[option] = value + + def write(self, fp): + """Write an .ini-format representation of the configuration state.""" + if self.__defaults: + fp.write("[DEFAULT]\n") + for key in self.__defaults.keys(): + fp.write(key + " = " + self.__defaults[key] + "\n") + fp.write("\n") + for section in self.sections(): + fp.write("[" + section + "]\n") + sectdict = self.__sections[section] + for key in sectdict.keys(): + if key == "__name__": + continue + fp.write(key + " = " + str(sectdict[key]) + "\n") + fp.write("\n") + # # Regular expressions for parsing section headers and options. Note a From python-dev@python.org Mon Jul 10 19:27:50 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 10 Jul 2000 11:27:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.41,2.42 Message-ID: <200007101827.LAA20779@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv20359/objects Modified Files: unicodeobject.c Log Message: - changed hash calculation for unicode strings. the new value is calculated from the character values, in a way that makes sure an 8-bit ASCII string and a unicode string with the same contents get the same hash value. (as a side effect, this also works for ISO Latin 1 strings). for more details, see the python-dev discussion. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.41 retrieving revision 2.42 diff -C2 -r2.41 -r2.42 *** unicodeobject.c 2000/07/07 17:51:08 2.41 --- unicodeobject.c 2000/07/10 18:27:47 2.42 *************** *** 3472,3495 **** unicode_hash(PyUnicodeObject *self) { ! long hash; ! PyObject *utf8; ! /* Since Unicode objects compare equal to their UTF-8 string ! counterparts, they should also use the UTF-8 strings as basis ! for their hash value. This is needed to assure that strings and ! Unicode objects behave in the same way as dictionary ! keys. Unfortunately, this costs some performance and also some ! memory if the cached UTF-8 representation is not used later ! on. */ if (self->hash != -1) return self->hash; ! utf8 = _PyUnicode_AsUTF8String((PyObject *)self, NULL); ! if (utf8 == NULL) ! return -1; ! hash = PyObject_Hash(utf8); ! if (hash == -1) ! return -1; ! self->hash = hash; ! return hash; } --- 3472,3497 ---- unicode_hash(PyUnicodeObject *self) { ! /* Since Unicode objects compare equal to their ASCII string ! counterparts, they should use the individual character values ! as basis for their hash value. This is needed to assure that ! strings and Unicode objects behave in the same way as ! dictionary keys. */ ! register int len; ! register Py_UNICODE *p; ! register long x; ! if (self->hash != -1) return self->hash; ! len = PyUnicode_GET_SIZE(self); ! p = PyUnicode_AS_UNICODE(self); ! x = *p << 7; ! while (--len >= 0) ! x = (1000003*x) ^ *p++; ! x ^= PyUnicode_GET_SIZE(self); ! if (x == -1) ! x = -2; ! self->hash = x; ! return x; } From python-dev@python.org Mon Jul 10 20:32:22 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 10 Jul 2000 12:32:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib locale.py,1.9,1.10 site.py,1.12,1.13 Message-ID: <200007101932.MAA31864@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv31795/lib Modified Files: locale.py site.py Log Message: -- removed get_default compatibility kludge -- added a few extra comments to locale.py Index: locale.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/locale.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** locale.py 2000/07/09 23:16:10 1.9 --- locale.py 2000/07/10 19:32:19 1.10 *************** *** 291,297 **** --- 291,300 ---- pass else: + # make sure the code/encoding values are valid if sys.platform == "win32" and code and code[:2] == "0x": # map windows language identifier to language name code = windows_locale.get(int(code, 0)) + # ...add other platform-specific processing here, if + # necessary... return code, encoding *************** *** 307,312 **** return _parse_localename(localename) - # compatibility - get_default = getdefaultlocale def getlocale(category=LC_CTYPE): --- 310,313 ---- Index: site.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/site.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** site.py 2000/06/28 14:48:01 1.12 --- site.py 2000/07/10 19:32:19 1.13 *************** *** 127,131 **** def locale_aware_defaultencoding(): import locale ! code, encoding = locale.get_default() if encoding is None: encoding = 'ascii' --- 127,131 ---- def locale_aware_defaultencoding(): import locale ! code, encoding = locale.getdefaultlocale() if encoding is None: encoding = 'ascii' From python-dev@python.org Mon Jul 10 22:30:31 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 10 Jul 2000 14:30:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.76,2.77 Message-ID: <200007102130.OAA21959@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv21752/Objects Modified Files: stringobject.c Log Message: two changes to string_join: implementation -- use PySequence_Fast interface to iterate over elements interface -- if instance object reports wrong length, ignore it; previous version raised an IndexError if reported length was too high Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.76 retrieving revision 2.77 diff -C2 -r2.76 -r2.77 *** stringobject.c 2000/07/09 08:02:21 2.76 --- stringobject.c 2000/07/10 21:30:28 2.77 *************** *** 745,848 **** int sz = 100; int i, slen; ! PyObject *seq; ! if (!PyArg_ParseTuple(args, "O:join", &seq)) return NULL; ! seqlen = PySequence_Length(seq); ! if (seqlen < 0 && PyErr_Occurred()) return NULL; if (seqlen == 1) { ! /* Optimization if there's only one item */ ! PyObject *item = PySequence_GetItem(seq, 0); ! if (item == NULL) ! return NULL; ! if (!PyString_Check(item) && ! !PyUnicode_Check(item)) { ! PyErr_SetString(PyExc_TypeError, ! "first argument must be sequence of strings"); ! Py_DECREF(item); ! return NULL; ! } return item; } if (!(res = PyString_FromStringAndSize((char*)NULL, sz))) return NULL; p = PyString_AsString(res); ! /* optimize for lists. all others (tuples and arbitrary sequences) ! * just use the abstract interface. ! */ ! if (PyList_Check(seq)) { ! for (i = 0; i < seqlen; i++) { ! PyObject *item = PyList_GET_ITEM(seq, i); ! if (!PyString_Check(item)){ ! if (PyUnicode_Check(item)) { ! Py_DECREF(res); ! return PyUnicode_Join( ! (PyObject *)self, ! seq); ! } ! PyErr_Format(PyExc_TypeError, ! "sequence item %i not a string", ! i); ! goto finally; ! } ! slen = PyString_GET_SIZE(item); ! while (reslen + slen + seplen >= sz) { ! if (_PyString_Resize(&res, sz*2)) ! goto finally; ! sz *= 2; ! p = PyString_AsString(res) + reslen; ! } ! if (i > 0) { ! memcpy(p, sep, seplen); ! p += seplen; ! reslen += seplen; } ! memcpy(p, PyString_AS_STRING(item), slen); ! p += slen; ! reslen += slen; } ! } ! else { ! for (i = 0; i < seqlen; i++) { ! PyObject *item = PySequence_GetItem(seq, i); ! if (!item) ! goto finally; ! if (!PyString_Check(item)){ ! if (PyUnicode_Check(item)) { ! Py_DECREF(res); ! Py_DECREF(item); ! return PyUnicode_Join( ! (PyObject *)self, ! seq); ! } Py_DECREF(item); ! PyErr_Format(PyExc_TypeError, ! "sequence item %i not a string", ! i); goto finally; } ! slen = PyString_GET_SIZE(item); ! while (reslen + slen + seplen >= sz) { ! if (_PyString_Resize(&res, sz*2)) { ! Py_DECREF(item); ! goto finally; ! } ! sz *= 2; ! p = PyString_AsString(res) + reslen; ! } ! if (i > 0) { ! memcpy(p, sep, seplen); ! p += seplen; ! reslen += seplen; ! } ! memcpy(p, PyString_AS_STRING(item), slen); ! Py_DECREF(item); ! p += slen; ! reslen += slen; } } if (_PyString_Resize(&res, reslen)) --- 745,808 ---- int sz = 100; int i, slen; ! PyObject *orig, *seq, *item; ! if (!PyArg_ParseTuple(args, "O:join", &orig)) return NULL; ! seq = PySequence_Fast(orig, ""); ! if (seq == NULL) { ! if (PyErr_ExceptionMatches(PyExc_TypeError)) ! PyErr_Format(PyExc_TypeError, ! "sequence expected, %.80s found", ! orig->ob_type->tp_name); return NULL; + } + seqlen = PySequence_Length(seq); if (seqlen == 1) { ! item = PySequence_Fast_GET_ITEM(seq, 0); ! Py_INCREF(item); return item; } + if (!(res = PyString_FromStringAndSize((char*)NULL, sz))) return NULL; p = PyString_AsString(res); ! for (i = 0; i < seqlen; i++) { ! item = PySequence_Fast_GET_ITEM(seq, i); ! if (!PyString_Check(item)){ ! if (PyUnicode_Check(item)) { ! Py_DECREF(res); ! Py_DECREF(item); ! return PyUnicode_Join((PyObject *)self, ! seq); } ! PyErr_Format(PyExc_TypeError, ! "sequence item %i: expected string, %.80s found", ! i, item->ob_type->tp_name); ! Py_DECREF(item); ! Py_DECREF(seq); ! goto finally; } ! slen = PyString_GET_SIZE(item); ! while (reslen + slen + seplen >= sz) { ! if (_PyString_Resize(&res, sz*2)) { Py_DECREF(item); ! Py_DECREF(seq); goto finally; } ! sz *= 2; ! p = PyString_AsString(res) + reslen; ! } ! if (i > 0) { ! memcpy(p, sep, seplen); ! p += seplen; ! reslen += seplen; } + memcpy(p, PyString_AS_STRING(item), slen); + Py_DECREF(item); + p += slen; + reslen += slen; } if (_PyString_Resize(&res, reslen)) From python-dev@python.org Mon Jul 10 23:41:33 2000 From: python-dev@python.org (Tim Peters) Date: Mon, 10 Jul 2000 15:41:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules rotormodule.c,2.25,2.26 Message-ID: <200007102241.PAA00960@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv694/python/dist/src/modules Modified Files: rotormodule.c Log Message: Now that prototypes are in scope, the compiler gives legit wngs about int size mismatches at two calls to s_rand. Stuffed in casts to make the code do what it did before but w/o warnings -- although unclear that's correct! Index: rotormodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/rotormodule.c,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** rotormodule.c 2000/07/10 13:05:29 2.25 --- rotormodule.c 2000/07/10 22:41:30 2.26 *************** *** 331,336 **** RTR_d_rotors(r); for (i = 0; i < r->rotors; i++) { ! r->positions[i] = (unsigned char) r_rand(r,r->size); ! r->advances[i] = (1+(2*(r_rand(r,r->size/2)))); RTR_permute_rotor(r, &(r->e_rotor[(i*r->size)]), --- 331,336 ---- RTR_d_rotors(r); for (i = 0; i < r->rotors; i++) { ! r->positions[i] = (unsigned char) r_rand(r, (short)r->size); ! r->advances[i] = (1+(2*(r_rand(r, (short)(r->size/2))))); RTR_permute_rotor(r, &(r->e_rotor[(i*r->size)]), From python-dev@python.org Tue Jul 11 04:28:20 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 10 Jul 2000 20:28:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.77,2.78 Message-ID: <200007110328.UAA20307@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv20163/Objects Modified Files: stringobject.c Log Message: fix two refcount bugs in new string_join implementation: 1. PySequence_Fast_GET_ITEM is a macro and borrows a reference 2. The seq returned from PySequence_Fast must be decref'd Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.77 retrieving revision 2.78 diff -C2 -r2.77 -r2.78 *** stringobject.c 2000/07/10 21:30:28 2.77 --- stringobject.c 2000/07/11 03:28:17 2.78 *************** *** 775,779 **** if (PyUnicode_Check(item)) { Py_DECREF(res); - Py_DECREF(item); return PyUnicode_Join((PyObject *)self, seq); --- 775,778 ---- *************** *** 782,787 **** "sequence item %i: expected string, %.80s found", i, item->ob_type->tp_name); - Py_DECREF(item); - Py_DECREF(seq); goto finally; } --- 781,784 ---- *************** *** 789,794 **** while (reslen + slen + seplen >= sz) { if (_PyString_Resize(&res, sz*2)) { - Py_DECREF(item); - Py_DECREF(seq); goto finally; } --- 786,789 ---- *************** *** 802,806 **** } memcpy(p, PyString_AS_STRING(item), slen); - Py_DECREF(item); p += slen; reslen += slen; --- 797,800 ---- *************** *** 808,814 **** --- 802,810 ---- if (_PyString_Resize(&res, reslen)) goto finally; + Py_DECREF(seq); return res; finally: + Py_DECREF(seq); Py_DECREF(res); return NULL; From python-dev@python.org Tue Jul 11 04:31:57 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 10 Jul 2000 20:31:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test string_tests.py,1.1,1.2 Message-ID: <200007110331.UAA20483@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv20466 Modified Files: string_tests.py Log Message: add more tests of string.join variants to run_method_tests Index: string_tests.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/string_tests.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** string_tests.py 2000/07/10 17:08:42 1.1 --- string_tests.py 2000/07/11 03:31:55 1.2 *************** *** 5,8 **** --- 5,10 ---- transtable = '\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`xyzdefghijklmnopqrstuvwxyz{|}~\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377' + from UserList import UserList + class Sequence: def __init__(self): self.seq = 'wxyz' *************** *** 40,47 **** test('join', BadSeq1(), TypeError) ! test('join', BadSeq2(), IndexError) ! # XXX should this test really raise an exception; lots of other core ! # code will just ignore the lying __len__ method. ! # test('join', BadSeq2(), 'a b c') # try a few long ones --- 42,46 ---- test('join', BadSeq1(), TypeError) ! test('join', BadSeq2(), 'a b c') # try a few long ones *************** *** 118,127 **** test('join', '', 'abcd', ('a', 'b', 'c', 'd')) test('join', ' ', 'w x y z', Sequence()) test('join', ' ', TypeError, BadSeq1()) ! test('join', ' ', IndexError, BadSeq2()) ! # XXX should this test really raise an exception; lots of other core ! # code will just ignore the lying __len__ method. ! # test('join', BadSeq2(), 'a b c') test('splitlines', "abc\ndef\n\rghi", ['abc', 'def', '', 'ghi']) --- 117,130 ---- test('join', '', 'abcd', ('a', 'b', 'c', 'd')) test('join', ' ', 'w x y z', Sequence()) + test('join', 'a', 'abc', ('abc',)) + test('join', 'a', 'z', UserList(['z'])) + test('join', u'.', u'a.b.c', ['a', 'b', 'c']) + test('join', '.', u'a.b.c', [u'a', 'b', 'c']) + test('join', '.', u'a.b.c', ['a', u'b', 'c']) + test('join', '.', u'a.b.c', ['a', 'b', u'c']) + test('join', '.', TypeError, ['a', u'b', 3]) test('join', ' ', TypeError, BadSeq1()) ! test('join', ' ', 'a b c', BadSeq2()) test('splitlines', "abc\ndef\n\rghi", ['abc', 'def', '', 'ghi']) From python-dev@python.org Tue Jul 11 05:36:11 2000 From: python-dev@python.org (Moshe Zadka) Date: Tue, 11 Jul 2000 07:36:11 +0300 (IDT) Subject: [Python-checkins] CVS: python/dist/src/Lib urllib.py,1.96,1.97 In-Reply-To: <200007101500.IAA13372@slayer.i.sourceforge.net> Message-ID: On Mon, 10 Jul 2000, Eric S. Raymond wrote: > Update of /cvsroot/python/python/dist/src/Lib > In directory slayer.i.sourceforge.net:/tmp/cvs-serv11503/dist/src/Lib > > Modified Files: > urllib.py > Log Message: > Moves some test code into the scope of if __name__ == '__main__', where it > won't get loaded when we're using the classes in this module. Why? It's only parsed once (under usual conditions) per installation, it's cost in memory is not so high, and it's cool to be able to test via ''' import urllib urllib.main() ''' -- Moshe Zadka There is no GOD but Python, and HTTP is its prophet. http://advogato.org/person/moshez From python-dev@python.org Tue Jul 11 05:58:15 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 10 Jul 2000 21:58:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.78,2.79 Message-ID: <200007110458.VAA31637@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv31629 Modified Files: stringobject.c Log Message: string_join(): Some cleaning up of reference counting. In the seqlen==1 clause, before returning item, we need to DECREF seq. In the res=PyString... failure clause, we need to goto finally to also decref seq (and the DECREF of res in finally is changed to a XDECREF). Also, we need to DECREF seq just before the PyUnicode_Join() return. Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.78 retrieving revision 2.79 diff -C2 -r2.78 -r2.79 *** stringobject.c 2000/07/11 03:28:17 2.78 --- stringobject.c 2000/07/11 04:58:12 2.79 *************** *** 750,755 **** return NULL; ! seq = PySequence_Fast(orig, ""); ! if (seq == NULL) { if (PyErr_ExceptionMatches(PyExc_TypeError)) PyErr_Format(PyExc_TypeError, --- 750,754 ---- return NULL; ! if (!(seq = PySequence_Fast(orig, ""))) { if (PyErr_ExceptionMatches(PyExc_TypeError)) PyErr_Format(PyExc_TypeError, *************** *** 758,771 **** return NULL; } ! seqlen = PySequence_Length(seq); if (seqlen == 1) { item = PySequence_Fast_GET_ITEM(seq, 0); Py_INCREF(item); return item; } if (!(res = PyString_FromStringAndSize((char*)NULL, sz))) ! return NULL; p = PyString_AsString(res); --- 757,774 ---- return NULL; } ! /* From here on out, errors go through finally: for proper ! * reference count manipulations. ! */ seqlen = PySequence_Length(seq); if (seqlen == 1) { item = PySequence_Fast_GET_ITEM(seq, 0); Py_INCREF(item); + Py_DECREF(seq); return item; } if (!(res = PyString_FromStringAndSize((char*)NULL, sz))) ! goto finally; ! p = PyString_AsString(res); *************** *** 775,780 **** if (PyUnicode_Check(item)) { Py_DECREF(res); ! return PyUnicode_Join((PyObject *)self, ! seq); } PyErr_Format(PyExc_TypeError, --- 778,783 ---- if (PyUnicode_Check(item)) { Py_DECREF(res); ! Py_DECREF(seq); ! return PyUnicode_Join((PyObject *)self, seq); } PyErr_Format(PyExc_TypeError, *************** *** 807,811 **** finally: Py_DECREF(seq); ! Py_DECREF(res); return NULL; } --- 810,814 ---- finally: Py_DECREF(seq); ! Py_XDECREF(res); return NULL; } From python-dev@python.org Tue Jul 11 10:47:08 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Tue, 11 Jul 2000 02:47:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.42,2.43 Message-ID: <200007110947.CAA21400@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv21384/Objects Modified Files: unicodeobject.c Log Message: Jeremy Hylton: better error message for unicode coercion failure Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.42 retrieving revision 2.43 diff -C2 -r2.42 -r2.43 *** unicodeobject.c 2000/07/10 18:27:47 2.42 --- unicodeobject.c 2000/07/11 09:47:04 2.43 *************** *** 407,412 **** case of a TypeError. */ if (PyErr_ExceptionMatches(PyExc_TypeError)) ! PyErr_SetString(PyExc_TypeError, ! "coercing to Unicode: need string or buffer"); goto onError; } --- 407,414 ---- case of a TypeError. */ if (PyErr_ExceptionMatches(PyExc_TypeError)) ! PyErr_Format(PyExc_TypeError, ! "coercing to Unicode: need string or buffer, " ! "%.80s found", ! obj->ob_type->tp_name); goto onError; } From python-dev@python.org Tue Jul 11 11:38:28 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 11 Jul 2000 03:38:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/curses ascii.py,1.2,1.3 textpad.py,1.2,1.3 Message-ID: <200007111038.DAA02128@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/curses In directory slayer.i.sourceforge.net:/tmp/cvs-serv1998 Modified Files: ascii.py textpad.py Log Message: Docstring changes. Index: ascii.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/curses/ascii.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ascii.py 2000/06/27 14:15:29 1.2 --- ascii.py 2000/07/11 10:38:24 1.3 *************** *** 1,5 **** ! # ! # ascii.py -- constants and membership tests for ASCII characters ! # NUL = 0x00 # ^@ --- 1,3 ---- ! """Constants and membership tests for ASCII characters""" NUL = 0x00 # ^@ Index: textpad.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/curses/textpad.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** textpad.py 2000/06/27 00:53:12 1.2 --- textpad.py 2000/07/11 10:38:24 1.3 *************** *** 1,5 **** ! """curses.textpad ! ! """ import sys, curses, ascii --- 1,3 ---- ! """Simple textbox editing widget with Emacs-like keybindings.""" import sys, curses, ascii From python-dev@python.org Tue Jul 11 11:45:30 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 11 Jul 2000 03:45:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_mmap,1.2,1.3 Message-ID: <200007111045.DAA03213@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv2891/output Modified Files: test_mmap Log Message: Add test of resize() method of mmap objects Index: test_mmap =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_mmap,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 Binary files /tmp/cvsiFpAzk and /tmp/cvseey01u differ From python-dev@python.org Tue Jul 11 11:45:30 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 11 Jul 2000 03:45:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_mmap.py,1.5,1.6 Message-ID: <200007111045.DAA03209@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv2891 Modified Files: test_mmap.py Log Message: Add test of resize() method of mmap objects Index: test_mmap.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_mmap.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_mmap.py 2000/06/18 04:47:08 1.5 --- test_mmap.py 2000/07/11 10:45:27 1.6 *************** *** 95,98 **** --- 95,111 ---- assert 0, 'expected a ValueError but did not get it' + # Try resizing map + print ' Attempting resize()' + try: + m.resize( 512 ) + except SystemError: + # resize() not supported + # No messages are printed, since the output of this test suite + # would then be different across platforms. + pass + else: + # resize() is supported + pass + m.close() os.unlink("foo") From python-dev@python.org Tue Jul 11 12:24:44 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Tue, 11 Jul 2000 04:24:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_mmap.py,1.6,1.7 Message-ID: <200007111124.EAA19137@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv18786 Modified Files: test_mmap.py Log Message: fixed inconsistent use of tab and spaces Index: test_mmap.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_mmap.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** test_mmap.py 2000/07/11 10:45:27 1.6 --- test_mmap.py 2000/07/11 11:24:41 1.7 *************** *** 70,74 **** print ' Seek to last byte' assert m.tell() == len(m) ! print ' Try to seek to negative position...' try: --- 70,74 ---- print ' Seek to last byte' assert m.tell() == len(m) ! print ' Try to seek to negative position...' try: *************** *** 98,102 **** print ' Attempting resize()' try: ! m.resize( 512 ) except SystemError: # resize() not supported --- 98,102 ---- print ' Attempting resize()' try: ! m.resize( 512 ) except SystemError: # resize() not supported *************** *** 105,109 **** pass else: ! # resize() is supported pass --- 105,109 ---- pass else: ! # resize() is supported pass From python-dev@python.org Tue Jul 11 14:03:58 2000 From: python-dev@python.org (Eric S. Raymond) Date: Tue, 11 Jul 2000 06:03:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib cmd.py,1.17,1.18 Message-ID: <200007111303.GAA10423@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9661 Modified Files: cmd.py Log Message: Bug fix: ? and ! were not full aliases for `help' and `shell' as implied in the documentation; the cases `? foo' and `! foo' failed. Index: cmd.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/cmd.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** cmd.py 2000/02/02 15:10:14 1.17 --- cmd.py 2000/07/11 13:03:55 1.18 *************** *** 91,103 **** def onecmd(self, line): line = string.strip(line) ! if line == '?': ! line = 'help' ! elif line == '!': if hasattr(self, 'do_shell'): ! line = 'shell' else: return self.default(line) - elif not line: - return self.emptyline() self.lastcmd = line i, n = 0, len(line) --- 91,103 ---- def onecmd(self, line): line = string.strip(line) ! if not line: ! return self.emptyline() ! elif line[0] == '?': ! line = 'help ' + line[1:] ! elif line[0] == '!': if hasattr(self, 'do_shell'): ! line = 'shell ' + line[1:] else: return self.default(line) self.lastcmd = line i, n = 0, len(line) From python-dev@python.org Tue Jul 11 15:37:44 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 07:37:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules gcmodule.c,2.3,2.4 Message-ID: <200007111437.HAA26326@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv26316 Modified Files: gcmodule.c Log Message: Neil Schemenauer : Change a cast, intialize a local, and make some sprintf() format strings type-appropriate (add the "l" to "%d"). Closes SourceForge patch #100737. Index: gcmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** gcmodule.c 2000/07/10 17:10:26 2.3 --- gcmodule.c 2000/07/11 14:37:41 2.4 *************** *** 290,297 **** } else if (debug & DEBUG_OBJECTS) { char buf[200]; ! sprintf(buf, "gc: %s<%s 0x%x>\n", msg, op->ob_type->tp_name, ! (long)op); PyFile_WriteString(buf, output); } --- 290,297 ---- } else if (debug & DEBUG_OBJECTS) { char buf[200]; ! sprintf(buf, "gc: %s<%.100s 0x%p>\n", msg, op->ob_type->tp_name, ! op); PyFile_WriteString(buf, output); } *************** *** 369,373 **** sprintf(buf, "gc: collecting generation %d...\n", generation); PyFile_WriteString(buf,output); ! sprintf(buf, "gc: objects in each generation: %d %d %d\n", gc_list_size(&generation0), gc_list_size(&generation1), --- 369,373 ---- sprintf(buf, "gc: collecting generation %d...\n", generation); PyFile_WriteString(buf,output); ! sprintf(buf, "gc: objects in each generation: %ld %ld %ld\n", gc_list_size(&generation0), gc_list_size(&generation1), *************** *** 435,439 **** char buf[200]; sprintf(buf, ! "gc: done, %d unreachable, %d uncollectable.\n", n+m, n); PyFile_WriteString(buf, output); --- 435,439 ---- char buf[200]; sprintf(buf, ! "gc: done, %ld unreachable, %ld uncollectable.\n", n+m, n); PyFile_WriteString(buf, output); From python-dev@python.org Tue Jul 11 16:15:34 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 11 Jul 2000 08:15:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test regrtest.py,1.17,1.18 test_select.py,1.8,1.9 Message-ID: <200007111515.IAA00921@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv31604 Modified Files: regrtest.py test_select.py Log Message: fix bug #42 reported by Andrew Dalke The Compare close contains a close method that checks to see if there is any unconsumed data in the Compare instance; i.e. if the canonical output file contains more data than was produced by the current test run. This method was never called, allowing differences to go undetected. Fix is to call close after the test is run (after __import__) output/test_long and output/test_popen2 needed trivial changes output/test_select contained lots of text, but test_select.py produced no output Index: regrtest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/regrtest.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** regrtest.py 2000/06/30 16:39:27 1.17 --- regrtest.py 2000/07/11 15:15:30 1.18 *************** *** 213,216 **** --- 213,218 ---- print test # Output file starts with test name __import__(test, globals(), locals(), []) + if cfp and not (generate or verbose): + cfp.close() finally: sys.stdout = save_stdout Index: test_select.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_select.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** test_select.py 1998/03/26 19:42:42 1.8 --- test_select.py 2000/07/11 15:15:30 1.9 *************** *** 46,50 **** print 'timeout =', tout rfd, wfd, xfd = select.select([p], [], [], tout) - ## print rfd, wfd, xfd if (rfd, wfd, xfd) == ([], [], []): continue --- 46,49 ---- From python-dev@python.org Tue Jul 11 16:15:34 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 11 Jul 2000 08:15:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_long,1.2,1.3 test_popen2,1.1,1.2 test_select,1.1,1.2 Message-ID: <200007111515.IAA00922@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv31604/output Modified Files: test_long test_popen2 test_select Log Message: fix bug #42 reported by Andrew Dalke The Compare close contains a close method that checks to see if there is any unconsumed data in the Compare instance; i.e. if the canonical output file contains more data than was produced by the current test run. This method was never called, allowing differences to go undetected. Fix is to call close after the test is run (after __import__) output/test_long and output/test_popen2 needed trivial changes output/test_select contained lots of text, but test_select.py produced no output Index: test_long =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_long,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** test_long 1998/10/02 01:19:48 1.2 --- test_long 2000/07/11 15:15:31 1.3 *************** *** 4,6 **** long str/hex/oct/atol long miscellaneous operations - --- 4,5 ---- Index: test_popen2 =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_popen2,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_popen2 1999/03/11 13:26:23 1.1 --- test_popen2 2000/07/11 15:15:31 1.2 *************** *** 3,5 **** testing popen3... All OK - --- 3,4 ---- Index: test_select =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_select,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_select 1996/12/11 23:58:46 1.1 --- test_select 2000/07/11 15:15:31 1.2 *************** *** 1,25 **** test_select - timeout = 0 - timeout = 1 - 'testing...\012' - timeout = 2 - 'testing...\012' - timeout = 4 - 'testing...\012' - timeout = 8 - 'testing...\012' - timeout = 16 - 'testing...\012' - timeout = None - 'testing...\012' - timeout = None - 'testing...\012' - timeout = None - 'testing...\012' - timeout = None - 'testing...\012' - timeout = None - 'testing...\012' - timeout = None - '' - EOF --- 1 ---- From python-dev@python.org Tue Jul 11 17:30:35 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 09:30:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libpyexpat.tex,1.2,1.3 Message-ID: <200007111630.JAA20148@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv20129/Doc/lib Modified Files: libpyexpat.tex Log Message: Change the table in the pyexpat.errors module to a series of datadesc elements (since the table was pretty screwed up); this is how it is done elsewhere in the manual. I could use some help creating descriptions of the specific error identifiers (input conditions that lead to each error, etc.). Index: libpyexpat.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpyexpat.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libpyexpat.tex 2000/07/05 02:03:34 1.2 --- libpyexpat.tex 2000/07/11 16:30:30 1.3 *************** *** 254,276 **** The following constants are defined: ! \begin{tableii}{l|l}{code}{Constants}{} ! \lineii{XML_ERROR_ASYNC_ENTITY} ! {XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF} ! \lineii{XML_ERROR_BAD_CHAR_REF} ! {XML_ERROR_BINARY_ENTITY_REF} ! \lineii{XML_ERROR_DUPLICATE_ATTRIBUTE} ! {XML_ERROR_INCORRECT_ENCODING} ! \lineii{XML_ERROR_INVALID_TOKEN} ! {XML_ERROR_JUNK_AFTER_DOC_ELEMENT} ! \lineii{XML_ERROR_MISPLACED_XML_PI} ! {XML_ERROR_NO_ELEMENTS} ! \lineii{XML_ERROR_NO_MEMORY} ! {XML_ERROR_PARAM_ENTITY_REF} ! \lineii{XML_ERROR_PARTIAL_CHAR} ! {XML_ERROR_RECURSIVE_ENTITY_REF} ! \lineii{XML_ERROR_SYNTAX} ! {XML_ERROR_TAG_MISMATCH} ! \lineii{XML_ERROR_UNCLOSED_TOKEN} ! {XML_ERROR_UNDEFINED_ENTITY} ! \lineii{XML_ERROR_UNKNOWN_ENCODING}{} ! \end{tableii} --- 254,319 ---- The following constants are defined: ! \begin{datadesc}{XML_ERROR_ASYNC_ENTITY} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_BAD_CHAR_REF} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_BINARY_ENTITY_REF} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_DUPLICATE_ATTRIBUTE} ! An attribute was used more than once in a start tag. ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_INCORRECT_ENCODING} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_INVALID_TOKEN} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_JUNK_AFTER_DOC_ELEMENT} ! Something other than whitespace occurred after the document element. ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_MISPLACED_XML_PI} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_NO_ELEMENTS} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_NO_MEMORY} ! Expat was not able to allocate memory internally. ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_PARAM_ENTITY_REF} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_PARTIAL_CHAR} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_RECURSIVE_ENTITY_REF} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_SYNTAX} ! Some unspecified syntax error was encountered. ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_TAG_MISMATCH} ! An end tag did not match the innermost open start tag. ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_UNCLOSED_TOKEN} ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_UNDEFINED_ENTITY} ! A reference was made to a entity which was not defined. ! \end{datadesc} ! ! \begin{datadesc}{XML_ERROR_UNKNOWN_ENCODING} ! The document encoding is not supported by Expat. ! \end{datadesc} ! From python-dev@python.org Tue Jul 11 17:43:19 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Tue, 11 Jul 2000 09:43:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/scripts pindent.py,1.8,1.9 Message-ID: <200007111643.JAA22540@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/scripts In directory slayer.i.sourceforge.net:/tmp/cvs-serv22421 Modified Files: pindent.py Log Message: add expandtabs command (-e) change eliminate to delete (-d) Index: pindent.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/scripts/pindent.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** pindent.py 2000/06/28 22:55:20 1.8 --- pindent.py 2000/07/11 16:43:16 1.9 *************** *** 5,9 **** # programs. When called as "pindent -c", it takes a valid Python # program as input and outputs a version augmented with block-closing ! # comments. When called as "pindent -e", it assumes its input is a # Python program with block-closing comments and outputs a commentless # version. When called as "pindent -r" it assumes its input is a --- 5,9 ---- # programs. When called as "pindent -c", it takes a valid Python # program as input and outputs a version augmented with block-closing ! # comments. When called as "pindent -d", it assumes its input is a # Python program with block-closing comments and outputs a commentless # version. When called as "pindent -r" it assumes its input is a *************** *** 47,50 **** --- 47,51 ---- # -s stepsize: set the indentation step size (default 8) # -t tabsize : set the number of spaces a tab character is worth (default 8) + # -e : expand TABs into spaces # file ... : input file(s) (default standard input) # The results always go to standard output *************** *** 79,82 **** --- 80,84 ---- STEPSIZE = 8 TABSIZE = 8 + EXPANDTABS = 0 import os *************** *** 97,101 **** def __init__(self, fpi = sys.stdin, fpo = sys.stdout, ! indentsize = STEPSIZE, tabsize = TABSIZE): self.fpi = fpi self.fpo = fpo --- 99,103 ---- def __init__(self, fpi = sys.stdin, fpo = sys.stdout, ! indentsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS): self.fpi = fpi self.fpo = fpo *************** *** 103,107 **** self.tabsize = tabsize self.lineno = 0 ! self.write = fpo.write self.kwprog = re.compile( r'^\s*(?P[a-z]+)' --- 105,110 ---- self.tabsize = tabsize self.lineno = 0 ! self.expandtabs = expandtabs ! self._write = fpo.write self.kwprog = re.compile( r'^\s*(?P[a-z]+)' *************** *** 115,118 **** --- 118,129 ---- # end def __init__ + def write(self, line): + if self.expandtabs: + self._write(string.expandtabs(line, self.tabsize)) + else: + self._write(line) + # end if + # end def write + def readline(self): line = self.fpi.readline() *************** *** 197,201 **** # end def reformat ! def eliminate(self): begin_counter = 0 end_counter = 0 --- 208,212 ---- # end def reformat ! def delete(self): begin_counter = 0 end_counter = 0 *************** *** 223,227 **** sys.stderr.write('Warning: input contained less end tags than expected\n') # end if ! # end def eliminate def complete(self): --- 234,238 ---- sys.stderr.write('Warning: input contained less end tags than expected\n') # end if ! # end def delete def complete(self): *************** *** 326,343 **** def complete_filter(input = sys.stdin, output = sys.stdout, ! stepsize = STEPSIZE, tabsize = TABSIZE): ! pi = PythonIndenter(input, output, stepsize, tabsize) pi.complete() # end def complete_filter ! def eliminate_filter(input= sys.stdin, output = sys.stdout, ! stepsize = STEPSIZE, tabsize = TABSIZE): ! pi = PythonIndenter(input, output, stepsize, tabsize) ! pi.eliminate() ! # end def eliminate_filter def reformat_filter(input = sys.stdin, output = sys.stdout, ! stepsize = STEPSIZE, tabsize = TABSIZE): ! pi = PythonIndenter(input, output, stepsize, tabsize) pi.reformat() # end def reformat_filter --- 337,354 ---- def complete_filter(input = sys.stdin, output = sys.stdout, ! stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS): ! pi = PythonIndenter(input, output, stepsize, tabsize, expandtabs) pi.complete() # end def complete_filter ! def delete_filter(input= sys.stdin, output = sys.stdout, ! stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS): ! pi = PythonIndenter(input, output, stepsize, tabsize, expandtabs) ! pi.delete() ! # end def delete_filter def reformat_filter(input = sys.stdin, output = sys.stdout, ! stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS): ! pi = PythonIndenter(input, output, stepsize, tabsize, expandtabs) pi.reformat() # end def reformat_filter *************** *** 387,417 **** # end class StringWriter ! def complete_string(source, stepsize = STEPSIZE, tabsize = TABSIZE): input = StringReader(source) output = StringWriter() ! pi = PythonIndenter(input, output, stepsize, tabsize) pi.complete() return output.getvalue() # end def complete_string ! def eliminate_string(source, stepsize = STEPSIZE, tabsize = TABSIZE): input = StringReader(source) output = StringWriter() ! pi = PythonIndenter(input, output, stepsize, tabsize) ! pi.eliminate() return output.getvalue() ! # end def eliminate_string ! def reformat_string(source, stepsize = STEPSIZE, tabsize = TABSIZE): input = StringReader(source) output = StringWriter() ! pi = PythonIndenter(input, output, stepsize, tabsize) pi.reformat() return output.getvalue() # end def reformat_string ! def complete_file(filename, stepsize = STEPSIZE, tabsize = TABSIZE): source = open(filename, 'r').read() ! result = complete_string(source, stepsize, tabsize) if source == result: return 0 # end if --- 398,428 ---- # end class StringWriter ! def complete_string(source, stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS): input = StringReader(source) output = StringWriter() ! pi = PythonIndenter(input, output, stepsize, tabsize, expandtabs) pi.complete() return output.getvalue() # end def complete_string ! def delete_string(source, stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS): input = StringReader(source) output = StringWriter() ! pi = PythonIndenter(input, output, stepsize, tabsize, expandtabs) ! pi.delete() return output.getvalue() ! # end def delete_string ! def reformat_string(source, stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS): input = StringReader(source) output = StringWriter() ! pi = PythonIndenter(input, output, stepsize, tabsize, expandtabs) pi.reformat() return output.getvalue() # end def reformat_string ! def complete_file(filename, stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS): source = open(filename, 'r').read() ! result = complete_string(source, stepsize, tabsize, expandtabs) if source == result: return 0 # end if *************** *** 426,432 **** # end def complete_file ! def eliminate_file(filename, stepsize = STEPSIZE, tabsize = TABSIZE): source = open(filename, 'r').read() ! result = eliminate_string(source, stepsize, tabsize) if source == result: return 0 # end if --- 437,443 ---- # end def complete_file ! def delete_file(filename, stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS): source = open(filename, 'r').read() ! result = delete_string(source, stepsize, tabsize, expandtabs) if source == result: return 0 # end if *************** *** 439,447 **** f.close() return 1 ! # end def eliminate_file ! def reformat_file(filename, stepsize = STEPSIZE, tabsize = TABSIZE): source = open(filename, 'r').read() ! result = reformat_string(source, stepsize, tabsize) if source == result: return 0 # end if --- 450,458 ---- f.close() return 1 ! # end def delete_file ! def reformat_file(filename, stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS): source = open(filename, 'r').read() ! result = reformat_string(source, stepsize, tabsize, expandtabs) if source == result: return 0 # end if *************** *** 459,468 **** usage = """ ! usage: pindent (-c|-e|-r) [-s stepsize] [-t tabsize] [file] ... -c : complete a correctly indented program (add #end directives) ! -e : eliminate #end directives -r : reformat a completed program (use #end directives) -s stepsize: indentation step (default %(STEPSIZE)d) -t tabsize : the worth in spaces of a tab (default %(TABSIZE)d) [file] ... : files are changed in place, with backups in file~ If no files are specified or a single - is given, --- 470,480 ---- usage = """ ! usage: pindent (-c|-d|-r) [-s stepsize] [-t tabsize] [-e] [file] ... -c : complete a correctly indented program (add #end directives) ! -d : delete #end directives -r : reformat a completed program (use #end directives) -s stepsize: indentation step (default %(STEPSIZE)d) -t tabsize : the worth in spaces of a tab (default %(TABSIZE)d) + -e : expand TABs into spaces (defailt OFF) [file] ... : files are changed in place, with backups in file~ If no files are specified or a single - is given, *************** *** 470,477 **** """ % vars() def test(): import getopt try: ! opts, args = getopt.getopt(sys.argv[1:], 'cers:t:') except getopt.error, msg: sys.stderr.write('Error: %s\n' % msg) --- 482,495 ---- """ % vars() + def error_both(op1, op2): + sys.stderr.write('Error: You can not specify both '+op1+' and -'+op2[0]+' at the same time\n') + sys.stderr.write(usage) + sys.exit(2) + # end def error_both + def test(): import getopt try: ! opts, args = getopt.getopt(sys.argv[1:], 'cdrs:t:e') except getopt.error, msg: sys.stderr.write('Error: %s\n' % msg) *************** *** 482,491 **** stepsize = STEPSIZE tabsize = TABSIZE for o, a in opts: if o == '-c': action = 'complete' ! elif o == '-e': ! action = 'eliminate' elif o == '-r': action = 'reformat' elif o == '-s': --- 500,516 ---- stepsize = STEPSIZE tabsize = TABSIZE + expandtabs = EXPANDTABS for o, a in opts: if o == '-c': + if action: error_both(o, action) + # end if action = 'complete' ! elif o == '-d': ! if action: error_both(o, action) ! # end if ! action = 'delete' elif o == '-r': + if action: error_both(o, action) + # end if action = 'reformat' elif o == '-s': *************** *** 493,501 **** elif o == '-t': tabsize = string.atoi(a) # end if # end for if not action: sys.stderr.write( ! 'You must specify -c(omplete), -e(eliminate) or -r(eformat)\n') sys.stderr.write(usage) sys.exit(2) --- 518,528 ---- elif o == '-t': tabsize = string.atoi(a) + elif o == '-e': + expandtabs = 1 # end if # end for if not action: sys.stderr.write( ! 'You must specify -c(omplete), -d(elete) or -r(eformat)\n') sys.stderr.write(usage) sys.exit(2) *************** *** 503,511 **** if not args or args == ['-']: action = eval(action + '_filter') ! action(sys.stdin, sys.stdout, stepsize, tabsize) else: action = eval(action + '_file') for file in args: ! action(file, stepsize, tabsize) # end for # end if --- 530,538 ---- if not args or args == ['-']: action = eval(action + '_filter') ! action(sys.stdin, sys.stdout, stepsize, tabsize, expandtabs) else: action = eval(action + '_file') for file in args: ! action(file, stepsize, tabsize, expandtabs) # end for # end if From python-dev@python.org Tue Jul 11 18:40:33 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Tue, 11 Jul 2000 10:40:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.115,1.116 Message-ID: <200007111740.KAA06683@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6582 Modified Files: socketmodule.c Log Message: fixed a warning in getsockaddrlen Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.115 retrieving revision 1.116 diff -C2 -r1.115 -r1.116 *** socketmodule.c 2000/07/09 15:09:56 1.115 --- socketmodule.c 2000/07/11 17:40:30 1.116 *************** *** 576,580 **** static int ! getsockaddrlen(PySocketSockObject *s, int *len_ret) { switch (s->sock_family) { --- 576,580 ---- static int ! getsockaddrlen(PySocketSockObject *s, unsigned int *len_ret) { switch (s->sock_family) { From python-dev@python.org Tue Jul 11 18:53:03 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 10:53:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_exceptions,1.3,1.4 Message-ID: <200007111753.KAA07953@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv7915/Lib/test/output Modified Files: test_exceptions Log Message: Create two new exceptions: IndentationError and TabError. These are used for indentation related errors. This patch includes Ping's improvements for indentation-related error messages. Closes SourceForge patches #100734 and #100856. Index: test_exceptions =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_exceptions,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_exceptions 2000/06/25 10:44:57 1.3 --- test_exceptions 2000/07/11 17:52:59 1.4 *************** *** 29,32 **** --- 29,36 ---- SyntaxError spam + IndentationError + spam + TabError + spam SystemError (hard to reproduce) From python-dev@python.org Tue Jul 11 18:53:03 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 10:53:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include errcode.h,2.11,2.12 parsetok.h,2.13,2.14 Message-ID: <200007111753.KAA07951@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv7915/Include Modified Files: errcode.h parsetok.h Log Message: Create two new exceptions: IndentationError and TabError. These are used for indentation related errors. This patch includes Ping's improvements for indentation-related error messages. Closes SourceForge patches #100734 and #100856. Index: errcode.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/errcode.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** errcode.h 2000/06/30 23:58:04 2.11 --- errcode.h 2000/07/11 17:52:59 2.12 *************** *** 31,36 **** #define E_DONE 16 /* Parsing complete */ #define E_ERROR 17 /* Execution error */ ! #define E_INDENT 18 /* Invalid indentation detected */ ! #define E_OVERFLOW 19 /* Node had too many children */ #ifdef __cplusplus --- 31,38 ---- #define E_DONE 16 /* Parsing complete */ #define E_ERROR 17 /* Execution error */ ! #define E_TABSPACE 18 /* Invalid indentation detected */ ! #define E_OVERFLOW 19 /* Node had too many children */ ! #define E_TOODEEP 20 /* Too many indentation levels */ ! #define E_DEDENT 21 /* No matching outer block for dedent */ #ifdef __cplusplus Index: parsetok.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/parsetok.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** parsetok.h 2000/07/08 23:37:28 2.13 --- parsetok.h 2000/07/11 17:52:59 2.14 *************** *** 23,26 **** --- 23,28 ---- int offset; char *text; + int token; + int expected; } perrdetail; From python-dev@python.org Tue Jul 11 18:53:03 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 10:53:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser parser.c,2.14,2.15 parser.h,2.12,2.13 parsetok.c,2.21,2.22 tokenizer.c,2.45,2.46 Message-ID: <200007111753.KAA07954@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv7915/Parser Modified Files: parser.c parser.h parsetok.c tokenizer.c Log Message: Create two new exceptions: IndentationError and TabError. These are used for indentation related errors. This patch includes Ping's improvements for indentation-related error messages. Closes SourceForge patches #100734 and #100856. Index: parser.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parser.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** parser.c 2000/07/09 03:09:56 2.14 --- parser.c 2000/07/11 17:52:59 2.15 *************** *** 206,214 **** int ! PyParser_AddToken(ps, type, str, lineno) register parser_state *ps; register int type; char *str; int lineno; { register int ilabel; --- 206,215 ---- int ! PyParser_AddToken(ps, type, str, lineno, expected_ret) register parser_state *ps; register int type; char *str; int lineno; + int *expected_ret; { register int ilabel; *************** *** 286,289 **** --- 287,299 ---- /* Stuck, report syntax error */ D(printf(" Error.\n")); + if (expected_ret) { + if (s->s_lower == s->s_upper - 1) { + /* Only one possible expected token */ + *expected_ret = ps->p_grammar-> + g_ll.ll_label[s->s_lower].lb_type; + } + else + *expected_ret = -1; + } return E_SYNTAX; } Index: parser.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parser.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** parser.h 2000/07/09 03:09:56 2.12 --- parser.h 2000/07/11 17:52:59 2.13 *************** *** 39,43 **** parser_state *PyParser_New(grammar *g, int start); void PyParser_Delete(parser_state *ps); ! int PyParser_AddToken(parser_state *ps, int type, char *str, int lineno); void PyGrammar_AddAccelerators(grammar *g); --- 39,44 ---- parser_state *PyParser_New(grammar *g, int start); void PyParser_Delete(parser_state *ps); ! int PyParser_AddToken(parser_state *ps, int type, char *str, int lineno, ! int *expected_ret); void PyGrammar_AddAccelerators(grammar *g); Index: parsetok.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parsetok.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** parsetok.c 2000/07/09 03:09:56 2.21 --- parsetok.c 2000/07/11 17:52:59 2.22 *************** *** 140,145 **** str[len] = '\0'; if ((err_ret->error = ! PyParser_AddToken(ps, (int)type, str, ! tok->lineno)) != E_OK) { if (err_ret->error != E_DONE) PyMem_DEL(str); --- 140,145 ---- str[len] = '\0'; if ((err_ret->error = ! PyParser_AddToken(ps, (int)type, str, tok->lineno, ! &(err_ret->expected))) != E_OK) { if (err_ret->error != E_DONE) PyMem_DEL(str); Index: tokenizer.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/tokenizer.c,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** tokenizer.c 2000/07/09 03:09:56 2.45 --- tokenizer.c 2000/07/11 17:52:59 2.46 *************** *** 413,423 **** { if (tok->alterror) { ! tok->done = E_INDENT; tok->cur = tok->inp; return 1; } if (tok->altwarning) { ! PySys_WriteStderr("%s: inconsistent tab/space usage\n", ! tok->filename); tok->altwarning = 0; } --- 413,423 ---- { if (tok->alterror) { ! tok->done = E_TABSPACE; tok->cur = tok->inp; return 1; } if (tok->altwarning) { ! PySys_WriteStderr("%s: inconsistent use of tabs and spaces " ! "in indentation\n", tok->filename); tok->altwarning = 0; } *************** *** 485,491 **** /* Indent -- always one */ if (tok->indent+1 >= MAXINDENT) { ! PySys_WriteStderr( ! "excessive indent\n"); ! tok->done = E_TOKEN; tok->cur = tok->inp; return ERRORTOKEN; --- 485,489 ---- /* Indent -- always one */ if (tok->indent+1 >= MAXINDENT) { ! tok->done = E_TOODEEP; tok->cur = tok->inp; return ERRORTOKEN; *************** *** 507,513 **** } if (col != tok->indstack[tok->indent]) { ! PySys_WriteStderr( ! "inconsistent dedent\n"); ! tok->done = E_TOKEN; tok->cur = tok->inp; return ERRORTOKEN; --- 505,509 ---- } if (col != tok->indstack[tok->indent]) { ! tok->done = E_DEDENT; tok->cur = tok->inp; return ERRORTOKEN; From python-dev@python.org Tue Jul 11 18:53:03 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 10:53:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python exceptions.c,1.6,1.7 pythonrun.c,2.101,2.102 Message-ID: <200007111753.KAA07950@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv7915/Python Modified Files: exceptions.c pythonrun.c Log Message: Create two new exceptions: IndentationError and TabError. These are used for indentation related errors. This patch includes Ping's improvements for indentation-related error messages. Closes SourceForge patches #100734 and #100856. Index: exceptions.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** exceptions.c 2000/07/09 22:27:10 1.6 --- exceptions.c 2000/07/11 17:52:59 1.7 *************** *** 69,72 **** --- 69,77 ---- +-- AttributeError\n\ +-- SyntaxError\n\ + | |\n\ + | +-- IndentationError\n\ + | |\n\ + | +-- TabError\n\ + |\n\ +-- TypeError\n\ +-- AssertionError\n\ *************** *** 784,787 **** --- 789,798 ---- MemoryError__doc__[] = "Out of memory."; + static char + IndentationError__doc__[] = "Improper indentation."; + + static char + TabError__doc__[] = "Improper mixture of spaces and tabs."; + *************** *** 818,821 **** --- 829,834 ---- PyObject *PyExc_NotImplementedError; PyObject *PyExc_SyntaxError; + PyObject *PyExc_IndentationError; + PyObject *PyExc_TabError; PyObject *PyExc_SystemError; PyObject *PyExc_SystemExit; *************** *** 879,882 **** --- 892,899 ---- {"SyntaxError", &PyExc_SyntaxError, 0, SyntaxError__doc__, SyntaxError_methods, SyntaxError__classinit__}, + {"IndentationError", &PyExc_IndentationError, &PyExc_SyntaxError, + IndentationError__doc__}, + {"TabError", &PyExc_TabError, &PyExc_IndentationError, + TabError__doc__}, {"AssertionError", &PyExc_AssertionError, 0, AssertionError__doc__}, {"LookupError", &PyExc_LookupError, 0, LookupError__doc__}, Index: pythonrun.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v retrieving revision 2.101 retrieving revision 2.102 diff -C2 -r2.101 -r2.102 *** pythonrun.c 2000/07/09 03:09:56 2.101 --- pythonrun.c 2000/07/11 17:53:00 2.102 *************** *** 15,18 **** --- 15,19 ---- #include "grammar.h" #include "node.h" + #include "token.h" #include "parsetok.h" #include "errcode.h" *************** *** 984,989 **** perrdetail *err; { ! PyObject *v, *w; char *msg = NULL; v = Py_BuildValue("(ziiz)", err->filename, err->lineno, err->offset, err->text); --- 985,991 ---- perrdetail *err; { ! PyObject *v, *w, *errtype; char *msg = NULL; + errtype = PyExc_SyntaxError; v = Py_BuildValue("(ziiz)", err->filename, err->lineno, err->offset, err->text); *************** *** 994,998 **** switch (err->error) { case E_SYNTAX: ! msg = "invalid syntax"; break; case E_TOKEN: --- 996,1010 ---- switch (err->error) { case E_SYNTAX: ! errtype = PyExc_IndentationError; ! if (err->expected == INDENT) ! msg = "expected an indented block"; ! else if (err->token == INDENT) ! msg = "unexpected indent"; ! else if (err->token == DEDENT) ! msg = "unexpected unindent"; ! else { ! errtype = PyExc_SyntaxError; ! msg = "invalid syntax"; ! } break; case E_TOKEN: *************** *** 1010,1014 **** msg = "unexpected EOF while parsing"; break; ! case E_INDENT: msg = "inconsistent use of tabs and spaces in indentation"; break; --- 1022,1027 ---- msg = "unexpected EOF while parsing"; break; ! case E_TABSPACE: ! errtype = PyExc_TabError; msg = "inconsistent use of tabs and spaces in indentation"; break; *************** *** 1016,1019 **** --- 1029,1040 ---- msg = "expression too long"; break; + case E_DEDENT: + errtype = PyExc_IndentationError; + msg = "unindent does not match any outer indentation level"; + break; + case E_TOODEEP: + errtype = PyExc_IndentationError; + msg = "too many levels of indentation"; + break; default: fprintf(stderr, "error=%d\n", err->error); *************** *** 1023,1027 **** w = Py_BuildValue("(sO)", msg, v); Py_XDECREF(v); ! PyErr_SetObject(PyExc_SyntaxError, w); Py_XDECREF(w); } --- 1044,1048 ---- w = Py_BuildValue("(sO)", msg, v); Py_XDECREF(v); ! PyErr_SetObject(errtype, w); Py_XDECREF(w); } From python-dev@python.org Tue Jul 11 18:53:03 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 10:53:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_exceptions.py,1.7,1.8 Message-ID: <200007111753.KAA07952@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv7915/Lib/test Modified Files: test_exceptions.py Log Message: Create two new exceptions: IndentationError and TabError. These are used for indentation related errors. This patch includes Ping's improvements for indentation-related error messages. Closes SourceForge patches #100734 and #100856. Index: test_exceptions.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_exceptions.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** test_exceptions.py 2000/06/20 18:52:57 1.7 --- test_exceptions.py 2000/07/11 17:52:59 1.8 *************** *** 87,90 **** --- 87,98 ---- except SyntaxError: pass + r(IndentationError) + + r(TabError) + # can only be tested under -tt, and is the only test for -tt + #try: compile("try:\n\t1/0\n \t1/0\nfinally:\n pass\n", '', 'exec') + #except TabError: pass + #else: raise TestFailed + r(SystemError) print '(hard to reproduce)' From python-dev@python.org Tue Jul 11 20:43:50 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 12:43:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/ref ref5.tex,1.29,1.30 Message-ID: <200007111943.MAA31126@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ref In directory slayer.i.sourceforge.net:/tmp/cvs-serv31113/ref Modified Files: ref5.tex Log Message: Moshe Zadka : Update the "in" / "not in" description to accomodate the current use of the __contains__() discipline. This patch also incorporates suggestions from Marc-Andre Lemburg , minor markup revisions from Fred Drake, and some rewording of the first affected paragraph (also from Fred). Closes SourceForge patch #100831. Index: ref5.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref5.tex,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** ref5.tex 2000/04/25 21:09:10 1.29 --- ref5.tex 2000/07/11 19:43:47 1.30 *************** *** 741,752 **** \end{itemize} ! The operators \keyword{in} and \keyword{not in} test for sequence ! membership: if \var{y} is a sequence, \code{\var{x} in \var{y}} is ! true if and only if there exists an index \var{i} such that ! \code{\var{x} = \var{y}[\var{i}]}. ! \code{\var{x} not in \var{y}} yields the inverse truth value. The ! exception \exception{TypeError} is raised when \var{y} is not a sequence, ! or when \var{y} is a string and \var{x} is not a string of length ! one.\footnote{The latter restriction is sometimes a nuisance.} \opindex{in} \opindex{not in} --- 741,773 ---- \end{itemize} ! The operators \keyword{in} and \keyword{not in} test for set ! membership: every type can define membership in whatever way is ! appropriate. Traditionally, this interface has been tightly bound ! the sequence interface, which is related in that presence in a sequence ! can be usefully interpreted as membership in a set. ! ! For the list, tuple types, \code{\var{x} in \var{y}} is true if and only ! if there exists such an index \var{i} such that ! \code{var{x} == \var{y}[\var{i}]} is true. ! ! For the Unicode and string types, \code{\var{x} in \var{y}} is true if and only ! if there exists such an index \var{i} such that ! \code{var{x} == \var{y}[\var{i}]} is true. If \code{\var{x}} is not ! a string of length \code{1} or a unicode object of length \code{1}, ! a \exception{TypeError} exception is raised. ! ! For user-defined classes which define the \method{__contains__()} method, ! \code{\var{x} in \var{y}} is true if and only if ! \code{\var{y}.__contains__(\var{x})} is true. ! ! For user-defined classes which do not define \method{__contains__()} and ! do define \var{__getitem__}, \code{\var{x} in \var{y}} is true if and only ! if there is a non-negative integer index \var{i} such that ! \code{\var{x} == \var{y}[\var{i}]}, and all lower integer indices ! do not raise \exception{IndexError} exception. (If any other exception ! is raised, it is as if \keyword{in} raised that exception). ! ! The operator \keyword{not in} is defined to have the inverse true value ! of \keyword{in}. \opindex{in} \opindex{not in} From python-dev@python.org Tue Jul 11 20:49:25 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 12:49:25 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include errcode.h,2.12,2.13 Message-ID: <200007111949.MAA31487@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv31477/Include Modified Files: errcode.h Log Message: Fix incomplete merge of Ping's SyntaxError enhancement patch (my fault). Comment change only. Index: errcode.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/errcode.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** errcode.h 2000/07/11 17:52:59 2.12 --- errcode.h 2000/07/11 19:49:15 2.13 *************** *** 31,35 **** #define E_DONE 16 /* Parsing complete */ #define E_ERROR 17 /* Execution error */ ! #define E_TABSPACE 18 /* Invalid indentation detected */ #define E_OVERFLOW 19 /* Node had too many children */ #define E_TOODEEP 20 /* Too many indentation levels */ --- 31,35 ---- #define E_DONE 16 /* Parsing complete */ #define E_ERROR 17 /* Execution error */ ! #define E_TABSPACE 18 /* Inconsistent mixing of tabs and spaces */ #define E_OVERFLOW 19 /* Node had too many children */ #define E_TOODEEP 20 /* Too many indentation levels */ From python-dev@python.org Tue Jul 11 21:30:08 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 11 Jul 2000 13:30:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules linuxaudiodev.c,2.3,2.4 Message-ID: <200007112030.NAA08476@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8436/Modules Modified Files: linuxaudiodev.c Log Message: satisfy the -Wall: remove two unused local variables and unused ins function Index: linuxaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/linuxaudiodev.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** linuxaudiodev.c 2000/07/08 06:05:58 2.3 --- linuxaudiodev.c 2000/07/11 20:30:05 2.4 *************** *** 65,70 **** char *mode; char *basedev; - char *ctldev; - char *opendev; /* Check arg for r/w/rw */ --- 65,68 ---- *************** *** 385,399 **** { 0, 0 }, }; - - static int - ins(PyObject *d, char *symbol, long value) - { - PyObject* v = PyInt_FromLong(value); - if (!v || PyDict_SetItemString(d, symbol, v) < 0) - return -1; /* triggers fatal error */ - - Py_DECREF(v); - return 0; - } void --- 383,386 ---- From python-dev@python.org Tue Jul 11 21:55:40 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 11 Jul 2000 13:55:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test string_tests.py,1.2,1.3 Message-ID: <200007112055.NAA10428@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv10345/Lib/test Modified Files: string_tests.py Log Message: small updates to string_join: use PyString_AS_STRING macro on local string object when resizing string, make sure resized string will always be big enough split string containing error message across two lines add test to string_tests that causes resizing Index: string_tests.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/string_tests.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** string_tests.py 2000/07/11 03:31:55 1.2 --- string_tests.py 2000/07/11 20:55:38 1.3 *************** *** 124,127 **** --- 124,130 ---- test('join', '.', u'a.b.c', ['a', 'b', u'c']) test('join', '.', TypeError, ['a', u'b', 3]) + for i in [5, 25, 125]: + test('join', '-', ((('a' * i) + '-') * i)[:-1], + ['a' * i] * i) test('join', ' ', TypeError, BadSeq1()) From python-dev@python.org Tue Jul 11 21:55:40 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 11 Jul 2000 13:55:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.79,2.80 Message-ID: <200007112055.NAA10427@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv10345/Objects Modified Files: stringobject.c Log Message: small updates to string_join: use PyString_AS_STRING macro on local string object when resizing string, make sure resized string will always be big enough split string containing error message across two lines add test to string_tests that causes resizing Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.79 retrieving revision 2.80 diff -C2 -r2.79 -r2.80 *** stringobject.c 2000/07/11 04:58:12 2.79 --- stringobject.c 2000/07/11 20:55:38 2.80 *************** *** 744,748 **** int seqlen = 0; int sz = 100; ! int i, slen; PyObject *orig, *seq, *item; --- 744,748 ---- int seqlen = 0; int sz = 100; ! int i, slen, sz_incr; PyObject *orig, *seq, *item; *************** *** 771,775 **** goto finally; ! p = PyString_AsString(res); for (i = 0; i < seqlen; i++) { --- 771,775 ---- goto finally; ! p = PyString_AS_STRING(res); for (i = 0; i < seqlen; i++) { *************** *** 782,786 **** } PyErr_Format(PyExc_TypeError, ! "sequence item %i: expected string, %.80s found", i, item->ob_type->tp_name); goto finally; --- 782,787 ---- } PyErr_Format(PyExc_TypeError, ! "sequence item %i: expected string," ! " %.80s found", i, item->ob_type->tp_name); goto finally; *************** *** 788,796 **** slen = PyString_GET_SIZE(item); while (reslen + slen + seplen >= sz) { ! if (_PyString_Resize(&res, sz*2)) { goto finally; } ! sz *= 2; ! p = PyString_AsString(res) + reslen; } if (i > 0) { --- 789,799 ---- slen = PyString_GET_SIZE(item); while (reslen + slen + seplen >= sz) { ! /* at least double the size of the string */ ! sz_incr = slen + seplen > sz ? slen + seplen : sz; ! if (_PyString_Resize(&res, sz + sz_incr)) { goto finally; } ! sz += sz_incr; ! p = PyString_AS_STRING(res) + reslen; } if (i > 0) { From python-dev@python.org Tue Jul 11 22:35:05 2000 From: python-dev@python.org (Jack Jansen) Date: Tue, 11 Jul 2000 14:35:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules selectmodule.c,2.36,2.37 Message-ID: <200007112135.OAA20326@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv20295 Modified Files: selectmodule.c Log Message: One more include of limits.h (possibly to be moved elsewhere when there is consensus where it should go). Index: selectmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v retrieving revision 2.36 retrieving revision 2.37 diff -C2 -r2.36 -r2.37 *** selectmodule.c 2000/07/10 12:29:26 2.36 --- selectmodule.c 2000/07/11 21:35:02 2.37 *************** *** 22,25 **** --- 22,28 ---- #include #endif + #ifdef HAVE_LIMITS_H + #include + #endif #ifdef __sgi From python-dev@python.org Tue Jul 11 22:47:22 2000 From: python-dev@python.org (Jack Jansen) Date: Tue, 11 Jul 2000 14:47:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects object.c,2.85,2.86 Message-ID: <200007112147.OAA20955@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv20913 Modified Files: object.c Log Message: Include macglue.h on the macintosh, so function prototypes are in scope. Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.85 retrieving revision 2.86 diff -C2 -r2.85 -r2.86 *** object.c 2000/07/09 15:48:49 2.85 --- object.c 2000/07/11 21:47:20 2.86 *************** *** 13,16 **** --- 13,20 ---- #include "Python.h" + #ifdef macintosh + #include "macglue.h" + #endif + #include "mymath.h" From python-dev@python.org Tue Jul 11 22:59:18 2000 From: python-dev@python.org (Jack Jansen) Date: Tue, 11 Jul 2000 14:59:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.183,2.184 import.c,2.140,2.141 pythonrun.c,2.102,2.103 Message-ID: <200007112159.OAA22061@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv21949 Modified Files: ceval.c import.c pythonrun.c Log Message: Include macglue.h for some function prototypes, and renamed a few mac-specific functions to have a PyMac_ name. Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.183 retrieving revision 2.184 diff -C2 -r2.183 -r2.184 *** ceval.c 2000/07/09 03:09:56 2.183 --- ceval.c 2000/07/11 21:59:16 2.184 *************** *** 24,27 **** --- 24,31 ---- #include "opcode.h" + #ifdef macintosh + #include "macglue.h" + #endif + #include Index: import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.140 retrieving revision 2.141 diff -C2 -r2.140 -r2.141 *** import.c 2000/07/09 03:09:56 2.140 --- import.c 2000/07/11 21:59:16 2.141 *************** *** 699,703 **** PySys_WriteStderr("# wrote %s\n", cpathname); #ifdef macintosh ! setfiletype(cpathname, 'Pyth', 'PYC '); #endif } --- 699,703 ---- PySys_WriteStderr("# wrote %s\n", cpathname); #ifdef macintosh ! PyMac_setfiletype(cpathname, 'Pyth', 'PYC '); #endif } Index: pythonrun.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v retrieving revision 2.102 retrieving revision 2.103 diff -C2 -r2.102 -r2.103 *** pythonrun.c 2000/07/11 17:53:00 2.102 --- pythonrun.c 2000/07/11 21:59:16 2.103 *************** *** 35,38 **** --- 35,41 ---- #endif + #ifdef macintosh + #include "macglue.h" + #endif extern char *Py_GetPath(); *************** *** 562,567 **** #ifdef macintosh /* On a mac, we also assume a pyc file for types 'PYC ' and 'APPL' */ ! || getfiletype(filename) == 'PYC ' ! || getfiletype(filename) == 'APPL' #endif /* macintosh */ ) { --- 565,570 ---- #ifdef macintosh /* On a mac, we also assume a pyc file for types 'PYC ' and 'APPL' */ ! || PyMac_getfiletype(filename) == 'PYC ' ! || PyMac_getfiletype(filename) == 'APPL' #endif /* macintosh */ ) { From python-dev@python.org Wed Jul 12 00:00:17 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Tue, 11 Jul 2000 16:00:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.116,1.117 Message-ID: <200007112300.QAA00429@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv32713 Modified Files: socketmodule.c Log Message: Errare humanum est. Changed parameter in getsockaddrlen from unsigned to socklen_t. Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.116 retrieving revision 1.117 diff -C2 -r1.116 -r1.117 *** socketmodule.c 2000/07/11 17:40:30 1.116 --- socketmodule.c 2000/07/11 23:00:12 1.117 *************** *** 576,580 **** static int ! getsockaddrlen(PySocketSockObject *s, unsigned int *len_ret) { switch (s->sock_family) { --- 576,580 ---- static int ! getsockaddrlen(PySocketSockObject *s, socklen_t *len_ret) { switch (s->sock_family) { From python-dev@python.org Wed Jul 12 01:20:48 2000 From: python-dev@python.org (Skip Montanaro) Date: Tue, 11 Jul 2000 17:20:48 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_posixpath,NONE,1.1 Message-ID: <200007120020.RAA17798@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv17791 Added Files: test_posixpath Log Message: new test for posixpath module --- NEW FILE --- test_posixpath No errors. Thank your lucky stars. From python-dev@python.org Wed Jul 12 01:20:21 2000 From: python-dev@python.org (Skip Montanaro) Date: Tue, 11 Jul 2000 17:20:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_posixpath.py,NONE,1.1 Message-ID: <200007120020.RAA17773@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv17757 Added Files: test_posixpath.py Log Message: new test file for posixpath module --- NEW FILE --- import posixpath import string errors = 0 def tester(fn, wantResult): gotResult = eval(fn) if wantResult != gotResult: print "error!" print "evaluated: " + str(fn) print "should be: " + str(wantResult) print " returned: " + str(gotResult) print "" global errors errors = errors + 1 tester('posixpath.splitdrive("/foo/bar")', ('', '/foo/bar')) tester('posixpath.split("/foo/bar")', ('/foo', 'bar')) tester('posixpath.split("/")', ('/', '')) tester('posixpath.split("foo")', ('', 'foo')) tester('posixpath.splitext("foo.ext")', ('foo', '.ext')) tester('posixpath.splitext("/foo/foo.ext")', ('/foo/foo', '.ext')) tester('posixpath.isabs("/")', 1) tester('posixpath.isabs("/foo")', 1) tester('posixpath.isabs("/foo/bar")', 1) tester('posixpath.isabs("foo/bar")', 0) tester('posixpath.commonprefix(["/home/swenson/spam", "/home/swen/spam"])', "/home") tester('posixpath.commonprefix(["/home/swen/spam", "/home/swen/eggs"])', "/home/swen") tester('posixpath.commonprefix(["/home/swen/spam", "/home/swen/spam"])', "/home/swen/spam") if errors: print str(errors) + " errors." else: print "No errors. Thank your lucky stars." From python-dev@python.org Wed Jul 12 01:49:20 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Tue, 11 Jul 2000 17:49:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules regexmodule.c,1.37,1.38 Message-ID: <200007120049.RAA19213@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv19203 Modified Files: regexmodule.c Log Message: Fix mixed mallocs: re->re_patbuf.buffer is allocated with std malloc(). Index: regexmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/regexmodule.c,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -r1.37 -r1.38 *** regexmodule.c 2000/07/10 13:05:28 1.37 --- regexmodule.c 2000/07/12 00:49:17 1.38 *************** *** 44,48 **** { if (re->re_patbuf.buffer) ! PyMem_DEL(re->re_patbuf.buffer); Py_XDECREF(re->re_translate); Py_XDECREF(re->re_lastok); --- 44,48 ---- { if (re->re_patbuf.buffer) ! free(re->re_patbuf.buffer); Py_XDECREF(re->re_translate); Py_XDECREF(re->re_lastok); From python-dev@python.org Wed Jul 12 01:53:44 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 11 Jul 2000 17:53:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules pyexpat.c,2.8,2.9 Message-ID: <200007120053.RAA19535@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv19519 Modified Files: pyexpat.c Log Message: Patch #100854 from jhylton: eliminate compiler warnings in pyexpat: The first two warnings seem harmless enough, but the last one looks like a potential bug: an uninitialized int is returned on error. (I also ended up reformatting some of the code, because it was hard to read.) Index: pyexpat.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pyexpat.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** pyexpat.c 2000/07/04 23:51:31 2.8 --- pyexpat.c 2000/07/12 00:53:41 2.9 *************** *** 71,102 **** /* Convert an array of attributes and their values into a Python dict */ ! static PyObject *conv_atts_using_string( XML_Char **atts){ ! PyObject *attrs_obj=NULL; ! XML_Char **attrs_p, **attrs_k; int attrs_len; PyObject *rv; ! if( (attrs_obj = PyDict_New()) == NULL ) goto finally; ! for(attrs_len=0, attrs_p = atts; ! *attrs_p; ! attrs_p++, attrs_len++) { ! if (attrs_len%2) { ! rv=PyString_FromString(*attrs_p); if (! rv) { Py_DECREF(attrs_obj); ! attrs_obj=NULL; goto finally; } ! if (PyDict_SetItemString( ! attrs_obj, ! (char*)*attrs_k, rv) < 0){ Py_DECREF(attrs_obj); ! attrs_obj=NULL; goto finally; } Py_DECREF(rv); } ! else attrs_k=attrs_p; } finally: --- 71,103 ---- /* Convert an array of attributes and their values into a Python dict */ ! static PyObject *conv_atts_using_string(XML_Char **atts) ! { ! PyObject *attrs_obj = NULL; ! XML_Char **attrs_p, **attrs_k = NULL; int attrs_len; PyObject *rv; ! if ((attrs_obj = PyDict_New()) == NULL) goto finally; ! for (attrs_len = 0, attrs_p = atts; ! *attrs_p; ! attrs_p++, attrs_len++) { ! if (attrs_len % 2) { ! rv = PyString_FromString(*attrs_p); if (! rv) { Py_DECREF(attrs_obj); ! attrs_obj = NULL; goto finally; } ! if (PyDict_SetItemString(attrs_obj, ! (char*)*attrs_k, rv) < 0) { Py_DECREF(attrs_obj); ! attrs_obj = NULL; goto finally; } Py_DECREF(rv); } ! else ! attrs_k = attrs_p; } finally: *************** *** 107,111 **** static PyObject *conv_atts_using_unicode( XML_Char **atts){ PyObject *attrs_obj=NULL; ! XML_Char **attrs_p, **attrs_k; int attrs_len; --- 108,112 ---- static PyObject *conv_atts_using_unicode( XML_Char **atts){ PyObject *attrs_obj=NULL; ! XML_Char **attrs_p, **attrs_k = NULL; int attrs_len; *************** *** 446,454 **** PyObject *bytes=NULL; PyObject *str=NULL; ! int len; UNLESS(bytes = PyInt_FromLong(buf_size)) { if (!PyErr_Occurred()) ! PyErr_SetNone(PyExc_EOFError); goto finally; } --- 447,455 ---- PyObject *bytes=NULL; PyObject *str=NULL; ! int len = 0; UNLESS(bytes = PyInt_FromLong(buf_size)) { if (!PyErr_Occurred()) ! PyErr_SetNone(PyExc_EOFError); goto finally; } *************** *** 468,474 **** goto finally; ! len=PyString_GET_SIZE( str ); ! strncpy( buf, PyString_AsString(str), len ); ! Py_XDECREF( str ); finally: return len; --- 469,475 ---- goto finally; ! len = PyString_GET_SIZE(str); ! strncpy(buf, PyString_AsString(str), len); ! Py_XDECREF(str); finally: return len; From python-dev@python.org Wed Jul 12 02:27:21 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 11 Jul 2000 18:27:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules pyexpat.c,2.9,2.10 Message-ID: <200007120127.SAA27857@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv27849 Modified Files: pyexpat.c Log Message: Fix bugs in readinst(): * There was no error reported if the .read() method returns a non-string * If read() returned too much data, the buffer would be overflowed causing a core dump * Used strncpy, not memcpy, which seems incorrect if there are embedded \0s. * The args and bytes objects were leaked Index: pyexpat.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pyexpat.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** pyexpat.c 2000/07/12 00:53:41 2.9 --- pyexpat.c 2000/07/12 01:27:18 2.10 *************** *** 447,451 **** PyObject *bytes=NULL; PyObject *str=NULL; ! int len = 0; UNLESS(bytes = PyInt_FromLong(buf_size)) { --- 447,451 ---- PyObject *bytes=NULL; PyObject *str=NULL; ! int len = -1; UNLESS(bytes = PyInt_FromLong(buf_size)) { *************** *** 459,463 **** goto finally; - Py_INCREF(bytes); if (PyTuple_SetItem(arg, 0, bytes) < 0) goto finally; --- 459,462 ---- *************** *** 466,476 **** goto finally; ! UNLESS(PyString_Check( str )) goto finally; ! len = PyString_GET_SIZE(str); ! strncpy(buf, PyString_AsString(str), len); Py_XDECREF(str); finally: return len; } --- 465,489 ---- goto finally; ! /* XXX what to do if it returns a Unicode string? */ ! UNLESS(PyString_Check( str )) { ! PyErr_Format(PyExc_TypeError, ! "read() did not return a string object (type=%.400s)", ! str->ob_type->tp_name); goto finally; ! } ! len = PyString_GET_SIZE(str); ! if (len > buf_size) { ! PyErr_Format(PyExc_ValueError, ! "read() returned too much data: " ! "%i bytes requested, %i returned", ! buf_size, len); ! Py_DECREF(str); ! goto finally; ! } ! memcpy(buf, PyString_AsString(str), len); Py_XDECREF(str); finally: + Py_XDECREF(arg); return len; } *************** *** 513,524 **** if( fp ){ bytes_read=fread( buf, sizeof( char ), BUF_SIZE, fp); ! }else{ bytes_read=readinst( buf, BUF_SIZE, readmethod ); } - if (bytes_read < 0) { - PyErr_SetFromErrno(PyExc_IOError); - return NULL; - } rv=XML_ParseBuffer(self->itself, bytes_read, bytes_read == 0); if( PyErr_Occurred() ){ --- 526,539 ---- if( fp ){ bytes_read=fread( buf, sizeof( char ), BUF_SIZE, fp); ! if (bytes_read < 0) { ! PyErr_SetFromErrno(PyExc_IOError); ! return NULL; ! } ! } else { bytes_read=readinst( buf, BUF_SIZE, readmethod ); + if (bytes_read < 0) + return NULL; } rv=XML_ParseBuffer(self->itself, bytes_read, bytes_read == 0); if( PyErr_Occurred() ){ From python-dev@python.org Wed Jul 12 03:56:17 2000 From: python-dev@python.org (Eric S. Raymond) Date: Tue, 11 Jul 2000 19:56:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcmd.tex,1.4,1.5 Message-ID: <200007120256.TAA06844@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv6745 Modified Files: libcmd.tex Log Message: Resynchronize the TeX docs with (a) the module docstring, and (b) my recent fix to the code to make it behave like the module docstring. Index: libcmd.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcmd.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** libcmd.tex 1998/08/10 19:41:40 1.4 --- libcmd.tex 2000/07/12 02:56:15 1.5 *************** *** 44,50 **** An interpreter instance will recognize a command name \samp{foo} if and only if it has a method \method{do_foo()}. As a special case, ! a line containing only the character \character{?} is dispatched to the method \method{do_help()}. As another special case, a line ! containing only the character \character{!} is dispatched to the method \method{do_shell} (if such a method is defined). --- 44,50 ---- An interpreter instance will recognize a command name \samp{foo} if and only if it has a method \method{do_foo()}. As a special case, ! a line beginning with the character \character{?} is dispatched to the method \method{do_help()}. As another special case, a line ! beginning with the character \character{!} is dispatched to the method \method{do_shell} (if such a method is defined). From python-dev@python.org Wed Jul 12 03:58:30 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 11 Jul 2000 19:58:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.80,2.81 Message-ID: <200007120258.TAA06976@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv6953 Modified Files: stringobject.c Log Message: Fix typo in error message Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.80 retrieving revision 2.81 diff -C2 -r2.80 -r2.81 *** stringobject.c 2000/07/11 20:55:38 2.80 --- stringobject.c 2000/07/12 02:58:28 2.81 *************** *** 177,181 **** if (!PyString_Check(str)) { PyErr_Format(PyExc_TypeError, ! "decoder did not return an string object (type=%.400s)", str->ob_type->tp_name); Py_DECREF(str); --- 177,181 ---- if (!PyString_Check(str)) { PyErr_Format(PyExc_TypeError, ! "decoder did not return a string object (type=%.400s)", str->ob_type->tp_name); Py_DECREF(str); From python-dev@python.org Wed Jul 12 04:02:19 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Tue, 11 Jul 2000 20:02:19 -0700 Subject: [Python-checkins] CVS: python/dist/src configure.in,1.134,1.135 Message-ID: <200007120302.UAA13467@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv12123 Modified Files: configure.in Log Message: Checks whether right shift extends the sign bit. Patch by Thomas Wouters with small changes of mine (in main(), use return instead of exit). Closes patch #100832 (but I can't assign it to myself, nor close it -- sorry) Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.134 retrieving revision 1.135 diff -C2 -r1.134 -r1.135 *** configure.in 2000/07/09 14:39:29 1.134 --- configure.in 2000/07/12 03:02:16 1.135 *************** *** 1137,1140 **** --- 1137,1153 ---- AC_C_BIGENDIAN + # Check whether right shifting a negative integer extends the sign bit + # or fills with zeros (like the Cray J90, according to Tim Peters). + AC_MSG_CHECKING(whether right shift extends the sign bit) + AC_TRY_RUN([ + int main() + { + return ((-1)>>3 == -1) ? 1 : 0; + } + ], + [AC_DEFINE(SIGNED_RIGHT_SHIFT_ZERO_FILLS) + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)]) + # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! # Add sys/socket.h to confdefs.h From python-dev@python.org Wed Jul 12 04:02:45 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Tue, 11 Jul 2000 20:02:45 -0700 Subject: [Python-checkins] CVS: python/dist/src configure,1.125,1.126 Message-ID: <200007120302.UAA13892@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv13877 Modified Files: configure Log Message: Checks whether right shift extends the sign bit. Patch by Thomas Wouters with small changes of mine (in main(), use return instead of exit). Closes patch #100832 Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.125 retrieving revision 1.126 diff -C2 -r1.125 -r1.126 *** configure 2000/07/09 14:39:28 1.125 --- configure 2000/07/12 03:02:43 1.126 *************** *** 1,8 **** #! /bin/sh ! # From configure.in Revision: 1.133 # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.14.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # --- 1,8 ---- #! /bin/sh [...3989 lines suppressed...] ! echo "$CONFIG_STATUS generated by autoconf version 2.14.1" exit 0 ;; -help | --help | --hel | --he | --h) --- 5767,5771 ---- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) *************** *** 6058,6061 **** chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 --- 6066,6069 ---- chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 From python-dev@python.org Wed Jul 12 04:38:37 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 11 Jul 2000 20:38:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/curses textpad.py,1.3,1.4 Message-ID: <200007120338.UAA15715@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/curses In directory slayer.i.sourceforge.net:/tmp/cvs-serv15696 Modified Files: textpad.py Log Message: Remove extra argument to method call Index: textpad.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/curses/textpad.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** textpad.py 2000/07/11 10:38:24 1.3 --- textpad.py 2000/07/12 03:38:34 1.4 *************** *** 89,93 **** elif ch == ascii.ENQ: # ^e if self.stripspaces: ! self.win.move(y, self.firstblank(y, maxx)) else: self.win.move(y, self.maxx) --- 89,93 ---- elif ch == ascii.ENQ: # ^e if self.stripspaces: ! self.win.move(y, self.firstblank(y)) else: self.win.move(y, self.maxx) From python-dev@python.org Wed Jul 12 05:02:13 2000 From: python-dev@python.org (Tim Peters) Date: Tue, 11 Jul 2000 21:02:13 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python exceptions.c,1.7,1.8 Message-ID: <200007120402.VAA23494@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv21690/python/dist/src/python Modified Files: exceptions.c Log Message: Worm around MSVC6 error on single string literal > 2Kb. Index: exceptions.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** exceptions.c 2000/07/11 17:52:59 1.7 --- exceptions.c 2000/07/12 04:02:10 1.8 *************** *** 21,24 **** --- 21,28 ---- #include "Python.h" + /* Caution: MS Visual C++ 6 errors if a single string literal exceeds + * 2Kb. So the module docstring has been broken roughly in half, using + * compile-time literal concatenation. + */ static char module__doc__[] = *************** *** 42,47 **** inserted into both the exceptions module and the `built-in' module. It is\n\ recommended that user defined class based exceptions be derived from the\n\ ! `Exception' class, although this is currently not enforced.\n\ ! \n\ Exception\n\ |\n\ --- 46,52 ---- inserted into both the exceptions module and the `built-in' module. It is\n\ recommended that user defined class based exceptions be derived from the\n\ ! `Exception' class, although this is currently not enforced.\n" ! /* keep string pieces "small" */ ! "\n\ Exception\n\ |\n\ From python-dev@python.org Wed Jul 12 05:22:55 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 21:22:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile.deps,1.37,1.38 Message-ID: <200007120422.VAA24501@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv24488 Modified Files: Makefile.deps Log Message: Documentation for the gc module. Text from Neil Schemenauer , markup & minor revisions from Fred Drake. Index: Makefile.deps =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile.deps,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -r1.37 -r1.38 *** Makefile.deps 2000/07/07 03:36:11 1.37 --- Makefile.deps 2000/07/12 04:22:53 1.38 *************** *** 49,52 **** --- 49,53 ---- ../lib/libpython.tex \ ../lib/libsys.tex \ + ../lib/libgc.tex \ ../lib/libtypes.tex \ ../lib/libtraceback.tex \ From python-dev@python.org Wed Jul 12 05:22:55 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 21:22:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libgc.tex,NONE,1.1 lib.tex,1.157,1.158 Message-ID: <200007120422.VAA24505@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv24488/lib Modified Files: lib.tex Added Files: libgc.tex Log Message: Documentation for the gc module. Text from Neil Schemenauer , markup & minor revisions from Fred Drake. --- NEW FILE --- \section{\module{gc} --- Garbage Collector interface} \declaremodule{extension}{gc} \moduleauthor{Neil Schemenauer}{nascheme@enme.ucalgary.ca} \sectionauthor{Neil Schemenauer}{nascheme@enme.ucalgary.ca} This module provides an interface to the optional garbage collector. It provides the ability to disable the collector, tune the collection frequency, and set debugging options. It also provides access to unreachable objects that the collector found but cannot free. Since the collector supplements the reference counting already used in Python, you can disable the collector if you are sure your program does not create reference cycles. The collector can be disabled by calling \code{gc.set_threshold(0)}. To debug a leaking program call \code{gc.set_debug(gc.DEBUG_LEAK)}. The \module{gc} module provides the following functions: \begin{funcdesc}{collect}{} Run a full collection. All generations are examined and the number of unreachable objects found is returned. \end{funcdesc} \begin{funcdesc}{set_debug}{flags} Set the garbage collection debugging flags. Debugging information will be written to \code{sys.stderr}. See below for a list of debugging flags which can be combined using bit operations to control debugging. \end{funcdesc} \begin{funcdesc}{get_debug}{} Return the debugging flags currently set. \end{funcdesc} \begin{funcdesc}{set_threshold}{threshold0\optional{, threshold1\optional{, threshold2}}} Set the garbage collection thresholds (the collection frequency). Setting \var{threshold0} to zero disables collection. The GC classifies objects into three generations depending on how many collection sweeps they have survived. New objects are placed in the youngest generation (generation \code{0}). If an object survives a collection it is moved into the next older generation. Since generation \code{2} is the oldest generation, objects in that generation remain there after a collection. In order to decide when to run, the collector keeps track of the number object allocations and deallocations since the last collection. When the number of allocations minus the number of deallocations exceeds \var{threshold0}, collection starts. Initially only generation \code{0} is examined. If generation \code{0} has been examined more than \var{threshold1} times since generation \code{1} has been examined, then generation \code{1} is examined as well. Similarly, \var{threshold2} controls the number of collections of generation \code{1} before collecting generation \code{2}. \end{funcdesc} \begin{funcdesc}{get_threshold}{} Return the current collection thresholds as a tuple of \code{(\var{threshold0}, \var{threshold1}, \var{threshold2})}. \end{funcdesc} The following variable is provided for read-only access: \begin{datadesc}{garbage} A list of objects which the collector found to be unreachable but could not be freed (uncollectable objects). Objects that have \method{__del__()} methods and create part of a reference cycle cause the entire reference cycle to be uncollectable. \end{datadesc} The following constants are provided for use with \function{set_debug()}: \begin{datadesc}{DEBUG_STATS} Print statistics during collection. This information can be useful when tuning the collection frequency. \end{datadesc} \begin{datadesc}{DEBUG_COLLECTABLE} Print information on collectable objects found. \end{datadesc} \begin{datadesc}{DEBUG_UNCOLLECTABLE} Print information of uncollectable objects found (objects which are not reachable but cannot be freed by the collector). These objects will be added to the \code{garbage} list. \end{datadesc} \begin{datadesc}{DEBUG_INSTANCES} When \constant{DEBUG_COLLECTABLE} or \constant{DEBUG_UNCOLLECTABLE} is set, print information about instance objects found. \end{datadesc} \begin{datadesc}{DEBUG_OBJECTS} When \constant{DEBUG_COLLECTABLE} or \constant{DEBUG_UNCOLLECTABLE} is set, print information about objects other than instance objects found. \end{datadesc} \begin{datadesc}{DEBUG_LEAK} The debugging flags necessary for the collector to print information about a leaking program (equal to \code{DEBUG_COLLECTABLE | DEBUG_UNCOLLECTABLE | DEBUG_INSTANCES | DEBUG_OBJECTS}). \end{datadesc} Index: lib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/lib.tex,v retrieving revision 1.157 retrieving revision 1.158 diff -C2 -r1.157 -r1.158 *** lib.tex 2000/07/07 03:36:12 1.157 --- lib.tex 2000/07/12 04:22:53 1.158 *************** *** 74,77 **** --- 74,78 ---- \input{libpython} % Python Services \input{libsys} + \input{libgc} \input{libatexit} \input{libtypes} From python-dev@python.org Wed Jul 12 05:42:26 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 21:42:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules gcmodule.c,2.4,2.5 Message-ID: <200007120442.VAA25434@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv25427/Modules Modified Files: gcmodule.c Log Message: Always use the :funcname part of the format specifier for PyArg_ParseTuple() so we get better error messages. Index: gcmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** gcmodule.c 2000/07/11 14:37:41 2.4 --- gcmodule.c 2000/07/12 04:42:23 2.5 *************** *** 532,536 **** long n; ! if(!PyArg_ParseTuple(args, "")) /* check no args */ return NULL; --- 532,536 ---- long n; ! if (!PyArg_ParseTuple(args, ":collect")) /* check no args */ return NULL; *************** *** 562,566 **** Py_set_debug(PyObject *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, "l", &debug)) return NULL; --- 562,566 ---- Py_set_debug(PyObject *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, "l:get_debug", &debug)) return NULL; *************** *** 578,582 **** Py_get_debug(PyObject *self, PyObject *args) { ! if(!PyArg_ParseTuple(args, "")) /* no args */ return NULL; --- 578,582 ---- Py_get_debug(PyObject *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":get_debug")) /* no args */ return NULL; *************** *** 594,598 **** Py_set_thresh(PyObject *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, "i|ii", &threshold0, &threshold1, &threshold2)) return NULL; --- 594,598 ---- Py_set_thresh(PyObject *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, "i|ii:set_threshold", &threshold0, &threshold1, &threshold2)) return NULL; *************** *** 611,615 **** Py_get_thresh(PyObject *self, PyObject *args) { ! if(!PyArg_ParseTuple(args, "")) /* no args */ return NULL; --- 611,615 ---- Py_get_thresh(PyObject *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":get_threshold")) /* no args */ return NULL; From python-dev@python.org Wed Jul 12 05:49:02 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 11 Jul 2000 21:49:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules pyexpat.c,2.10,2.11 Message-ID: <200007120449.VAA25684@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv25675/Modules Modified Files: pyexpat.c Log Message: Convert coding style to be internally consistent and similar to the rest of the Python C code: space between "if", "for" and "(", no space between "(", ")" and function call parameters, etc. Index: pyexpat.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pyexpat.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** pyexpat.c 2000/07/12 01:27:18 2.10 --- pyexpat.c 2000/07/12 04:49:00 2.11 *************** *** 23,42 **** #define VERSION "1.9" ! enum HandlerTypes{ ! StartElement, ! EndElement, ! ProcessingInstruction, ! CharacterData, ! UnparsedEntityDecl, ! NotationDecl, ! StartNamespaceDecl, [...1422 lines suppressed...] ! pyxml_SetStartCdataSection, ! (xmlhandler)my_StartCdataSectionHandler}, ! {"EndCdataSectionHandler", ! pyxml_SetEndCdataSection, ! (xmlhandler)my_EndCdataSectionHandler}, ! {"DefaultHandler", ! (xmlhandlersetter)XML_SetDefaultHandler, ! (xmlhandler)my_DefaultHandler}, ! {"DefaultHandlerExpand", ! (xmlhandlersetter)XML_SetDefaultHandlerExpand, ! (xmlhandler)my_DefaultHandlerExpandHandler}, ! {"NotStandaloneHandler", ! (xmlhandlersetter)XML_SetNotStandaloneHandler, ! (xmlhandler)my_NotStandaloneHandler}, ! {"ExternalEntityRefHandler", ! (xmlhandlersetter)XML_SetExternalEntityRefHandler, ! (xmlhandler)my_ExternalEntityRefHandler }, ! {NULL, NULL, NULL} /* sentinel */ }; From python-dev@python.org Wed Jul 12 06:04:47 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Tue, 11 Jul 2000 22:04:47 -0700 Subject: [Python-checkins] CVS: python/dist/src configure.in,1.135,1.136 Message-ID: <200007120504.WAA00786@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv774 Modified Files: configure.in Log Message: Second try: checks whether right shift extends the sign bit. Adds caching and reverts back the 'return' to 'exit()' in AC_TRY_RUN as recommended by the Autoconf documentation. Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.135 retrieving revision 1.136 diff -C2 -r1.135 -r1.136 *** configure.in 2000/07/12 03:02:16 1.135 --- configure.in 2000/07/12 05:04:44 1.136 *************** *** 1140,1152 **** # or fills with zeros (like the Cray J90, according to Tim Peters). AC_MSG_CHECKING(whether right shift extends the sign bit) AC_TRY_RUN([ int main() { ! return ((-1)>>3 == -1) ? 1 : 0; } ! ], ! [AC_DEFINE(SIGNED_RIGHT_SHIFT_ZERO_FILLS) ! AC_MSG_RESULT(yes)], ! [AC_MSG_RESULT(no)]) # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! --- 1140,1156 ---- # or fills with zeros (like the Cray J90, according to Tim Peters). AC_MSG_CHECKING(whether right shift extends the sign bit) + AC_CACHE_VAL(ac_cv_rshift_extends_sign, [ AC_TRY_RUN([ int main() { ! exit(((-1)>>3 == -1) ? 0 : 1); } ! ], ac_cv_rshift_extends_sign=yes, ac_cv_rshift_extends_sign=no)]) ! AC_MSG_RESULT($ac_cv_rshift_extends_sign) ! if test "$ac_cv_rshift_extends_sign" = no ! then ! AC_DEFINE(SIGNED_RIGHT_SHIFT_ZERO_FILLS) ! fi ! # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! From python-dev@python.org Wed Jul 12 06:05:09 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Tue, 11 Jul 2000 22:05:09 -0700 Subject: [Python-checkins] CVS: python/dist/src configure,1.126,1.127 Message-ID: <200007120505.WAA00810@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv794 Modified Files: configure Log Message: Second try: checks whether right shift extends the sign bit. Adds caching and reverts back the 'return' to 'exit()' in AC_TRY_RUN as recommended by the Autoconf documentation. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.126 retrieving revision 1.127 diff -C2 -r1.126 -r1.127 *** configure 2000/07/12 03:02:43 1.126 --- configure 2000/07/12 05:05:06 1.127 *************** *** 1,5 **** #! /bin/sh ! # From configure.in Revision: 1.135 # Guess values for system-dependent variables and create Makefiles. --- 1,5 ---- #! /bin/sh ! # From configure.in Revision: 1.136 # Guess values for system-dependent variables and create Makefiles. *************** *** 5605,5637 **** echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 echo "configure:5607: checking whether right shift extends the sign bit" >&5 if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <>3 == -1) ? 1 : 0; } EOF ! if { (eval echo configure:5621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ! cat >> confdefs.h <<\EOF ! #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 ! EOF ! ! echo "$ac_t""yes" 1>&6 else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ! echo "$ac_t""no" 1>&6 fi rm -fr conftest* fi # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! --- 5605,5648 ---- echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 echo "configure:5607: checking whether right shift extends the sign bit" >&5 + if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <>3 == -1) ? 0 : 1); } EOF ! if { (eval echo configure:5625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ! ac_cv_rshift_extends_sign=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ! ac_cv_rshift_extends_sign=no fi rm -fr conftest* fi + fi + + echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6 + if test "$ac_cv_rshift_extends_sign" = no + then + cat >> confdefs.h <<\EOF + #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 + EOF + + fi + # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! *************** *** 5643,5652 **** EOF echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 ! echo "configure:5646: checking for socklen_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 5654,5663 ---- EOF echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 ! echo "configure:5657: checking for socklen_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < From python-dev@python.org Wed Jul 12 06:18:38 2000 From: python-dev@python.org (Barry Warsaw) Date: Tue, 11 Jul 2000 22:18:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules gcmodule.c,2.5,2.6 Message-ID: <200007120518.WAA01620@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv1612 Modified Files: gcmodule.c Log Message: debug_instance(): Use the same %p format directive as with debug_cycle(), and don't cast the pointer to a long. Neither needs the literal `0x' prefix as %p automatically inserts this (on Linux at least). Index: gcmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** gcmodule.c 2000/07/12 04:42:23 2.5 --- gcmodule.c 2000/07/12 05:18:36 2.6 *************** *** 278,283 **** else cname = "?"; ! sprintf(buf, "gc: %s<%.100s instance at %lx>\n", ! msg, cname, (long)inst); PyFile_WriteString(buf, output); } --- 278,282 ---- else cname = "?"; ! sprintf(buf, "gc: %s<%.100s instance at %p>\n", msg, cname, inst); PyFile_WriteString(buf, output); } *************** *** 290,297 **** } else if (debug & DEBUG_OBJECTS) { char buf[200]; ! sprintf(buf, "gc: %s<%.100s 0x%p>\n", ! msg, ! op->ob_type->tp_name, ! op); PyFile_WriteString(buf, output); } --- 289,294 ---- } else if (debug & DEBUG_OBJECTS) { char buf[200]; ! sprintf(buf, "gc: %s<%.100s %p>\n", msg, ! op->ob_type->tp_name, op); PyFile_WriteString(buf, output); } From python-dev@python.org Wed Jul 12 10:55:33 2000 From: python-dev@python.org (Greg Stein) Date: Wed, 12 Jul 2000 02:55:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib shutil.py,1.16,1.17 Message-ID: <200007120955.CAA15322@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv15196 Modified Files: shutil.py Log Message: apply patch #100868 from Moshe Zadka: refactor the copying of file data. new: shutil.copyfileobj(fsrc, fdst) Index: shutil.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/shutil.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** shutil.py 2000/04/07 14:34:50 1.16 --- shutil.py 2000/07/12 09:55:30 1.17 *************** *** 10,13 **** --- 10,22 ---- + def copyfileobj(fsrc, fdst, length=16*1024): + """copy data from file-like object fsrc to file-like object fdst""" + while 1: + buf = fsrc.read(length) + if not buf: + break + fdst.write(buf) + + def copyfile(src, dst): """Copy data from src to dst""" *************** *** 17,25 **** fsrc = open(src, 'rb') fdst = open(dst, 'wb') ! while 1: ! buf = fsrc.read(16*1024) ! if not buf: ! break ! fdst.write(buf) finally: if fdst: --- 26,30 ---- fsrc = open(src, 'rb') fdst = open(dst, 'wb') ! copyfileobj(fsrc, fdst) finally: if fdst: From python-dev@python.org Wed Jul 12 11:43:14 2000 From: python-dev@python.org (Sjoerd Mullender) Date: Wed, 12 Jul 2000 03:43:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules flmodule.c,1.40,1.41 fmmodule.c,1.14,1.15 Message-ID: <200007121043.DAA27255@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv27219 Modified Files: flmodule.c fmmodule.c Log Message: Fixed up some ANSIfications. Index: flmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/flmodule.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -r1.40 -r1.41 *** flmodule.c 2000/07/10 17:04:33 1.40 --- flmodule.c 2000/07/12 10:43:11 1.41 *************** *** 344,348 **** static int ! generic_setattr(genericobject *g, char *name PyObject *v) { int ret; --- 344,348 ---- static int ! generic_setattr(genericobject *g, char *name, PyObject *v) { int ret; Index: fmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fmmodule.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** fmmodule.c 2000/07/10 17:04:33 1.14 --- fmmodule.c 2000/07/12 10:43:11 1.15 *************** *** 180,184 **** static PyObject * ! fm_init(PyObject *self, *args) { if (!PyArg_NoArgs(args)) --- 180,184 ---- static PyObject * ! fm_init(PyObject *self, PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 190,194 **** static PyObject * ! fm_findfont(PyObject *self, *args) { char *str; --- 190,194 ---- static PyObject * ! fm_findfont(PyObject *self, PyObject *args) { char *str; *************** *** 199,203 **** static PyObject * ! fm_prstr(PyObject *self, *args) { char *str; --- 199,203 ---- static PyObject * ! fm_prstr(PyObject *self, PyObject *args) { char *str; *************** *** 260,264 **** static PyObject * ! fm_fontpath(PyObject *self, *args) { if (!PyArg_NoArgs(args)) --- 260,264 ---- static PyObject * ! fm_fontpath(PyObject *self, PyObject *args) { if (!PyArg_NoArgs(args)) From python-dev@python.org Wed Jul 12 13:09:08 2000 From: python-dev@python.org (Guido van Rossum) Date: Wed, 12 Jul 2000 05:09:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules config.c.in,1.69,1.70 Message-ID: <200007121209.FAA20664@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv20626 Modified Files: config.c.in Log Message: Add "exceptions" to list of built-in modules for the sake of sys.builtin_module_names. (Noticed by Toby Dickenson.) Index: config.c.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/config.c.in,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -r1.69 -r1.70 *** config.c.in 2000/06/30 23:58:05 1.69 --- config.c.in 2000/07/12 12:09:05 1.70 *************** *** 38,41 **** --- 38,42 ---- {"__builtin__", NULL}, {"sys", NULL}, + {"exceptions", NULL}, /* Sentinel */ From python-dev@python.org Wed Jul 12 13:11:38 2000 From: python-dev@python.org (Guido van Rossum) Date: Wed, 12 Jul 2000 05:11:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC config.c,1.25,1.26 Message-ID: <200007121211.FAA21238@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv21231 Modified Files: config.c Log Message: Add "exceptions" to list of built-in modules for the sake of sys.builtin_module_names. (Noticed by Toby Dickenson.) [Tim, please test!] Index: config.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/config.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** config.c 2000/06/30 23:58:05 1.25 --- config.c 2000/07/12 12:11:36 1.26 *************** *** 118,121 **** --- 118,122 ---- {"__builtin__", NULL}, {"sys", NULL}, + {"exceptions", NULL}, /* Sentinel */ From python-dev@python.org Wed Jul 12 13:56:21 2000 From: python-dev@python.org (Jeremy Hylton) Date: Wed, 12 Jul 2000 05:56:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include abstract.h,2.21,2.22 Message-ID: <200007121256.FAA00462@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv413/Include Modified Files: abstract.h Log Message: change abstract size functions PySequence_Size &c. add macros for backwards compatibility with C source Index: abstract.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/abstract.h,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** abstract.h 2000/07/09 00:20:36 2.21 --- abstract.h 2000/07/12 12:56:18 2.22 *************** *** 382,390 **** */ ! DL_IMPORT(int) PyObject_Length(PyObject *o); /* ! Return the length of object o. If the object, o, provides ! both sequence and mapping protocols, the sequence length is returned. On error, -1 is returned. This is the equivalent to the Python expression: len(o). --- 382,392 ---- */ ! DL_IMPORT(int) PyObject_Size(PyObject *o); + #define PyObject_Length(O) PyObject_Size((O)) + /* ! Return the size of object o. If the object, o, provides ! both sequence and mapping protocols, the sequence size is returned. On error, -1 is returned. This is the equivalent to the Python expression: len(o). *************** *** 681,689 **** */ ! DL_IMPORT(int) PySequence_Length(PyObject *o); /* ! Return the length of sequence object o, or -1 on failure. */ --- 683,693 ---- */ + + DL_IMPORT(int) PySequence_Size(PyObject *o); ! #define PySequence_Length(O) PySequence_Size((O)) /* ! Return the size of sequence object o, or -1 on failure. */ *************** *** 833,838 **** This function always succeeds. */ ! DL_IMPORT(int) PyMapping_Length(PyObject *o); /* --- 837,844 ---- This function always succeeds. */ + + DL_IMPORT(int) PyMapping_Size(PyObject *o); ! #define PyMapping_Length(O) PyMapping_Size((O)) /* From python-dev@python.org Wed Jul 12 13:56:21 2000 From: python-dev@python.org (Jeremy Hylton) Date: Wed, 12 Jul 2000 05:56:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.40,2.41 object.c,2.86,2.87 Message-ID: <200007121256.FAA00463@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv413/Objects Modified Files: abstract.c object.c Log Message: change abstract size functions PySequence_Size &c. add macros for backwards compatibility with C source Index: abstract.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v retrieving revision 2.40 retrieving revision 2.41 diff -C2 -r2.40 -r2.41 *** abstract.c 2000/07/09 04:34:13 2.40 --- abstract.c 2000/07/12 12:56:19 2.41 *************** *** 63,67 **** int ! PyObject_Length(PyObject *o) { PySequenceMethods *m; --- 63,67 ---- int ! PyObject_Size(PyObject *o) { PySequenceMethods *m; *************** *** 76,80 **** return m->sq_length(o); ! return PyMapping_Length(o); } --- 76,80 ---- return m->sq_length(o); ! return PyMapping_Size(o); } *************** *** 804,808 **** int ! PySequence_Length(PyObject *s) { PySequenceMethods *m; --- 804,808 ---- int ! PySequence_Size(PyObject *s) { PySequenceMethods *m; *************** *** 1037,1041 **** int i; PyObject *t; ! int n = PySequence_Length(v); if (n < 0) return NULL; --- 1037,1041 ---- int i; PyObject *t; ! int n = PySequence_Size(v); if (n < 0) return NULL; *************** *** 1088,1092 **** int i; PyObject *l; ! int n = PySequence_Length(v); if (n < 0) return NULL; --- 1088,1092 ---- int i; PyObject *l; ! int n = PySequence_Size(v); if (n < 0) return NULL; *************** *** 1153,1157 **** } ! l = PySequence_Length(s); if (l < 0) return -1; --- 1153,1157 ---- } ! l = PySequence_Size(s); if (l < 0) return -1; *************** *** 1233,1237 **** } ! l = PySequence_Length(s); if (l < 0) return -1; --- 1233,1237 ---- } ! l = PySequence_Size(s); if (l < 0) return -1; *************** *** 1262,1266 **** int ! PyMapping_Length(PyObject *o) { PyMappingMethods *m; --- 1262,1266 ---- int ! PyMapping_Size(PyObject *o) { PyMappingMethods *m; Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.86 retrieving revision 2.87 diff -C2 -r2.86 -r2.87 *** object.c 2000/07/11 21:47:20 2.86 --- object.c 2000/07/12 12:56:19 2.87 *************** *** 959,963 **** /* Hack to force loading of abstract.o */ ! int (*_Py_abstract_hack)(PyObject *) = &PyObject_Length; --- 959,963 ---- /* Hack to force loading of abstract.o */ ! int (*_Py_abstract_hack)(PyObject *) = &PyObject_Size; From python-dev@python.org Wed Jul 12 14:03:05 2000 From: python-dev@python.org (Jeremy Hylton) Date: Wed, 12 Jul 2000 06:03:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects listobject.c,2.80,2.81 stringobject.c,2.81,2.82 unicodeobject.c,2.43,2.44 Message-ID: <200007121303.GAA04481@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv4183/Objects Modified Files: listobject.c stringobject.c unicodeobject.c Log Message: replace PyXXX_Length calls with PyXXX_Size calls Index: listobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v retrieving revision 2.80 retrieving revision 2.81 diff -C2 -r2.80 -r2.81 *** listobject.c 2000/07/09 15:16:51 2.80 --- listobject.c 2000/07/12 13:03:02 2.81 *************** *** 564,568 **** return NULL; ! if (PyObject_Length(b) == 0) /* short circuit when b is empty */ goto ok; --- 564,568 ---- return NULL; ! if (PyObject_Size(b) == 0) /* short circuit when b is empty */ goto ok; *************** *** 586,590 **** } ! blen = PyObject_Length(b); /* resize a using idiom */ --- 586,590 ---- } ! blen = PyObject_Size(b); /* resize a using idiom */ Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.81 retrieving revision 2.82 diff -C2 -r2.81 -r2.82 *** stringobject.c 2000/07/12 02:58:28 2.81 --- stringobject.c 2000/07/12 13:03:02 2.82 *************** *** 760,764 **** * reference count manipulations. */ ! seqlen = PySequence_Length(seq); if (seqlen == 1) { item = PySequence_Fast_GET_ITEM(seq, 0); --- 760,764 ---- * reference count manipulations. */ ! seqlen = PySequence_Size(seq); if (seqlen == 1) { item = PySequence_Fast_GET_ITEM(seq, 0); Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.43 retrieving revision 2.44 diff -C2 -r2.43 -r2.44 *** unicodeobject.c 2000/07/11 09:47:04 2.43 --- unicodeobject.c 2000/07/12 13:03:02 2.44 *************** *** 2651,2655 **** int i; ! seqlen = PySequence_Length(seq); if (seqlen < 0 && PyErr_Occurred()) return NULL; --- 2651,2655 ---- int i; ! seqlen = PySequence_Size(seq); if (seqlen < 0 && PyErr_Occurred()) return NULL; From python-dev@python.org Wed Jul 12 14:03:05 2000 From: python-dev@python.org (Jeremy Hylton) Date: Wed, 12 Jul 2000 06:03:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.169,2.170 exceptions.c,1.8,1.9 getargs.c,2.39,2.40 Message-ID: <200007121303.GAA04491@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv4183/Python Modified Files: bltinmodule.c exceptions.c getargs.c Log Message: replace PyXXX_Length calls with PyXXX_Size calls Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.169 retrieving revision 2.170 diff -C2 -r2.169 -r2.170 *** bltinmodule.c 2000/07/09 03:09:56 2.169 --- bltinmodule.c 2000/07/12 13:03:02 2.170 *************** *** 1386,1390 **** if (!PyArg_ParseTuple(args, "O:len", &v)) return NULL; ! res = PyObject_Length(v); if (res < 0 && PyErr_Occurred()) return NULL; --- 1386,1390 ---- if (!PyArg_ParseTuple(args, "O:len", &v)) return NULL; ! res = PyObject_Size(v); if (res < 0 && PyErr_Occurred()) return NULL; Index: exceptions.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** exceptions.c 2000/07/12 04:02:10 1.8 --- exceptions.c 2000/07/12 13:03:03 1.9 *************** *** 225,229 **** /* set args attribute */ ! args = PySequence_GetSlice(args, 1, PySequence_Length(args)); if (!args) return NULL; --- 225,230 ---- /* set args attribute */ ! /* XXX size is only a hint */ ! args = PySequence_GetSlice(args, 1, PySequence_Size(args)); if (!args) return NULL; *************** *** 250,254 **** return NULL; ! switch (PySequence_Length(args)) { case 0: out = PyString_FromString(""); --- 251,255 ---- return NULL; ! switch (PySequence_Size(args)) { case 0: out = PyString_FromString(""); *************** *** 375,379 **** /* Set args attribute. */ ! if (!(args = PySequence_GetSlice(args, 1, PySequence_Length(args)))) return NULL; --- 376,380 ---- /* Set args attribute. */ ! if (!(args = PySequence_GetSlice(args, 1, PySequence_Size(args)))) return NULL; *************** *** 385,389 **** /* set code attribute */ ! switch (PySequence_Length(args)) { case 0: Py_INCREF(Py_None); --- 386,390 ---- /* set code attribute */ ! switch (PySequence_Size(args)) { case 0: Py_INCREF(Py_None); *************** *** 442,446 **** return NULL; ! if (!(args = PySequence_GetSlice(args, 1, PySequence_Length(args)))) return NULL; --- 443,447 ---- return NULL; ! if (!(args = PySequence_GetSlice(args, 1, PySequence_Size(args)))) return NULL; *************** *** 453,457 **** } ! switch (PySequence_Length(args)) { case 3: /* Where a function has a single filename, such as open() or some --- 454,458 ---- } ! switch (PySequence_Size(args)) { case 3: /* Where a function has a single filename, such as open() or some *************** *** 672,676 **** return NULL; ! if (!(args = PySequence_GetSlice(args, 1, PySequence_Length(args)))) return NULL; --- 673,677 ---- return NULL; ! if (!(args = PySequence_GetSlice(args, 1, PySequence_Size(args)))) return NULL; *************** *** 678,682 **** goto finally; ! lenargs = PySequence_Length(args); if (lenargs >= 1) { PyObject* item0 = PySequence_GetItem(args, 0); --- 679,683 ---- goto finally; ! lenargs = PySequence_Size(args); if (lenargs >= 1) { PyObject* item0 = PySequence_GetItem(args, 0); Index: getargs.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v retrieving revision 2.39 retrieving revision 2.40 diff -C2 -r2.39 -r2.40 *** getargs.c 2000/07/09 03:09:56 2.39 --- getargs.c 2000/07/12 13:03:03 2.40 *************** *** 349,353 **** } ! if ((i = PySequence_Length(arg)) != n) { levels[0] = 0; sprintf(msgbuf, --- 349,353 ---- } ! if ((i = PySequence_Size(arg)) != n) { levels[0] = 0; sprintf(msgbuf, From python-dev@python.org Wed Jul 12 14:05:36 2000 From: python-dev@python.org (Jeremy Hylton) Date: Wed, 12 Jul 2000 06:05:36 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.25,2.26 _tkinter.c,1.105,1.106 almodule.c,1.28,1.29 cPickle.c,2.44,2.45 cStringIO.c,2.21,2.22 parsermodule.c,2.45,2.46 posixmodule.c,2.150,2.151 stropmodule.c,2.67,2.68 Message-ID: <200007121305.GAA05390@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv5188/Modules Modified Files: _sre.c _tkinter.c almodule.c cPickle.c cStringIO.c parsermodule.c posixmodule.c stropmodule.c Log Message: replace PyXXX_Length calls with PyXXX_Size calls Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** _sre.c 2000/07/05 21:14:16 2.25 --- _sre.c 2000/07/12 13:05:32 2.26 *************** *** 1128,1132 **** return NULL; ! n = PySequence_Length(code); self = PyObject_NEW_VAR(PatternObject, &Pattern_Type, 100*n); --- 1128,1132 ---- return NULL; ! n = PySequence_Size(code); self = PyObject_NEW_VAR(PatternObject, &Pattern_Type, 100*n); Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.105 retrieving revision 1.106 diff -C2 -r1.105 -r1.106 *** _tkinter.c 2000/07/10 12:43:58 1.105 --- _tkinter.c 2000/07/12 13:05:33 1.106 *************** *** 1935,1939 **** return NULL; ! context.maxsize = PySequence_Length(item); if (context.maxsize <= 0) return PyTuple_New(0); --- 1935,1939 ---- return NULL; ! context.maxsize = PySequence_Size(item); if (context.maxsize <= 0) return PyTuple_New(0); Index: almodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/almodule.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** almodule.c 2000/07/10 17:04:33 1.28 --- almodule.c 2000/07/12 13:05:33 1.29 *************** *** 177,181 **** case AL_RESOURCE_ELEM: case AL_ENUM_ELEM: ! param->sizeIn = PySequence_Length(value); param->value.ptr = PyMem_NEW(int, param->sizeIn); stepsize = sizeof(int); --- 177,181 ---- case AL_RESOURCE_ELEM: case AL_ENUM_ELEM: ! param->sizeIn = PySequence_Size(value); param->value.ptr = PyMem_NEW(int, param->sizeIn); stepsize = sizeof(int); *************** *** 183,187 **** case AL_INT64_ELEM: case AL_FIXED_ELEM: ! param->sizeIn = PySequence_Length(value); param->value.ptr = PyMem_NEW(long long, param->sizeIn); stepsize = sizeof(long long); --- 183,187 ---- case AL_INT64_ELEM: case AL_FIXED_ELEM: ! param->sizeIn = PySequence_Size(value); param->value.ptr = PyMem_NEW(long long, param->sizeIn); stepsize = sizeof(long long); Index: cPickle.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v retrieving revision 2.44 retrieving revision 2.45 diff -C2 -r2.44 -r2.45 *** cPickle.c 2000/06/30 05:02:53 2.44 --- cPickle.c 2000/07/12 13:05:33 2.45 *************** *** 1467,1471 **** goto finally; ! if ((len = PyObject_Length(class_args)) < 0) goto finally; --- 1467,1471 ---- goto finally; ! if ((len = PyObject_Size(class_args)) < 0) goto finally; *************** *** 2875,2879 **** int l; ! if ((l=PyObject_Length(args)) < 0) goto err; UNLESS (l) { PyObject *__getinitargs__; --- 2875,2879 ---- int l; ! if ((l=PyObject_Size(args)) < 0) goto err; UNLESS (l) { PyObject *__getinitargs__; Index: cStringIO.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cStringIO.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** cStringIO.c 2000/06/19 13:17:41 2.21 --- cStringIO.c 2000/07/12 13:05:33 2.22 *************** *** 368,372 **** } ! if (PyObject_Length(args) == -1) { return NULL; } --- 368,372 ---- } ! if (PyObject_Size(args) == -1) { return NULL; } Index: parsermodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** parsermodule.c 2000/07/10 12:43:58 2.45 --- parsermodule.c 2000/07/12 13:05:33 2.46 *************** *** 611,615 **** * lists as well as tuples at the very least. */ ! ok = PyObject_Length(tuple) >= 2; if (ok) { temp = PySequence_GetItem(tuple, 0); --- 611,615 ---- * lists as well as tuples at the very least. */ ! ok = PyObject_Size(tuple) >= 2; if (ok) { temp = PySequence_GetItem(tuple, 0); *************** *** 627,631 **** if (ok) { temp = PySequence_GetItem(tuple, 1); ! ok = (temp != NULL) && PyObject_Length(temp) >= 2; if (ok) { PyObject *temp2 = PySequence_GetItem(temp, 0); --- 627,631 ---- if (ok) { temp = PySequence_GetItem(tuple, 1); ! ok = (temp != NULL) && PyObject_Size(temp) >= 2; if (ok) { PyObject *temp2 = PySequence_GetItem(temp, 0); *************** *** 694,698 **** check_terminal_tuple(PyObject *elem) { ! int len = PyObject_Length(elem); int res = 1; char* str = "Illegal terminal symbol; bad node length."; --- 694,698 ---- check_terminal_tuple(PyObject *elem) { ! int len = PyObject_Size(elem); int res = 1; char* str = "Illegal terminal symbol; bad node length."; *************** *** 732,736 **** build_node_children(PyObject *tuple, node *root, int *line_num) { ! int len = PyObject_Length(tuple); int i; --- 732,736 ---- build_node_children(PyObject *tuple, node *root, int *line_num) { ! int len = PyObject_Size(tuple); int i; *************** *** 772,776 **** Py_DECREF(temp); ! if (PyObject_Length(elem) == 3) { PyObject* temp = PySequence_GetItem(elem, 2); *line_num = PyInt_AsLong(temp); --- 772,776 ---- Py_DECREF(temp); ! if (PyObject_Size(elem) == 3) { PyObject* temp = PySequence_GetItem(elem, 2); *line_num = PyInt_AsLong(temp); Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.150 retrieving revision 2.151 diff -C2 -r2.150 -r2.151 *** posixmodule.c 2000/07/10 16:38:09 2.150 --- posixmodule.c 2000/07/12 13:05:33 2.151 *************** *** 1418,1422 **** argvlist[argc] = NULL; ! i = PyMapping_Length(env); envlist = PyMem_NEW(char *, i + 1); if (envlist == NULL) { --- 1418,1422 ---- argvlist[argc] = NULL; ! i = PyMapping_Size(env); envlist = PyMem_NEW(char *, i + 1); if (envlist == NULL) { *************** *** 1611,1615 **** argvlist[argc] = NULL; ! i = PyMapping_Length(env); envlist = PyMem_NEW(char *, i + 1); if (envlist == NULL) { --- 1611,1615 ---- argvlist[argc] = NULL; ! i = PyMapping_Size(env); envlist = PyMem_NEW(char *, i + 1); if (envlist == NULL) { Index: stropmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/stropmodule.c,v retrieving revision 2.67 retrieving revision 2.68 diff -C2 -r2.67 -r2.68 *** stropmodule.c 2000/07/10 09:43:24 2.67 --- stropmodule.c 2000/07/12 13:05:33 2.68 *************** *** 191,195 **** } ! seqlen = PySequence_Length(seq); if (seqlen < 0 && PyErr_Occurred()) return NULL; --- 191,195 ---- } ! seqlen = PySequence_Size(seq); if (seqlen < 0 && PyErr_Occurred()) return NULL; From python-dev@python.org Wed Jul 12 17:56:00 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 12 Jul 2000 09:56:00 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib dospath.py,1.13,1.14 macpath.py,1.22,1.23 ntpath.py,1.24,1.25 posixpath.py,1.31,1.32 Message-ID: <200007121656.JAA09687@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9633/Lib Modified Files: dospath.py macpath.py ntpath.py posixpath.py Log Message: fixed semantics of commonprefix to work by path elements instead of characters. Index: dospath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dospath.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** dospath.py 2000/07/01 10:52:49 1.13 --- dospath.py 2000/07/12 16:55:57 1.14 *************** *** 103,112 **** ! def commonprefix(m): ! """Return the longest prefix of all list elements.""" if not m: return '' ! prefix = m[0] ! for item in m: for i in range(len(prefix)): if prefix[:i+1] <> item[:i+1]: --- 103,120 ---- ! # Return the longest prefix of all list elements. + def commonprefix(m): + "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! n = m[:] ! for i in range(len(n)): ! n[i] = n[i].split(os.sep) ! # if os.sep didn't have any effect, try os.altsep ! if os.altsep and len(n[i]) == 1: ! n[i] = n[i].split(os.altsep) ! ! prefix = n[0] ! for item in n: for i in range(len(prefix)): if prefix[:i+1] <> item[:i+1]: *************** *** 114,118 **** if i == 0: return '' break ! return prefix --- 122,126 ---- if i == 0: return '' break ! return os.sep.join(prefix) Index: macpath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/macpath.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** macpath.py 2000/07/01 10:52:26 1.22 --- macpath.py 2000/07/12 16:55:57 1.23 *************** *** 90,93 **** --- 90,116 ---- + # Return the longest prefix of all list elements. + # XXX completely untested on Mac!!! + + def commonprefix(m): + "Given a list of pathnames, returns the longest common leading component" + if not m: return '' + n = m[:] + for i in range(len(n)): + n[i] = n[i].split(os.sep) + # if os.sep didn't have any effect, try os.altsep + if os.altsep and len(n[i]) == 1: + n[i] = n[i].split(os.altsep) + + prefix = n[0] + for item in n: + for i in range(len(prefix)): + if prefix[:i+1] <> item[:i+1]: + prefix = prefix[:i] + if i == 0: return '' + break + return os.sep.join(prefix) + + def isdir(s): """Return true if the pathname refers to an existing directory.""" Index: ntpath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ntpath.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** ntpath.py 2000/07/01 06:36:51 1.24 --- ntpath.py 2000/07/12 16:55:57 1.25 *************** *** 9,14 **** import stat import string - # Normalize the case of a pathname and map slashes to backslashes. # Other normalizations (such as optimizing '../' away) are not done --- 9,14 ---- import stat import string + import copy # Normalize the case of a pathname and map slashes to backslashes. # Other normalizations (such as optimizing '../' away) are not done *************** *** 159,164 **** "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! prefix = m[0] ! for item in m: for i in range(len(prefix)): if prefix[:i+1] <> item[:i+1]: --- 159,167 ---- "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! n = copy.copy(m) ! for i in range(len(n)): ! n[i] = n[i].split(os.sep) ! prefix = n[0] ! for item in n: for i in range(len(prefix)): if prefix[:i+1] <> item[:i+1]: *************** *** 166,170 **** if i == 0: return '' break ! return prefix --- 169,173 ---- if i == 0: return '' break ! return os.sep.join(prefix) Index: posixpath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/posixpath.py,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** posixpath.py 2000/06/28 14:48:01 1.31 --- posixpath.py 2000/07/12 16:55:57 1.32 *************** *** 119,124 **** "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! prefix = m[0] ! for item in m: for i in range(len(prefix)): if prefix[:i+1] <> item[:i+1]: --- 119,131 ---- "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! n = m[:] ! for i in range(len(n)): ! n[i] = n[i].split(os.sep) ! # if os.sep didn't have any effect, try os.altsep ! if os.altsep and len(n[i]) == 1: ! n[i] = n[i].split(os.altsep) ! ! prefix = n[0] ! for item in n: for i in range(len(prefix)): if prefix[:i+1] <> item[:i+1]: *************** *** 126,130 **** if i == 0: return '' break ! return prefix --- 133,137 ---- if i == 0: return '' break ! return os.sep.join(prefix) From python-dev@python.org Wed Jul 12 18:21:44 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 12 Jul 2000 10:21:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include mymalloc.h,2.22,2.23 mymath.h,2.10,2.11 Message-ID: <200007121721.KAA18006@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv17993/Include Modified Files: mymalloc.h mymath.h Log Message: delete obsolete SYMANTEC__CFM68K__ #ifdefs Index: mymalloc.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mymalloc.h,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** mymalloc.h 2000/07/09 03:09:55 2.22 --- mymalloc.h 2000/07/12 17:21:41 2.23 *************** *** 45,52 **** #endif - #ifdef SYMANTEC__CFM68K__ - #pragma lib_export on - #endif - #ifndef DL_IMPORT /* declarations for DLL import */ #define DL_IMPORT(RTYPE) RTYPE --- 45,48 ---- Index: mymath.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mymath.h,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** mymath.h 2000/07/09 03:09:55 2.10 --- mymath.h 2000/07/12 17:21:41 2.11 *************** *** 6,13 **** XXX Not sure now... Seems to be something else going on as well... */ - #ifdef SYMANTEC__CFM68K__ - #pragma lib_export off - #endif - #ifndef HAVE_HYPOT extern double hypot(double, double); --- 6,9 ---- *************** *** 23,30 **** #undef hypot #endif - #endif - - #ifdef SYMANTEC__CFM68K__ - #pragma lib_export on #endif --- 19,22 ---- From python-dev@python.org Wed Jul 12 18:21:44 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 12 Jul 2000 10:21:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python dynload_mac.c,2.6,2.7 errors.c,2.48,2.49 Message-ID: <200007121721.KAA18011@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv17993/Python Modified Files: dynload_mac.c errors.c Log Message: delete obsolete SYMANTEC__CFM68K__ #ifdefs Index: dynload_mac.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_mac.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** dynload_mac.c 2000/06/30 23:58:06 2.6 --- dynload_mac.c 2000/07/12 17:21:42 2.7 *************** *** 16,23 **** #include #include - #ifdef SYMANTEC__CFM68K__ /* Really an older version of Universal Headers */ - #define CFragConnectionID ConnectionID - #define kLoadCFrag 0x01 - #endif #ifdef USE_GUSI1 #include "TFileSpec.h" /* for Path2FSSpec() */ --- 16,19 ---- Index: errors.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/errors.c,v retrieving revision 2.48 retrieving revision 2.49 diff -C2 -r2.48 -r2.49 *** errors.c 2000/07/09 03:09:56 2.48 --- errors.c 2000/07/12 17:21:42 2.49 *************** *** 13,20 **** #include "Python.h" - #ifdef SYMANTEC__CFM68K__ - #pragma lib_export on - #endif - #ifdef macintosh extern char *PyMac_StrError(int); --- 13,16 ---- From python-dev@python.org Wed Jul 12 18:26:12 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 12 Jul 2000 10:26:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include Python.h,2.22,2.23 Message-ID: <200007121726.KAA18283@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv18194/Include Modified Files: Python.h Log Message: deleted obsolete SYMANTEC__CFM68K__ tests Index: Python.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** Python.h 2000/07/08 04:17:21 2.22 --- Python.h 2000/07/12 17:26:09 2.23 *************** *** 42,49 **** #endif - #ifdef SYMANTEC__CFM68K__ - #define UsingSharedLibs - #endif - #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE) #define _SGI_MP_SOURCE --- 42,45 ---- *************** *** 58,65 **** #include "myproto.h" - - #ifdef SYMANTEC__CFM68K__ - #pragma lib_export on - #endif #include "object.h" --- 54,57 ---- From python-dev@python.org Thu Jul 13 00:39:40 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Wed, 12 Jul 2000 16:39:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects object.c,2.87,2.88 Message-ID: <200007122339.QAA18126@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv17806 Modified Files: object.c Log Message: Propagate the current exception in get_inprogress_dict() -- it doesn't need to be cleared. Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.87 retrieving revision 2.88 diff -C2 -r2.87 -r2.88 *** object.c 2000/07/12 12:56:19 2.87 --- object.c 2000/07/12 23:39:38 2.88 *************** *** 357,361 **** inprogress = PyDict_GetItem(tstate_dict, _PyCompareState_Key); if (inprogress == NULL) { - PyErr_Clear(); inprogress = PyDict_New(); if (inprogress == NULL) --- 357,360 ---- From python-dev@python.org Thu Jul 13 02:01:06 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 12 Jul 2000 18:01:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib ntpath.py,1.25,1.26 Message-ID: <200007130101.SAA30460@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv30374 Modified Files: ntpath.py Log Message: forgot to change copy.copy(m) to m[:] Index: ntpath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ntpath.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** ntpath.py 2000/07/12 16:55:57 1.25 --- ntpath.py 2000/07/13 01:01:03 1.26 *************** *** 9,14 **** import stat import string - import copy # Normalize the case of a pathname and map slashes to backslashes. # Other normalizations (such as optimizing '../' away) are not done --- 9,14 ---- import stat import string + # Normalize the case of a pathname and map slashes to backslashes. # Other normalizations (such as optimizing '../' away) are not done *************** *** 159,163 **** "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! n = copy.copy(m) for i in range(len(n)): n[i] = n[i].split(os.sep) --- 159,163 ---- "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! n = m[:] for i in range(len(n)): n[i] = n[i].split(os.sep) From python-dev@python.org Thu Jul 13 02:27:00 2000 From: python-dev@python.org (A.M. Kuchling) Date: Wed, 12 Jul 2000 18:27:00 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.151,2.152 Message-ID: <200007130127.SAA03986@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv3810/Modules Modified Files: posixmodule.c Log Message: From Sam Rushing's Medusa, via SF patch #100858: add & document os.seteuid(), os.setegid(), os.setreuid(), os.setregid(). Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.151 retrieving revision 2.152 diff -C2 -r2.151 -r2.152 *** posixmodule.c 2000/07/12 13:05:33 2.151 --- posixmodule.c 2000/07/13 01:26:58 2.152 *************** *** 2619,2622 **** --- 2619,2698 ---- + #ifdef HAVE_SETEUID + static char posix_seteuid__doc__[] = + "seteuid(uid) -> None\n\ + Set the current process's effective user id."; + static PyObject * + posix_seteuid (PyObject *self, PyObject *args) + { + int euid; + if (!PyArg_ParseTuple(args, "i", &euid)) { + return NULL; + } else if (seteuid(euid) < 0) { + return posix_error(); + } else { + Py_INCREF(Py_None); + return Py_None; + } + } + #endif /* HAVE_SETEUID */ + + #ifdef HAVE_SETEGID + static char posix_setegid__doc__[] = + "setegid(gid) -> None\n\ + Set the current process's effective group id."; + static PyObject * + posix_setegid (PyObject *self, PyObject *args) + { + int egid; + if (!PyArg_ParseTuple(args, "i", &egid)) { + return NULL; + } else if (setegid(egid) < 0) { + return posix_error(); + } else { + Py_INCREF(Py_None); + return Py_None; + } + } + #endif /* HAVE_SETEGID */ + + #ifdef HAVE_SETREUID + static char posix_setreuid__doc__[] = + "seteuid(ruid, euid) -> None\n\ + Set the current process's real and effective user ids."; + static PyObject * + posix_setreuid (PyObject *self, PyObject *args) + { + int ruid, euid; + if (!PyArg_ParseTuple(args, "ii", &ruid, &euid)) { + return NULL; + } else if (setreuid(ruid, euid) < 0) { + return posix_error(); + } else { + Py_INCREF(Py_None); + return Py_None; + } + } + #endif /* HAVE_SETREUID */ + + #ifdef HAVE_SETREGID + static char posix_setregid__doc__[] = + "setegid(rgid, egid) -> None\n\ + Set the current process's real and effective group ids."; + static PyObject * + posix_setregid (PyObject *self, PyObject *args) + { + int rgid, egid; + if (!PyArg_ParseTuple(args, "ii", &rgid, &egid)) { + return NULL; + } else if (setregid(rgid, egid) < 0) { + return posix_error(); + } else { + Py_INCREF(Py_None); + return Py_None; + } + } + #endif /* HAVE_SETREGID */ + #ifdef HAVE_SETGID static char posix_setgid__doc__[] = *************** *** 4899,4902 **** --- 4975,4990 ---- {"setuid", posix_setuid, METH_VARARGS, posix_setuid__doc__}, #endif /* HAVE_SETUID */ + #ifdef HAVE_SETEUID + {"seteuid", posix_seteuid, METH_VARARGS, posix_seteuid__doc__}, + #endif /* HAVE_SETEUID */ + #ifdef HAVE_SETEGID + {"setegid", posix_setegid, METH_VARARGS, posix_setegid__doc__}, + #endif /* HAVE_SETEGID */ + #ifdef HAVE_SETREUID + {"setreuid", posix_setreuid, METH_VARARGS, posix_setreuid__doc__}, + #endif /* HAVE_SETREUID */ + #ifdef HAVE_SETREGID + {"setregid", posix_setregid, METH_VARARGS, posix_setregid__doc__}, + #endif /* HAVE_SETREGID */ #ifdef HAVE_SETGID {"setgid", posix_setgid, METH_VARARGS, posix_setgid__doc__}, From python-dev@python.org Thu Jul 13 02:27:00 2000 From: python-dev@python.org (A.M. Kuchling) Date: Wed, 12 Jul 2000 18:27:00 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libos.tex,1.42,1.43 Message-ID: <200007130127.SAA03988@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv3810/Doc/lib Modified Files: libos.tex Log Message: From Sam Rushing's Medusa, via SF patch #100858: add & document os.seteuid(), os.setegid(), os.setreuid(), os.setregid(). Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -r1.42 -r1.43 *** libos.tex 2000/06/30 16:06:19 1.42 --- libos.tex 2000/07/13 01:26:58 1.43 *************** *** 182,185 **** --- 182,195 ---- \end{funcdesc} + \begin{funcdesc}{setegid}{egid} + Set the current process's effective group id. + Availability: \UNIX{}. + \end{funcdesc} + + \begin{funcdesc}{seteuid}{euid} + Set the current process's effective user id. + Availability: \UNIX{}. + \end{funcdesc} + \begin{funcdesc}{setgid}{gid} Set the current process' group id. *************** *** 197,200 **** --- 207,220 ---- Calls the system call \cfunction{setpgid()}. See the \UNIX{} manual for the semantics. + Availability: \UNIX{}. + \end{funcdesc} + + \begin{funcdesc}{setreuid}{ruid, euid} + Set the current process's real and effective user ids. + Availability: \UNIX{}. + \end{funcdesc} + + \begin{funcdesc}{setregid}{rgid, egid} + Set the current process's real and effective group ids. Availability: \UNIX{}. \end{funcdesc} From python-dev@python.org Thu Jul 13 02:27:01 2000 From: python-dev@python.org (A.M. Kuchling) Date: Wed, 12 Jul 2000 18:27:01 -0700 Subject: [Python-checkins] CVS: python/dist/src configure.in,1.136,1.137 config.h.in,2.62,2.63 configure,1.127,1.128 Message-ID: <200007130127.SAA03998@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv3810 Modified Files: configure.in config.h.in configure Log Message: From Sam Rushing's Medusa, via SF patch #100858: add & document os.seteuid(), os.setegid(), os.setreuid(), os.setregid(). Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.136 retrieving revision 1.137 diff -C2 -r1.136 -r1.137 *** configure.in 2000/07/12 05:04:44 1.136 --- configure.in 2000/07/13 01:26:58 1.137 *************** *** 823,827 **** nice pathconf pause plock pthread_init \ putenv readlink \ ! select setgid setlocale setuid setsid setpgid setpgrp setvbuf \ sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ --- 823,828 ---- nice pathconf pause plock pthread_init \ putenv readlink \ ! select setegid seteuid setgid \ ! setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf \ sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ Index: config.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/config.h.in,v retrieving revision 2.62 retrieving revision 2.63 diff -C2 -r2.62 -r2.63 *** config.h.in 2000/07/09 14:39:28 2.62 --- config.h.in 2000/07/13 01:26:58 2.63 *************** *** 408,411 **** --- 408,417 ---- #undef HAVE_SELECT + /* Define if you have the setegid function. */ + #undef HAVE_SETEGID + + /* Define if you have the seteuid function. */ + #undef HAVE_SETEUID + /* Define if you have the setgid function. */ #undef HAVE_SETGID *************** *** 419,422 **** --- 425,434 ---- /* Define if you have the setpgrp function. */ #undef HAVE_SETPGRP + + /* Define if you have the setregid function. */ + #undef HAVE_SETREGID + + /* Define if you have the setreuid function. */ + #undef HAVE_SETREUID /* Define if you have the setsid function. */ Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.127 retrieving revision 1.128 diff -C2 -r1.127 -r1.128 *** configure 2000/07/12 05:05:06 1.127 --- configure 2000/07/13 01:26:58 1.128 *************** *** 3642,3646 **** nice pathconf pause plock pthread_init \ putenv readlink \ ! select setgid setlocale setuid setsid setpgid setpgrp setvbuf \ sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ --- 3642,3647 ---- nice pathconf pause plock pthread_init \ putenv readlink \ ! select setegid seteuid setgid \ ! setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf \ [...1626 lines suppressed...] echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 ! echo "configure:5657: checking for socklen_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 5655,5664 ---- EOF echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 ! echo "configure:5658: checking for socklen_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < From python-dev@python.org Thu Jul 13 05:58:01 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 12 Jul 2000 21:58:01 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/ref ref3.tex,1.44,1.45 Message-ID: <200007130458.VAA01269@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ref In directory slayer.i.sourceforge.net:/tmp/cvs-serv1260/ref Modified Files: ref3.tex Log Message: Improve the descriptions of expected exceptions for __getitem__(), __setitem__(), and __delitem__(). Based on related comments from Barry Warsaw. Index: ref3.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref3.tex,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -r1.44 -r1.45 *** ref3.tex 2000/06/28 20:15:47 1.44 --- ref3.tex 2000/07/13 04:57:58 1.45 *************** *** 1092,1098 **** \begin{methoddesc}[mapping object]{__getitem__}{self, key} Called to implement evaluation of \code{\var{self}[\var{key}]}. ! For a sequence types, the accepted keys should be integers. Note that the ! special interpretation of negative indices (if the class wishes to emulate a sequence type) is up to the \method{__getitem__()} method. \end{methoddesc} --- 1092,1105 ---- \begin{methoddesc}[mapping object]{__getitem__}{self, key} Called to implement evaluation of \code{\var{self}[\var{key}]}. ! For a sequence types, the accepted keys should be integers. Note that ! the special interpretation of negative indices (if the class wishes to emulate a sequence type) is up to the \method{__getitem__()} method. + If \var{key} is of an inappropriate type, \exception{TypeError} may be + raised; if of a value outside the set of indexes for the sequence + (after any special interpretation of negative values), + \exception{IndexError} should be raised. + \strong{Note:} \keyword{for} loops expect that an + \exception{IndexError} will be raised for illegal indexes to allow + proper detection of the end of the sequence. \end{methoddesc} *************** *** 1102,1106 **** for mappings if the objects support changes to the values for keys, or if new keys can be added, or for sequences if elements can be ! replaced. \end{methoddesc} --- 1109,1114 ---- for mappings if the objects support changes to the values for keys, or if new keys can be added, or for sequences if elements can be ! replaced. The same exceptions should be raised for improper ! \var{key} values as for the \method{__getitem__()} method. \end{methoddesc} *************** *** 1109,1113 **** note as for \method{__getitem__()}. This should only be implemented for mappings if the objects support removal of keys, or for sequences ! if elements can be removed from the sequence. \end{methoddesc} --- 1117,1123 ---- note as for \method{__getitem__()}. This should only be implemented for mappings if the objects support removal of keys, or for sequences ! if elements can be removed from the sequence. The same exceptions ! should be raised for improper \var{key} values as for the ! \method{__getitem__()} method. \end{methoddesc} From python-dev@python.org Thu Jul 13 07:15:07 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Wed, 12 Jul 2000 23:15:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python compile.c,2.114,2.115 Message-ID: <200007130615.XAA17849@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv17802 Modified Files: compile.c Log Message: raise error on duplicate function arguments example: >>> def f(a,a):print a ... SyntaxError: duplicate argument in function definition Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.114 retrieving revision 2.115 diff -C2 -r2.114 -r2.115 *** compile.c 2000/07/09 03:09:56 2.114 --- compile.c 2000/07/13 06:15:04 2.115 *************** *** 3093,3096 **** --- 3093,3097 ---- node *fp; char *name; + PyObject *nameval; if (TYPE(ch) == STAR || TYPE(ch) == DOUBLESTAR) break; *************** *** 3104,3108 **** complex = 1; } ! com_newlocal(c, name); c->c_argcount++; if (++i >= nch) --- 3105,3117 ---- complex = 1; } ! nameval = PyString_InternFromString(name); ! if (nameval == NULL) { ! c->c_errors++; ! } ! if (PyDict_GetItem(c->c_locals, nameval)) { ! com_error(c, PyExc_SyntaxError,"duplicate argument in function definition"); ! } ! com_newlocal_o(c, nameval); ! Py_DECREF(nameval); c->c_argcount++; if (++i >= nch) From python-dev@python.org Thu Jul 13 07:24:32 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Wed, 12 Jul 2000 23:24:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python compile.c,2.115,2.116 Message-ID: <200007130624.XAA18306@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv18295 Modified Files: compile.c Log Message: just fixing the indentation Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.115 retrieving revision 2.116 diff -C2 -r2.115 -r2.116 *** compile.c 2000/07/13 06:15:04 2.115 --- compile.c 2000/07/13 06:24:29 2.116 *************** *** 3109,3113 **** c->c_errors++; } ! if (PyDict_GetItem(c->c_locals, nameval)) { com_error(c, PyExc_SyntaxError,"duplicate argument in function definition"); } --- 3109,3113 ---- c->c_errors++; } ! if (PyDict_GetItem(c->c_locals, nameval)) { com_error(c, PyExc_SyntaxError,"duplicate argument in function definition"); } From python-dev@python.org Thu Jul 13 07:32:30 2000 From: python-dev@python.org (Barry Warsaw) Date: Wed, 12 Jul 2000 23:32:30 -0700 Subject: [Python-checkins] CVS: python/nondist/peps - New directory Message-ID: <200007130632.XAA18665@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv18652/peps Log Message: Directory /cvsroot/python/python/nondist/peps added to the repository From python-dev@python.org Thu Jul 13 07:33:10 2000 From: python-dev@python.org (Barry Warsaw) Date: Wed, 12 Jul 2000 23:33:10 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,NONE,1.1 pep-0001.txt,NONE,1.1 pep-0200.txt,NONE,1.1 pep-0201.txt,NONE,1.1 pep-0202.txt,NONE,1.1 pep-0203.txt,NONE,1.1 Message-ID: <200007130633.XAA18817@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv18795 Added Files: pep-0000.txt pep-0001.txt pep-0200.txt pep-0201.txt pep-0202.txt pep-0203.txt Log Message: Initial set of Python Enhancement Proposals ***** Error reading new file(2, 'No such file or directory') ***** Error reading new file(2, 'No such file or directory') ***** Error reading new file(2, 'No such file or directory') ***** Error reading new file(2, 'No such file or directory') ***** Error reading new file(2, 'No such file or directory') ***** Error reading new file(2, 'No such file or directory') From python-dev@python.org Thu Jul 13 14:12:24 2000 From: python-dev@python.org (Eric S. Raymond) Date: Thu, 13 Jul 2000 06:12:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib netrc.py,1.4,1.5 Message-ID: <200007131312.GAA13270@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv13078 Modified Files: netrc.py Log Message: Fix bug open/243 reported by Dimitri Papadopoulos Index: netrc.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/netrc.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** netrc.py 2000/02/04 15:10:33 1.4 --- netrc.py 2000/07/13 13:12:21 1.5 *************** *** 16,20 **** self.macros = {} lexer = shlex.shlex(fp) ! lexer.wordchars = lexer.wordchars + '.' while 1: # Look for a machine, default, or macdef top-level keyword --- 16,21 ---- self.macros = {} lexer = shlex.shlex(fp) ! # Allows @ in hostnames. Not a big deal... ! lexer.wordchars = lexer.wordchars + '.-@' while 1: # Look for a machine, default, or macdef top-level keyword From python-dev@python.org Thu Jul 13 14:25:09 2000 From: python-dev@python.org (Eric S. Raymond) Date: Thu, 13 Jul 2000 06:25:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib netrc.py,1.5,1.6 Message-ID: <200007131325.GAA17041@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv17023 Modified Files: netrc.py Log Message: Apply Greg Kochanski's fix for open/265. Index: netrc.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/netrc.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** netrc.py 2000/07/13 13:12:21 1.5 --- netrc.py 2000/07/13 13:25:07 1.6 *************** *** 9,16 **** if not file: file = os.path.join(os.environ['HOME'], ".netrc") ! try: ! fp = open(file) ! except: ! return None self.hosts = {} self.macros = {} --- 9,13 ---- if not file: file = os.path.join(os.environ['HOME'], ".netrc") ! fp = open(file) self.hosts = {} self.macros = {} From python-dev@python.org Thu Jul 13 16:45:21 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 13 Jul 2000 08:45:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/freeze checkextensions_win32.py,1.4,1.5 extensions_win32.ini,1.2,1.3 freeze.py,1.35,1.36 winmakemakefile.py,1.10,1.11 Message-ID: <200007131545.IAA07292@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/freeze In directory slayer.i.sourceforge.net:/tmp/cvs-serv7174 Modified Files: checkextensions_win32.py extensions_win32.ini freeze.py winmakemakefile.py Log Message: Patch by Toby Dickenson, mentored by Mark Hammond, to support automatically finding (most of) the standard PYD extensions, and to remove the hardcoded Python version. Index: checkextensions_win32.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/freeze/checkextensions_win32.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** checkextensions_win32.py 1999/11/02 15:44:40 1.4 --- checkextensions_win32.py 2000/07/13 15:45:17 1.5 *************** *** 55,59 **** return self.linkerLibs ! def checkextensions(unknown, extra_inis): # Create a table of frozen extensions --- 55,59 ---- return self.linkerLibs ! def checkextensions(unknown, extra_inis, prefix): # Create a table of frozen extensions *************** *** 69,73 **** for ini in extra_inis: # print "Looking for", mod, "in", win32api.GetFullPathName(ini),"...", ! defn = get_extension_defn( mod, ini ) if defn is not None: # print "Yay - found it!" --- 69,73 ---- for ini in extra_inis: # print "Looking for", mod, "in", win32api.GetFullPathName(ini),"...", ! defn = get_extension_defn( mod, ini, prefix ) if defn is not None: # print "Yay - found it!" *************** *** 80,85 **** return ret ! def get_extension_defn(moduleName, mapFileName): if win32api is None: return None dsp = win32api.GetProfileVal(moduleName, "dsp", "", mapFileName) if dsp=="": --- 80,86 ---- return ret ! def get_extension_defn(moduleName, mapFileName, prefix): if win32api is None: return None + os.environ['PYTHONPREFIX'] = prefix dsp = win32api.GetProfileVal(moduleName, "dsp", "", mapFileName) if dsp=="": Index: extensions_win32.ini =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/freeze/extensions_win32.ini,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** extensions_win32.ini 1998/08/25 14:06:53 1.2 --- extensions_win32.ini 2000/07/13 15:45:17 1.3 *************** *** 10,16 **** --- 10,61 ---- ; to point to the root win32 extensions directory + ; PYTHONPREFIX must point to the Python build root directory + ; (the *parent* of PCbuild); normally the freeze script takes + ; care of this. + + + + ;-------------------------------------------------------------- ; + ; Standard Python extension modules + ; + + ; Here are some of the standard Python extensions modules. + ; If you need others, add them here + + [_socket] + dsp=%PYTHONPREFIX%\PCBuild\_socket.dsp + + [_sre] + dsp=%PYTHONPREFIX%\PCBuild\_sre.dsp + + [unicodedata] + dsp=%PYTHONPREFIX%\PCBuild\unicodedata.dsp + + [mmap] + dsp=%PYTHONPREFIX%\PCBuild\mmap.dsp + + [winsound] + dsp=%PYTHONPREFIX%\PCBuild\winsound.dsp + libs=winmm.lib + + [parser] + dsp=%PYTHONPREFIX%\PCBuild\parser.dsp + + [select] + dsp=%PYTHONPREFIX%\PCBuild\select.dsp + + [ucnhash] + dsp=%PYTHONPREFIX%\PCBuild\ucnhash.dsp + + [zlib] + dsp=%PYTHONPREFIX%\PCBuild\zlib.dsp + cl=/I %PYTHONPREFIX%\..\zlib113 /D WINDOWS /D _WINDOWS /D ZLIB_DLL /D WIN32 + libs=%PYTHONPREFIX%\..\zlib113dll\static32\zlibstat.lib /nodefaultlib:libc + + ;-------------------------------------------------------------- + ; ; Win32 Projects. ; *************** *** 40,43 **** --- 85,92 ---- cl=/I %PYTHONEX%\win32\src + [win32process] + dsp=%PYTHONEX%\win32\win32process.dsp + cl=/I %PYTHONEX%\win32\src + [win32event] dsp=%PYTHONEX%\win32\win32event.dsp *************** *** 82,85 **** --- 131,138 ---- cl=/I %PYTHONEX%\com\win32com\src\include /I %PYTHONEX%\win32\src libs=uuid.lib + + [win32com.axcontrol.axcontrol] + dsp=%PYTHONEX%\com\axcontrol.dsp + cl=/I %PYTHONEX%\win32\src /I %PYTHONEX%\com\win32com\src\include [win32com.axscript.axscript] Index: freeze.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/freeze/freeze.py,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** freeze.py 2000/05/06 03:18:08 1.35 --- freeze.py 2000/07/13 15:45:17 1.36 *************** *** 113,117 **** # default the exclude list for each platform if win: exclude = exclude + [ ! 'dos', 'dospath', 'mac', 'macpath', 'macfs', 'MACFS', 'posix', 'os2'] # modules that are imported by the Python runtime --- 113,117 ---- # default the exclude list for each platform if win: exclude = exclude + [ ! 'dos', 'dospath', 'mac', 'macpath', 'macfs', 'MACFS', 'posix', 'os2', 'ce'] # modules that are imported by the Python runtime *************** *** 377,381 **** # (including its source files) frozen_extensions = checkextensions_win32.checkextensions( ! unknown, extensions) for mod in frozen_extensions: unknown.remove(mod.name) --- 377,381 ---- # (including its source files) frozen_extensions = checkextensions_win32.checkextensions( ! unknown, extensions, prefix) for mod in frozen_extensions: unknown.remove(mod.name) Index: winmakemakefile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/freeze/winmakemakefile.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** winmakemakefile.py 1999/11/02 15:44:40 1.10 --- winmakemakefile.py 2000/07/13 15:45:17 1.11 *************** *** 52,55 **** --- 52,56 ---- def realwork(vars, moddefns, target): + version_suffix = `sys.version_info[0]`+`sys.version_info[1]` print "# Makefile for Microsoft Visual C++ generated by freeze.py script" print *************** *** 73,77 **** print '# The following line assumes you have built Python using the standard instructions' print '# Otherwise fix the following line to point to the library.' ! print 'pythonlib = "$(pythonhome)/pcbuild/python15$(debug_suffix).lib"' print --- 74,78 ---- print '# The following line assumes you have built Python using the standard instructions' print '# Otherwise fix the following line to point to the library.' ! print 'pythonlib = "$(pythonhome)/pcbuild/python%s$(debug_suffix).lib"' % version_suffix print *************** *** 88,92 **** ! print "# As the target uses Python15.dll, we must use this compiler option!" print "cdl = /MD" print --- 89,93 ---- ! print "# As the target uses Python%s.dll, we must use this compiler option!" % version_suffix print "cdl = /MD" print From python-dev@python.org Thu Jul 13 20:39:18 2000 From: python-dev@python.org (Jeremy Hylton) Date: Thu, 13 Jul 2000 12:39:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include abstract.h,2.22,2.23 Message-ID: <200007131939.MAA18030@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv18016/Include Modified Files: abstract.h Log Message: fix PyXXX_Length macros as suggested by Fred Index: abstract.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/abstract.h,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** abstract.h 2000/07/12 12:56:18 2.22 --- abstract.h 2000/07/13 19:39:15 2.23 *************** *** 384,388 **** DL_IMPORT(int) PyObject_Size(PyObject *o); ! #define PyObject_Length(O) PyObject_Size((O)) /* --- 384,388 ---- DL_IMPORT(int) PyObject_Size(PyObject *o); ! #define PyObject_Length PyObject_Size /* *************** *** 686,690 **** DL_IMPORT(int) PySequence_Size(PyObject *o); ! #define PySequence_Length(O) PySequence_Size((O)) /* --- 686,690 ---- DL_IMPORT(int) PySequence_Size(PyObject *o); ! #define PySequence_Length PySequence_Size /* *************** *** 840,844 **** DL_IMPORT(int) PyMapping_Size(PyObject *o); ! #define PyMapping_Length(O) PyMapping_Size((O)) /* --- 840,844 ---- DL_IMPORT(int) PyMapping_Size(PyObject *o); ! #define PyMapping_Length PyMapping_Size /* From python-dev@python.org Thu Jul 13 21:25:47 2000 From: python-dev@python.org (Jeremy Hylton) Date: Thu, 13 Jul 2000 13:25:47 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.1,1.2 Message-ID: <200007132025.NAA28269@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv28254 Modified Files: pep-0000.txt Log Message: added names of owners (hope they're right) Barry can fix them if they aren't Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0000.txt 2000/07/13 06:33:08 1.1 --- pep-0000.txt 2000/07/13 20:25:45 1.2 *************** *** 14,26 **** Index ! num filename title ! ---- -------- ----- ! 0 pep-0000.txt Index of Python Enhance Proposals ! 1 pep-0001.txt PEP Guidelines ! 200 pep-0200.txt Python 2.0 Release Schedule ! 201 pep-0201.txt Parallel Iteration ! 202 pep-0202.txt List Comprehensions ! 203 pep-0203.txt Augmented Assignments --- 14,26 ---- Index ! num filename title owner ! ---- -------- ----- ----- ! 0 pep-0000.txt Index of Python Enhance Proposals bwarsaw ! 1 pep-0001.txt PEP Guidelines bwarsaw, jhylton ! 200 pep-0200.txt Python 2.0 Release Schedule jhylton ! 201 pep-0201.txt Parallel Iteration bwarsaw ! 202 pep-0202.txt List Comprehensions tim_one ! 203 pep-0203.txt Augmented Assignments guido From python-dev@python.org Thu Jul 13 21:52:42 2000 From: python-dev@python.org (Jeremy Hylton) Date: Thu, 13 Jul 2000 13:52:42 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.2,1.3 Message-ID: <200007132052.NAA30355@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv30336 Modified Files: pep-0000.txt Log Message: believe twouters is actually responsible for 203 Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pep-0000.txt 2000/07/13 20:25:45 1.2 --- pep-0000.txt 2000/07/13 20:52:39 1.3 *************** *** 22,26 **** 201 pep-0201.txt Parallel Iteration bwarsaw 202 pep-0202.txt List Comprehensions tim_one ! 203 pep-0203.txt Augmented Assignments guido --- 22,26 ---- 201 pep-0201.txt Parallel Iteration bwarsaw 202 pep-0202.txt List Comprehensions tim_one ! 203 pep-0203.txt Augmented Assignments twouters From python-dev@python.org Thu Jul 13 22:11:00 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Thu, 13 Jul 2000 14:11:00 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules arraymodule.c,2.47,2.48 Message-ID: <200007132111.OAA03982@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv3739 Modified Files: arraymodule.c Log Message: ANSI-fication (got lost in the deep seas of source forge ) Index: arraymodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v retrieving revision 2.47 retrieving revision 2.48 diff -C2 -r2.47 -r2.48 *** arraymodule.c 2000/07/09 03:09:55 2.47 --- arraymodule.c 2000/07/13 21:10:57 2.48 *************** *** 59,65 **** static PyObject * ! c_getitem(ap, i) ! arrayobject *ap; ! int i; { return PyString_FromStringAndSize(&((char *)ap->ob_item)[i], 1); --- 59,63 ---- static PyObject * ! c_getitem(arrayobject *ap, int i) { return PyString_FromStringAndSize(&((char *)ap->ob_item)[i], 1); *************** *** 67,74 **** static int ! c_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { char x; --- 65,69 ---- static int ! c_setitem(arrayobject *ap, int i, PyObject *v) { char x; *************** *** 81,87 **** static PyObject * ! b_getitem(ap, i) ! arrayobject *ap; ! int i; { long x = ((char *)ap->ob_item)[i]; --- 76,80 ---- static PyObject * ! b_getitem(arrayobject *ap, int i) { long x = ((char *)ap->ob_item)[i]; *************** *** 92,99 **** static int ! b_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { short x; --- 85,89 ---- static int ! b_setitem(arrayobject *ap, int i, PyObject *v) { short x; *************** *** 119,125 **** static PyObject * ! BB_getitem(ap, i) ! arrayobject *ap; ! int i; { long x = ((unsigned char *)ap->ob_item)[i]; --- 109,113 ---- static PyObject * ! BB_getitem(arrayobject *ap, int i) { long x = ((unsigned char *)ap->ob_item)[i]; *************** *** 128,135 **** static int ! BB_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { unsigned char x; --- 116,120 ---- static int ! BB_setitem(arrayobject *ap, int i, PyObject *v) { unsigned char x; *************** *** 143,149 **** static PyObject * ! h_getitem(ap, i) ! arrayobject *ap; ! int i; { return PyInt_FromLong((long) ((short *)ap->ob_item)[i]); --- 128,132 ---- static PyObject * ! h_getitem(arrayobject *ap, int i) { return PyInt_FromLong((long) ((short *)ap->ob_item)[i]); *************** *** 151,158 **** static int ! h_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { short x; --- 134,138 ---- static int ! h_setitem(arrayobject *ap, int i, PyObject *v) { short x; *************** *** 166,172 **** static PyObject * ! HH_getitem(ap, i) ! arrayobject *ap; ! int i; { return PyInt_FromLong((long) ((unsigned short *)ap->ob_item)[i]); --- 146,150 ---- static PyObject * ! HH_getitem(arrayobject *ap, int i) { return PyInt_FromLong((long) ((unsigned short *)ap->ob_item)[i]); *************** *** 174,181 **** static int ! HH_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { int x; --- 152,156 ---- static int ! HH_setitem(arrayobject *ap, int i, PyObject *v) { int x; *************** *** 200,206 **** static PyObject * ! i_getitem(ap, i) ! arrayobject *ap; ! int i; { return PyInt_FromLong((long) ((int *)ap->ob_item)[i]); --- 175,179 ---- static PyObject * ! i_getitem(arrayobject *ap, int i) { return PyInt_FromLong((long) ((int *)ap->ob_item)[i]); *************** *** 208,215 **** static int ! i_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { int x; --- 181,185 ---- static int ! i_setitem(arrayobject *ap, int i, PyObject *v) { int x; *************** *** 223,229 **** static PyObject * ! II_getitem(ap, i) ! arrayobject *ap; ! int i; { return PyLong_FromUnsignedLong( --- 193,197 ---- static PyObject * ! II_getitem(arrayobject *ap, int i) { return PyLong_FromUnsignedLong( *************** *** 232,239 **** static int ! II_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { unsigned long x; --- 200,204 ---- static int ! II_setitem(arrayobject *ap, int i, PyObject *v) { unsigned long x; *************** *** 267,273 **** static PyObject * ! l_getitem(ap, i) ! arrayobject *ap; ! int i; { return PyInt_FromLong(((long *)ap->ob_item)[i]); --- 232,236 ---- static PyObject * ! l_getitem(arrayobject *ap, int i) { return PyInt_FromLong(((long *)ap->ob_item)[i]); *************** *** 275,282 **** static int ! l_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { long x; --- 238,242 ---- static int ! l_setitem(arrayobject *ap, int i, PyObject *v) { long x; *************** *** 289,295 **** static PyObject * ! LL_getitem(ap, i) ! arrayobject *ap; ! int i; { return PyLong_FromUnsignedLong(((unsigned long *)ap->ob_item)[i]); --- 249,253 ---- static PyObject * ! LL_getitem(arrayobject *ap, int i) { return PyLong_FromUnsignedLong(((unsigned long *)ap->ob_item)[i]); *************** *** 297,304 **** static int ! LL_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { unsigned long x; --- 255,259 ---- static int ! LL_setitem(arrayobject *ap, int i, PyObject *v) { unsigned long x; *************** *** 332,338 **** static PyObject * ! f_getitem(ap, i) ! arrayobject *ap; ! int i; { return PyFloat_FromDouble((double) ((float *)ap->ob_item)[i]); --- 287,291 ---- static PyObject * ! f_getitem(arrayobject *ap, int i) { return PyFloat_FromDouble((double) ((float *)ap->ob_item)[i]); *************** *** 340,347 **** static int ! f_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { float x; --- 293,297 ---- static int ! f_setitem(arrayobject *ap, int i, PyObject *v) { float x; *************** *** 354,360 **** static PyObject * ! d_getitem(ap, i) ! arrayobject *ap; ! int i; { return PyFloat_FromDouble(((double *)ap->ob_item)[i]); --- 304,308 ---- static PyObject * ! d_getitem(arrayobject *ap, int i) { return PyFloat_FromDouble(((double *)ap->ob_item)[i]); *************** *** 362,369 **** static int ! d_setitem(ap, i, v) ! arrayobject *ap; ! int i; ! PyObject *v; { double x; --- 310,314 ---- static int ! d_setitem(arrayobject *ap, int i, PyObject *v) { double x; *************** *** 394,400 **** static PyObject * ! newarrayobject(size, descr) ! int size; ! struct arraydescr *descr; { arrayobject *op; --- 339,343 ---- static PyObject * ! newarrayobject(int size, struct arraydescr *descr) { arrayobject *op; *************** *** 429,434 **** #if 0 static int ! getarraysize(op) ! PyObject *op; { if (!is_arrayobject(op)) { --- 372,376 ---- #if 0 static int ! getarraysize(PyObject *op) { if (!is_arrayobject(op)) { *************** *** 441,447 **** static PyObject * ! getarrayitem(op, i) ! PyObject *op; ! int i; { register arrayobject *ap; --- 383,387 ---- static PyObject * ! getarrayitem(PyObject *op, int i) { register arrayobject *ap; *************** *** 459,466 **** static int ! ins1(self, where, v) ! arrayobject *self; ! int where; ! PyObject *v; { char *items; --- 399,403 ---- static int ! ins1(arrayobject *self, int where, PyObject *v) { char *items; *************** *** 492,499 **** #if 0 static int ! insarrayitem(op, where, newitem) ! PyObject *op; ! int where; ! PyObject *newitem; { if (!is_arrayobject(op)) { --- 429,433 ---- #if 0 static int ! insarrayitem(PyObject *op, int where, PyObject *newitem) { if (!is_arrayobject(op)) { *************** *** 505,511 **** static int ! addarrayitem(op, newitem) ! PyObject *op; ! PyObject *newitem; { if (!is_arrayobject(op)) { --- 439,443 ---- static int ! addarrayitem(PyObject *op, PyObject *newitem) { if (!is_arrayobject(op)) { *************** *** 521,526 **** static void ! array_dealloc(op) ! arrayobject *op; { if (op->ob_item != NULL) --- 453,457 ---- static void ! array_dealloc(arrayobject *op) { if (op->ob_item != NULL) *************** *** 530,535 **** static int ! array_compare(v, w) ! arrayobject *v, *w; { int len = (v->ob_size < w->ob_size) ? v->ob_size : w->ob_size; --- 461,465 ---- static int ! array_compare(arrayobject *v, arrayobject *w) { int len = (v->ob_size < w->ob_size) ? v->ob_size : w->ob_size; *************** *** 553,558 **** static int ! array_length(a) ! arrayobject *a; { return a->ob_size; --- 483,487 ---- static int ! array_length(arrayobject *a) { return a->ob_size; *************** *** 560,566 **** static PyObject * ! array_item(a, i) ! arrayobject *a; ! int i; { if (i < 0 || i >= a->ob_size) { --- 489,493 ---- static PyObject * ! array_item(arrayobject *a, int i) { if (i < 0 || i >= a->ob_size) { *************** *** 572,578 **** static PyObject * ! array_slice(a, ilow, ihigh) ! arrayobject *a; ! int ilow, ihigh; { arrayobject *np; --- 499,503 ---- static PyObject * ! array_slice(arrayobject *a, int ilow, int ihigh) { arrayobject *np; *************** *** 596,602 **** static PyObject * ! array_concat(a, bb) ! arrayobject *a; ! PyObject *bb; { int size; --- 521,525 ---- static PyObject * ! array_concat(arrayobject *a, PyObject *bb) { int size; *************** *** 626,632 **** static PyObject * ! array_repeat(a, n) ! arrayobject *a; ! int n; { int i; --- 549,553 ---- static PyObject * ! array_repeat(arrayobject *a, int n) { int i; *************** *** 651,658 **** static int ! array_ass_slice(a, ilow, ihigh, v) ! arrayobject *a; ! int ilow, ihigh; ! PyObject *v; { char *item; --- 572,576 ---- static int ! array_ass_slice(arrayobject *a, int ilow, int ihigh, PyObject *v) { char *item; *************** *** 725,732 **** static int ! array_ass_item(a, i, v) ! arrayobject *a; ! int i; ! PyObject *v; { if (i < 0 || i >= a->ob_size) { --- 643,647 ---- static int ! array_ass_item(arrayobject *a, int i, PyObject *v) { if (i < 0 || i >= a->ob_size) { *************** *** 741,748 **** static int ! setarrayitem(a, i, v) ! PyObject *a; ! int i; ! PyObject *v; { if (!is_arrayobject(a)) { --- 656,660 ---- static int ! setarrayitem(PyObject *a, int i, PyObject *v) { if (!is_arrayobject(a)) { *************** *** 754,761 **** static PyObject * ! ins(self, where, v) ! arrayobject *self; ! int where; ! PyObject *v; { if (ins1(self, where, v) != 0) --- 666,670 ---- static PyObject * ! ins(arrayobject *self, int where, PyObject *v) { if (ins1(self, where, v) != 0) *************** *** 766,772 **** static PyObject * ! array_insert(self, args) ! arrayobject *self; ! PyObject *args; { int i; --- 675,679 ---- static PyObject * ! array_insert(arrayobject *self, PyObject *args) { int i; *************** *** 784,790 **** static PyObject * ! array_buffer_info(self, args) ! arrayobject *self; ! PyObject *args; { PyObject* retval = PyTuple_New(2); --- 691,695 ---- static PyObject * ! array_buffer_info(arrayobject *self, PyObject *args) { PyObject* retval = PyTuple_New(2); *************** *** 805,811 **** static PyObject * ! array_append(self, args) ! arrayobject *self; ! PyObject *args; { PyObject *v; --- 710,714 ---- static PyObject * ! array_append(arrayobject *self, PyObject *args) { PyObject *v; *************** *** 822,828 **** static PyObject * ! array_byteswap(self, args) ! arrayobject *self; ! PyObject *args; { char *p; --- 725,729 ---- static PyObject * ! array_byteswap(arrayobject *self, PyObject *args) { char *p; *************** *** 884,890 **** static PyObject * ! array_reverse(self, args) ! arrayobject *self; ! PyObject *args; { register int itemsize = self->ob_descr->itemsize; --- 785,789 ---- static PyObject * ! array_reverse(arrayobject *self, PyObject *args) { register int itemsize = self->ob_descr->itemsize; *************** *** 923,929 **** #if 0 static PyObject * ! array_index(self, args) ! arrayobject *self; ! PyObject *args; { int i; --- 822,826 ---- #if 0 static PyObject * ! array_index(arrayobject *self, PyObject *args) { int i; *************** *** 945,951 **** #if 0 static PyObject * ! array_count(self, args) ! arrayobject *self; ! PyObject *args; { int count = 0; --- 842,846 ---- #if 0 static PyObject * ! array_count(arrayobject *self, PyObject *args) { int count = 0; *************** *** 967,973 **** #if 0 static PyObject * ! array_remove(self, args) ! arrayobject *self; ! PyObject *args; { int i; --- 862,866 ---- #if 0 static PyObject * ! array_remove(arrayobject *self, PyObject *args) { int i; *************** *** 993,999 **** static PyObject * ! array_fromfile(self, args) ! arrayobject *self; ! PyObject *args; { PyObject *f; --- 886,890 ---- static PyObject * ! array_fromfile(arrayobject *self, PyObject *args) { PyObject *f; *************** *** 1049,1055 **** static PyObject * ! array_tofile(self, args) ! arrayobject *self; ! PyObject *args; { PyObject *f; --- 940,944 ---- static PyObject * ! array_tofile(arrayobject *self, PyObject *args) { PyObject *f; *************** *** 1082,1088 **** static PyObject * ! array_fromlist(self, args) ! arrayobject *self; ! PyObject *args; { int n; --- 971,975 ---- static PyObject * ! array_fromlist(arrayobject *self, PyObject *args) { int n; *************** *** 1129,1135 **** static PyObject * ! array_tolist(self, args) ! arrayobject *self; ! PyObject *args; { PyObject *list = PyList_New(self->ob_size); --- 1016,1020 ---- static PyObject * ! array_tolist(arrayobject *self, PyObject *args) { PyObject *list = PyList_New(self->ob_size); *************** *** 1155,1161 **** static PyObject * ! array_fromstring(self, args) ! arrayobject *self; ! PyObject *args; { char *str; --- 1040,1044 ---- static PyObject * ! array_fromstring(arrayobject *self, PyObject *args) { char *str; *************** *** 1194,1200 **** static PyObject * ! array_tostring(self, args) ! arrayobject *self; ! PyObject *args; { if (!PyArg_Parse(args, "")) --- 1077,1081 ---- static PyObject * ! array_tostring(arrayobject *self, PyObject *args) { if (!PyArg_Parse(args, "")) *************** *** 1233,1239 **** static PyObject * ! array_getattr(a, name) ! arrayobject *a; ! char *name; { if (strcmp(name, "typecode") == 0) { --- 1114,1118 ---- static PyObject * ! array_getattr(arrayobject *a, char *name) { if (strcmp(name, "typecode") == 0) { *************** *** 1262,1269 **** static int ! array_print(a, fp, flags) ! arrayobject *a; ! FILE *fp; ! int flags; { int ok = 0; --- 1141,1145 ---- static int ! array_print(arrayobject *a, FILE *fp, int flags) { int ok = 0; *************** *** 1296,1301 **** static PyObject * ! array_repr(a) ! arrayobject *a; { char buf[256]; --- 1172,1176 ---- static PyObject * ! array_repr(arrayobject *a) { char buf[256]; *************** *** 1334,1341 **** static int ! array_buffer_getreadbuf(self, index, ptr) ! arrayobject *self; ! int index; ! const void **ptr; { if ( index != 0 ) { --- 1209,1213 ---- static int ! array_buffer_getreadbuf(arrayobject *self, int index, const void **ptr) { if ( index != 0 ) { *************** *** 1349,1356 **** static int ! array_buffer_getwritebuf(self, index, ptr) ! arrayobject *self; ! int index; ! const void **ptr; { if ( index != 0 ) { --- 1221,1225 ---- static int ! array_buffer_getwritebuf(arrayobject *self, int index, const void **ptr) { if ( index != 0 ) { *************** *** 1364,1370 **** static int ! array_buffer_getsegcount(self, lenp) ! arrayobject *self; ! int *lenp; { if ( lenp ) --- 1233,1237 ---- static int ! array_buffer_getsegcount(arrayobject *self, int *lenp) { if ( lenp ) *************** *** 1393,1399 **** static PyObject * ! a_array(self, args) ! PyObject *self; ! PyObject *args; { char c; --- 1260,1264 ---- static PyObject * ! a_array(PyObject *self, PyObject *args) { char c; From python-dev@python.org Fri Jul 14 00:56:56 2000 From: python-dev@python.org (A.M. Kuchling) Date: Thu, 13 Jul 2000 16:56:56 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include fileobject.h,2.20,2.21 Message-ID: <200007132356.QAA29091@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv29070/Include Modified Files: fileobject.h Log Message: Added PyObject_AsFileDescriptor, which checks for integer, long integer, or .fileno() method Index: fileobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/fileobject.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** fileobject.h 2000/07/09 00:20:36 2.20 --- fileobject.h 2000/07/13 23:56:54 2.21 *************** *** 31,34 **** --- 31,35 ---- extern DL_IMPORT(int) PyFile_SoftSpace(PyObject *, int); extern DL_IMPORT(int) PyFile_WriteString(char *, PyObject *); + extern DL_IMPORT(int) PyObject_AsFileDescriptor(PyObject *); #ifdef __cplusplus From python-dev@python.org Fri Jul 14 00:56:56 2000 From: python-dev@python.org (A.M. Kuchling) Date: Thu, 13 Jul 2000 16:56:56 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects fileobject.c,2.80,2.81 Message-ID: <200007132356.QAA29095@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv29070/Objects Modified Files: fileobject.c Log Message: Added PyObject_AsFileDescriptor, which checks for integer, long integer, or .fileno() method Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.80 retrieving revision 2.81 diff -C2 -r2.80 -r2.81 *** fileobject.c 2000/07/09 05:02:18 2.80 --- fileobject.c 2000/07/13 23:56:54 2.81 *************** *** 1099,1100 **** --- 1099,1158 ---- return -1; } + + /* Try to get a file-descriptor from a Python object. If the object + is an integer or long integer, its value is returned. If not, the + object's fileno() method is called if it exists; the method must return + an integer or long integer, which is returned as the file descriptor value. + -1 is returned on failure. + */ + + int PyObject_AsFileDescriptor(PyObject *o) + { + int fd; + PyObject *meth; + + if (PyInt_Check(o)) { + fd = PyInt_AsLong(o); + } + else if (PyLong_Check(o)) { + fd = PyLong_AsLong(o); + } + else if ((meth = PyObject_GetAttrString(o, "fileno")) != NULL) + { + PyObject *fno = PyEval_CallObject(meth, NULL); + Py_DECREF(meth); + if (fno == NULL) + return -1; + + if (PyInt_Check(fno)) { + fd = PyInt_AsLong(fno); + Py_DECREF(fno); + } + else if (PyLong_Check(fno)) { + fd = PyLong_AsLong(fno); + Py_DECREF(fno); + } + else { + PyErr_SetString(PyExc_TypeError, + "fileno() returned a non-integer"); + Py_DECREF(fno); + return -1; + } + } + else { + PyErr_SetString(PyExc_TypeError, + "argument must be an int, or have a fileno() method."); + return -1; + } + + if (fd < 0) { + PyErr_Format(PyExc_ValueError, + "file descriptor cannot be a negative integer (%i)", + fd); + return -1; + } + return fd; + } + + + From python-dev@python.org Fri Jul 14 00:58:18 2000 From: python-dev@python.org (A.M. Kuchling) Date: Thu, 13 Jul 2000 16:58:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/api api.tex,1.73,1.74 refcounts.dat,1.11,1.12 Message-ID: <200007132358.QAA29152@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/api In directory slayer.i.sourceforge.net:/tmp/cvs-serv29126 Modified Files: api.tex refcounts.dat Log Message: Document PyObject_AsFileDescriptor Index: api.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/api.tex,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -r1.73 -r1.74 *** api.tex 2000/07/07 15:47:06 1.73 --- api.tex 2000/07/13 23:58:16 1.74 *************** *** 1420,1423 **** --- 1420,1430 ---- \end{cfuncdesc} + \begin{cfuncdesc}{int}{PyObject_AsFileDescriptor}{PyObject *o} + Derives a file-descriptor from a Python object. If the object + is an integer or long integer, its value is returned. If not, the + object's \method{fileno()} method is called if it exists; the method + must return an integer or long integer, which is returned as the file + descriptor value. Returns \code{-1} on failure. + \end{cfuncdesc} \section{Number Protocol \label{number}} Index: refcounts.dat =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/refcounts.dat,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** refcounts.dat 2000/07/07 15:48:54 1.11 --- refcounts.dat 2000/07/13 23:58:16 1.12 *************** *** 540,543 **** --- 540,546 ---- PyOS_GetLastModificationTime:char*:filename:: + PyObject_AsFileDescriptor:int::: + PyObject_AsFileDescriptor:PyObject*:o:0: + PyObject_CallFunction:PyObject*::+1: PyObject_CallFunction:PyObject*:callable_object:0: From python-dev@python.org Fri Jul 14 00:59:37 2000 From: python-dev@python.org (A.M. Kuchling) Date: Thu, 13 Jul 2000 16:59:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _tkinter.c,1.106,1.107 selectmodule.c,2.37,2.38 Message-ID: <200007132359.QAA29193@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv29178 Modified Files: _tkinter.c selectmodule.c Log Message: Use PyObject_AsFileDescriptor Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.106 retrieving revision 1.107 diff -C2 -r1.106 -r1.107 *** _tkinter.c 2000/07/12 13:05:33 1.106 --- _tkinter.c 2000/07/13 23:59:35 1.107 *************** *** 1427,1472 **** } - static int - GetFileNo(PyObject *file) - /* Either an int >= 0 or an object with a - *.fileno() method that returns an int >= 0 - */ - { - PyObject *meth, *args, *res; - int id; - if (PyInt_Check(file)) { - id = PyInt_AsLong(file); - if (id < 0) - PyErr_SetString(PyExc_ValueError, "invalid file id"); - return id; - } - args = PyTuple_New(0); - if (args == NULL) - return -1; - - meth = PyObject_GetAttrString(file, "fileno"); - if (meth == NULL) { - Py_DECREF(args); - return -1; - } - - res = PyEval_CallObject(meth, args); - Py_DECREF(args); - Py_DECREF(meth); - if (res == NULL) - return -1; - - if (PyInt_Check(res)) - id = PyInt_AsLong(res); - else - id = -1; - - if (id < 0) - PyErr_SetString(PyExc_ValueError, - "invalid fileno() return value"); - Py_DECREF(res); - return id; - } - static PyObject * Tkapp_CreateFileHandler(PyObject *self, PyObject *args) --- 1427,1430 ---- *************** *** 1479,1483 **** if (!PyArg_ParseTuple(args, "OiO:createfilehandler", &file, &mask, &func)) return NULL; ! tfile = GetFileNo(file); if (tfile < 0) return NULL; --- 1437,1441 ---- if (!PyArg_ParseTuple(args, "OiO:createfilehandler", &file, &mask, &func)) return NULL; ! tfile = PyObject_AsFileDescriptor(file); if (tfile < 0) return NULL; *************** *** 1507,1511 **** if (!PyArg_ParseTuple(args, "O:deletefilehandler", &file)) return NULL; ! tfile = GetFileNo(file); if (tfile < 0) return NULL; --- 1465,1469 ---- if (!PyArg_ParseTuple(args, "O:deletefilehandler", &file)) return NULL; ! tfile = PyObject_AsFileDescriptor(file); if (tfile < 0) return NULL; Index: selectmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v retrieving revision 2.37 retrieving revision 2.38 diff -C2 -r2.37 -r2.38 *** selectmodule.c 2000/07/11 21:35:02 2.37 --- selectmodule.c 2000/07/13 23:59:35 2.38 *************** *** 97,125 **** Py_INCREF(o); - if (PyInt_Check(o)) { - v = PyInt_AsLong(o); - } - else if ((meth = PyObject_GetAttrString(o, "fileno")) != NULL) - { - PyObject *fno = PyEval_CallObject(meth, NULL); - Py_DECREF(meth); - if (fno == NULL) - goto finally; - - if (!PyInt_Check(fno)) { - PyErr_SetString(PyExc_TypeError, - "fileno method returned a non-integer"); - Py_DECREF(fno); - goto finally; - } - v = PyInt_AsLong(fno); - Py_DECREF(fno); - } - else { - PyErr_SetString(PyExc_TypeError, - "argument must be an int, or have a fileno() method."); - goto finally; - } #if defined(_MSC_VER) max = 0; /* not used for Win32 */ --- 97,103 ---- Py_INCREF(o); + v = PyObject_AsFileDescriptor( o ); + if (v == -1) goto finally; #if defined(_MSC_VER) max = 0; /* not used for Win32 */ From python-dev@python.org Fri Jul 14 02:28:50 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Thu, 13 Jul 2000 18:28:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc sf-faq.html,NONE,1.1 Message-ID: <200007140128.SAA15033@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv14976 Added Files: sf-faq.html Log Message: small FAQ about Python CVS and patches at SourceForge --- NEW FILE ---

      Python at SourceForge - Frequently Asked Questions

      0. Contents

      1. General

      1. What is SourceForge?
      2. Where do I find Python there?

      2. CVS

      1. How do I check out a CVS version of Python?
      2. What settings should I use?
      3. Troubleshooting: "Permission Denied"
      4. Where can I learn more about CVS?

      3. Patches

      1. How to make a patch?
      2. How to submit patches?
      3. How to change the status of a patch?

      A. Appendix

      1. Patch Manager Guidelines [09.07.2000]
      2. Python Patch Submission Guidelines [29.06.2000]

      1. General

      1.1.:

      Q: What is SourceForge?

      A:

      SourceForge is a free hosting service for OpenSource projects. The main website is found at
      http://sourceforge.net

      1.2.:

      Q: Where can I find Python on SourceForge?

      A:

      The Python project page can be found at
      http://sourceforge.net/projects/python

      2. CVS

      2.1.:

      Q: How do I check out a CVS version of Python?

      A:

      If  you are not a SourceForge-recognized Python developer you can still check out an anonymous CVS version (read-only) of Python:
      export CVSROOT=:pserver:anonymous@cvs.python.sourceforge.net:/cvsroot/python
      cvs login
      cvs -z3 co python
      If you are indeed a developer you can check out a read/write version with ssh:
      export CVS_RSH=ssh
      export CVSROOT=sf_username@cvs.python.sourceforge.net:/cvsroot/python
      cvs -z3 co python

      2.2.:

      Q:  What setting should I use?

      A:

      That is, of course, hard to answer in the general case. I use the following .cvsrc file:
      diff -c
      update -d
      This defaults diff to context diffs (almost a requirement as everything else is harder to read) and tells update to automatically checkout new subdirectories.

      2.3.:

      Q: I get the following error message:

      Sorry, you don't have read/write access to the history file /cvsroot/python/CVSROOT/history
      Permission denied

      A:

      If you are not a developer, you don't have read/write access. You have to check out an anonymous copy. If you are a developer you have to be in the SourceForge group "python". You can check this with the following commands:
      ssh -l sf_username shell.sourceforge.net
      groups
      If you have just recently (< 6 hours) been added to the Python project, you probably have to wait for the SourceForge servers to synch up. This can take up to 6 hours.

      2.4.:

      Q: Where can I learn more about CVS?

      A:

      For SourceForge specific information consult their CVS documentation at
      http://sfdocs.sourceforge.net/sfdocs
      For general (and more advanced) information consult the free CVS Book at
      http://cvsbook.red-bean.com/cvsbook.html#Introduction

      3. Patches

      3.1.:

      Q: How to make a patch?

      A:

      If you are using CVS (anonymous or developer) you can use CVS to make the patches for you. Just edit your local copy and enter the following command:
      cvs diff | tee ~/name_of_the_patch.diff
      Else you can use the diff util which comes with most operating systems (a Windows version is available as part of the cygwin tools).
       

      3.2.:

      Q: How to submit a patch?

      A:

      Please read the Patch Submission Guidelines at
      http://www.python.org/patches
      A recent copy can be found in the Appendix of this FAQ.
       

      3.3.:

      Q: How to change the status of a patch?

      A:

      To change the status of a patch or assign it to somebody else you have to be a) a SourceForge-recognized Python developer and b) a patch administrator. Unfortunately the SourceForge default for developers is not to be patch administrators. Contact one of the project administrators if the following does not work for you.

      Click on the patch itself. In the screen that comes up, there is a drop-box for "Assigned To:" and a drop-box for "Status:" where you can select a new responsible developer or a new status respectively. After selecting the appropriate victim and status, hit the "Submit Changes" button at the bottom of the page.

      For more information about the use of the "Status:" and "Assigned To:" fields consult the Patch Manager Guidelines. A recent copy can be found in the Appendix of this FAQ.
       

      A. Appendix

      A.1.: Patch Manager Guidelines

      Intended use of SourceForge patch status & "assigned to" fields

      revision 2                                          09-Jul-2000

      In general, the status field should be close to self-explanatory, and the "Assigned to:" field should be the person responsible for taking the next step in the patch process.  Both fields are expected to change value over the life of a patch; the normal workflow is detailed below.

      When you've got the time and the ability, feel free to move any patch that catches your eye along, whether or not it's been assigned to you.  And if you're assigned to a patch but aren't going to take reasonably quick action (for whatever reason), please assign it to someone else ASAP:  at those times you can't actively help, actively get out of the way.

      If you're an expert in some area and know that a patch in that area is both needed and non-controversial, just commit your changes directly -- no need then to get the patch mechanism involved in it.

      You should add a comment to every patch assigned to you at least once a week, if only to say that you realize it's still on your plate.  This rule is meant to force your attention periodically:  patches get harder & harder to deal with the longer they sit.
       

      Open

      The initial status of all patches.
      The patch is under consideration, but has not been reviewed yet.
      The status will normally change to Accepted or Rejected next.
      The person submitting the patch should (if they can) assign it to the person they most want to review it.
      Else the patch will be assigned via [xxx a list of expertise areas should be developed] [xxx but since this hasn't happened and volunteers are too few, random assignment is better than nothing:  if you're a Python developer, expect to get assigned out of the blue!]
      Discussion of major patches is carried out on the Python-Dev mailing list.  For simple patches, the SourceForge comment mechanism should be sufficient. [xxx an email gateway would be great, ditto Ping's Roundup]

      Accepted

      The powers that be accepted the patch, but it hasn't been applied yet. [xxx flesh out -- Guido Bottleneck avoidable here?]
      The status will normally change to Closed next.
      The person changing the status to Accepted should, at the same time, assign the patch to whoever they believe is most likely to be able & willing to apply it (the submitter if possible).

      Closed

      The patch has been accepted and applied.
      The previous status was Accepted, or possibly Open if the submitter was Guido (or moral equivalent in some particular area of expertise).

      Rejected

      The patch has been reviewed and rejected.
      When the objections are addressed, the status may change to Open again.
      The person changing the status to Rejected should assign the patch back to the submitter, or if it's clear the patch will never be accepted, assign it to None.
      Note that SourceForge allows the submitter to overwrite the patch with a new version.

      Out of date

      Previous status was Open or Accepted or Postponed, but the patch no longer works.
      Please enter a comment when changing the status to "Out of date", to record the nature of the problem and the previous status.
      Also assign it back to the submitter, as they need to upload a new version (note that SourceForge will not allow anyone other than the original submitter to update the patch).

      Postponed

      The previous status was Open or Accepted, but for some reason (e.g., pending release) the patch should not be reviewed or applied until further notice.
      The status will normally change to Open or Accepted next.
      Please enter a comment when changing the status to Postponed, to record the reason, the previous status, and the conditions under which the patch should revert to Open or Accepted.  Also assign the patch to whoever is most likely able and willing to decide when the status should change again.

      Deleted

      Bit bucket.
      Use only if it's OK for the patch and its SourceForge history to disappear.
      As of 09-July-2000, SF does not actually throw away Deleted patches, but that may change.

      A.2.: Python Patch Submission Guidelines

      New: CNRI is no longer involved in Python patches. We no longer request legal disclaimers. Also, We're now using the SourceForge Patch Manager (a single mailing list became unmanageable).

      Many people contribute patches to Python. We've set up a new system to deal with these. Here are the main guidelines:

      • Submit your patch to the patch manager interface at SourceForge. We strongly recommend that you register with SourceForge before submitting a patch. If you send patches directly to Guido you introduce an extra delay. Ditto for the "patches@python.org" mailing list address; this address should no longer be used for patch submission. The patch manager is for patches only; if you have a problem or suggestion but don't know how to write the code for it, use the Python Bugs List instead. The bugs list is searchable; if you have a problem and you're not sure if it has been reported or fixed already, this is the first place to look. (There used to be a separate TODO list; we now prefer that you use the bugs list for suggestions and requests too.)

      •  

         
         
         

        Submit documentation patches the same way. When adding the patch, be sure to set the "Category" field to "documentation". For documentation errors without patches, please use the Python Bugs List instead.

      • We like context diffs. We grudgingly accept unified diffs. Straight ("ed-style") diffs are right out! If you don't know how to generate context diffs, you're probably not qualified to produce high-quality patches anyway <0.5 wink>.
      • We appreciate it if you send patches relative to the current CVS tree. These are our latest sources. It's almost a year since Python 1.5.2 was released, and many source files have been touched in more or less significant ways; a patch relative to Python 1.5.2 can cause a lot of extra pain to apply right. Even a patch relative to the latest alpha or beta release may be way out of date.
      • Please add a succinct message to your SourceForge entry that explains what the patch is about that we can use directly as a checkin message. Ideally, such a message explains the problem and describes the fix in a few lines.
      • For patches that add or change functionality: please also update the documentation and the testcases (the Lib/test subdirectory). For new modules, we appreciate a new test module (typically test/test_spam.py). In this case, there's no need to mail the documentation to a different address (in fact, in order to verify that the bundle is complete, it's easier to mail everything together).
      • There are a variety of additional style requirements. Please have a look at these before writing new code. Also have a look at the general Python Style Guide.
      From python-dev@python.org Fri Jul 14 02:43:34 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Thu, 13 Jul 2000 18:43:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc sf-faq.html,1.1,1.2 Message-ID: <200007140143.SAA15879@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv15862 Modified Files: sf-faq.html Log Message: added information how to edit pages at http://python.sourceforge.net Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/sf-faq.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** sf-faq.html 2000/07/14 01:28:47 1.1 --- sf-faq.html 2000/07/14 01:43:31 1.2 *************** *** 23,26 **** --- 23,29 ----
    1. Where do I find Python there?
    2. + +
    3. + How can I change the pages at python.sourceforge.net?
    *************** *** 95,98 **** --- 98,118 ----
    http://sourceforge.net/projects/python
    +

    + 1.3.:

    + +

    + Q: How can I change the pages at python.sourceforge.net?

    + +

    + A:

    + First you have to be in the SourceForge group "python" (true for + all developers). Then you can upload files using scp: +
    scp mylocalfile.html sf_username@shell.sourceforge.net:/home/groups/python/htdocs/
    + If you want to edit or remove files, you can use ssh: +
    ssh -l sf_username shell.sourceforge.net +
    cd /home/groups/python/htdocs +
    rm garbage.html +
    vi changeme.html
    +

    2. CVS

    *************** *** 146,150 **** If you are not a developer, you don't have read/write access. You have to check out an anonymous copy. If you are a developer you have to be in ! the SourceForge group "python". You can check this with the following commands:
    ssh -l sf_username shell.sourceforge.net
    groups
    --- 166,171 ---- If you are not a developer, you don't have read/write access. You have to check out an anonymous copy. If you are a developer you have to be in ! the SourceForge group "python". You can check this with the following ! commands:
    ssh -l sf_username shell.sourceforge.net
    groups
    *************** *** 343,353 **** that you use the bugs list for suggestions and requests too.) !
      !

      !
      !
      !

    Submit documentation patches the same way. When adding the patch, ! be sure to set the "Category" field to "documentation". For ! documentation errors without patches, please use the Python Bugs List instead.

  • --- 364,370 ---- that you use the bugs list for suggestions and requests too.)
  • !


    Submit documentation patches the same way. When adding the ! patch, be sure to set the "Category" field to "documentation". ! For documentation errors without patches, please use the Python Bugs List instead.

  • From python-dev@python.org Fri Jul 14 02:54:05 2000 From: python-dev@python.org (Jeremy Hylton) Date: Thu, 13 Jul 2000 18:54:05 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html - New directory Message-ID: <200007140154.SAA16350@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv16344/sf-html Log Message: Directory /cvsroot/python/python/nondist/sf-html added to the repository From python-dev@python.org Fri Jul 14 04:27:45 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 13 Jul 2000 20:27:45 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.3,1.4 Message-ID: <200007140327.UAA02884@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv2876 Modified Files: pep-0000.txt Log Message: Added PEP204, Range Literals, initially assigned to Thomas Wouters. Slight reformatting. Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** pep-0000.txt 2000/07/13 20:52:39 1.3 --- pep-0000.txt 2000/07/14 03:27:42 1.4 *************** *** 14,27 **** Index ! num filename title owner ! ---- -------- ----- ----- ! 0 pep-0000.txt Index of Python Enhance Proposals bwarsaw ! 1 pep-0001.txt PEP Guidelines bwarsaw, jhylton ! 200 pep-0200.txt Python 2.0 Release Schedule jhylton ! 201 pep-0201.txt Parallel Iteration bwarsaw ! 202 pep-0202.txt List Comprehensions tim_one ! 203 pep-0203.txt Augmented Assignments twouters ! --- 14,27 ---- Index ! num filename title owner ! --- ----------- ----- ----- ! 0 pep-0000.txt Index of Python Enhance Proposals bwarsaw ! 1 pep-0001.txt PEP Guidelines bwarsaw, jhylton ! 200 pep-0200.txt Python 2.0 Release Schedule jhylton ! 201 pep-0201.txt Parallel Iteration bwarsaw ! 202 pep-0202.txt List Comprehensions tim_one ! 203 pep-0203.txt Augmented Assignments twouters ! 204 pep-0204.txt Range Literals twouters From python-dev@python.org Fri Jul 14 04:29:14 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 13 Jul 2000 20:29:14 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0204.txt,NONE,1.1 Message-ID: <200007140329.UAA02938@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv2927 Added Files: pep-0204.txt Log Message: Range Literals PEP, initially assigned to Thomas Wouters. --- NEW FILE --- PEP: 203 Title: Range Literals Version: $Revision: 1.1 $ Owner: thomas@xs4all.net (Thomas Wouters) Python-Version: 2.0 Status: Incomplete Local Variables: mode: indented-text indent-tabs-mode: nil End: From python-dev@python.org Fri Jul 14 04:29:54 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 13 Jul 2000 20:29:54 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0202.txt,1.1,1.2 Message-ID: <200007140329.UAA02988@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv2979 Modified Files: pep-0202.txt Log Message: Assign to Tim Peters. Index: pep-0202.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0202.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0202.txt 2000/07/13 06:33:08 1.1 --- pep-0202.txt 2000/07/14 03:29:52 1.2 *************** *** 2,6 **** Title: List Comprehensions Version: $Revision$ ! Owner: bwarsaw@beopen.com (Barry A. Warsaw) Python-Version: 2.0 Status: Incomplete --- 2,6 ---- Title: List Comprehensions Version: $Revision$ ! Owner: tpeters@beopen.com (Tim Peters) Python-Version: 2.0 Status: Incomplete From python-dev@python.org Fri Jul 14 04:30:22 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 13 Jul 2000 20:30:22 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0203.txt,1.1,1.2 Message-ID: <200007140330.UAA03055@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv3044 Modified Files: pep-0203.txt Log Message: Assign to Thomas Wouters. Index: pep-0203.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0203.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0203.txt 2000/07/13 06:33:08 1.1 --- pep-0203.txt 2000/07/14 03:30:20 1.2 *************** *** 2,8 **** Title: Augmented Assignments Version: $Revision$ ! Owner: bwarsaw@beopen.com (Barry A. Warsaw) Python-Version: 2.0 Status: Incomplete --- 2,9 ---- Title: Augmented Assignments Version: $Revision$ ! Owner: thomas@xs4all.net (Thomas Wouters) Python-Version: 2.0 Status: Incomplete + From python-dev@python.org Fri Jul 14 04:44:03 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 13 Jul 2000 20:44:03 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0205.txt,NONE,1.1 Message-ID: <200007140344.UAA03870@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv3863 Added Files: pep-0205.txt Log Message: Weak References PEP, assigned to Fred Drake --- NEW FILE --- PEP: 205 Title: Weak References Version: $Revision: 1.1 $ Owner: fdrake@beopen.com (Fred Drake) Python-Version: 2.1 Status: Incomplete Local Variables: mode: indented-text indent-tabs-mode: nil End: From python-dev@python.org Fri Jul 14 04:44:29 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 13 Jul 2000 20:44:29 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.4,1.5 Message-ID: <200007140344.UAA03895@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv3887 Modified Files: pep-0000.txt Log Message: PEP 205, Weak References, assigned to Fred Drake Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** pep-0000.txt 2000/07/14 03:27:42 1.4 --- pep-0000.txt 2000/07/14 03:44:27 1.5 *************** *** 24,27 **** --- 24,28 ---- 203 pep-0203.txt Augmented Assignments twouters 204 pep-0204.txt Range Literals twouters + 205 pep-0205.txt Weak References fdrake From python-dev@python.org Fri Jul 14 04:53:56 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 13 Jul 2000 20:53:56 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0206.txt,NONE,1.1 Message-ID: <200007140353.UAA04310@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv4302 Added Files: pep-0206.txt Log Message: 2.0 Batteries Included PEP, owned by Moshe Zadka. The list of standard extensions to include in the 2.0 release. ***** Error reading new file(2, 'No such file or directory') From python-dev@python.org Fri Jul 14 04:54:51 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 13 Jul 2000 20:54:51 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.5,1.6 Message-ID: <200007140354.UAA04353@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv4345 Modified Files: pep-0000.txt Log Message: Added PEP206, called "2.0 Batteries Included", the list of extension modules to include in the fat distribution. Owned by Moshe Zadka. Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** pep-0000.txt 2000/07/14 03:44:27 1.5 --- pep-0000.txt 2000/07/14 03:54:49 1.6 *************** *** 25,28 **** --- 25,29 ---- 204 pep-0204.txt Range Literals twouters 205 pep-0205.txt Weak References fdrake + 206 pep-0206.txt 2.0 Batteries Included moshez From python-dev@python.org Fri Jul 14 05:32:12 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Thu, 13 Jul 2000 21:32:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_b1.py,1.23,1.24 Message-ID: <200007140432.VAA13027@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv13007 Modified Files: test_b1.py Log Message: Break the cycles after testing cmp() on cyclic objects. Index: test_b1.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_b1.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** test_b1.py 2000/06/28 14:48:01 1.23 --- test_b1.py 2000/07/14 04:32:09 1.24 *************** *** 73,76 **** --- 73,78 ---- if cmp(c, a) != 0: raise TestFailed, "cmp(%s, %s)" % (c, a) if cmp(a, c) != 0: raise TestFailed, "cmp(%s, %s)" % (a, c) + # okay, now break the cycles + a.pop(); b.pop(); c.pop() print 'coerce' From python-dev@python.org Fri Jul 14 07:22:57 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Thu, 13 Jul 2000 23:22:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc sf-faq.html,1.2,1.3 Message-ID: <200007140622.XAA32744@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv32383 Modified Files: sf-faq.html Log Message: Gosh - clean up that messy HTML; make it valid XHTML instead. Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/sf-faq.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** sf-faq.html 2000/07/14 01:43:31 1.2 --- sf-faq.html 2000/07/14 06:22:54 1.3 *************** *** 1,406 **** ! ! ! ! - !
    !

    ! Python at SourceForge - Frequently Asked Questions

    !

    ! 0. Contents

    !

    ! 1. General

      !
    1. ! What is SourceForge?
    2. ! !
    3. ! Where do I find Python there?
    4. !
    5. ! How can I change the pages at python.sourceforge.net?
    !

    ! 2. CVS

      !
    1. ! How do I check out a CVS version of Python?
    2. !
    3. ! What settings should I use?
    4. !
    5. ! Troubleshooting: "Permission Denied"
    6. !
    7. ! Where can I learn more about CVS?
    8. !
    !

    ! 3. Patches

    !
      !
    1. ! How to make a patch?
    2. !
    3. ! How to submit patches?
    4. !
    5. ! How to change the status of a patch?
    6. !
    !

    ! A. Appendix

    !
      !
    1. ! Patch Manager Guidelines [09.07.2000]
    2. !
    3. ! Python Patch Submission Guidelines [29.06.2000]
    4. !
    !

    ! 1. General

    !

    ! 1.1.:

    !

    ! Q: What is SourceForge?

    !

    ! A:

    ! SourceForge is a free hosting service ! for OpenSource projects. The main website ! is found at !
    http://sourceforge.net
    !

    ! 1.2.:

    !

    ! Q: Where can I find Python on SourceForge?

    !

    ! A:

    ! The Python project page ! can be found at !
    http://sourceforge.net/projects/python
    !

    ! 1.3.:

    !

    ! Q: How can I change the pages at python.sourceforge.net?

    !

    ! A:

    ! First you have to be in the SourceForge group "python" (true for ! all developers). Then you can upload files using scp: !
    scp mylocalfile.html sf_username@shell.sourceforge.net:/home/groups/python/htdocs/
    ! If you want to edit or remove files, you can use ssh: !
    ssh -l sf_username shell.sourceforge.net !
    cd /home/groups/python/htdocs !
    rm garbage.html !
    vi changeme.html
    ! !

    ! 2. CVS

    ! !

    ! 2.1.:

    ! !

    ! Q: How do I check out a CVS version of Python?

    ! !

    ! A:

    ! If  you are not a SourceForge-recognized Python developer you can ! still check out an anonymous CVS version (read-only) of Python: !
    export CVSROOT=:pserver:anonymous@cvs.python.sourceforge.net:/cvsroot/python !
    cvs login !
    cvs -z3 co python
    ! If you are indeed a developer you can check out a read/write version with ! ssh: !
    export CVS_RSH=ssh !
    export CVSROOT=sf_username@cvs.python.sourceforge.net:/cvsroot/python !
    cvs -z3 co python
    !

    ! 2.2.:

    !

    ! Q:  What setting should I use?

    !

    ! A:

    That is, of course, hard to answer in the general case. I use the following .cvsrc file: !
    diff -c !
    update -d
    ! This defaults diff to context diffs (almost a requirement as everything ! else is harder to read) and tells update to automatically checkout new subdirectories. !

    ! 2.3.:

    !

    ! Q: I get the following error message:

    !
    Sorry, you don't have read/write access to the history ! file /cvsroot/python/CVSROOT/history !
    Permission denied
    ! !

    ! A:

    ! If you are not a developer, you don't have read/write access. You have ! to check out an anonymous copy. If you are a developer you have to be in ! the SourceForge group "python". You can check this with the following commands: -
    ssh -l sf_username shell.sourceforge.net -
    groups
    - If you have just recently (< 6 hours) been added to the Python project, - you probably have to wait for the SourceForge servers to synch up. This - can take up to 6 hours. -

    - 2.4.:

    !

    ! Q: Where can I learn more about CVS?

    !

    ! A:

    For SourceForge specific information consult their CVS documentation at !
    http://sfdocs.sourceforge.net/sfdocs
    For general (and more advanced) information consult the free CVS Book at -
    http://cvsbook.red-bean.com/cvsbook.html#Introduction
    !

    ! 3. Patches

    !

    ! 3.1.:

    !

    ! Q: How to make a patch?

    !

    ! A:

    If you are using CVS (anonymous or developer) you can use CVS to make the patches for you. Just edit your local copy and enter the following command: !
    cvs diff | tee ~/name_of_the_patch.diff
    ! Else you can use the diff util which comes with most operating systems ! (a Windows version is available as part of the cygwin tools). !
      !

    ! 3.2.:

    -

    - Q: How to submit a patch?

    !

    ! A:

    Please read the Patch Submission Guidelines at !
    http://www.python.org/patches
    ! A recent copy can be found in the Appendix of this FAQ. !
      !

    ! 3.3.:

    ! !

    ! Q: How to change the status of a patch?

    ! !

    ! A:

    ! To change the status of a patch or assign it to somebody else you have ! to be a) a SourceForge-recognized Python developer and b) a patch administrator. Unfortunately the SourceForge default for developers is not to be patch administrators. Contact one of the project administrators if the following does not work for you.

    Click on the patch itself. In the screen that comes up, there is a drop-box ! for "Assigned To:" and a drop-box for "Status:" where you can select a ! new responsible developer or a new status respectively. After selecting ! the appropriate victim and status, hit the "Submit Changes" button at the ! bottom of the page.

    For more information about the use of the "Status:" and "Assigned To:" ! fields consult the Patch Manager Guidelines. A recent ! copy can be found in the Appendix of this FAQ. !
      !

    ! A. Appendix

    ! !

    ! A.1.: Patch Manager Guidelines

    ! !

    ! Intended use of SourceForge patch status & "assigned to" fields

    ! revision 2                                          09-Jul-2000 !

    In general, the status field should be close to self-explanatory, and ! the "Assigned to:" field should be the person responsible for taking the ! next step in the patch process.  Both fields are expected to change ! value over the life of a patch; the normal workflow is detailed below. !

    When you've got the time and the ability, feel free to move any patch ! that catches your eye along, whether or not it's been assigned to you.  ! And if you're assigned to a patch but aren't going to take reasonably quick ! action (for whatever reason), please assign it to someone else ASAP:  ! at those times you can't actively help, actively get out of the way. !

    If you're an expert in some area and know that a patch in that area ! is both needed and non-controversial, just commit your changes directly ! -- no need then to get the patch mechanism involved in it. !

    You should add a comment to every patch assigned to you at least once ! a week, if only to say that you realize it's still on your plate.  ! This rule is meant to force your attention periodically:  patches ! get harder & harder to deal with the longer they sit. !
      !

    ! Open

    ! !
    The initial status of all patches. !
    The patch is under consideration, but has not been reviewed yet. !
    The status will normally change to Accepted or Rejected next. !
    The person submitting the patch should (if they can) assign it to the ! person they most want to review it. !
    Else the patch will be assigned via [xxx a list of expertise areas ! should be developed] [xxx but since this hasn't happened and volunteers ! are too few, random assignment is better than nothing:  if you're ! a Python developer, expect to get assigned out of the blue!] !
    Discussion of major patches is carried out on the Python-Dev mailing ! list.  For simple patches, the SourceForge comment mechanism should ! be sufficient. [xxx an email gateway would be great, ditto Ping's Roundup]
    ! !

    ! Accepted

    ! !
    The powers that be accepted the patch, but it hasn't been applied ! yet. [xxx flesh out -- Guido Bottleneck avoidable here?] !
    The status will normally change to Closed next. !
    The person changing the status to Accepted should, at the same time, ! assign the patch to whoever they believe is most likely to be able & ! willing to apply it (the submitter if possible).
    ! !

    ! Closed

    ! !
    The patch has been accepted and applied. !
    The previous status was Accepted, or possibly Open if the submitter ! was Guido (or moral equivalent in some particular area of expertise).
    ! !

    ! Rejected

    ! !
    The patch has been reviewed and rejected. !
    When the objections are addressed, the status may change to Open again. !
    The person changing the status to Rejected should assign the patch ! back to the submitter, or if it's clear the patch will never be accepted, ! assign it to None. !
    Note that SourceForge allows the submitter to overwrite the patch with ! a new version.
    ! !

    ! Out of date

    ! !
    Previous status was Open or Accepted or Postponed, but the ! patch no longer works. !
    Please enter a comment when changing the status to "Out of date", to ! record the nature of the problem and the previous status. !
    Also assign it back to the submitter, as they need to upload a new ! version (note that SourceForge will not allow anyone other than the original ! submitter to update the patch).
    ! !

    ! Postponed

    ! !
    The previous status was Open or Accepted, but for some reason ! (e.g., pending release) the patch should not be reviewed or applied until ! further notice. !
    The status will normally change to Open or Accepted next. !
    Please enter a comment when changing the status to Postponed, to record ! the reason, the previous status, and the conditions under which the patch ! should revert to Open or Accepted.  Also assign the patch to whoever ! is most likely able and willing to decide when the status should change ! again.
    ! !

    ! Deleted

    ! !
    Bit bucket. !
    Use only if it's OK for the patch and its SourceForge history to disappear. !
    As of 09-July-2000, SF does not actually throw away Deleted patches, ! but that may change.
    ! !

    ! A.2.: Python Patch Submission Guidelines

    ! New: CNRI is no longer involved in Python patches. We no longer ! request legal disclaimers. Also, We're now using the SourceForge Patch ! Manager (a single mailing list became unmanageable). !

    Many people contribute patches to Python. We've set up a new system ! to deal with these. Here are the main guidelines:

      !
    • ! Submit your patch to the patch ! manager interface at SourceForge. ! We strongly recommend that you register ! with SourceForge before submitting a patch. If you send patches directly ! to Guido you introduce an extra delay. Ditto for the "patches@python.org" ! mailing list address; this address should no longer be used for patch submission. ! The patch manager is for ! patches only; if you have a problem or ! suggestion but don't know how to write the code for it, use the Python ! Bugs List instead. The bugs list is searchable; if you have a problem ! and you're not sure if it has been reported or fixed already, this is the ! first place to look. (There used to be a separate TODO list; we now prefer ! that you use the bugs list for suggestions and requests too.)
    • ! !


      Submit documentation patches the same way. When adding the ! patch, be sure to set the "Category" field to "documentation". ! For documentation errors without patches, please use the Python ! Bugs List instead. !

    • ! We like context diffs. We grudgingly accept unified diffs. ! Straight ! ("ed-style") diffs are right out! If you don't know how to generate ! context diffs, you're probably not qualified to produce high-quality patches ! anyway <0.5 wink>.
    • ! !
    • ! We appreciate it if you send patches relative to the current ! CVS tree. These are our latest sources. It's almost a year since Python ! 1.5.2 was released, and many source files have been touched in more or ! less significant ways; a patch relative to Python 1.5.2 can cause a lot ! of extra pain to apply right. Even a patch relative to the latest alpha ! or beta release may be way out of date.
    • ! !
    • ! Please add a succinct message to your SourceForge entry that explains what ! the patch is about that we can use directly as a checkin message. Ideally, ! such a message explains the problem and describes the fix in a few lines.
    • ! !
    • ! For patches that add or change functionality: please also update the documentation ! and the testcases (the Lib/test subdirectory). For new modules, ! we appreciate a new test module (typically test/test_spam.py). In this ! case, there's no need to mail the documentation to a different address ! (in fact, in order to verify that the bundle is complete, it's easier to ! mail everything together).
    • ! !
    • ! There are a variety of additional style ! requirements. Please have a look at these before writing new code. ! Also have a look at the general Python ! Style Guide.
    - --- 1,390 ---- ! ! ! ! Python at SourceForge - Frequently Asked Questions ! ! !
    !

    Python at SourceForge - Frequently Asked Questions

    !
    !

    0. Contents

    +

    1. General

      !
    1. What is SourceForge?
    2. !
    3. Where do I find Python there?
    4. !
    5. How can I change the pages at ! python.sourceforge.net?
    6. !
    !

    2. CVS

    !
      !
    1. How do I check out a CVS version of Python?
    2. !
    3. What settings should I use?
    4. !
    5. Troubleshooting: "Permission Denied"
    6. !
    7. Where can I learn more about CVS?
    !

    3. Patches

    !
      !
    1. How to make a patch?
    2. !
    3. How to submit patches?
    4. !
    5. How to change the status of a patch?
    6. !
    +

    A. Appendix

      !
    1. Patch Manager Guidelines [09.07.2000]
    2. !
    3. Python Patch Submission Guidelines [29.06.2000]
    4. !
    !

    1. General

    !

    1.1.:

    !

    Q: What is SourceForge?

    !

    A:

    ! SourceForge is a free hosting service for ! OpenSource projects. The main website is ! found at !
    ! http://sourceforge.net
    !

    1.2.:

    !

    Q: Where can I find Python on SourceForge?

    !

    A:

    ! The Python project page ! can be found at !
    ! http://sourceforge.net/projects/python
    !

    1.3.:

    !

    Q: How can I change the pages at python.sourceforge.net?

    !

    A:

    ! First you have to be in the SourceForge group "python" (true for all ! developers). Then you can upload files using scp: !
    ! scp mylocalfile.html ! sf_username@shell.sourceforge.net:/home/groups/python/htdocs/
    ! If you want to edit or remove files, you can use ssh: !
    ! ssh -l sf_username shell.sourceforge.net
    ! cd /home/groups/python/htdocs
    ! rm garbage.html
    ! vi changeme.html
    !

    2. CVS

    !

    2.1.:

    !

    Q: How do I check out a CVS version of Python?

    !

    A:

    ! If you are not a SourceForge-recognized Python developer you can still check ! out an anonymous CVS version (read-only) of Python: !
    ! export ! CVSROOT=:pserver:anonymous@cvs.python.sourceforge.net:/cvsroot/python
    ! cvs login
    ! cvs -z3 co python
    ! If you are indeed a developer you can check out a read/write version with ssh: !
    ! export CVS_RSH=ssh
    ! export ! CVSROOT=sf_username@cvs.python.sourceforge.net:/cvsroot/python
    ! cvs -z3 co python
    !

    2.2.:

    !

    Q: What setting should I use?

    !

    A:

    That is, of course, hard to answer in the general case. I use the following .cvsrc file: ! !
    ! diff -c
    ! update -d
    ! This defaults diff to context diffs (almost a requirement as everything else ! is harder to read) and tells update to automatically checkout new subdirectories. ! !

    2.3.:

    !

    Q: I get the following error message:

    !
    ! Sorry, you don't have read/write access to the history file ! /cvsroot/python/CVSROOT/history
    ! Permission denied
    ! !

    A:

    ! If you are not a developer, you don't have read/write access. You have to ! check out an anonymous copy. If you are a developer you have to be in the ! SourceForge group "python". You can check this with the following commands: !
    ! ssh -l sf_username shell.sourceforge.net
    ! groups
    ! If you have just recently (< 6 hours) been added to the Python project, you ! probably have to wait for the SourceForge servers to synch up. This can take ! up to 6 hours. !

    2.4.:

    ! !

    Q: Where can I learn more about CVS?

    ! !

    A:

    For SourceForge specific information consult their CVS documentation at ! !
    ! http://sfdocs.sourceforge.net/sfdocs
    For general (and more advanced) information consult the free CVS Book at !
    ! http://cvsbook.red-bean.com/cvsbook.html#Introduction
    !

    3. Patches

    !

    3.1.:

    !

    Q: How to make a patch?

    ! !

    A:

    If you are using CVS (anonymous or developer) you can use CVS to make the patches for you. Just edit your local copy and enter the following command: ! !
    ! cvs diff | tee ~/name_of_the_patch.diff
    ! Else you can use the diff util which comes with most operating systems (a ! Windows version is available as part of the cygwin tools).
    !

    3.2.:

    ! !

    Q: How to submit a patch?

    ! !

    A:

    Please read the Patch Submission Guidelines at ! !
    ! http://www.python.org/patches
    ! A recent copy can be found in the Appendix of this FAQ.
    ! ! !

    3.3.:

    ! !

    Q: How to change the status of a patch?

    ! !

    A:

    ! To change the status of a patch or assign it to somebody else you have to be ! a) a SourceForge-recognized Python developer and b) a patch administrator. Unfortunately the SourceForge default for developers is not to be patch administrators. Contact one of the project administrators if the following does not work for you. +

    Click on the patch itself. In the screen that comes up, there is a drop-box ! for "Assigned To:" and a drop-box for "Status:" where you can select a new ! responsible developer or a new status respectively. After selecting the ! appropriate victim and status, hit the "Submit Changes" button at the bottom ! of the page.

    !

    For more information about the use of the "Status:" and "Assigned To:" ! fields consult the Patch Manager Guidelines. A recent copy ! can be found in the Appendix of this FAQ.
    !

    ! !

    A. Appendix

    ! !

    A.1.: Patch Manager Guidelines

    ! !

    Intended use of SourceForge patch status & "assigned to" fields

    ! Revision 2
    09-Jul-2000 ! !

    In general, the status field should be close to self-explanatory, and the ! "Assigned to:" field should be the person responsible for taking the next step ! in the patch process. Both fields are expected to change value over the life ! of a patch; the normal workflow is detailed below.

    ! !

    When you've got the time and the ability, feel free to move any patch that ! catches your eye along, whether or not it's been assigned to you. And if ! you're assigned to a patch but aren't going to take reasonably quick action ! (for whatever reason), please assign it to someone else ASAP: at those times ! you can't actively help, actively get out of the way.

    ! !

    If you're an expert in some area and know that a patch in that area is both ! needed and non-controversial, just commit your changes directly -- no need ! then to get the patch mechanism involved in it.

    ! !

    You should add a comment to every patch assigned to you at least once a ! week, if only to say that you realize it's still on your plate. This rule is ! meant to force your attention periodically: patches get harder & harder to ! deal with the longer they sit.
    !

    ! !

    Open

    ! !
    ! The initial status of all patches.
    ! The patch is under consideration, but has not been reviewed yet.
    ! The status will normally change to Accepted or Rejected next.
    ! The person submitting the patch should (if they can) assign it to the person ! they most want to review it.
    ! Else the patch will be assigned via [xxx a list of expertise areas should be ! developed] [xxx but since this hasn't happened and volunteers are too few, ! random assignment is better than nothing: if you're a Python developer, ! expect to get assigned out of the blue!]
    ! Discussion of major patches is carried out on the Python-Dev mailing list. ! For simple patches, the SourceForge comment mechanism should be sufficient. ! [xxx an email gateway would be great, ditto Ping's Roundup]
    ! !

    Accepted

    ! !
    ! The powers that be accepted the patch, but it hasn't been applied yet. [xxx ! flesh out -- Guido Bottleneck avoidable here?]
    ! The status will normally change to Closed next.
    ! The person changing the status to Accepted should, at the same time, assign ! the patch to whoever they believe is most likely to be able & willing to ! apply it (the submitter if possible).
    ! !

    Closed

    ! !
    ! The patch has been accepted and applied.
    ! The previous status was Accepted, or possibly Open if the submitter was ! Guido (or moral equivalent in some particular area of ! expertise).
    ! !

    Rejected

    ! !
    ! The patch has been reviewed and rejected.
    ! When the objections are addressed, the status may change to Open again.
    ! The person changing the status to Rejected should assign the patch back to ! the submitter, or if it's clear the patch will never be accepted, assign it ! to None.
    ! Note that SourceForge allows the submitter to overwrite the patch with a new ! version.
    ! !

    Out of date

    ! !
    ! Previous status was Open or Accepted or Postponed, but the patch no longer ! works.
    ! Please enter a comment when changing the status to "Out of date", to record ! the nature of the problem and the previous status.
    ! Also assign it back to the submitter, as they need to upload a new version ! (note that SourceForge will not allow anyone other than the original ! submitter to update the patch).
    ! !

    Postponed

    ! !
    ! The previous status was Open or Accepted, but for some reason (e.g., pending ! release) the patch should not be reviewed or applied until further ! notice.
    ! The status will normally change to Open or Accepted next.
    ! Please enter a comment when changing the status to Postponed, to record the ! reason, the previous status, and the conditions under which the patch should ! revert to Open or Accepted. Also assign the patch to whoever is most likely ! able and willing to decide when the status should change again.
    ! !

    Deleted

    ! !
    ! Bit bucket.
    ! Use only if it's OK for the patch and its SourceForge history to ! disappear.
    ! As of 09-July-2000, SF does not actually throw away Deleted patches, but ! that may change.
    ! !

    A.2.: Python Patch Submission Guidelines

    ! New: CNRI is no longer involved in Python patches. We no longer request ! legal disclaimers. Also, We're now using the SourceForge Patch Manager (a ! single mailing list became unmanageable). ! !

    Many people contribute patches to Python. We've set up a new system to deal ! with these. Here are the main guidelines:

      !
    • Submit your patch to the patch manager ! interface at SourceForge. ! We strongly recommend that you register with ! SourceForge before submitting a patch. If you send patches directly to ! Guido you introduce an extra delay. Ditto for the "patches@python.org" ! mailing list address; this address should no longer be used for patch ! submission. The patch manager is for patches only; if you have a ! problem or suggestion but don't know how to write the code for it, use the ! Python Bugs ! List instead. The bugs list is searchable; if you have a problem and ! you're not sure if it has been reported or fixed already, this is the ! first place to look. (There used to be a separate TODO list; we now prefer ! that you use the bugs list for suggestions and requests too.)
    • !
    • Submit documentation patches the same ! way. When adding the patch, be sure to set the "Category" field ! to "documentation". For documentation errors without patches, ! please use the Python Bugs List ! instead.
    • !
    • We like context diffs. We grudgingly accept unified diffs. Straight ! ("ed-style") diffs are right out! If you don't know how to generate ! context diffs, you're probably not qualified to produce high-quality ! patches anyway <0.5 wink>.
    • !
    • We appreciate it if you send patches relative to the current CVS tree. ! These are our latest sources. It's almost a year since Python 1.5.2 was ! released, and many source files have been touched in more or less ! significant ways; a patch relative to Python 1.5.2 can cause a lot of ! extra pain to apply right. Even a patch relative to the latest alpha or ! beta release may be way out of date.
    • !
    • Please add a succinct message to your SourceForge entry that explains ! what the patch is about that we can use directly as a checkin message. ! Ideally, such a message explains the problem and describes the fix in a ! few lines.
    • !
    • For patches that add or change functionality: please also update the ! documentation and the testcases (the Lib/test subdirectory). ! For new modules, we appreciate a new test module (typically ! test/test_spam.py). In this case, there's no need to mail the ! documentation to a different address (in fact, in order to verify that the ! bundle is complete, it's easier to mail everything together).
    • !
    • There are a variety of additional style requirements. ! Please have a look at these before writing new code. Also have a look at ! the general Python Style ! Guide.
    From python-dev@python.org Fri Jul 14 09:55:01 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Fri, 14 Jul 2000 01:55:01 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc sf-faq.html,1.3,NONE Message-ID: <200007140855.BAA24590@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv24552 Removed Files: sf-faq.html Log Message: moving files to nondist/sf-html From python-dev@python.org Fri Jul 14 10:00:08 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Fri, 14 Jul 2000 02:00:08 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html README,NONE,1.1 index.html,NONE,1.1 sf-faq.html,NONE,1.1 Message-ID: <200007140900.CAA25254@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv25141 Added Files: README index.html sf-faq.html Log Message: put html files for http://python.sourceforge.net in nondist/sf-html added README file --- NEW FILE --- sf-html subdirectory ==================== This directory contains the xhtml files for the pages at http://python.sourceforge.net Files found here ---------------- index.html Link Page README The file you're reading now sf-faq.html Python at SourceForge FAQ --- NEW FILE --- Python Sites

    PYTHON MAIN WEBSITE

    On this site you will find all the information about the Python language. This includes:

    • Detailed Documentation (Language Specification, Library Reference, Tutorials, Information about Extending and Embedding)
    • Downloads (stable releases for your favorite platform, alpha and beta releases of new versions)
    • Special Interest Groups (from Database and Image Processing to XML Processing)
    • News, Announcements and lots of links to other Python resources

    PYTHON PROJECT PAGE

    Here you will find the busy developers and their resources.

    • access to the current development version via a CVS repository
    • the patch manager where new features and bugfixes can be submitted

    PYTHON AT SOURCEFORGE FAQ

    If you have questions about Python at SourceForge, you're probably right here. Topics include:

    • How to use CVS.
    • How to make/submit/administrate patches.
    --- NEW FILE --- Python at SourceForge - Frequently Asked Questions

    Python at SourceForge - Frequently Asked Questions

    0. Contents

    1. General

    1. What is SourceForge?
    2. Where do I find Python there?
    3. How can I change the pages at python.sourceforge.net?

    2. CVS

    1. How do I check out a CVS version of Python?
    2. What settings should I use?
    3. Troubleshooting: "Permission Denied"
    4. Where can I learn more about CVS?

    3. Patches

    1. How to make a patch?
    2. How to submit patches?
    3. How to change the status of a patch?

    A. Appendix

    1. Patch Manager Guidelines [09.07.2000]
    2. Python Patch Submission Guidelines [29.06.2000]

    1. General

    1.1.:

    Q: What is SourceForge?

    A:

    SourceForge is a free hosting service for OpenSource projects. The main website is found at
    http://sourceforge.net

    1.2.:

    Q: Where can I find Python on SourceForge?

    A:

    The Python project page can be found at
    http://sourceforge.net/projects/python

    1.3.:

    Q: How can I change the pages at python.sourceforge.net?

    A:

    First you have to be in the SourceForge group "python" (true for all developers). Then you can upload files using scp:
    scp mylocalfile.html sf_username@shell.sourceforge.net:/home/groups/python/htdocs/
    If you want to edit or remove files, you can use ssh:
    ssh -l sf_username shell.sourceforge.net
    cd /home/groups/python/htdocs
    rm garbage.html
    vi changeme.html

    2. CVS

    2.1.:

    Q: How do I check out a CVS version of Python?

    A:

    If you are not a SourceForge-recognized Python developer you can still check out an anonymous CVS version (read-only) of Python:
    export CVSROOT=:pserver:anonymous@cvs.python.sourceforge.net:/cvsroot/python
    cvs login
    cvs -z3 co python
    If you are indeed a developer you can check out a read/write version with ssh:
    export CVS_RSH=ssh
    export CVSROOT=sf_username@cvs.python.sourceforge.net:/cvsroot/python
    cvs -z3 co python

    2.2.:

    Q: What setting should I use?

    A:

    That is, of course, hard to answer in the general case. I use the following .cvsrc file:
    diff -c
    update -d
    This defaults diff to context diffs (almost a requirement as everything else is harder to read) and tells update to automatically checkout new subdirectories.

    2.3.:

    Q: I get the following error message:

    Sorry, you don't have read/write access to the history file /cvsroot/python/CVSROOT/history
    Permission denied

    A:

    If you are not a developer, you don't have read/write access. You have to check out an anonymous copy. If you are a developer you have to be in the SourceForge group "python". You can check this with the following commands:
    ssh -l sf_username shell.sourceforge.net
    groups
    If you have just recently (< 6 hours) been added to the Python project, you probably have to wait for the SourceForge servers to synch up. This can take up to 6 hours.

    2.4.:

    Q: Where can I learn more about CVS?

    A:

    For SourceForge specific information consult their CVS documentation at
    http://sfdocs.sourceforge.net/sfdocs
    For general (and more advanced) information consult the free CVS Book at
    http://cvsbook.red-bean.com/cvsbook.html#Introduction

    3. Patches

    3.1.:

    Q: How to make a patch?

    A:

    If you are using CVS (anonymous or developer) you can use CVS to make the patches for you. Just edit your local copy and enter the following command:
    cvs diff | tee ~/name_of_the_patch.diff
    Else you can use the diff util which comes with most operating systems (a Windows version is available as part of the cygwin tools).

    3.2.:

    Q: How to submit a patch?

    A:

    Please read the Patch Submission Guidelines at
    http://www.python.org/patches
    A recent copy can be found in the Appendix of this FAQ.

    3.3.:

    Q: How to change the status of a patch?

    A:

    To change the status of a patch or assign it to somebody else you have to be a) a SourceForge-recognized Python developer and b) a patch administrator. Unfortunately the SourceForge default for developers is not to be patch administrators. Contact one of the project administrators if the following does not work for you.

    Click on the patch itself. In the screen that comes up, there is a drop-box for "Assigned To:" and a drop-box for "Status:" where you can select a new responsible developer or a new status respectively. After selecting the appropriate victim and status, hit the "Submit Changes" button at the bottom of the page.

    For more information about the use of the "Status:" and "Assigned To:" fields consult the Patch Manager Guidelines. A recent copy can be found in the Appendix of this FAQ.

    A. Appendix

    A.1.: Patch Manager Guidelines

    Intended use of SourceForge patch status & "assigned to" fields

    Revision 2
    09-Jul-2000

    In general, the status field should be close to self-explanatory, and the "Assigned to:" field should be the person responsible for taking the next step in the patch process. Both fields are expected to change value over the life of a patch; the normal workflow is detailed below.

    When you've got the time and the ability, feel free to move any patch that catches your eye along, whether or not it's been assigned to you. And if you're assigned to a patch but aren't going to take reasonably quick action (for whatever reason), please assign it to someone else ASAP: at those times you can't actively help, actively get out of the way.

    If you're an expert in some area and know that a patch in that area is both needed and non-controversial, just commit your changes directly -- no need then to get the patch mechanism involved in it.

    You should add a comment to every patch assigned to you at least once a week, if only to say that you realize it's still on your plate. This rule is meant to force your attention periodically: patches get harder & harder to deal with the longer they sit.

    Open

    The initial status of all patches.
    The patch is under consideration, but has not been reviewed yet.
    The status will normally change to Accepted or Rejected next.
    The person submitting the patch should (if they can) assign it to the person they most want to review it.
    Else the patch will be assigned via [xxx a list of expertise areas should be developed] [xxx but since this hasn't happened and volunteers are too few, random assignment is better than nothing: if you're a Python developer, expect to get assigned out of the blue!]
    Discussion of major patches is carried out on the Python-Dev mailing list. For simple patches, the SourceForge comment mechanism should be sufficient. [xxx an email gateway would be great, ditto Ping's Roundup]

    Accepted

    The powers that be accepted the patch, but it hasn't been applied yet. [xxx flesh out -- Guido Bottleneck avoidable here?]
    The status will normally change to Closed next.
    The person changing the status to Accepted should, at the same time, assign the patch to whoever they believe is most likely to be able & willing to apply it (the submitter if possible).

    Closed

    The patch has been accepted and applied.
    The previous status was Accepted, or possibly Open if the submitter was Guido (or moral equivalent in some particular area of expertise).

    Rejected

    The patch has been reviewed and rejected.
    When the objections are addressed, the status may change to Open again.
    The person changing the status to Rejected should assign the patch back to the submitter, or if it's clear the patch will never be accepted, assign it to None.
    Note that SourceForge allows the submitter to overwrite the patch with a new version.

    Out of date

    Previous status was Open or Accepted or Postponed, but the patch no longer works.
    Please enter a comment when changing the status to "Out of date", to record the nature of the problem and the previous status.
    Also assign it back to the submitter, as they need to upload a new version (note that SourceForge will not allow anyone other than the original submitter to update the patch).

    Postponed

    The previous status was Open or Accepted, but for some reason (e.g., pending release) the patch should not be reviewed or applied until further notice.
    The status will normally change to Open or Accepted next.
    Please enter a comment when changing the status to Postponed, to record the reason, the previous status, and the conditions under which the patch should revert to Open or Accepted. Also assign the patch to whoever is most likely able and willing to decide when the status should change again.

    Deleted

    Bit bucket.
    Use only if it's OK for the patch and its SourceForge history to disappear.
    As of 09-July-2000, SF does not actually throw away Deleted patches, but that may change.

    A.2.: Python Patch Submission Guidelines

    New: CNRI is no longer involved in Python patches. We no longer request legal disclaimers. Also, We're now using the SourceForge Patch Manager (a single mailing list became unmanageable).

    Many people contribute patches to Python. We've set up a new system to deal with these. Here are the main guidelines:

    • Submit your patch to the patch manager interface at SourceForge. We strongly recommend that you register with SourceForge before submitting a patch. If you send patches directly to Guido you introduce an extra delay. Ditto for the "patches@python.org" mailing list address; this address should no longer be used for patch submission. The patch manager is for patches only; if you have a problem or suggestion but don't know how to write the code for it, use the Python Bugs List instead. The bugs list is searchable; if you have a problem and you're not sure if it has been reported or fixed already, this is the first place to look. (There used to be a separate TODO list; we now prefer that you use the bugs list for suggestions and requests too.)
    • Submit documentation patches the same way. When adding the patch, be sure to set the "Category" field to "documentation". For documentation errors without patches, please use the Python Bugs List instead.
    • We like context diffs. We grudgingly accept unified diffs. Straight ("ed-style") diffs are right out! If you don't know how to generate context diffs, you're probably not qualified to produce high-quality patches anyway <0.5 wink>.
    • We appreciate it if you send patches relative to the current CVS tree. These are our latest sources. It's almost a year since Python 1.5.2 was released, and many source files have been touched in more or less significant ways; a patch relative to Python 1.5.2 can cause a lot of extra pain to apply right. Even a patch relative to the latest alpha or beta release may be way out of date.
    • Please add a succinct message to your SourceForge entry that explains what the patch is about that we can use directly as a checkin message. Ideally, such a message explains the problem and describes the fix in a few lines.
    • For patches that add or change functionality: please also update the documentation and the testcases (the Lib/test subdirectory). For new modules, we appreciate a new test module (typically test/test_spam.py). In this case, there's no need to mail the documentation to a different address (in fact, in order to verify that the bundle is complete, it's easier to mail everything together).
    • There are a variety of additional style requirements. Please have a look at these before writing new code. Also have a look at the general Python Style Guide.
    From python-dev@python.org Fri Jul 14 14:35:10 2000 From: python-dev@python.org (A.M. Kuchling) Date: Fri, 14 Jul 2000 06:35:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/distutils/command build_ext.py,1.55,1.56 Message-ID: <200007141335.GAA29459@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv29451 Modified Files: build_ext.py Log Message: Typo fix from Bastian Kleineidam Index: build_ext.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/build_ext.py,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -r1.55 -r1.56 *** build_ext.py 2000/07/07 20:41:21 1.55 --- build_ext.py 2000/07/14 13:35:07 1.56 *************** *** 310,314 **** def get_source_files (self): ! self.check_extension_list() filenames = [] --- 310,314 ---- def get_source_files (self): ! self.check_extensions_list(self.extensions) filenames = [] From python-dev@python.org Fri Jul 14 15:21:53 2000 From: python-dev@python.org (Barry Warsaw) Date: Fri, 14 Jul 2000 07:21:53 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0206.txt,1.1,1.2 Message-ID: <200007141421.HAA07056@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv7046 Modified Files: pep-0206.txt Log Message: The contents of PEP206 as provided by Moshe. Spell checked, formatting, XXX=>TBD, and a few other editor's notes added by Barry. Index: pep-0206.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0206.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0206.txt 2000/07/14 03:53:53 1.1 --- pep-0206.txt 2000/07/14 14:21:51 1.2 *************** *** 4,8 **** Owner: moshez@math.huji.ac.il (Moshe Zadka) Python-Version: 2.0 ! Status: Incomplete --- 4,84 ---- Owner: moshez@math.huji.ac.il (Moshe Zadka) Python-Version: 2.0 ! Status: Draft ! ! ! ! Introduction ! ! This PEP describes the `batteries included' proposal for Python ! 2.0, the fat distribution containing commonly used third party ! extension modules. This PEP tracks the status and ownership of ! this proposal, slated for introduction in Python 2.0. It contains ! a description of the proposal and outlines how to support it. ! ! ! ! Batteries Included Philosophy ! ! The Python source distribution always maintained the philosophy of ! "batteries included" -- having a rich and versatile standard ! library which is immediately available, without making the user ! download separate packages. This gives the Python language a head ! start in many projects. However, the Python standard library ! often relies on important Open Source libraries which might be ! unavailable on many computers, so that the user has to separately ! download and compile those. Some examples are the zlib ! compression library, and the gmp number manipulation library. ! ! TBD -- can anyone give reference to some article describing ! TBD -- "batteries included?" ! ! ! ! The Proposed Solution ! ! The proposed solution is to download a few important third-party ! libraries, and distribute them with the source distribution of ! Python. In addition, the build procedure will be changed to build ! those libraries by default, and build the Python modules which ! rely on them linked against those libraries. Individual users ! will still be able to link the Python modules against already ! installed libraries, or disable them completely. ! ! Additionally, some Open Source third-party modules will also be ! distributed together with the source distribution. ! ! TBD -- does this mean some will be distributed but not enabled by ! default? [ed] ! ! Here is the list of libraries which are proposed to be dealt with ! in this manner, and where they can be downloaded: ! ! zlib -- http://www.info-zip.org/pub/infozip/zlib/zlib.tar.gz ! expat -- ftp://ftp.jclark.com/pub/xml/expat.zip. ! Tcl -- http://dev.scriptics.com:80/download/tcl/tcl8_3/tcl8.3.1.tar.gz ! Tk -- http://dev.scriptics.com:80/download/tcl/tcl8_3/tk8.3.1.tar.gz ! PIL -- http://www.pythonware.com/downloads/Imaging-1.1.tar.gz ! libjpeg -- ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz ! ncurses -- ftp://dickey.his.com/ncurses/ncurses.tar.gz ! ! ! ! Software covered by the GNU Public License ! ! TBD -- please explain why GPL'd software is not included in Python ! (and perhaps the difference between GPL and LGPL). ! ! ! ! Open Issues ! ! Where does all this source live? ! ! What should the build procedure look like? ! ! What to do if compilation of a supporting library fails? ! ! ESR also mentioned libpng, but I don't know of a Python module ! that uses it. From python-dev@python.org Fri Jul 14 15:28:24 2000 From: python-dev@python.org (Eric S. Raymond) Date: Fri, 14 Jul 2000 07:28:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib ConfigParser.py,1.19,1.20 Message-ID: <200007141428.HAA07512@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv7481 Modified Files: ConfigParser.py Log Message: ConfigParser enhancements to edit existing configs, part 2 Index: ConfigParser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ConfigParser.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** ConfigParser.py 2000/07/10 18:11:00 1.19 --- ConfigParser.py 2000/07/14 14:28:22 1.20 *************** *** 37,40 **** --- 37,43 ---- return whether the given section exists + has_option(section, option) + return whether the given option exists in the given section + options(section) return list of configuration options for the named section *************** *** 69,72 **** --- 72,87 ---- like get(), but convert value to a boolean (currently defined as 0 or 1, only) + + remove_section(section) + remove the given file section and all its options + + remove_option(section, option) + remove the given option from the given section + + set(section, option, value) + set the given option + + write(fp) + write the configuration state in .ini format """ *************** *** 311,326 **** if self.__defaults: fp.write("[DEFAULT]\n") ! for key in self.__defaults.keys(): ! fp.write(key + " = " + self.__defaults[key] + "\n") fp.write("\n") for section in self.sections(): fp.write("[" + section + "]\n") sectdict = self.__sections[section] ! for key in sectdict.keys(): if key == "__name__": continue ! fp.write(key + " = " + str(sectdict[key]) + "\n") fp.write("\n") # # Regular expressions for parsing section headers and options. Note a --- 326,363 ---- if self.__defaults: fp.write("[DEFAULT]\n") ! for (key, value) in self.__defaults.items(): ! fp.write("%s = %s\n" % (key, value)) fp.write("\n") for section in self.sections(): fp.write("[" + section + "]\n") sectdict = self.__sections[section] ! for (key, value) in sectdict.items(): if key == "__name__": continue ! fp.write("%s = %s\n" % (key, value)) fp.write("\n") + def remove_option(section, option): + """Remove an option.""" + if not section or section == "DEFAULT": + sectdict = self.__defaults + else: + try: + sectdict = self.__sections[section] + except KeyError: + raise NoSectionError(section) + existed = sectdict.has_key(key) + if existed: + del sectdict[key] + return existed + + def remove_section(section): + """Remove a file section.""" + if self.__sections.has_key(section): + del self.__sections[section] + return 1 + else: + return 0 + # # Regular expressions for parsing section headers and options. Note a *************** *** 394,398 **** if mo: optname, vi, optval = mo.group('option', 'vi', 'value') - optname = string.lower(optname) if vi in ('=', ':') and ';' in optval: # ';' is a comment delimiter only if it follows --- 431,434 ---- From python-dev@python.org Fri Jul 14 15:28:35 2000 From: python-dev@python.org (Thomas Wouters) Date: Fri, 14 Jul 2000 07:28:35 -0700 Subject: [Python-checkins] CVS: python/dist/src configure,1.128,1.129 configure.in,1.137,1.138 Message-ID: <200007141428.HAA07535@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv7380 Modified Files: configure configure.in Log Message: Move (actually copy) support for the sgi._getpty() function into posix.openpty(). And conveniently also check if CVS write access really works. Closes SF patch #100722 Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.128 retrieving revision 1.129 diff -C2 -r1.128 -r1.129 *** configure 2000/07/13 01:26:58 1.128 --- configure 2000/07/14 14:28:30 1.129 *************** *** 1,5 **** #! /bin/sh ! # From configure.in Revision: 1.136 # Guess values for system-dependent variables and create Makefiles. --- 1,5 ---- #! /bin/sh ! # From configure.in Revision: 1.137 # Guess values for system-dependent variables and create Makefiles. *************** *** 3646,3650 **** sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ ! truncate uname waitpid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --- 3646,3650 ---- sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ ! truncate uname waitpid _getpty do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.137 retrieving revision 1.138 diff -C2 -r1.137 -r1.138 *** configure.in 2000/07/13 01:26:58 1.137 --- configure.in 2000/07/14 14:28:32 1.138 *************** *** 827,831 **** sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ ! truncate uname waitpid) # check for openpty and forkpty --- 827,831 ---- sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ ! truncate uname waitpid _getpty) # check for openpty and forkpty From python-dev@python.org Fri Jul 14 15:28:35 2000 From: python-dev@python.org (Thomas Wouters) Date: Fri, 14 Jul 2000 07:28:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.152,2.153 Message-ID: <200007141428.HAA07536@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv7380/Modules Modified Files: posixmodule.c Log Message: Move (actually copy) support for the sgi._getpty() function into posix.openpty(). And conveniently also check if CVS write access really works. Closes SF patch #100722 Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.152 retrieving revision 2.153 diff -C2 -r2.152 -r2.153 *** posixmodule.c 2000/07/13 01:26:58 2.152 --- posixmodule.c 2000/07/14 14:28:33 2.153 *************** *** 1707,1713 **** #endif /* HAVE_LIBUTIL_H */ #endif /* HAVE_PTY_H */ ! #endif /* defined(HAVE_OPENPTY) or defined(HAVE_FORKPTY) */ ! #ifdef HAVE_OPENPTY static char posix_openpty__doc__[] = "openpty() -> (master_fd, slave_fd)\n\ --- 1707,1713 ---- #endif /* HAVE_LIBUTIL_H */ #endif /* HAVE_PTY_H */ ! #endif /* defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) */ ! #if defined(HAVE_OPENPTY) || defined(HAVE__GETPTY) static char posix_openpty__doc__[] = "openpty() -> (master_fd, slave_fd)\n\ *************** *** 1718,1728 **** { int master_fd, slave_fd; if (!PyArg_ParseTuple(args, ":openpty")) return NULL; if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) != 0) return posix_error(); return Py_BuildValue("(ii)", master_fd, slave_fd); } ! #endif #ifdef HAVE_FORKPTY --- 1718,1747 ---- { int master_fd, slave_fd; + #ifndef HAVE_OPENPTY + char * slave_name; + /* SGI apparently needs this forward declaration */ + extern char * _getpty(int *, int, mode_t, int); + #endif + if (!PyArg_ParseTuple(args, ":openpty")) return NULL; + + #ifdef HAVE_OPENPTY if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) != 0) return posix_error(); + #else + slave_name = _getpty(&master_fd, O_RDWR, 0666, 0); + if (slave_name == NULL) + return posix_error(); + + slave_fd = open(slave_name, O_RDWR); + if (slave_fd < 0) + return posix_error(); + #endif /* defined(HAVE_OPENPTY) */ + return Py_BuildValue("(ii)", master_fd, slave_fd); + } ! #endif /* defined(HAVE_OPENPTY) || defined(HAVE__GETPTY) */ #ifdef HAVE_FORKPTY *************** *** 4927,4933 **** {"fork", posix_fork, METH_VARARGS, posix_fork__doc__}, #endif /* HAVE_FORK */ ! #ifdef HAVE_OPENPTY {"openpty", posix_openpty, METH_VARARGS, posix_openpty__doc__}, ! #endif /* HAVE_OPENPTY */ #ifdef HAVE_FORKPTY {"forkpty", posix_forkpty, METH_VARARGS, posix_forkpty__doc__}, --- 4946,4952 ---- {"fork", posix_fork, METH_VARARGS, posix_fork__doc__}, #endif /* HAVE_FORK */ ! #if defined(HAVE_OPENPTY) || defined(HAVE__GETPTY) {"openpty", posix_openpty, METH_VARARGS, posix_openpty__doc__}, ! #endif /* HAVE_OPENPTY || HAVE__GETPTY */ #ifdef HAVE_FORKPTY {"forkpty", posix_forkpty, METH_VARARGS, posix_forkpty__doc__}, From python-dev@python.org Fri Jul 14 15:37:22 2000 From: python-dev@python.org (Barry Warsaw) Date: Fri, 14 Jul 2000 07:37:22 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0206.txt,1.2,1.3 Message-ID: <200007141437.HAA08094@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv8085 Modified Files: pep-0206.txt Log Message: An update from Moshe, and another question from the editor. Index: pep-0206.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0206.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pep-0206.txt 2000/07/14 14:21:51 1.2 --- pep-0206.txt 2000/07/14 14:37:20 1.3 *************** *** 55,66 **** zlib -- http://www.info-zip.org/pub/infozip/zlib/zlib.tar.gz ! expat -- ftp://ftp.jclark.com/pub/xml/expat.zip. Tcl -- http://dev.scriptics.com:80/download/tcl/tcl8_3/tcl8.3.1.tar.gz Tk -- http://dev.scriptics.com:80/download/tcl/tcl8_3/tk8.3.1.tar.gz PIL -- http://www.pythonware.com/downloads/Imaging-1.1.tar.gz - libjpeg -- ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz ncurses -- ftp://dickey.his.com/ncurses/ncurses.tar.gz Software covered by the GNU Public License --- 55,72 ---- zlib -- http://www.info-zip.org/pub/infozip/zlib/zlib.tar.gz ! expat -- ftp://ftp.jclark.com/pub/xml/expat.zip Tcl -- http://dev.scriptics.com:80/download/tcl/tcl8_3/tcl8.3.1.tar.gz Tk -- http://dev.scriptics.com:80/download/tcl/tcl8_3/tk8.3.1.tar.gz PIL -- http://www.pythonware.com/downloads/Imaging-1.1.tar.gz ncurses -- ftp://dickey.his.com/ncurses/ncurses.tar.gz + TBD, the following four: + + libjpeg -- ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz + NumPy -- http://download.sourceforge.net/numpy/Numerical-15.3.tgz + Pmw -- ftp://ftp.dscpl.com.au/pub/pmw/Pmw.0.8.4.tar.gz + BLT -- ftp://ftp.tcltk.com/aa004735/pub/blt/BLT2.4u.tar.gz + Software covered by the GNU Public License *************** *** 81,84 **** --- 87,92 ---- ESR also mentioned libpng, but I don't know of a Python module that uses it. + + How does all this fit in with distutils? From python-dev@python.org Fri Jul 14 16:00:05 2000 From: python-dev@python.org (Eric S. Raymond) Date: Fri, 14 Jul 2000 08:00:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcfgparser.tex,1.11,1.12 Message-ID: <200007141500.IAA09659@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9558/lib Modified Files: libcfgparser.tex Log Message: Document the second round of ConfigParser changes. Index: libcfgparser.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcfgparser.tex,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** libcfgparser.tex 2000/07/10 18:10:59 1.11 --- libcfgparser.tex 2000/07/14 15:00:02 1.12 *************** *** 161,167 **** \end{methoddesc} ! \begin{methoddesc}{write}{fileobect} Write a representation of the configuration to the specified file object. This representation can be parsed by a future \method{read()} call. (New in 1.6) \end{methoddesc} --- 161,180 ---- \end{methoddesc} ! \begin{methoddesc}{write}{fileobject} Write a representation of the configuration to the specified file object. This representation can be parsed by a future \method{read()} call. (New in 1.6) \end{methoddesc} + + \begin{methoddesc}{remove_option}{section, option} + Remove the specified \var{option} from the specified \var{section}. + If the section does not exist, raise \exception{NoSectionError}. + If the option existed to be removed, return 1; otherwise return 0. + (New in 1.6) + \end{methoddesc} + + \begin{methoddesc}{remove_section}{section} + Remove the specified \var{section} from the configuration. + If the section in fact existed, return 1. Otherwise return 0. + \end{methoddesc} + From python-dev@python.org Fri Jul 14 16:21:55 2000 From: python-dev@python.org (Barry Warsaw) Date: Fri, 14 Jul 2000 08:21:55 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0206.txt,1.3,1.4 Message-ID: <200007141521.IAA17789@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv17781 Modified Files: pep-0206.txt Log Message: Another round of updates from Moshe. A reference to the term "batteries included" was added. The question about open source 3rd party modules was answered, as was the explanation of GPL/LGPL. Index: pep-0206.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0206.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** pep-0206.txt 2000/07/14 14:37:20 1.3 --- pep-0206.txt 2000/07/14 15:21:52 1.4 *************** *** 30,37 **** compression library, and the gmp number manipulation library. ! TBD -- can anyone give reference to some article describing ! TBD -- "batteries included?" The Proposed Solution --- 30,39 ---- compression library, and the gmp number manipulation library. ! The original coinage of the term "batteries included" can be found ! here: + http://www.uk.research.att.com/~fms/ipc7/tr-1998-9.html + The Proposed Solution *************** *** 44,56 **** will still be able to link the Python modules against already installed libraries, or disable them completely. - - Additionally, some Open Source third-party modules will also be - distributed together with the source distribution. ! TBD -- does this mean some will be distributed but not enabled by ! default? [ed] ! Here is the list of libraries which are proposed to be dealt with ! in this manner, and where they can be downloaded: zlib -- http://www.info-zip.org/pub/infozip/zlib/zlib.tar.gz --- 46,59 ---- will still be able to link the Python modules against already installed libraries, or disable them completely. ! Additionally, some Open Source third-party Python modules will ! also be distributed together with the source distribution. The ! difference between those and external libraries is that the latter ! are distributed in order to make the Python distribution self ! contained, and the former are added so there will be new ! functionality in out-of-the-box Python. ! Here is the tentative list of libraries which are proposed to be ! dealt with in this manner, and where they can be downloaded: zlib -- http://www.info-zip.org/pub/infozip/zlib/zlib.tar.gz *************** *** 59,67 **** Tk -- http://dev.scriptics.com:80/download/tcl/tcl8_3/tk8.3.1.tar.gz PIL -- http://www.pythonware.com/downloads/Imaging-1.1.tar.gz ncurses -- ftp://dickey.his.com/ncurses/ncurses.tar.gz ! TBD, the following four: - libjpeg -- ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz NumPy -- http://download.sourceforge.net/numpy/Numerical-15.3.tgz Pmw -- ftp://ftp.dscpl.com.au/pub/pmw/Pmw.0.8.4.tar.gz --- 62,70 ---- Tk -- http://dev.scriptics.com:80/download/tcl/tcl8_3/tk8.3.1.tar.gz PIL -- http://www.pythonware.com/downloads/Imaging-1.1.tar.gz + libjpeg -- ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz ncurses -- ftp://dickey.his.com/ncurses/ncurses.tar.gz ! TBD, the following three: NumPy -- http://download.sourceforge.net/numpy/Numerical-15.3.tgz Pmw -- ftp://ftp.dscpl.com.au/pub/pmw/Pmw.0.8.4.tar.gz *************** *** 72,77 **** Software covered by the GNU Public License ! TBD -- please explain why GPL'd software is not included in Python ! (and perhaps the difference between GPL and LGPL). --- 75,87 ---- Software covered by the GNU Public License ! While many Python modules rely on software distributed under the ! GNU General Public License and the GNU Lesser General Public ! License, no such sources are proposed here to be added to the ! Python interpreter. Currently, the Python interpreter is ! distributed under a closed-source-friendly license, which means ! that it is possible to include it in a closed source product. ! Making redistributers worry about which parts they need to remove ! to make closed-source redistribution legal might cost more then ! the benefits. From python-dev@python.org Fri Jul 14 21:03:35 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Fri, 14 Jul 2000 13:03:35 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html sf-faq.html,1.1,1.2 Message-ID: <200007142003.NAA31617@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv31426 Modified Files: sf-faq.html Log Message: added Note about the importance of being logged in (and called earnest) Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** sf-faq.html 2000/07/14 09:00:06 1.1 --- sf-faq.html 2000/07/14 20:03:31 1.2 *************** *** 217,220 **** --- 217,223 ---- of the page.

    +

    Note: If you are sure that you have the right permissions and a drop-box + does not appear, check that you are actually logged in to SourceForge!

    +

    For more information about the use of the "Status:" and "Assigned To:" fields consult the Patch Manager Guidelines. A recent copy From python-dev@python.org Sat Jul 15 01:42:12 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Fri, 14 Jul 2000 17:42:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_extcall.py,1.4,1.5 Message-ID: <200007150042.RAA16047@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv15981 Modified Files: test_extcall.py Log Message: Break a cycle created in the saboteur() function. Index: test_extcall.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_extcall.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_extcall.py 2000/04/10 13:37:14 1.4 --- test_extcall.py 2000/07/15 00:42:09 1.5 *************** *** 86,93 **** # what about willful misconduct? def saboteur(**kw): ! kw['x'] = locals() d = {} ! saboteur(a=1, **d) assert d == {} try: --- 86,96 ---- # what about willful misconduct? def saboteur(**kw): ! kw['x'] = locals() # yields a cyclic kw ! return kw d = {} ! kw = saboteur(a=1, **d) assert d == {} + # break the cycle + del kw['x'] try: From python-dev@python.org Sat Jul 15 04:31:33 2000 From: python-dev@python.org (Vladimir Marangozov) Date: Fri, 14 Jul 2000 20:31:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects listobject.c,2.81,2.82 Message-ID: <200007150331.UAA12299@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv12089 Modified Files: listobject.c Log Message: Fix in PyList_New(). With GC enabled and when out of memory, free() the GC pointer, not the object pointer. Index: listobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v retrieving revision 2.81 retrieving revision 2.82 diff -C2 -r2.81 -r2.82 *** listobject.c 2000/07/12 13:03:02 2.81 --- listobject.c 2000/07/15 03:31:31 2.82 *************** *** 61,65 **** op->ob_item = (PyObject **) PyMem_MALLOC(nbytes); if (op->ob_item == NULL) { ! PyObject_FREE(op); return PyErr_NoMemory(); } --- 61,65 ---- op->ob_item = (PyObject **) PyMem_MALLOC(nbytes); if (op->ob_item == NULL) { ! PyObject_FREE(PyObject_AS_GC(op)); return PyErr_NoMemory(); } From python-dev@python.org Sat Jul 15 21:45:26 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 15 Jul 2000 13:45:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib site.py,1.13,1.14 Message-ID: <200007152045.NAA04012@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv3787/Lib Modified Files: site.py Log Message: -- changed default encoding to "ascii". you can still change the default via site.py... Index: site.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/site.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** site.py 2000/07/10 19:32:19 1.13 --- site.py 2000/07/15 20:45:23 1.14 *************** *** 124,148 **** # encoding used by the default locale of this system. If the default # encoding cannot be determined or is unknown, it defaults to 'ascii'. ! # ! def locale_aware_defaultencoding(): ! import locale ! code, encoding = locale.getdefaultlocale() ! if encoding is None: ! encoding = 'ascii' ! try: ! sys.setdefaultencoding(encoding) ! except LookupError: ! sys.setdefaultencoding('ascii') ! if 1: # Enable to support locale aware default string encodings. ! locale_aware_defaultencoding() ! elif 0: # Enable to switch off string to Unicode coercion and implicit # Unicode to string conversion. ! sys.setdefaultencoding('undefined') ! elif 0: ! # Enable to hard-code a site specific default string encoding. ! sys.setdefaultencoding('ascii') # --- 124,144 ---- # encoding used by the default locale of this system. If the default # encoding cannot be determined or is unknown, it defaults to 'ascii'. ! ! encoding = None # default ! if 0: # Enable to support locale aware default string encodings. ! import locale ! loc = locale.getdefaultlocale() ! if loc[1]: ! encoding = loc[1] ! ! if 0: # Enable to switch off string to Unicode coercion and implicit # Unicode to string conversion. ! encoding = "undefined" ! ! if not encoding: ! encoding = "ascii" # From python-dev@python.org Sat Jul 15 21:50:29 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 15 Jul 2000 13:50:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib site.py,1.14,1.15 Message-ID: <200007152050.NAA04573@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv4355/Lib Modified Files: site.py Log Message: -- note to self: wait until 'cvs commit' has finished before you edit the file. Index: site.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/site.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** site.py 2000/07/15 20:45:23 1.14 --- site.py 2000/07/15 20:50:27 1.15 *************** *** 125,129 **** # encoding cannot be determined or is unknown, it defaults to 'ascii'. ! encoding = None # default if 0: --- 125,129 ---- # encoding cannot be determined or is unknown, it defaults to 'ascii'. ! encoding = "ascii" # default if 0: *************** *** 139,144 **** encoding = "undefined" ! if not encoding: ! encoding = "ascii" # --- 139,143 ---- encoding = "undefined" ! sys.setdefaultencoding(encoding) # From python-dev@python.org Sat Jul 15 21:58:47 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 15 Jul 2000 13:58:47 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib site.py,1.15,1.16 Message-ID: <200007152058.NAA06121@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv6101/Lib Modified Files: site.py Log Message: -- fixed the comment, too Index: site.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/site.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** site.py 2000/07/15 20:50:27 1.15 --- site.py 2000/07/15 20:58:44 1.16 *************** *** 121,127 **** # ! # Set the string encoding used by the Unicode implementation to the ! # encoding used by the default locale of this system. If the default ! # encoding cannot be determined or is unknown, it defaults to 'ascii'. encoding = "ascii" # default --- 121,127 ---- # ! # Set the string encoding used by the Unicode implementation. The ! # default is 'ascii', but if you're willing to experiment, you can ! # change this. encoding = "ascii" # default From python-dev@python.org Sat Jul 15 23:13:51 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 15 Jul 2000 15:13:51 -0700 Subject: [Python-checkins] CVS: python/dist/src config.h.in,2.63,2.64 Message-ID: <200007152213.PAA23854@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv23707 Modified Files: config.h.in Log Message: Oops, forgot to run autoheader before checking in the _getpty move to posixmodule. Index: config.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/config.h.in,v retrieving revision 2.63 retrieving revision 2.64 diff -C2 -r2.63 -r2.64 *** config.h.in 2000/07/13 01:26:58 2.63 --- config.h.in 2000/07/15 22:13:48 2.64 *************** *** 261,264 **** --- 261,267 ---- #undef SIZEOF_VOID_P + /* Define if you have the _getpty function. */ + #undef HAVE__GETPTY + /* Define if you have the alarm function. */ #undef HAVE_ALARM From python-dev@python.org Sat Jul 15 23:27:50 2000 From: python-dev@python.org (Jack Jansen) Date: Sat, 15 Jul 2000 15:27:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/bgen/bgen scantools.py,1.17,1.18 Message-ID: <200007152227.PAA24411@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/bgen/bgen In directory slayer.i.sourceforge.net:/tmp/cvs-serv24384 Modified Files: scantools.py Log Message: ScannerPREUH3.initpatterns() should call Scanner.initpatterns() so the new comment patterns get included. Index: scantools.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/bgen/bgen/scantools.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** scantools.py 2000/06/28 20:53:33 1.17 --- scantools.py 2000/07/15 22:27:47 1.18 *************** *** 559,562 **** --- 559,563 ---- """Scanner for Universal Headers before release 3""" def initpatterns(self): + Scanner.initpatterns(self) self.head_pat = "^extern pascal[ \t]+" # XXX Mac specific! self.tail_pat = "[;={}]" From python-dev@python.org Sat Jul 15 23:29:33 2000 From: python-dev@python.org (Jack Jansen) Date: Sat, 15 Jul 2000 15:29:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/bgen/bgen macsupport.py,1.18,1.19 Message-ID: <200007152229.PAA24579@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/bgen/bgen In directory slayer.i.sourceforge.net:/tmp/cvs-serv24422 Modified Files: macsupport.py Log Message: Modified the standard mac preamble so we include pymactoolbox.h in stead of defining lots of function prototypes in each module. Index: macsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/bgen/bgen/macsupport.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** macsupport.py 2000/07/06 15:17:52 1.18 --- macsupport.py 2000/07/15 22:29:30 1.19 *************** *** 101,140 **** # Stuff added immediately after the system include files includestuff = """ - #define SystemSevenOrLater 1 - #include "macglue.h" ! #include ! #include ! #include ! #include ! ! extern PyObject *ResObj_New(Handle); ! extern int ResObj_Convert(PyObject *, Handle *); ! extern PyObject *OptResObj_New(Handle); ! extern int OptResObj_Convert(PyObject *, Handle *); ! ! extern PyObject *WinObj_New(WindowPtr); ! extern int WinObj_Convert(PyObject *, WindowPtr *); ! extern PyTypeObject Window_Type; ! #define WinObj_Check(x) ((x)->ob_type == &Window_Type) ! ! extern PyObject *DlgObj_New(DialogPtr); ! extern int DlgObj_Convert(PyObject *, DialogPtr *); ! extern PyTypeObject Dialog_Type; ! #define DlgObj_Check(x) ((x)->ob_type == &Dialog_Type) ! ! extern PyObject *MenuObj_New(MenuHandle); ! extern int MenuObj_Convert(PyObject *, MenuHandle *); ! ! extern PyObject *CtlObj_New(ControlHandle); ! extern int CtlObj_Convert(PyObject *, ControlHandle *); ! ! extern PyObject *GrafObj_New(GrafPtr); ! extern int GrafObj_Convert(PyObject *, GrafPtr *); ! ! extern PyObject *BMObj_New(BitMapPtr); ! extern int BMObj_Convert(PyObject *, BitMapPtr *); ! ! extern PyObject *WinObj_WhichWindow(WindowPtr); """ --- 101,106 ---- # Stuff added immediately after the system include files includestuff = """ #include "macglue.h" ! #include "pymactoolbox.h" """ From python-dev@python.org Sat Jul 15 23:31:47 2000 From: python-dev@python.org (Jack Jansen) Date: Sat, 15 Jul 2000 15:31:47 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _localemodule.c,2.11,2.12 Message-ID: <200007152231.PAA24651@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv24642 Modified Files: _localemodule.c Log Message: Implemented getdefaultlocale() for macintosh, after an idea by Fredrik. Index: _localemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_localemodule.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** _localemodule.c 2000/07/08 20:07:24 2.11 --- _localemodule.c 2000/07/15 22:31:45 2.12 *************** *** 25,29 **** #ifdef macintosh ! char *strdup(char *); #endif --- 25,29 ---- #ifdef macintosh ! #include "macglue.h" #endif *************** *** 381,384 **** --- 381,392 ---- #endif + #if defined(macintosh) + static PyObject* + PyLocale_getdefaultlocale(PyObject* self, PyObject* args) + { + return Py_BuildValue("Os", Py_None, PyMac_getscript()); + } + #endif + static struct PyMethodDef PyLocale_Methods[] = { {"setlocale", (PyCFunction) PyLocale_setlocale, 1, setlocale__doc__}, *************** *** 386,390 **** {"strcoll", (PyCFunction) PyLocale_strcoll, 1, strcoll__doc__}, {"strxfrm", (PyCFunction) PyLocale_strxfrm, 1, strxfrm__doc__}, ! #if defined(MS_WIN32) {"_getdefaultlocale", (PyCFunction) PyLocale_getdefaultlocale, 0}, #endif --- 394,398 ---- {"strcoll", (PyCFunction) PyLocale_strcoll, 1, strcoll__doc__}, {"strxfrm", (PyCFunction) PyLocale_strxfrm, 1, strxfrm__doc__}, ! #if defined(MS_WIN32) || defined(macintosh) {"_getdefaultlocale", (PyCFunction) PyLocale_getdefaultlocale, 0}, #endif From python-dev@python.org Sun Jul 16 00:25:53 2000 From: python-dev@python.org (Barry Warsaw) Date: Sat, 15 Jul 2000 16:25:53 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0211.txt,NONE,1.1 Message-ID: <200007152325.QAA01755@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv1740 Added Files: pep-0211.txt Log Message: PEP 211, Adding New Operators to Python, owner Greg Wilson. ***** Error reading new file(2, 'No such file or directory') From python-dev@python.org Sun Jul 16 00:26:38 2000 From: python-dev@python.org (Barry Warsaw) Date: Sat, 15 Jul 2000 16:26:38 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.6,1.7 Message-ID: <200007152326.QAA01799@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv1791 Modified Files: pep-0000.txt Log Message: Added PEPs 207 - 211 Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** pep-0000.txt 2000/07/14 03:54:49 1.6 --- pep-0000.txt 2000/07/15 23:26:36 1.7 *************** *** 26,29 **** --- 26,34 ---- 205 pep-0205.txt Weak References fdrake 206 pep-0206.txt 2.0 Batteries Included moshez + 207 pep-0207.txt Rich Comparisons davida + 208 pep-0208.txt Reworking the Coercion Model davida + 209 pep-0209.txt Adding Multidimensional Arrays davida + 210 pep-0210.txt Decoupling the Interpreter Loop davida + 211 pep-0211.txt Adding New Operators to Python gvwilson From python-dev@python.org Sun Jul 16 00:28:29 2000 From: python-dev@python.org (Barry Warsaw) Date: Sat, 15 Jul 2000 16:28:29 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0207.txt,NONE,1.1 pep-0208.txt,NONE,1.1 pep-0209.txt,NONE,1.1 pep-0210.txt,NONE,1.1 Message-ID: <200007152328.QAA01998@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv1972 Added Files: pep-0207.txt pep-0208.txt pep-0209.txt pep-0210.txt Log Message: New PEPs, all initially owned by David Ascher. ***** Error reading new file(2, 'No such file or directory') ***** Error reading new file(2, 'No such file or directory') ***** Error reading new file(2, 'No such file or directory') ***** Error reading new file(2, 'No such file or directory') From python-dev@python.org Sun Jul 16 00:52:42 2000 From: python-dev@python.org (Barry Warsaw) Date: Sat, 15 Jul 2000 16:52:42 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0206.txt,1.4,1.5 Message-ID: <200007152352.QAA03097@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv3087 Modified Files: pep-0206.txt Log Message: Moshe sez: Added paragraphs about relation to distutils. Index: pep-0206.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0206.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** pep-0206.txt 2000/07/14 15:21:52 1.4 --- pep-0206.txt 2000/07/15 23:52:40 1.5 *************** *** 71,75 **** --- 71,89 ---- BLT -- ftp://ftp.tcltk.com/aa004735/pub/blt/BLT2.4u.tar.gz + + Connection to Distutils + + Since Python 2.0 comes with a new mechanism of distributing Python + modules, called ``distutils'', we should be able to use it. Specificially, + since distutils has the capability or building Python modules in an + automatic fashion, it is hoped that some of the work will consist in + creating a new directory with the source, and having the ``super-make'' + run "./setup --install" in those directories. This should at least take + care of PIL, NumPy and Pmw. In addition, it is hoped that this mechanism + will be easy enough to add other Python modules as user requests direct + us. + + Software covered by the GNU Public License *************** *** 97,102 **** ESR also mentioned libpng, but I don't know of a Python module that uses it. - - How does all this fit in with distutils? --- 111,114 ---- From python-dev@python.org Sun Jul 16 12:57:22 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 04:57:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-irix6 cdplayer.py,1.2,1.3 Message-ID: <200007161157.EAA10827@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/plat-irix6 In directory slayer.i.sourceforge.net:/tmp/cvs-serv10638/Lib/plat-irix6 Modified Files: cdplayer.py Log Message: Bugfix by Rob W. W. Hooft, from his spelling fixes patch. This one is a genuine bug, so I checked it in separately. Index: cdplayer.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/plat-irix6/cdplayer.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** cdplayer.py 1997/10/22 21:00:47 1.2 --- cdplayer.py 2000/07/16 11:57:20 1.3 *************** *** 54,58 **** print 'syntax error in ~/' + cdplayerrc continue ! name, valye = match.group(1, 2) if name == 'title': self.title = value --- 54,58 ---- print 'syntax error in ~/' + cdplayerrc continue ! name, value = match.group(1, 2) if name == 'title': self.title = value From python-dev@python.org Sun Jul 16 12:57:22 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 04:57:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-irix5 cdplayer.py,1.5,1.6 Message-ID: <200007161157.EAA10828@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/plat-irix5 In directory slayer.i.sourceforge.net:/tmp/cvs-serv10638/Lib/plat-irix5 Modified Files: cdplayer.py Log Message: Bugfix by Rob W. W. Hooft, from his spelling fixes patch. This one is a genuine bug, so I checked it in separately. Index: cdplayer.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/plat-irix5/cdplayer.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** cdplayer.py 1997/10/22 21:00:34 1.5 --- cdplayer.py 2000/07/16 11:57:19 1.6 *************** *** 54,58 **** print 'syntax error in ~/' + cdplayerrc continue ! name, valye = match.group(1, 2) if name == 'title': self.title = value --- 54,58 ---- print 'syntax error in ~/' + cdplayerrc continue ! name, value = match.group(1, 2) if name == 'title': self.title = value From python-dev@python.org Sun Jul 16 13:04:33 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 05:04:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/lib-old Para.py,1.5,1.6 ni.py,1.2,1.3 Message-ID: <200007161204.FAA12779@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/lib-old In directory slayer.i.sourceforge.net:/tmp/cvs-serv11187/Lib/lib-old Modified Files: Para.py ni.py Log Message: Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;) Index: Para.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/lib-old/Para.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** Para.py 2000/05/08 17:29:50 1.5 --- Para.py 2000/07/16 12:04:31 1.6 *************** *** 57,61 **** # Tab to a given position (relative to the current left indent): # remove all stretch, add fixed space up to the new indent. ! # If the current position is already beying the tab stop, # don't add any new space (but still remove the stretch) def tabto(self, tab): --- 57,61 ---- # Tab to a given position (relative to the current left indent): # remove all stretch, add fixed space up to the new indent. ! # If the current position is already at the tab stop, # don't add any new space (but still remove the stretch) def tabto(self, tab): Index: ni.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/lib-old/ni.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ni.py 1998/06/09 19:17:07 1.2 --- ni.py 2000/07/16 12:04:31 1.3 *************** *** 65,69 **** __domain__, defines a list of *packages* that are searched (using their respective module search paths) to satisfy imports. It is ! initialized to the list cosisting of the package itself, its parent package, its parent's parent, and so on, ending with the root package (the nameless package containing all top-level packages and modules, --- 65,69 ---- __domain__, defines a list of *packages* that are searched (using their respective module search paths) to satisfy imports. It is ! initialized to the list consisting of the package itself, its parent package, its parent's parent, and so on, ending with the root package (the nameless package containing all top-level packages and modules, From python-dev@python.org Sun Jul 16 13:04:34 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 05:04:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser pgen.c,2.15,2.16 Message-ID: <200007161204.FAA12819@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv11187/Parser Modified Files: pgen.c Log Message: Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;) Index: pgen.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgen.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** pgen.c 2000/07/09 03:09:56 2.15 --- pgen.c 2000/07/16 12:04:32 2.16 *************** *** 576,580 **** [Aho&Ullman 77]. It does not always finds the minimal DFA, but it does usually make a much smaller one... (For an example ! of sub-optimal behaviour, try S: x a b+ | y a b+.) */ --- 576,580 ---- [Aho&Ullman 77]. It does not always finds the minimal DFA, but it does usually make a much smaller one... (For an example ! of sub-optimal behavior, try S: x a b+ | y a b+.) */ From python-dev@python.org Sun Jul 16 13:04:35 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 05:04:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules cStringIO.c,2.22,2.23 flmodule.c,1.41,1.42 getpath.c,1.26,1.27 imgfile.c,1.25,1.26 md5c.c,2.4,2.5 md5module.c,2.18,2.19 mmapmodule.c,2.19,2.20 mpzmodule.c,2.29,2.30 parsermodule.c,2.46,2.47 posixmodule.c,2.153,2.154 pypcre.c,2.19,2.20 regexpr.c,1.31,1.32 regexpr.h,1.12,1.13 resource.c,2.13,2.14 rgbimgmodule.c,2.20,2.21 rotormodule.c,2.26,2.27 stropmodule.c,2.68,2.69 sunaudiodev.c,1.20,1.21 syslogmodule.c,2.14,2.15 tclNotify.c,2.1,2.2 Message-ID: <200007161204.FAA12834@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv11187/Modules Modified Files: cStringIO.c flmodule.c getpath.c imgfile.c md5c.c md5module.c mmapmodule.c mpzmodule.c parsermodule.c posixmodule.c pypcre.c regexpr.c regexpr.h resource.c rgbimgmodule.c rotormodule.c stropmodule.c sunaudiodev.c syslogmodule.c tclNotify.c Log Message: Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;) Index: cStringIO.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cStringIO.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** cStringIO.c 2000/07/12 13:05:33 2.22 --- cStringIO.c 2000/07/16 12:04:31 2.23 *************** *** 58,62 **** "the StringIO module that is written in C. It does not provide the\n" "full generality of StringIO, but it provides enough for most\n" ! "applications and is especially useful in conjuction with the\n" "pickle module.\n" "\n" --- 58,62 ---- "the StringIO module that is written in C. It does not provide the\n" "full generality of StringIO, but it provides enough for most\n" ! "applications and is especially useful in conjunction with the\n" "pickle module.\n" "\n" Index: flmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/flmodule.c,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -r1.41 -r1.42 *** flmodule.c 2000/07/12 10:43:11 1.41 --- flmodule.c 2000/07/16 12:04:31 1.42 *************** *** 23,27 **** * the program takes precaution to ensure that only one thread can be in * this module at any time). This will have to be fixed some time. ! * (A fix will probably also have to synchronise with the gl module). */ --- 23,27 ---- * the program takes precaution to ensure that only one thread can be in * this module at any time). This will have to be fixed some time. ! * (A fix will probably also have to synchronize with the gl module). */ Index: getpath.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/getpath.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** getpath.c 2000/07/08 06:16:37 1.26 --- getpath.c 2000/07/16 12:04:31 1.27 *************** *** 93,97 **** * * Well, almost. Once we have determined prefix and exec_prefix, the ! * preprocesor variable PYTHONPATH is used to construct a path. Each * relative path on PYTHONPATH is prefixed with prefix. Then the directory * containing the shared library modules is appended. The environment --- 93,97 ---- * * Well, almost. Once we have determined prefix and exec_prefix, the ! * preprocessor variable PYTHONPATH is used to construct a path. Each * relative path on PYTHONPATH is prefixed with prefix. Then the directory * containing the shared library modules is appended. The environment Index: imgfile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/imgfile.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** imgfile.c 2000/07/10 17:04:33 1.25 --- imgfile.c 2000/07/16 12:04:31 1.26 *************** *** 11,15 **** /* IMGFILE module - Interface to sgi libimage */ ! /* XXX This modele should be done better at some point. It should return ** an object of image file class, and have routines to manipulate these ** image files in a neater way (so you can get rgb images off a greyscale --- 11,15 ---- /* IMGFILE module - Interface to sgi libimage */ ! /* XXX This module should be done better at some point. It should return ** an object of image file class, and have routines to manipulate these ** image files in a neater way (so you can get rgb images off a greyscale Index: md5c.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/md5c.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** md5c.c 2000/07/10 04:20:57 2.4 --- md5c.c 2000/07/16 12:04:31 2.5 *************** *** 144,148 **** /* MD5 finalization. Ends an MD5 message-digest operation, writing the ! the message digest and zeroizing the context. */ void --- 144,148 ---- /* MD5 finalization. Ends an MD5 message-digest operation, writing the ! the message digest and zeroing the context. */ void Index: md5module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/md5module.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** md5module.c 2000/07/10 12:43:58 2.18 --- md5module.c 2000/07/16 12:04:31 2.19 *************** *** 146,150 **** feed this object with arbitrary strings using the update() method, and\n\ at any point you can ask it for the digest (a strong kind of 128-bit\n\ ! checksum, a.k.a. ``fingerprint'') of the contatenation of the strings\n\ fed to it so far using the digest() method.\n\ \n\ --- 146,150 ---- feed this object with arbitrary strings using the update() method, and\n\ at any point you can ask it for the digest (a strong kind of 128-bit\n\ ! checksum, a.k.a. ``fingerprint'') of the concatenation of the strings\n\ fed to it so far using the digest() method.\n\ \n\ Index: mmapmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** mmapmodule.c 2000/07/09 13:16:13 2.19 --- mmapmodule.c 2000/07/16 12:04:31 2.20 *************** *** 702,706 **** (len(), slicing(), sequence indexing) are limited by a C int. ! Returns -1 on error, with an apprpriate Python exception raised. On success, the map size is returned. */ static int --- 702,706 ---- (len(), slicing(), sequence indexing) are limited by a C int. ! Returns -1 on error, with an appropriate Python exception raised. On success, the map size is returned. */ static int Index: mpzmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mpzmodule.c,v retrieving revision 2.29 retrieving revision 2.30 diff -C2 -r2.29 -r2.30 *** mpzmodule.c 2000/07/10 17:14:00 2.29 --- mpzmodule.c 2000/07/16 12:04:31 2.30 *************** *** 1636,1641 **** int *location; { ! /* assumptions: *alloc returns address dividable by 4, ! mpz_* routines allocate in chunks dividable by four */ fprintf(stderr, "MP_TEST_ERROR: location holds 0x%08d\n", *location ); Py_FatalError("MP_TEST_ERROR"); --- 1636,1641 ---- int *location; { ! /* assumptions: *alloc returns address divisible by 4, ! mpz_* routines allocate in chunks divisible by four */ fprintf(stderr, "MP_TEST_ERROR: location holds 0x%08d\n", *location ); Py_FatalError("MP_TEST_ERROR"); Index: parsermodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** parsermodule.c 2000/07/12 13:05:33 2.46 --- parsermodule.c 2000/07/16 12:04:31 2.47 *************** *** 67,71 **** PyObject* element); ! /* The function below is copyrigthed by Stichting Mathematisch Centrum. The * original copyright statement is included below, and continues to apply * in full to the function immediately following. All other material is --- 67,71 ---- PyObject* element); ! /* The function below is copyrighted by Stichting Mathematisch Centrum. The * original copyright statement is included below, and continues to apply * in full to the function immediately following. All other material is *************** *** 2404,2408 **** break; /* ! * Fundemental statements. */ case expr_stmt: --- 2404,2408 ---- break; /* ! * Fundamental statements. */ case expr_stmt: *************** *** 2553,2557 **** res = validate_newline(CHILD(tree, j)); } ! /* This stays in to prevent any internal failues from getting to the * user. Hopefully, this won't be needed. If a user reports getting * this, we have some debugging to do. --- 2553,2557 ---- res = validate_newline(CHILD(tree, j)); } ! /* This stays in to prevent any internal failures from getting to the * user. Hopefully, this won't be needed. If a user reports getting * this, we have some debugging to do. Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.153 retrieving revision 2.154 diff -C2 -r2.153 -r2.154 *** posixmodule.c 2000/07/14 14:28:33 2.153 --- posixmodule.c 2000/07/16 12:04:31 2.154 *************** *** 1361,1365 **** path: path of executable file\n\ args: tuple or list of arguments\n\ ! env: dictonary of strings mapping to strings"; static PyObject * --- 1361,1365 ---- path: path of executable file\n\ args: tuple or list of arguments\n\ ! env: dictionary of strings mapping to strings"; static PyObject * *************** *** 1559,1563 **** path: path of executable file\n\ args: tuple or list of arguments\n\ ! env: dictonary of strings mapping to strings"; static PyObject * --- 1559,1563 ---- path: path of executable file\n\ args: tuple or list of arguments\n\ ! env: dictionary of strings mapping to strings"; static PyObject * *************** *** 1701,1705 **** #else /* BSDI does not supply a prototype for the 'openpty' and 'forkpty' ! functions, eventhough they are included in libutil. */ #include extern int openpty(int *, int *, char *, struct termios *, struct winsize *); --- 1701,1705 ---- #else /* BSDI does not supply a prototype for the 'openpty' and 'forkpty' ! functions, even though they are included in libutil. */ #include extern int openpty(int *, int *, char *, struct termios *, struct winsize *); *************** *** 3898,3902 **** * It maps strings representing configuration variable names to * integer values, allowing those functions to be called with the ! * magic names instead of poluting the module's namespace with tons of * rarely-used constants. There are three separate tables that use * these definitions. --- 3898,3902 ---- * It maps strings representing configuration variable names to * integer values, allowing those functions to be called with the ! * magic names instead of polluting the module's namespace with tons of * rarely-used constants. There are three separate tables that use * these definitions. Index: pypcre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pypcre.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** pypcre.c 2000/07/05 22:56:52 2.19 --- pypcre.c 2000/07/16 12:04:31 2.20 *************** *** 494,498 **** caseless = ((re->options | options) & PCRE_CASELESS) != 0; ! /* For an anchored pattern, or an unchored pattern that has a first char, or a multiline pattern that matches only at "line starts", no further processing at present. */ --- 494,498 ---- caseless = ((re->options | options) & PCRE_CASELESS) != 0; ! /* For an anchored pattern, or an unanchored pattern that has a first char, or a multiline pattern that matches only at "line starts", no further processing at present. */ *************** *** 1637,1642 **** } ! /* If the mininum is 1 and the previous item was a character string, ! we either have to put back the item that got cancelled if the string length was 1, or add the character back onto the end of a longer string. For a character type nothing need be done; it will just get --- 1637,1642 ---- } ! /* If the minimum is 1 and the previous item was a character string, ! we either have to put back the item that got canceled if the string length was 1, or add the character back onto the end of a longer string. For a character type nothing need be done; it will just get *************** *** 1650,1654 **** /* For a single negated character we also have to put back the ! item that got cancelled. */ else if (*previous == OP_NOT) code++; --- 1650,1654 ---- /* For a single negated character we also have to put back the ! item that got canceled. */ else if (*previous == OP_NOT) code++; Index: regexpr.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/regexpr.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** regexpr.c 2000/07/10 13:05:28 1.31 --- regexpr.c 2000/07/16 12:04:31 1.32 *************** *** 125,129 **** struct { ! /* index into the curent page. If index == 0 and you need * to pop an item, move to the previous page and set index * = STACK_PAGE_SIZE - 1. Otherwise decrement index to --- 125,129 ---- struct { ! /* index into the current page. If index == 0 and you need * to pop an item, move to the previous page and set index * = STACK_PAGE_SIZE - 1. Otherwise decrement index to Index: regexpr.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/regexpr.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** regexpr.h 1997/09/03 00:47:36 1.12 --- regexpr.h 2000/07/16 12:04:31 1.13 *************** *** 120,124 **** int re_search(regexp_t compiled, unsigned char *string, int size, int startpos, int range, regexp_registers_t regs); ! /* This rearches for a substring matching the regexp. This returns the * first index at which a match is found. range specifies at how many * positions to try matching; positive values indicate searching --- 120,124 ---- int re_search(regexp_t compiled, unsigned char *string, int size, int startpos, int range, regexp_registers_t regs); ! /* This searches for a substring matching the regexp. This returns the * first index at which a match is found. range specifies at how many * positions to try matching; positive values indicate searching Index: resource.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/resource.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** resource.c 2000/07/10 12:15:54 2.13 --- resource.c 2000/07/16 12:04:31 2.14 *************** *** 71,76 **** ru.ru_msgrcv, /* messages received */ ru.ru_nsignals, /* signals received */ ! ru.ru_nvcsw, /* voluntary context switchs */ ! ru.ru_nivcsw /* involuntary context switchs */ ); } --- 71,76 ---- ru.ru_msgrcv, /* messages received */ ru.ru_nsignals, /* signals received */ ! ru.ru_nvcsw, /* voluntary context switches */ ! ru.ru_nivcsw /* involuntary context switches */ ); } Index: rgbimgmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/rgbimgmodule.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** rgbimgmodule.c 2000/07/10 10:49:30 2.20 --- rgbimgmodule.c 2000/07/16 12:04:31 2.21 *************** *** 554,558 **** * the pixel array. zsize specifies what kind of image file to * write out. if zsize is 1, the luminance of the pixels are ! * calculated, and a sinlge channel black and white image is saved. * If zsize is 3, an RGB image file is saved. If zsize is 4, an * RGBA image file is saved. --- 554,558 ---- * the pixel array. zsize specifies what kind of image file to * write out. if zsize is 1, the luminance of the pixels are ! * calculated, and a single channel black and white image is saved. * If zsize is 3, an RGB image file is saved. If zsize is 4, an * RGBA image file is saved. Index: rotormodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/rotormodule.c,v retrieving revision 2.26 retrieving revision 2.27 diff -C2 -r2.26 -r2.27 *** rotormodule.c 2000/07/10 22:41:30 2.26 --- rotormodule.c 2000/07/16 12:04:31 2.27 *************** *** 24,28 **** /* This creates an encryption and decryption engine I am calling ! a rotor due to the original design was a harware rotor with contacts used in Germany during WWII. --- 24,28 ---- /* This creates an encryption and decryption engine I am calling ! a rotor due to the original design was a hardware rotor with contacts used in Germany during WWII. *************** *** 44,48 **** established via the {en,de}crypt calls. They will NOT re-initalize the rotors unless: 1) They have not been ! initalized with {en,de}crypt since the last setkey() call; 2) {en,de}crypt has not been called for this rotor yet. --- 44,48 ---- established via the {en,de}crypt calls. They will NOT re-initalize the rotors unless: 1) They have not been ! initialized with {en,de}crypt since the last setkey() call; 2) {en,de}crypt has not been called for this rotor yet. *************** *** 210,214 **** ! /* These routines impliment the rotor itself */ /* Here is a fairly sophisticated {en,de}cryption system. It is based on --- 210,214 ---- ! /* These routines implement the rotor itself */ /* Here is a fairly sophisticated {en,de}cryption system. It is based on *************** *** 218,222 **** used to encrypt one character. ! The code is smart enought to tell if your alphabet has a number of characters equal to a power of two. If it does, it uses logical operations, if not it uses div and mod (both require a division). --- 218,222 ---- used to encrypt one character. ! The code is smart enough to tell if your alphabet has a number of characters equal to a power of two. If it does, it uses logical operations, if not it uses div and mod (both require a division). Index: stropmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/stropmodule.c,v retrieving revision 2.68 retrieving revision 2.69 diff -C2 -r2.68 -r2.69 *** stropmodule.c 2000/07/12 13:05:33 2.68 --- stropmodule.c 2000/07/16 12:04:31 2.69 *************** *** 168,172 **** \n\ Return a string composed of the words in list, with\n\ ! intervening occurences of sep. Sep defaults to a single\n\ space.\n\ \n\ --- 168,172 ---- \n\ Return a string composed of the words in list, with\n\ ! intervening occurrences of sep. Sep defaults to a single\n\ space.\n\ \n\ *************** *** 1041,1048 **** mymemreplace ! Return a string in which all occurences of PAT in memory STR are replaced with SUB. ! If length of PAT is less than length of STR or there are no occurences of PAT in STR, then the original string is returned. Otherwise, a new string is allocated here and returned. --- 1041,1048 ---- mymemreplace ! Return a string in which all occurrences of PAT in memory STR are replaced with SUB. ! If length of PAT is less than length of STR or there are no occurrences of PAT in STR, then the original string is returned. Otherwise, a new string is allocated here and returned. Index: sunaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sunaudiodev.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** sunaudiodev.c 2000/07/10 17:25:37 1.20 --- sunaudiodev.c 2000/07/16 12:04:31 1.21 *************** *** 259,263 **** return NULL; } ! /* x_ocount is in bytes, wheras play.samples is in frames */ /* we want frames */ return PyInt_FromLong(self->x_ocount / (ai.play.channels * --- 259,263 ---- return NULL; } ! /* x_ocount is in bytes, whereas play.samples is in frames */ /* we want frames */ return PyInt_FromLong(self->x_ocount / (ai.play.channels * Index: syslogmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/syslogmodule.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** syslogmodule.c 2000/07/10 12:29:26 2.14 --- syslogmodule.c 2000/07/16 12:04:31 2.15 *************** *** 37,41 **** - Added PyErr_Clear() call(s) where needed. - Fix core dumps if user message contains format specifiers. ! - Change openlog arg defaults to match normal syslog behaviour. - Plug memory leak in openlog(). - Fix setlogmask() to return previous mask value. --- 37,41 ---- - Added PyErr_Clear() call(s) where needed. - Fix core dumps if user message contains format specifiers. ! - Change openlog arg defaults to match normal syslog behavior. - Plug memory leak in openlog(). - Fix setlogmask() to return previous mask value. Index: tclNotify.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/tclNotify.c,v retrieving revision 2.1 retrieving revision 2.2 diff -C2 -r2.1 -r2.2 *** tclNotify.c 1997/09/28 05:52:41 2.1 --- tclNotify.c 2000/07/16 12:04:31 2.2 *************** *** 120,124 **** * * Side effects: ! * Clears the notifier intialization flag. * *---------------------------------------------------------------------- --- 120,124 ---- * * Side effects: ! * Clears the notifier initialization flag. * *---------------------------------------------------------------------- *************** *** 203,207 **** * * Side effects: ! * The given event source is cancelled, so its procedure will * never again be called. If no such source exists, nothing * happens. --- 203,207 ---- * * Side effects: ! * The given event source is canceled, so its procedure will * never again be called. If no such source exists, nothing * happens. From python-dev@python.org Sun Jul 16 13:05:02 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 05:05:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Demo/sgi/gl kites.py,1.3,1.4 Message-ID: <200007161205.FAA13050@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/sgi/gl In directory slayer.i.sourceforge.net:/tmp/cvs-serv11187/Demo/sgi/gl Modified Files: kites.py Log Message: Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;) Index: kites.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/sgi/gl/kites.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** kites.py 1996/11/27 19:49:46 1.3 --- kites.py 2000/07/16 12:04:29 1.4 *************** *** 44,48 **** # ! # makeobj : the contructor of the object # def mkobj () : --- 44,48 ---- # ! # makeobj : the constructor of the object # def mkobj () : From python-dev@python.org Sun Jul 16 13:05:02 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 05:05:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Demo/sgi/video OldVcopy.py,1.3,1.4 Vrec.py,1.19,1.20 Vrecb.py,1.9,1.10 Message-ID: <200007161205.FAA13052@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/sgi/video In directory slayer.i.sourceforge.net:/tmp/cvs-serv11187/Demo/sgi/video Modified Files: OldVcopy.py Vrec.py Vrecb.py Log Message: Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;) Index: OldVcopy.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/sgi/video/OldVcopy.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** OldVcopy.py 1996/11/27 19:50:00 1.3 --- OldVcopy.py 2000/07/16 12:04:30 1.4 *************** *** 16,23 **** def usage(): ! sys.stderr.write('usage: Vcopy [-t type] [-m treshold] [-a] infile outfile\n') sys.stderr.write('-t Convert to other type\n') sys.stderr.write('-a Automatic\n') ! sys.stderr.write('-m Convert grey to mono with treshold\n') sys.stderr.write('-d Convert grey to mono with dithering\n') sys.exit(2) --- 16,23 ---- def usage(): ! sys.stderr.write('usage: Vcopy [-t type] [-m threshold] [-a] infile outfile\n') sys.stderr.write('-t Convert to other type\n') sys.stderr.write('-a Automatic\n') ! sys.stderr.write('-m Convert grey to mono with threshold\n') sys.stderr.write('-d Convert grey to mono with dithering\n') sys.exit(2) Index: Vrec.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/sgi/video/Vrec.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** Vrec.py 1996/11/27 19:50:19 1.19 --- Vrec.py 2000/07/16 12:04:30 1.20 *************** *** 27,31 **** print '-G : 2-bit greyscale dithered' print '-m : monochrome dithered' ! print '-M value : monochrome tresholded with value' print '-f : Capture fields (in stead of frames)' print '-P frames : preallocate space for "frames" frames' --- 27,31 ---- print '-G : 2-bit greyscale dithered' print '-m : monochrome dithered' ! print '-M value : monochrome thresholded with value' print '-f : Capture fields (in stead of frames)' print '-P frames : preallocate space for "frames" frames' Index: Vrecb.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/sgi/video/Vrecb.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** Vrecb.py 1996/11/27 19:50:21 1.9 --- Vrecb.py 2000/07/16 12:04:30 1.10 *************** *** 46,50 **** print '-G : 2-bit greyscale dithered' print '-m : monochrome dithered' ! print '-M value : monochrome tresholded with value' print '-f : Capture fields (instead of frames)' print '-n number : Capture this many frames (default 60)' --- 46,50 ---- print '-G : 2-bit greyscale dithered' print '-m : monochrome dithered' ! print '-M value : monochrome thresholded with value' print '-f : Capture fields (instead of frames)' print '-n number : Capture this many frames (default 60)' From python-dev@python.org Sun Jul 16 13:05:03 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 05:05:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include abstract.h,2.23,2.24 cStringIO.h,2.12,2.13 cobject.h,2.8,2.9 longintrepr.h,2.9,2.10 modsupport.h,2.31,2.32 object.h,2.62,2.63 unicodeobject.h,2.14,2.15 Message-ID: <200007161205.FAA13066@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv11187/Include Modified Files: abstract.h cStringIO.h cobject.h longintrepr.h modsupport.h object.h unicodeobject.h Log Message: Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;) Index: abstract.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/abstract.h,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** abstract.h 2000/07/13 19:39:15 2.23 --- abstract.h 2000/07/16 12:04:30 2.24 *************** *** 696,700 **** /* ! Return the concatination of o1 and o2 on success, and NULL on failure. This is the equivalent of the Python expression: o1+o2. --- 696,700 ---- /* ! Return the concatenation of o1 and o2 on success, and NULL on failure. This is the equivalent of the Python expression: o1+o2. Index: cStringIO.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/cStringIO.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** cStringIO.h 2000/07/09 03:09:55 2.12 --- cStringIO.h 2000/07/16 12:04:30 2.13 *************** *** 72,76 **** */ ! /* Basic fuctions to manipulate cStringIO objects from C */ static struct PycStringIO_CAPI { --- 72,76 ---- */ ! /* Basic functions to manipulate cStringIO objects from C */ static struct PycStringIO_CAPI { Index: cobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/cobject.h,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** cobject.h 2000/07/09 00:20:36 2.8 --- cobject.h 2000/07/16 12:04:30 2.9 *************** *** 29,33 **** /* Create a PyCObject from a pointer to a C object and an optional ! destrutor function. If the second argument is non-null, then it will be called with the first argument if and when the PyCObject is destroyed. --- 29,33 ---- /* Create a PyCObject from a pointer to a C object and an optional ! destructor function. If the second argument is non-null, then it will be called with the first argument if and when the PyCObject is destroyed. *************** *** 39,43 **** /* Create a PyCObject from a pointer to a C object, a description object, ! and an optional destrutor function. If the third argument is non-null, then it will be called with the first and second arguments if and when the PyCObject is destroyed. --- 39,43 ---- /* Create a PyCObject from a pointer to a C object, a description object, ! and an optional destructor function. If the third argument is non-null, then it will be called with the first and second arguments if and when the PyCObject is destroyed. Index: longintrepr.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/longintrepr.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** longintrepr.h 2000/07/08 04:17:21 2.9 --- longintrepr.h 2000/07/16 12:04:30 2.10 *************** *** 45,49 **** digit) is never zero. Also, in all cases, for all valid i, 0 <= ob_digit[i] <= MASK. ! The allocation fuction takes care of allocating extra memory so that ob_digit[0] ... ob_digit[abs(ob_size)-1] are actually available. */ --- 45,49 ---- digit) is never zero. Also, in all cases, for all valid i, 0 <= ob_digit[i] <= MASK. ! The allocation function takes care of allocating extra memory so that ob_digit[0] ... ob_digit[abs(ob_size)-1] are actually available. */ Index: modsupport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/modsupport.h,v retrieving revision 2.31 retrieving revision 2.32 diff -C2 -r2.31 -r2.32 *** modsupport.h 2000/07/08 17:25:54 2.31 --- modsupport.h 2000/07/16 12:04:30 2.32 *************** *** 45,49 **** /* The API version is maintained (independently from the Python version) so we can detect mismatches between the interpreter and dynamically ! loaded modules. These are diagnosticised by an error message but the module is still loaded (because the mismatch can only be tested after loading the module). The error message is intended to --- 45,49 ---- /* The API version is maintained (independently from the Python version) so we can detect mismatches between the interpreter and dynamically ! loaded modules. These are diagnosed by an error message but the module is still loaded (because the mismatch can only be tested after loading the module). The error message is intended to Index: object.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/object.h,v retrieving revision 2.62 retrieving revision 2.63 diff -C2 -r2.62 -r2.63 *** object.h 2000/07/09 14:22:08 2.62 --- object.h 2000/07/16 12:04:30 2.63 *************** *** 52,56 **** to a pointer to a longer structure type. This longer type must start with the reference count and type fields; the macro PyObject_HEAD should be ! used for this (to accomodate for future changes). The implementation of a particular object type can cast the object pointer to the proper type and back. --- 52,56 ---- to a pointer to a longer structure type. This longer type must start with the reference count and type fields; the macro PyObject_HEAD should be ! used for this (to accommodate for future changes). The implementation of a particular object type can cast the object pointer to the proper type and back. *************** *** 327,331 **** objects that don't contain references to other objects or heap memory this can be the standard function free(). Both macros can be used ! whereever a void expression is allowed. The argument shouldn't be a NIL pointer. The macro _Py_NewReference(op) is used only to initialize reference counts to 1; it is defined here for convenience. --- 327,331 ---- objects that don't contain references to other objects or heap memory this can be the standard function free(). Both macros can be used ! wherever a void expression is allowed. The argument shouldn't be a NIL pointer. The macro _Py_NewReference(op) is used only to initialize reference counts to 1; it is defined here for convenience. *************** *** 519,523 **** Objects that want to be recursion safe need to use ! the macroes Py_TRASHCAN_SAFE_BEGIN(name) and --- 519,523 ---- Objects that want to be recursion safe need to use ! the macro's Py_TRASHCAN_SAFE_BEGIN(name) and Index: unicodeobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/unicodeobject.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** unicodeobject.h 2000/07/07 13:45:44 2.14 --- unicodeobject.h 2000/07/16 12:04:30 2.15 *************** *** 494,498 **** Note that Py_UNICODE data is being interpreted as UTF-16 reduced to UCS-2. This trick makes it possible to add full UTF-16 capabilities ! at a later point without comprimising the APIs. */ --- 494,498 ---- Note that Py_UNICODE data is being interpreted as UTF-16 reduced to UCS-2. This trick makes it possible to add full UTF-16 capabilities ! at a later point without compromising the APIs. */ *************** *** 816,820 **** ); ! /* Apply a argument tuple or dictionar to a format string and return the resulting Unicode string. */ --- 816,820 ---- ); ! /* Apply a argument tuple or dictionary to a format string and return the resulting Unicode string. */ From python-dev@python.org Sun Jul 16 13:12:14 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 14:12:14 +0200 Subject: [Python-checkins] Spelling fixes Message-ID: <20000716141214.S7340@xs4all.nl> A couple of the checkin-mails about the spelling fixes are lots. I did the whole bunch in a single checkin, and SourceForge didn't like that: cvs server: cannot write entry to log filter: /cvsroot/python/CVSROOT/syncmail 'python/dist/src/Python ceval.c,2.184,2.185 codecs.c,2.9,2.10 dynload_aix.c,2.5,2.6 dynload_next.c,2.5,2.6 exceptions.c,1.9,1.10 getargs.c,2.40,2.41 pythonrun.c,2.103,2.104 strtod.c,1.8,1.9 thread_lwp.h,2.10,2.11 thread_os2.h,2.7,2.8' python-checkins@python.org cvs server: cannot write entry to log filter: /cvsroot/python/CVSROOT/syncmail 'python/dist/src/Tools/freeze checkextensions_win32.py,1.5,1.6 freeze.py,1.36,1.37 modulefinder.py,1.12,1.13' python-checkins@python.org Mailing python-checkins@python.org... Traceback (innermost last): File "/cvsroot/python/CVSROOT/syncmail", line 172, in ? main() File "/cvsroot/python/CVSROOT/syncmail", line 166, in main blast_mail(mailcmd, specs[1:]) File "/cvsroot/python/CVSROOT/syncmail", line 118, in blast_mail fp = os.popen(mailcmd, 'w') os.error: (11, 'Resource temporarily unavailable') sh: fork: Resource temporarily unavailable sh: fork: Resource temporarily unavailable sh: fork: Resource temporarily unavailable sh: fork: Resource temporarily unavailable [...] I'm unsure howmany checkin mails were lost, but I'd advise anyone doing large checkins to do them seperately in each directory, by hand ;-P The changes do seem to be checked in without trouble, though. -- Thomas Wouters Hi! I'm a .signature virus! copy me into your .signature file to help me spread! From python-dev@python.org Sun Jul 16 14:29:19 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Sun, 16 Jul 2000 06:29:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.45,2.46 Message-ID: <200007161329.GAA01198@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv1189/Objects Modified Files: unicodeobject.c Log Message: Fix to a bug found by Florian Weimer: The UTF-8 decoder is still buggy (i.e. it doesn't pass Markus Kuhn's stress test), mainly due to the following construct: #define UTF8_ERROR(details) do { \ if (utf8_decoding_error(&s, &p, errors, details)) \ goto onError; \ continue; \ } while (0) (The "continue" statement is supposed to exit from the outer loop, but of course, it doesn't. Indeed, this is a marvelous example of the dangers of the C programming language and especially of the C preprocessor.) Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** unicodeobject.c 2000/07/16 12:04:31 2.45 --- unicodeobject.c 2000/07/16 13:29:13 2.46 *************** *** 635,639 **** if (utf8_decoding_error(&s, &p, errors, details)) \ goto onError; \ ! continue; \ } while (0) --- 635,639 ---- if (utf8_decoding_error(&s, &p, errors, details)) \ goto onError; \ ! goto nextChar; \ } while (0) *************** *** 732,735 **** --- 732,736 ---- } s += n; + nextChar: } From python-dev@python.org Sun Jul 16 17:07:31 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 09:07:31 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0203.txt,1.2,1.3 Message-ID: <200007161607.JAA29452@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv29324 Modified Files: pep-0203.txt Log Message: Incomplete version of the augmented assignment PEP. It currently includes only the arguments for/against inclusion of augmented assignment in Python, not yet the technical details. I decided to upload this half-completed version to give people some time to respond before I finish it :-) Feel free to bring up any and all arguments. The point of the PEP is to archive those, after all! Index: pep-0203.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0203.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pep-0203.txt 2000/07/14 03:30:20 1.2 --- pep-0203.txt 2000/07/16 16:07:29 1.3 *************** *** 8,11 **** --- 8,153 ---- + Introduction + + This PEP describes the `augmented assignment' proposal for Python + 2.0. This PEP tracks the status and ownership of this feature, + slated for introduction in Python 2.0. It contains a description + of the feature and outlines changes necessary to support the + feature. This PEP summarizes discussions held in mailing list + forums, and provides URLs for further information, where + appropriate. The CVS revision history of this file contains the + definitive historical record. + + + + The Origin of Augmented Assignment + + Augmented assignment refers to binary operators that combine two + existing operators: the assignment operator, and one of the binary + operators. Its origins lie in other programming languages, most + notably `C', where it was defined for performance reasons. They + are meant to replace the repetetive syntax of, for instance, + adding the number '1' to a variable: + + x = x + 1; + + with an expression that is shorter, less error-prone and easier to + optimize (by the compiler): + + x += 1; + + The same goes for all other binary operands, resulting in the + following augmented assignment operator list, based on Python's + current binary operator list: + + +=, -=, /=, *=, %=, **=, >>=, <<=, &=, |=, ^= + + See the documentation of each operator on what they do. + + + + Augmented Assignment in Python + + The traditional reasons for augmented assignment, readability and + optimization, are not as obvious in Python, for several reasons. + + - Numbers are immutable, they cannot be changed. In other + programming languages, a variable holds a value, and altering + the variable changes the value it holds. In Python, variables + hold `references' to values, and altering an immutable value + means changing the variable, not what it points to. + + - Assignment is a different operation in Python. In most + languages, variables are containers, and assignment copies a + value into that container. In Python, assignment binds a value + to a name, it does not copy the value into a new storage space. + + - The augmented assignment operators map fairly directly into the + underlying hardware. Python does not deal directly with the + hardware it runs on, so this `natural inclusion' does not make + sense. + + - The augmented assigment syntax is subtly different in more + complex expressions. What to do, for instance, in a case such + as this: + + seq[i:calc(seq, i)] *= r + + It is unclear whether 'seq' gets indexed once or twice, and + whether 'calc' gets called once or twice. + + + + Normal operators + + There are, however, good reasons to include augented assignment. + One of these has to do with Python's way of handling operators. In + Python, a user defined class can implement one or more of the + binary operators by supplying a 'magic' method name. For instance, + for a class to support ' + ', the '__add__' + method should be defined. This method should return a new object, + which is the result of the expression. + + For the case of ' + ', where 'object' does not + have an '__add__' method, the class can define a '__radd__' + method, which then should behave exactly as '__add__'. Indeed, + '__radd__' is often a different name for the same method. + + For C extention types, a similar technique is available, through + the PyNumberMethods and PySequenceMethods members of the PyType + structure. + + However, the problem with this approach is that the '__add__' + method cannot know in what context it is called. It cannot tell + whether it should create a new object, or whether it is allowed to + modify itself. (As would be the case in 'x = x + 1') As a result, + the '__add__' method, and all other such 'magic' methods, should + always return a new object. For large objects, this can be very + inefficient. + + This inefficiency is often solved by adding a method that does the + appropriate modification 'in-place'. List objects, for instance, + have the 'extend' method that behaves exactly as the '+' operator, + except the operation is done on the list itself, instead of on a + copy. + + The augmented assignment syntax can support this behaviour + explicitly. When the magic method for 'in-place' operation are + missing, it can fall back to the normal methods for that + operation, maintaining full backward compatibility even when + mixing the new syntax with old objects. + + The other benifit of augmented assignment is readability. After + the general concept of augmented assignment is grasped, all the + augmented assigment operators instantly become obvious. There is + no need for non-obvious and non-standard method names to implement + efficient, in-place operations, and there is no need to check the + type of an object before operating on it: the augmented assignment + will work for all types that implement that basic operation, not + merely those that implement the augmented variant. + + And the last problem with augmented assignment, what to do with + indexes and function calls in the expression, can be solved in a + very Pythonic manner: if it looks like it's only called once, it + *is* only called once. Taking this expression: + + seq[func(x)] += x + + The function 'func' is called once, and 'seq' is indexed twice: + once to retrieve the value (__getitem__), and once to store it + (__setitem__). So the expression can be rewritten as: + + tmp = func(x) + seq[tmp] = seq[tmp] + x + + The augmented assignment form of this expression is much more + readable. + + + + + + + Local Variables: mode: indented-text From python-dev@python.org Sun Jul 16 17:52:47 2000 From: python-dev@python.org (Skip Montanaro) Date: Sun, 16 Jul 2000 09:52:47 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib posixpath.py,1.32,1.33 Message-ID: <200007161652.JAA00418@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv410 Modified Files: posixpath.py Log Message: split and join on "/" in commonprefix Index: posixpath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/posixpath.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** posixpath.py 2000/07/12 16:55:57 1.32 --- posixpath.py 2000/07/16 16:52:45 1.33 *************** *** 121,129 **** n = m[:] for i in range(len(n)): ! n[i] = n[i].split(os.sep) ! # if os.sep didn't have any effect, try os.altsep ! if os.altsep and len(n[i]) == 1: ! n[i] = n[i].split(os.altsep) ! prefix = n[0] for item in n: --- 121,126 ---- n = m[:] for i in range(len(n)): ! n[i] = n[i].split("/") ! prefix = n[0] for item in n: *************** *** 133,137 **** if i == 0: return '' break ! return os.sep.join(prefix) --- 130,134 ---- if i == 0: return '' break ! return "/".join(prefix) From python-dev@python.org Sun Jul 16 18:10:52 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 16 Jul 2000 10:10:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.46,2.47 Message-ID: <200007161710.KAA08036@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv7981/python/dist/src/objects Modified Files: unicodeobject.c Log Message: Fix fatal compiler (MSVC6) error: unicodeobject.c(735) : error C2143: syntax error : missing ';' before '}' Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** unicodeobject.c 2000/07/16 13:29:13 2.46 --- unicodeobject.c 2000/07/16 17:10:50 2.47 *************** *** 733,736 **** --- 733,737 ---- s += n; nextChar: + /* empty */; } From python-dev@python.org Sun Jul 16 19:47:46 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 16 Jul 2000 11:47:46 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.47,2.48 Message-ID: <200007161847.LAA19651@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv19385/objects Modified Files: unicodeobject.c Log Message: - change \x to mean "byte" also in unicode literals (patch #100912) Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.47 retrieving revision 2.48 diff -C2 -r2.47 -r2.48 *** unicodeobject.c 2000/07/16 17:10:50 2.47 --- unicodeobject.c 2000/07/16 18:47:43 2.48 *************** *** 1199,1203 **** break; ! /* \xXXXX escape with 0-4 hex digits */ case 'x': x = 0; --- 1199,1205 ---- break; ! /* \xXXXX escape with 1-n hex digits. for compatibility ! with 8-bit strings, this code ignores all but the last ! two digits */ case 'x': x = 0; *************** *** 1205,1209 **** if (isxdigit(c)) { do { ! x = (x<<4) & ~0xF; if ('0' <= c && c <= '9') x += c - '0'; --- 1207,1211 ---- if (isxdigit(c)) { do { ! x = (x<<4) & 0xF0; if ('0' <= c && c <= '9') x += c - '0'; *************** *** 1214,1218 **** c = (unsigned char)*++s; } while (isxdigit(c)); ! *p++ = x; } else { *p++ = '\\'; --- 1216,1220 ---- c = (unsigned char)*++s; } while (isxdigit(c)); ! *p++ = (unsigned char) x; } else { *p++ = '\\'; From python-dev@python.org Sun Jul 16 20:01:17 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 12:01:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib liballos.tex,1.9,1.10 libascii.tex,1.3,1.4 libasyncore.tex,1.4,1.5 libaudioop.tex,1.18,1.19 libbasehttp.tex,1.10,1.11 libbinascii.tex,1.16,1.17 libcd.tex,1.12,1.13 libcfgparser.tex,1.12,1.13 libcgi.tex,1.26,1.27 libcgihttp.tex,1.2,1.3 libchunk.tex,1.3,1.4 libcode.tex,1.10,1.11 libcurses.tex,1.7,1.8 libdircache.tex,1.2,1.3 libdl.tex,1.1,1.2 libformatter.tex,1.19,1.20 libftplib.tex,1.27,1.28 libhtmllib.tex,1.21,1.22 libimageop.tex,1.11,1.12 libimaplib.tex,1.15,1.16 libimp.tex,1.25,1.26 libintro.tex,1.6,1.7 liblocale.tex,1.16,1.17 libmarshal.tex,1.18,1.19 libmd5.tex,1.14,1.15 libmutex.tex,1.2,1.3 libnetrc.tex,1.6,1.7 libnis.tex,1.3,1.4 libos.tex,1.43,1.44 libpanel.tex,1.9,1.10 libparser.tex,1.35,1.36 libpdb.tex,1.27,1.28 libpickle.tex,1.26,1.27 libpipes.tex,1.2,1.3 libpoplib.tex,1.8,1.9 librotor.tex,1.14,1.15 libsched.tex,1.3,1.4 libsgmllib.tex,1.19,1.20 libsha.tex,1.2,1.3 libshelve.tex,1.13,1.14 libshlex.tex,1.8,1.9 libsignal.tex,1.17,1.18! libsmtplib.tex,1.14,1.15 libsomeos.tex,1.7,1.8 libstatvfs.tex,1.2,1.3 libstdwin.tex,1.22,1.23 libsunau.tex,1.1,1.2 libsymbol.tex,1.6,1.7 libtelnetlib.tex,1.5,1.6 libtempfile.tex,1.15,1.16 libtime.tex,1.32,1.33 libtoken.tex,1.6,1.7 libtraceback.tex,1.12,1.13 libundoc.tex,1.74,1.75 liburllib.tex,1.22,1.23 liburlparse.tex,1.15,1.16 libuser.tex,1.14,1.15 libuserdict.tex,1.14,1.15 libwave.tex,1.3,1.4 libwinsound.tex,1.4,1.5 libxmllib.tex,1.23,1.24 Message-ID: <200007161901.MAA24120@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv20144 Modified Files: liballos.tex libascii.tex libasyncore.tex libaudioop.tex libbasehttp.tex libbinascii.tex libcd.tex libcfgparser.tex libcgi.tex libcgihttp.tex libchunk.tex libcode.tex libcurses.tex libdircache.tex libdl.tex libformatter.tex libftplib.tex libhtmllib.tex libimageop.tex libimaplib.tex libimp.tex libintro.tex liblocale.tex libmarshal.tex libmd5.tex libmutex.tex libnetrc.tex libnis.tex libos.tex libpanel.tex libparser.tex libpdb.tex libpickle.tex libpipes.tex libpoplib.tex librotor.tex libsched.tex libsgmllib.tex libsha.tex libshelve.tex libshlex.tex libsignal.tex libsmtplib.tex libsomeos.tex libstatvfs.tex libstdwin.tex libsunau.tex libsymbol.tex libtelnetlib.tex libtempfile.tex libtime.tex libtoken.tex libtraceback.tex libundoc.tex liburllib.tex liburlparse.tex libuser.tex libuserdict.tex libwave.tex libwinsound.tex libxmllib.tex Log Message: Rob W. W. Hooft's spelling fixes for the Library Reference. I hope SourceForge doesn't choke on this batch :-) I'm not entirely sure this is 100% correct. The patch changes an \index{persistency} to \index{presistence}, and I don't know what \index{} does. But it seems to do so persi--er, consistently, so I hope it isn't a problem. Index: liballos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liballos.tex,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** liballos.tex 1999/05/11 13:45:37 1.9 --- liballos.tex 2000/07/16 19:01:09 1.10 *************** *** 3,7 **** The modules described in this chapter provide interfaces to operating system features that are available on (almost) all operating systems, ! such as files and a clock. The interfaces are generally modelled after the \UNIX{} or C interfaces, but they are available on most other systems as well. Here's an overview: --- 3,7 ---- The modules described in this chapter provide interfaces to operating system features that are available on (almost) all operating systems, ! such as files and a clock. The interfaces are generally modeled after the \UNIX{} or C interfaces, but they are available on most other systems as well. Here's an overview: Index: libascii.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libascii.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** libascii.tex 2000/06/30 16:06:19 1.3 --- libascii.tex 2000/07/16 19:01:09 1.4 *************** *** 19,23 **** \lineii{SOH}{Start of heading, console interrupt} \lineii{STX}{Start of text} ! \lineii{ETX}{Ennd of text} \lineii{EOT}{End of transmission} \lineii{ENQ}{Enquiry, goes with \constant{ACK} flow control} --- 19,23 ---- \lineii{SOH}{Start of heading, console interrupt} \lineii{STX}{Start of text} ! \lineii{ETX}{End of text} \lineii{EOT}{End of transmission} \lineii{ENQ}{Enquiry, goes with \constant{ACK} flow control} Index: libasyncore.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libasyncore.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** libasyncore.tex 2000/04/03 20:13:52 1.4 --- libasyncore.tex 2000/07/16 19:01:09 1.5 *************** *** 108,112 **** is scanned, and this method is called to see if there is any interest in writing. The default method simply returns \code{1}, ! indiciating that by default, all channels will be interested. \end{methoddesc} --- 108,112 ---- is scanned, and this method is called to see if there is any interest in writing. The default method simply returns \code{1}, ! indicating that by default, all channels will be interested. \end{methoddesc} Index: libaudioop.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libaudioop.tex,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** libaudioop.tex 1999/04/23 17:30:40 1.18 --- libaudioop.tex 2000/07/16 19:01:09 1.19 *************** *** 152,156 **** \begin{funcdesc}{mul}{fragment, width, factor} ! Return a fragment that has all samples in the original framgent multiplied by the floating-point value \var{factor}. Overflow is silently ignored. --- 152,156 ---- \begin{funcdesc}{mul}{fragment, width, factor} ! Return a fragment that has all samples in the original fragment multiplied by the floating-point value \var{factor}. Overflow is silently ignored. *************** *** 162,166 **** \var{state} is a tuple containing the state of the converter. The ! converter returns a tupl \code{(\var{newfragment}, \var{newstate})}, and \var{newstate} should be passed to the next call of \function{ratecv()}. --- 162,166 ---- \var{state} is a tuple containing the state of the converter. The ! converter returns a tuple \code{(\var{newfragment}, \var{newstate})}, and \var{newstate} should be passed to the next call of \function{ratecv()}. Index: libbasehttp.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbasehttp.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** libbasehttp.tex 1999/06/14 19:49:50 1.10 --- libbasehttp.tex 2000/07/16 19:01:09 1.11 *************** *** 91,95 **** \begin{memberdesc}{wfile} Contains the output stream for writing a response back to the client. ! Proper adherance to the HTTP protocol must be used when writing to this stream. \end{memberdesc} --- 91,95 ---- \begin{memberdesc}{wfile} Contains the output stream for writing a response back to the client. ! Proper adherence to the HTTP protocol must be used when writing to this stream. \end{memberdesc} *************** *** 116,120 **** client. It uses parenthesized, keyed format specifiers, so the format operand must be a dictionary. The \var{code} key should ! be an integer, specifing the numeric HTTP error code value. \var{message} should be a string containing a (detailed) error message of what occurred, and \var{explain} should be an --- 116,120 ---- client. It uses parenthesized, keyed format specifiers, so the format operand must be a dictionary. The \var{code} key should ! be an integer, specifying the numeric HTTP error code value. \var{message} should be a string containing a (detailed) error message of what occurred, and \var{explain} should be an Index: libbinascii.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbinascii.tex,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** libbinascii.tex 2000/02/16 21:13:37 1.16 --- libbinascii.tex 2000/07/16 19:01:09 1.17 *************** *** 12,16 **** but use wrapper modules like \refmodule{uu}\refstmodindex{uu} or \refmodule{binhex}\refstmodindex{binhex} instead, this module solely ! exists because bit-manipuation of large amounts of data is slow in Python. --- 12,16 ---- but use wrapper modules like \refmodule{uu}\refstmodindex{uu} or \refmodule{binhex}\refstmodindex{binhex} instead, this module solely ! exists because bit-manipulation of large amounts of data is slow in Python. Index: libcd.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcd.tex,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** libcd.tex 1999/03/02 16:37:07 1.12 --- libcd.tex 2000/07/16 19:01:09 1.13 *************** *** 87,91 **** \begin{datadesc}{ERROR} ! An error aoocurred while trying to read the disc or its table of contents. \end{datadesc} --- 87,91 ---- \begin{datadesc}{ERROR} ! An error occurred while trying to read the disc or its table of contents. \end{datadesc} *************** *** 195,199 **** \begin{methoddesc}[CD player]{playtrackabs}{track, minutes, seconds, frames, play} ! Like \method{play()}, except that playing begins at the spcified absolute time and ends at the end of the specified track. \end{methoddesc} --- 195,199 ---- \begin{methoddesc}[CD player]{playtrackabs}{track, minutes, seconds, frames, play} ! Like \method{play()}, except that playing begins at the specified absolute time and ends at the end of the specified track. \end{methoddesc} Index: libcfgparser.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcfgparser.tex,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** libcfgparser.tex 2000/07/14 15:00:02 1.12 --- libcfgparser.tex 2000/07/16 19:01:09 1.13 *************** *** 57,61 **** \begin{excdesc}{DuplicateSectionError} ! Exception raised when mutliple sections with the same name are found, or if \method{add_section()} is called with the name of a section that is already present. --- 57,61 ---- \begin{excdesc}{DuplicateSectionError} ! Exception raised when multiple sections with the same name are found, or if \method{add_section()} is called with the name of a section that is already present. Index: libcgi.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcgi.tex,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** libcgi.tex 2000/04/03 20:13:52 1.26 --- libcgi.tex 2000/07/16 19:01:09 1.27 *************** *** 105,109 **** \class{FieldStorage} or \class{MiniFieldStorage} instance but a list of such instances. If you expect this possibility ! (i.e., when your HTML form comtains multiple fields with the same name), use the \function{type()} function to determine whether you have a single instance or a list of instances. For example, here's --- 105,109 ---- \class{FieldStorage} or \class{MiniFieldStorage} instance but a list of such instances. If you expect this possibility ! (i.e., when your HTML form contains multiple fields with the same name), use the \function{type()} function to determine whether you have a single instance or a list of instances. For example, here's *************** *** 132,136 **** You can test for an uploaded file by testing either the filename attribute or the file attribute. You can then read the data at ! leasure from the file attribute: \begin{verbatim} --- 132,136 ---- You can test for an uploaded file by testing either the filename attribute or the file attribute. You can then read the data at ! leisure from the file attribute: \begin{verbatim} Index: libcgihttp.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcgihttp.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libcgihttp.tex 2000/04/03 20:13:52 1.2 --- libcgihttp.tex 2000/07/16 19:01:09 1.3 *************** *** 12,16 **** The \module{CGIHTTPServer} module defines a request-handler class, interface compatible with ! \class{BaseHTTPServer.BaseHTTPRequestHandler} and inherits behaviour from \class{SimpleHTTPServer.SimpleHTTPRequestHandler} but can also run CGI scripts. --- 12,16 ---- The \module{CGIHTTPServer} module defines a request-handler class, interface compatible with ! \class{BaseHTTPServer.BaseHTTPRequestHandler} and inherits behavior from \class{SimpleHTTPServer.SimpleHTTPRequestHandler} but can also run CGI scripts. Index: libchunk.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libchunk.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** libchunk.tex 1999/08/26 15:57:08 1.3 --- libchunk.tex 2000/07/16 19:01:09 1.4 *************** *** 25,29 **** header} \lineiii{8}{\var{n}}{Data bytes, where \var{n} is the size given in ! the preceeding field} \lineiii{8 + \var{n}}{0 or 1}{Pad byte needed if \var{n} is odd and chunk alignment is used} --- 25,29 ---- header} \lineiii{8}{\var{n}}{Data bytes, where \var{n} is the size given in ! the preceding field} \lineiii{8 + \var{n}}{0 or 1}{Pad byte needed if \var{n} is odd and chunk alignment is used} Index: libcode.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcode.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** libcode.tex 2000/04/03 20:13:52 1.10 --- libcode.tex 2000/07/16 19:01:09 1.11 *************** *** 104,108 **** When an exception occurs, \method{showtraceback()} is called to display a traceback. All exceptions are caught except ! \exception{SystemExit}, which is allowed to propogate. A note about \exception{KeyboardInterrupt}: this exception may occur --- 104,108 ---- When an exception occurs, \method{showtraceback()} is called to display a traceback. All exceptions are caught except ! \exception{SystemExit}, which is allowed to propagate. A note about \exception{KeyboardInterrupt}: this exception may occur Index: libcurses.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** libcurses.tex 2000/06/30 01:05:39 1.7 --- libcurses.tex 2000/07/16 19:01:09 1.8 *************** *** 1,4 **** \section{\module{curses} --- ! Terminal independant console handling} \declaremodule{extension}{curses} --- 1,4 ---- \section{\module{curses} --- ! Terminal independent console handling} \declaremodule{extension}{curses} *************** *** 244,248 **** \begin{funcdesc}{mouseinterval}{interval} ! Sets the maximum time in millisecondsthat can elapse between press and release events in order for them to be recognized as a click, and returns the previous interval value. The default value is 200 msec, --- 244,248 ---- \begin{funcdesc}{mouseinterval}{interval} ! Sets the maximum time in milliseconds that can elapse between press and release events in order for them to be recognized as a click, and returns the previous interval value. The default value is 200 msec, *************** *** 847,851 **** \begin{methoddesc}{timeout}{delay} ! Sets blocking or non-blocking read behaviour for the window. If \var{delay} is negative, blocking read is used, which will wait indefinitely for input). If \var{delay} is zero, then non-blocking --- 847,851 ---- \begin{methoddesc}{timeout}{delay} ! Sets blocking or non-blocking read behavior for the window. If \var{delay} is negative, blocking read is used, which will wait indefinitely for input). If \var{delay} is zero, then non-blocking Index: libdircache.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdircache.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libdircache.tex 1999/10/29 17:51:29 1.2 --- libdircache.tex 2000/07/16 19:01:09 1.3 *************** *** 23,27 **** \begin{funcdesc}{opendir}{path} ! Same as \function{listdir()}. Defined for backwards compatability. \end{funcdesc} --- 23,27 ---- \begin{funcdesc}{opendir}{path} ! Same as \function{listdir()}. Defined for backwards compatibility. \end{funcdesc} Index: libdl.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdl.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** libdl.tex 1999/07/01 20:40:21 1.1 --- libdl.tex 2000/07/16 19:01:09 1.2 *************** *** 9,13 **** \cfunction{dlopen()} function, which is the most common interface on \UNIX{} platforms for handling dynamically linked libraries. It allows ! the program to call arbitary functions in such a library. \strong{Note:} This module will not work unless --- 9,13 ---- \cfunction{dlopen()} function, which is the most common interface on \UNIX{} platforms for handling dynamically linked libraries. It allows ! the program to call arbitrary functions in such a library. \strong{Note:} This module will not work unless *************** *** 24,28 **** signifies late binding (\constant{RTLD_LAZY}) or immediate binding (\constant{RTLD_NOW}). Default is \constant{RTLD_LAZY}. Note that some ! sytems do not support \constant{RTLD_NOW}. Return value is a \pytype{dlobject}. --- 24,28 ---- signifies late binding (\constant{RTLD_LAZY}) or immediate binding (\constant{RTLD_NOW}). Default is \constant{RTLD_LAZY}. Note that some ! systems do not support \constant{RTLD_NOW}. Return value is a \pytype{dlobject}. *************** *** 45,49 **** \begin{excdesc}{error} ! Exception raised when an error has occured inside the dynamic loading and linking routines. \end{excdesc} --- 45,49 ---- \begin{excdesc}{error} ! Exception raised when an error has occurred inside the dynamic loading and linking routines. \end{excdesc} Index: libformatter.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libformatter.tex,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** libformatter.tex 1999/04/22 21:23:21 1.19 --- libformatter.tex 2000/07/16 19:01:09 1.20 *************** *** 7,11 **** ! This module supports two interface definitions, each with mulitple implementations. The \emph{formatter} interface is used by the \class{HTMLParser} class of the \refmodule{htmllib} module, and the --- 7,11 ---- ! This module supports two interface definitions, each with multiple implementations. The \emph{formatter} interface is used by the \class{HTMLParser} class of the \refmodule{htmllib} module, and the *************** *** 76,81 **** \begin{methoddesc}[formatter]{add_flowing_data}{data} ! Provide data which should be formatted with collapsed whitespaces. ! Whitespace from preceeding and successive calls to \method{add_flowing_data()} is considered as well when the whitespace collapse is performed. The data which is passed to this method is --- 76,81 ---- \begin{methoddesc}[formatter]{add_flowing_data}{data} ! Provide data which should be formatted with collapsed whitespace. ! Whitespace from preceding and successive calls to \method{add_flowing_data()} is considered as well when the whitespace collapse is performed. The data which is passed to this method is *************** *** 107,111 **** to indicate a transform on the counter value. Specifically, the character \character{1} represents the counter value formatter as an ! arabic number, the characters \character{A} and \character{a} represent alphabetic representations of the counter value in upper and lower case, respectively, and \character{I} and \character{i} --- 107,111 ---- to indicate a transform on the counter value. Specifically, the character \character{1} represents the counter value formatter as an ! Arabic number, the characters \character{A} and \character{a} represent alphabetic representations of the counter value in upper and lower case, respectively, and \character{I} and \character{i} *************** *** 265,269 **** \begin{methoddesc}[writer]{send_paragraph}{blankline} Produce a paragraph separation of at least \var{blankline} blank ! lines, or the equivelent. The \var{blankline} value will be an integer. Note that the implementation will receive a call to \method{send_line_break()} before this call if a line break is needed; --- 265,269 ---- \begin{methoddesc}[writer]{send_paragraph}{blankline} Produce a paragraph separation of at least \var{blankline} blank ! lines, or the equivalent. The \var{blankline} value will be an integer. Note that the implementation will receive a call to \method{send_line_break()} before this call if a line break is needed; Index: libftplib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libftplib.tex,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** libftplib.tex 1999/07/20 13:21:42 1.27 --- libftplib.tex 2000/07/16 19:01:09 1.28 *************** *** 266,270 **** \method{quit()}. After this call the \class{FTP} instance should not be used any more (i.e., after a call to \method{close()} or ! \method{quit()} you cannot reopen the connection by issueing another \method{login()} method). \end{methoddesc} --- 266,270 ---- \method{quit()}. After this call the \class{FTP} instance should not be used any more (i.e., after a call to \method{close()} or ! \method{quit()} you cannot reopen the connection by issuing another \method{login()} method). \end{methoddesc} Index: libhtmllib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libhtmllib.tex,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** libhtmllib.tex 1999/06/21 21:20:56 1.21 --- libhtmllib.tex 2000/07/16 19:01:09 1.22 *************** *** 125,131 **** \begin{methoddesc}{save_end}{} Ends buffering character data and returns all data saved since the ! preceeding call to \method{save_bgn()}. If the \member{nofill} flag is false, whitespace is collapsed to single spaces. A call to this ! method without a preceeding call to \method{save_bgn()} will raise a \exception{TypeError} exception. \end{methoddesc} --- 125,131 ---- \begin{methoddesc}{save_end}{} Ends buffering character data and returns all data saved since the ! preceding call to \method{save_bgn()}. If the \member{nofill} flag is false, whitespace is collapsed to single spaces. A call to this ! method without a preceding call to \method{save_bgn()} will raise a \exception{TypeError} exception. \end{methoddesc} Index: libimageop.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libimageop.tex,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** libimageop.tex 1999/04/22 21:23:21 1.11 --- libimageop.tex 2000/07/16 19:01:09 1.12 *************** *** 47,51 **** \begin{funcdesc}{grey2mono}{image, width, height, threshold} Convert a 8-bit deep greyscale image to a 1-bit deep image by ! tresholding all the pixels. The resulting image is tightly packed and is probably only useful as an argument to \function{mono2grey()}. \end{funcdesc} --- 47,51 ---- \begin{funcdesc}{grey2mono}{image, width, height, threshold} Convert a 8-bit deep greyscale image to a 1-bit deep image by ! thresholding all the pixels. The resulting image is tightly packed and is probably only useful as an argument to \function{mono2grey()}. \end{funcdesc} Index: libimaplib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libimaplib.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** libimaplib.tex 2000/05/26 04:08:37 1.15 --- libimaplib.tex 2000/07/16 19:01:09 1.16 *************** *** 43,47 **** \begin{excdesc}{IMAP4.readonly} ! This exception is raised when a writeable mailbox has its status changed by the server. This is a sub-class of \exception{IMAP4.error}. Some other client now has write permission, and the mailbox will need to be re-opened to re-obtain write permission. --- 43,47 ---- \begin{excdesc}{IMAP4.readonly} ! This exception is raised when a writable mailbox has its status changed by the server. This is a sub-class of \exception{IMAP4.error}. Some other client now has write permission, and the mailbox will need to be re-opened to re-obtain write permission. Index: libimp.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libimp.tex,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** libimp.tex 1999/06/10 22:08:16 1.25 --- libimp.tex 2000/07/16 19:01:09 1.26 *************** *** 53,57 **** \code{None}, \var{filename} is the empty string, and the \var{description} tuple contains empty strings for its suffix and ! mode; the module type is as indicate in parentheses dabove. If the search is unsuccessful, \exception{ImportError} is raised. Other exceptions indicate problems with the arguments or environment. --- 53,57 ---- \code{None}, \var{filename} is the empty string, and the \var{description} tuple contains empty strings for its suffix and ! mode; the module type is as indicate in parentheses above. If the search is unsuccessful, \exception{ImportError} is raised. Other exceptions indicate problems with the arguments or environment. *************** *** 188,192 **** used to construct the name of the initialization function: an external C function called \samp{init\var{name}()} in the shared library is ! called. The optional \var{file} argment is ignored. (Note: using shared libraries is highly system dependent, and not all systems support it.) --- 188,192 ---- used to construct the name of the initialization function: an external C function called \samp{init\var{name}()} in the shared library is ! called. The optional \var{file} argument is ignored. (Note: using shared libraries is highly system dependent, and not all systems support it.) Index: libintro.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libintro.tex,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** libintro.tex 2000/04/03 20:13:53 1.6 --- libintro.tex 2000/07/16 19:01:09 1.7 *************** *** 26,30 **** interfaces that are specific to a particular application domain, like the World-Wide Web. ! Some modules are avaiable in all versions and ports of Python; others are only available when the underlying system supports or requires them; yet others are available only when a particular configuration --- 26,30 ---- interfaces that are specific to a particular application domain, like the World-Wide Web. ! Some modules are available in all versions and ports of Python; others are only available when the underlying system supports or requires them; yet others are available only when a particular configuration Index: liblocale.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liblocale.tex,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** liblocale.tex 1999/07/01 16:31:03 1.16 --- liblocale.tex 2000/07/16 19:01:09 1.17 *************** *** 259,263 **** The \function{setlocale()} function in the \module{locale} module ! gives the Python progammer the impression that you can manipulate the \constant{LC_NUMERIC} locale setting, but this not the case at the C level: C code will always find that the \constant{LC_NUMERIC} locale --- 259,263 ---- The \function{setlocale()} function in the \module{locale} module ! gives the Python programmer the impression that you can manipulate the \constant{LC_NUMERIC} locale setting, but this not the case at the C level: C code will always find that the \constant{LC_NUMERIC} locale Index: libmarshal.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmarshal.tex,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** libmarshal.tex 2000/04/06 14:47:20 1.18 --- libmarshal.tex 2000/07/16 19:01:09 1.19 *************** *** 20,24 **** instance) and ``unmarshalling'' for the reverse process.} ! This is not a general ``persistency'' module. For general persistency and transfer of Python objects through RPC calls, see the modules \refmodule{pickle} and \refmodule{shelve}. The \module{marshal} module exists --- 20,24 ---- instance) and ``unmarshalling'' for the reverse process.} ! This is not a general ``persistence'' module. For general persistence and transfer of Python objects through RPC calls, see the modules \refmodule{pickle} and \refmodule{shelve}. The \module{marshal} module exists Index: libmd5.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmd5.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** libmd5.tex 1999/04/23 22:03:00 1.14 --- libmd5.tex 2000/07/16 19:01:09 1.15 *************** *** 13,17 **** \method{update()} method, and at any point you can ask it for the \dfn{digest} (a strong kind of 128-bit checksum, ! a.k.a. ``fingerprint'') of the contatenation of the strings fed to it so far using the \method{digest()} method. \index{checksum!MD5} --- 13,17 ---- \method{update()} method, and at any point you can ask it for the \dfn{digest} (a strong kind of 128-bit checksum, ! a.k.a. ``fingerprint'') of the concatenation of the strings fed to it so far using the \method{digest()} method. \index{checksum!MD5} Index: libmutex.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmutex.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libmutex.tex 1999/06/29 14:57:12 1.2 --- libmutex.tex 2000/07/16 19:01:09 1.3 *************** *** 8,12 **** The \module{mutex} defines a class that allows mutual-exclusion ! via aquiring and releasing locks. It does not require (or imply) threading or multi-tasking, though it could be useful for those purposes. --- 8,12 ---- The \module{mutex} defines a class that allows mutual-exclusion ! via acquiring and releasing locks. It does not require (or imply) threading or multi-tasking, though it could be useful for those purposes. *************** *** 28,32 **** Of course, no multi-threading is implied -- hence the funny interface ! for lock, where a function is called once the lock is aquired. \end{classdesc} --- 28,32 ---- Of course, no multi-threading is implied -- hence the funny interface ! for lock, where a function is called once the lock is acquired. \end{classdesc} Index: libnetrc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libnetrc.tex,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** libnetrc.tex 2000/04/03 20:13:53 1.6 --- libnetrc.tex 2000/07/16 19:01:09 1.7 *************** *** 15,19 **** \begin{classdesc}{netrc}{\optional{file}} ! A \class{netrc} instance or subclass instance enapsulates data from a netrc file. The initialization argument, if present, specifies the file to parse. If no argument is given, the file \file{.netrc} in the --- 15,19 ---- \begin{classdesc}{netrc}{\optional{file}} ! A \class{netrc} instance or subclass instance encapsulates data from a netrc file. The initialization argument, if present, specifies the file to parse. If no argument is given, the file \file{.netrc} in the Index: libnis.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libnis.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** libnis.tex 2000/04/03 20:13:53 1.3 --- libnis.tex 2000/07/16 19:01:09 1.4 *************** *** 20,24 **** error (\exception{nis.error}) if there is none. Both should be strings, \var{key} is 8-bit clean. ! Return value is an arbitary array of bytes (i.e., may contain \code{NULL} and other joys). --- 20,24 ---- error (\exception{nis.error}) if there is none. Both should be strings, \var{key} is 8-bit clean. ! Return value is an arbitrary array of bytes (i.e., may contain \code{NULL} and other joys). *************** *** 29,33 **** Return a dictionary mapping \var{key} to \var{value} such that \code{match(\var{key}, \var{mapname})==\var{value}}. ! Note that both keys and values of the dictionary are arbitary arrays of bytes. --- 29,33 ---- Return a dictionary mapping \var{key} to \var{value} such that \code{match(\var{key}, \var{mapname})==\var{value}}. ! Note that both keys and values of the dictionary are arbitrary arrays of bytes. Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -r1.43 -r1.44 *** libos.tex 2000/07/13 01:26:58 1.43 --- libos.tex 2000/07/16 19:01:09 1.44 *************** *** 326,330 **** \begin{funcdesc}{fpathconf}{fd, name} ! Return system configration information relevant to an open file. \var{name} specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are --- 326,330 ---- \begin{funcdesc}{fpathconf}{fd, name} ! Return system configuration information relevant to an open file. \var{name} specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are *************** *** 576,580 **** \begin{funcdesc}{pathconf}{path, name} ! Return system configration information relevant to a named file. \var{name} specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are --- 576,580 ---- \begin{funcdesc}{pathconf}{path, name} ! Return system configuration information relevant to a named file. \var{name} specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are *************** *** 984,988 **** ! \subsection{Miscellanenous System Information \label{os-path}} --- 984,988 ---- ! \subsection{Miscellaneous System Information \label{os-path}} Index: libpanel.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpanel.tex,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** libpanel.tex 1998/08/10 19:42:04 1.9 --- libpanel.tex 2000/07/16 19:01:09 1.10 *************** *** 65,69 **** All access to it should be done through the standard module \code{panel}\refstmodindex{panel}, ! which transparantly exports most functions from \code{pnl} but redefines --- 65,69 ---- All access to it should be done through the standard module \code{panel}\refstmodindex{panel}, ! which transparently exports most functions from \code{pnl} but redefines Index: libparser.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libparser.tex,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** libparser.tex 2000/05/09 17:10:23 1.35 --- libparser.tex 2000/07/16 19:01:09 1.36 *************** *** 594,598 **** Most of the accessor functions are declared in \class{SuiteInfoBase} ! and do not need to be overriden by subclasses. More importantly, the extraction of most information from a parse tree is handled through a method called by the \class{SuiteInfoBase} constructor. The example --- 594,598 ---- Most of the accessor functions are declared in \class{SuiteInfoBase} ! and do not need to be overridden by subclasses. More importantly, the extraction of most information from a parse tree is handled through a method called by the \class{SuiteInfoBase} constructor. The example *************** *** 685,689 **** element defined is extracted and a representation object appropriate to the definition is created with the defining subtree ! passed as an argument to the constructor. The repesentation objects are stored in instance variables and may be retrieved by name using the appropriate accessor methods. --- 685,689 ---- element defined is extracted and a representation object appropriate to the definition is created with the defining subtree ! passed as an argument to the constructor. The representation objects are stored in instance variables and may be retrieved by name using the appropriate accessor methods. Index: libpdb.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpdb.tex,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** libpdb.tex 2000/04/05 15:01:36 1.27 --- libpdb.tex 2000/07/16 19:01:10 1.28 *************** *** 154,158 **** This is particularly useful for aliases. If both files exist, the one in the home directory is read first and aliases defined there can be ! overriden by the local file. \begin{description} --- 154,158 ---- This is particularly useful for aliases. If both files exist, the one in the home directory is read first and aliases defined there can be ! overridden by the local file. \begin{description} Index: libpickle.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpickle.tex,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** libpickle.tex 2000/07/01 17:47:38 1.26 --- libpickle.tex 2000/07/16 19:01:10 1.27 *************** *** 6,10 **** % Substantial improvements by Jim Kerr . ! \index{persistency} \indexii{persistent}{objects} \indexii{serializing}{objects} --- 6,10 ---- % Substantial improvements by Jim Kerr . ! \index{persistence} \indexii{persistent}{objects} \indexii{serializing}{objects} *************** *** 18,22 **** nearly arbitrary Python objects. This is the act of converting objects to a stream of bytes (and back: ``unpickling''). This is a ! more primitive notion than persistency --- although \module{pickle} reads and writes file objects, it does not handle the issue of naming persistent objects, nor the (even more complicated) area of concurrent --- 18,22 ---- nearly arbitrary Python objects. This is the act of converting objects to a stream of bytes (and back: ``unpickling''). This is a ! more primitive notion than persistence --- although \module{pickle} reads and writes file objects, it does not handle the issue of naming persistent objects, nor the (even more complicated) area of concurrent *************** *** 93,97 **** avoids the possibility of smuggling Trojan horses into a program. ! For the benefit of persistency modules written using \module{pickle}, it supports the notion of a reference to an object outside the pickled data stream. Such objects are referenced by a name, which is an --- 93,97 ---- avoids the possibility of smuggling Trojan horses into a program. ! For the benefit of persistence modules written using \module{pickle}, it supports the notion of a reference to an object outside the pickled data stream. Such objects are referenced by a name, which is an *************** *** 251,255 **** \begin{funcdesc}{dump}{object, file\optional{, bin}} ! Write a pickled representation of \var{obect} to the open file object \var{file}. This is equivalent to \samp{Pickler(\var{file}, \var{bin}).dump(\var{object})}. --- 251,255 ---- \begin{funcdesc}{dump}{object, file\optional{, bin}} ! Write a pickled representation of \var{object} to the open file object \var{file}. This is equivalent to \samp{Pickler(\var{file}, \var{bin}).dump(\var{object})}. *************** *** 381,385 **** The format of the pickle data is identical to that produced using the \refmodule{pickle} module, so it is possible to use \refmodule{pickle} and ! \module{cPickle} interchangably with existing pickles. (Since the pickle data format is actually a tiny stack-oriented --- 381,385 ---- The format of the pickle data is identical to that produced using the \refmodule{pickle} module, so it is possible to use \refmodule{pickle} and ! \module{cPickle} interchangeably with existing pickles. (Since the pickle data format is actually a tiny stack-oriented Index: libpipes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpipes.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libpipes.tex 1999/06/21 18:36:09 1.2 --- libpipes.tex 2000/07/16 19:01:10 1.3 *************** *** 63,67 **** reads no input, and hence must be first.) ! Similarily, the second letter can be either of \code{'-'} (which means the command writes to standard output), \code{'f'} (which means the command writes a file on the command line) or \code{'.'} (which means --- 63,67 ---- reads no input, and hence must be first.) ! Similarly, the second letter can be either of \code{'-'} (which means the command writes to standard output), \code{'f'} (which means the command writes a file on the command line) or \code{'.'} (which means Index: libpoplib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpoplib.tex,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** libpoplib.tex 2000/04/03 20:13:53 1.8 --- libpoplib.tex 2000/07/16 19:01:10 1.9 *************** *** 14,18 **** This module defines a class, \class{POP3}, which encapsulates a connection to an POP3 server and implements protocol as defined in ! \rfc{1725}. The \class{POP3} class supports both the minmal and optional command sets. --- 14,18 ---- This module defines a class, \class{POP3}, which encapsulates a connection to an POP3 server and implements protocol as defined in ! \rfc{1725}. The \class{POP3} class supports both the minimal and optional command sets. *************** *** 47,51 **** \begin{methoddesc}{user}{username} ! Send user commad, response should indicate that a password is required. \end{methoddesc} --- 47,51 ---- \begin{methoddesc}{user}{username} ! Send user command, response should indicate that a password is required. \end{methoddesc} Index: librotor.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/librotor.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** librotor.tex 1998/08/10 19:42:14 1.14 --- librotor.tex 2000/07/16 19:01:10 1.15 *************** *** 99,103 **** The version implemented here is probably a good deal more difficult to crack (especially if you use many rotors), but it won't be impossible for ! a truly skilful and determined attacker to break the cipher. So if you want to keep the NSA out of your files, this rotor cipher may well be unsafe, but for discouraging casual snooping through your files, it will probably be --- 99,103 ---- The version implemented here is probably a good deal more difficult to crack (especially if you use many rotors), but it won't be impossible for ! a truly skillful and determined attacker to break the cipher. So if you want to keep the NSA out of your files, this rotor cipher may well be unsafe, but for discouraging casual snooping through your files, it will probably be Index: libsched.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsched.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** libsched.tex 2000/04/03 20:13:54 1.3 --- libsched.tex 2000/07/16 19:01:10 1.4 *************** *** 93,97 **** If a sequence of events takes longer to run than the time available before the next event, the scheduler will simply fall behind. No ! events will be dropped; the calling code is responsible for cancelling events which are no longer pertinent. \end{methoddesc} --- 93,97 ---- If a sequence of events takes longer to run than the time available before the next event, the scheduler will simply fall behind. No ! events will be dropped; the calling code is responsible for canceling events which are no longer pertinent. \end{methoddesc} Index: libsgmllib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsgmllib.tex,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** libsgmllib.tex 2000/07/03 14:32:04 1.19 --- libsgmllib.tex 2000/07/16 19:01:10 1.20 *************** *** 35,39 **** SGML comments of the form \samp{}. Note that spaces, tabs, and newlines are allowed between the trailing ! \samp{>} and the immediately preceeding \samp{--}. \end{itemize} --- 35,39 ---- SGML comments of the form \samp{}. Note that spaces, tabs, and newlines are allowed between the trailing ! \samp{>} and the immediately preceding \samp{--}. \end{itemize} Index: libsha.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsha.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libsha.tex 1999/11/09 20:10:01 1.2 --- libsha.tex 2000/07/16 19:01:10 1.3 *************** *** 12,16 **** to create an sha object, then feed this object with arbitrary strings using the \method{update()} method, and at any point you can ask it ! for the \dfn{digest} of the contatenation of the strings fed to it so far.\index{checksum!SHA} SHA digests are 160 bits instead of 128 bits. --- 12,16 ---- to create an sha object, then feed this object with arbitrary strings using the \method{update()} method, and at any point you can ask it ! for the \dfn{digest} of the concatenation of the strings fed to it so far.\index{checksum!SHA} SHA digests are 160 bits instead of 128 bits. Index: libshelve.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libshelve.tex,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** libshelve.tex 1999/04/22 21:23:22 1.13 --- libshelve.tex 2000/07/16 19:01:10 1.14 *************** *** 1,7 **** \section{\module{shelve} --- ! Python object persistency} \declaremodule{standard}{shelve} ! \modulesynopsis{Python object persistency.} --- 1,7 ---- \section{\module{shelve} --- ! Python object persistence} \declaremodule{standard}{shelve} ! \modulesynopsis{Python object persistence.} Index: libshlex.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libshlex.tex,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** libshlex.tex 2000/07/03 09:56:23 1.8 --- libshlex.tex 2000/07/16 19:01:10 1.9 *************** *** 22,26 **** argument is a filename string, which sets the initial value of the \member{infile} member. If the stream argument is omitted or ! equal to \code{sys.stdin}, this second argument defauilts to ``stdin''. \end{classdesc} --- 22,26 ---- argument is a filename string, which sets the initial value of the \member{infile} member. If the stream argument is omitted or ! equal to \code{sys.stdin}, this second argument defaults to ``stdin''. \end{classdesc} Index: libsignal.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsignal.tex,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** libsignal.tex 1999/03/25 20:29:59 1.17 --- libsignal.tex 2000/07/16 19:01:10 1.18 *************** *** 57,61 **** Python \module{signal} module, even if the underlying thread implementation supports sending signals to individual threads). This ! means that signals can't be used as a means of interthread communication. Use locks instead. --- 57,61 ---- Python \module{signal} module, even if the underlying thread implementation supports sending signals to individual threads). This ! means that signals can't be used as a means of inter-thread communication. Use locks instead. Index: libsmtplib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsmtplib.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** libsmtplib.tex 2000/04/05 22:12:06 1.14 --- libsmtplib.tex 2000/07/16 19:01:10 1.15 *************** *** 57,61 **** \begin{excdesc}{SMTPRecipientsRefused} All recipient addresses refused. The errors for each recipient are ! accessable through the attribute \member{recipients}, which is a dictionary of exactly the same sort as \method{SMTP.sendmail()} returns. --- 57,61 ---- \begin{excdesc}{SMTPRecipientsRefused} All recipient addresses refused. The errors for each recipient are ! accessible through the attribute \member{recipients}, which is a dictionary of exactly the same sort as \method{SMTP.sendmail()} returns. Index: libsomeos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsomeos.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** libsomeos.tex 1998/07/23 17:59:08 1.7 --- libsomeos.tex 2000/07/16 19:01:10 1.8 *************** *** 4,8 **** The modules described in this chapter provide interfaces to operating system features that are available on selected operating systems only. ! The interfaces are generally modelled after the \UNIX{} or \C{} interfaces but they are available on some other systems as well (e.g. Windows or NT). Here's an overview: --- 4,8 ---- The modules described in this chapter provide interfaces to operating system features that are available on selected operating systems only. ! The interfaces are generally modeled after the \UNIX{} or \C{} interfaces but they are available on some other systems as well (e.g. Windows or NT). Here's an overview: Index: libstatvfs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstatvfs.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libstatvfs.tex 2000/04/03 20:13:54 1.2 --- libstatvfs.tex 2000/07/16 19:01:10 1.3 *************** *** 48,52 **** \begin{datadesc}{F_FLAG} ! Flags. System dependant: see \cfunction{statvfs()} man page. \end{datadesc} --- 48,52 ---- \begin{datadesc}{F_FLAG} ! Flags. System dependent: see \cfunction{statvfs()} man page. \end{datadesc} Index: libstdwin.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdwin.tex,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** libstdwin.tex 1999/11/09 19:44:44 1.22 --- libstdwin.tex 2000/07/16 19:01:10 1.23 *************** *** 260,264 **** Return the number of characters of the string that fit into a space of \var{width} ! bits wide when drawn in the curent font. \end{funcdesc} --- 260,264 ---- Return the number of characters of the string that fit into a space of \var{width} ! bits wide when drawn in the current font. \end{funcdesc} Index: libsunau.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsunau.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** libsunau.tex 1999/06/23 13:33:39 1.1 --- libsunau.tex 2000/07/16 19:01:10 1.2 *************** *** 96,100 **** The following two methods define a term ``position'' which is compatible ! between them, and is otherwise implementation dependant. \begin{methoddesc}[AU_read]{setpos}{pos} --- 96,100 ---- The following two methods define a term ``position'' which is compatible ! between them, and is otherwise implementation dependent. \begin{methoddesc}[AU_read]{setpos}{pos} Index: libsymbol.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsymbol.tex,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** libsymbol.tex 1999/02/20 00:14:14 1.6 --- libsymbol.tex 2000/07/16 19:01:10 1.7 *************** *** 10,14 **** internal nodes of the parse tree. Unlike most Python constants, these use lower-case names. Refer to the file \file{Grammar/Grammar} in the ! Python distribution for the defintions of the names in the context of the language grammar. The specific numeric values which the names map to may change between Python versions. --- 10,14 ---- internal nodes of the parse tree. Unlike most Python constants, these use lower-case names. Refer to the file \file{Grammar/Grammar} in the ! Python distribution for the definitions of the names in the context of the language grammar. The specific numeric values which the names map to may change between Python versions. Index: libtelnetlib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtelnetlib.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** libtelnetlib.tex 2000/05/03 15:11:47 1.5 --- libtelnetlib.tex 2000/07/16 19:01:10 1.6 *************** *** 141,145 **** compiled (\class{re.RegexObject} instances) or uncompiled (strings). The optional second argument is a timeout, in seconds; the default ! is to block indefinately. Return a tuple of three items: the index in the list of the --- 141,145 ---- compiled (\class{re.RegexObject} instances) or uncompiled (strings). The optional second argument is a timeout, in seconds; the default ! is to block indefinitely. Return a tuple of three items: the index in the list of the *************** *** 154,158 **** If a regular expression ends with a greedy match (e.g. \regexp{.*}) or if more than one expression can match the same input, the ! results are undeterministic, and may depend on the I/O timing. \end{methoddesc} --- 154,158 ---- If a regular expression ends with a greedy match (e.g. \regexp{.*}) or if more than one expression can match the same input, the ! results are indeterministic, and may depend on the I/O timing. \end{methoddesc} Index: libtempfile.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtempfile.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** libtempfile.tex 2000/06/30 16:06:19 1.15 --- libtempfile.tex 2000/07/16 19:01:10 1.16 *************** *** 27,31 **** Return a file (or file-like) object that can be used as a temporary storage area. The file is created in the most secure manner available ! in the appporpriate temporary directory for the host platform. Under \UNIX, the directory entry to the file is removed so that it is secure against attacks which involve creating symbolic links to the file or --- 27,31 ---- Return a file (or file-like) object that can be used as a temporary storage area. The file is created in the most secure manner available ! in the appropriate temporary directory for the host platform. Under \UNIX, the directory entry to the file is removed so that it is secure against attacks which involve creating symbolic links to the file or Index: libtime.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtime.tex,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** libtime.tex 2000/07/06 18:09:02 1.32 --- libtime.tex 2000/07/16 19:01:10 1.33 *************** *** 87,91 **** \lineiii{4}{minute}{range [0,59]} \lineiii{5}{second}{range [0,61]; see \strong{(1)} in \function{strftime()} description} ! \lineiii{6}{weekday}{range [0,6], monday is 0} \lineiii{7}{Julian day}{range [1,366]} \lineiii{8}{daylight savings flag}{0, 1 or -1; see below} --- 87,91 ---- \lineiii{4}{minute}{range [0,59]} \lineiii{5}{second}{range [0,61]; see \strong{(1)} in \function{strftime()} description} ! \lineiii{6}{weekday}{range [0,6], Monday is 0} \lineiii{7}{Julian day}{range [1,366]} \lineiii{8}{daylight savings flag}{0, 1 or -1; see below} *************** *** 126,130 **** \begin{funcdesc}{clock}{} Return the current CPU time as a floating point number expressed in ! seconds. The precision, and in fact the very definiton of the meaning of ``CPU time''\index{CPU time}, depends on that of the C function of the same name, but in any case, this is the function to use for --- 126,130 ---- \begin{funcdesc}{clock}{} Return the current CPU time as a floating point number expressed in ! seconds. The precision, and in fact the very definition of the meaning of ``CPU time''\index{CPU time}, depends on that of the C function of the same name, but in any case, this is the function to use for Index: libtoken.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtoken.tex,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** libtoken.tex 1999/02/20 00:14:15 1.6 --- libtoken.tex 2000/07/16 19:01:10 1.7 *************** *** 9,13 **** This module provides constants which represent the numeric values of leaf nodes of the parse tree (terminal tokens). Refer to the file ! \file{Grammar/Grammar} in the Python distribution for the defintions of the names in the context of the language grammar. The specific numeric values which the names map to may change between Python --- 9,13 ---- This module provides constants which represent the numeric values of leaf nodes of the parse tree (terminal tokens). Refer to the file ! \file{Grammar/Grammar} in the Python distribution for the definitions of the names in the context of the language grammar. The specific numeric values which the names map to may change between Python Index: libtraceback.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtraceback.tex,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** libtraceback.tex 1999/06/29 17:08:41 1.12 --- libtraceback.tex 2000/07/16 19:01:10 1.13 *************** *** 105,109 **** \function{print_exception()}. The return value is a list of strings, each ending in a newline and some containing internal newlines. When ! these lines are contatenated and printed, exactly the same text is printed as does \function{print_exception()}. \end{funcdesc} --- 105,109 ---- \function{print_exception()}. The return value is a list of strings, each ending in a newline and some containing internal newlines. When ! these lines are concatenated and printed, exactly the same text is printed as does \function{print_exception()}. \end{funcdesc} Index: libundoc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libundoc.tex,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -r1.74 -r1.75 *** libundoc.tex 2000/06/30 16:06:19 1.74 --- libundoc.tex 2000/07/16 19:01:10 1.75 *************** *** 135,139 **** \item[\module{lockfile}] --- wrapper around FCNTL file locking (use ! \function{fcntl.lockf()}/\function{flock()} intead; see \refmodule{fcntl}) \item[\module{newdir}] --- 135,139 ---- \item[\module{lockfile}] --- wrapper around FCNTL file locking (use ! \function{fcntl.lockf()}/\function{flock()} instead; see \refmodule{fcntl}) \item[\module{newdir}] Index: liburllib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liburllib.tex,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** liburllib.tex 2000/05/30 14:39:45 1.22 --- liburllib.tex 2000/07/16 19:01:10 1.23 *************** *** 262,266 **** \class{URLopener} and \class{FancyURLopener} objects have the ! following methodsL \begin{methoddesc}{open}{fullurl\optional{, data}} --- 262,266 ---- \class{URLopener} and \class{FancyURLopener} objects have the ! following methods. \begin{methoddesc}{open}{fullurl\optional{, data}} Index: liburlparse.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liburlparse.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** liburlparse.tex 1998/08/10 19:42:31 1.15 --- liburlparse.tex 2000/07/16 19:01:10 1.16 *************** *** 13,17 **** This module defines a standard interface to break URL strings up in ! components (addessing scheme, network location, path etc.), to combine the components back into a URL string, and to convert a ``relative URL'' to an absolute URL given a ``base URL.'' --- 13,17 ---- This module defines a standard interface to break URL strings up in ! components (addressing scheme, network location, path etc.), to combine the components back into a URL string, and to convert a ``relative URL'' to an absolute URL given a ``base URL.'' Index: libuser.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libuser.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** libuser.tex 1999/02/20 00:14:16 1.14 --- libuser.tex 2000/07/16 19:01:10 1.15 *************** *** 24,28 **** The \module{user} module looks for a file \file{.pythonrc.py} in the user's ! home directory and if it can be opened, exececutes it (using \function{execfile()}\bifuncindex{execfile}) in its own (i.e. the module \module{user}'s) global namespace. Errors during this phase --- 24,28 ---- The \module{user} module looks for a file \file{.pythonrc.py} in the user's ! home directory and if it can be opened, executes it (using \function{execfile()}\bifuncindex{execfile}) in its own (i.e. the module \module{user}'s) global namespace. Errors during this phase Index: libuserdict.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libuserdict.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** libuserdict.tex 2000/04/03 15:02:35 1.14 --- libuserdict.tex 2000/07/16 19:01:10 1.15 *************** *** 9,17 **** your own dictionary-like classes, which can inherit from them and override existing methods or add new ones. In this way one ! can add new behaviours to dictionaries. The \module{UserDict} module defines the \class{UserDict} class: ! \begin{classdesc}{UserDict}{\optional{intialdata}} Return a class instance that simulates a dictionary. The instance's contents are kept in a regular dictionary, which is accessible via the --- 9,17 ---- your own dictionary-like classes, which can inherit from them and override existing methods or add new ones. In this way one ! can add new behaviors to dictionaries. The \module{UserDict} module defines the \class{UserDict} class: ! \begin{classdesc}{UserDict}{\optional{initialdata}} Return a class instance that simulates a dictionary. The instance's contents are kept in a regular dictionary, which is accessible via the *************** *** 43,47 **** your own list-like classes, which can inherit from them and override existing methods or add new ones. In this way one ! can add new behaviours to lists. The \module{UserList} module defines the \class{UserList} class: --- 43,47 ---- your own list-like classes, which can inherit from them and override existing methods or add new ones. In this way one ! can add new behaviors to lists. The \module{UserList} module defines the \class{UserList} class: *************** *** 78,82 **** your own string-like classes, which can inherit from them and override existing methods or add new ones. In this way one ! can add new behaviours to strings. The \module{UserString} module defines the \class{UserString} class: --- 78,82 ---- your own string-like classes, which can inherit from them and override existing methods or add new ones. In this way one ! can add new behaviors to strings. The \module{UserString} module defines the \class{UserString} class: *************** *** 110,113 **** \function{__hash__} method in order to trap attempts to use a mutable object as dictionary key, which would be otherwise very ! errorprone and hard to track down. \end{classdesc} --- 110,113 ---- \function{__hash__} method in order to trap attempts to use a mutable object as dictionary key, which would be otherwise very ! error prone and hard to track down. \end{classdesc} Index: libwave.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libwave.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** libwave.tex 1999/12/21 18:31:30 1.3 --- libwave.tex 2000/07/16 19:01:10 1.4 *************** *** 103,107 **** The following two methods define a term ``position'' which is compatible ! between them, and is otherwise implementation dependant. \begin{methoddesc}[Wave_read]{setpos}{pos} --- 103,107 ---- The following two methods define a term ``position'' which is compatible ! between them, and is otherwise implementation dependent. \begin{methoddesc}[Wave_read]{setpos}{pos} Index: libwinsound.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libwinsound.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** libwinsound.tex 1999/10/22 21:08:56 1.4 --- libwinsound.tex 2000/07/16 19:01:10 1.5 *************** *** 54,58 **** \strong{Note:} This module does not support playing from a memory ! image asynchonously, so a combination of this flag and \constant{SND_ASYNC} will raise a \exception{RuntimeError}. \end{datadesc} --- 54,58 ---- \strong{Note:} This module does not support playing from a memory ! image asynchronously, so a combination of this flag and \constant{SND_ASYNC} will raise a \exception{RuntimeError}. \end{datadesc} Index: libxmllib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libxmllib.tex,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** libxmllib.tex 2000/07/06 04:45:14 1.23 --- libxmllib.tex 2000/07/16 19:01:10 1.24 *************** *** 198,202 **** \var{message} is a description of what was wrong. The default method raises a \exception{RuntimeError} exception. If this method is ! overridden, it is permissable for it to return. This method is only called when the error can be recovered from. Unrecoverable errors raise a \exception{RuntimeError} without first calling --- 198,202 ---- \var{message} is a description of what was wrong. The default method raises a \exception{RuntimeError} exception. If this method is ! overridden, it is permissible for it to return. This method is only called when the error can be recovered from. Unrecoverable errors raise a \exception{RuntimeError} without first calling From python-dev@python.org Sun Jul 16 20:05:41 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 12:05:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tut tut.tex,1.109,1.110 Message-ID: <200007161905.MAA27369@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tut In directory slayer.i.sourceforge.net:/tmp/cvs-serv27163/Doc/tut Modified Files: tut.tex Log Message: More of Rob W. W. Hooft's spelling fixes. The only ones left now are the distutils patches, which I'll leave to the distutils maintainers. Tip: review the patch like this: grep "^[\!+-] " To get a quick and easy way to review the actual changes. Most of the changes are single-line ones, anyway. Index: tut.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v retrieving revision 1.109 retrieving revision 1.110 diff -C2 -r1.109 -r1.110 *** tut.tex 2000/07/08 05:18:54 1.109 --- tut.tex 2000/07/16 19:05:38 1.110 *************** *** 742,746 **** available to the programmer: the Unicode object. It can be used to store and manipulate Unicode data (see \url{http://www.unicode.org}) ! and intergrates well with the existing string objects providing auto-conversions where necessary. --- 742,746 ---- available to the programmer: the Unicode object. It can be used to store and manipulate Unicode data (see \url{http://www.unicode.org}) ! and integrates well with the existing string objects providing auto-conversions where necessary. *************** *** 799,803 **** Apart from these standard encodings, Python provides a whole set of ! other ways of creating Unicod strings on the basis of a known encoding. --- 799,803 ---- Apart from these standard encodings, Python provides a whole set of ! other ways of creating Unicode strings on the basis of a known encoding. *************** *** 808,812 **** are variable length encodings which permit to store Unicode characters in 8 or 16 bits. Python uses UTF-8 as default encoding. This becomes ! noticable when printing Unicode strings or writing them to files. \begin{verbatim} --- 808,812 ---- are variable length encodings which permit to store Unicode characters in 8 or 16 bits. Python uses UTF-8 as default encoding. This becomes ! noticeable when printing Unicode strings or writing them to files. \begin{verbatim} *************** *** 3020,3024 **** When an exception occurs, it may have an associated value, also known as ! the exceptions's \emph{argument}. The presence and type of the argument depend on the exception type. For exception types which have an argument, the except clause may --- 3020,3024 ---- When an exception occurs, it may have an associated value, also known as ! the exception's \emph{argument}. The presence and type of the argument depend on the exception type. For exception types which have an argument, the except clause may From python-dev@python.org Sun Jul 16 20:05:41 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 16 Jul 2000 12:05:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/ref ref1.tex,1.11,1.12 ref3.tex,1.45,1.46 ref6.tex,1.26,1.27 ref7.tex,1.19,1.20 Message-ID: <200007161905.MAA27370@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ref In directory slayer.i.sourceforge.net:/tmp/cvs-serv27163/Doc/ref Modified Files: ref1.tex ref3.tex ref6.tex ref7.tex Log Message: More of Rob W. W. Hooft's spelling fixes. The only ones left now are the distutils patches, which I'll leave to the distutils maintainers. Tip: review the patch like this: grep "^[\!+-] " To get a quick and easy way to review the actual changes. Most of the changes are single-line ones, anyway. Index: ref1.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref1.tex,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** ref1.tex 1999/11/10 16:13:25 1.11 --- ref1.tex 2000/07/16 19:05:38 1.12 *************** *** 14,18 **** Python and wonder what the precise rules about a particular area of the language are, you should definitely be able to find them here. ! If you would like to see a more formal definitition of the language, maybe you could volunteer your time --- or invent a cloning machine :-). --- 14,18 ---- Python and wonder what the precise rules about a particular area of the language are, you should definitely be able to find them here. ! If you would like to see a more formal definition of the language, maybe you could volunteer your time --- or invent a cloning machine :-). Index: ref3.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref3.tex,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -r1.45 -r1.46 *** ref3.tex 2000/07/13 04:57:58 1.45 --- ref3.tex 2000/07/16 19:05:38 1.46 *************** *** 218,222 **** The built-in function \function{len()}\bifuncindex{len} returns the number of items of a sequence. ! When the lenth of a sequence is \var{n}, the index set contains the numbers 0, 1, \ldots, \var{n}-1. Item \var{i} of sequence \var{a} is selected by \code{\var{a}[\var{i}]}. --- 218,222 ---- The built-in function \function{len()}\bifuncindex{len} returns the number of items of a sequence. ! When the length of a sequence is \var{n}, the index set contains the numbers 0, 1, \ldots, \var{n}-1. Item \var{i} of sequence \var{a} is selected by \code{\var{a}[\var{i}]}. *************** *** 311,315 **** subscription and slicing notations can be used as the target of assignment and \keyword{del} (delete) statements. ! \obindex{mutable sequece} \obindex{mutable} \indexii{assignment}{statement} --- 311,315 ---- subscription and slicing notations can be used as the target of assignment and \keyword{del} (delete) statements. ! \obindex{mutable sequence} \obindex{mutable} \indexii{assignment}{statement} *************** *** 701,705 **** was compiled; \member{co_firstlineno} is the first line number of the function; \member{co_lnotab} is a string encoding the mapping from ! byte code offsets to line numbers (for detais see the source code of the interpreter); \member{co_stacksize} is the required stack size (including local variables); \member{co_flags} is an integer encoding --- 701,705 ---- was compiled; \member{co_firstlineno} is the first line number of the function; \member{co_lnotab} is a string encoding the mapping from ! byte code offsets to line numbers (for details see the source code of the interpreter); \member{co_stacksize} is the required stack size (including local variables); \member{co_flags} is an integer encoding *************** *** 816,821 **** \function{slice()}\bifuncindex{slice} function. ! Special read-only attributes: \member{start} is the lowerbound; ! \member{stop} is the upperbound; \member{step} is the step value; each is \code{None} if omitted. These attributes can have any type. \withsubitem{(slice object attribute)}{ --- 816,821 ---- \function{slice()}\bifuncindex{slice} function. ! Special read-only attributes: \member{start} is the lower bound; ! \member{stop} is the upper bound; \member{step} is the step value; each is \code{None} if omitted. These attributes can have any type. \withsubitem{(slice object attribute)}{ Index: ref6.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref6.tex,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** ref6.tex 2000/07/06 00:50:42 1.26 --- ref6.tex 2000/07/16 19:05:38 1.27 *************** *** 432,436 **** \keyword{try} statement within that loop.\footnote{It may occur within an \keyword{except} or \keyword{else} clause. The ! restriction on occurring in the \keyword{try} clause is implementer's laziness and will eventually be lifted.} It continues with the next cycle of the nearest enclosing loop. --- 432,436 ---- \keyword{try} statement within that loop.\footnote{It may occur within an \keyword{except} or \keyword{else} clause. The ! restriction on occurring in the \keyword{try} clause is implementor's laziness and will eventually be lifted.} It continues with the next cycle of the nearest enclosing loop. Index: ref7.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref7.tex,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** ref7.tex 2000/04/03 04:41:18 1.19 --- ref7.tex 2000/07/16 19:05:38 1.20 *************** *** 212,216 **** If the evaluation of an expression in the header of an except clause ! raises an exception, the original search for a handler is cancelled and a search starts for the new exception in the surrounding code and on the call stack (it is treated as if the entire \keyword{try} statement --- 212,216 ---- If the evaluation of an expression in the header of an except clause ! raises an exception, the original search for a handler is canceled and a search starts for the new exception in the surrounding code and on the call stack (it is treated as if the entire \keyword{try} statement From python-dev@python.org Sun Jul 16 20:53:02 2000 From: python-dev@python.org (Paul Prescod) Date: Sun, 16 Jul 2000 12:53:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib onlinehelp.py,NONE,1.1 Message-ID: <200007161953.MAA30130@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv30103 Added Files: onlinehelp.py Log Message: Online help facility for the Python interprter and other interactive environments. --- NEW FILE --- """ Online help module. This module is experimental and could be removed or radically changed at any time. It is intended specifically for the standard interpreter command line but is intended to be compatible with and useful for other (e.g. GUI, handheld) environments. Help with those other environments is appreciated. Please remember to set PYTHONDOCS to the location of your HTML files: e.g. set PYTHONDOCS=c:\python\docs PYTHONDOCS=/python/docs The docs directory should have a lib subdirectory with "index.html" in it. If it has *.tex then you have the documentation *source* distribution, not the runtime distribution. The module exposes one object: "help". "help" has a repr that does something useful if you just type: >>> from onlinehelp import help >>> help Of course one day the first line will be done automatically by site.py or something like that. help can be used as a function. The function takes the following forms of input: help( "string" ) -- built-in topic or global help( ) -- docstring from object or type help( "doc:filename" ) -- filename from Python documentation Type help to get the rest of the instructions. """ import htmllib # todo: add really basic tr/td support import formatter import os, sys import re prompt="--more-- (enter for more, q to quit) " topics={} # all built-in (non-HTML, non-docstring) topics go in here commands="" # only used at the top level def topLevelCommand( name, description, text ): """ this function is just for use at the top-level to make sure that every advertised top-level topic has a description and every description has text. Maybe we can generalize it later.""" global commands topics[name]=text if description[0]=="[": placeholder="(dummy)" elif description[0]=="<": placeholder="link" else: placeholder="" commands=commands+'help( "%s" ) %s - %s\n' % \ (name, placeholder, description ) topLevelCommand( "intro", "What is Python? Read this first!", """Welcome to Python, the easy to learn, portable, object oriented programming language. [info on how to use help] [info on intepreter]""" ) topLevelCommand( "keywords", "What are the keywords?", "") topLevelCommand( "syntax", "What is the overall syntax?", "[placeholder]") topLevelCommand( "operators", "What operators are available?", "" ) topLevelCommand( "builtins", "What functions, types, etc. are built-in?", "") topLevelCommand( "modules", "What modules are in the standard library?", "") topLevelCommand( "copyright", "Who owns Python?", "[who knows]") topLevelCommand( "moreinfo", "Where is there more information?", "[placeholder]") topLevelCommand( "changes", "What changed in Python 2.0?", "[placeholder]" ) topLevelCommand( "extensions", "What extensions are installed?", "[placeholder]") topLevelCommand( "faq", "What questions are frequently asked?", "[placeholder]") topLevelCommand( "ack", "Who has done work on Python lately?", "[placeholder for list of people who contributed patches]") topics[ "prompt" ]="""""" topics[ "types" ]="""""" topics["everything"]= \ """
    The help function allows you to read help on Python's various 
    functions, objects, instructions and modules. You have two options:
    
    1. Use help( obj ) to browse the help attached to some function, module
    class or other object. e.g. help( dir )
    
    2. Use help( "somestring" ) to browse help on one of the predefined 
    help topics, unassociated with any particular object:
    
    %s
    """ % commands topics[ "keywords" ]=\ """
    "if"       - Conditional execution
    "while"    - Loop while a condition is true
    "for"      - Loop over a sequence of values (often numbers)
    "try"      - Set up an exception handler
    "def"      - Define a named function
    "class"    - Define a class
    "assert"   - Check that some code is working as you expect it to.
    "pass"     - Do nothing
    "del"      - Delete a data value
    "print"    - Print a value
    "return"   - Return information from a function
    "raise"    - Raise an exception
    "break"    - Terminate a loop
    "continue" - Skip to the next loop statement
    "import"   - Import a module
    "global"   - Declare a variable global
    "exec"     - Execute some dynamically generated code
    "lambda"   - Define an unnamed function
    
    For more information, type e.g. help("assert")
    """ topics[ "if" ]="""""" topics[ "while" ]="""""" topics[ "for" ]="""""" topics[ "try" ]="""""" topics[ "def" ]="""""" topics[ "class" ]="""""" topics[ "assert" ]="""""" topics[ "pass" ]="""""" topics[ "del" ]="""""" topics[ "print" ]="""""" topics[ "return" ]="""""" topics[ "raise" ]="""""" topics[ "break" ]="""""" topics[ "continue" ]="""""" topics[ "import" ]="""""" topics[ "global" ]="""""" topics[ "exec" ]="""""" topics[ "lambda" ]="""""" envir_var="PYTHONDOCS" class Help: def __init__( self, out, line_length, docdir=None ): self.out=out self.line_length=line_length self.Parser=htmllib.HTMLParser self.Formatter=formatter.AbstractFormatter self.Pager=Pager self.Writer=formatter.DumbWriter if os.environ.has_key(envir_var): self.docdir=os.environ[envir_var] else: if os.environ.has_key("PYTHONHOME"): pyhome=os.environ["PYTHONHOME"] else: pyhome=os.path.split( sys.executable )[0] self.docdir=os.path.join( pyhome, "doc" ) testfile=os.path.join( os.path.join( self.docdir, "lib" ), "index.html") if not os.path.exists( testfile ): error = \ """Cannot find documentation directory %s. Set the %s environment variable to point to a "doc" directory. It should have a subdirectory "Lib" with a file named "index.html". """ % (self.docdir, envir_var ) raise EnvironmentError, error def __repr__( self ): self( "everything" ) return "" def __call__( self, ob, out=None ): try: self.call( ob, out ) return 1 except (KeyboardInterrupt, EOFError): return 0 def call( self, ob, out ): self.pager=out or self.Pager( self.out, self.line_length ) if type( ob ) in (type(""),type(u"")): if ob.startswith( "<" ): ob=ob[1:] if ob.endswith( ">" ): ob=ob[:-1] self.write( 'Topic: help( "%s" )\n' % ob ) if ob.startswith("doc:"): path=ob[4:] fullpath=os.path.join( self.docdir, path ) data=open( fullpath ).read() index=ob.rfind( "/" ) self.writeHTML( ob[:index], data ) else: try: info=topics[ob] docrlmatch=re.search( "(]+>)", info.split("\n")[0] ) if docrlmatch: # a first-line redirect self( docrlmatch.group(1) ) else: self.writeHTML( "", info ) except KeyError: glo=__builtins__.__dict__.get( ob, 0 ) if glo: self( glo ) else: sys.stderr.write( "No such topic "+`ob` ) return None else: self.write( 'Topic: help( %s )\n' % ob ) if hasattr( ob, "__doc__" ): self.writeText(ob.__doc__) else: self.writeText( type( ob ).__doc__ ) def writeHTML( self, base, str ): parser=self.Parser(self.Formatter( self.Writer( self ))) parser.feed( str ) # calls self.write automatically for i in range( len( parser.anchorlist) ): self.pager.write( "[%s] %s/%s\n" %(i+1, base,parser.anchorlist[i] )) self.pager.flush() self.out.write( "\n" ) def writeText( self, str ): self.pager.write( str ) self.pager.flush() self.out.write( "\n" ) def write( self, str ): self.pager.write( str ) from cStringIO import StringIO class Pager: numlines=1 def __init__(self, out, pagesize=24, linestart="" ): self.out=out self.pagesize=pagesize self.buf=StringIO() self.linestart=linestart def close(self ): self.flush() def flush(self ): data=self.buf.getvalue().rstrip() # dump trailing ws while data.endswith( "\n|" ): # dump trailing lines data=data[:-2] self.out.write( data ) self.buf=StringIO() def write(self, str ): lines=str.split( "\n" ) self.buf.write( lines[0] ) for line in lines[1:]: self.buf.write( "\n| " ) self.buf.write( line ) if self.numlines and not self.numlines%(self.pagesize): dat=self.buf.getvalue().strip() self.out.write( "| " ) self.out.write( dat ) self.out.write( "\n" ) j=raw_input(prompt) if j and j[0]=="q": raise EOFError self.buf=StringIO() self.numlines=self.numlines+1 help=Help(sys.stdout,24) def test(): rc = 1 rc = rc and help( "everything" ) rc = rc and help( "exec" ) rc = rc and help( "doc:lib/unix.html" ) rc = rc and help( "doc:lib/module-tty.html" ) rc = rc and help( "doc:ref/print.html" ) rc = rc and help( "faq" ) rc = rc and help( dir ) repr( help ) if __name__=="__main__": if len( sys.argv )!=2: print "Usage: %s or %s test" % ( sys.argv[0], sys.argv[0] ) sys.exit(0) elif sys.argv[1]=="test": test() else: help( sys.argv[1] ) From python-dev@python.org Sun Jul 16 22:39:52 2000 From: python-dev@python.org (Greg Stein) Date: Sun, 16 Jul 2000 14:39:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.48,2.49 Message-ID: <200007162139.OAA18443@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv18430 Modified Files: unicodeobject.c Log Message: stop messing around with goto and just write the macro correctly. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.48 retrieving revision 2.49 diff -C2 -r2.48 -r2.49 *** unicodeobject.c 2000/07/16 18:47:43 2.48 --- unicodeobject.c 2000/07/16 21:39:49 2.49 *************** *** 632,640 **** } ! #define UTF8_ERROR(details) do { \ ! if (utf8_decoding_error(&s, &p, errors, details)) \ ! goto onError; \ ! goto nextChar; \ ! } while (0) PyObject *PyUnicode_DecodeUTF8(const char *s, --- 632,641 ---- } ! #define UTF8_ERROR(details) \ ! if (1) { \ ! if (utf8_decoding_error(&s, &p, errors, (details))) \ ! goto onError; \ ! continue; \ ! } else PyObject *PyUnicode_DecodeUTF8(const char *s, *************** *** 732,737 **** } s += n; - nextChar: - /* empty */; } --- 733,736 ---- From python-dev@python.org Sun Jul 16 23:01:48 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Mon, 17 Jul 2000 00:01:48 +0200 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.48,2.49 References: <200007162139.OAA18443@slayer.i.sourceforge.net> Message-ID: <397230CC.D8380547@lemburg.com> Greg Stein wrote: > > Update of /cvsroot/python/python/dist/src/Objects > In directory slayer.i.sourceforge.net:/tmp/cvs-serv18430 > > Modified Files: > unicodeobject.c > Log Message: > stop messing around with goto and just write the macro correctly. > > Index: unicodeobject.c > =================================================================== > RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v > retrieving revision 2.48 > retrieving revision 2.49 > diff -C2 -r2.48 -r2.49 > *** unicodeobject.c 2000/07/16 18:47:43 2.48 > --- unicodeobject.c 2000/07/16 21:39:49 2.49 > *************** > *** 632,640 **** > } > > ! #define UTF8_ERROR(details) do { \ > ! if (utf8_decoding_error(&s, &p, errors, details)) \ > ! goto onError; \ > ! goto nextChar; \ > ! } while (0) > > PyObject *PyUnicode_DecodeUTF8(const char *s, > --- 632,641 ---- > } > > ! #define UTF8_ERROR(details) \ > ! if (1) { \ > ! if (utf8_decoding_error(&s, &p, errors, (details))) \ > ! goto onError; \ > ! continue; \ > ! } else Greg, this doesn't work... UTF8_ERROR is used in if-clauses and the above may alter the else-branches in subtle ways which are just as hard to detect as the original bug. The goto may not be the greatest in style, but it doesn't have the above caveats. Please revert the checkin. > > PyObject *PyUnicode_DecodeUTF8(const char *s, > *************** > *** 732,737 **** > } > s += n; > - nextChar: > - /* empty */; > } > > --- 733,736 ---- > > _______________________________________________ > Python-checkins mailing list > Python-checkins@python.org > http://www.python.org/mailman/listinfo/python-checkins -- Marc-Andre Lemburg ______________________________________________________________________ Business: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/ From python-dev@python.org Mon Jul 17 00:00:20 2000 From: python-dev@python.org (Paul Prescod) Date: Sun, 16 Jul 2000 16:00:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib onlinehelp.py,1.1,NONE Message-ID: <200007162300.QAA30665@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv29718 Removed Files: onlinehelp.py Log Message: At GVR's request. From python-dev@python.org Mon Jul 17 04:04:22 2000 From: python-dev@python.org (Skip Montanaro) Date: Sun, 16 Jul 2000 20:04:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib dospath.py,1.14,1.15 Message-ID: <200007170304.UAA09620@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9608 Modified Files: dospath.py Log Message: * split on / or \ * case insensitive Index: dospath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dospath.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** dospath.py 2000/07/12 16:55:57 1.14 --- dospath.py 2000/07/17 03:04:19 1.15 *************** *** 108,117 **** "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! n = m[:] for i in range(len(n)): ! n[i] = n[i].split(os.sep) ! # if os.sep didn't have any effect, try os.altsep ! if os.altsep and len(n[i]) == 1: ! n[i] = n[i].split(os.altsep) prefix = n[0] --- 108,114 ---- "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! n = map(string.lower, m) for i in range(len(n)): ! n[i] = re.split(r"[/\\]", n[i]) prefix = n[0] *************** *** 122,126 **** if i == 0: return '' break ! return os.sep.join(prefix) --- 119,123 ---- if i == 0: return '' break ! return "\\".join(prefix) From python-dev@python.org Mon Jul 17 04:06:29 2000 From: python-dev@python.org (Skip Montanaro) Date: Sun, 16 Jul 2000 20:06:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib dospath.py,1.15,1.16 Message-ID: <200007170306.UAA09818@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9810 Modified Files: dospath.py Log Message: damn! cut-n-paste from ntpath forgot the "import re" Index: dospath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dospath.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** dospath.py 2000/07/17 03:04:19 1.15 --- dospath.py 2000/07/17 03:06:26 1.16 *************** *** 4,7 **** --- 4,8 ---- import stat import string + import re From python-dev@python.org Mon Jul 17 04:07:00 2000 From: python-dev@python.org (Skip Montanaro) Date: Sun, 16 Jul 2000 20:07:00 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib ntpath.py,1.26,1.27 Message-ID: <200007170307.UAA09833@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9825 Modified Files: ntpath.py Log Message: * split on / or \ * case insensitive comparison Index: ntpath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ntpath.py,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** ntpath.py 2000/07/13 01:01:03 1.26 --- ntpath.py 2000/07/17 03:06:58 1.27 *************** *** 9,12 **** --- 9,13 ---- import stat import string + import re *************** *** 159,165 **** "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! n = m[:] for i in range(len(n)): ! n[i] = n[i].split(os.sep) prefix = n[0] for item in n: --- 160,167 ---- "Given a list of pathnames, returns the longest common leading component" if not m: return '' ! n = map(string.lower, m) for i in range(len(n)): ! n[i] = re.split(r"[/\\]", n[i]) ! prefix = n[0] for item in n: *************** *** 169,173 **** if i == 0: return '' break ! return os.sep.join(prefix) --- 171,175 ---- if i == 0: return '' break ! return "\\".join(prefix) From python-dev@python.org Mon Jul 17 10:04:46 2000 From: python-dev@python.org (Greg Stein) Date: Mon, 17 Jul 2000 02:04:46 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.49,2.50 Message-ID: <200007170904.CAA02323@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv2235 Modified Files: unicodeobject.c Log Message: gcc is being stupid with if/else constructs clean out some other warnings Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.49 retrieving revision 2.50 diff -C2 -r2.49 -r2.50 *** unicodeobject.c 2000/07/16 21:39:49 2.49 --- unicodeobject.c 2000/07/17 09:04:43 2.50 *************** *** 422,432 **** v = PyUnicode_Decode(s, len, encoding, errors); done: ! if (owned) Py_DECREF(obj); return v; onError: ! if (owned) Py_DECREF(obj); return NULL; } --- 422,434 ---- v = PyUnicode_Decode(s, len, encoding, errors); done: ! if (owned) { Py_DECREF(obj); + } return v; onError: ! if (owned) { Py_DECREF(obj); + } return NULL; } *************** *** 633,641 **** #define UTF8_ERROR(details) \ ! if (1) { \ if (utf8_decoding_error(&s, &p, errors, (details))) \ goto onError; \ ! continue; \ ! } else PyObject *PyUnicode_DecodeUTF8(const char *s, --- 635,643 ---- #define UTF8_ERROR(details) \ ! do { \ if (utf8_decoding_error(&s, &p, errors, (details))) \ goto onError; \ ! goto nextchar; \ ! } while (0) PyObject *PyUnicode_DecodeUTF8(const char *s, *************** *** 733,736 **** --- 735,741 ---- } s += n; + + nextchar: + ; } *************** *** 748,751 **** --- 753,758 ---- #undef UTF8_ERROR + /* NOT USED */ + #if 0 static int utf8_encoding_error(const Py_UNICODE **source, *************** *** 777,780 **** --- 784,788 ---- } } + #endif /* NOT USED */ PyObject *PyUnicode_EncodeUTF8(const Py_UNICODE *s, *************** *** 827,831 **** *p++ = (char)((ch >> 18) | 0xf0); ! *p++ = (char)(0x80 | (ch >> 12) & 0x3f); i++; cbWritten += 4; --- 835,839 ---- *p++ = (char)((ch >> 18) | 0xf0); ! *p++ = (char)(0x80 | ((ch >> 12) & 0x3f)); i++; cbWritten += 4; From python-dev@python.org Mon Jul 17 10:22:28 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Mon, 17 Jul 2000 02:22:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include abstract.h,2.24,2.25 Message-ID: <200007170922.CAA08115@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv8086/Include Modified Files: abstract.h Log Message: Restore PyXXX_Length() APIs for binary compatibility. New code will see the macros and therefore use the PyXXX_Size() APIs instead. By Thomas Wouters. Index: abstract.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/abstract.h,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -r2.24 -r2.25 *** abstract.h 2000/07/16 12:04:30 2.24 --- abstract.h 2000/07/17 09:22:26 2.25 *************** *** 384,389 **** DL_IMPORT(int) PyObject_Size(PyObject *o); - #define PyObject_Length PyObject_Size - /* Return the size of object o. If the object, o, provides --- 384,387 ---- *************** *** 394,397 **** --- 392,401 ---- */ + /* For DLL compatibility */ + #undef PyObject_Length + DL_IMPORT(int) PyObject_Length(PyObject *o); + #define PyObject_Length PyObject_Size + + DL_IMPORT(PyObject *) PyObject_GetItem(PyObject *o, PyObject *key); *************** *** 686,691 **** DL_IMPORT(int) PySequence_Size(PyObject *o); - #define PySequence_Length PySequence_Size - /* Return the size of sequence object o, or -1 on failure. --- 690,693 ---- *************** *** 693,696 **** --- 695,704 ---- */ + /* For DLL compatibility */ + #undef PySequence_Length + DL_IMPORT(int) PySequence_Length(PyObject *o); + #define PySequence_Length PySequence_Size + + DL_IMPORT(PyObject *) PySequence_Concat(PyObject *o1, PyObject *o2); *************** *** 840,845 **** DL_IMPORT(int) PyMapping_Size(PyObject *o); - #define PyMapping_Length PyMapping_Size - /* Returns the number of keys in object o on success, and -1 on --- 848,851 ---- *************** *** 847,850 **** --- 853,862 ---- this is equivalent to the Python expression: len(o). */ + + /* For DLL compatibility */ + #undef PyMapping_Length + DL_IMPORT(int) PyMapping_Length(PyObject *o); + #define PyMapping_Length PyMapping_Size + /* implemented as a macro: From python-dev@python.org Mon Jul 17 10:22:58 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Mon, 17 Jul 2000 02:22:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.41,2.42 Message-ID: <200007170922.CAA08249@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv8234/Objects Modified Files: abstract.c Log Message: Restore PyXXX_Length() APIs for binary compatibility. New code will see the macros and therefore use the PyXXX_Size() APIs instead. By Thomas Wouters. Index: abstract.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v retrieving revision 2.41 retrieving revision 2.42 diff -C2 -r2.41 -r2.42 *** abstract.c 2000/07/12 12:56:19 2.41 --- abstract.c 2000/07/17 09:22:55 2.42 *************** *** 79,82 **** --- 79,90 ---- } + #undef PyObject_Length + int + PyObject_Length(PyObject *o) + { + return PyObject_Size(o); + } + #define PyObject_Length PyObject_Size + PyObject * PyObject_GetItem(PyObject *o, PyObject *key) *************** *** 821,824 **** --- 829,840 ---- } + #undef PySequence_Length + int + PySequence_Length(PyObject *s) + { + return PySequence_Size(s); + } + #define PySequence_Length PySequence_Size + PyObject * PySequence_Concat(PyObject *s, PyObject *o) *************** *** 1278,1281 **** --- 1294,1305 ---- return -1; } + + #undef PyMapping_Length + int + PyMapping_Length(PyObject *o) + { + return PyMapping_Size(o); + } + #define PyMapping_Length PyMapping_Size PyObject * From python-dev@python.org Mon Jul 17 11:50:28 2000 From: python-dev@python.org (Paul Prescod) Date: Mon, 17 Jul 2000 03:50:28 -0700 Subject: [Python-checkins] CVS: python/nondist/nondist - New directory Message-ID: <200007171050.DAA28047@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/nondist In directory slayer.i.sourceforge.net:/tmp/cvs-serv28038/nondist Log Message: Directory /cvsroot/python/python/nondist/nondist added to the repository From python-dev@python.org Mon Jul 17 18:42:29 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 17 Jul 2000 10:42:29 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html sf-faq.html,1.2,1.3 Message-ID: <200007171742.KAA30679@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv30592 Modified Files: sf-faq.html Log Message: added question about removing directories added developer <-> real name mapping (Should this go on the web page?) Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** sf-faq.html 2000/07/14 20:03:31 1.2 --- sf-faq.html 2000/07/17 17:42:26 1.3 *************** *** 23,26 **** --- 23,27 ----
  • How can I change the pages at python.sourceforge.net?
  • +
  • Who is who? What is a nowonder?
  • *************** *** 31,34 **** --- 32,36 ----
  • Troubleshooting: "Permission Denied"
  • Where can I learn more about CVS?
  • +
  • How can I remove a directory from the CVS tree?
  • *************** *** 92,95 **** --- 94,203 ---- vi changeme.html +

    1.4.:

    + +

    Q: Who is who? What is a nowonder?

    + +

    A:

    + To get the real name, click on "View members" in the "Developer + Info" field, then click on the user name you're unsure about.
    + A recent [17.07.2000] list of mapping is given here: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    akuchlingA.M. Kuchling
    bwarsawBarry Warsaw
    david_ascherDavid Ascher
    effbotFredrik Lundh
    esrEric S. Raymond
    fdrakeFred L. Drake, Jr.
    gsteinGreg Stein
    gvanrossumGuido van Rossum
    gwardGreg Ward
    jackjansenJack Jansen
    jhyltonJeremy Hylton
    larsgaLars Marius Garshol
    lemburgM.-A. Lemburg
    marangozVladimir Marangozov
    mhammondMark Hammond
    montanaroSkip Montanaro
    moshezMoshe Zadka
    nowonderPeter Schneider-Kamp
    prescodPaul Prescod
    sjoerdSjoerd Mullender
    tim_oneTim Bot
    tmickTrent Mick
    twoutersThomas Wouters
    +

    2. CVS

    *************** *** 168,171 **** --- 276,296 ---- http://cvsbook.red-bean.com/cvsbook.html#Introduction + +

    2.5.:

    + +

    Q: How can I remove a directory from the CVS tree?

    + +

    A:

    + Simple answer: You cannot!
    + More complicated answer: Remove all files from the directory, delete the + directory, use the -P (prune) option of the update command: + +
    + cd the_directory
    + rm file1 file2 file3
    + cvs remove file1 file2 file3
    + cvs ci -m "removed all files" file1 file2 file3
    + cd ..
    + cvs update -P

    3. Patches

    From python-dev@python.org Mon Jul 17 18:43:40 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 17 Jul 2000 10:43:40 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html sf-faq.html,1.3,1.4 Message-ID: <200007171743.KAA30759@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv30739 Modified Files: sf-faq.html Log Message: fixed a stupid spelling mistake Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** sf-faq.html 2000/07/17 17:42:26 1.3 --- sf-faq.html 2000/07/17 17:43:37 1.4 *************** *** 187,191 **** tim_one ! Tim Bot --- 187,191 ---- tim_one ! Tim Peters From python-dev@python.org Mon Jul 17 19:23:20 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Mon, 17 Jul 2000 11:23:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.50,2.51 Message-ID: <200007171823.LAA08035@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv8024/Objects Modified Files: unicodeobject.c Log Message: Fixed problems with UTF error reporting macros and some formatting bugs. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.50 retrieving revision 2.51 diff -C2 -r2.50 -r2.51 *** unicodeobject.c 2000/07/17 09:04:43 2.50 --- unicodeobject.c 2000/07/17 18:23:13 2.51 *************** *** 634,644 **** } - #define UTF8_ERROR(details) \ - do { \ - if (utf8_decoding_error(&s, &p, errors, (details))) \ - goto onError; \ - goto nextchar; \ - } while (0) - PyObject *PyUnicode_DecodeUTF8(const char *s, int size, --- 634,637 ---- *************** *** 649,652 **** --- 642,646 ---- PyUnicodeObject *unicode; Py_UNICODE *p; + const char *errmsg = ""; /* Note: size will always be longer than the resulting Unicode *************** *** 673,706 **** n = utf8_code_length[ch]; ! if (s + n > e) ! UTF8_ERROR("unexpected end of data"); switch (n) { case 0: ! UTF8_ERROR("unexpected code byte"); break; case 1: ! UTF8_ERROR("internal error"); break; case 2: ! if ((s[1] & 0xc0) != 0x80) ! UTF8_ERROR("invalid data"); ch = ((s[0] & 0x1f) << 6) + (s[1] & 0x3f); ! if (ch < 0x80) ! UTF8_ERROR("illegal encoding"); else ! *p++ = (Py_UNICODE)ch; break; case 3: if ((s[1] & 0xc0) != 0x80 || ! (s[2] & 0xc0) != 0x80) ! UTF8_ERROR("invalid data"); ch = ((s[0] & 0x0f) << 12) + ((s[1] & 0x3f) << 6) + (s[2] & 0x3f); ! if (ch < 0x800 || (ch >= 0xd800 && ch < 0xe000)) ! UTF8_ERROR("illegal encoding"); else *p++ = (Py_UNICODE)ch; --- 667,712 ---- n = utf8_code_length[ch]; ! if (s + n > e) { ! errmsg = "unexpected end of data"; ! goto utf8Error; ! } switch (n) { case 0: ! errmsg = "unexpected code byte"; ! goto utf8Error; break; case 1: ! errmsg = "internal error"; ! goto utf8Error; break; case 2: ! if ((s[1] & 0xc0) != 0x80) { ! errmsg = "invalid data"; ! goto utf8Error; ! } ch = ((s[0] & 0x1f) << 6) + (s[1] & 0x3f); ! if (ch < 0x80) { ! errmsg = "illegal encoding"; ! goto utf8Error; ! } else ! *p++ = (Py_UNICODE)ch; break; case 3: if ((s[1] & 0xc0) != 0x80 || ! (s[2] & 0xc0) != 0x80) { ! errmsg = "invalid data"; ! goto utf8Error; ! } ch = ((s[0] & 0x0f) << 12) + ((s[1] & 0x3f) << 6) + (s[2] & 0x3f); ! if (ch < 0x800 || (ch >= 0xd800 && ch < 0xe000)) { ! errmsg = "illegal encoding"; ! goto utf8Error; ! } else *p++ = (Py_UNICODE)ch; *************** *** 710,721 **** if ((s[1] & 0xc0) != 0x80 || (s[2] & 0xc0) != 0x80 || ! (s[3] & 0xc0) != 0x80) ! UTF8_ERROR("invalid data"); ch = ((s[0] & 0x7) << 18) + ((s[1] & 0x3f) << 12) + ((s[2] & 0x3f) << 6) + (s[3] & 0x3f); /* validate and convert to UTF-16 */ ! if ((ch < 0x10000) || /* minimum value allowed for 4 byte encoding */ ! (ch > 0x10ffff)) /* maximum value allowed for UTF-16 */ ! UTF8_ERROR("illegal encoding"); /* compute and append the two surrogates: */ --- 716,733 ---- if ((s[1] & 0xc0) != 0x80 || (s[2] & 0xc0) != 0x80 || ! (s[3] & 0xc0) != 0x80) { ! errmsg = "invalid data"; ! goto utf8Error; ! } ch = ((s[0] & 0x7) << 18) + ((s[1] & 0x3f) << 12) + ((s[2] & 0x3f) << 6) + (s[3] & 0x3f); /* validate and convert to UTF-16 */ ! if ((ch < 0x10000) || /* minimum value allowed for 4 ! byte encoding */ ! (ch > 0x10ffff)) { /* maximum value allowed for ! UTF-16 */ ! errmsg = "illegal encoding"; ! goto utf8Error; ! } /* compute and append the two surrogates: */ *************** *** 732,741 **** default: /* Other sizes are only needed for UCS-4 */ ! UTF8_ERROR("unsupported Unicode code range"); } s += n; ! ! nextchar: ! ; } --- 744,757 ---- default: /* Other sizes are only needed for UCS-4 */ ! errmsg = "unsupported Unicode code range"; ! goto utf8Error; ! break; } s += n; ! continue; ! ! utf8Error: ! if (utf8_decoding_error(&s, &p, errors, errmsg)) ! goto onError; } *************** *** 750,757 **** return NULL; } - - #undef UTF8_ERROR ! /* NOT USED */ #if 0 static --- 766,772 ---- return NULL; } ! /* Not used anymore, now that the encoder supports UTF-16 ! surrogates. */ #if 0 static *************** *** 784,788 **** } } ! #endif /* NOT USED */ PyObject *PyUnicode_EncodeUTF8(const Py_UNICODE *s, --- 799,803 ---- } } ! #endif PyObject *PyUnicode_EncodeUTF8(const Py_UNICODE *s, *************** *** 828,832 **** cbAllocated += 4*10; if (_PyString_Resize(&v, cbAllocated)) ! goto onError; } --- 843,847 ---- cbAllocated += 4*10; if (_PyString_Resize(&v, cbAllocated)) ! goto onError; } *************** *** 939,948 **** } - #define UTF16_ERROR(details) do { \ - if (utf16_decoding_error(&q, &p, errors, details)) \ - goto onError; \ - continue; \ - } while(0) - PyObject *PyUnicode_DecodeUTF16(const char *s, int size, --- 954,957 ---- *************** *** 954,957 **** --- 963,967 ---- const Py_UNICODE *q, *e; int bo = 0; + const char *errmsg = ""; /* size should be an even number */ *************** *** 1013,1030 **** /* UTF-16 code pair: */ ! if (q >= e) ! UTF16_ERROR("unexpected end of data"); if (0xDC00 <= *q && *q <= 0xDFFF) { q++; ! if (0xD800 <= *q && *q <= 0xDBFF) /* This is valid data (a UTF-16 surrogate pair), but we are not able to store this information since our Py_UNICODE type only has 16 bits... this might change someday, even though it's unlikely. */ ! UTF16_ERROR("code pairs are not supported"); else continue; } ! UTF16_ERROR("illegal encoding"); } --- 1023,1049 ---- /* UTF-16 code pair: */ ! if (q >= e) { ! errmsg = "unexpected end of data"; ! goto utf16Error; ! } if (0xDC00 <= *q && *q <= 0xDFFF) { q++; ! if (0xD800 <= *q && *q <= 0xDBFF) { /* This is valid data (a UTF-16 surrogate pair), but we are not able to store this information since our Py_UNICODE type only has 16 bits... this might change someday, even though it's unlikely. */ ! errmsg = "code pairs are not supported"; ! goto utf16Error; ! } else continue; } ! errmsg = "illegal encoding"; ! /* Fall through to report the error */ ! ! utf16Error: ! if (utf16_decoding_error(&q, &p, errors, errmsg)) ! goto onError; } From python-dev@python.org Mon Jul 17 19:49:25 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 17 Jul 2000 11:49:25 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.1,1.2 Message-ID: <200007171849.LAA09860@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv9849 Modified Files: pep-0201.txt Log Message: Latest update. After consultation with Guido, zip() is chosen as the name of this built-in. In reference implementation added an __len__() method. Added a `Rejected Elaborations' section to talk about suggestions from the list that I've rejected (and the reasoning behind the rejection). Also: rewrite of paragraph 1 under "Standard For-Loops" for clarity; Spelling and grammar fixes; use a References section. Index: pep-0201.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0201.txt 2000/07/13 06:33:08 1.1 --- pep-0201.txt 2000/07/17 18:49:21 1.2 *************** *** 26,32 **** as `parallel for loops'. A standard for-loop in Python iterates over every element in the sequence until the sequence is ! exhausted. The for-loop can also be explicitly exited with a ! `break' statement, and for-loops can have else: clauses, but these ! is has no bearing on this PEP. For-loops can iterate over built-in types such as lists and --- 26,33 ---- as `parallel for loops'. A standard for-loop in Python iterates over every element in the sequence until the sequence is ! exhausted. A `break' statement inside the loop suite causes an ! explicit loop exit. For-loops also have else: clauses which get ! executed when the loop exits normally (i.e. not by execution of a ! break). For-loops can iterate over built-in types such as lists and *************** *** 36,46 **** monotonically increasing index starting at 0, and this method should raise an IndexError when the sequence is exhausted. This ! protocol is current undocumented -- a defect in Python's documentation hopefully soon corrected. ! For loops are described in the language reference manual here ! http://www.python.org/doc/devel/ref/for.html ! An example for-loop >>> for i in (1, 2, 3): print i --- 37,47 ---- monotonically increasing index starting at 0, and this method should raise an IndexError when the sequence is exhausted. This ! protocol is currently undocumented -- a defect in Python's documentation hopefully soon corrected. ! For-loops are described in the Python language reference ! manual[1]. ! An example for-loop: >>> for i in (1, 2, 3): print i *************** *** 89,93 **** - The use of the magic `None' first argument is non-obvious. ! - Its has arbitrary, often unintended, and inflexible semantics when the lists are not of the same length: the shorter sequences are padded with `None'. --- 90,94 ---- - The use of the magic `None' first argument is non-obvious. ! - It has arbitrary, often unintended, and inflexible semantics when the lists are not of the same length: the shorter sequences are padded with `None'. *************** *** 111,119 **** The proposed solution is to introduce a new built-in sequence generator function, available in the __builtin__ module. This ! function is to be called `marry' and has the following signature: ! marry(seqa, [seqb, [...]], [pad=]) ! marry() takes one or more sequences and weaves their elements together, just as map(None, ...) does with sequences of equal length. The optional keyword argument `pad', if supplied, is a --- 112,120 ---- The proposed solution is to introduce a new built-in sequence generator function, available in the __builtin__ module. This ! function is to be called `zip' and has the following signature: ! zip(seqa, [seqb, [...]], [pad=]) ! zip() takes one or more sequences and weaves their elements together, just as map(None, ...) does with sequences of equal length. The optional keyword argument `pad', if supplied, is a *************** *** 123,129 **** It is not possible to pad short lists with different pad values, ! nor will marry() ever raise an exception with lists of different ! lengths. To accomplish both of these, the sequences must be ! checked and processed before the call to marry(). --- 124,130 ---- It is not possible to pad short lists with different pad values, ! nor will zip() ever raise an exception with lists of different ! lengths. To accomplish either behavior, the sequences must be ! checked and processed before the call to zip(). *************** *** 131,135 **** Lazy Execution ! For performance purposes, marry() does not construct the list of tuples immediately. Instead it instantiates an object that implements a __getitem__() method and conforms to the informal --- 132,136 ---- Lazy Execution ! For performance purposes, zip() does not construct the list of tuples immediately. Instead it instantiates an object that implements a __getitem__() method and conforms to the informal *************** *** 149,171 **** >>> d = (12, 13) ! >>> marry(a, b) [(1, 5), (2, 6), (3, 7), (4, 8)] ! >>> marry(a, d) [(1, 12), (2, 13)] ! >>> marry(a, d, pad=0) [(1, 12), (2, 13), (3, 0), (4, 0)] ! >>> marry(a, d, pid=0) Traceback (most recent call last): File "", line 1, in ? ! File "/usr/tmp/python-iKAOxR", line 11, in marry TypeError: unexpected keyword arguments ! >>> marry(a, b, c, d) [(1, 5, 9, 12), (2, 6, 10, 13)] ! >>> marry(a, b, c, d, pad=None) [(1, 5, 9, 12), (2, 6, 10, 13), (3, 7, 11, None), (4, 8, None, None)] >>> map(None, a, b, c, d) --- 150,172 ---- >>> d = (12, 13) ! >>> zip(a, b) [(1, 5), (2, 6), (3, 7), (4, 8)] ! >>> zip(a, d) [(1, 12), (2, 13)] ! >>> zip(a, d, pad=0) [(1, 12), (2, 13), (3, 0), (4, 0)] ! >>> zip(a, d, pid=0) Traceback (most recent call last): File "", line 1, in ? ! File "/usr/tmp/python-iKAOxR", line 11, in zip TypeError: unexpected keyword arguments ! >>> zip(a, b, c, d) [(1, 5, 9, 12), (2, 6, 10, 13)] ! >>> zip(a, b, c, d, pad=None) [(1, 5, 9, 12), (2, 6, 10, 13), (3, 7, 11, None), (4, 8, None, None)] >>> map(None, a, b, c, d) *************** *** 176,185 **** Reference Implementation ! Here is a reference implementation, in Python of the marry() built-in function and helper class. These would ultimately be replaced by equivalent C code. ! class _Marriage: def __init__(self, args, kws): self.__padgiven = 0 if kws.has_key('pad'): --- 177,187 ---- Reference Implementation ! Here is a reference implementation, in Python of the zip() built-in function and helper class. These would ultimately be replaced by equivalent C code. ! class _Zipper: def __init__(self, args, kws): + # Defaults self.__padgiven = 0 if kws.has_key('pad'): *************** *** 187,190 **** --- 189,193 ---- self.__pad = kws['pad'] del kws['pad'] + # Assert no unknown arguments are left if kws: raise TypeError('unexpected keyword arguments') *************** *** 207,210 **** --- 210,230 ---- return tuple(ret) + def __len__(self): + # If we're padding, then len is the length of the longest sequence, + # otherwise it's the length of the shortest sequence. + if not self.__padgiven: + shortest = -1 + for s in self.__sequences: + slen = len(s) + if shortest < 0 or slen < shortest: + shortest = slen + return shortest + longest = 0 + for s in self.__sequences: + slen = len(s) + if slen > longest: + longest = slen + return longest + def __str__(self): ret = [] *************** *** 220,242 **** ! def marry(*args, **kws): ! return _Marriage(args, kws) Open Issues ! What should "marry(a)" do? ! Given a = (1, 2, 3), should marry(a) return [(1,), (2,), (3,)] or ! should it return [1, 2, 3]? The first is more consistent with the ! description given above, while the latter is what map(None, a) ! does, and may be more consistent with user expectation. ! The latter interpretation requires special casing, which is not ! present in the reference implementation. It returns ! >>> marry(a) ! [(1,), (2,), (3,), (4,)] --- 240,367 ---- ! def zip(*args, **kws): ! return _Zipper(args, kws) + Rejected Elaborations + + Some people have suggested that the user be able to specify the + type of the inner and outer containers for the zipped sequence. + This would be specified by additional keyword arguments to zip(), + named `inner' and `outer'. + + This elaboration is rejected for several reasons. First, there + really is no outer container, even though there appears to be an + outer list container the example above. This is simply an + artifact of the repr() of the zipped object. User code can do its + own looping over the zipped object via __getitem__(), and build + any type of outer container for the fully evaluated, concrete + sequence. For example, to build a zipped object with lists as an + outer container, use + + >>> list(zip(sequence_a, sequence_b, sequence_c)) + + for tuple outer container, use + + >>> tuple(zip(sequence_a, sequence_b, sequence_c)) + + This type of construction will usually not be necessary though, + since it is expected that zipped objects will most often appear in + for-loops. + + Second, allowing the user to specify the inner container + introduces needless complexity and arbitrary decisions. You might + imagine that instead of the default tuple inner container, the + user could prefer a list, or a dictionary, or instances of some + sequence-like class. + + One problem is the API. Should the argument to `inner' be a type + or a template object? For flexibility, the argument should + probably be a type object (i.e. TupleType, ListType, DictType), or + a class. For classes, the implementation could just pass the zip + element to the constructor. But what about built-in types that + don't have constructors? They would have to be special-cased in + the implementation (i.e. what is the constructor for TupleType? + The tuple() built-in). + + Another problem that arises is for zips greater than length two. + Say you had three sequences and you wanted the inner type to be a + dictionary. What would the semantics of the following be? + + >>> zip(sequence_a, sequence_b, sequence_c, inner=DictType) + + Would the key be (element_a, element_b) and the value be + element_c, or would the key be element_a and the value be + (element_b, element_c)? Or should an exception be thrown? + + This suggests that the specification of the inner container type + is needless complexity. It isn't likely that the inner container + will need to be specified very often, and it is easy to roll your + own should you need it. Tuples are chosen for the inner container + type due to their (slight) memory footprint and performance + advantages. + + + Open Issues + + - What should "zip(a)" do? Given + + a = (1, 2, 3); zip(a) + + three outcomes are possible. + + 1) Returns [(1,), (2,), (3,)] + + Pros: no special casing in the implementation or in user + code, and is more consistent with the description of it's + semantics. Cons: this isn't what map(None, a) would return, + and may be counter to user expectations. ! 2) Returns [1, 2, 3] ! Pros: consistency with map(None, a), and simpler code for ! for-loops, e.g. ! for i in zip(a): ! ! instead of ! ! for (i,) in zip(a): ! ! Cons: too much complexity and special casing for what should ! be a relatively rare usage pattern. ! ! 3) Raises TypeError ! ! Pros: None ! ! Cons: needless restriction ! ! Current scoring seems to generally favor outcome 1. ! ! - The name of the built-in `zip' may cause some initial confusion ! with the zip compression algorithm. Other suggestions include ! (but are not limited to!): marry, weave, parallel, lace, braid, ! interlace, permute, furl, tuples, lists, stitch, collate, knit, ! plait, and with. All have disadvantages, and there is no clear ! unanimous choice, therefore the decision was made to go with ! `zip' because the same functionality is available in other ! languages (e.g. Haskell) under the name `zip'[2]. ! ! ! ! References ! ! [1] http://www.python.org/doc/devel/ref/for.html ! [2] http://www.haskell.org/onlinereport/standard-prelude.html#$vzip ! ! TBD: URL to python-dev archives ! ! ! Copyright ! This document has been placed in the public domain. From python-dev@python.org Tue Jul 18 10:09:50 2000 From: python-dev@python.org (Greg Stein) Date: Tue, 18 Jul 2000 02:09:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Demo/imputil importers.py,1.1,1.2 Message-ID: <200007180909.CAA21838@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/imputil In directory slayer.i.sourceforge.net:/tmp/cvs-serv21642/Demo/imputil Modified Files: importers.py Log Message: no changes other than indentation level (now 4) and comment reflow. use "cvs diff -b" to verify. Index: importers.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/imputil/importers.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** importers.py 2000/06/29 11:05:30 1.1 --- importers.py 2000/07/18 09:09:48 1.2 *************** *** 35,88 **** def _timestamp(pathname): ! "Return the file modification time as a Long." ! try: ! s = os.stat(pathname) ! except OSError: ! return None ! return long(s[8]) def _fs_import(dir, modname, fqname): ! "Fetch a module from the filesystem." ! pathname = os.path.join(dir, modname) ! if os.path.isdir(pathname): ! values = { '__pkgdir__' : pathname, '__path__' : [ pathname ] } ! ispkg = 1 ! pathname = os.path.join(pathname, '__init__') ! else: ! values = { } ! ispkg = 0 ! ! # look for dynload modules ! for desc in _c_suffixes: ! file = pathname + desc[0] ! try: ! fp = open(file, desc[1]) ! except IOError: ! pass ! else: ! module = imp.load_module(fqname, fp, file, desc) ! values['__file__'] = file ! return 0, module, values ! ! t_py = _timestamp(pathname + '.py') ! t_pyc = _timestamp(pathname + _suffix) ! if t_py is None and t_pyc is None: ! return None ! code = None ! if t_py is None or (t_pyc is not None and t_pyc >= t_py): ! file = pathname + _suffix ! f = open(file, 'rb') ! if f.read(4) == imp.get_magic(): ! t = struct.unpack('= t_py): ! file = pathname + _suffix ! f = open(file, 'rb') ! if f.read(4) == imp.get_magic(): ! t = struct.unpack('., where ! can be located using a subclass-specific mechanism and the ! is found in the archive using a subclass-specific mechanism. ! ! This class defines two hooks for subclasses: one to locate an archive ! (and possibly return some context for future subfile lookups), and one ! to locate subfiles. ! """ ! ! def get_code(self, parent, modname, fqname): ! if parent: ! # the Importer._finish_import logic ensures that we handle imports ! # under the top level module (package / archive). ! assert parent.__importer__ == self ! ! # if a parent "package" is provided, then we are importing a sub-file ! # from the archive. ! result = self.get_subfile(parent.__archive__, modname) ! if result is None: ! return None ! if isinstance(result, _TupleType): ! assert len(result) == 2 ! return (0,) + result ! return 0, result, {} ! ! # no parent was provided, so the archive should exist somewhere on the ! # default "path". ! archive = self.get_archive(modname) ! if archive is None: ! return None ! return 1, "", {'__archive__':archive} ! ! def get_archive(self, modname): ! """Get an archive of modules. ! ! This method should locate an archive and return a value which can be ! used by get_subfile to load modules from it. The value may be a simple ! pathname, an open file, or a complex object that caches information ! for future imports. ! ! Return None if the archive was not found. """ - raise RuntimeError, "get_archive not implemented" - - def get_subfile(self, archive, modname): - """Get code from a subfile in the specified archive. ! Given the specified archive (as returned by get_archive()), locate ! and return a code object for the specified module name. - A 2-tuple may be returned, consisting of a code object and a dict - of name/values to place into the target module. - Return None if the subfile was not found. - """ - raise RuntimeError, "get_subfile not implemented" - - class PackageArchive(PackageArchiveImporter): ! "PackageArchiveImporter subclass that refers to a specific archive." ! def __init__(self, modname, archive_pathname): ! self.__modname = modname ! self.__path = archive_pathname ! ! def get_archive(self, modname): ! if modname == self.__modname: ! return self.__path ! return None ! # get_subfile is passed the full pathname of the archive --- 106,182 ---- # class PackageArchiveImporter(imputil.Importer): ! """Importer subclass to import from (file) archives. ! This Importer handles imports of the style ., where ! can be located using a subclass-specific mechanism and the ! is found in the archive using a subclass-specific mechanism. ! ! This class defines two hooks for subclasses: one to locate an archive ! (and possibly return some context for future subfile lookups), and one ! to locate subfiles. """ ! def get_code(self, parent, modname, fqname): ! if parent: ! # the Importer._finish_import logic ensures that we handle imports ! # under the top level module (package / archive). ! assert parent.__importer__ == self ! ! # if a parent "package" is provided, then we are importing a ! # sub-file from the archive. ! result = self.get_subfile(parent.__archive__, modname) ! if result is None: ! return None ! if isinstance(result, _TupleType): ! assert len(result) == 2 ! return (0,) + result ! return 0, result, {} ! ! # no parent was provided, so the archive should exist somewhere on the ! # default "path". ! archive = self.get_archive(modname) ! if archive is None: ! return None ! return 1, "", {'__archive__':archive} ! ! def get_archive(self, modname): ! """Get an archive of modules. ! ! This method should locate an archive and return a value which can be ! used by get_subfile to load modules from it. The value may be a simple ! pathname, an open file, or a complex object that caches information ! for future imports. ! ! Return None if the archive was not found. ! """ ! raise RuntimeError, "get_archive not implemented" ! ! def get_subfile(self, archive, modname): ! """Get code from a subfile in the specified archive. ! ! Given the specified archive (as returned by get_archive()), locate ! and return a code object for the specified module name. ! ! A 2-tuple may be returned, consisting of a code object and a dict ! of name/values to place into the target module. ! ! Return None if the subfile was not found. ! """ ! raise RuntimeError, "get_subfile not implemented" class PackageArchive(PackageArchiveImporter): ! "PackageArchiveImporter subclass that refers to a specific archive." ! def __init__(self, modname, archive_pathname): ! self.__modname = modname ! self.__path = archive_pathname ! ! def get_archive(self, modname): ! if modname == self.__modname: ! return self.__path ! return None ! # get_subfile is passed the full pathname of the archive *************** *** 186,209 **** # class DirectoryImporter(imputil.Importer): ! "Importer subclass to emulate the standard importer." ! def __init__(self, dir): ! self.dir = dir ! def get_code(self, parent, modname, fqname): ! if parent: ! dir = parent.__pkgdir__ ! else: ! dir = self.dir ! ! # Return the module (and other info) if found in the specified ! # directory. Otherwise, return None. ! return _fs_import(dir, modname, fqname) ! ! def __repr__(self): ! return '<%s.%s for "%s" at 0x%x>' % (self.__class__.__module__, ! self.__class__.__name__, ! self.dir, ! id(self)) --- 186,209 ---- # class DirectoryImporter(imputil.Importer): ! "Importer subclass to emulate the standard importer." ! def __init__(self, dir): ! self.dir = dir ! def get_code(self, parent, modname, fqname): ! if parent: ! dir = parent.__pkgdir__ ! else: ! dir = self.dir ! ! # Return the module (and other info) if found in the specified ! # directory. Otherwise, return None. ! return _fs_import(dir, modname, fqname) ! ! def __repr__(self): ! return '<%s.%s for "%s" at 0x%x>' % (self.__class__.__module__, ! self.__class__.__name__, ! self.dir, ! id(self)) *************** *** 213,248 **** # class PathImporter(imputil.Importer): ! def __init__(self, path=sys.path): ! self.path = path ! def get_code(self, parent, modname, fqname): ! if parent: ! # we are looking for a module inside of a specific package ! return _fs_import(parent.__pkgdir__, modname, fqname) ! ! # scan sys.path, looking for the requested module ! for dir in self.path: ! if isinstance(dir, _StringType): ! result = _fs_import(dir, modname, fqname) ! if result: ! return result ! # not found ! return None ###################################################################### def _test_dir(): ! "Debug/test function to create DirectoryImporters from sys.path." ! imputil.ImportManager().install() ! path = sys.path[:] ! path.reverse() ! for d in path: ! sys.path.insert(0, DirectoryImporter(d)) ! sys.path.insert(0, imputil.BuiltinImporter()) def _test_revamp(): ! "Debug/test function for the revamped import system." ! imputil.ImportManager().install() ! sys.path.insert(0, PathImporter()) ! sys.path.insert(0, imputil.BuiltinImporter()) --- 213,248 ---- # class PathImporter(imputil.Importer): ! def __init__(self, path=sys.path): ! self.path = path ! def get_code(self, parent, modname, fqname): ! if parent: ! # we are looking for a module inside of a specific package ! return _fs_import(parent.__pkgdir__, modname, fqname) ! ! # scan sys.path, looking for the requested module ! for dir in self.path: ! if isinstance(dir, _StringType): ! result = _fs_import(dir, modname, fqname) ! if result: ! return result ! # not found ! return None ###################################################################### def _test_dir(): ! "Debug/test function to create DirectoryImporters from sys.path." ! imputil.ImportManager().install() ! path = sys.path[:] ! path.reverse() ! for d in path: ! sys.path.insert(0, DirectoryImporter(d)) ! sys.path.insert(0, imputil.BuiltinImporter()) def _test_revamp(): ! "Debug/test function for the revamped import system." ! imputil.ImportManager().install() ! sys.path.insert(0, PathImporter()) ! sys.path.insert(0, imputil.BuiltinImporter()) From python-dev@python.org Tue Jul 18 10:09:50 2000 From: python-dev@python.org (Greg Stein) Date: Tue, 18 Jul 2000 02:09:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib imputil.py,1.13,1.14 httplib.py,1.17,1.18 Message-ID: <200007180909.CAA21834@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv21642/Lib Modified Files: imputil.py httplib.py Log Message: no changes other than indentation level (now 4) and comment reflow. use "cvs diff -b" to verify. Index: imputil.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/imputil.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** imputil.py 2000/06/26 17:31:49 1.13 --- imputil.py 2000/07/18 09:09:47 1.14 *************** *** 19,362 **** class ImportManager: ! "Manage the import process." ! def install(self, namespace=vars(__builtin__)): ! "Install this ImportManager into the specified namespace." ! if isinstance(namespace, _ModuleType): ! namespace = vars(namespace) [...1107 lines suppressed...] ! ImportManager().install() ! sys.path.insert(0, BuiltinImporter()) ###################################################################### --- 584,598 ---- def _print_importers(): ! items = sys.modules.items() ! items.sort() ! for name, module in items: ! if module: ! print name, module.__dict__.get('__importer__', '-- no importer') ! else: ! print name, '-- non-existent module' def _test_revamp(): ! ImportManager().install() ! sys.path.insert(0, BuiltinImporter()) ###################################################################### Index: httplib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/httplib.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** httplib.py 2000/06/26 08:28:01 1.17 --- httplib.py 2000/07/18 09:09:47 1.18 *************** *** 78,84 **** try: ! from cStringIO import StringIO except ImportError: ! from StringIO import StringIO HTTP_PORT = 80 --- 78,84 ---- try: [...1289 lines suppressed...] --- 765,781 ---- if hasattr(socket, 'ssl'): ! host = 'www.c2.net' ! hs = HTTPS() ! hs.connect(host) ! hs.putrequest('GET', selector) ! hs.endheaders() ! status, reason, headers = hs.getreply() ! print 'status =', status ! print 'reason =', reason ! print ! if headers: ! for header in headers.headers: print string.strip(header) ! print ! print hs.getfile().read() From python-dev@python.org Tue Jul 18 11:01:15 2000 From: python-dev@python.org (Thomas Wouters) Date: Tue, 18 Jul 2000 03:01:15 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0204.txt,1.1,1.2 Message-ID: <200007181001.DAA31938@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv29198 Modified Files: pep-0204.txt Log Message: First draft of the range-literals PEP. Not sprinkeled with explicit 'TBD's, and the one TBD in there should be an 'XXX' in my opinion ;) but with a lot of issues under 'Open issues'. Please, comment freely, on anything from specific arguments and spelling errors to style issues and argument-flow. I wrote all this on the train to and from work, listening to UB40 on the way to work, and to my girlfriend complaining about her work and her colleagues on the way home ;) So it might be a bit incoherent in places. One TBD that's going to come up a lot in PEPs, I think: how to wrap long URLs ? I think whoever invents a good way to do that can become a millionaire. Can we define/steal a good, standard way to wrap URLs, please ? Index: pep-0204.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0204.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0204.txt 2000/07/14 03:29:11 1.1 --- pep-0204.txt 2000/07/18 10:01:12 1.2 *************** *** 1,9 **** ! PEP: 203 Title: Range Literals Version: $Revision$ Owner: thomas@xs4all.net (Thomas Wouters) Python-Version: 2.0 ! Status: Incomplete --- 1,269 ---- ! PEP: 204 Title: Range Literals Version: $Revision$ Owner: thomas@xs4all.net (Thomas Wouters) Python-Version: 2.0 ! Status: Draft + + + Introduction + + This PEP describes the `range literal' proposal for Python 2.0. + This PEP tracks the status and ownership of this feature, slated + for introduction in Python 2.0. It contains a description of the + feature and outlines changes necessary to support the feature. + This PEP summarizes discussions held in mailing list forums, and + provides URLs for further information, where appropriate. The CVS + revision history of this file contains the definitive historical + record. + + + + List ranges + + Ranges are sequences of numbers of a fixed stepping, often used in + for-loops. The Python for-loop is designed to iterate over a + sequence directly: + + >>> l = ['a', 'b', 'c', 'd'] + >>> for item in l: + ... print item + a + b + c + d + + However, this solution is not always prudent. Firstly, problems + arise when altering the sequence in the body of the for-loop, + resulting in the for-loop skipping items. Secondly, it is not + possible to iterate over, say, every second element of the + sequence. And thirdly, it is sometimes necessary to process an + element based on its index, which is not readily available in the + above construct. + + For these instances, and others where a range of numbers is + desired, Python provides the `range' builtin function, which + creates a list of numbers. The `range' function takes three + arguments, `start', `end' and `step'. `start' and `step' are + optional, and default to 0 and 1, respectively. + + The `range' function creates a list of numbers, starting at + `start', with a step of `step', up to, but not including `end', so + that `range(10)' produces a list that has exactly 10 items, the + numbers 0 through 9. + + Using the `range' function, the above example would look like + this: + + >>> for i in range(len(l)): + ... print l[i] + a + b + c + d + + Or, to start at the second element of `l' and processing only + every second element from then on: + + >>> for i in range(1, len(l), 2): + ... print l[i] + b + d + + There are several disadvantages with this approach: + + - Clarity of purpose: Adding another functioncall, possibly with + extra arithmatic to determine the desired length and step of the + list, does not improve readability of the code. Also, it is + possible to `shadow' the builtin `range' function by supplying a + local or global variable with the same name, effectively + replacing it. This may or may not be a desired effect. + + - Efficiency: because the `range' function can be overridden, the + Python compiler cannot make assumptions about the for-loop, and + has to maintain a seperate loop counter. + + - Consistency: There already is a syntax that is used to denote + ranges, as shown below. This syntax uses the exact same + arguments, though all optional, in the exact same way. It seems + logical to extend this syntax to ranges, to form `range + literals'. + + + + Slice Indices + + In Python, a sequence can be indexed in one of two ways: + retrieving a single item, or retrieving a range of items. + Retrieving a range of items results in a new object of the same + type as the original sequence, containing zero or more items from + the original sequence. This is done using a `range notation': + + >>> l[2:4] + ['c', 'd'] + + This range notation consists of zero, one or two indices seperated + by a colon. The first index is the `start' index, the second the + `end'. When either is left out, they default to respectively the + start and the end of the sequence. + + There is also an extended range notation, which incorporates + `step' as well. Though this notation is not currently supported + by most builtin types, if it were, it would work as follows: + + >>> l[1:4:2] + ['b', 'd'] + + The third `argument' to the slice syntax is exactly the same as + the `step' argument to range(). The underlying mechanisms of + standard and these extended slices are sufficiently different and + inconsistent that many classes and extensions outside of + mathematical packages do not implement support for the extended + variant, and this should definately be resolved, but this is + beyond the scope of this PEP. + + Extended slices do show, however, that there is already a + perfectly valid and applicable syntax to denote ranges in a way + that solve all of the earlier stated disadvantages of the use of + the range() function: + + - It is clearer, more concise syntax, which has already proven to + be both intuitive and easy to learn. + + - It is consistent with the other use of ranges in Python + (slices.) + + - Because it is built-in syntax, instead of a builtin function, it + cannot be overridden. This means both that a viewer can be + certain about what the code does, and that an optimizer will not + have to worry about range() being `shadowed'. + + + + The Proposed Solution + + The proposed implementation of range-literals combines the syntax + for list literals with the syntax for (extended) slices, to form + range literals: + + >>> [1:10] + [1, 2, 3, 4, 5, 6, 7, 8, 9] + >>> [:5] + [0, 1, 2, 3, 4] + >>> [5:1:-1] + [5, 4, 3, 2] + + There is one minor difference between range literals and the slice + syntax: though it is possible to omit all of `start', `end' and + `step' in slices, it does not make sense to omit `end' in range + literals. In slices, `end' would default to the end of the list, + but this has no meaning in range literals. + + + + Reference Implementation + + The proposed implementation can be found on SourceForge[1]. It + adds a new bytecode, BUILD_RANGE, that takes three arguments from + the stack and builds a list on the bases of those. The list is + pushed back on the stack. + + The use of a new bytecode is necessary to be able to build ranges + based on other calculations, whose outcome is not known at compile + time. + + The code introduces two new functions to listobject.c, which are + currently hovering between private functions and full-fledged API + calls. + + PyObject * PyList_FromRange(long start, long end, long step) + builds a list from start, end and step, returning NULL if an error + occurs. + + long PyList_GetLenOfRange(long start, long end, long step) is a + helper function to determine the length of a range. It was + previously a static function in bltinmodule.c, but is now + necessary in both listobject.c and bltinmodule.c (for xrange). It + is made non-static solely to avoid code duplication. + + + Open issues + + One possible solution to the discrepancy of requiring the `end' + argument in range literals is to allow the range syntax to create + a `generator', rather than a list, such as the `xrange' builtin + function does. However, a generator would not be a list, and it + would be impossible, for instance, to assign to items in the + generator, or append to it. + + The range syntax could conceivably be extended to include tuples, + immutable lists, which could then be safely implemented as + generators. Especially for large number arrays, this may be a + desirable solution: generators require very little in the way of + storage and initialization, and there is only a small performance + impact in calculating and creating the appropriate number on + request. (TBD: is there any at all ? Cursory testing suggests + equal performance even in the case of ranges of length 1.) + + However, even if idea was adopted, would it be wise to `special + case' the second argument, making it optional in one instance of + the syntax, and non-optional in other cases ? + + + Should it be possible to mix range syntax with normal list + literals, creating a single list, like so: + + >>> [5, 6, 1:6, 7, 9] + to create + [5, 6, 1, 2, 3, 4, 5, 7, 9] + + + How should range literals interact with another proposed new + feature, `list comprehensions', PEP-202 ? In specific, should it + be possible to create lists in list comprehensions, like so: + + >>> [x:y for x in (1,2) y in (3, 4)] + + Should this example return a single list with multiple ranges: + [1, 2, 1, 2, 3, 2, 2, 3] + + Or a list of lists, like so: + [[1, 2], [1, 2, 3], [2], [2, 3]] + + However, as the syntax and semantics of list comprehensions are + still subject of hot debate, these issues are probably best + addressed by the `list comprehensions' PEP. + + + Range literals accept objects other than integers: it performs + PyInt_AsLong() on the objects passed in, so as long as the objects + can be coerced into integers, they will be accepted. The + resulting list, however, is always composed of standard integers. + + Should range literals create a list of the passed-in type ? It + might be desirable in the cases of other builtin types, such as + longs and strings: + + >>> [ 1L : 2L<<64 : 2<<32L ] + >>> ["a":"z":"b"] + >>> ["a":"z":2] + + However, this might be too much `magic' to be obvious. It might + also present problems with user-defined classes: even if the base + class can be found and a new instance created, the instance may + require additional arguments to __init__, causing the creation to + fail. + + + The PyList_FromRange() and PyList_GetLenOfRange() functions need + to be classified: are they part of the API, or should they be made + private functions ? + + + References: + + [1] + http://sourceforge.net/patch/?func=detailpatch&patch_id=100902&group_id=5470 From python-dev@python.org Tue Jul 18 22:43:26 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Tue, 18 Jul 2000 14:43:26 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html sf-faq.html,1.4,1.5 Message-ID: <200007182143.OAA02155@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv2080 Modified Files: sf-faq.html Log Message: added Windows section How to install ssh? How to install cvs to use ssh? Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** sf-faq.html 2000/07/17 17:43:37 1.4 --- sf-faq.html 2000/07/18 21:43:23 1.5 *************** *** 42,45 **** --- 42,51 ---- +

    4. Windows

    +
      +
    1. How to install ssh?
    2. +
    3. How to install cvs to use ssh?
    4. +
    +

    A. Appendix

      *************** *** 349,352 **** --- 355,416 ---- can be found in the Appendix of this FAQ.

      + +

      4. Windows

      + +

      4.1.:

      + +

      Q: How to install ssh?

      + +

      A:

      + Download the following file and unzip it to C:\BIN: + +
      + ftp://ftp.cs.hut.fi/pub/ssh/contrib/ssh-1.2.14-win32bin.zip
      + Create a home directory (e.g. C:\HOME\SF_USERNAME) and + C:\ETC and place a passwd file in C:\ETC: + +
      + mkdir C:\HOME
      + mkdir C:\HOME\SF_USERNAME
      + mkdir C:\ETC
      + echo sf_username:x:1:10:Name, + Real:/home/sf_username:/windows/command.com > + C:\ETC\passwd
      + Add the following entries to your environment. This can be automated e.g. by + putting them into AUTOEXEC.BAT on Win9x. + +
      + SET PATH=%PATH%;C:\BIN
      + SET HOME=\HOME\SF_USERNAME
      + SET HOMEPATH=\HOME\SF_USERNAME
      + SET HOMEDRIVE=C:
      + SET USERNAME=sf_username
      + After the environment is updated you should be able to use ssh. Try this: + +
      + ssh -l sf_username shell.sourceforge.net
      + +

      4.2.:

      + +

      Q: How to install cvs to use ssh?

      + +

      A:

      + Download the following file and unzip it to C:\BIN: + +
      + ftp://download.cyclic.com/pub/cvs-1.10/windows/cvs-1.10-win.zip
      + Add the following entries to your environment. This can be automated e.g. by + putting them into AUTOEXEC.BAT on Win9x. + +
      + SET CVS_RSH=ssh
      + SET + CVSROOT=:ext:sf_username@cvs.python.sourceforge.net:/cvsroot/python
      + After the environment is updated you should be able to use cvs/ssh: Try this: + +
      + cvs co python

      A. Appendix

      From python-dev@python.org Wed Jul 19 05:19:57 2000 From: python-dev@python.org (Barry Warsaw) Date: Tue, 18 Jul 2000 21:19:57 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.2,1.3 Message-ID: <200007190419.VAA10225@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv10215 Modified Files: pep-0201.txt Log Message: In the examples section, show how zip() is reversible. Patches to the reference implementation: __getitem__() raises IndexError immediately if no sequences were given. __len__() returns 0 if no sequences were given. __cmp__() new method Added a little more explanation to raise-a-TypeError-for-zip(a) Added `fold' as one of the alternative names proposed. Index: pep-0201.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pep-0201.txt 2000/07/17 18:49:21 1.2 --- pep-0201.txt 2000/07/19 04:19:54 1.3 *************** *** 173,177 **** --- 173,197 ---- [(1, 5, 9, 12), (2, 6, 10, 13), (3, 7, 11, None), (4, 8, None, None)] + Note that when the sequences are of the same length, zip() is + reversible: + >>> a = (1, 2, 3) + >>> b = (4, 5, 6) + >>> x = zip(a, b) + >>> y = zip(*x) # alternatively, apply(zip, x) + >>> z = zip(*y) # alternatively, apply(zip, y) + >>> x + [(1, 4), (2, 5), (3, 6)] + >>> y + [(1, 2, 3), (4, 5, 6)] + >>> z + [(1, 4), (2, 5), (3, 6)] + >>> x == z + 1 + + It is not possible to reverse zip this way when the sequences are + not all the same length. + + Reference Implementation *************** *** 196,199 **** --- 216,221 ---- def __getitem__(self, i): + if not self.__sequences: + raise IndexError ret = [] exhausted = 0 *************** *** 219,222 **** --- 241,246 ---- if shortest < 0 or slen < shortest: shortest = slen + if shortest < 0: + return 0 return shortest longest = 0 *************** *** 227,230 **** --- 251,278 ---- return longest + def __cmp__(self, other): + i = 0 + smore = 1 + omore = 1 + while 1: + try: + si = self[i] + except IndexError: + smore = 0 + try: + oi = other[i] + except IndexError: + omore = 0 + if not smore and not omore: + return 0 + elif not smore: + return -1 + elif not omore: + return 1 + test = cmp(si, oi) + if test: + return test + i = i + 1 + def __str__(self): ret = [] *************** *** 336,340 **** 3) Raises TypeError ! Pros: None Cons: needless restriction --- 384,389 ---- 3) Raises TypeError ! Pros: zip(a) doesn't make much sense and could be confusing ! to explain. Cons: needless restriction *************** *** 346,352 **** (but are not limited to!): marry, weave, parallel, lace, braid, interlace, permute, furl, tuples, lists, stitch, collate, knit, ! plait, and with. All have disadvantages, and there is no clear ! unanimous choice, therefore the decision was made to go with ! `zip' because the same functionality is available in other languages (e.g. Haskell) under the name `zip'[2]. --- 395,401 ---- (but are not limited to!): marry, weave, parallel, lace, braid, interlace, permute, furl, tuples, lists, stitch, collate, knit, ! plait, fold, and with. All have disadvantages, and there is no ! clear unanimous choice, therefore the decision was made to go ! with `zip' because the same functionality is available in other languages (e.g. Haskell) under the name `zip'[2]. From python-dev@python.org Wed Jul 19 10:46:17 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Wed, 19 Jul 2000 02:46:17 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html sf-faq.html,1.5,1.6 Message-ID: <200007190946.CAA06006@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv5970 Modified Files: sf-faq.html Log Message: added Macintosh section. sad thing. Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** sf-faq.html 2000/07/18 21:43:23 1.5 --- sf-faq.html 2000/07/19 09:46:13 1.6 *************** *** 48,51 **** --- 48,56 ----
    +

    5. Macintosh

    +
      +
    1. How to use cvs over ssh?
    2. +
    +

    A. Appendix

      *************** *** 413,416 **** --- 418,432 ----
      cvs co python
      + +

      5. Macintosh

      + +

      5.1.:

      + +

      Q: How to use cvs over ssh?

      + +

      A:

      + As far as we know it is currently quite impossible to use cvs over ssh.
      + Any reports of getting it to work and/or pointers to more info would be + appreciated!

      A. Appendix

      From python-dev@python.org Wed Jul 19 15:34:17 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 19 Jul 2000 07:34:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.154,2.155 Message-ID: <200007191434.HAA10030@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv9966 Modified Files: posixmodule.c Log Message: new method isatty from Thomas Wouters Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.154 retrieving revision 2.155 diff -C2 -r2.154 -r2.155 *** posixmodule.c 2000/07/16 12:04:31 2.154 --- posixmodule.c 2000/07/19 14:34:14 2.155 *************** *** 3245,3249 **** --- 3245,3264 ---- } + static char posix_isatty__doc__[] = + "isatty(fd) -> Boolean\n\ + Return true if the file descriptor 'fd' is an open file descriptor\n\ + connected to a terminal."; + static PyObject * + posix_isatty(self, args) + PyObject *self; + PyObject *args; + { + int fd; + if (!PyArg_ParseTuple(args, "i:isatty", &fd)) + return NULL; + return Py_BuildValue("i", isatty(fd)); + } + #ifdef HAVE_PIPE static char posix_pipe__doc__[] = *************** *** 5039,5042 **** --- 5054,5058 ---- {"fstat", posix_fstat, METH_VARARGS, posix_fstat__doc__}, {"fdopen", posix_fdopen, METH_VARARGS, posix_fdopen__doc__}, + {"isatty", posix_isatty, METH_VARARGS, posix_isatty__doc__}, #ifdef HAVE_PIPE {"pipe", posix_pipe, METH_VARARGS, posix_pipe__doc__}, From python-dev@python.org Wed Jul 19 15:45:42 2000 From: python-dev@python.org (Thomas Wouters) Date: Wed, 19 Jul 2000 07:45:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.155,2.156 Message-ID: <200007191445.HAA12805@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv12710/Modules Modified Files: posixmodule.c Log Message: ANSIfy the just-checked-in isatty() wrapper. Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.155 retrieving revision 2.156 diff -C2 -r2.155 -r2.156 *** posixmodule.c 2000/07/19 14:34:14 2.155 --- posixmodule.c 2000/07/19 14:45:40 2.156 *************** *** 3251,3257 **** static PyObject * ! posix_isatty(self, args) ! PyObject *self; ! PyObject *args; { int fd; --- 3251,3255 ---- static PyObject * ! posix_isatty(PyObject *self, PyObject *args) { int fd; From python-dev@python.org Wed Jul 19 15:51:57 2000 From: python-dev@python.org (Thomas Wouters) Date: Wed, 19 Jul 2000 07:51:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_openpty.py,1.1,1.2 test_pty.py,1.2,1.3 Message-ID: <200007191451.HAA13863@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv13627/Lib/test Modified Files: test_openpty.py test_pty.py Log Message: Enable extra testing now that os.isatty() is in. (Also tests os.isatty ;P) Index: test_openpty.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_openpty.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_openpty.py 2000/07/01 01:13:31 1.1 --- test_openpty.py 2000/07/19 14:51:54 1.2 *************** *** 13,21 **** raise ImportError, "No openpty() available." ! ## # Please uncomment these if os.isatty() is added. ! ## if not os.isatty(master): ! ## raise TestFailed, "Master-end of pty is not a terminal." ! ## if not os.isatty(slave): ! ## raise TestFailed, "Slave-end of pty is not a terminal." os.write(slave, 'Ping!') --- 13,20 ---- raise ImportError, "No openpty() available." ! if not os.isatty(master): ! raise TestFailed, "Master-end of pty is not a terminal." ! if not os.isatty(slave): ! raise TestFailed, "Slave-end of pty is not a terminal." os.write(slave, 'Ping!') Index: test_pty.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_pty.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** test_pty.py 2000/07/16 12:04:31 1.2 --- test_pty.py 2000/07/19 14:51:54 1.3 *************** *** 28,36 **** raise ImportError, "Pseudo-terminals (seemingly) not functional." ! ## # Please uncomment these if os.isatty() is added. ! ## if not os.isatty(master_fd): ! ## raise TestFailed, "master_fd is not a tty" ! ## if not os.isatty(slave_fd): ! ## raise TestFailed, "slave_fd is not a tty" debug("Writing to slave_fd") --- 28,35 ---- raise ImportError, "Pseudo-terminals (seemingly) not functional." ! if not os.isatty(master_fd): ! raise TestFailed, "master_fd is not a tty" ! if not os.isatty(slave_fd): ! raise TestFailed, "slave_fd is not a tty" debug("Writing to slave_fd") From python-dev@python.org Wed Jul 19 17:54:56 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 19 Jul 2000 09:54:56 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules readline.c,2.21,2.22 Message-ID: <200007191654.JAA09432@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv9408 Modified Files: readline.c Log Message: added history file truncation based upon code from Johannes Zellner. Index: readline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** readline.c 2000/07/10 09:53:12 2.21 --- readline.c 2000/07/19 16:54:53 2.22 *************** *** 106,109 **** --- 106,110 ---- } + static int history_length = -1; /* do not truncate history by default */ static char doc_read_history_file[] = "\ read_history_file([filename]) -> None\n\ *************** *** 122,125 **** --- 123,128 ---- return NULL; errno = write_history(s); + if (!errno && history_length >= 0) + history_truncate_file(s, history_length); if (errno) return PyErr_SetFromErrno(PyExc_IOError); *************** *** 135,138 **** --- 138,178 ---- + static char set_history_length_doc[] = "\ + set_history_length(length) -> None\n\ + set the maximal number of items which will be written to\n\ + the history file. A negative length is used to inhibit\n\ + history truncation.\n\ + "; + + static PyObject* + set_history_length(PyObject *self, PyObject *args) + { + int length = history_length; + PyObject* ob; + if (!PyArg_ParseTuple(args, "i:set_history_length", &length)) + return NULL; + history_length = length; + Py_INCREF(Py_None); + return Py_None; + } + + + + static char get_history_length_doc[] = "\ + get_history_length() -> int\n\ + return the current history length value.\n\ + "; + + static PyObject* + get_history_length(PyObject *self, PyObject *args) + { + PyObject* ob; + if (!PyArg_ParseTuple(args, ":get_history_length")) + return NULL; + return Py_BuildValue("i", history_length); + } + + + /* Exported function to specify a word completer in Python */ *************** *** 290,293 **** --- 330,335 ---- {"read_history_file", read_history_file, 1, doc_read_history_file}, {"write_history_file", write_history_file, 1, doc_write_history_file}, + {"set_history_length", set_history_length, 1, set_history_length_doc}, + {"get_history_length", get_history_length, 1, get_history_length_doc}, {"set_completer", set_completer, 1, doc_set_completer}, {"get_begidx", get_begidx, 0, doc_get_begidx}, From python-dev@python.org Wed Jul 19 17:56:28 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 19 Jul 2000 09:56:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libreadline.tex,1.2,1.3 Message-ID: <200007191656.JAA09545@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9535 Modified Files: libreadline.tex Log Message: added documentation for new functions {get,set}_history_length Index: libreadline.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libreadline.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libreadline.tex 2000/07/06 04:51:04 1.2 --- libreadline.tex 2000/07/19 16:56:26 1.3 *************** *** 43,46 **** --- 43,57 ---- \end{funcdesc} + \begin{funcdesc}{get_history_length}{} + Return the desired length of the history file. Negative values imply + unlimited history file size. + \end{funcdesc} + + \begin{funcdesc}{set_history_length}{length} + Set the number of lines to save in the history file. + \func{write_history_file} uses this value to truncate the history file when + saving. Negative values imply unlimited history file size. + \end{funcdesc} + \begin{funcdesc}{set_completer}{\optional{function}} Set or remove the completer function. The completer function is From python-dev@python.org Wed Jul 19 18:09:55 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 19 Jul 2000 10:09:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib posixpath.py,1.33,1.34 Message-ID: <200007191709.KAA17265@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv17257 Modified Files: posixpath.py Log Message: added rewritten normpath from Moshe Zadka that does the right thing with paths containing .. Index: posixpath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/posixpath.py,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -r1.33 -r1.34 *** posixpath.py 2000/07/16 16:52:45 1.33 --- posixpath.py 2000/07/19 17:09:51 1.34 *************** *** 347,374 **** def normpath(path): """Normalize path, eliminating double slashes, etc.""" import string ! # Treat initial slashes specially ! slashes = '' ! while path[:1] == '/': ! slashes = slashes + '/' ! path = path[1:] ! comps = string.splitfields(path, '/') ! i = 0 ! while i < len(comps): ! if comps[i] == '.': ! del comps[i] ! while i < len(comps) and comps[i] == '': ! del comps[i] ! elif comps[i] == '..' and i > 0 and comps[i-1] not in ('', '..'): ! del comps[i-1:i+1] ! i = i-1 ! elif comps[i] == '' and i > 0 and comps[i-1] <> '': ! del comps[i] ! else: ! i = i+1 ! # If the path is now empty, substitute '.' ! if not comps and not slashes: ! comps.append('.') ! return slashes + string.joinfields(comps, '/') --- 347,369 ---- def normpath(path): """Normalize path, eliminating double slashes, etc.""" + if path == '': + return '.' import string ! initial_slash = (path[0] == '/') ! comps = string.split(path, '/') ! new_comps = [] ! for comp in comps: ! if comp in ('', '.'): ! continue ! if (comp != '..' or (not initial_slash and not new_comps) or ! (new_comps and new_comps[-1] == '..')): ! new_comps.append(comp) ! elif new_comps: ! new_comps.pop() ! comps = new_comps ! path = string.join(comps, '/') ! if initial_slash: ! path = '/' + path ! return path or '.' From python-dev@python.org Wed Jul 19 18:14:51 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 19 Jul 2000 10:14:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_support.py,1.5,1.6 Message-ID: <200007191714.KAA17574@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv17566 Modified Files: test_support.py Log Message: make TestFailed a class exception Index: test_support.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_support.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_support.py 1998/06/09 19:20:12 1.5 --- test_support.py 2000/07/19 17:14:48 1.6 *************** *** 1,5 **** # Python test set -- supporting definitions. ! TestFailed = 'test_support -- test failed' # Exception verbose = 1 # Flag set to 0 by regrtest.py --- 1,6 ---- # Python test set -- supporting definitions. ! class TestFailed(Exception): ! pass verbose = 1 # Flag set to 0 by regrtest.py From python-dev@python.org Wed Jul 19 18:19:51 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 19 Jul 2000 10:19:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test README,1.1,1.2 Message-ID: <200007191719.KAA17827@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv17819 Modified Files: README Log Message: restructured a bit and added some more content... Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** README 2000/06/30 06:08:35 1.1 --- README 2000/07/19 17:19:49 1.2 *************** *** 1,40 **** ! Writing Python Test Cases ! ------------------------- Skip Montanaro If you add a new module to Python or modify the functionality of an existing ! module, it is your responsibility to write one or more test cases to test ! that new functionality. The mechanics of the test system are fairly ! straightforward. If you are writing test cases for module zyzzyx, you need ! to create a file in .../Lib/test named test_zyzzyx.py and an expected output ! file in .../Lib/test/output named test_zyzzyx ("..." represents the ! top-level directory in the Python source tree, the directory containing the ! configure script). Generate the initial version of the test output file by ! executing: ! cd .../Lib/test ! python regrtest.py -g test_zyzzyx.py ! Any time you modify test_zyzzyx.py you need to generate a new expected output file. Don't forget to desk check the generated output to make sure it's really what you expected to find! To run a single test after modifying a module, simply run regrtest.py without the -g flag: ! cd .../Lib/test ! python regrtest.py test_zyzzyx.py To run the entire test suite, make the "test" target at the top level: - cd ... make test - Test cases generate output based upon computed values and branches taken in - the code. When executed, regrtest.py compares the actual output generated - by executing the test case with the expected output and reports success or - failure. It stands to reason that if the actual and expected outputs are to - match, they must not contain any machine dependencies. This means - your test cases should not print out absolute machine addresses or floating - point numbers with large numbers of significant digits. Writing good test cases is a skilled task and is too complex to discuss in detail in this short document. Many books have been written on the subject. --- 1,73 ---- ! Writing Python Regression Tests ! ------------------------------- Skip Montanaro + (skip@mojam.com) + + Introduction + If you add a new module to Python or modify the functionality of an existing ! module, you should write one or more test cases to exercise that new ! functionality. The mechanics of how the test system operates are fairly ! straightforward. When a test case is run, the output is compared with the ! expected output that is stored in .../Lib/test/output. If the test runs to ! completion and the actual and expected outputs match, the test succeeds, if ! not, it fails. If an ImportError is raised, the test is not run. ! ! You will be writing unit tests (isolated tests of functions and objects ! defined by the module) using white box techniques. Unlike black box ! testing, where you only have the external interfaces to guide your test case ! writing, in white box testing you can see the code being tested and tailor ! your test cases to exercise it more completely. In particular, you will be ! able to refer to the C and Python code in the CVS repository when writing ! your regression test cases. ! ! ! Executing Test Cases ! ! If you are writing test cases for module spam, you need to create a file ! in .../Lib/test named test_spam.py and an expected output file in ! .../Lib/test/output named test_spam ("..." represents the top-level ! directory in the Python source tree, the directory containing the configure ! script). From the top-level directory, generate the initial version of the ! test output file by executing: ! ./python Lib/test/regrtest.py -g test_spam.py ! Any time you modify test_spam.py you need to generate a new expected output file. Don't forget to desk check the generated output to make sure it's really what you expected to find! To run a single test after modifying a module, simply run regrtest.py without the -g flag: + + ./python Lib/test/regrtest.py test_spam.py + + While debugging a regression test, you can of course execute it + independently of the regression testing framework and see what it prints: ! ./python Lib/test/test_spam.py To run the entire test suite, make the "test" target at the top level: make test + + On non-Unix platforms where make may not be available, you can simply + execute the two runs of regrtest (optimized and non-optimized) directly: + + ./python Lib/test/regrtest.py + ./python -O Lib/test/regrtest.py + + + Test cases generate output based upon values computed by the test code. + When executed, regrtest.py compares the actual output generated by executing + the test case with the expected output and reports success or failure. It + stands to reason that if the actual and expected outputs are to match, they + must not contain any machine dependencies. This means your test cases + should not print out absolute machine addresses (e.g. the return value of + the id() builtin function) or floating point numbers with large numbers of + significant digits (unless you understand what you are doing!). + Test Case Writing Tips + Writing good test cases is a skilled task and is too complex to discuss in detail in this short document. Many books have been written on the subject. *************** *** 47,77 **** or find it used (around $20), I strongly urge you to pick up a copy. - As an author of at least part of a module, you will be writing unit tests - (isolated tests of functions and objects defined by the module) using white - box techniques. (Unlike black box testing, where you only have the external - interfaces to guide your test case writing, in white box testing you can see - the code being tested and tailor your test cases to exercise it more - completely). - The most important goal when writing test cases is to break things. A test ! case that doesn't uncover a bug is less valuable than one that does. In ! designing test cases you should pay attention to the following: ! 1. Your test cases should exercise all the functions and objects defined ! in the module, not just the ones meant to be called by users of your ! module. This may require you to write test code that uses the module ! in ways you don't expect (explicitly calling internal functions, for ! example - see test_atexit.py). ! ! 2. You should consider any boundary values that may tickle exceptional ! conditions (e.g. if you were testing a division module you might well ! want to generate tests with numerators and denominators at the limits ! of floating point and integer numbers on the machine performing the ! tests as well as a denominator of zero). ! ! 3. You should exercise as many paths through the code as possible. This ! may not always be possible, but is a goal to strive for. In ! particular, when considering if statements (or their equivalent), you ! want to create test cases that exercise both the true and false ! branches. For while and for statements, you should create test cases ! that exercise the loop zero, one and multiple times. --- 80,166 ---- or find it used (around $20), I strongly urge you to pick up a copy. The most important goal when writing test cases is to break things. A test ! case that doesn't uncover a bug is much less valuable than one that does. ! In designing test cases you should pay attention to the following: ! ! * Your test cases should exercise all the functions and objects defined ! in the module, not just the ones meant to be called by users of your ! module. This may require you to write test code that uses the module ! in ways you don't expect (explicitly calling internal functions, for ! example - see test_atexit.py). ! ! * You should consider any boundary values that may tickle exceptional ! conditions (e.g. if you were writing regression tests for division, ! you might well want to generate tests with numerators and denominators ! at the limits of floating point and integer numbers on the machine ! performing the tests as well as a denominator of zero). ! ! * You should exercise as many paths through the code as possible. This ! may not always be possible, but is a goal to strive for. In ! particular, when considering if statements (or their equivalent), you ! want to create test cases that exercise both the true and false ! branches. For loops, you should create test cases that exercise the ! loop zero, one and multiple times. ! ! * You should test with obviously invalid input. If you know that a ! function requires an integer input, try calling it with other types of ! objects to see how it responds. ! ! * You should test with obviously out-of-range input. If the domain of a ! function is only defined for positive integers, try calling it with a ! negative integer. ! ! * If you are going to fix a bug that wasn't uncovered by an existing ! test, try to write a test case that exposes the bug (preferably before ! fixing it). ! ! ! Regression Test Writing Rules ! ! Each test case is different. There is no "standard" form for a Python ! regression test case, though there are some general rules: ! ! * If your test case detects a failure, raise TestFailed (found in ! test_support). ! ! * Import everything you'll need as early as possible. ! ! * If you'll be importing objects from a module that is at least ! partially platform-dependent, only import those objects you need for ! the current test case to avoid spurious ImportError exceptions that ! prevent the test from running to completion. ! ! * Print all your test case results using the print statement. For ! non-fatal errors, print an error message (or omit a successful ! completion print) to indicate the failure, but proceed instead of ! raising TestFailed. ! ! ! Miscellaneous ! ! There is a test_support module you can import from your test case. It ! provides the following useful objects: ! ! * TestFailed - raise this exception when your regression test detects a ! failure. ! ! * findfile(file) - you can call this function to locate a file somewhere ! along sys.path or in the Lib/test tree - see test_linuxaudiodev.py for ! an example of its use. ! ! * verbose - you can use this variable to control print output. Many ! modules use it. Search for "verbose" in the test_*.py files to see ! lots of examples. ! ! * fcmp(x,y) - you can call this function to compare two floating point ! numbers when you expect them to only be approximately equal withing a ! fuzz factor (test_support.FUZZ, which defaults to 1e-6). ! ! Python and C statement coverage results are currently available at ! ! http://www.musi-cal.com/~skip/python/Python/dist/src/ ! As of this writing (July, 2000) these results are being generated nightly. ! You can refer to the summaries and the test coverage output files to see ! where coverage is adequate or lacking and write test cases to beef up the ! coverage. From python-dev@python.org Wed Jul 19 18:31:01 2000 From: python-dev@python.org (Skip Montanaro) Date: Wed, 19 Jul 2000 10:31:01 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libos.tex,1.44,1.45 Message-ID: <200007191731.KAA18467@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv18452 Modified Files: libos.tex Log Message: added doc for isatty() Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -r1.44 -r1.45 *** libos.tex 2000/07/16 19:01:09 1.44 --- libos.tex 2000/07/19 17:30:58 1.45 *************** *** 361,364 **** --- 361,370 ---- \end{funcdesc} + \begin{funcdesc}{isatty}{fd} + Return \code{1} if the file descriptor \var{fd} is open and connected to a + tty(-like) device, else \code{0}. + Availability: \UNIX{} + \end{funcdesc} + \begin{funcdesc}{lseek}{fd, pos, how} Set the current position of file descriptor \var{fd} to position From python-dev@python.org Thu Jul 20 16:15:07 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Thu, 20 Jul 2000 08:15:07 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html sf-faq.html,1.6,1.7 Message-ID: <200007201515.IAA23158@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv23113 Modified Files: sf-faq.html Log Message: added entry about reverting of changes Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** sf-faq.html 2000/07/19 09:46:13 1.6 --- sf-faq.html 2000/07/20 15:15:04 1.7 *************** *** 33,36 **** --- 33,37 ----
    1. Where can I learn more about CVS?
    2. How can I remove a directory from the CVS tree?
    3. +
    4. How to revert changes?
    *************** *** 304,307 **** --- 305,324 ---- cd ..
    cvs update -P + +

    2.6.:

    + +

    Q: How to revert changes?

    + +

    A:

    + The fast (and history-friendly) method for backing out a CVS commit is the use + of the join flag of the update command. You supply the last + version you committed (and probably messed up) with the first and the version + you want to back out to with the second flag. Example given: + +
    + cvs update -j 1.17 -j 1.16 ceval.c cvs update cvs + commit ceval.c
    + This example would create and apply a reverse patch from revision 1.17 to + revision 1.16 of ceval.c.

    3. Patches

    From python-dev@python.org Thu Jul 20 16:17:37 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Thu, 20 Jul 2000 08:17:37 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html sf-faq.html,1.7,1.8 Message-ID: <200007201517.IAA23309@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv23284 Modified Files: sf-faq.html Log Message: forgot some line breaks :-/ Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** sf-faq.html 2000/07/20 15:15:04 1.7 --- sf-faq.html 2000/07/20 15:17:34 1.8 *************** *** 317,322 ****
    ! cvs update -j 1.17 -j 1.16 ceval.c cvs update cvs ! commit ceval.c
    This example would create and apply a reverse patch from revision 1.17 to revision 1.16 of ceval.c. --- 317,324 ----
    ! cvs update -j 1.17 -j 1.16 ceval.c
    ! cvs update
    ! cvs commit ceval.c
    ! This example would create and apply a reverse patch from revision 1.17 to revision 1.16 of ceval.c. From python-dev@python.org Thu Jul 20 23:29:27 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Thu, 20 Jul 2000 15:29:27 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep2html.py,NONE,1.1 Message-ID: <200007202229.PAA15860@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv15791 Added Files: pep2html.py Log Message: converts pep-*.txt to pep-*.html and loads them up with the help of scp it would be nice if you could call it after committing changes on a pep Syntax: python pep2html [sf_username] --- NEW FILE --- #!/usr/bin/env python """ convert PEP's to (X)HTML - courtesy of /F Syntax: pep2html [sf_username] The user name 'sf_username' is used to upload the converted files to the web pages at source forge. """ import cgi, glob, os, re, sys fixpat = re.compile("((http|ftp):[-_a-zA-Z0-9/.+?~:#$]+)|(pep-\d+(.txt)?)|.") def fixanchor(match): text = match.group(0) link = None if text[:5] == "http:" or text[:4] == "ftp:": link = text elif text[:3] == "pep": link = os.path.splitext(text)[0] + ".html" if link: return "%s" % (link, cgi.escape(link)) return cgi.escape(match.group(0)) def fixfile(infile, outfile): # convert plain text pep to minimal XHTML markup fi = open(infile) fo = open(outfile, "w") fo.write("\n") # head header = [] fo.write("\n") while 1: line = fi.readline() if not line or ":" not in line: break key, value = line.split(":", 1) value = value.strip() header.append((key, value)) if key.lower() == "title": fo.write("%s\n" % cgi.escape(value)) fo.write("\n") # body fo.write("\n") fo.write("
    \n")
        for k, v in header:
            fo.write("%s: %s\n" % (cgi.escape(k), cgi.escape(v)))
        title = 0
        while 1:
            line = fi.readline()
            if not line:
                break
            if line[:1] == "\f":
                fo.write("
    \n") title = 1 else: line = fixpat.sub(fixanchor, line) if title: fo.write("

    %s

    \n" % line) else: fo.write(line) title = 0 fo.write("
    \n") fo.write("\n") fo.write("\n") for file in glob.glob("pep-*.txt"): print file, "..." fixfile(file, os.path.splitext(file)[0] + ".html") if len(sys.argv) == 1: username = "" elif len(sys.argv) == 2: username = sys.argv[1]+"@" else: raise "Syntax: "+sys.argv[0]+" [sf_username]" os.system("scp pep-*.html "+username+"shell.sourceforge.net:/home/groups/python/htdocs/peps") From python-dev@python.org Thu Jul 20 23:30:07 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Thu, 20 Jul 2000 15:30:07 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html index.html,1.1,1.2 Message-ID: <200007202230.PAA15925@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv15885 Modified Files: index.html Log Message: added link to PEPs Index: index.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/index.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** index.html 2000/07/14 09:00:06 1.1 --- index.html 2000/07/20 22:30:04 1.2 *************** *** 69,72 **** --- 69,90 ---- + +

    PYTHON ENHANCEMENT PROPOSALS

    + + + + + + + +

    This is the definitive collection of proposed + enhancements for Python. These include:

    +
      +
    • List Comprehension
    • +
    • Augmented Assignment
    • +
    • 2.0 Batteries Included
    • +
    +
    From python-dev@python.org Thu Jul 20 23:44:38 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Thu, 20 Jul 2000 15:44:38 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep2html.py,1.1,1.2 Message-ID: <200007202244.PAA17191@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv17109 Modified Files: pep2html.py Log Message: incorporating changes from /F not including pep-0000.txt -> index.html (a symbolic link does just fine) Index: pep2html.py =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep2html.py 2000/07/20 22:29:24 1.1 --- pep2html.py 2000/07/20 22:44:36 1.2 *************** *** 11,16 **** import cgi, glob, os, re, sys ! fixpat = re.compile("((http|ftp):[-_a-zA-Z0-9/.+?~:#$]+)|(pep-\d+(.txt)?)|.") def fixanchor(match): text = match.group(0) --- 11,22 ---- import cgi, glob, os, re, sys ! # this doesn't validate -- you cannot use
    and

    inside
    ! # tags.  but if I change that, the result doesn't look very nice...
      
    + DTD = ('')
    + 
    + fixpat = re.compile("((http|ftp):[-_a-zA-Z0-9/.+~:?#$=&]+)|(pep-\d+(.txt)?)|.")
    + 
      def fixanchor(match):
          text = match.group(0)
    ***************
    *** 22,26 ****
          if link:
              return "%s" % (link, cgi.escape(link))
    !     return cgi.escape(match.group(0))
      
      def fixfile(infile, outfile):
    --- 28,32 ----
          if link:
              return "%s" % (link, cgi.escape(link))
    !     return cgi.escape(match.group(0)) # really slow, but it works...
      
      def fixfile(infile, outfile):
    ***************
    *** 28,35 ****
          fi = open(infile)
          fo = open(outfile, "w")
    !     fo.write("\n")
          # head
          header = []
          fo.write("\n")
          while 1:
              line = fi.readline()
    --- 34,43 ----
          fi = open(infile)
          fo = open(outfile, "w")
    !     fo.write("%s\n\n" % DTD)
          # head
          header = []
          fo.write("\n")
    +     pep = ""
    +     title = ""
          while 1:
              line = fi.readline()
    ***************
    *** 40,48 ****
              header.append((key, value))
              if key.lower() == "title":
    !             fo.write("%s\n" % cgi.escape(value))
          fo.write("\n")
          # body
          fo.write("\n")
          fo.write("
    \n")
          for k, v in header:
              fo.write("%s: %s\n" % (cgi.escape(k), cgi.escape(v)))
    --- 48,67 ----
              header.append((key, value))
              if key.lower() == "title":
    !             title = value
    !         if key.lower() == "pep":
    !             pep = value
    !     if pep:
    !         title = "PEP " + pep + " -- " + title
    !     if title:
    !         fo.write("%s\n" % cgi.escape(title))
          fo.write("\n")
          # body
          fo.write("\n")
          fo.write("
    \n")
    +     fo.write("[home]")
    +     if os.path.basename(file) != "pep-0000.txt":
    +         fo.write(" [index]")
    +     fo.write("\n
    \n") + # fo.write("\n

    \n")
          for k, v in header:
              fo.write("%s: %s\n" % (cgi.escape(k), cgi.escape(v)))
    ***************
    *** 53,65 ****
                  break
              if line[:1] == "\f":
    !             fo.write("
    \n") title = 1 ! else: line = fixpat.sub(fixanchor, line) if title: ! fo.write("

    %s

    \n" % line) else: fo.write(line) - title = 0 fo.write("
    \n") fo.write("\n") --- 72,89 ---- break if line[:1] == "\f": ! fo.write("\n
    \n") ! # fo.write("\n

    \n")
                  title = 1
    !         elif title >= 0:
                  line = fixpat.sub(fixanchor, line)
                  if title:
    !                 if line.strip() == "Local Variables:":
    !                     title = -1
    !                 else:
    !                     fo.write("

    %s

    \n" % line) ! # fo.write("

    %s

    \n" % line)
    !                     title = 0
                  else:
                      fo.write(line)
          fo.write("
    \n") fo.write("\n") From python-dev@python.org Fri Jul 21 06:20:01 2000 From: python-dev@python.org (Thomas Wouters) Date: Thu, 20 Jul 2000 22:20:01 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib ConfigParser.py,1.20,1.21 Message-ID: <200007210520.WAA30775@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv30737/Lib Modified Files: ConfigParser.py Log Message: Small fixes by Petru Paler (patch #100946) checked in with esr's approval. Index: ConfigParser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ConfigParser.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** ConfigParser.py 2000/07/14 14:28:22 1.20 --- ConfigParser.py 2000/07/21 05:19:59 1.21 *************** *** 338,342 **** fp.write("\n") ! def remove_option(section, option): """Remove an option.""" if not section or section == "DEFAULT": --- 338,342 ---- fp.write("\n") ! def remove_option(self, section, option): """Remove an option.""" if not section or section == "DEFAULT": *************** *** 352,356 **** return existed ! def remove_section(section): """Remove a file section.""" if self.__sections.has_key(section): --- 352,356 ---- return existed ! def remove_section(self, section): """Remove a file section.""" if self.__sections.has_key(section): From python-dev@python.org Fri Jul 21 07:00:20 2000 From: python-dev@python.org (Thomas Wouters) Date: Thu, 20 Jul 2000 23:00:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _codecsmodule.c,2.3,2.4 _cursesmodule.c,2.31,2.32 _localemodule.c,2.12,2.13 _sre.c,2.26,2.27 _tkinter.c,1.107,1.108 almodule.c,1.29,1.30 arraymodule.c,2.48,2.49 audioop.c,1.39,1.40 binascii.c,2.21,2.22 cdmodule.c,1.22,1.23 clmodule.c,2.22,2.23 cmathmodule.c,2.15,2.16 cryptmodule.c,2.7,2.8 dlmodule.c,2.10,2.11 errnomodule.c,2.12,2.13 fcntlmodule.c,2.22,2.23 flmodule.c,1.42,1.43 fmmodule.c,1.15,1.16 getbuildinfo.c,2.5,2.6 getpath.c,1.27,1.28 glmodule.c,2.7,2.8 grpmodule.c,2.12,2.13 imageop.c,2.23,2.24 imgfile.c,1.26,1.27 linuxaudiodev.c,2.4,2.5 mathmodule.c,2.50,2.51 md5module.c,2.19,2.20 mpzmodule.c,2.30,2.31 newmodule.c,2.24,2.25 nismodule.c,2.18,2.19 operator.c,2.15,2.16 pcremodule.c,2.22,2.23 posixmodule.c,2.156,2.157 pwdmodule.c,1.20,1.21 readline.c,2.22,2.23 regexmodule.c,1.38,1.39 regexpr.c,1.32,1.33 resource.c,2.14,2.15 rgbimgmodule.c,2.21,2.22 rotormodule.c,2.27,2.28 selectmodule.c,2.38,2.39 sgimodule.c,1.14,1.15 shamodule.c,2.7,2! .8 signalmodule.c,2.46,2.47 socketmodule.c,1.117,1.118 soundex.c,2.7,2.8 stropmodule.c,2.69,2.70 structmodule.c,2.35,2.36 sunaudiodev.c,1.21,1.22 svmodule.c,2.15,2.16 syslogmodule.c,2.15,2.16 tclNotify.c,2.2,2.3 termios.c,2.12,2.13 threadmodule.c,2.34,2.35 timemodule.c,2.91,2.92 timingmodule.c,2.6,2.7 unicodedata.c,2.2,2.3 xxmodule.c,2.19,2.20 zlibmodule.c,2.33,2.34 Message-ID: <200007210600.XAA01507@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv496 Modified Files: _codecsmodule.c _cursesmodule.c _localemodule.c _sre.c _tkinter.c almodule.c arraymodule.c audioop.c binascii.c cdmodule.c clmodule.c cmathmodule.c cryptmodule.c dlmodule.c errnomodule.c fcntlmodule.c flmodule.c fmmodule.c getbuildinfo.c getpath.c glmodule.c grpmodule.c imageop.c imgfile.c linuxaudiodev.c mathmodule.c md5module.c mpzmodule.c newmodule.c nismodule.c operator.c pcremodule.c posixmodule.c pwdmodule.c readline.c regexmodule.c regexpr.c resource.c rgbimgmodule.c rotormodule.c selectmodule.c sgimodule.c shamodule.c signalmodule.c socketmodule.c soundex.c stropmodule.c structmodule.c sunaudiodev.c svmodule.c syslogmodule.c tclNotify.c termios.c threadmodule.c timemodule.c timingmodule.c unicodedata.c xxmodule.c zlibmodule.c Log Message: Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)', and a couple of functions that were missed in the previous batches. Not terribly tested, but very carefully scrutinized, three times. All these were found by the little findkrc.py that I posted to python-dev, which means there might be more lurking. Cases such as this: long func(a, b) long a; long b; /* flagword */ { and other cases where the last ; in the argument list isn't followed by a newline and an opening curly bracket. Regexps to catch all are welcome, of course ;) Index: _codecsmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_codecsmodule.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** _codecsmodule.c 2000/07/05 11:24:13 2.3 --- _codecsmodule.c 2000/07/21 06:00:06 2.4 *************** *** 625,629 **** DL_EXPORT(void) ! init_codecs() { Py_InitModule("_codecs", _codecs_functions); --- 625,629 ---- DL_EXPORT(void) ! init_codecs(void) { Py_InitModule("_codecs", _codecs_functions); Index: _cursesmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v retrieving revision 2.31 retrieving revision 2.32 diff -C2 -r2.31 -r2.32 *** _cursesmodule.c 2000/07/09 14:35:00 2.31 --- _cursesmodule.c 2000/07/21 06:00:06 2.32 *************** *** 1271,1277 **** static PyObject * ! PyCursesWindow_GetAttr(self, name) ! PyCursesWindowObject *self; ! char *name; { return Py_FindMethod(PyCursesWindow_Methods, (PyObject *)self, name); --- 1271,1275 ---- static PyObject * ! PyCursesWindow_GetAttr(PyCursesWindowObject *self, char *name) { return Py_FindMethod(PyCursesWindow_Methods, (PyObject *)self, name); *************** *** 2162,2166 **** void ! init_curses() { PyObject *m, *d, *v; --- 2160,2164 ---- void ! init_curses(void) { PyObject *m, *d, *v; Index: _localemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_localemodule.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** _localemodule.c 2000/07/15 22:31:45 2.12 --- _localemodule.c 2000/07/21 06:00:07 2.13 *************** *** 401,405 **** DL_EXPORT(void) ! init_locale() { PyObject *m, *d, *x; --- 401,405 ---- DL_EXPORT(void) ! init_locale(void) { PyObject *m, *d, *x; Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.26 retrieving revision 2.27 diff -C2 -r2.26 -r2.27 *** _sre.c 2000/07/12 13:05:32 2.26 --- _sre.c 2000/07/21 06:00:07 2.27 *************** *** 2098,2102 **** __declspec(dllexport) #endif ! init_sre() { /* Patch object types */ --- 2098,2102 ---- __declspec(dllexport) #endif ! init_sre(void) { /* Patch object types */ Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.107 retrieving revision 1.108 diff -C2 -r1.107 -r1.108 *** _tkinter.c 2000/07/13 23:59:35 1.107 --- _tkinter.c 2000/07/21 06:00:07 1.108 *************** *** 1913,1919 **** static PyObject * ! Tkinter_Create(self, args) ! PyObject *self; ! PyObject *args; { char *screenName = NULL; --- 1913,1917 ---- static PyObject * ! Tkinter_Create(PyObject *self, PyObject *args) { char *screenName = NULL; *************** *** 1968,1972 **** static int ! EventHook() { #ifndef MS_WINDOWS --- 1966,1970 ---- static int ! EventHook(void) { #ifndef MS_WINDOWS *************** *** 2027,2031 **** static void ! EnableEventHook() { #ifdef WAIT_FOR_STDIN --- 2025,2029 ---- static void ! EnableEventHook(void) { #ifdef WAIT_FOR_STDIN *************** *** 2040,2044 **** static void ! DisableEventHook() { #ifdef WAIT_FOR_STDIN --- 2038,2042 ---- static void ! DisableEventHook(void) { #ifdef WAIT_FOR_STDIN *************** *** 2072,2076 **** DL_EXPORT(void) ! init_tkinter() { PyObject *m, *d; --- 2070,2074 ---- DL_EXPORT(void) ! init_tkinter(void) { PyObject *m, *d; *************** *** 2219,2223 **** */ static ! mac_addlibresources() { if ( !loaded_from_shlib ) --- 2217,2221 ---- */ static ! mac_addlibresources(void) { if ( !loaded_from_shlib ) Index: almodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/almodule.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** almodule.c 2000/07/12 13:05:33 1.29 --- almodule.c 2000/07/21 06:00:07 1.30 *************** *** 2038,2042 **** void ! inital() { PyObject *m, *d, *x; --- 2038,2042 ---- void ! inital(void) { PyObject *m, *d, *x; Index: arraymodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v retrieving revision 2.48 retrieving revision 2.49 diff -C2 -r2.48 -r2.49 *** arraymodule.c 2000/07/13 21:10:57 2.48 --- arraymodule.c 2000/07/21 06:00:07 2.49 *************** *** 1408,1412 **** DL_EXPORT(void) ! initarray() { PyObject *m, *d; --- 1408,1412 ---- DL_EXPORT(void) ! initarray(void) { PyObject *m, *d; Index: audioop.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/audioop.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** audioop.c 2000/07/10 17:15:07 1.39 --- audioop.c 2000/07/21 06:00:07 1.40 *************** *** 285,292 **** } ! static double _sum2(a, b, len) ! short *a; ! short *b; ! int len; { int i; --- 285,289 ---- } ! static double _sum2(short *a, short *b, int len) { int i; *************** *** 900,905 **** static int ! gcd(a, b) ! int a, b; { while (b > 0) { --- 897,901 ---- static int ! gcd(int a, int b) { while (b > 0) { *************** *** 1345,1349 **** DL_EXPORT(void) ! initaudioop() { PyObject *m, *d; --- 1341,1345 ---- DL_EXPORT(void) ! initaudioop(void) { PyObject *m, *d; Index: binascii.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/binascii.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** binascii.c 2000/07/10 09:49:19 2.21 --- binascii.c 2000/07/21 06:00:07 2.22 *************** *** 900,904 **** DL_EXPORT(void) ! initbinascii() { PyObject *m, *d, *x; --- 900,904 ---- DL_EXPORT(void) ! initbinascii(void) { PyObject *m, *d, *x; Index: cdmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cdmodule.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** cdmodule.c 2000/07/10 17:04:33 1.22 --- cdmodule.c 2000/07/21 06:00:07 1.23 *************** *** 767,771 **** void ! initcd() { PyObject *m, *d; --- 767,771 ---- void ! initcd(void) { PyObject *m, *d; Index: clmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/clmodule.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** clmodule.c 2000/06/30 23:58:05 2.22 --- clmodule.c 2000/07/21 06:00:07 2.23 *************** *** 979,983 **** void ! initcl() { PyObject *m, *d, *x; --- 979,983 ---- void ! initcl(void) { PyObject *m, *d, *x; Index: cmathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cmathmodule.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** cmathmodule.c 2000/07/10 09:31:34 2.15 --- cmathmodule.c 2000/07/21 06:00:07 2.16 *************** *** 317,321 **** static PyObject * ! math_error() { if (errno == EDOM) --- 317,321 ---- static PyObject * ! math_error(void) { if (errno == EDOM) *************** *** 395,399 **** DL_EXPORT(void) ! initcmath() { PyObject *m, *d, *v; --- 395,399 ---- DL_EXPORT(void) ! initcmath(void) { PyObject *m, *d, *v; Index: cryptmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cryptmodule.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** cryptmodule.c 2000/07/10 09:51:17 2.7 --- cryptmodule.c 2000/07/21 06:00:07 2.8 *************** *** 37,41 **** DL_EXPORT(void) ! initcrypt() { Py_InitModule("crypt", crypt_methods); --- 37,41 ---- DL_EXPORT(void) ! initcrypt(void) { Py_InitModule("crypt", crypt_methods); Index: dlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/dlmodule.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** dlmodule.c 2000/07/10 11:56:03 2.10 --- dlmodule.c 2000/07/21 06:00:07 2.11 *************** *** 192,196 **** void ! initdl() { PyObject *m, *d, *x; --- 192,196 ---- void ! initdl(void) { PyObject *m, *d, *x; Index: errnomodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/errnomodule.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** errnomodule.c 2000/07/09 15:14:52 2.12 --- errnomodule.c 2000/07/21 06:00:07 2.13 *************** *** 71,75 **** DL_EXPORT(void) ! initerrno() { PyObject *m, *d, *de; --- 71,75 ---- DL_EXPORT(void) ! initerrno(void) { PyObject *m, *d, *de; Index: fcntlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fcntlmodule.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** fcntlmodule.c 2000/07/10 17:10:26 2.22 --- fcntlmodule.c 2000/07/21 06:00:07 2.23 *************** *** 313,317 **** DL_EXPORT(void) ! initfcntl() { PyObject *m, *d; --- 313,317 ---- DL_EXPORT(void) ! initfcntl(void) { PyObject *m, *d; Index: flmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/flmodule.c,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -r1.42 -r1.43 *** flmodule.c 2000/07/16 12:04:31 1.42 --- flmodule.c 2000/07/21 06:00:07 1.43 *************** *** 2134,2138 **** DL_EXPORT(void) ! initfl() { Py_InitModule("fl", forms_methods); --- 2134,2138 ---- DL_EXPORT(void) ! initfl(void) { Py_InitModule("fl", forms_methods); Index: fmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fmmodule.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** fmmodule.c 2000/07/12 10:43:11 1.15 --- fmmodule.c 2000/07/21 06:00:07 1.16 *************** *** 279,283 **** void ! initfm() { Py_InitModule("fm", fm_methods); --- 279,283 ---- void ! initfm(void) { Py_InitModule("fm", fm_methods); Index: getbuildinfo.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/getbuildinfo.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** getbuildinfo.c 1999/08/27 20:39:21 2.5 --- getbuildinfo.c 2000/07/21 06:00:07 2.6 *************** *** 31,35 **** const char * ! Py_GetBuildInfo() { static char buildinfo[50]; --- 31,35 ---- const char * ! Py_GetBuildInfo(void) { static char buildinfo[50]; Index: getpath.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/getpath.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** getpath.c 2000/07/16 12:04:31 1.27 --- getpath.c 2000/07/21 06:00:07 1.28 *************** *** 348,352 **** static void ! calculate_path() { extern char *Py_GetProgramName(); --- 348,352 ---- static void ! calculate_path(void) { extern char *Py_GetProgramName(); *************** *** 573,577 **** char * ! Py_GetPath() { if (!module_search_path) --- 573,577 ---- char * ! Py_GetPath(void) { if (!module_search_path) *************** *** 581,585 **** char * ! Py_GetPrefix() { if (!module_search_path) --- 581,585 ---- char * ! Py_GetPrefix(void) { if (!module_search_path) *************** *** 589,593 **** char * ! Py_GetExecPrefix() { if (!module_search_path) --- 589,593 ---- char * ! Py_GetExecPrefix(void) { if (!module_search_path) *************** *** 597,601 **** char * ! Py_GetProgramFullPath() { if (!module_search_path) --- 597,601 ---- char * ! Py_GetProgramFullPath(void) { if (!module_search_path) Index: glmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/glmodule.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** glmodule.c 2000/07/10 17:04:33 2.7 --- glmodule.c 2000/07/21 06:00:07 2.8 *************** *** 7634,7638 **** void ! initgl() { (void) Py_InitModule("gl", gl_methods); --- 7634,7638 ---- void ! initgl(void) { (void) Py_InitModule("gl", gl_methods); Index: grpmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/grpmodule.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** grpmodule.c 2000/07/08 16:56:26 2.12 --- grpmodule.c 2000/07/21 06:00:07 2.13 *************** *** 133,137 **** DL_EXPORT(void) ! initgrp() { Py_InitModule3("grp", grp_methods, grp__doc__); --- 133,137 ---- DL_EXPORT(void) ! initgrp(void) { Py_InitModule3("grp", grp_methods, grp__doc__); Index: imageop.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/imageop.c,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** imageop.c 2000/07/10 09:55:32 2.23 --- imageop.c 2000/07/21 06:00:07 2.24 *************** *** 707,711 **** DL_EXPORT(void) ! initimageop() { PyObject *m, *d; --- 707,711 ---- DL_EXPORT(void) ! initimageop(void) { PyObject *m, *d; Index: imgfile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/imgfile.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** imgfile.c 2000/07/16 12:04:31 1.26 --- imgfile.c 2000/07/21 06:00:07 1.27 *************** *** 510,514 **** void ! initimgfile() { PyObject *m, *d; --- 510,514 ---- void ! initimgfile(void) { PyObject *m, *d; Index: linuxaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/linuxaudiodev.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** linuxaudiodev.c 2000/07/11 20:30:05 2.4 --- linuxaudiodev.c 2000/07/21 06:00:07 2.5 *************** *** 385,389 **** void ! initlinuxaudiodev() { PyObject *m, *d, *x; --- 385,389 ---- void ! initlinuxaudiodev(void) { PyObject *m, *d, *x; Index: mathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v retrieving revision 2.50 retrieving revision 2.51 diff -C2 -r2.50 -r2.51 *** mathmodule.c 2000/07/03 22:41:34 2.50 --- mathmodule.c 2000/07/21 06:00:07 2.51 *************** *** 39,43 **** static PyObject * ! math_error() { if (errno == EDOM) --- 39,43 ---- static PyObject * ! math_error(void) { if (errno == EDOM) *************** *** 260,264 **** DL_EXPORT(void) ! initmath() { PyObject *m, *d, *v; --- 260,264 ---- DL_EXPORT(void) ! initmath(void) { PyObject *m, *d, *v; Index: md5module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/md5module.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** md5module.c 2000/07/16 12:04:31 2.19 --- md5module.c 2000/07/21 06:00:07 2.20 *************** *** 32,36 **** static md5object * ! newmd5object() { md5object *md5p; --- 32,36 ---- static md5object * ! newmd5object(void) { md5object *md5p; *************** *** 237,241 **** DL_EXPORT(void) ! initmd5() { PyObject *m, *d; --- 237,241 ---- DL_EXPORT(void) ! initmd5(void) { PyObject *m, *d; Index: mpzmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mpzmodule.c,v retrieving revision 2.30 retrieving revision 2.31 diff -C2 -r2.30 -r2.31 *** mpzmodule.c 2000/07/16 12:04:31 2.30 --- mpzmodule.c 2000/07/21 06:00:07 2.31 *************** *** 95,99 **** static mpzobject * ! newmpzobject() { mpzobject *mpzp; --- 95,99 ---- static mpzobject * ! newmpzobject(void) { mpzobject *mpzp; *************** *** 1633,1638 **** #define MP_TEST_SIZE 4 static const char mp_test_magic[MP_TEST_SIZE] = {'\xAA','\xAA','\xAA','\xAA'}; ! static mp_test_error( location ) ! int *location; { /* assumptions: *alloc returns address divisible by 4, --- 1633,1637 ---- #define MP_TEST_SIZE 4 static const char mp_test_magic[MP_TEST_SIZE] = {'\xAA','\xAA','\xAA','\xAA'}; ! static mp_test_error(int *location) { /* assumptions: *alloc returns address divisible by 4, *************** *** 1717,1721 **** DL_EXPORT(void) ! initmpz() { PyObject *module; --- 1716,1720 ---- DL_EXPORT(void) ! initmpz(void) { PyObject *module; Index: newmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/newmodule.c,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -r2.24 -r2.25 *** newmodule.c 2000/07/10 11:56:03 2.24 --- newmodule.c 2000/07/21 06:00:07 2.25 *************** *** 196,200 **** DL_EXPORT(void) ! initnew() { Py_InitModule4("new", new_methods, new_doc, (PyObject *)NULL, --- 196,200 ---- DL_EXPORT(void) ! initnew(void) { Py_InitModule4("new", new_methods, new_doc, (PyObject *)NULL, Index: nismodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/nismodule.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** nismodule.c 2000/07/10 13:12:27 2.18 --- nismodule.c 2000/07/21 06:00:07 2.19 *************** *** 296,300 **** static nismaplist * ! nis_maplist () { nisresp_maplist *list; --- 296,300 ---- static nismaplist * ! nis_maplist (void) { nisresp_maplist *list; *************** *** 372,376 **** void ! initnis () { PyObject *m, *d; --- 372,376 ---- void ! initnis (void) { PyObject *m, *d; Index: operator.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/operator.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** operator.c 2000/07/08 04:53:48 2.15 --- operator.c 2000/07/21 06:00:07 2.16 *************** *** 248,252 **** DL_EXPORT(void) ! initoperator() { /* Create the module and add the functions */ --- 248,252 ---- DL_EXPORT(void) ! initoperator(void) { /* Create the module and add the functions */ Index: pcremodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pcremodule.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** pcremodule.c 2000/07/10 13:12:27 2.22 --- pcremodule.c 2000/07/21 06:00:07 2.23 *************** *** 630,634 **** DL_EXPORT(void) ! initpcre() { PyObject *m, *d; --- 630,634 ---- DL_EXPORT(void) ! initpcre(void) { PyObject *m, *d; Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.156 retrieving revision 2.157 diff -C2 -r2.156 -r2.157 *** posixmodule.c 2000/07/19 14:45:40 2.156 --- posixmodule.c 2000/07/21 06:00:07 2.157 *************** *** 285,289 **** static PyObject * ! convertenviron() { PyObject *d; --- 285,289 ---- static PyObject * ! convertenviron(void) { PyObject *d; *************** *** 345,349 **** static PyObject * ! posix_error() { return PyErr_SetFromErrno(PyExc_OSError); --- 345,349 ---- static PyObject * ! posix_error(void) { return PyErr_SetFromErrno(PyExc_OSError); *************** *** 1917,1923 **** static PyObject * ! posix_getppid(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, ":getppid")) --- 1917,1921 ---- static PyObject * ! posix_getppid(PyObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":getppid")) *************** *** 2857,2861 **** #if defined(PYCC_VACPP) && defined(PYOS_OS2) static long ! system_uptime() { ULONG value = 0; --- 2855,2859 ---- #if defined(PYCC_VACPP) && defined(PYOS_OS2) static long ! system_uptime(void) { ULONG value = 0; *************** *** 5197,5202 **** static int ! all_ins(d) ! PyObject* d; { #ifdef F_OK --- 5195,5199 ---- static int ! all_ins(PyObject *d) { #ifdef F_OK *************** *** 5296,5300 **** DL_EXPORT(void) ! INITFUNC() { PyObject *m, *d, *v; --- 5293,5297 ---- DL_EXPORT(void) ! INITFUNC(void) { PyObject *m, *d, *v; Index: pwdmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pwdmodule.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** pwdmodule.c 2000/07/10 13:12:27 1.20 --- pwdmodule.c 2000/07/21 06:00:07 1.21 *************** *** 138,142 **** DL_EXPORT(void) ! initpwd() { Py_InitModule4("pwd", pwd_methods, pwd__doc__, --- 138,142 ---- DL_EXPORT(void) ! initpwd(void) { Py_InitModule4("pwd", pwd_methods, pwd__doc__, Index: readline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** readline.c 2000/07/19 16:54:53 2.22 --- readline.c 2000/07/21 06:00:07 2.23 *************** *** 397,401 **** static void ! setup_readline() { rl_readline_name = "python"; --- 397,401 ---- static void ! setup_readline(void) { rl_readline_name = "python"; *************** *** 486,490 **** DL_EXPORT(void) ! initreadline() { PyObject *m; --- 486,490 ---- DL_EXPORT(void) ! initreadline(void) { PyObject *m; Index: regexmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/regexmodule.c,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** regexmodule.c 2000/07/12 00:49:17 1.38 --- regexmodule.c 2000/07/21 06:00:07 1.39 *************** *** 658,662 **** DL_EXPORT(void) ! initregex() { PyObject *m, *d, *v; --- 658,662 ---- DL_EXPORT(void) ! initregex(void) { PyObject *m, *d, *v; Index: regexpr.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/regexpr.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** regexpr.c 2000/07/16 12:04:31 1.32 --- regexpr.c 2000/07/21 06:00:07 1.33 *************** *** 447,451 **** unsigned char re_syntax_table[256]; ! void re_compile_initialize() { int a; --- 447,451 ---- unsigned char re_syntax_table[256]; ! void re_compile_initialize(void) { int a; Index: resource.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/resource.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** resource.c 2000/07/16 12:04:31 2.14 --- resource.c 2000/07/21 06:00:07 2.15 *************** *** 184,188 **** } ! void initresource() { PyObject *m, *d; --- 184,188 ---- } ! void initresource(void) { PyObject *m, *d; Index: rgbimgmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/rgbimgmodule.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** rgbimgmodule.c 2000/07/16 12:04:31 2.21 --- rgbimgmodule.c 2000/07/21 06:00:07 2.22 *************** *** 756,760 **** DL_EXPORT(void) ! initrgbimg() { PyObject *m, *d; --- 756,760 ---- DL_EXPORT(void) ! initrgbimg(void) { PyObject *m, *d; Index: rotormodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/rotormodule.c,v retrieving revision 2.27 retrieving revision 2.28 diff -C2 -r2.27 -r2.28 *** rotormodule.c 2000/07/16 12:04:31 2.27 --- rotormodule.c 2000/07/21 06:00:07 2.28 *************** *** 619,623 **** DL_EXPORT(void) ! initrotor() { (void)Py_InitModule("rotor", rotor_methods); --- 619,623 ---- DL_EXPORT(void) ! initrotor(void) { (void)Py_InitModule("rotor", rotor_methods); Index: selectmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v retrieving revision 2.38 retrieving revision 2.39 diff -C2 -r2.38 -r2.39 *** selectmodule.c 2000/07/13 23:59:35 2.38 --- selectmodule.c 2000/07/21 06:00:07 2.39 *************** *** 338,342 **** DL_EXPORT(void) ! initselect() { PyObject *m, *d; --- 338,342 ---- DL_EXPORT(void) ! initselect(void) { PyObject *m, *d; Index: sgimodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sgimodule.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** sgimodule.c 2000/07/10 12:29:26 1.14 --- sgimodule.c 2000/07/21 06:00:07 1.15 *************** *** 60,64 **** void ! initsgi() { Py_InitModule("sgi", sgi_methods); --- 60,64 ---- void ! initsgi(void) { Py_InitModule("sgi", sgi_methods); Index: shamodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/shamodule.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** shamodule.c 2000/07/08 06:41:03 2.7 --- shamodule.c 2000/07/21 06:00:07 2.8 *************** *** 351,355 **** static SHAobject * ! newSHAobject() { return (SHAobject *)PyObject_New(SHAobject, &SHAtype); --- 351,355 ---- static SHAobject * ! newSHAobject(void) { return (SHAobject *)PyObject_New(SHAobject, &SHAtype); *************** *** 539,543 **** void ! initsha() { PyObject *d, *m; --- 539,543 ---- void ! initsha(void) { PyObject *d, *m; Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** signalmodule.c 2000/07/10 12:04:18 2.46 --- signalmodule.c 2000/07/21 06:00:07 2.47 *************** *** 313,317 **** DL_EXPORT(void) ! initsignal() { PyObject *m, *d, *x; --- 313,317 ---- DL_EXPORT(void) ! initsignal(void) { PyObject *m, *d, *x; *************** *** 554,558 **** static void ! finisignal() { int i; --- 554,558 ---- static void ! finisignal(void) { int i; *************** *** 584,588 **** /* Declared in pyerrors.h */ int ! PyErr_CheckSignals() { int i; --- 584,588 ---- /* Declared in pyerrors.h */ int ! PyErr_CheckSignals(void) { int i; *************** *** 624,628 **** */ void ! PyErr_SetInterrupt() { is_tripped++; --- 624,628 ---- */ void ! PyErr_SetInterrupt(void) { is_tripped++; *************** *** 632,636 **** void ! PyOS_InitInterrupts() { initsignal(); --- 632,636 ---- void ! PyOS_InitInterrupts(void) { initsignal(); *************** *** 639,643 **** void ! PyOS_FiniInterrupts() { finisignal(); --- 639,643 ---- void ! PyOS_FiniInterrupts(void) { finisignal(); *************** *** 645,649 **** int ! PyOS_InterruptOccurred() { if (Handlers[SIGINT].tripped) { --- 645,649 ---- int ! PyOS_InterruptOccurred(void) { if (Handlers[SIGINT].tripped) { *************** *** 659,663 **** void ! PyOS_AfterFork() { #ifdef WITH_THREAD --- 659,663 ---- void ! PyOS_AfterFork(void) { #ifdef WITH_THREAD Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.117 retrieving revision 1.118 diff -C2 -r1.117 -r1.118 *** socketmodule.c 2000/07/11 23:00:12 1.117 --- socketmodule.c 2000/07/21 06:00:07 1.118 *************** *** 229,233 **** static PyObject * ! PySocket_Err() { #ifdef MS_WINDOWS --- 229,233 ---- static PyObject * ! PySocket_Err(void) { #ifdef MS_WINDOWS *************** *** 1438,1444 **** static PyObject * ! gethost_common(h, addr) ! struct hostent *h; ! struct sockaddr_in *addr; { char **pch; --- 1438,1442 ---- static PyObject * ! gethost_common(struct hostent *h, struct sockaddr_in *addr) { char **pch; *************** *** 2186,2190 **** static void ! NTcleanup() { WSACleanup(); --- 2184,2188 ---- static void ! NTcleanup(void) { WSACleanup(); *************** *** 2192,2196 **** static int ! NTinit() { WSADATA WSAData; --- 2190,2194 ---- static int ! NTinit(void) { WSADATA WSAData; *************** *** 2226,2230 **** static void ! OS2cleanup() { /* No cleanup is necessary for OS/2 Sockets */ --- 2224,2228 ---- static void ! OS2cleanup(void) { /* No cleanup is necessary for OS/2 Sockets */ *************** *** 2232,2236 **** static int ! OS2init() { char reason[64]; --- 2230,2234 ---- static int ! OS2init(void) { char reason[64]; Index: soundex.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/soundex.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** soundex.c 2000/02/29 13:59:24 2.7 --- soundex.c 2000/07/21 06:00:07 2.8 *************** *** 168,172 **** */ DL_EXPORT(void) ! initsoundex() { (void) Py_InitModule4("soundex", --- 168,172 ---- */ DL_EXPORT(void) ! initsoundex(void) { (void) Py_InitModule4("soundex", Index: stropmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/stropmodule.c,v retrieving revision 2.69 retrieving revision 2.70 diff -C2 -r2.69 -r2.70 *** stropmodule.c 2000/07/16 12:04:31 2.69 --- stropmodule.c 2000/07/21 06:00:07 2.70 *************** *** 1181,1185 **** DL_EXPORT(void) ! initstrop() { PyObject *m, *d, *s; --- 1181,1185 ---- DL_EXPORT(void) ! initstrop(void) { PyObject *m, *d, *s; Index: structmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/structmodule.c,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** structmodule.c 2000/07/10 12:29:26 2.35 --- structmodule.c 2000/07/21 06:00:07 2.36 *************** *** 1223,1227 **** DL_EXPORT(void) ! initstruct() { PyObject *m, *d; --- 1223,1227 ---- DL_EXPORT(void) ! initstruct(void) { PyObject *m, *d; Index: sunaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sunaudiodev.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** sunaudiodev.c 2000/07/16 12:04:31 1.21 --- sunaudiodev.c 2000/07/21 06:00:07 1.22 *************** *** 483,487 **** void ! initsunaudiodev() { PyObject *m, *d; --- 483,487 ---- void ! initsunaudiodev(void) { PyObject *m, *d; Index: svmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/svmodule.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** svmodule.c 2000/07/10 12:43:58 2.15 --- svmodule.c 2000/07/21 06:00:07 2.16 *************** *** 42,46 **** /* Set a SV-specific error from svideo_errno and return NULL */ static PyObject * ! sv_error() { PyErr_SetString(SvError, svStrerror(svideo_errno)); --- 42,46 ---- /* Set a SV-specific error from svideo_errno and return NULL */ static PyObject * ! sv_error(void) { PyErr_SetString(SvError, svStrerror(svideo_errno)); *************** *** 962,966 **** void ! initsv() { PyObject *m, *d; --- 962,966 ---- void ! initsv(void) { PyObject *m, *d; Index: syslogmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/syslogmodule.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** syslogmodule.c 2000/07/16 12:04:31 2.15 --- syslogmodule.c 2000/07/21 06:00:07 2.16 *************** *** 169,173 **** DL_EXPORT(void) ! initsyslog() { PyObject *m, *d; --- 169,173 ---- DL_EXPORT(void) ! initsyslog(void) { PyObject *m, *d; Index: tclNotify.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/tclNotify.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** tclNotify.c 2000/07/16 12:04:31 2.2 --- tclNotify.c 2000/07/21 06:00:07 2.3 *************** *** 101,105 **** static void ! InitNotifier() { initialized = 1; --- 101,105 ---- static void ! InitNotifier(void) { initialized = 1; *************** *** 508,512 **** int ! Tcl_GetServiceMode() { if (!initialized) { --- 508,512 ---- int ! Tcl_GetServiceMode(void) { if (!initialized) { *************** *** 800,804 **** int ! Tcl_ServiceAll() { int result = 0; --- 800,804 ---- int ! Tcl_ServiceAll(void) { int result = 0; *************** *** 895,899 **** int ! PyTcl_WaitUntilEvent() { int flags = TCL_ALL_EVENTS; --- 895,899 ---- int ! PyTcl_WaitUntilEvent(void) { int flags = TCL_ALL_EVENTS; Index: termios.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/termios.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** termios.c 2000/07/10 12:15:54 2.12 --- termios.c 2000/07/21 06:00:07 2.13 *************** *** 289,293 **** DL_EXPORT(void) ! PyInit_termios() { PyObject *m, *d; --- 289,293 ---- DL_EXPORT(void) ! PyInit_termios(void) { PyObject *m, *d; Index: threadmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/threadmodule.c,v retrieving revision 2.34 retrieving revision 2.35 diff -C2 -r2.34 -r2.35 *** threadmodule.c 2000/07/10 10:03:58 2.34 --- threadmodule.c 2000/07/21 06:00:07 2.35 *************** *** 35,39 **** static lockobject * ! newlockobject() { lockobject *self; --- 35,39 ---- static lockobject * ! newlockobject(void) { lockobject *self; *************** *** 378,382 **** DL_EXPORT(void) ! initthread() { PyObject *m, *d; --- 378,382 ---- DL_EXPORT(void) ! initthread(void) { PyObject *m, *d; Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.91 retrieving revision 2.92 diff -C2 -r2.91 -r2.92 *** timemodule.c 2000/07/10 12:15:54 2.91 --- timemodule.c 2000/07/21 06:00:07 2.92 *************** *** 108,112 **** static void ! initmactimezone() { MachineLocation loc; --- 108,112 ---- static void ! initmactimezone(void) { MachineLocation loc; *************** *** 580,584 **** DL_EXPORT(void) ! inittime() { PyObject *m, *d; --- 580,584 ---- DL_EXPORT(void) ! inittime(void) { PyObject *m, *d; *************** *** 668,672 **** static double ! floattime() { /* There are three ways to get the time: --- 668,672 ---- static double ! floattime(void) { /* There are three ways to get the time: Index: timingmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timingmodule.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** timingmodule.c 2000/07/10 12:04:18 2.6 --- timingmodule.c 2000/07/21 06:00:07 2.7 *************** *** 70,74 **** ! DL_EXPORT(void) inittiming() { (void)Py_InitModule("timing", timing_methods); --- 70,74 ---- ! DL_EXPORT(void) inittiming(void) { (void)Py_InitModule("timing", timing_methods); Index: unicodedata.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/unicodedata.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** unicodedata.c 2000/03/31 17:26:09 2.2 --- unicodedata.c 2000/07/21 06:00:07 2.3 *************** *** 274,278 **** DL_EXPORT(void) ! initunicodedata() { Py_InitModule("unicodedata", unicodedata_functions); --- 274,278 ---- DL_EXPORT(void) ! initunicodedata(void) { Py_InitModule("unicodedata", unicodedata_functions); Index: xxmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/xxmodule.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** xxmodule.c 2000/07/10 11:56:03 2.19 --- xxmodule.c 2000/07/21 06:00:07 2.20 *************** *** 203,207 **** DL_EXPORT(void) ! initxx() { PyObject *m, *d; --- 203,207 ---- DL_EXPORT(void) ! initxx(void) { PyObject *m, *d; Index: zlibmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/zlibmodule.c,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -r2.33 -r2.34 *** zlibmodule.c 2000/07/10 09:57:19 2.33 --- zlibmodule.c 2000/07/21 06:00:07 2.34 *************** *** 830,834 **** DL_EXPORT(void) ! PyInit_zlib() { PyObject *m, *d, *ver; --- 830,834 ---- DL_EXPORT(void) ! PyInit_zlib(void) { PyObject *m, *d, *ver; From python-dev@python.org Fri Jul 21 19:13:18 2000 From: python-dev@python.org (Barry Warsaw) Date: Fri, 21 Jul 2000 11:13:18 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0200.txt,1.1,1.2 Message-ID: <200007211813.LAA12850@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv12832 Modified Files: pep-0200.txt Log Message: Moderate first formatting pass of Jeremy's content for this PEP. Index: pep-0200.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0200.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0200.txt 2000/07/13 06:33:08 1.1 --- pep-0200.txt 2000/07/21 18:13:15 1.2 *************** *** 2,6 **** Title: Python 2.0 Release Schedule Version: $Revision$ ! Owner: bwarsaw@beopen.com (Barry A. Warsaw) Python-Version: 2.0 Status: Incomplete --- 2,6 ---- Title: Python 2.0 Release Schedule Version: $Revision$ ! Owner: Jeremy Hylton Python-Version: 2.0 Status: Incomplete *************** *** 14,17 **** --- 14,74 ---- CVS revision history of this file contains the definitive historical record. + + Accepted and completed + + Accepted and in progress + + * SyntaxError enhancements - Fredrik Lundh + http://www.python.org/pipermail/python-dev/2000-July/012981.html + + * interface to poll system call - Andrew Kuchling + An OO interface to the poll system call will be added to the + select module. + + * Compression of Unicode database - Fredrik Lundh + http://hem.passagen.se/eff/bot.htm#456806 + + * SRE - Fredrik Lundh + The test suite still fails on test_re. + + * snprintf - owner??? + Use snprintf to avoid buffer overflows. Need configure hackery + to discovery if it is available on the current platform and a + default implementation if it is not. + http://www.python.org/pipermail/python-dev/2000-April/010051.html + This function is expected to be part of C9X (check). + + * Support for opcode arguments > 2**16 - Charles Waldman + Source files longer than 32K and sequences with more than 32K + elements both fail because opcode arguments are limited to + 16-bit values. + + * Range literals - Thomas Wouters + Make range(1, 10, 2) == [1:10:2] + + Open: proposed but not accepted or declined + + * List comprehensions - Tim Peters? + Need a coherent proposal. Lots of confusing discussion going + on. + + * Eliminated SET_LINENO opcode - Vladimir Marangozov + Small optimization achieved by using the code object's lnotab + instead of the SET_LINENO instruction. Uses code rewriting + technique (that Guido's growns on) to support debugger, which + uses SET_LINENO. + + http://starship.python.net/~vlad/lineno/ + for (working at the time) patches + + Discussions on python-dev: + + - http://www.python.org/pipermail/python-dev/2000-April/subject.html + Subject: "Why do we need Traceback Objects?" + + - http://www.python.org/pipermail/python-dev/1999-August/002252.html + + Declined + From python-dev@python.org Fri Jul 21 19:29:08 2000 From: python-dev@python.org (Barry Warsaw) Date: Fri, 21 Jul 2000 11:29:08 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0200.txt,1.2,1.3 Message-ID: <200007211829.LAA14359@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv14340 Modified Files: pep-0200.txt Log Message: Added Emacs page breaks Index: pep-0200.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0200.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pep-0200.txt 2000/07/21 18:13:15 1.2 --- pep-0200.txt 2000/07/21 18:29:05 1.3 *************** *** 6,9 **** --- 6,11 ---- Status: Incomplete + + Introduction *************** *** 15,20 **** --- 17,26 ---- historical record. + + Accepted and completed + + Accepted and in progress *************** *** 47,50 **** --- 53,58 ---- Make range(1, 10, 2) == [1:10:2] + + Open: proposed but not accepted or declined *************** *** 69,72 **** --- 77,82 ---- - http://www.python.org/pipermail/python-dev/1999-August/002252.html + + Declined From python-dev@python.org Fri Jul 21 21:03:20 2000 From: python-dev@python.org (Barry Warsaw) Date: Fri, 21 Jul 2000 13:03:20 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.7,1.8 Message-ID: <200007212003.NAA02595@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv2581 Modified Files: pep-0000.txt Log Message: Added PEP 212, Additional Builtin Generators, assigned bwarsaw Added PEP 213, Attribute Access Handlers, assigned prescod Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** pep-0000.txt 2000/07/15 23:26:36 1.7 --- pep-0000.txt 2000/07/21 20:03:17 1.8 *************** *** 31,34 **** --- 31,37 ---- 210 pep-0210.txt Decoupling the Interpreter Loop davida 211 pep-0211.txt Adding New Operators to Python gvwilson + 212 pep-0212.txt Additional Builtin Generators bwarsaw + 213 pep-0213.txt Attribute Access Handlers prescod + From python-dev@python.org Fri Jul 21 21:05:09 2000 From: python-dev@python.org (Barry Warsaw) Date: Fri, 21 Jul 2000 13:05:09 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0213.txt,NONE,1.1 Message-ID: <200007212005.NAA02806@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv2799 Added Files: pep-0213.txt Log Message: PEP 213, Attribute Access Handlers, assigned to Paul Prescod ***** Error reading new file(2, 'No such file or directory') From python-dev@python.org Fri Jul 21 21:43:40 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 21 Jul 2000 13:43:40 -0700 Subject: [Python-checkins] CVS: python/nondist/sandbox - New directory Message-ID: <200007212043.NAA05628@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sandbox In directory slayer.i.sourceforge.net:/tmp/cvs-serv5618/sandbox Log Message: Directory /cvsroot/python/python/nondist/sandbox added to the repository From python-dev@python.org Fri Jul 21 22:14:28 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 21 Jul 2000 14:14:28 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0213.txt,1.1,1.2 Message-ID: <200007212114.OAA21635@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv21578/peps Modified Files: pep-0213.txt Log Message: Added content. First real version of this PEP Index: pep-0213.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0213.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0213.txt 2000/07/21 20:05:07 1.1 --- pep-0213.txt 2000/07/21 21:14:26 1.2 *************** *** 7,10 **** --- 7,201 ---- + Introduction + + It is possible (and even relatively common) in Python code and + in extension modules to "trap" when an instance's client code + attempts to set an attribute and execute code instead. In other + words it is possible to allow users to use attribute assignment/ + retrieval/deletion syntax even though the underlying implementation + is doing some computation rather than directly modifying a + binding. + + This PEP describes a feature that makes it easier, more efficient + and safer to implement these handlers for Python instances. + + Justification + + Scenario 1: + + You have a deployed class that works on an attribute named + "stdout". After a while, you think it would be better to + check that stdout is really an object with a "write" method + at the moment of assignment. Rather than change to a + setstdout method (which would be incompatible with deployed + code) you would rather trap the assignment and check the + object's type. + + Scenario 2: + + You want to be as compatible as possible with an object + model that has a concept of attribute assignment. It could + be the W3C Document Object Model or a particular COM + interface (e.g. the PowerPoint interface). In that case + you may well want attributes in the model to show up as + attributes in the Python interface, even though the + underlying implementation may not use attributes at all. + + Scenario 3: + + A user wants to make an attribute read-only. + + In short, this feature allows programmers to separate the + interface of their module from the underlying implementation + for whatever purpose. Again, this is not a new feature but + merely a new syntax for an existing convention. + + Current Solution + + To make some attributes read-only: + + class foo: + def __setattr__( self, name, val ): + if name=="readonlyattr": + raise TypeError + elif name=="readonlyattr2": + raise TypeError + ... + else: + self.__dict__["name"]=val + + This has the following problems: + + 1. The creator of the method must be intimately aware of whether + somewhere else in the class hiearchy __setattr__ has also been + trapped for any particular purpose. If so, she must specifically + call that method rather than assigning to the dictionary. There + are many different reasons to overload __setattr__ so there is a + decent potential for clashes. For instance object database + implementations often overload setattr for an entirely unrelated + purpose. + + 2. The string-based switch statement forces all attribute handlers + to be specified in one place in the code. They may then dispatch + to task-specific methods (for modularity) but this could cause + performance problems. + + 3. Logic for the setting, getting and deleting must live in + __getattr__, __setattr__ and __delattr__. Once again, this can be + mitigated through an extra level of method call but this is + inefficient. + + Proposed Syntax + + Special methods should declare themselves with declarations of the + following form: + + class x: + def __attr_XXX__(self, op, val ): + if op=="get": + return someComputedValue(self.internal) + elif op=="set": + self.internal=someComputedValue(val) + elif op=="del": + del self.internal + + Client code looks like this: + + fooval=x.foo + x.foo=fooval+5 + del x.foo + + Semantics + + Attribute references of all three kinds should call the method. + The op parameter can be "get"/"set"/"del". Of course this string + will be interned so the actual checks for the string will be + very fast. + + It is disallowed to actually have an attribute named XXX in the + same instance as a method named __attr_XXX__. + + An implementation of __attr_XXX__ takes precedence over an + implementation of __getattr__ based on the principle that + __getattr__ is supposed to be invoked only after finding an + appropriate attribute has failed. + + An implementation of __attr_XXX__ takes precedence over an + implementation of __setattr__ in order to be consistent. The + opposite choice seems fairly feasible also, however. The same + goes for __del_y__. + + Proposed Implementation + + There is a new object type called an attribute access handler. + Objects of this type have the following attributes: + + name (e.g. XXX, not __attr__XXX__ + method (pointer to a method object + + In PyClass_New, methods of + the appropriate form will be detected and converted into objects + (just like unbound method objects). If there are any attribute access + handlers in an instance at all, a flag is set. Let's call + it "I_have_computed_attributes" for now. Derived classes inherit + the flag from base classes. Instances inherit the flag from + classes. + + A get proceeds as usual until just before the object is returned. + In addition to the current check whether the returned object is a + method it would also check whether a returned object is an access + handler. If so, it would invoke the getter method and return + the value. To remove an attribute access handler you could directly + fiddle with the dictionary. + + A set proceeds by checking the "I_have_computed_attributes" flag. If + it is not set, everything proceeds as it does today. If it is set + then we must do a dictionary get on the requested object name. If it + returns an attribute access handler then we call the setter function + with the value. If it returns any other object then we discard the + result and continue as we do today. Note that having an attribute + access handler will mildly affect attribute "setting" performance for + all sets on a particular instance, but no more so than today, using + __setattr__. Gets are more efficient than they are today with + __getattr__. + + The I_have_computed_attributes flag is intended to eliminate the + performance degradation of an extra "get" per "set" for objects not + using this feature. Checking this flag should have miniscule + performance implications for all objects. + + The implementation of delete is analogous to the implementation + of set. + + Caveats + + 1. You might note that I have not proposed any logic to keep + the I_have_computed_attributes flag up to date as attributes + are added and removed from the instance's dictionary. This is + consistent with current Python. If you add a __setattr__ method + to an object after it is in use, that method will not behave as + it would if it were available at "compile" time. The dynamism is + arguably not worth the extra implementation effort. This snippet + demonstrates the current behavior: + + >>> def prn(*args):print args + >>> class a: + ... __setattr__=prn + >>> a().foo=5 + (<__main__.a instance at 882890>, 'foo', 5) + + >>> class b: pass + >>> bi=b() + >>> bi.__setattr__=prn + >>> b.foo=5 + + 2. Assignment to __dict__["XXX"] can overwrite the attribute + access handler for __attr_XXX__. Typically the access handlers will + store information away in private __XXX variables + + 3. An attribute access handler that attempts to call setattr or getattr + on the object itself can cause an infinite loop (as with __getattr__) + Once again, the solution is to use a special (typically private) + variable such as __XXX. Local Variables: From python-dev@python.org Fri Jul 21 22:16:11 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 21 Jul 2000 14:16:11 -0700 Subject: [Python-checkins] CVS: python/nondist/sandbox/doctools - New directory Message-ID: <200007212116.OAA21813@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sandbox/doctools In directory slayer.i.sourceforge.net:/tmp/cvs-serv21807/doctools Log Message: Directory /cvsroot/python/python/nondist/sandbox/doctools added to the repository From python-dev@python.org Fri Jul 21 22:31:30 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 21 Jul 2000 14:31:30 -0700 Subject: [Python-checkins] CVS: python/nondist/sandbox/doctools README,NONE,1.1 htmldoc.py,NONE,1.1 inspect.py,NONE,1.1 onlinehelp.py,NONE,1.1 Message-ID: <200007212131.OAA23245@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sandbox/doctools In directory slayer.i.sourceforge.net:/tmp/cvs-serv23158 Added Files: README htmldoc.py inspect.py onlinehelp.py Log Message: Added for your consideration...comments to Paul Prescod and Ka-Ping Yee. --- NEW FILE --- This directory contains some tools for reading Python documentation, whether inline or in HTML files. These are all proposed additions to the standard library. onlinehelp.py -- onlinehelp for Python. Read the docstring. htmldoc.py -- Builds HTML documentation from docstrings inspect.py -- introspection API used by both of the above --- NEW FILE --- #!/usr/bin/env python """Generate HTML documentation from live Python objects.""" __version__ = "Ka-Ping Yee , 29 May 2000" import sys, string, re, inspect # ---------------------------------------------------- formatting utilities def htmlescape(str): return string.replace(string.replace(str, "&", "&"), "<", "<") def htmlrepr(object): return htmlescape(repr(object)) def preformat(str): str = htmlescape(string.expandtabs(str)) return string.replace(string.replace(str, " ", " "), "\n", "
    \n") def multicolumn(list, format, cols=4): results = [""] rows = (len(list)+cols-1)/cols for col in range(cols): results.append("") results.append("
    " % (100/cols)) for i in range(rows*col, rows*col+rows): if i < len(list): results.append(format(list[i]) + "
    ") results.append("
    ") return results def heading(title, fgcol, bgcol, extras=""): return ["""

    """ % (bgcol, fgcol, title, extras), "

     %s
     %s
    "] def section(title, fgcol, bgcol, contents, width=20, prelude="", marginalia=None, gap="   "): if marginalia is None: marginalia = " " * width results = [] results.append("""

    """ % (bgcol, fgcol, title)) if prelude: results.append(""" """ % (bgcol, marginalia, bgcol, prelude)) results.append(""" """ % (bgcol, marginalia, gap)) # Alas, this horrible hack seems to be the only way to force Netscape # to expand the main cell consistently to the maximum available width. results.append("

     %s
    %s %s
    %s%s" + "  "*100 + "") results.append(contents) results.append("
    ") return results def footer(): return """
    generated with htmldoc by Ka-Ping Yee
    """ # -------------------------------------------------------- automatic markup import re def namelink(name, *dicts): for dict in dicts: if dict.has_key(name): return "%s" % (dict[name], name) return name def classlink(object, modname, *dicts): name = object.__name__ if object.__module__ != modname: name = object.__module__ + "." + name for dict in dicts: if dict.has_key(object): return "%s" % (dict[object], name) return name def modulelink(object): return "%s" % (object.__name__, object.__name__) def markup(text, functions={}, classes={}, methods={}, escape=htmlescape): """Mark up some plain text, given a context of symbols to look for. Each context dictionary maps object names to named anchor identifiers.""" results = [] here = 0 pattern = re.compile("(self\.)?(\w+)") while 1: match = pattern.search(text, here) if not match: break start, end = match.regs[2] found, name = match.group(0), match.group(2) results.append(escape(text[here:start])) if text[end:end+1] == "(": results.append(namelink(name, methods, functions, classes)) elif match.group(1): results.append("%s" % name) else: results.append(namelink(name, classes)) here = end results.append(text[here:]) return string.join(results, "") def getdoc(object): result = inspect.getdoc(object) if not result: try: result = inspect.getcomments(object) except: pass return result and string.rstrip(result) + "\n" or "" # -------------------------------------------------- type-specific routines def document_tree(tree, modname, classes={}): """Produce HTML for a class tree as returned by inspect.getclasstree().""" results = ["

    \n"] for entry in tree: if type(entry) is type(()): c, bases = entry results.append("
    ") results.append(classlink(c, modname, classes)) if bases: parents = [] for base in bases: parents.append(classlink(base, modname, classes)) results.append("(" + string.join(parents, ", ") + ")") results.append("\n
    ") elif type(entry) is type([]): results.append("
    \n") results.append(document_tree(entry, modname, classes)) results.append("
    \n") results.append("
    \n") return results def document_module(object): """Produce HTML documentation for a given module object.""" name = object.__name__ file = inspect.getfile(object) results = [] head = "
     %s" % name if hasattr(object, "__version__"): head = head + " (version: %s)" % htmlescape(object.__version__) results.append(heading(head, "#ffffff", "#7799ee")) cadr = lambda list: list[1] modules = map(cadr, inspect.getmembers(object, inspect.ismodule)) classes, cdict = [], {} for key, value in inspect.getmembers(object, inspect.isclass): if inspect.getfile(value) == file: classes.append(value) cdict[key] = cdict[value] = "#" + key functions, fdict = [], {} for key, value in inspect.getmembers(object, inspect.isroutine): if not inspect.isfunction(value) or inspect.getfile(value) == file: functions.append(value) fdict[key] = "#-" + key if inspect.isfunction(value): fdict[value] = fdict[key] for c in classes: for base in c.__bases__: key, modname = base.__name__, base.__module__ if modname != name and sys.modules.has_key(modname): module = sys.modules[modname] if hasattr(module, key) and getattr(module, key) is base: if not cdict.has_key(key): cdict[key] = cdict[base] = modname + ".html#" + key doc = markup(getdoc(object), fdict, cdict, escape=preformat) if doc: doc = "

    " + doc + "\n\n" else: doc = "

    no doc string\n" results.append(doc) if modules: contents = multicolumn(modules, modulelink) results.append(section("Modules", "#fffff", "#aa55cc", contents)) if classes: contents = document_tree(inspect.getclasstree(classes), name, cdict) for item in classes: contents.append(document_class(item, fdict, cdict)) results.append(section("Classes", "#ffffff", "#ee77aa", contents)) if functions: contents = [] for item in functions: contents.append(document_function(item, fdict, cdict)) results.append(section("Functions", "#ffffff", "#eeaa77", contents)) return results def document_class(object, functions={}, classes={}): """Produce HTML documentation for a given class object.""" name = object.__name__ bases = object.__bases__ results = [] methods, mdict = [], {} for key, value in inspect.getmembers(object, inspect.ismethod): methods.append(value) mdict[key] = mdict[value] = "#" + name + "-" + key if methods: for item in methods: results.append(document_method( item, functions, classes, mdict, name)) title = "class %s" % (name, name) if bases: parents = [] for base in bases: parents.append(classlink(base, object.__module__, classes)) title = title + "(%s)" % string.join(parents, ", ") doc = markup(getdoc(object), functions, classes, mdict, escape=preformat) if doc: doc = "" + doc + "
     
    " else: doc = "no doc string" return section(title, "#000000", "#ffc8d8", results, 10, doc) def document_method(object, functions={}, classes={}, methods={}, clname=""): """Produce HTML documentation for a given method object.""" return document_function( object.im_func, functions, classes, methods, clname) def defaultformat(object): return """=""" + \ htmlrepr(object) + "" def document_function(object, functions={}, classes={}, methods={}, clname=""): """Produce HTML documentation for a given function object.""" try: args, varargs, varkw, defaults = inspect.getargspec(object) argspec = inspect.formatargspec( args, varargs, varkw, defaults, defaultformat=defaultformat) except TypeError: argspec = "(no arg info)" if object.__name__ == "": decl = ["lambda ", argspec[1:-1]] else: anchor = clname + "-" + object.__name__ decl = ["" % anchor, "%s" % object.__name__, argspec, "\n"] doc = markup(getdoc(object), functions, classes, methods, escape=preformat) if doc: doc = string.replace(doc, "
    \n", "

    ") doc = ["
    ", doc, ""] else: doc = "
    no doc string" return ["
    ", decl, doc, "
    "] def document_builtin(object): """Produce HTML documentation for a given built-in function.""" return ("%s" % object.__name__ + "(no arg info)") # --------------------------------------------------- main dispatch routine def document(object): """Generate documentation for a given object.""" if inspect.ismodule(object): results = document_module(object) elif inspect.isclass(object): results = document_class(object) elif inspect.ismethod(object): results = document_method(object) elif inspect.isfunction(object): results = document_function(object) elif inspect.isbuiltin(object): results = document_builtin(object) else: raise TypeError, "don't know how to document this kind of object" return serialize(results) def serialize(list): """Combine a list containing strings and nested lists into a single string. This lets us manipulate lists until the last moment, since rearranging lists is faster than rearranging strings.""" results = [] for item in list: if type(item) is type(""): results.append(item) else: results.append(serialize(item)) return string.join(results, "") if __name__ == "__main__": import os modnames = [] for arg in sys.argv[1:]: if os.path.isdir(arg): for file in os.listdir(arg): if file[-3:] == ".py": modnames.append(file[:-3]) elif file[-9:] == "module.so": modnames.append(file[:-9]) else: if arg[-3:] == ".py": modnames.append(arg[:-3]) else: modnames.append(arg) for modname in modnames: try: module = __import__(modname) except: print "failed to import %s" % modname else: file = open(modname + ".html", "w") file.write( """ %s """ % modname) file.write(document(module)) file.write("") file.close() print "wrote %s.html" % modname --- NEW FILE --- """Get useful information from live Python objects. This module encapsulates the interface provided by the internal special attributes (func_*, co_*, im_*, tb_*, etc.) in a friendlier fashion. It also provides some help for examining source code and class layout. Here are some of the useful functions provided by this module: getdoc(), getcomments() - get documentation on an object getclasstree() - arrange classes so as to represent their hierarchy getfile(), getsourcefile(), getsource() - find an object's source code getargspec(), getargvalues() - get info about function arguments formatargspec(), formatargvalues() - format an argument spec stack(), trace() - get info about frames on the stack or in a traceback """ # I, Ka-Ping Yee, the author of this contribution, hereby grant to anyone and # everyone a nonexclusive, irrevocable, royalty-free, worldwide license to # reproduce, distribute, perform and/or display publicly, prepare derivative # versions, and otherwise use this contribution in any fashion, or any # derivative versions thereof, at no cost to anyone, and to authorize others # to do so. This software is provided "as is", with NO WARRANTY WHATSOEVER, # not even a warranty of merchantability or fitness for any particular purpose. __version__ = "Ka-Ping Yee , 29 May 2000" import sys, types, string, dis, imp # ----------------------------------------------------------- type-checking def ismodule(object): """Is the object a module with the __file__ special attribute?""" return type(object) is types.ModuleType def isclass(object): """Is the object a class with the __module__ special attribute?""" return type(object) is types.ClassType def ismethod(object): """Is the object a method with the im_* set of special attributes?""" return type(object) is types.MethodType def isfunction(object): """Is the object a function with the func_* set of special attributes?""" return type(object) in [types.FunctionType, types.LambdaType] def istraceback(object): """Is the object a traceback with the tb_* set of special attributes?""" return type(object) is types.TracebackType def isframe(object): """Is the object a frame object with the f_* set of special attributes?""" return type(object) is types.FrameType def iscode(object): """Is the object a code object with the co_* set of special attributes?""" return type(object) is types.CodeType def isbuiltin(object): """Is the object a callable function providing no special attributes?""" return type(object) in [types.BuiltinFunctionType, types.BuiltinMethodType] def isroutine(object): """Is the object any of the built-in or user-defined function types?""" return type(object) in [types.FunctionType, types.LambdaType, types.MethodType, types.BuiltinFunctionType, types.BuiltinMethodType] def getmembers(object, predicate=lambda x: 1): """Return all members of an object as (key, value) pairs sorted by key. Optionally, only return members that satisfy a given predicate.""" results = [] for key in object.__dict__.keys(): value = getattr(object, key) if predicate(value): results.append((key, value)) results.sort() return results # -------------------------------------------------- source code extraction def indentsize(line): """Return the indent size, in spaces, at the start of a line of text.""" expline = string.expandtabs(line) return len(expline) - len(string.lstrip(expline)) def getdoc(object): """Get the documentation string for an object.""" if not hasattr(object, "__doc__"): raise TypeError, "arg has no __doc__ attribute" if object.__doc__: lines = string.split(string.expandtabs(object.__doc__), "\n") margin = None for line in lines[1:]: content = len(string.lstrip(line)) if not content: continue indent = len(line) - content if margin is None: margin = indent else: margin = min(margin, indent) if margin is not None: for i in range(1, len(lines)): lines[i] = lines[i][margin:] return string.join(lines, "\n") def getfile(object): """Try to guess which (text or binary) file an object was defined in.""" if ismodule(object): return imp.find_module(object.__name__)[1] if isclass(object): return imp.find_module(object.__module__)[1] if ismethod(object): object = object.im_func if isfunction(object): object = object.func_code if istraceback(object): object = object.tb_frame if isframe(object): object = object.f_code if iscode(object): return object.co_filename raise TypeError, "arg is not a module, class, method, " \ "function, traceback, frame, or code object" def getsourcefile(object): """Try to guess which Python source file an object was defined in.""" filename = getfile(object) if filename[-4:] == ".pyc": filename = filename[:-4] + ".py" return filename def findsource(object): """Find the first line of code corresponding to a given module, class, method, function, traceback, frame, or code object; return the entire contents of the source file and the starting line number. An IOError exception is raised if the source code cannot be retrieved.""" try: file = open(getsourcefile(object)) lines = file.readlines() file.close() except (TypeError, IOError): raise IOError, "could not get source code" if ismodule(object): return lines, 0 if isclass(object): name = object.__name__ matches = (["class", name], ["class", name + ":"]) for i in range(len(lines)): if string.split(lines[i])[:2] in matches: return lines, i else: raise IOError, "could not find class definition" if ismethod(object): object = object.im_func if isfunction(object): object = object.func_code if istraceback(object): object = object.tb_frame if isframe(object): object = object.f_code if iscode(object): try: lnum = object.co_firstlineno except AttributeError: pass else: while lnum > 0: if string.split(lines[lnum])[:1] == ["def"]: break lnum = lnum - 1 return lines, lnum raise IOError, "could not find function definition" def getcomments(object): """Look for preceding lines of comments in an object's source code.""" lines, lnum = findsource(object) if ismodule(object): # Look for a comment block at the top of the file. start = 0 if lines[0][:2] == "#!": start = 1 while start < len(lines) and string.strip(lines[start]) in ["", "#"]: start = start + 1 if lines[start][:1] == "#": end = start while end < len(lines) and lines[end][:1] == "#": end = end + 1 return string.join(lines[start:end], "") else: return None # Look for a preceding block of comments at the same indentation. elif lnum > 0: indent = indentsize(lines[lnum]) end = lnum - 1 if string.strip(lines[end]) == "": while end >= 0 and string.strip(lines[end]) == "": end = end - 1 else: while string.lstrip(lines[end])[:1] != "#" and \ indentsize(lines[end]) == indent: end = end - 1 if end >= 0 and string.lstrip(lines[end])[:1] == "#" and \ indentsize(lines[end]) == indent: comments = [string.lstrip(lines[end])] if end > 0: end = end - 1 comment = string.lstrip(lines[end]) while comment[:1] == "#" and indentsize(lines[end]) == indent: comments[:0] = [comment] end = end - 1 if end < 0: break comment = string.lstrip(lines[end]) return string.join(comments, "") import tokenize class ListReader: """Provide a readline() method to return lines from a list of strings.""" def __init__(self, lines): self.lines = lines self.index = 0 def readline(self): i = self.index if i < len(self.lines): self.index = i + 1 return self.lines[i] else: return "" class EndOfBlock(Exception): pass class BlockFinder: """Provide a tokeneater() method to detect the end of a code block.""" def __init__(self): self.indent = 0 self.started = 0 self.last = 0 def tokeneater(self, type, token, (srow, scol), (erow, ecol), line): if not self.started: if type == tokenize.NAME: self.started = 1 elif type == tokenize.NEWLINE: self.last = srow elif type == tokenize.INDENT: self.indent = self.indent + 1 elif type == tokenize.DEDENT: self.indent = self.indent - 1 if self.indent == 0: raise EndOfBlock, self.last def getblock(lines): """Extract the block of code at the top of the given list of lines.""" try: tokenize.tokenize(ListReader(lines).readline, BlockFinder().tokeneater) except EndOfBlock, eob: return lines[:eob.args[0]] def getsource(object): """Try to get the source code corresponding to a module, class, method, function, traceback, frame, or code object. Return a list of lines of text and the line number of the first line. An IOError exception is raised if the source code cannot be retrieved.""" lines, lnum = findsource(object) if ismodule(object): return lines else: return getblock(lines[lnum:]), lnum # --------------------------------------------------- class tree extraction def walktree(classes, children, parent): """Recursive helper function for getclasstree().""" results = [] classes.sort(lambda a, b: a.__name__ > b.__name__ and 1 or -1) for c in classes: if c.__bases__ and c.__bases__ != (parent,): results.append((c, c.__bases__)) else: results.append((c, None)) if children.has_key(c): results.append(walktree(children[c], children, c)) return results def getclasstree(classes): """Arrange the given list of classes into a hierarchy of nested lists. Where a nested list appears, it contains classes derived from the class whose entry immediately precedes the list. Each entry is a 2-tuple containing a class and a list of bases, where the list of bases only appears if the class inherits in a way not already implied by the tree structure (i.e. it inherits from multiple bases, or inherits from a class not present in the tree). Exactly one entry appears in the returned structure for each class in the given list.""" children = {} roots = [] for c in classes: if c.__bases__: for parent in c.__bases__: if not children.has_key(parent): children[parent] = [] children[parent].append(c) if parent in classes: break elif c not in roots: roots.append(c) for parent in children.keys(): if parent not in classes: roots.append(parent) return walktree(roots, children, None) # ------------------------------------------------ argument list extraction # These constants are from Python's compile.h. CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS = 1, 2, 4, 8 def getargs(co): """Get information about the arguments accepted by a code object. Three things are returned: (args, varargs, varkw), where 'args' is a list of argument names (possibly containing nested lists), and 'varargs' and 'varkw' are the names of the * and ** arguments or None.""" if not iscode(co): raise TypeError, "arg is not a code object" code = co.co_code nargs = co.co_argcount names = co.co_varnames args = list(names[:nargs]) step = 0 # The following acrobatics are for anonymous (tuple) arguments. for i in range(nargs): if args[i][:1] in ["", "."]: stack, remain, count = [], [], [] while step < len(code): op = ord(code[step]) step = step + 1 if op >= dis.HAVE_ARGUMENT: opname = dis.opname[op] value = ord(code[step]) + ord(code[step+1])*2 step = step + 2 if opname == "UNPACK_TUPLE": remain.append(value) count.append(value) elif opname == "STORE_FAST": stack.append(names[value]) remain[-1] = remain[-1] - 1 while remain[-1] == 0: remain.pop() size = count.pop() stack[-size:] = [stack[-size:]] if not remain: break remain[-1] = remain[-1] - 1 if not remain: break args[i] = stack[0] varargs = None if co.co_flags & CO_VARARGS: varargs = co.co_varnames[nargs] nargs = nargs + 1 varkw = None if co.co_flags & CO_VARKEYWORDS: varkw = co.co_varnames[nargs] return args, varargs, varkw def getargspec(func): """Get the names and default values of a function's arguments. A tuple of four things is returned: (args, varargs, varkw, defaults). 'args' is a list of the argument names (it may contain nested lists). 'defaults' is an n-tuple of the default values of the last n arguments. 'varargs' and 'varkw' are the names of the * and ** arguments or None.""" if not isfunction(func): raise TypeError, "arg is not a Python function" args, varargs, varkw = getargs(func.func_code) return args, varargs, varkw, func.func_defaults def getargvalues(frame): """Get information about arguments passed into a particular frame.""" args, varargs, varkw = getargs(frame.f_code) return args, varargs, varkw, frame.f_locals def strtuple(object, convert=str): """Recursively walk a tuple, stringifying each element.""" if type(object) in [type(()), type([])]: results = map(strtuple, object) if len(results) == 1: return "(" + results[0] + ",)" else: return "(" + string.join(results, ", ") + ")" else: return convert(object) def formatargspec(args, varargs=None, varkw=None, defaults=None, argformat=str, defaultformat=lambda x: "=" + repr(x), varargsformat=lambda name: "*" + name, varkwformat=lambda name: "**" + name): """Make a nicely-formatted argument spec from the output of getargspec.""" specs = [] if defaults: firstdefault = len(args) - len(defaults) for i in range(len(args)): spec = strtuple(args[i], argformat) if defaults and i >= firstdefault: spec = spec + defaultformat(defaults[i - firstdefault]) specs.append(spec) if varargs: specs.append(varargsformat(varargs)) if varkw: specs.append(varkwformat(varkw)) return "(" + string.join(specs, ", ") + ")" def formatargvalues(args, varargs=None, varkw=None, locals=None, argformat=str, valueformat=repr, varargsformat=lambda name: "*" + name, varkwformat=lambda name: "**" + name): """Make a nicely-formatted argument spec from the output of getargvalues.""" def convert(name, locals=locals, argformat=argformat, valueformat=valueformat): return argformat(name) + "=" + valueformat(locals[name]) specs = [] for i in range(len(args)): specs.append(strtuple(args[i], convert)) if varargs: specs.append(varargsformat(varargs)) if varkw: specs.append(varkwformat(varkw)) return "(" + string.join(specs, ", ") + ")" # -------------------------------------------------- stack frame extraction def getframe(frame, context=1): """For a given frame or traceback object, return the filename, line number, function name, a given number of lines of context from the source code, and the index of the line within the lines of context.""" if istraceback(frame): frame = frame.tb_frame if not isframe(frame): raise TypeError, "arg is not a frame or traceback object" filename = getsourcefile(frame) if context > 0: start = frame.f_lineno - 1 - context/2 try: lines, lnum = findsource(frame) start = min(start, 1) start = max(start, len(lines) - context) lines = lines[start:start+context] index = frame.f_lineno - 1 - start except: lines = index = None else: lines = index = None return (filename, frame.f_lineno, frame.f_code.co_name, lines, index) def getouterframes(frame, context=1): """Get a list of records for a frame and all higher (calling) frames. Each record contains a frame object, filename, line number, function name, the requested amount of context, and index within the context.""" framelist = [] while frame: framelist.append((frame,) + getframe(frame, context)) frame = frame.f_back return framelist def getinnerframes(traceback, context=1): """Get a list of records for a traceback's frame and all lower frames. Each record contains a frame object, filename, line number, function name, the requested amount of context, and index within the context.""" traceback = traceback.tb_next framelist = [] while traceback: framelist.append((frame,) + getframe(traceback, context)) traceback = traceback.tb_next return framelist def currentframe(): """Return the frame object for the caller's stack frame.""" try: raise "catch me" except: return sys.exc_traceback.tb_frame.f_back def stack(context=1): """Return a list of records for the stack above the caller's frame.""" return getouterframes(currentframe().f_back, context) def trace(context=1): """Return a list of records for the stack below the current exception.""" return getinnerframes(sys.exc_traceback, context) --- NEW FILE --- """ Online help module. This module is experimental and could be removed or radically changed at any time. It is intended specifically for the standard interpreter command line but is intended to be compatible with and useful for other (e.g. GUI, handheld) environments. Help with those other environments is appreciated. Please remember to set PYTHONDOCS to the location of your HTML files: e.g. set PYTHONDOCS=c:\python\docs PYTHONDOCS=/python/docs The docs directory should have a lib subdirectory with "index.html" in it. If it has *.tex then you have the documentation *source* distribution, not the runtime distribution. The module exposes one object: "help". "help" has a repr that does something useful if you just type: >>> from onlinehelp import help >>> help Of course one day the first line will be done automatically by site.py or something like that. help can be used as a function. The function takes the following forms of input: help( "string" ) -- built-in topic or global help( ) -- docstring from object or type help( "doc:filename" ) -- filename from Python documentation Type help to get the rest of the instructions. You can also use the module as a command line program: python onlinehelp.py if """ # I, Paul Prescod, the author of this contribution, hereby grant to anyone and # everyone a nonexclusive, irrevocable, royalty-free, worldwide license to # reproduce, distribute, perform and/or display publicly, prepare derivative # versions, and otherwise use this contribution in any fashion, or any # derivative versions thereof, at no cost to anyone, and to authorize others to # do so. This software is provided "as is", with NO WARRANTY WHATSOEVER, not # even a warranty of merchantability or fitness for any particular purpose. # todo: consider following links: # help( 3 ) -> follows link 3 in the last-displayed doc # help( 4 ) -> follows link 4 in the last-displayed doc # ... # Steal some ideas from hack.py about fetching module globals # and class methods import htmllib # todo: add really basic tr/td support import formatter import os, sys import re prompt="--more-- (enter for more, q to quit) " topics={} # all built-in (non-HTML, non-docstring) topics go in here commands="" # only used at the top level def topLevelCommand( name, description, text ): """ this function is just for use at the top-level to make sure that every advertised top-level topic has a description and every description has text. Maybe we can generalize it later.""" global commands topics[name]=text if description[0]=="[": placeholder="(dummy)" elif description[0]=="<": placeholder="link" else: placeholder="" commands=commands+'help( "%s" ) %s - %s\n' % \ (name, placeholder, description ) topLevelCommand( "intro", "What is Python? Read this first!", """Welcome to Python, the easy to learn, portable, object oriented programming language. [info on how to use help] [info on intepreter]""" ) topLevelCommand( "keywords", "What are the keywords?", "") topLevelCommand( "syntax", "What is the overall syntax?", "[placeholder]") topLevelCommand( "operators", "What operators are available?", "" ) topLevelCommand( "builtins", "What functions, types, etc. are built-in?", "") topLevelCommand( "modules", "What modules are in the standard library?", "") topLevelCommand( "copyright", "Who owns Python?", "[who knows]") topLevelCommand( "moreinfo", "Where is there more information?", "[placeholder]") topLevelCommand( "changes", "What changed in Python 2.0?", "[placeholder]" ) topLevelCommand( "extensions", "What extensions are installed?", "[placeholder]") topLevelCommand( "faq", "What questions are frequently asked?", "[placeholder]") topLevelCommand( "ack", "Who has done work on Python lately?", "[placeholder for list of people who contributed patches]") topics[ "prompt" ]="""""" topics[ "types" ]="""""" topics["everything"]= \ """
    The help function allows you to read help on Python's various 
    functions, objects, instructions and modules. You have two options:
    
    1. Use help( obj ) to browse the help attached to some function, module
    class or other object. e.g. help( dir )
    
    2. Use help( "somestring" ) to browse help on one of the predefined 
    help topics, unassociated with any particular object:
    
    %s
    """ % commands topics[ "keywords" ]=\ """
    "if"       - Conditional execution
    "while"    - Loop while a condition is true
    "for"      - Loop over a sequence of values (often numbers)
    "try"      - Set up an exception handler
    "def"      - Define a named function
    "class"    - Define a class
    "assert"   - Check that some code is working as you expect it to.
    "pass"     - Do nothing
    "del"      - Delete a data value
    "print"    - Print a value
    "return"   - Return information from a function
    "raise"    - Raise an exception
    "break"    - Terminate a loop
    "continue" - Skip to the next loop statement
    "import"   - Import a module
    "global"   - Declare a variable global
    "exec"     - Execute some dynamically generated code
    "lambda"   - Define an unnamed function
    
    For more information, type e.g. help("assert")
    """ topics[ "if" ]="""""" topics[ "while" ]="""""" topics[ "for" ]="""""" topics[ "try" ]="""""" topics[ "def" ]="""""" topics[ "class" ]="""""" topics[ "assert" ]="""""" topics[ "pass" ]="""""" topics[ "del" ]="""""" topics[ "print" ]="""""" topics[ "return" ]="""""" topics[ "raise" ]="""""" topics[ "break" ]="""""" topics[ "continue" ]="""""" topics[ "import" ]="""""" topics[ "global" ]="""""" topics[ "exec" ]="""""" topics[ "lambda" ]="""""" topics[ "me" ]="""Python helps those who help themselves. :) Try help( "intro" ) or help( "faq" )""" envir_var="PYTHONDOCS" class Help: def __init__( self, out, line_length, docdir=None ): self.out=out self.line_length=line_length self.Parser=htmllib.HTMLParser self.Formatter=formatter.AbstractFormatter self.Pager=Pager self.Writer=formatter.DumbWriter self.docdir=docdir def initDocDir( self ): if os.environ.has_key(envir_var): self.docdir=os.environ[envir_var] else: if os.environ.has_key("PYTHONHOME"): pyhome=os.environ["PYTHONHOME"] else: pyhome=os.path.split( sys.executable )[0] self.docdir=os.path.join( pyhome, "doc" ) testfile=os.path.join( os.path.join( self.docdir, "lib" ), "index.html") if not os.path.exists( testfile ): error = \ """Cannot find documentation directory %s. Set the %s environment variable to point to a "doc" directory. It should have a subdirectory "Lib" with a file named "index.html". """ % (self.docdir, envir_var ) raise EnvironmentError, error def __repr__( self ): self( "everything" ) return "" def __call__( self, ob, out=None ): try: self.call( ob, out ) return 1 except (KeyboardInterrupt, EOFError): return 0 def call( self, ob, out ): self.pager=out or self.Pager( self.out, self.line_length ) if type( ob ) in (type(""),type(u"")): if ob.startswith( "<" ): ob=ob[1:] if ob.endswith( ">" ): ob=ob[:-1] self.write( 'Topic: help( "%s" )\n' % ob ) if ob.startswith("doc:"): path=ob[4:] if not self.docdir: self.initDocDir() fullpath=os.path.join( self.docdir, path ) data=open( fullpath ).read() index=ob.rfind( "/" ) self.writeHTML( ob[:index], data ) else: try: info=topics[ob] docrlmatch=re.search( "(]+>)", info.split("\n")[0] ) if docrlmatch: # a first-line redirect self( docrlmatch.group(1) ) else: self.writeHTML( "", info ) except KeyError: glo=__builtins__.__dict__.get( ob, 0 ) if glo: self( glo ) else: sys.stderr.write( "No such topic "+`ob` ) return None else: self.write( 'Topic: help( %s )\n' % ob ) self.writeText( self.getdoc( ob ) ) def getdoc( self, ob ): if hasattr( ob, "__doc__" ): return ob.__doc__ else: type( ob ).__doc__ def writeHTML( self, base, str ): parser=self.Parser(self.Formatter( self.Writer( self ))) parser.feed( str ) # calls self.write automatically for i in range( len( parser.anchorlist) ): self.pager.write( "[%s] %s/%s\n" %(i+1, base,parser.anchorlist[i] )) self.pager.flush() self.out.write( "\n" ) def writeText( self, str ): self.pager.write( str ) self.pager.flush() self.out.write( "\n" ) def write( self, str ): self.pager.write( str ) from cStringIO import StringIO class Pager: numlines=1 def __init__(self, out, pagesize=24, linestart="" ): self.out=out self.pagesize=pagesize self.buf=StringIO() self.linestart=linestart def close(self ): self.flush() def flush(self ): data=self.buf.getvalue().rstrip() # dump trailing ws while data.endswith( "\n|" ): # dump trailing lines data=data[:-2] self.out.write( data ) self.buf=StringIO() def write(self, str ): lines=str.split( "\n" ) self.buf.write( lines[0] ) for line in lines[1:]: self.buf.write( "\n| " ) self.buf.write( line ) if self.numlines and not self.numlines%(self.pagesize): dat=self.buf.getvalue().strip() self.out.write( "| " ) self.out.write( dat ) self.out.write( "\n" ) j=raw_input(prompt) if j and j[0]=="q": raise EOFError self.buf=StringIO() self.numlines=self.numlines+1 help=Help(sys.stdout,24) def test(): rc = 1 rc = rc and help( "everything" ) rc = rc and help( "exec" ) rc = rc and help( "doc:lib/unix.html" ) rc = rc and help( "doc:lib/module-tty.html" ) rc = rc and help( "doc:ref/print.html" ) rc = rc and help( "faq" ) rc = rc and help( dir ) repr( help ) if __name__=="__main__": if len( sys.argv )!=2: print "Usage: %s or %s test" % ( sys.argv[0], sys.argv[0] ) sys.exit(0) elif sys.argv[1]=="test": test() else: help( eval( sys.argv[1] ) ) From python-dev@python.org Fri Jul 21 22:43:11 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 21 Jul 2000 14:43:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-win winreg.py,1.3,1.4 Message-ID: <200007212143.OAA23949@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/plat-win In directory slayer.i.sourceforge.net:/tmp/cvs-serv23894 Modified Files: winreg.py Log Message: Added docstrings Index: winreg.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/plat-win/winreg.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** winreg.py 2000/07/01 20:57:03 1.3 --- winreg.py 2000/07/21 21:43:09 1.4 *************** *** 1,2 **** --- 1,33 ---- + """ + Windows registry support. + + openKey( keyname ) + open existing key object + + >>> key=openKey( r"HKLM\HARDWARE\DESCRIPTION\System" ) + + createKey( keyname ) + create a key if it doesn't already exist + + >>> key=createKey( r"HKLM\SOFTWARE\Python\Test" ) + + deleteKey( keyname ) + delete a key if it exists + Note: deleteKey may not be recursive on all platforms. + + >>> key=createKey( r"HKLM\SOFTWARE\Python\Test" ) + + RemoteKey( machine, top_level_key ): + open a key on another machine. + You can use the returned key as a basis for opens, creates and deletes + on the other machine. + + >>> key=RemoteKey( "somemachine", "HKLM" ) + + For information on the key API, open a key and look at its docstring. + + + """ + import _winreg import sys *************** *** 7,10 **** --- 38,42 ---- class RegType: + "Represents one of the types that can go into the registry" def __init__( self, msname, friendlyname ): self.msname=msname *************** *** 13,16 **** --- 45,49 ---- def __repr__( self ): + "Return a useful representation of the type object" return "" % \ (self.intval, self.msname, self.friendlyname ) *************** *** 50,61 **** --- 83,97 ---- class _DictBase: + "Base class for dictionary-type objects" def __init__( self, key ): self.key=key def clear( self ): + "Clear the list of keys/data values, as in dictionaries" keys=list( self.keys() ) map( self.__delitem__, keys ) def get( self, item, defaultVal=None ): + "Get a key/value by name or index" try: return self.__getitem__( item ) *************** *** 64,67 **** --- 100,104 ---- def has_key( self, item ): + "Check if a key/data value with a particular name exists" try: self.__getitem__( item ) *************** *** 71,74 **** --- 108,112 ---- def keys( self ): + "Get a list of key/data value names" keys=[] try: *************** *** 81,84 **** --- 119,123 ---- def values( self ): + "Get a list of key objects or data values" values=[] # map() doesn't use the IndexError semantics... for i in self: *************** *** 87,90 **** --- 126,130 ---- def items( self ): + "Get pairs of keyname/key object or valuename/value data" return map( None, self.keys(), self.values() ) *************** *** 93,96 **** --- 133,137 ---- def _getName( item, nameFromNum ): + "Helper function -- don't use it directly" if type( item ) == IntType: try: *************** *** 108,111 **** --- 149,153 ---- class RegValuesDict( _DictBase ): + "A dictionary of registry data values" def _nameFromNum( self, i ): return self.key._nameFromNum( i ) *************** *** 125,131 **** valname=_getName( item, self._nameFromNum ) self.key.deleteValue( valname ) - class RegKeysDict( _DictBase ): def _nameFromNum( self, item ): return _winreg.EnumKey( self.key.handle, item ) --- 167,173 ---- valname=_getName( item, self._nameFromNum ) self.key.deleteValue( valname ) class RegKeysDict( _DictBase ): + "A dictionary of registry keys" def _nameFromNum( self, item ): return _winreg.EnumKey( self.key.handle, item ) *************** *** 140,143 **** --- 182,186 ---- def openKey( keyname, samFlags=None ): + "Open a key by name" lst=string.split( keyname, "\\", 1 ) if len( lst )==2: *************** *** 162,170 **** --- 205,221 ---- class RegKey: + "A registry key object" + + def __init__( self, name, handle=None ): + self.name=name + self.handle=handle + def _nameFromNum( self, item ): + "internal" (name,data,datatype)=_winreg.EnumValue( self.handle, item ) return name def __nonzero__(self): + "Is the key open?" if self.handle: return 1 *************** *** 173,176 **** --- 224,228 ---- def __cmp__ (self, other ): + "Compare two keys for equality" if hasattr( other, "handle" ) and hasattr( other, "name" ): return cmp( self.name, other.name ) *************** *** 178,208 **** return cmp( self.handle, other ) - def __init__( self, name, handle=None ): - self.name=name - self.handle=handle - def __repr__( self ): return ""% self.name def close(self ): return _winreg.CloseKey( self.handle ) def getSubkeyNames( self ): return self.getSubkeys().keys() def getValueNames( self ): return self.getValues().keys() def deleteSubkey( self, subkey ): return _winreg.DeleteKey( self.handle, subkey ) def deleteValue( self, valname ): return _winreg.DeleteValue( self.handle, valname ) def createSubkey( self, keyname ): handle=_winreg.CreateKey( self.handle, keyname ) return RegKey( self.name+"\\"+keyname, handle) def openSubkey( self, keyname, samFlags=None ): if samFlags: handle=_winreg.OpenKey( self.handle, keyname, 0, samFlags ) --- 230,263 ---- return cmp( self.handle, other ) def __repr__( self ): return ""% self.name def close(self ): + "Close the key" return _winreg.CloseKey( self.handle ) def getSubkeyNames( self ): + "Get a list of subkey names" return self.getSubkeys().keys() def getValueNames( self ): + "Get a list of value names" return self.getValues().keys() def deleteSubkey( self, subkey ): + "Delete a subkey by name" return _winreg.DeleteKey( self.handle, subkey ) def deleteValue( self, valname ): + "Delete a value by name" return _winreg.DeleteValue( self.handle, valname ) def createSubkey( self, keyname ): + "Create a subkey by name" handle=_winreg.CreateKey( self.handle, keyname ) return RegKey( self.name+"\\"+keyname, handle) def openSubkey( self, keyname, samFlags=None ): + "Open a named subkey" if samFlags: handle=_winreg.OpenKey( self.handle, keyname, 0, samFlags ) *************** *** 212,221 **** --- 267,279 ---- def getSubkeys( self ): + "Get a dictionary-like mapping of subkeys" return RegKeysDict( self ) def getValues( self ): + "Get a dictionary-like mapping of data values" return RegValuesDict( self ) def getValueNameDataAndType( self, valname ): + "Get a data value's name, data and type all at one time" try: if type( valname )==IntType: *************** *** 234,241 **** --- 292,301 ---- def getValueData( self, valname ): + "Get a data value's data." name, data, type=self.getValueNameDataAndType( valname ) return data def setValue( self, valname, data, regtype=None ): + "Set a data value's data (and optionally type)" if regtype: typeint=regtype.intval *************** *** 251,264 **** --- 311,330 ---- def flush(self ): + "Make sure that all changes are written to the registry. " + "Only use this if you know what you are doing. " + "It isn't usually needed." _winreg.FlushKey( self.keyobbj ) def save( self, filename ): + "Save a key to a filename" _winreg.SaveKey( self.keyobj, filename ) def load( self, subkey, filename ): + "Load a key from a filename" return _winreg.RegLoadKey( self.handle, subkey, filename ) class RemoteKey( RegKey ): + "Open a key on a remote machine" def __init__( self, machine, topLevelKey ): assert topLevelKey in _hivenames From python-dev@python.org Fri Jul 21 22:59:32 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 21 Jul 2000 14:59:32 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0213.txt,1.2,1.3 Message-ID: <200007212159.OAA25133@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv25071 Modified Files: pep-0213.txt Log Message: Update suggested by gmcm -- method is stored in dict alongside attribute access handler Index: pep-0213.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0213.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pep-0213.txt 2000/07/21 21:14:26 1.2 --- pep-0213.txt 2000/07/21 21:59:29 1.3 *************** *** 134,144 **** method (pointer to a method object ! In PyClass_New, methods of ! the appropriate form will be detected and converted into objects ! (just like unbound method objects). If there are any attribute access ! handlers in an instance at all, a flag is set. Let's call ! it "I_have_computed_attributes" for now. Derived classes inherit ! the flag from base classes. Instances inherit the flag from ! classes. A get proceeds as usual until just before the object is returned. --- 134,146 ---- method (pointer to a method object ! In PyClass_New, methods of the appropriate form will be detected and ! converted into objects (just like unbound method objects). These are ! stored in the class __dict__ under the name XXX. The original method ! is stored as an unbound method under its original name. ! ! If there are any attribute access handlers in an instance at all, ! a flag is set. Let's call it "I_have_computed_attributes" for ! now. Derived classes inherit the flag from base classes. Instances ! inherit the flag from classes. A get proceeds as usual until just before the object is returned. From python-dev@python.org Fri Jul 21 23:05:51 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 21 Jul 2000 15:05:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/dom minidom.py,1.4,1.5 Message-ID: <200007212205.PAA32747@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv32732 Modified Files: minidom.py Log Message: Added a few docstrings Index: minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/minidom.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** minidom.py 2000/07/04 03:39:33 1.4 --- minidom.py 2000/07/21 22:05:49 1.5 *************** *** 7,10 **** --- 7,14 ---- minidom.py -- a lightweight DOM implementation based on SAX. + parse( "foo.xml" ) + + parseString( "" ) + Todo: ===== *************** *** 441,446 **** --- 445,453 ---- def parse( *args, **kwargs ): + "Parse a file into a DOM by filename or file object" return _doparse( pulldom.parse, args, kwargs ) def parseString( *args, **kwargs ): + "Parse a file into a DOM from a string" return _doparse( pulldom.parseString, args, kwargs ) + From python-dev@python.org Sat Jul 22 03:53:13 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Fri, 21 Jul 2000 19:53:13 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html at.gif,NONE,1.1 py.gif,NONE,1.1 sf.gif,NONE,1.1 index.html,1.2,1.3 Message-ID: <200007220253.TAA12076@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv11882 Modified Files: index.html Added Files: at.gif py.gif sf.gif Log Message: rewrite of python at sf main page according to: - big link to python.org - "keep it simple, schneider-kamp" --- NEW FILE --- GIF89aT 0³çΟ0Ô´)±äKž3œ\Êr€Î–(‰:t‰Ô%Ó«LÂŒ*5! €K»xÝÚ5-T· Åê%Ú—§Ò±¯Æ´‰ó/d‹Ki¦lëÍ“;Œ¬|˜iÇÌBE¼ô#h˜!+¿¼ºtÏÔ{4©ÙãW¤´½RúÓoÉŸ{š û±ålÓûpŽZ§ßç»Y?í·´É„Ÿ3ÿ­úÓ.ZºJ;j}|2:Oì±îœÉöûnžq7~íÞú`_§õžwçñ4TF¿YÕÞAeÅ7P&·Ò~b”Thà]·-¸Ûa7ýå §ÜqŽ螊ý¶a…­Æš}ý÷kÑ•–‘s[ÑX£s3J8PRñ­ècE7âxcNa¸dPJÄŒ5èa):‰}E>ÉâE@^9ÐuMŠyrGD•EeɦåEXUr"ÔÙ›‰=™Y_À¥©á“ èõ(dA`Õ)¥¢‹æ9ßžRþ¥ãB9]º$¡˜iõ¥šë}êX~®T&ž’®)dhªÖ¶Z©ó•ÿQZŠ2˜S á©â¡ú]šZ  eJi†Fš'\ˆÞZŸ«9‰*ÐuZV¬‚£vgžW`;h!Î÷ŸÃFʳ0þ‚•­Å¦Quå—KUùøŸ‰:›´2y`c¼yú¯cø"Xnó:·«™æE[@&ëkQií{^SPGÀ[“–÷bµ-^+o&:i„ ñ(¢X®¡Ø$¿™¡ŒÕ­mÅV~B ¦óĘÑ[ÌxM4IÇ°pÎC¦RÉO!}Ù\5SÆ[–Ñ µÕ›•Ü°\-/·ðÈ\¶œ±ÊZ‹pÖ%/LØgT•ÍÑxÝkí«‚‚t• --- NEW FILE --- GIF89aþ J´¨Q…b*]±‚ L£fœp´ªÕ«X­&ÊdŠ\£&ÈJ¶¬Ù³„j@áÖµK K·.Qp—6p˜WéX»€ ^vi6—RÅ °pª 1“ 2Ÿâo‚¢ËTü<3¨%*ÎnRq æ 7»˜9‘‚]›Ï‰<(ÂßXK)H‰Rø¨áž›sÆå/ä@1*Ã[ëR¼ö%èÙ —gâJ вym`ó¦õ…“ßiÙ8IÙ˲R³- ŸfkÉÒQÿ.¶ª¥+<™ÊZä$†¬¼]ËYѪ¯ÑR°»4ì[!R1ÈÂå;´-,TCÙZ¦,5¸×ý'ëD îÄĈ™;'S‹?ä¢ÏRYb‰DiÊ>-U«´ÌT S6×Íö…ª©±*SV4xͲ‚iÌ@¬)Îõ¨] j ßxÞžÂ9Áêh¦† ßÃåÖ¾“ÖG—R_ð€ ÁÙwàÕÑ , t2XÀÆh5^R‘Œ*³­¿l^3¶Ø ñK!”kÖÓ BX¦ÎÕK¾xz¸n×KYgõk0n˜¿”~3q±E>èÐÓ¤¬ÏªWŸ œÖÕ?ö¢RPŸ L†{€kidá%™˜ÞR7ÏL¾#¯¥¹†;t±/Œa¥ âREyjJ^iÚE‘|VjÑk.óÊå¹g?Ç–Î7>+à ~dψ„¹óDbÊ{îS‡?(‘y7¬65/D®#€ËyÌï ÝqøúçOÿìÿ…ܨª”¶êÏÿþkÿUÐ ±{ê’,J·„â!„“v¨(D¸-T?ˆ-´’pZ(*²)„ñ‚3ñr‚+óÁF 0ƒÒ é’ --- NEW FILE --- GIF89a|        #*'(-1"4&9*:*" "3 7:* $",. *("2":"1+4-5:-*!****"%:'*:*"<:#=::;"-C*-F"2G*2J*7Q2$@2+H:,M22L29Q2>X:5R:6Z:>Z2B^:B^:Fb:Jb:KjB J R Z( B 2b-b4j4o:b:2B)EE8TB>XJ>Vq@yG$rG:wN=BFXJC^]EGRAQRHQZI\BBbBIgBNjJJdJNiBRjBRrJRqJVzJZzRLbRIjZNaTRlSVxR_rRZyZ^}Z`qWFbS`l]hbXvbaxkbuzfr}oxrrrR^‚Rb‚Zb‚ZfŠZjˆbf‡bj‰ldƒjlˆbn–js‚jsŠbr‘jr–jv™jzrm†{o†rsˆx‡rv–r{šzs–z}šyƒy…¦zŠ¥‡aOŠe[Škb—o`”vu›{wŠ{Š‚}˜ž|‚©†}‚†‚Š„Š‚‚žŠ…œ–…žŒœ–––žžžŠ¥Š‹¥‚“®Š“®Š›²–£–“®™’¦ž•¯–š³žœ´–¡¶ž£¸¬“›§²®®®¦£º®¦½¶¦¶¾¾¾¤«À®«Ã¦³Æ®³Ç¶®Å¶³Êµ¼Î¾µÌ¾ºÎ¾ÂÔ¾ÊÖÅ®®Æ¯¶Î¿ÅƺÑÎÎÎÆÁÔÆÌÞÎÃÙÎÌÞÓÆÆÖÍÞÒÓÞÖÎæÖÖæÖÞæÞÒåÞÜéæÙëææçæàîîáîæçöæîõîèöîîûöæööêööö÷öñüþöþþþþüû ZjT(G‰þàÑ£ÏÒ¦O2m:u© DŽxÝÊuÔ ¨z H"‚,"ìˆ ˆÅT¢L¦†”—nÑEYdÿ©E–[lq%z.h™v„5H"Œ„ 'âU§v§"Š(Ɇ"Ê&¥¢á^x¡Åd–fС†àÚ‘F¢zôÇ‘ é4£Í0–v±Eˆ ’®¦$©yYny j·XN›Eÿ]ùÃ?`fo±z‘…­†aF¯G^…È"›4âì°Žh2)ʆ, #Œ Z¡l’H z ÿÁ›rñå4Óó`4™FàÞqhÔI>úh"ã‹¥?|aÒ}hꯇ\„¡hçš"ÒH·ÛþpOñq´"yL|p5haÇ ~gq .€HÇæ‰Øñuì]oÇ›„Br(Àæ͈v„ @÷a/"‰$rÇ<ÀÐÔåNO*‰‰ô ˆÏìªøŠ¥XxqÇùIŸ† „±I,º s 2Ï\M©³tÑ h@ã„F3lH@}à…,L$Š/´À¸ÇDñ _ @D,jQ‹XØÂÅpÆ3¦QžM0X~H RÀ,´6± "ù£Å1ÿŠá fÃÌX„|V®Híâ°ðÅؾŸé,`=˜À 8¡¿bð¢Ï7¶1ˆ6Á®áÆ3– çx£Å p  -ŒÓæÌ…1N¡ƒ –@¨ @¼807†a OáÿÕȆ2B<ÎÂc°=ƒPÎWÄÂr|Ð2RPbdDƒ›˜€ŠÁc¢%°ÁŒeÀ {ž¢ p@0Ü@Ü%ò„”á5 ! [ðâÈ´†MɈ `¼0¥\Ó0Î*0ƒÏ8F``fðæ<ƹEUض„`@€øVÐ>†/qàcB†6˜caà  —b 4@z@2ZU $020 Ï nà%À¹P ð·t½0 uÀŠ )€i €itj ª ‹À1› Â@ Ú  e 2Ð`e Ï!Ä ¹ ­ ¯z ª` ±` p © –§À ÅzŽ˜f ¥¸ } ½PJ×p c°]#p‰•Z ‹ I– Äà ‰içå o ªP©¾ÀX*ž±° v€o;Ð;p¸;0™s”LÒ+¤0 äÊ`ງ5S-’u?°Æ&WàNœI4 .€ ¼2`rfY@¶iË Ïp˜¨p+ D‡`„pfF WÛ…@‡ ÀZ>ØLJÚ ¥  ¬ Ñ    –€9ØÂØ¢{”&ÀñÖ 6ð pàÛ5g%» ®É¦ªp ÆP Š`9 À«r¹²l6Ð =4 ¯ ¨0 ‹=0q1Ó$ƒÒ-M’8„b|a€f1µTÉO™{Zÿ06Õ2 û&¢°›yBµ ^Pn7`l²l 9` DF ˆ< ½; ÐFþ ÜP ¢Üø—  B`9® ÏÀ ÚE|ÐZPÒ„,‰f0(e3†òB‡`)“›p— •ab-°òá7€´H¼` Kp 6 ­{` Fì zÀ—¨;ž „ÀX¹@©ap@嶰:"&­›‰cÛ¨ƒ’=qÀæXó×Ö²o}òë^°;  Ô€Îyî ¦Ð–à‘৬ ¹p=Р˲ ­  ¡ (Ø$v ×MB8d¢*‚ŠÙCåͼÑ>Öò*Ö‚¾Ú¢t`×°åy [@ Ìä ‹… ß±^ë) ¢ƒŒëƒ¢E²ëc‚5×Ò'à •ÿAÉËä @`€@ƒP9³•+4hÑ# 4tŒšc©™0LÖ ΰI¿xÁšL/_´xùá%Ë1\´hq6mŒZ°ÄPAÀaC‡ìºèF : 6 pÀ/wîÄ ÙÊåzÍwX¬`¶hùa\xƒ„±¾÷þ{ù¨éعO')ê/IìþïŒ>òíýÀ¸J+ø¾Øâ ,~H,Û°BïÁ  k7·Æ0H,¬rØC   ,-t0+4v  (ÍøA˜Ã‹4b4 ¤Tî‡ßÂú¡ ­ÿ” ã Ó`ÔŽ;}ô:5ê4ýædʵ/ŠB2|*<úàãŽ<Mã(¼qŒÆÀB‡„²‹ x0#:x@A‚•:è!U;ÀŒ9‡"¤‘D ‘>ðxT50º ôº0ãG;úˆJ‘D¼EdAÀŠÙ>Î5µR¤¸¸ê wãë" 4º¸b—;!%UjQ%–UN9…Q6i$>$Eаr€ t(k; fPn'…p 3ò0#†Yr£™gñ[V!¥à4èô¢‡,®ýª@ðe%–[pÑe_vÞy]t¹¥–ZZQeQ)¸4Ƹê+-² ȇ¯ÿ ÃEV±%k]j‰¥•URñDNAD‘ !

    PYTHON MAIN WEBSITE

    ! ! ! ! ! ! ! !

    On this site you will find all the information about the Python ! language. This includes:

    !
      !
    • Detailed Documentation (Language Specification, Library ! Reference, Tutorials, Information about Extending and ! Embedding)
    • !
    • Downloads (stable releases for your favorite platform, alpha and ! beta releases of new versions)
    • !
    • Special Interest Groups (from Database and Image Processing to ! XML Processing)
    • !
    • News, Announcements and lots of links to other Python ! resources
    • !
    !
    ! !

    PYTHON PROJECT PAGE

    ! ! ! ! ! ! ! !

    Here you will find the busy developers and their resources.

    !
      !
    • access to the current development version via a ! CVS repository
    • !
    • the patch manager where new features and bugfixes can be ! submitted
    • !
    !
    ! !

    PYTHON AT SOURCEFORGE FAQ

    ! ! ! ! ! ! ! !

    If you have questions about Python at SourceForge, you're ! probably right here. Topics include:

    !
      !
    • How to use CVS.
    • !
    • How to make/submit/administrate patches.
    • !
    !
    ! !

    PYTHON ENHANCEMENT PROPOSALS

    ! ! ! ! ! ! ! !

    This is the definitive collection of proposed ! enhancements for Python. These include:

    !
      !
    • List Comprehension
    • !
    • Augmented Assignment
    • !
    • 2.0 Batteries Included
    • !
    !
    ! --- 10,30 ---- !

    PythonatSourceForge

    ! ! Python Project Page - ! CVS repository,  Python Developers and the Patch Manager.
    ! Python Enhancement Proposals - Information on new language ! features
    ! Python at SourceForge FAQ - Tips on CVS, SSH and ! patch submission ! !

    External links

    ! Python Language Website - Documentation, ! Downloads, News and lots of other resources for the Python language.
    ! PythonLabs.com - Python's core development ! team and its plans for Python development.
    !   From python-dev@python.org Sat Jul 22 10:02:54 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Sat, 22 Jul 2000 02:02:54 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0212.txt,NONE,1.1 Message-ID: <200007220902.CAA16494@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv15864 Added Files: pep-0212.txt Log Message: added pep-0212.txt (empty template adapted from 210) --- NEW FILE --- PEP: 212 Title: Additional Builtin Generators Version: $Revision: 1.1 $ Owner: bwarsaw@beopen.com (Barry A. Warsaw) Python-Version: 2.0 Status: Incomplete Local Variables: mode: indented-text indent-tabs-mode: nil End: From python-dev@python.org Sat Jul 22 10:23:05 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Sat, 22 Jul 2000 02:23:05 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html sf-faq.html,1.8,1.9 at.gif,1.1,NONE py.gif,1.1,NONE sf.gif,1.1,NONE Message-ID: <200007220923.CAA28573@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv28538 Modified Files: sf-faq.html Removed Files: at.gif py.gif sf.gif Log Message: removed binary files added FAQ entry about adding binary files Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** sf-faq.html 2000/07/20 15:17:34 1.8 --- sf-faq.html 2000/07/22 09:23:02 1.9 *************** *** 34,37 **** --- 34,38 ----
  • How can I remove a directory from the CVS tree?
  • How to revert changes?
  • +
  • How to add binary files?
  • *************** *** 320,323 **** --- 321,338 ---- cvs update
    cvs commit ceval.c
    + + This example would create and apply a reverse patch from revision 1.17 to + revision 1.16 of ceval.c. + +

    2.7.:

    + +

    Q: How to add binary files?

    + +

    A:

    + You probably want to turn of keyword expansion and line-ending conversion: + +
    + cvs add -kb newfile.bin
    + cvs commit newfile.bin
    This example would create and apply a reverse patch from revision 1.17 to From python-dev@python.org Sat Jul 22 10:25:44 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Sat, 22 Jul 2000 02:25:44 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html at.gif,1.2,1.3 py.gif,1.2,1.3 sf.gif,1.2,1.3 sf-faq.html,1.9,1.10 Message-ID: <200007220925.CAA28989@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv28890 Modified Files: sf-faq.html Added Files: at.gif py.gif sf.gif Log Message: added back binary files with -kb option deleted rogue line from sf-faq.html (copy and paste, I love thee) Index: sf-faq.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** sf-faq.html 2000/07/22 09:23:02 1.9 --- sf-faq.html 2000/07/22 09:25:41 1.10 *************** *** 336,342 **** cvs commit newfile.bin
    - This example would create and apply a reverse patch from revision 1.17 to - revision 1.16 of ceval.c. -

    3. Patches

    --- 336,339 ---- From python-dev@python.org Sat Jul 22 16:13:26 2000 From: python-dev@python.org (Barry Warsaw) Date: Sat, 22 Jul 2000 08:13:26 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0212.txt,1.1,1.2 Message-ID: <200007221513.IAA13347@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv13336 Modified Files: pep-0212.txt Log Message: A little more, but still pretty incomplete Index: pep-0212.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0212.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0212.txt 2000/07/22 09:02:49 1.1 --- pep-0212.txt 2000/07/22 15:13:23 1.2 *************** *** 8,11 **** --- 8,44 ---- + Introduction + + This PEP describes some proposed additional generator-creating + builtin functions for Python 2.0. This PEP tracks the status and + ownership of this feature, slated for introduction in Python 2.0. + It contains a description of the feature and outlines changes + necessary to support the feature. This PEP summarizes discussions + held in mailing list forums, and provides URLs for further + information, where appropriate. The CVS revision history of this + file contains the definitive historical record. + + + + New functions + + irange() + tuples() + lists() + dict() + + + + Reference Implementation + + + + + Copyright + + This document has been placed in the public domain. + + + Local Variables: mode: indented-text From python-dev@python.org Sat Jul 22 17:34:18 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 09:34:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules pyexpat.c,2.11,2.12 Message-ID: <200007221634.JAA25895@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv25824 Modified Files: pyexpat.c Log Message: Mark Favas's fix for typos in docstrings. Index: pyexpat.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pyexpat.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** pyexpat.c 2000/07/12 04:49:00 2.11 --- pyexpat.c 2000/07/22 16:34:15 2.12 *************** *** 425,429 **** static char xmlparse_Parse__doc__[] = ! "Parse(data[, isfinal]) Parse XML data. `isfinal' should be true at end of input."; --- 425,429 ---- static char xmlparse_Parse__doc__[] = ! "Parse(data[, isfinal])\n\ Parse XML data. `isfinal' should be true at end of input."; *************** *** 501,505 **** static char xmlparse_ParseFile__doc__[] = ! "ParseFile(file) Parse XML data from file-like object."; --- 501,505 ---- static char xmlparse_ParseFile__doc__[] = ! "ParseFile(file)\n\ Parse XML data from file-like object."; *************** *** 556,560 **** static char xmlparse_SetBase__doc__[] = ! "SetBase(base_url) Set the base URL for the parser."; --- 556,560 ---- static char xmlparse_SetBase__doc__[] = ! "SetBase(base_url)\n\ Set the base URL for the parser."; *************** *** 574,578 **** static char xmlparse_GetBase__doc__[] = ! "GetBase() -> url Return base URL string for the parser."; --- 574,578 ---- static char xmlparse_GetBase__doc__[] = ! "GetBase() -> url\n\ Return base URL string for the parser."; From python-dev@python.org Sat Jul 22 17:39:42 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 09:39:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.157,2.158 Message-ID: <200007221639.JAA26211@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv26175/Modules Modified Files: posixmodule.c Log Message: Remove unused helper-function 'posix_strint'. Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.157 retrieving revision 2.158 diff -C2 -r2.157 -r2.158 *** posixmodule.c 2000/07/21 06:00:07 2.157 --- posixmodule.c 2000/07/22 16:39:39 2.158 *************** *** 496,517 **** } - static PyObject * - posix_strint(PyObject *args, char *format, int (*func)(const char *, int)) - { - char *path; - int i; - int res; - if (!PyArg_ParseTuple(args, format, &path, &i)) - return NULL; - Py_BEGIN_ALLOW_THREADS - res = (*func)(path, i); - Py_END_ALLOW_THREADS - if (res < 0) - return posix_error_with_filename(path); - Py_INCREF(Py_None); - return Py_None; - } - - /* pack a system stat C structure into the Python stat tuple (used by posix_stat() and posix_fstat()) */ --- 496,499 ---- From python-dev@python.org Sat Jul 22 17:41:13 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 09:41:13 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules selectmodule.c,2.39,2.40 Message-ID: <200007221641.JAA26362@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv26283/Modules Modified Files: selectmodule.c Log Message: Remove unused variable. Index: selectmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v retrieving revision 2.39 retrieving revision 2.40 diff -C2 -r2.39 -r2.40 *** selectmodule.c 2000/07/21 06:00:07 2.39 --- selectmodule.c 2000/07/22 16:41:08 2.40 *************** *** 89,93 **** for (i = 0; i < len; i++) { - PyObject *meth; SOCKET v; --- 89,92 ---- From python-dev@python.org Sat Jul 22 19:45:08 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 11:45:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python exceptions.c,1.10,1.11 Message-ID: <200007221845.LAA15070@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv14831 Modified Files: exceptions.c Log Message: Fix two instances of empty argument lists, and fix style ('PyObject** x' -> 'PyObject **x') Index: exceptions.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** exceptions.c 2000/07/16 12:04:32 1.10 --- exceptions.c 2000/07/22 18:45:06 1.11 *************** *** 102,106 **** /* Helper function for populating a dictionary with method wrappers. */ static int ! populate_methods(PyObject* klass, PyObject* dict, PyMethodDef* methods) { if (!methods) --- 102,106 ---- /* Helper function for populating a dictionary with method wrappers. */ static int ! populate_methods(PyObject *klass, PyObject *dict, PyMethodDef *methods) { if (!methods) *************** *** 109,114 **** while (methods->ml_name) { /* get a wrapper for the built-in function */ ! PyObject* func = PyCFunction_New(methods, NULL); ! PyObject* meth; int status; --- 109,114 ---- while (methods->ml_name) { /* get a wrapper for the built-in function */ ! PyObject *func = PyCFunction_New(methods, NULL); ! PyObject *meth; int status; *************** *** 140,149 **** /* This function is used to create all subsequent exception classes. */ static int ! make_class(PyObject** klass, PyObject* base, ! char* name, PyMethodDef* methods, ! char* docstr) { ! PyObject* dict = PyDict_New(); ! PyObject* str = NULL; int status = -1; --- 140,149 ---- /* This function is used to create all subsequent exception classes. */ static int ! make_class(PyObject **klass, PyObject *base, ! char *name, PyMethodDef *methods, ! char *docstr) { ! PyObject *dict = PyDict_New(); ! PyObject *str = NULL; int status = -1; *************** *** 180,186 **** /* Use this for *args signatures, otherwise just use PyArg_ParseTuple() */ ! static PyObject* get_self(PyObject* args) { ! PyObject* self = PyTuple_GetItem(args, 0); if (!self) { /* Watch out for being called to early in the bootstrapping process */ --- 180,187 ---- /* Use this for *args signatures, otherwise just use PyArg_ParseTuple() */ ! static PyObject * ! get_self(PyObject *args) { ! PyObject *self = PyTuple_GetItem(args, 0); if (!self) { /* Watch out for being called to early in the bootstrapping process */ *************** *** 216,221 **** ! static PyObject* ! Exception__init__(PyObject* self, PyObject* args) { int status; --- 217,222 ---- ! static PyObject * ! Exception__init__(PyObject *self, PyObject *args) { int status; *************** *** 239,246 **** ! static PyObject* ! Exception__str__(PyObject* self, PyObject* args) { ! PyObject* out; if (!PyArg_ParseTuple(args, "O", &self)) --- 240,247 ---- ! static PyObject * ! Exception__str__(PyObject *self, PyObject *args) { ! PyObject *out; if (!PyArg_ParseTuple(args, "O", &self)) *************** *** 257,261 **** case 1: { ! PyObject* tmp = PySequence_GetItem(args, 0); if (tmp) { out = PyObject_Str(tmp); --- 258,262 ---- case 1: { ! PyObject *tmp = PySequence_GetItem(args, 0); if (tmp) { out = PyObject_Str(tmp); *************** *** 276,284 **** ! static PyObject* ! Exception__getitem__(PyObject* self, PyObject* args) { ! PyObject* out; ! PyObject* index; if (!PyArg_ParseTuple(args, "OO", &self, &index)) --- 277,285 ---- ! static PyObject * ! Exception__getitem__(PyObject *self, PyObject *args) { ! PyObject *out; ! PyObject *index; if (!PyArg_ParseTuple(args, "OO", &self, &index)) *************** *** 306,314 **** static int ! make_Exception(char* modulename) { ! PyObject* dict = PyDict_New(); ! PyObject* str = NULL; ! PyObject* name = NULL; int status = -1; --- 307,315 ---- static int ! make_Exception(char *modulename) { ! PyObject *dict = PyDict_New(); ! PyObject *str = NULL; ! PyObject *name = NULL; int status = -1; *************** *** 366,373 **** ! static PyObject* ! SystemExit__init__(PyObject* self, PyObject* args) { ! PyObject* code; int status; --- 367,374 ---- ! static PyObject * ! SystemExit__init__(PyObject *self, PyObject *args) { ! PyObject *code; int status; *************** *** 431,442 **** ! static PyObject* ! EnvironmentError__init__(PyObject* self, PyObject* args) { ! PyObject* item0 = NULL; ! PyObject* item1 = NULL; ! PyObject* item2 = NULL; ! PyObject* subslice = NULL; ! PyObject* rtnval = NULL; if (!(self = get_self(args))) --- 432,443 ---- ! static PyObject * ! EnvironmentError__init__(PyObject *self, PyObject *args) { ! PyObject *item0 = NULL; ! PyObject *item1 = NULL; ! PyObject *item2 = NULL; ! PyObject *subslice = NULL; ! PyObject *rtnval = NULL; if (!(self = get_self(args))) *************** *** 515,526 **** ! static PyObject* ! EnvironmentError__str__(PyObject* self, PyObject* args) { ! PyObject* originalself = self; ! PyObject* filename; ! PyObject* serrno; ! PyObject* strerror; ! PyObject* rtnval = NULL; if (!PyArg_ParseTuple(args, "O", &self)) --- 516,527 ---- ! static PyObject * ! EnvironmentError__str__(PyObject *self, PyObject *args) { ! PyObject *originalself = self; ! PyObject *filename; ! PyObject *serrno; ! PyObject *strerror; ! PyObject *rtnval = NULL; if (!PyArg_ParseTuple(args, "O", &self)) *************** *** 534,540 **** if (filename != Py_None) { ! PyObject* fmt = PyString_FromString("[Errno %s] %s: %s"); ! PyObject* repr = PyObject_Repr(filename); ! PyObject* tuple = PyTuple_New(3); if (!fmt || !repr || !tuple) { --- 535,541 ---- if (filename != Py_None) { ! PyObject *fmt = PyString_FromString("[Errno %s] %s: %s"); ! PyObject *repr = PyObject_Repr(filename); ! PyObject *tuple = PyTuple_New(3); if (!fmt || !repr || !tuple) { *************** *** 558,563 **** } else if (PyObject_IsTrue(serrno) && PyObject_IsTrue(strerror)) { ! PyObject* fmt = PyString_FromString("[Errno %s] %s"); ! PyObject* tuple = PyTuple_New(2); if (!fmt || !tuple) { --- 559,564 ---- } else if (PyObject_IsTrue(serrno) && PyObject_IsTrue(strerror)) { ! PyObject *fmt = PyString_FromString("[Errno %s] %s"); ! PyObject *tuple = PyTuple_New(2); if (!fmt || !tuple) { *************** *** 644,650 **** static int ! SyntaxError__classinit__(PyObject* klass) { ! PyObject* emptystring = PyString_FromString(""); /* Additional class-creation time initializations */ --- 645,651 ---- static int ! SyntaxError__classinit__(PyObject *klass) { ! PyObject *emptystring = PyString_FromString(""); /* Additional class-creation time initializations */ *************** *** 664,671 **** ! static PyObject* ! SyntaxError__init__(PyObject* self, PyObject* args) { ! PyObject* rtnval = NULL; int lenargs; --- 665,672 ---- ! static PyObject * ! SyntaxError__init__(PyObject *self, PyObject *args) { ! PyObject *rtnval = NULL; int lenargs; *************** *** 681,685 **** lenargs = PySequence_Size(args); if (lenargs >= 1) { ! PyObject* item0 = PySequence_GetItem(args, 0); int status; --- 682,686 ---- lenargs = PySequence_Size(args); if (lenargs >= 1) { ! PyObject *item0 = PySequence_GetItem(args, 0); int status; *************** *** 692,696 **** } if (lenargs == 2) { ! PyObject* info = PySequence_GetItem(args, 1); PyObject *filename, *lineno, *offset, *text; int status = 1; --- 693,697 ---- } if (lenargs == 2) { ! PyObject *info = PySequence_GetItem(args, 1); PyObject *filename, *lineno, *offset, *text; int status = 1; *************** *** 729,737 **** ! static PyObject* ! SyntaxError__str__(PyObject* self, PyObject* args) { ! PyObject* msg; ! PyObject* str; if (!PyArg_ParseTuple(args, "O", &self)) --- 730,738 ---- ! static PyObject * ! SyntaxError__str__(PyObject *self, PyObject *args) { ! PyObject *msg; ! PyObject *str; if (!PyArg_ParseTuple(args, "O", &self)) *************** *** 855,869 **** ! /* mapping between exception names and their PyObject** */ ! static struct ! { ! char* name; ! PyObject** exc; ! PyObject** base; /* NULL == PyExc_StandardError */ ! char* docstr; ! PyMethodDef* methods; ! int (*classinit)(PyObject*); ! } ! exctable[] = { /* * The first three classes MUST appear in exactly this order --- 856,868 ---- ! /* mapping between exception names and their PyObject ** */ ! static struct { ! char *name; ! PyObject **exc; ! PyObject **base; /* NULL == PyExc_StandardError */ ! char *docstr; ! PyMethodDef *methods; ! int (*classinit)(PyObject *); ! } exctable[] = { /* * The first three classes MUST appear in exactly this order *************** *** 929,944 **** __declspec(dllexport) #endif /* WIN32 */ ! init_exceptions() { ! char* modulename = "exceptions"; int modnamesz = strlen(modulename); int i; ! PyObject* me = Py_InitModule(modulename, functions); ! PyObject* mydict = PyModule_GetDict(me); ! PyObject* bltinmod = PyImport_ImportModule("__builtin__"); ! PyObject* bdict = PyModule_GetDict(bltinmod); ! PyObject* doc = PyString_FromString(module__doc__); ! PyObject* args; PyDict_SetItemString(mydict, "__doc__", doc); --- 928,943 ---- __declspec(dllexport) #endif /* WIN32 */ ! init_exceptions(void) { ! char *modulename = "exceptions"; int modnamesz = strlen(modulename); int i; ! PyObject *me = Py_InitModule(modulename, functions); ! PyObject *mydict = PyModule_GetDict(me); ! PyObject *bltinmod = PyImport_ImportModule("__builtin__"); ! PyObject *bdict = PyModule_GetDict(bltinmod); ! PyObject *doc = PyString_FromString(module__doc__); ! PyObject *args; PyDict_SetItemString(mydict, "__doc__", doc); *************** *** 960,965 **** for (i=1; exctable[i].name; i++) { int status; ! char* cname = PyMem_NEW(char, modnamesz+strlen(exctable[i].name)+2); ! PyObject* base; (void)strcpy(cname, modulename); --- 959,964 ---- for (i=1; exctable[i].name; i++) { int status; ! char *cname = PyMem_NEW(char, modnamesz+strlen(exctable[i].name)+2); ! PyObject *base; (void)strcpy(cname, modulename); *************** *** 1015,1019 **** __declspec(dllexport) #endif /* WIN32 */ ! fini_exceptions() { int i; --- 1014,1018 ---- __declspec(dllexport) #endif /* WIN32 */ ! fini_exceptions(void) { int i; From python-dev@python.org Sat Jul 22 19:47:29 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 11:47:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python atof.c,2.5,2.6 bltinmodule.c,2.170,2.171 ceval.c,2.185,2.186 codecs.c,2.10,2.11 compile.c,2.116,2.117 dup2.c,2.3,2.4 dynload_aix.c,2.6,2.7 errors.c,2.49,2.50 frozenmain.c,2.22,2.23 getargs.c,2.41,2.42 getcompiler.c,1.7,1.8 getcopyright.c,1.7,1.8 getcwd.c,1.12,1.13 getmtime.c,2.13,2.14 getopt.c,2.7,2.8 getplatform.c,1.6,1.7 getversion.c,1.12,1.13 hypot.c,2.1,2.2 import.c,2.141,2.142 importdl.c,2.66,2.67 marshal.c,1.52,1.53 memmove.c,2.6,2.7 modsupport.c,2.48,2.49 mystrtoul.c,2.19,2.20 pyfpe.c,2.5,2.6 pystate.c,2.11,2.12 pythonrun.c,2.104,2.105 sigcheck.c,2.6,2.7 strdup.c,2.3,2.4 strerror.c,2.8,2.9 strtod.c,1.9,1.10 structmember.c,2.16,2.17 sysmodule.c,2.69,2.70 thread.c,2.31,2.32 thread_cthread.h,2.11,2.12 thread_foobar.h,2.9,2.10 thread_lwp.h,2.11,2.12 thread_nt.h,2.14,2.15 thread_os2.h,2.8,2.9 thread_pth.h,2.4,2.5 thread_pthread.h,2.27,2.28 thread_sgi.h,2.12,2.13 thread_solaris.h,2.13,2.14 thread_wince.h,2.4,2.5 traceback.c,2.30,2.31 Message-ID: <200007221847.LAA15268@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv15086 Modified Files: atof.c bltinmodule.c ceval.c codecs.c compile.c dup2.c dynload_aix.c errors.c frozenmain.c getargs.c getcompiler.c getcopyright.c getcwd.c getmtime.c getopt.c getplatform.c getversion.c hypot.c import.c importdl.c marshal.c memmove.c modsupport.c mystrtoul.c pyfpe.c pystate.c pythonrun.c sigcheck.c strdup.c strerror.c strtod.c structmember.c sysmodule.c thread.c thread_cthread.h thread_foobar.h thread_lwp.h thread_nt.h thread_os2.h thread_pth.h thread_pthread.h thread_sgi.h thread_solaris.h thread_wince.h traceback.c Log Message: Mass ANSIfication of function definitions. Doesn't cover all 'extern' declarations yet, those come later. Index: atof.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/atof.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** atof.c 2000/06/30 23:58:05 2.5 --- atof.c 2000/07/22 18:47:25 2.6 *************** *** 18,23 **** #include ! double atof(s) ! char *s; { double a = 0.0; --- 18,22 ---- #include ! double atof(char *s) { double a = 0.0; Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.170 retrieving revision 2.171 diff -C2 -r2.170 -r2.171 *** bltinmodule.c 2000/07/12 13:03:02 2.170 --- bltinmodule.c 2000/07/22 18:47:25 2.171 *************** *** 33,39 **** static PyObject * ! builtin___import__(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 33,37 ---- static PyObject * ! builtin___import__(PyObject *self, PyObject *args) { char *name; *************** *** 61,67 **** static PyObject * ! builtin_abs(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 59,63 ---- static PyObject * ! builtin_abs(PyObject *self, PyObject *args) { PyObject *v; *************** *** 79,85 **** static PyObject * ! builtin_apply(self, args) ! PyObject *self; ! PyObject *args; { PyObject *func, *alist = NULL, *kwdict = NULL; --- 75,79 ---- static PyObject * ! builtin_apply(PyObject *self, PyObject *args) { PyObject *func, *alist = NULL, *kwdict = NULL; *************** *** 121,127 **** static PyObject * ! builtin_buffer(self, args) ! PyObject *self; ! PyObject *args; { PyObject *ob; --- 115,119 ---- static PyObject * ! builtin_buffer(PyObject *self, PyObject *args) { PyObject *ob; *************** *** 144,150 **** static PyObject * ! builtin_unicode(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 136,140 ---- static PyObject * ! builtin_unicode(PyObject *self, PyObject *args) { PyObject *v; *************** *** 166,172 **** static PyObject * ! builtin_callable(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 156,160 ---- static PyObject * ! builtin_callable(PyObject *self, PyObject *args) { PyObject *v; *************** *** 185,191 **** static PyObject * ! builtin_filter(self, args) ! PyObject *self; ! PyObject *args; { PyObject *func, *seq, *result; --- 173,177 ---- static PyObject * ! builtin_filter(PyObject *self, PyObject *args) { PyObject *func, *seq, *result; *************** *** 292,298 **** static PyObject * ! builtin_chr(self, args) ! PyObject *self; ! PyObject *args; { long x; --- 278,282 ---- static PyObject * ! builtin_chr(PyObject *self, PyObject *args) { long x; *************** *** 317,323 **** static PyObject * ! builtin_unichr(self, args) ! PyObject *self; ! PyObject *args; { long x; --- 301,305 ---- static PyObject * ! builtin_unichr(PyObject *self, PyObject *args) { long x; *************** *** 342,348 **** static PyObject * ! builtin_cmp(self, args) ! PyObject *self; ! PyObject *args; { PyObject *a, *b; --- 324,328 ---- static PyObject * ! builtin_cmp(PyObject *self, PyObject *args) { PyObject *a, *b; *************** *** 363,369 **** static PyObject * ! builtin_coerce(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v, *w; --- 343,347 ---- static PyObject * ! builtin_coerce(PyObject *self, PyObject *args) { PyObject *v, *w; *************** *** 388,394 **** static PyObject * ! builtin_compile(self, args) ! PyObject *self; ! PyObject *args; { char *str; --- 366,370 ---- static PyObject * ! builtin_compile(PyObject *self, PyObject *args) { char *str; *************** *** 426,431 **** static PyObject * ! complex_from_string(v) ! PyObject *v; { extern double strtod(const char *, char **); --- 402,406 ---- static PyObject * ! complex_from_string(PyObject *v) { extern double strtod(const char *, char **); *************** *** 580,586 **** static PyObject * ! builtin_complex(self, args) ! PyObject *self; ! PyObject *args; { PyObject *r, *i, *tmp; --- 555,559 ---- static PyObject * ! builtin_complex(PyObject *self, PyObject *args) { PyObject *r, *i, *tmp; *************** *** 673,679 **** static PyObject * ! builtin_dir(self, args) ! PyObject *self; ! PyObject *args; { static char *attrlist[] = {"__members__", "__methods__", NULL}; --- 646,650 ---- static PyObject * ! builtin_dir(PyObject *self, PyObject *args) { static char *attrlist[] = {"__members__", "__methods__", NULL}; *************** *** 749,755 **** static PyObject * ! builtin_divmod(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v, *w; --- 720,724 ---- static PyObject * ! builtin_divmod(PyObject *self, PyObject *args) { PyObject *v, *w; *************** *** 767,773 **** static PyObject * ! builtin_eval(self, args) ! PyObject *self; ! PyObject *args; { PyObject *cmd; --- 736,740 ---- static PyObject * ! builtin_eval(PyObject *self, PyObject *args) { PyObject *cmd; *************** *** 821,827 **** static PyObject * ! builtin_execfile(self, args) ! PyObject *self; ! PyObject *args; { char *filename; --- 788,792 ---- static PyObject * ! builtin_execfile(PyObject *self, PyObject *args) { char *filename; *************** *** 870,876 **** static PyObject * ! builtin_getattr(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v, *result, *dflt = NULL; --- 835,839 ---- static PyObject * ! builtin_getattr(PyObject *self, PyObject *args) { PyObject *v, *result, *dflt = NULL; *************** *** 897,903 **** static PyObject * ! builtin_globals(self, args) ! PyObject *self; ! PyObject *args; { PyObject *d; --- 860,864 ---- static PyObject * ! builtin_globals(PyObject *self, PyObject *args) { PyObject *d; *************** *** 917,923 **** static PyObject * ! builtin_hasattr(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 878,882 ---- static PyObject * ! builtin_hasattr(PyObject *self, PyObject *args) { PyObject *v; *************** *** 945,951 **** static PyObject * ! builtin_id(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 904,908 ---- static PyObject * ! builtin_id(PyObject *self, PyObject *args) { PyObject *v; *************** *** 964,970 **** static PyObject * ! builtin_map(self, args) ! PyObject *self; ! PyObject *args; { typedef struct { --- 921,925 ---- static PyObject * ! builtin_map(PyObject *self, PyObject *args) { typedef struct { *************** *** 1131,1137 **** static PyObject * ! builtin_setattr(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1086,1090 ---- static PyObject * ! builtin_setattr(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1155,1161 **** static PyObject * ! builtin_delattr(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1108,1112 ---- static PyObject * ! builtin_delattr(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1178,1184 **** static PyObject * ! builtin_hash(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1129,1133 ---- static PyObject * ! builtin_hash(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1201,1207 **** static PyObject * ! builtin_hex(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1150,1154 ---- static PyObject * ! builtin_hex(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1229,1235 **** static PyObject * ! builtin_input(self, args) ! PyObject *self; ! PyObject *args; { PyObject *line; --- 1176,1180 ---- static PyObject * ! builtin_input(PyObject *self, PyObject *args) { PyObject *line; *************** *** 1264,1270 **** static PyObject * ! builtin_intern(self, args) ! PyObject *self; ! PyObject *args; { PyObject *s; --- 1209,1213 ---- static PyObject * ! builtin_intern(PyObject *self, PyObject *args) { PyObject *s; *************** *** 1286,1292 **** static PyObject * ! builtin_int(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1229,1233 ---- static PyObject * ! builtin_int(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1321,1327 **** static PyObject * ! builtin_long(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1262,1266 ---- static PyObject * ! builtin_long(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1357,1363 **** static PyObject * ! builtin_float(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1296,1300 ---- static PyObject * ! builtin_float(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1377,1383 **** static PyObject * ! builtin_len(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1314,1318 ---- static PyObject * ! builtin_len(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1399,1405 **** static PyObject * ! builtin_list(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1334,1338 ---- static PyObject * ! builtin_list(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1417,1423 **** static PyObject * ! builtin_slice(self, args) ! PyObject *self; ! PyObject *args; { PyObject *start, *stop, *step; --- 1350,1354 ---- static PyObject * ! builtin_slice(PyObject *self, PyObject *args) { PyObject *start, *stop, *step; *************** *** 1444,1450 **** static PyObject * ! builtin_locals(self, args) ! PyObject *self; ! PyObject *args; { PyObject *d; --- 1375,1379 ---- static PyObject * ! builtin_locals(PyObject *self, PyObject *args) { PyObject *d; *************** *** 1464,1470 **** static PyObject * ! min_max(args, sign) ! PyObject *args; ! int sign; { int i; --- 1393,1397 ---- static PyObject * ! min_max(PyObject *args, int sign) { int i; *************** *** 1517,1523 **** static PyObject * ! builtin_min(self, v) ! PyObject *self; ! PyObject *v; { return min_max(v, -1); --- 1444,1448 ---- static PyObject * ! builtin_min(PyObject *self, PyObject *v) { return min_max(v, -1); *************** *** 1533,1539 **** static PyObject * ! builtin_max(self, v) ! PyObject *self; ! PyObject *v; { return min_max(v, 1); --- 1458,1462 ---- static PyObject * ! builtin_max(PyObject *self, PyObject *v) { return min_max(v, 1); *************** *** 1549,1555 **** static PyObject * ! builtin_oct(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1472,1476 ---- static PyObject * ! builtin_oct(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1574,1580 **** static PyObject * ! builtin_open(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 1495,1499 ---- static PyObject * ! builtin_open(PyObject *self, PyObject *args) { char *name; *************** *** 1604,1610 **** static PyObject * ! builtin_ord(self, args) ! PyObject *self; ! PyObject *args; { PyObject *obj; --- 1523,1527 ---- static PyObject * ! builtin_ord(PyObject *self, PyObject *args) { PyObject *obj; *************** *** 1645,1651 **** static PyObject * ! builtin_pow(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v, *w, *z = Py_None; --- 1562,1566 ---- static PyObject * ! builtin_pow(PyObject *self, PyObject *args) { PyObject *v, *w, *z = Py_None; *************** *** 1696,1702 **** static PyObject * ! builtin_range(self, args) ! PyObject *self; ! PyObject *args; { long ilow = 0, ihigh = 0, istep = 1; --- 1611,1615 ---- static PyObject * ! builtin_range(PyObject *self, PyObject *args) { long ilow = 0, ihigh = 0, istep = 1; *************** *** 1758,1764 **** static PyObject * ! builtin_xrange(self, args) ! PyObject *self; ! PyObject *args; { long ilow = 0, ihigh = 0, istep = 1; --- 1671,1675 ---- static PyObject * ! builtin_xrange(PyObject *self, PyObject *args) { long ilow = 0, ihigh = 0, istep = 1; *************** *** 1802,1808 **** static PyObject * ! builtin_raw_input(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v = NULL; --- 1713,1717 ---- static PyObject * ! builtin_raw_input(PyObject *self, PyObject *args) { PyObject *v = NULL; *************** *** 1881,1887 **** static PyObject * ! builtin_reduce(self, args) ! PyObject *self; ! PyObject *args; { PyObject *seq, *func, *result = NULL; --- 1790,1794 ---- static PyObject * ! builtin_reduce(PyObject *self, PyObject *args) { PyObject *seq, *func, *result = NULL; *************** *** 1957,1963 **** static PyObject * ! builtin_reload(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1864,1868 ---- static PyObject * ! builtin_reload(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1975,1981 **** static PyObject * ! builtin_repr(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1880,1884 ---- static PyObject * ! builtin_repr(PyObject *self, PyObject *args) { PyObject *v; *************** *** 1994,2000 **** static PyObject * ! builtin_round(self, args) ! PyObject *self; ! PyObject *args; { double x; --- 1897,1901 ---- static PyObject * ! builtin_round(PyObject *self, PyObject *args) { double x; *************** *** 2032,2038 **** static PyObject * ! builtin_str(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1933,1937 ---- static PyObject * ! builtin_str(PyObject *self, PyObject *args) { PyObject *v; *************** *** 2051,2057 **** static PyObject * ! builtin_tuple(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1950,1954 ---- static PyObject * ! builtin_tuple(PyObject *self, PyObject *args) { PyObject *v; *************** *** 2070,2076 **** static PyObject * ! builtin_type(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v; --- 1967,1971 ---- static PyObject * ! builtin_type(PyObject *self, PyObject *args) { PyObject *v; *************** *** 2090,2096 **** static PyObject * ! builtin_vars(self, args) ! PyObject *self; ! PyObject *args; { PyObject *v = NULL; --- 1985,1989 ---- static PyObject * ! builtin_vars(PyObject *self, PyObject *args) { PyObject *v = NULL; *************** *** 2127,2135 **** static int ! abstract_issubclass(derived, cls, err, first) ! PyObject *derived; ! PyObject *cls; ! char *err; ! int first; { static PyObject *__bases__ = NULL; --- 2020,2024 ---- static int ! abstract_issubclass(PyObject *derived, PyObject *cls, char *err, int first) { static PyObject *__bases__ = NULL; *************** *** 2178,2184 **** static PyObject * ! builtin_isinstance(self, args) ! PyObject *self; ! PyObject *args; { PyObject *inst; --- 2067,2071 ---- static PyObject * ! builtin_isinstance(PyObject *self, PyObject *args) { PyObject *inst; *************** *** 2239,2245 **** static PyObject * ! builtin_issubclass(self, args) ! PyObject *self; ! PyObject *args; { PyObject *derived; --- 2126,2130 ---- static PyObject * ! builtin_issubclass(PyObject *self, PyObject *args) { PyObject *derived; *************** *** 2337,2341 **** PyObject * ! _PyBuiltin_Init() { PyObject *mod, *dict, *debug; --- 2222,2226 ---- PyObject * ! _PyBuiltin_Init(void) { PyObject *mod, *dict, *debug; *************** *** 2363,2369 **** static PyObject * ! filtertuple(func, tuple) ! PyObject *func; ! PyObject *tuple; { PyObject *result; --- 2248,2252 ---- static PyObject * ! filtertuple(PyObject *func, PyObject *tuple) { PyObject *result; *************** *** 2421,2427 **** static PyObject * ! filterstring(func, strobj) ! PyObject *func; ! PyObject *strobj; { PyObject *result; --- 2304,2308 ---- static PyObject * ! filterstring(PyObject *func, PyObject *strobj) { PyObject *result; Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.185 retrieving revision 2.186 diff -C2 -r2.185 -r2.186 *** ceval.c 2000/07/16 12:04:32 2.185 --- ceval.c 2000/07/22 18:47:25 2.186 *************** *** 100,104 **** void ! PyEval_InitThreads() { if (interpreter_lock) --- 100,104 ---- void ! PyEval_InitThreads(void) { if (interpreter_lock) *************** *** 111,115 **** void ! PyEval_AcquireLock() { PyThread_acquire_lock(interpreter_lock, 1); --- 111,115 ---- void ! PyEval_AcquireLock(void) { PyThread_acquire_lock(interpreter_lock, 1); *************** *** 117,121 **** void ! PyEval_ReleaseLock() { PyThread_release_lock(interpreter_lock); --- 117,121 ---- void ! PyEval_ReleaseLock(void) { PyThread_release_lock(interpreter_lock); *************** *** 123,128 **** void ! PyEval_AcquireThread(tstate) ! PyThreadState *tstate; { if (tstate == NULL) --- 123,127 ---- void ! PyEval_AcquireThread(PyThreadState *tstate) { if (tstate == NULL) *************** *** 135,140 **** void ! PyEval_ReleaseThread(tstate) ! PyThreadState *tstate; { if (tstate == NULL) --- 134,138 ---- void ! PyEval_ReleaseThread(PyThreadState *tstate) { if (tstate == NULL) *************** *** 151,155 **** PyThreadState * ! PyEval_SaveThread() { PyThreadState *tstate = PyThreadState_Swap(NULL); --- 149,153 ---- PyThreadState * ! PyEval_SaveThread(void) { PyThreadState *tstate = PyThreadState_Swap(NULL); *************** *** 164,169 **** void ! PyEval_RestoreThread(tstate) ! PyThreadState *tstate; { if (tstate == NULL) --- 162,166 ---- void ! PyEval_RestoreThread(PyThreadState *tstate) { if (tstate == NULL) *************** *** 222,228 **** int ! Py_AddPendingCall(func, arg) ! int (*func)(ANY *); ! ANY *arg; { static int busy = 0; --- 219,223 ---- int ! Py_AddPendingCall(int (*func)(ANY *), ANY *arg) { static int busy = 0; *************** *** 248,252 **** int ! Py_MakePendingCalls() { static int busy = 0; --- 243,247 ---- int ! Py_MakePendingCalls(void) { static int busy = 0; *************** *** 295,302 **** PyObject * ! PyEval_EvalCode(co, globals, locals) ! PyCodeObject *co; ! PyObject *globals; ! PyObject *locals; { return eval_code2(co, --- 290,294 ---- PyObject * ! PyEval_EvalCode(PyCodeObject *co, PyObject *globals, PyObject *locals) { return eval_code2(co, *************** *** 316,331 **** static PyObject * ! eval_code2(co, globals, locals, ! args, argcount, kws, kwcount, defs, defcount, owner) ! PyCodeObject *co; ! PyObject *globals; ! PyObject *locals; ! PyObject **args; ! int argcount; ! PyObject **kws; /* length: 2*kwcount */ ! int kwcount; ! PyObject **defs; ! int defcount; ! PyObject *owner; { #ifdef DXPAIRS --- 308,314 ---- static PyObject * ! eval_code2(PyCodeObject *co, PyObject *globals, PyObject *locals, ! PyObject **args, int argcount, PyObject **kws, int kwcount, ! PyObject **defs, int defcount, PyObject *owner) { #ifdef DXPAIRS *************** *** 1921,1929 **** static void ! set_exc_info(tstate, type, value, tb) ! PyThreadState *tstate; ! PyObject *type; ! PyObject *value; ! PyObject *tb; { PyFrameObject *frame; --- 1904,1908 ---- static void ! set_exc_info(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyFrameObject *frame; *************** *** 1971,1976 **** static void ! reset_exc_info(tstate) ! PyThreadState *tstate; { PyFrameObject *frame; --- 1950,1954 ---- static void ! reset_exc_info(PyThreadState *tstate) { PyFrameObject *frame; *************** *** 2010,2015 **** This *consumes* a reference count to each of its arguments. */ static enum why_code ! do_raise(type, value, tb) ! PyObject *type, *value, *tb; { if (type == NULL) { --- 1988,1992 ---- This *consumes* a reference count to each of its arguments. */ static enum why_code ! do_raise(PyObject *type, PyObject *value, PyObject *tb) { if (type == NULL) { *************** *** 2110,2117 **** static int ! unpack_sequence(v, argcnt, sp) ! PyObject *v; ! int argcnt; ! PyObject **sp; { int i; --- 2087,2091 ---- static int ! unpack_sequence(PyObject *v, int argcnt, PyObject **sp) { int i; *************** *** 2149,2155 **** #ifdef LLTRACE static int ! prtrace(v, str) ! PyObject *v; ! char *str; { printf("%s ", str); --- 2123,2127 ---- #ifdef LLTRACE static int ! prtrace(PyObject *v, char *str) { printf("%s ", str); *************** *** 2162,2168 **** static void ! call_exc_trace(p_trace, p_newtrace, f) ! PyObject **p_trace, **p_newtrace; ! PyFrameObject *f; { PyObject *type, *value, *traceback, *arg; --- 2134,2138 ---- static void ! call_exc_trace(PyObject **p_trace, PyObject **p_newtrace, PyFrameObject *f) { PyObject *type, *value, *traceback, *arg; *************** *** 2189,2202 **** } static int ! call_trace(p_trace, p_newtrace, f, msg, arg) ! PyObject **p_trace; /* in/out; may not be NULL; ! may not point to NULL variable initially */ ! PyObject **p_newtrace; /* in/out; may be NULL; ! may point to NULL variable; ! may be same variable as p_newtrace */ ! PyFrameObject *f; ! char *msg; ! PyObject *arg; { PyThreadState *tstate = f->f_tstate; --- 2159,2171 ---- } + /* PyObject **p_trace: in/out; may not be NULL; + may not point to NULL variable initially + PyObject **p_newtrace: in/out; may be NULL; + may point to NULL variable; + may be same variable as p_newtrace */ + static int ! call_trace(PyObject **p_trace, PyObject **p_newtrace, PyFrameObject *f, ! char *msg, PyObject *arg) { PyThreadState *tstate = f->f_tstate; *************** *** 2268,2272 **** PyObject * ! PyEval_GetBuiltins() { PyThreadState *tstate = PyThreadState_Get(); --- 2237,2241 ---- PyObject * ! PyEval_GetBuiltins(void) { PyThreadState *tstate = PyThreadState_Get(); *************** *** 2279,2283 **** PyObject * ! PyEval_GetLocals() { PyFrameObject *current_frame = PyThreadState_Get()->frame; --- 2248,2252 ---- PyObject * ! PyEval_GetLocals(void) { PyFrameObject *current_frame = PyThreadState_Get()->frame; *************** *** 2289,2293 **** PyObject * ! PyEval_GetGlobals() { PyFrameObject *current_frame = PyThreadState_Get()->frame; --- 2258,2262 ---- PyObject * ! PyEval_GetGlobals(void) { PyFrameObject *current_frame = PyThreadState_Get()->frame; *************** *** 2299,2303 **** PyObject * ! PyEval_GetFrame() { PyFrameObject *current_frame = PyThreadState_Get()->frame; --- 2268,2272 ---- PyObject * ! PyEval_GetFrame(void) { PyFrameObject *current_frame = PyThreadState_Get()->frame; *************** *** 2306,2310 **** int ! PyEval_GetRestricted() { PyFrameObject *current_frame = PyThreadState_Get()->frame; --- 2275,2279 ---- int ! PyEval_GetRestricted(void) { PyFrameObject *current_frame = PyThreadState_Get()->frame; *************** *** 2313,2317 **** int ! Py_FlushLine() { PyObject *f = PySys_GetObject("stdout"); --- 2282,2286 ---- int ! Py_FlushLine(void) { PyObject *f = PySys_GetObject("stdout"); *************** *** 2331,2337 **** PyObject * ! PyEval_CallObject(func, arg) ! PyObject *func; ! PyObject *arg; { return PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL); --- 2300,2304 ---- PyObject * ! PyEval_CallObject(PyObject *func, PyObject *arg) { return PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL); *************** *** 2341,2348 **** PyObject * ! PyEval_CallObjectWithKeywords(func, arg, kw) ! PyObject *func; ! PyObject *arg; ! PyObject *kw; { ternaryfunc call; --- 2308,2312 ---- PyObject * ! PyEval_CallObjectWithKeywords(PyObject *func, PyObject *arg, PyObject *kw) { ternaryfunc call; *************** *** 2383,2390 **** static PyObject * ! call_builtin(func, arg, kw) ! PyObject *func; ! PyObject *arg; ! PyObject *kw; { if (PyCFunction_Check(func)) { --- 2347,2351 ---- static PyObject * ! call_builtin(PyObject *func, PyObject *arg, PyObject *kw) { if (PyCFunction_Check(func)) { *************** *** 2429,2436 **** static PyObject * ! call_function(func, arg, kw) ! PyObject *func; ! PyObject *arg; ! PyObject *kw; { PyObject *class = NULL; /* == owner */ --- 2390,2394 ---- static PyObject * ! call_function(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *class = NULL; /* == owner */ *************** *** 2550,2555 **** static PyObject * ! loop_subscript(v, w) ! PyObject *v, *w; { PySequenceMethods *sq = v->ob_type->tp_as_sequence; --- 2508,2512 ---- static PyObject * ! loop_subscript(PyObject *v, PyObject *w) { PySequenceMethods *sq = v->ob_type->tp_as_sequence; *************** *** 2573,2579 **** int ! _PyEval_SliceIndex(v, pi) ! PyObject *v; ! int *pi; { if (v != NULL) { --- 2530,2534 ---- int ! _PyEval_SliceIndex(PyObject *v, int *pi) { if (v != NULL) { *************** *** 2628,2633 **** static PyObject * ! apply_slice(u, v, w) /* return u[v:w] */ ! PyObject *u, *v, *w; { int ilow = 0, ihigh = INT_MAX; --- 2583,2587 ---- static PyObject * ! apply_slice(PyObject *u, PyObject *v, PyObject *w) /* return u[v:w] */ { int ilow = 0, ihigh = INT_MAX; *************** *** 2640,2645 **** static int ! assign_slice(u, v, w, x) /* u[v:w] = x */ ! PyObject *u, *v, *w, *x; { int ilow = 0, ihigh = INT_MAX; --- 2594,2598 ---- static int ! assign_slice(PyObject *u, PyObject *v, PyObject *w, PyObject *x) /* u[v:w] = x */ { int ilow = 0, ihigh = INT_MAX; *************** *** 2655,2662 **** static PyObject * ! cmp_outcome(op, v, w) ! int op; ! register PyObject *v; ! register PyObject *w; { register int cmp; --- 2608,2612 ---- static PyObject * ! cmp_outcome(int op, register PyObject *v, register PyObject *w) { register int cmp; *************** *** 2700,2707 **** static int ! import_from(locals, v, name) ! PyObject *locals; ! PyObject *v; ! PyObject *name; { PyObject *w, *x; --- 2650,2654 ---- static int ! import_from(PyObject *locals, PyObject *v, PyObject *name) { PyObject *w, *x; *************** *** 2742,2749 **** static PyObject * ! build_class(methods, bases, name) ! PyObject *methods; /* dictionary */ ! PyObject *bases; /* tuple containing classes */ ! PyObject *name; /* string */ { int i, n; --- 2689,2693 ---- static PyObject * ! build_class(PyObject *methods, PyObject *bases, PyObject *name) { int i, n; *************** *** 2807,2815 **** static int ! exec_statement(f, prog, globals, locals) ! PyFrameObject *f; ! PyObject *prog; ! PyObject *globals; ! PyObject *locals; { int n; --- 2751,2756 ---- static int ! exec_statement(PyFrameObject *f, PyObject *prog, PyObject *globals, ! PyObject *locals) { int n; *************** *** 2875,2881 **** /* Hack for ni.py */ static PyObject * ! find_from_args(f, nexti) ! PyFrameObject *f; ! int nexti; { int opcode; --- 2816,2820 ---- /* Hack for ni.py */ static PyObject * ! find_from_args(PyFrameObject *f, int nexti) { int opcode; *************** *** 2915,2920 **** PyObject * ! getarray(a) ! long a[256]; { int i; --- 2854,2858 ---- PyObject * ! getarray(long a[256]) { int i; *************** *** 2935,2940 **** PyObject * ! _Py_GetDXProfile(self, args) ! PyObject *self, *args; { #ifndef DXPAIRS --- 2873,2877 ---- PyObject * ! _Py_GetDXProfile(PyObject *self, PyObject *args) { #ifndef DXPAIRS Index: codecs.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/codecs.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** codecs.c 2000/07/16 12:04:32 2.10 --- codecs.c 2000/07/22 18:47:25 2.11 *************** *** 37,41 **** static ! int import_encodings() { PyObject *mod; --- 37,41 ---- static ! int import_encodings(void) { PyObject *mod; *************** *** 420,424 **** } ! void _PyCodecRegistry_Init() { if (_PyCodec_SearchPath == NULL) --- 420,424 ---- } ! void _PyCodecRegistry_Init(void) { if (_PyCodec_SearchPath == NULL) *************** *** 431,435 **** } ! void _PyCodecRegistry_Fini() { Py_XDECREF(_PyCodec_SearchPath); --- 431,435 ---- } ! void _PyCodecRegistry_Fini(void) { Py_XDECREF(_PyCodec_SearchPath); Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.116 retrieving revision 2.117 diff -C2 -r2.116 -r2.117 *** compile.c 2000/07/13 06:24:29 2.116 --- compile.c 2000/07/22 18:47:25 2.117 *************** *** 77,83 **** static PyObject * ! code_getattr(co, name) ! PyCodeObject *co; ! char *name; { return PyMember_Get((char *)co, code_memberlist, name); --- 77,81 ---- static PyObject * [...1507 lines suppressed...] static PyCodeObject * ! jcompile(node *n, char *filename, struct compiling *base) { struct compiling sc; *************** *** 3518,3524 **** int ! PyCode_Addr2Line(co, addrq) ! PyCodeObject *co; ! int addrq; { int size = PyString_Size(co->co_lnotab) / 2; --- 3300,3304 ---- int ! PyCode_Addr2Line(PyCodeObject *co, int addrq) { int size = PyString_Size(co->co_lnotab) / 2; Index: dup2.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dup2.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** dup2.c 1994/08/29 10:43:12 2.3 --- dup2.c 2000/07/22 18:47:25 2.4 *************** *** 17,22 **** int ! dup2(fd1, fd2) ! int fd1, fd2; { if (fd1 != fd2) { --- 17,21 ---- int ! dup2(int fd1, int fd2) { if (fd1 != fd2) { Index: dynload_aix.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_aix.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** dynload_aix.c 2000/07/16 12:04:32 2.6 --- dynload_aix.c 2000/07/22 18:47:25 2.7 *************** *** 43,48 **** static int ! aix_getoldmodules(modlistptr) ! void **modlistptr; { register ModulePtr modptr, prevmodptr; --- 43,47 ---- static int ! aix_getoldmodules(void **modlistptr) { register ModulePtr modptr, prevmodptr; *************** *** 116,122 **** static int ! aix_bindnewmodule(newmoduleptr, modlistptr) ! void *newmoduleptr; ! void *modlistptr; { register ModulePtr modptr; --- 115,119 ---- static int ! aix_bindnewmodule(void *newmoduleptr, void *modlistptr) { register ModulePtr modptr; *************** *** 132,137 **** static void ! aix_loaderror(pathname) ! char *pathname; { --- 129,133 ---- static void ! aix_loaderror(char *pathname) { Index: errors.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/errors.c,v retrieving revision 2.49 retrieving revision 2.50 diff -C2 -r2.49 -r2.50 *** errors.c 2000/07/12 17:21:42 2.49 --- errors.c 2000/07/22 18:47:25 2.50 *************** *** 31,38 **** void ! PyErr_Restore(type, value, traceback) ! PyObject *type; ! PyObject *value; ! PyObject *traceback; { PyThreadState *tstate = PyThreadState_GET(); --- 31,35 ---- void ! PyErr_Restore(PyObject *type, PyObject *value, PyObject *traceback) { PyThreadState *tstate = PyThreadState_GET(); *************** *** 61,67 **** void ! PyErr_SetObject(exception, value) ! PyObject *exception; ! PyObject *value; { Py_XINCREF(exception); --- 58,62 ---- void ! PyErr_SetObject(PyObject *exception, PyObject *value) { Py_XINCREF(exception); *************** *** 71,76 **** void ! PyErr_SetNone(exception) ! PyObject *exception; { PyErr_SetObject(exception, (PyObject *)NULL); --- 66,70 ---- void ! PyErr_SetNone(PyObject *exception) { PyErr_SetObject(exception, (PyObject *)NULL); *************** *** 78,84 **** void ! PyErr_SetString(exception, string) ! PyObject *exception; ! const char *string; { PyObject *value = PyString_FromString(string); --- 72,76 ---- void ! PyErr_SetString(PyObject *exception, const char *string) { PyObject *value = PyString_FromString(string); *************** *** 89,93 **** PyObject * ! PyErr_Occurred() { PyThreadState *tstate = PyThreadState_Get(); --- 81,85 ---- PyObject * ! PyErr_Occurred(void) { PyThreadState *tstate = PyThreadState_Get(); *************** *** 98,103 **** int ! PyErr_GivenExceptionMatches(err, exc) ! PyObject *err, *exc; { if (err == NULL || exc == NULL) { --- 90,94 ---- int ! PyErr_GivenExceptionMatches(PyObject *err, PyObject *exc) { if (err == NULL || exc == NULL) { *************** *** 130,135 **** int ! PyErr_ExceptionMatches(exc) ! PyObject *exc; { return PyErr_GivenExceptionMatches(PyErr_Occurred(), exc); --- 121,125 ---- int ! PyErr_ExceptionMatches(PyObject *exc) { return PyErr_GivenExceptionMatches(PyErr_Occurred(), exc); *************** *** 141,148 **** */ void ! PyErr_NormalizeException(exc, val, tb) ! PyObject **exc; ! PyObject **val; ! PyObject **tb; { PyObject *type = *exc; --- 131,135 ---- */ void ! PyErr_NormalizeException(PyObject **exc, PyObject **val, PyObject **tb) { PyObject *type = *exc; *************** *** 214,221 **** void ! PyErr_Fetch(p_type, p_value, p_traceback) ! PyObject **p_type; ! PyObject **p_value; ! PyObject **p_traceback; { PyThreadState *tstate = PyThreadState_Get(); --- 201,205 ---- void ! PyErr_Fetch(PyObject **p_type, PyObject **p_value, PyObject **p_traceback) { PyThreadState *tstate = PyThreadState_Get(); *************** *** 231,235 **** void ! PyErr_Clear() { PyErr_Restore(NULL, NULL, NULL); --- 215,219 ---- void ! PyErr_Clear(void) { PyErr_Restore(NULL, NULL, NULL); *************** *** 239,243 **** int ! PyErr_BadArgument() { PyErr_SetString(PyExc_TypeError, --- 223,227 ---- int ! PyErr_BadArgument(void) { PyErr_SetString(PyExc_TypeError, *************** *** 247,251 **** PyObject * ! PyErr_NoMemory() { /* raise the pre-allocated instance if it still exists */ --- 231,235 ---- PyObject * ! PyErr_NoMemory(void) { /* raise the pre-allocated instance if it still exists */ *************** *** 262,268 **** PyObject * ! PyErr_SetFromErrnoWithFilename(exc, filename) ! PyObject *exc; ! char *filename; { PyObject *v; --- 246,250 ---- PyObject * ! PyErr_SetFromErrnoWithFilename(PyObject *exc, char *filename) { PyObject *v; *************** *** 327,332 **** PyObject * ! PyErr_SetFromErrno(exc) ! PyObject *exc; { return PyErr_SetFromErrnoWithFilename(exc, NULL); --- 309,313 ---- PyObject * ! PyErr_SetFromErrno(PyObject *exc) { return PyErr_SetFromErrnoWithFilename(exc, NULL); *************** *** 336,340 **** /* Windows specific error code handling */ PyObject *PyErr_SetFromWindowsErrWithFilename( ! int ierr, const char *filename) { --- 317,321 ---- /* Windows specific error code handling */ PyObject *PyErr_SetFromWindowsErrWithFilename( ! int ierr, const char *filename) { *************** *** 379,383 **** void ! PyErr_BadInternalCall() { PyErr_SetString(PyExc_SystemError, --- 360,364 ---- void ! PyErr_BadInternalCall(void) { PyErr_SetString(PyExc_SystemError, *************** *** 386,408 **** - #ifdef HAVE_STDARG_PROTOTYPES PyObject * PyErr_Format(PyObject *exception, const char *format, ...) - #else - PyObject * - PyErr_Format(exception, format, va_alist) - PyObject *exception; - const char *format; - va_dcl - #endif { va_list vargs; char buffer[500]; /* Caller is responsible for limiting the format */ - #ifdef HAVE_STDARG_PROTOTYPES va_start(vargs, format); - #else - va_start(vargs); - #endif vsprintf(buffer, format, vargs); --- 367,377 ---- *************** *** 413,420 **** PyObject * ! PyErr_NewException(name, base, dict) ! char *name; /* modulename.classname */ ! PyObject *base; ! PyObject *dict; { char *dot; --- 382,386 ---- PyObject * ! PyErr_NewException(char *name, PyObject *base, PyObject *dict) { char *dot; Index: frozenmain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/frozenmain.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** frozenmain.c 2000/06/30 23:58:06 2.22 --- frozenmain.c 2000/07/22 18:47:25 2.23 *************** *** 31,37 **** int ! Py_FrozenMain(argc, argv) ! int argc; ! char **argv; { char *p; --- 31,35 ---- int ! Py_FrozenMain(int argc, char **argv) { char *p; Index: getargs.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v retrieving revision 2.41 retrieving revision 2.42 diff -C2 -r2.41 -r2.42 *** getargs.c 2000/07/16 12:04:32 2.41 --- getargs.c 2000/07/22 18:47:25 2.42 *************** *** 44,68 **** static char *skipitem(char **, va_list *); - #ifdef HAVE_STDARG_PROTOTYPES - /* VARARGS2 */ int PyArg_Parse(PyObject *args, char *format, ...) - #else - /* VARARGS */ - int PyArg_Parse(va_alist) va_dcl - #endif { int retval; va_list va; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, format); - #else - PyObject *args; - char *format; - - va_start(va); - args = va_arg(va, PyObject *); - format = va_arg(va, char *); - #endif retval = vgetargs1(args, format, &va, 1); va_end(va); --- 44,53 ---- *************** *** 71,95 **** - #ifdef HAVE_STDARG_PROTOTYPES - /* VARARGS2 */ int PyArg_ParseTuple(PyObject *args, char *format, ...) - #else - /* VARARGS */ - int PyArg_ParseTuple(va_alist) va_dcl - #endif { int retval; va_list va; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, format); - #else - PyObject *args; - char *format; - - va_start(va); - args = va_arg(va, PyObject *); - format = va_arg(va, char *); - #endif retval = vgetargs1(args, format, &va, 0); va_end(va); --- 56,65 ---- *************** *** 99,106 **** int ! PyArg_VaParse(args, format, va) ! PyObject *args; ! char *format; ! va_list va; { va_list lva; --- 69,73 ---- int ! PyArg_VaParse(PyObject *args, char *format, va_list va) { va_list lva; *************** *** 117,125 **** static int ! vgetargs1(args, format, p_va, compat) ! PyObject *args; ! char *format; ! va_list *p_va; ! int compat; { char msgbuf[256]; --- 84,88 ---- static int ! vgetargs1(PyObject *args, char *format, va_list *p_va, int compat) { char msgbuf[256]; *************** *** 255,264 **** static void ! seterror(iarg, msg, levels, fname, message) ! int iarg; ! char *msg; ! int *levels; ! char *fname; ! char *message; { char buf[256]; --- 218,222 ---- static void ! seterror(int iarg, char *msg, int *levels, char *fname, char *message) { char buf[256]; *************** *** 310,320 **** static char * ! converttuple(arg, p_format, p_va, levels, msgbuf, toplevel) ! PyObject *arg; ! char **p_format; ! va_list *p_va; ! int *levels; ! char *msgbuf; ! int toplevel; { int level = 0; --- 268,273 ---- static char * ! converttuple(PyObject *arg, char **p_format, va_list *p_va, int *levels, ! char *msgbuf, int toplevel) { int level = 0; *************** *** 379,388 **** static char * ! convertitem(arg, p_format, p_va, levels, msgbuf) ! PyObject *arg; ! char **p_format; ! va_list *p_va; ! int *levels; ! char *msgbuf; { char *msg; --- 332,337 ---- static char * ! convertitem(PyObject *arg, char **p_format, va_list *p_va, int *levels, ! char *msgbuf) { char *msg; *************** *** 410,418 **** static char * ! convertsimple(arg, p_format, p_va, msgbuf) ! PyObject *arg; ! char **p_format; ! va_list *p_va; ! char *msgbuf; { char *msg = convertsimple1(arg, p_format, p_va); --- 359,363 ---- static char * ! convertsimple(PyObject *arg, char **p_format, va_list *p_va, char *msgbuf) { char *msg = convertsimple1(arg, p_format, p_va); *************** *** 437,444 **** static char * ! convertsimple1(arg, p_format, p_va) ! PyObject *arg; ! char **p_format; ! va_list *p_va; { char *format = *p_format; --- 382,386 ---- static char * ! convertsimple1(PyObject *arg, char **p_format, va_list *p_va) { char *format = *p_format; *************** *** 962,993 **** Geoff Philbrick */ - #ifdef HAVE_STDARG_PROTOTYPES - /* VARARGS2 */ int PyArg_ParseTupleAndKeywords(PyObject *args, PyObject *keywords, char *format, char **kwlist, ...) - #else - /* VARARGS */ - int PyArg_ParseTupleAndKeywords(va_alist) va_dcl - #endif { int retval; va_list va; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, kwlist); - #else - PyObject *args; - PyObject *keywords; - char *format; - char **kwlist; - - va_start(va); - args = va_arg(va, PyObject *); - keywords = va_arg(va, PyObject *); - format = va_arg(va, char *); - kwlist = va_arg(va, char **); - #endif retval = vgetargskeywords(args, keywords, format, kwlist, &va); va_end(va); --- 904,916 ---- *************** *** 997,1006 **** static int ! vgetargskeywords(args, keywords, format, kwlist, p_va) ! PyObject *args; ! PyObject *keywords; ! char *format; ! char **kwlist; ! va_list *p_va; { char msgbuf[256]; --- 920,925 ---- static int ! vgetargskeywords(PyObject *args, PyObject *keywords, char *format, ! char **kwlist, va_list *p_va) { char msgbuf[256]; *************** *** 1205,1211 **** static char * ! skipitem(p_format, p_va) ! char **p_format; ! va_list *p_va; { char *format = *p_format; --- 1124,1128 ---- static char * ! skipitem(char **p_format, va_list *p_va) { char *format = *p_format; Index: getcompiler.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getcompiler.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** getcompiler.c 2000/06/30 23:58:06 1.7 --- getcompiler.c 2000/07/22 18:47:25 1.8 *************** *** 32,36 **** const char * ! Py_GetCompiler() { return COMPILER; --- 32,36 ---- const char * ! Py_GetCompiler(void) { return COMPILER; Index: getcopyright.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getcopyright.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** getcopyright.c 2000/06/30 23:50:40 1.7 --- getcopyright.c 2000/07/22 18:47:25 1.8 *************** *** 24,28 **** const char * ! Py_GetCopyright() { return cprt; --- 24,28 ---- const char * ! Py_GetCopyright(void) { return cprt; Index: getcwd.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getcwd.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** getcwd.c 2000/06/30 23:58:06 1.12 --- getcwd.c 2000/07/22 18:47:25 1.13 *************** *** 27,36 **** #endif ! extern char *getwd(); char * ! getcwd(buf, size) ! char *buf; ! int size; { char localbuf[MAXPATHLEN+1]; --- 27,34 ---- #endif ! extern char *getwd(char *); char * ! getcwd(char *buf, int size) { char localbuf[MAXPATHLEN+1]; *************** *** 63,69 **** char * ! getcwd(buf, size) ! char *buf; ! int size; { FILE *fp; --- 61,65 ---- char * ! getcwd(char *buf, int size) { FILE *fp; Index: getmtime.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getmtime.c,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** getmtime.c 2000/07/01 01:08:11 2.13 --- getmtime.c 2000/07/22 18:47:25 2.14 *************** *** 27,33 **** time_t ! PyOS_GetLastModificationTime(path, fp) ! char *path; ! FILE *fp; { struct stat st; --- 27,31 ---- time_t ! PyOS_GetLastModificationTime(char *path, FILE *fp) { struct stat st; Index: getopt.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getopt.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** getopt.c 1999/09/13 13:45:32 2.7 --- getopt.c 2000/07/22 18:47:25 2.8 *************** *** 42,51 **** #ifndef __BEOS__ ! int getopt(argc,argv,optstring) ! int argc; ! char *argv[]; ! char optstring[]; #else ! int getopt( int argc, char *const *argv, const char *optstring ) #endif { --- 42,48 ---- #ifndef __BEOS__ ! int getopt(int argc, char *argv[], char optstring[]) #else ! int getopt(int argc, char *const *argv, const char *optstring) #endif { Index: getplatform.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getplatform.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** getplatform.c 2000/06/30 23:58:06 1.6 --- getplatform.c 2000/07/22 18:47:25 1.7 *************** *** 16,20 **** const char * ! Py_GetPlatform() { return PLATFORM; --- 16,20 ---- const char * ! Py_GetPlatform(void) { return PLATFORM; Index: getversion.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getversion.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** getversion.c 2000/06/30 23:58:06 1.12 --- getversion.c 2000/07/22 18:47:25 1.13 *************** *** 16,20 **** const char * ! Py_GetVersion() { static char version[250]; --- 16,20 ---- const char * ! Py_GetVersion(void) { static char version[250]; Index: hypot.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/hypot.c,v retrieving revision 2.1 retrieving revision 2.2 diff -C2 -r2.1 -r2.2 *** hypot.c 1996/08/29 18:10:41 2.1 --- hypot.c 2000/07/22 18:47:25 2.2 *************** *** 5,11 **** #include "mymath.h" ! double hypot(x, y) ! double x; ! double y; { double yx; --- 5,9 ---- #include "mymath.h" ! double hypot(double x, double y) { double yx; Index: import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.141 retrieving revision 2.142 diff -C2 -r2.141 -r2.142 *** import.c 2000/07/11 21:59:16 2.141 --- import.c 2000/07/22 18:47:25 2.142 *************** *** 56,60 **** ! extern time_t PyOS_GetLastModificationTime(); /* In getmtime.c */ /* Magic word to reject .pyc files generated by other Python versions */ --- 56,61 ---- ! extern time_t PyOS_GetLastModificationTime(char *, FILE *); ! /* In getmtime.c */ /* Magic word to reject .pyc files generated by other Python versions */ *************** *** 66,70 **** added to the .pyc file header? */ /* New way to come up with the magic number: (YEAR-1995), MONTH, DAY */ ! #define MAGIC (50428 | ((long)'\r'<<16) | ((long)'\n'<<24)) /* Magic word as global; note that _PyImport_Init() can change the --- 67,71 ---- added to the .pyc file header? */ /* New way to come up with the magic number: (YEAR-1995), MONTH, DAY */ ! #define MAGIC (50715 | ((long)'\r'<<16) | ((long)'\n'<<24)) /* Magic word as global; note that _PyImport_Init() can change the *************** *** 92,96 **** void ! _PyImport_Init() { const struct filedescr *scan; --- 93,97 ---- void ! _PyImport_Init(void) { const struct filedescr *scan; *************** *** 132,136 **** void ! _PyImport_Fini() { Py_XDECREF(extensions); --- 133,137 ---- void ! _PyImport_Fini(void) { Py_XDECREF(extensions); *************** *** 152,156 **** static void ! lock_import() { long me = PyThread_get_thread_ident(); --- 153,157 ---- static void ! lock_import(void) { long me = PyThread_get_thread_ident(); *************** *** 173,177 **** static void ! unlock_import() { long me = PyThread_get_thread_ident(); --- 174,178 ---- static void ! unlock_import(void) { long me = PyThread_get_thread_ident(); *************** *** 197,201 **** PyObject * ! PyImport_GetModuleDict() { PyInterpreterState *interp = PyThreadState_Get()->interp; --- 198,202 ---- PyObject * ! PyImport_GetModuleDict(void) { PyInterpreterState *interp = PyThreadState_Get()->interp; *************** *** 225,229 **** void ! PyImport_Cleanup() { int pos, ndone; --- 226,230 ---- void ! PyImport_Cleanup(void) { int pos, ndone; *************** *** 358,362 **** long ! PyImport_GetMagicNumber() { return pyc_magic; --- 359,363 ---- long ! PyImport_GetMagicNumber(void) { return pyc_magic; *************** *** 375,381 **** PyObject * ! _PyImport_FixupExtension(name, filename) ! char *name; ! char *filename; { PyObject *modules, *mod, *dict, *copy; --- 376,380 ---- PyObject * ! _PyImport_FixupExtension(char *name, char *filename) { PyObject *modules, *mod, *dict, *copy; *************** *** 404,410 **** PyObject * ! _PyImport_FindExtension(name, filename) ! char *name; ! char *filename; { PyObject *dict, *mod, *mdict, *result; --- 403,407 ---- PyObject * ! _PyImport_FindExtension(char *name, char *filename) { PyObject *dict, *mod, *mdict, *result; *************** *** 438,443 **** PyObject * ! PyImport_AddModule(name) ! char *name; { PyObject *modules = PyImport_GetModuleDict(); --- 435,439 ---- PyObject * ! PyImport_AddModule(char *name) { PyObject *modules = PyImport_GetModuleDict(); *************** *** 464,470 **** PyObject * ! PyImport_ExecCodeModule(name, co) ! char *name; ! PyObject *co; { return PyImport_ExecCodeModuleEx(name, co, (char *)NULL); --- 460,464 ---- PyObject * ! PyImport_ExecCodeModule(char *name, PyObject *co) { return PyImport_ExecCodeModuleEx(name, co, (char *)NULL); *************** *** 472,479 **** PyObject * ! PyImport_ExecCodeModuleEx(name, co, pathname) ! char *name; ! PyObject *co; ! char *pathname; { PyObject *modules = PyImport_GetModuleDict(); --- 466,470 ---- PyObject * ! PyImport_ExecCodeModuleEx(char *name, PyObject *co, char *pathname) { PyObject *modules = PyImport_GetModuleDict(); *************** *** 528,535 **** static char * ! make_compiled_pathname(pathname, buf, buflen) ! char *pathname; ! char *buf; ! size_t buflen; { size_t len; --- 519,523 ---- static char * ! make_compiled_pathname(char *pathname, char *buf, size_t buflen) { size_t len; *************** *** 553,560 **** static FILE * ! check_compiled_module(pathname, mtime, cpathname) ! char *pathname; ! long mtime; ! char *cpathname; { FILE *fp; --- 541,545 ---- static FILE * ! check_compiled_module(char *pathname, long mtime, char *cpathname) { FILE *fp; *************** *** 588,594 **** static PyCodeObject * ! read_compiled_module(cpathname, fp) ! char *cpathname; ! FILE *fp; { PyObject *co; --- 573,577 ---- static PyCodeObject * ! read_compiled_module(char *cpathname, FILE *fp) { PyObject *co; *************** *** 611,618 **** static PyObject * ! load_compiled_module(name, cpathname, fp) ! char *name; ! char *cpathname; ! FILE *fp; { long magic; --- 594,598 ---- static PyObject * ! load_compiled_module(char *name, char *cpathname, FILE *fp) { long magic; *************** *** 642,648 **** static PyCodeObject * ! parse_source_module(pathname, fp) ! char *pathname; ! FILE *fp; { PyCodeObject *co; --- 622,626 ---- static PyCodeObject * ! parse_source_module(char *pathname, FILE *fp) { PyCodeObject *co; *************** *** 665,672 **** static void ! write_compiled_module(co, cpathname, mtime) ! PyCodeObject *co; ! char *cpathname; ! long mtime; { FILE *fp; --- 643,647 ---- static void ! write_compiled_module(PyCodeObject *co, char *cpathname, long mtime) { FILE *fp; *************** *** 709,716 **** static PyObject * ! load_source_module(name, pathname, fp) ! char *name; ! char *pathname; ! FILE *fp; { time_t mtime; --- 684,688 ---- static PyObject * ! load_source_module(char *name, char *pathname, FILE *fp) { time_t mtime; *************** *** 773,779 **** static PyObject * ! load_package(name, pathname) ! char *name; ! char *pathname; { PyObject *m, *d, *file, *path; --- 745,749 ---- static PyObject * ! load_package(char *name, char *pathname) { PyObject *m, *d, *file, *path; *************** *** 828,833 **** static int ! is_builtin(name) ! char *name; { int i; --- 798,802 ---- static int ! is_builtin(char *name) { int i; *************** *** 859,869 **** static struct filedescr * ! find_module(realname, path, buf, buflen, p_fp) ! char *realname; ! PyObject *path; ! /* Output parameters: */ ! char *buf; ! size_t buflen; ! FILE **p_fp; { int i, npath; --- 828,833 ---- static struct filedescr * ! find_module(char *realname, PyObject *path, char *buf, size_t buflen, ! FILE **p_fp) { int i, npath; *************** *** 1038,1043 **** static int ! allcaps8x3(s) ! char *s; { /* Return 1 if s is an 8.3 filename in ALLCAPS */ --- 1002,1006 ---- static int ! allcaps8x3(char *s) { /* Return 1 if s is an 8.3 filename in ALLCAPS */ *************** *** 1177,1182 **** /* Helper to look for __init__.py or __init__.py[co] in potential package */ static int ! find_init_module(buf) ! char *buf; { size_t save_len = strlen(buf); --- 1140,1144 ---- /* Helper to look for __init__.py or __init__.py[co] in potential package */ static int ! find_init_module(char *buf) { size_t save_len = strlen(buf); *************** *** 1213,1221 **** static PyObject * ! load_module(name, fp, buf, type) ! char *name; ! FILE *fp; ! char *buf; ! int type; { PyObject *modules; --- 1175,1179 ---- static PyObject * ! load_module(char *name, FILE *fp, char *buf, int type) { PyObject *modules; *************** *** 1313,1318 **** static int ! init_builtin(name) ! char *name; { struct _inittab *p; --- 1271,1275 ---- static int ! init_builtin(char *name) { struct _inittab *p; *************** *** 1347,1352 **** static struct _frozen * ! find_frozen(name) ! char *name; { struct _frozen *p; --- 1304,1308 ---- static struct _frozen * ! find_frozen(char *name) { struct _frozen *p; *************** *** 1362,1367 **** static PyObject * ! get_frozen_object(name) ! char *name; { struct _frozen *p = find_frozen(name); --- 1318,1322 ---- static PyObject * ! get_frozen_object(char *name) { struct _frozen *p = find_frozen(name); *************** *** 1386,1391 **** int ! PyImport_ImportFrozenModule(name) ! char *name; { struct _frozen *p = find_frozen(name); --- 1341,1345 ---- int ! PyImport_ImportFrozenModule(char *name) { struct _frozen *p = find_frozen(name); *************** *** 1443,1448 **** PyObject * ! PyImport_ImportModule(name) ! char *name; { static PyObject *fromlist = NULL; --- 1397,1401 ---- PyObject * ! PyImport_ImportModule(char *name) { static PyObject *fromlist = NULL; *************** *** 1467,1475 **** static PyObject * ! import_module_ex(name, globals, locals, fromlist) ! char *name; ! PyObject *globals; ! PyObject *locals; ! PyObject *fromlist; { char buf[MAXPATHLEN+1]; --- 1420,1425 ---- static PyObject * ! import_module_ex(char *name, PyObject *globals, PyObject *locals, ! PyObject *fromlist) { char buf[MAXPATHLEN+1]; *************** *** 1517,1525 **** PyObject * ! PyImport_ImportModuleEx(name, globals, locals, fromlist) ! char *name; ! PyObject *globals; ! PyObject *locals; ! PyObject *fromlist; { PyObject *result; --- 1467,1472 ---- PyObject * ! PyImport_ImportModuleEx(char *name, PyObject *globals, PyObject *locals, ! PyObject *fromlist) { PyObject *result; *************** *** 1531,1538 **** static PyObject * ! get_parent(globals, buf, p_buflen) ! PyObject *globals; ! char *buf; ! int *p_buflen; { static PyObject *namestr = NULL; --- 1478,1482 ---- static PyObject * ! get_parent(PyObject *globals, char *buf, int *p_buflen) { static PyObject *namestr = NULL; *************** *** 1599,1609 **** } static PyObject * ! load_next(mod, altmod, p_name, buf, p_buflen) ! PyObject *mod; ! PyObject *altmod; /* Either None or same as mod */ ! char **p_name; ! char *buf; ! int *p_buflen; { char *name = *p_name; --- 1543,1550 ---- } + /* altmod is either None or same as mod */ static PyObject * ! load_next(PyObject *mod, PyObject *altmod, char **p_name, char *buf, ! int *p_buflen) { char *name = *p_name; *************** *** 1668,1673 **** static int ! mark_miss(name) ! char *name; { PyObject *modules = PyImport_GetModuleDict(); --- 1609,1613 ---- static int ! mark_miss(char *name) { PyObject *modules = PyImport_GetModuleDict(); *************** *** 1676,1685 **** static int ! ensure_fromlist(mod, fromlist, buf, buflen, recursive) ! PyObject *mod; ! PyObject *fromlist; ! char *buf; ! int buflen; ! int recursive; { int i; --- 1616,1621 ---- static int ! ensure_fromlist(PyObject *mod, PyObject *fromlist, char *buf, int buflen, ! int recursive) { int i; *************** *** 1748,1755 **** static PyObject * ! import_submodule(mod, subname, fullname) ! PyObject *mod; /* May be None */ ! char *subname; ! char *fullname; { PyObject *modules = PyImport_GetModuleDict(); --- 1684,1688 ---- static PyObject * ! import_submodule(PyObject *mod, char *subname, char *fullname) { PyObject *modules = PyImport_GetModuleDict(); *************** *** 1810,1815 **** PyObject * ! PyImport_ReloadModule(m) ! PyObject *m; { PyObject *modules = PyImport_GetModuleDict(); --- 1743,1747 ---- PyObject * ! PyImport_ReloadModule(PyObject *m) { PyObject *modules = PyImport_GetModuleDict(); *************** *** 1877,1882 **** PyObject * ! PyImport_Import(module_name) ! PyObject *module_name; { static PyObject *silly_list = NULL; --- 1809,1813 ---- PyObject * ! PyImport_Import(PyObject *module_name) { static PyObject *silly_list = NULL; *************** *** 1954,1960 **** static PyObject * ! imp_get_magic(self, args) ! PyObject *self; ! PyObject *args; { char buf[4]; --- 1885,1889 ---- static PyObject * ! imp_get_magic(PyObject *self, PyObject *args) { char buf[4]; *************** *** 1971,1977 **** static PyObject * ! imp_get_suffixes(self, args) ! PyObject *self; ! PyObject *args; { PyObject *list; --- 1900,1904 ---- static PyObject * ! imp_get_suffixes(PyObject *self, PyObject *args) { PyObject *list; *************** *** 2001,2007 **** static PyObject * ! call_find_module(name, path) ! char *name; ! PyObject *path; /* list or None or NULL */ { extern int fclose(FILE *); --- 1928,1932 ---- static PyObject * ! call_find_module(char *name, PyObject *path) { extern int fclose(FILE *); *************** *** 2035,2041 **** static PyObject * ! imp_find_module(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 1960,1964 ---- static PyObject * ! imp_find_module(PyObject *self, PyObject *args) { char *name; *************** *** 2047,2053 **** static PyObject * ! imp_init_builtin(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 1970,1974 ---- static PyObject * ! imp_init_builtin(PyObject *self, PyObject *args) { char *name; *************** *** 2069,2075 **** static PyObject * ! imp_init_frozen(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 1990,1994 ---- static PyObject * ! imp_init_frozen(PyObject *self, PyObject *args) { char *name; *************** *** 2091,2097 **** static PyObject * ! imp_get_frozen_object(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 2010,2014 ---- static PyObject * ! imp_get_frozen_object(PyObject *self, PyObject *args) { char *name; *************** *** 2103,2109 **** static PyObject * ! imp_is_builtin(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 2020,2024 ---- static PyObject * ! imp_is_builtin(PyObject *self, PyObject *args) { char *name; *************** *** 2114,2120 **** static PyObject * ! imp_is_frozen(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 2029,2033 ---- static PyObject * ! imp_is_frozen(PyObject *self, PyObject *args) { char *name; *************** *** 2127,2134 **** static FILE * ! get_file(pathname, fob, mode) ! char *pathname; ! PyObject *fob; ! char *mode; { FILE *fp; --- 2040,2044 ---- static FILE * ! get_file(char *pathname, PyObject *fob, char *mode) { FILE *fp; *************** *** 2148,2154 **** static PyObject * ! imp_load_compiled(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 2058,2062 ---- static PyObject * ! imp_load_compiled(PyObject *self, PyObject *args) { char *name; *************** *** 2172,2178 **** static PyObject * ! imp_load_dynamic(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 2080,2084 ---- static PyObject * ! imp_load_dynamic(PyObject *self, PyObject *args) { char *name; *************** *** 2196,2202 **** static PyObject * ! imp_load_source(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 2102,2106 ---- static PyObject * ! imp_load_source(PyObject *self, PyObject *args) { char *name; *************** *** 2219,2225 **** #ifdef macintosh static PyObject * ! imp_load_resource(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 2123,2127 ---- #ifdef macintosh static PyObject * ! imp_load_resource(PyObject *self, PyObject *args) { char *name; *************** *** 2235,2241 **** static PyObject * ! imp_load_module(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 2137,2141 ---- static PyObject * ! imp_load_module(PyObject *self, PyObject *args) { char *name; *************** *** 2272,2278 **** static PyObject * ! imp_load_package(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 2172,2176 ---- static PyObject * ! imp_load_package(PyObject *self, PyObject *args) { char *name; *************** *** 2284,2290 **** static PyObject * ! imp_new_module(self, args) ! PyObject *self; ! PyObject *args; { char *name; --- 2182,2186 ---- static PyObject * ! imp_new_module(PyObject *self, PyObject *args) { char *name; *************** *** 2357,2364 **** static int ! setint(d, name, value) ! PyObject *d; ! char *name; ! int value; { PyObject *v; --- 2253,2257 ---- static int ! setint(PyObject *d, char *name, int value) { PyObject *v; *************** *** 2372,2376 **** void ! initimp() { PyObject *m, *d; --- 2265,2269 ---- void ! initimp(void) { PyObject *m, *d; *************** *** 2403,2408 **** int ! PyImport_ExtendInittab(newtab) ! struct _inittab *newtab; { static struct _inittab *our_copy = NULL; --- 2296,2300 ---- int ! PyImport_ExtendInittab(struct _inittab *newtab) { static struct _inittab *our_copy = NULL; *************** *** 2436,2442 **** int ! PyImport_AppendInittab(name, initfunc) ! char *name; ! void (*initfunc)(); { struct _inittab newtab[2]; --- 2328,2332 ---- int ! PyImport_AppendInittab(char *name, void (*initfunc)(void)) { struct _inittab newtab[2]; Index: importdl.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/importdl.c,v retrieving revision 2.66 retrieving revision 2.67 diff -C2 -r2.66 -r2.67 *** importdl.c 2000/06/30 23:58:06 2.66 --- importdl.c 2000/07/22 18:47:25 2.67 *************** *** 29,36 **** PyObject * ! _PyImport_LoadDynamicModule(name, pathname, fp) ! char *name; ! char *pathname; ! FILE *fp; { PyObject *m, *d, *s; --- 29,33 ---- PyObject * ! _PyImport_LoadDynamicModule(char *name, char *pathname, FILE *fp) { PyObject *m, *d, *s; Index: marshal.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/marshal.c,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -r1.52 -r1.53 *** marshal.c 2000/07/09 03:09:56 1.52 --- marshal.c 2000/07/22 18:47:25 1.53 *************** *** 56,62 **** static void ! w_more(c, p) ! char c; ! WFILE *p; { int size, newsize; --- 56,60 ---- static void ! w_more(char c, WFILE *p) { int size, newsize; *************** *** 77,84 **** static void ! w_string(s, n, p) ! char *s; ! int n; ! WFILE *p; { if (p->fp != NULL) { --- 75,79 ---- static void ! w_string(char *s, int n, WFILE *p) { if (p->fp != NULL) { *************** *** 94,100 **** static void ! w_short(x, p) ! int x; ! WFILE *p; { w_byte( x & 0xff, p); --- 89,93 ---- static void ! w_short(int x, WFILE *p) { w_byte( x & 0xff, p); *************** *** 103,109 **** static void ! w_long(x, p) ! long x; ! WFILE *p; { w_byte((int)( x & 0xff), p); --- 96,100 ---- static void ! w_long(long x, WFILE *p) { w_byte((int)( x & 0xff), p); *************** *** 115,121 **** #if SIZEOF_LONG > 4 static void ! w_long64(x, p) ! long x; ! WFILE *p; { w_long(x, p); --- 106,110 ---- #if SIZEOF_LONG > 4 static void ! w_long64(long x, WFILE *p) { w_long(x, p); *************** *** 125,131 **** static void ! w_object(v, p) ! PyObject *v; ! WFILE *p; { int i, n; --- 114,118 ---- static void ! w_object(PyObject *v, WFILE *p) { int i, n; *************** *** 287,293 **** void ! PyMarshal_WriteLongToFile(x, fp) ! long x; ! FILE *fp; { WFILE wf; --- 274,278 ---- void ! PyMarshal_WriteLongToFile(long x, FILE *fp) { WFILE wf; *************** *** 299,305 **** void ! PyMarshal_WriteObjectToFile(x, fp) ! PyObject *x; ! FILE *fp; { WFILE wf; --- 284,288 ---- void ! PyMarshal_WriteObjectToFile(PyObject *x, FILE *fp) { WFILE wf; *************** *** 317,324 **** static int ! r_string(s, n, p) ! char *s; ! int n; ! RFILE *p; { if (p->fp != NULL) --- 300,304 ---- static int ! r_string(char *s, int n, RFILE *p) { if (p->fp != NULL) *************** *** 332,337 **** static int ! r_short(p) ! RFILE *p; { register short x; --- 312,316 ---- static int ! r_short(RFILE *p) { register short x; *************** *** 343,348 **** static long ! r_long(p) ! RFILE *p; { register long x; --- 322,326 ---- static long ! r_long(RFILE *p) { register long x; *************** *** 369,374 **** static long ! r_long64(p) ! RFILE *p; { register long x; --- 347,351 ---- static long ! r_long64(RFILE *p) { register long x; *************** *** 389,394 **** static PyObject * ! r_object(p) ! RFILE *p; { PyObject *v, *v2; --- 366,370 ---- static PyObject * ! r_object(RFILE *p) { PyObject *v, *v2; *************** *** 635,640 **** long ! PyMarshal_ReadLongFromFile(fp) ! FILE *fp; { RFILE rf; --- 611,615 ---- long ! PyMarshal_ReadLongFromFile(FILE *fp) { RFILE rf; *************** *** 644,649 **** PyObject * ! PyMarshal_ReadObjectFromFile(fp) ! FILE *fp; { RFILE rf; --- 619,623 ---- PyObject * ! PyMarshal_ReadObjectFromFile(FILE *fp) { RFILE rf; *************** *** 657,663 **** PyObject * ! PyMarshal_ReadObjectFromString(str, len) ! char *str; ! int len; { RFILE rf; --- 631,635 ---- PyObject * ! PyMarshal_ReadObjectFromString(char *str, int len) { RFILE rf; *************** *** 674,679 **** PyObject * ! PyMarshal_WriteObjectToString(x) /* wrs_object() */ ! PyObject *x; { WFILE wf; --- 646,650 ---- PyObject * ! PyMarshal_WriteObjectToString(PyObject *x) /* wrs_object() */ { WFILE wf; *************** *** 704,710 **** static PyObject * ! marshal_dump(self, args) ! PyObject *self; ! PyObject *args; { WFILE wf; --- 675,679 ---- static PyObject * ! marshal_dump(PyObject *self, PyObject *args) { WFILE wf; *************** *** 735,741 **** static PyObject * ! marshal_load(self, args) ! PyObject *self; ! PyObject *args; { RFILE rf; --- 704,708 ---- static PyObject * ! marshal_load(PyObject *self, PyObject *args) { RFILE rf; *************** *** 762,768 **** static PyObject * ! marshal_dumps(self, args) ! PyObject *self; ! PyObject *args; { PyObject *x; --- 729,733 ---- static PyObject * ! marshal_dumps(PyObject *self, PyObject *args) { PyObject *x; *************** *** 773,779 **** static PyObject * ! marshal_loads(self, args) ! PyObject *self; ! PyObject *args; { RFILE rf; --- 738,742 ---- static PyObject * ! marshal_loads(PyObject *self, PyObject *args) { RFILE rf; *************** *** 805,809 **** void ! PyMarshal_Init() { (void) Py_InitModule("marshal", marshal_methods); --- 768,772 ---- void ! PyMarshal_Init(void) { (void) Py_InitModule("marshal", marshal_methods); Index: memmove.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/memmove.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** memmove.c 2000/06/30 23:58:06 2.6 --- memmove.c 2000/07/22 18:47:25 2.7 *************** *** 11,21 **** /* A perhaps slow but I hope correct implementation of memmove */ ! extern char *memcpy(); char * ! memmove(dst, src, n) ! char *dst; ! char *src; ! int n; { char *realdst = dst; --- 11,18 ---- /* A perhaps slow but I hope correct implementation of memmove */ ! extern char *memcpy(char *, char *, int); char * ! memmove(char *dst, char *src, int n) { char *realdst = dst; Index: modsupport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/modsupport.c,v retrieving revision 2.48 retrieving revision 2.49 diff -C2 -r2.48 -r2.49 *** modsupport.c 2000/07/09 03:09:56 2.48 --- modsupport.c 2000/07/22 18:47:25 2.49 *************** *** 43,52 **** PyObject * ! Py_InitModule4(name, methods, doc, passthrough, module_api_version) ! char *name; ! PyMethodDef *methods; ! char *doc; ! PyObject *passthrough; ! int module_api_version; { PyObject *m, *d, *v; --- 43,48 ---- PyObject * ! Py_InitModule4(char *name, PyMethodDef *methods, char *doc, ! PyObject *passthrough, int module_api_version) { PyObject *m, *d, *v; *************** *** 85,92 **** /* Helper for mkvalue() to scan the length of a format */ ! static int countformat(char *format, int endchar); ! static int countformat(format, endchar) ! char *format; ! int endchar; { int count = 0; --- 81,85 ---- /* Helper for mkvalue() to scan the length of a format */ ! static int countformat(char *format, int endchar) { int count = 0; *************** *** 138,146 **** static PyObject * ! do_mkdict(p_format, p_va, endchar, n) ! char **p_format; ! va_list *p_va; ! int endchar; ! int n; { PyObject *d; --- 131,135 ---- static PyObject * ! do_mkdict(char **p_format, va_list *p_va, int endchar, int n) { PyObject *d; *************** *** 184,192 **** static PyObject * ! do_mklist(p_format, p_va, endchar, n) ! char **p_format; ! va_list *p_va; ! int endchar; ! int n; { PyObject *v; --- 173,177 ---- static PyObject * ! do_mklist(char **p_format, va_list *p_va, int endchar, int n) { PyObject *v; *************** *** 225,233 **** static PyObject * ! do_mktuple(p_format, p_va, endchar, n) ! char **p_format; ! va_list *p_va; ! int endchar; ! int n; { PyObject *v; --- 210,214 ---- static PyObject * ! do_mktuple(char **p_format, va_list *p_va, int endchar, int n) { PyObject *v; *************** *** 257,263 **** static PyObject * ! do_mkvalue(p_format, p_va) ! char **p_format; ! va_list *p_va; { for (;;) { --- 238,242 ---- static PyObject * ! do_mkvalue(char **p_format, va_list *p_va) { for (;;) { *************** *** 402,422 **** - #ifdef HAVE_STDARG_PROTOTYPES - /* VARARGS 2 */ PyObject *Py_BuildValue(char *format, ...) - #else - /* VARARGS */ - PyObject *Py_BuildValue(va_alist) va_dcl - #endif { va_list va; PyObject* retval; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, format); - #else - char *format; - va_start(va); - format = va_arg(va, char *); - #endif retval = Py_VaBuildValue(format, va); va_end(va); --- 381,389 ---- *************** *** 425,431 **** PyObject * ! Py_VaBuildValue(format, va) ! char *format; ! va_list va; { char *f = format; --- 392,396 ---- PyObject * ! Py_VaBuildValue(char *format, va_list va) { char *f = format; *************** *** 451,464 **** - #ifdef HAVE_STDARG_PROTOTYPES PyObject * PyEval_CallFunction(PyObject *obj, char *format, ...) - #else - PyObject * - PyEval_CallFunction(obj, format, va_alist) - PyObject *obj; - char *format; - va_dcl - #endif { va_list vargs; --- 416,421 ---- *************** *** 466,474 **** PyObject *res; - #ifdef HAVE_STDARG_PROTOTYPES va_start(vargs, format); - #else - va_start(vargs); - #endif args = Py_VaBuildValue(format, vargs); --- 423,427 ---- *************** *** 485,499 **** - #ifdef HAVE_STDARG_PROTOTYPES PyObject * PyEval_CallMethod(PyObject *obj, char *methodname, char *format, ...) - #else - PyObject * - PyEval_CallMethod(obj, methodname, format, va_alist) - PyObject *obj; - char *methodname; - char *format; - va_dcl - #endif { va_list vargs; --- 438,443 ---- *************** *** 506,514 **** return NULL; - #ifdef HAVE_STDARG_PROTOTYPES va_start(vargs, format); - #else - va_start(vargs); - #endif args = Py_VaBuildValue(format, vargs); --- 450,454 ---- Index: mystrtoul.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/mystrtoul.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** mystrtoul.c 2000/06/30 23:58:06 2.19 --- mystrtoul.c 2000/07/22 18:47:25 2.20 *************** *** 45,52 **** unsigned long ! PyOS_strtoul(str, ptr, base) ! register char * str; ! char ** ptr; ! int base; { register unsigned long result; /* return value of the function */ --- 45,49 ---- unsigned long ! PyOS_strtoul(register char *str, char **ptr, int base) { register unsigned long result; /* return value of the function */ *************** *** 138,145 **** long ! PyOS_strtol(str, ptr, base) ! char * str; ! char ** ptr; ! int base; { long result; --- 135,139 ---- long ! PyOS_strtol(char *str, char **ptr, int base) { long result; Index: pyfpe.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pyfpe.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** pyfpe.c 1998/08/25 17:48:25 2.5 --- pyfpe.c 2000/07/22 18:47:25 2.6 *************** *** 18,23 **** double ! PyFPE_dummy(dummy) ! void *dummy; { return 1.0; --- 18,22 ---- double ! PyFPE_dummy(void *dummy) { return 1.0; Index: pystate.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pystate.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** pystate.c 2000/06/30 23:58:06 2.11 --- pystate.c 2000/07/22 18:47:25 2.12 *************** *** 38,42 **** PyInterpreterState * ! PyInterpreterState_New() { PyInterpreterState *interp = PyMem_NEW(PyInterpreterState, 1); --- 38,42 ---- PyInterpreterState * ! PyInterpreterState_New(void) { PyInterpreterState *interp = PyMem_NEW(PyInterpreterState, 1); *************** *** 59,64 **** void ! PyInterpreterState_Clear(interp) ! PyInterpreterState *interp; { PyThreadState *p; --- 59,63 ---- void ! PyInterpreterState_Clear(PyInterpreterState *interp) { PyThreadState *p; *************** *** 74,79 **** static void ! zapthreads(interp) ! PyInterpreterState *interp; { PyThreadState *p; --- 73,77 ---- static void ! zapthreads(PyInterpreterState *interp) { PyThreadState *p; *************** *** 87,92 **** void ! PyInterpreterState_Delete(interp) ! PyInterpreterState *interp; { PyInterpreterState **p; --- 85,89 ---- void ! PyInterpreterState_Delete(PyInterpreterState *interp) { PyInterpreterState **p; *************** *** 107,112 **** PyThreadState * ! PyThreadState_New(interp) ! PyInterpreterState *interp; { PyThreadState *tstate = PyMem_NEW(PyThreadState, 1); --- 104,108 ---- PyThreadState * ! PyThreadState_New(PyInterpreterState *interp) { PyThreadState *tstate = PyMem_NEW(PyThreadState, 1); *************** *** 144,149 **** void ! PyThreadState_Clear(tstate) ! PyThreadState *tstate; { if (Py_VerboseFlag && tstate->frame != NULL) --- 140,144 ---- void ! PyThreadState_Clear(PyThreadState *tstate) { if (Py_VerboseFlag && tstate->frame != NULL) *************** *** 169,174 **** void ! PyThreadState_Delete(tstate) ! PyThreadState *tstate; { PyInterpreterState *interp; --- 164,168 ---- void ! PyThreadState_Delete(PyThreadState *tstate) { PyInterpreterState *interp; *************** *** 196,200 **** PyThreadState * ! PyThreadState_Get() { if (_PyThreadState_Current == NULL) --- 190,194 ---- PyThreadState * ! PyThreadState_Get(void) { if (_PyThreadState_Current == NULL) *************** *** 206,211 **** PyThreadState * ! PyThreadState_Swap(new) ! PyThreadState *new; { PyThreadState *old = _PyThreadState_Current; --- 200,204 ---- PyThreadState * ! PyThreadState_Swap(PyThreadState *new) { PyThreadState *old = _PyThreadState_Current; *************** *** 223,227 **** PyObject * ! PyThreadState_GetDict() { if (_PyThreadState_Current == NULL) --- 216,220 ---- PyObject * ! PyThreadState_GetDict(void) { if (_PyThreadState_Current == NULL) Index: pythonrun.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v retrieving revision 2.104 retrieving revision 2.105 diff -C2 -r2.104 -r2.105 *** pythonrun.c 2000/07/16 12:04:32 2.104 --- pythonrun.c 2000/07/22 18:47:25 2.105 *************** *** 38,42 **** #include "macglue.h" #endif ! extern char *Py_GetPath(); extern grammar _PyParser_Grammar; /* From graminit.c */ --- 38,42 ---- #include "macglue.h" #endif ! extern char *Py_GetPath(void); extern grammar _PyParser_Grammar; /* From graminit.c */ *************** *** 60,67 **** #endif ! extern void _PyUnicode_Init(); ! extern void _PyUnicode_Fini(); ! extern void _PyCodecRegistry_Init(); ! extern void _PyCodecRegistry_Fini(); --- 60,67 ---- #endif ! extern void _PyUnicode_Init(void); ! extern void _PyUnicode_Fini(void); ! extern void _PyCodecRegistry_Init(void); ! extern void _PyCodecRegistry_Fini(void); *************** *** 79,83 **** int ! Py_IsInitialized() { return initialized; --- 79,83 ---- int ! Py_IsInitialized(void) { return initialized; *************** *** 97,101 **** void ! Py_Initialize() { PyInterpreterState *interp; --- 97,101 ---- void ! Py_Initialize(void) { PyInterpreterState *interp; *************** *** 186,190 **** void ! Py_Finalize() { PyInterpreterState *interp; --- 186,190 ---- void ! Py_Finalize(void) { PyInterpreterState *interp; *************** *** 284,288 **** PyThreadState * ! Py_NewInterpreter() { PyInterpreterState *interp; --- 284,288 ---- PyThreadState * ! Py_NewInterpreter(void) { PyInterpreterState *interp; *************** *** 353,358 **** void ! Py_EndInterpreter(tstate) ! PyThreadState *tstate; { PyInterpreterState *interp = tstate->interp; --- 353,357 ---- void ! Py_EndInterpreter(PyThreadState *tstate) { PyInterpreterState *interp = tstate->interp; *************** *** 374,379 **** void ! Py_SetProgramName(pn) ! char *pn; { if (pn && *pn) --- 373,377 ---- void ! Py_SetProgramName(char *pn) { if (pn && *pn) *************** *** 382,386 **** char * ! Py_GetProgramName() { return progname; --- 380,384 ---- char * ! Py_GetProgramName(void) { return progname; *************** *** 390,395 **** void ! Py_SetPythonHome(home) ! char *home; { default_home = home; --- 388,392 ---- void ! Py_SetPythonHome(char *home) { default_home = home; *************** *** 397,401 **** char * ! Py_GetPythonHome() { char *home = default_home; --- 394,398 ---- char * ! Py_GetPythonHome(void) { char *home = default_home; *************** *** 408,412 **** static void ! initmain() { PyObject *m, *d; --- 405,409 ---- static void ! initmain(void) { PyObject *m, *d; *************** *** 427,431 **** static void ! initsite() { PyObject *m, *f; --- 424,428 ---- static void ! initsite(void) { PyObject *m, *f; *************** *** 452,458 **** int ! PyRun_AnyFile(fp, filename) ! FILE *fp; ! char *filename; { if (filename == NULL) --- 449,453 ---- int ! PyRun_AnyFile(FILE *fp, char *filename) { if (filename == NULL) *************** *** 465,471 **** int ! PyRun_InteractiveLoop(fp, filename) ! FILE *fp; ! char *filename; { PyObject *v; --- 460,464 ---- int ! PyRun_InteractiveLoop(FILE *fp, char *filename) { PyObject *v; *************** *** 496,502 **** int ! PyRun_InteractiveOne(fp, filename) ! FILE *fp; ! char *filename; { PyObject *m, *d, *v, *w; --- 489,493 ---- int ! PyRun_InteractiveOne(FILE *fp, char *filename) { PyObject *m, *d, *v, *w; *************** *** 550,556 **** int ! PyRun_SimpleFile(fp, filename) ! FILE *fp; ! char *filename; { PyObject *m, *d, *v; --- 541,545 ---- int ! PyRun_SimpleFile(FILE *fp, char *filename) { PyObject *m, *d, *v; *************** *** 593,598 **** int ! PyRun_SimpleString(command) ! char *command; { PyObject *m, *d, *v; --- 582,586 ---- int ! PyRun_SimpleString(char *command) { PyObject *m, *d, *v; *************** *** 613,623 **** static int ! parse_syntax_error(err, message, filename, lineno, offset, text) ! PyObject* err; ! PyObject** message; ! char** filename; ! int* lineno; ! int* offset; ! char** text; { long hold; --- 601,606 ---- static int ! parse_syntax_error(PyObject *err, PyObject **message, char **filename, ! int *lineno, int *offset, char **text) { long hold; *************** *** 676,680 **** void ! PyErr_Print() { PyErr_PrintEx(1); --- 659,663 ---- void ! PyErr_Print(void) { PyErr_PrintEx(1); *************** *** 682,687 **** void ! PyErr_PrintEx(set_sys_last_vars) ! int set_sys_last_vars; { int err = 0; --- 665,669 ---- void ! PyErr_PrintEx(int set_sys_last_vars) { int err = 0; *************** *** 854,861 **** PyObject * ! PyRun_String(str, start, globals, locals) ! char *str; ! int start; ! PyObject *globals, *locals; { return run_err_node(PyParser_SimpleParseString(str, start), --- 836,840 ---- PyObject * ! PyRun_String(char *str, int start, PyObject *globals, PyObject *locals) { return run_err_node(PyParser_SimpleParseString(str, start), *************** *** 864,872 **** PyObject * ! PyRun_File(fp, filename, start, globals, locals) ! FILE *fp; ! char *filename; ! int start; ! PyObject *globals, *locals; { return run_err_node(PyParser_SimpleParseFile(fp, filename, start), --- 843,848 ---- PyObject * ! PyRun_File(FILE *fp, char *filename, int start, PyObject *globals, ! PyObject *locals) { return run_err_node(PyParser_SimpleParseFile(fp, filename, start), *************** *** 875,882 **** static PyObject * ! run_err_node(n, filename, globals, locals) ! node *n; ! char *filename; ! PyObject *globals, *locals; { if (n == NULL) --- 851,855 ---- static PyObject * ! run_err_node(node *n, char *filename, PyObject *globals, PyObject *locals) { if (n == NULL) *************** *** 886,893 **** static PyObject * ! run_node(n, filename, globals, locals) ! node *n; ! char *filename; ! PyObject *globals, *locals; { PyCodeObject *co; --- 859,863 ---- static PyObject * ! run_node(node *n, char *filename, PyObject *globals, PyObject *locals) { PyCodeObject *co; *************** *** 903,910 **** static PyObject * ! run_pyc_file(fp, filename, globals, locals) ! FILE *fp; ! char *filename; ! PyObject *globals, *locals; { PyCodeObject *co; --- 873,877 ---- static PyObject * ! run_pyc_file(FILE *fp, char *filename, PyObject *globals, PyObject *locals) { PyCodeObject *co; *************** *** 935,942 **** PyObject * ! Py_CompileString(str, filename, start) ! char *str; ! char *filename; ! int start; { node *n; --- 902,906 ---- PyObject * ! Py_CompileString(char *str, char *filename, int start) { node *n; *************** *** 953,960 **** node * ! PyParser_SimpleParseFile(fp, filename, start) ! FILE *fp; ! char *filename; ! int start; { node *n; --- 917,921 ---- node * ! PyParser_SimpleParseFile(FILE *fp, char *filename, int start) { node *n; *************** *** 970,976 **** node * ! PyParser_SimpleParseString(str, start) ! char *str; ! int start; { node *n; --- 931,935 ---- node * ! PyParser_SimpleParseString(char *str, int start) { node *n; *************** *** 985,990 **** static void ! err_input(err) ! perrdetail *err; { PyObject *v, *w, *errtype; --- 944,948 ---- static void ! err_input(perrdetail *err) { PyObject *v, *w, *errtype; *************** *** 1054,1059 **** void ! Py_FatalError(msg) ! char *msg; { fprintf(stderr, "Fatal Python error: %s\n", msg); --- 1012,1016 ---- void ! Py_FatalError(char *msg) { fprintf(stderr, "Fatal Python error: %s\n", msg); *************** *** 1080,1088 **** #define NEXITFUNCS 32 ! static void (*exitfuncs[NEXITFUNCS])(); static int nexitfuncs = 0; ! int Py_AtExit(func) ! void (*func)(void); { if (nexitfuncs >= NEXITFUNCS) --- 1037,1044 ---- #define NEXITFUNCS 32 ! static void (*exitfuncs[NEXITFUNCS])(void); static int nexitfuncs = 0; ! int Py_AtExit(void (*func)(void)) { if (nexitfuncs >= NEXITFUNCS) *************** *** 1093,1097 **** static void ! call_sys_exitfunc() { PyObject *exitfunc = PySys_GetObject("exitfunc"); --- 1049,1053 ---- static void ! call_sys_exitfunc(void) { PyObject *exitfunc = PySys_GetObject("exitfunc"); *************** *** 1116,1120 **** static void ! call_ll_exitfuncs() { while (nexitfuncs > 0) --- 1072,1076 ---- static void ! call_ll_exitfuncs(void) { while (nexitfuncs > 0) *************** *** 1126,1131 **** void ! Py_Exit(sts) ! int sts; { Py_Finalize(); --- 1082,1086 ---- void ! Py_Exit(int sts) { Py_Finalize(); *************** *** 1139,1143 **** static void ! initsigs() { #ifdef HAVE_SIGNAL_H --- 1094,1098 ---- static void ! initsigs(void) { #ifdef HAVE_SIGNAL_H *************** *** 1153,1158 **** int ! _Py_AskYesNo(prompt) ! char *prompt; { char buf[256]; --- 1108,1112 ---- int ! _Py_AskYesNo(char *prompt) { char buf[256]; *************** *** 1171,1176 **** int ! isatty(fd) ! int fd; { return fd == fileno(stdin); --- 1125,1129 ---- int ! isatty(int fd) { return fd == fileno(stdin); *************** *** 1186,1192 **** */ int ! Py_FdIsInteractive(fp, filename) ! FILE *fp; ! char *filename; { if (isatty((int)fileno(fp))) --- 1139,1143 ---- */ int ! Py_FdIsInteractive(FILE *fp, char *filename) { if (isatty((int)fileno(fp))) Index: sigcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/sigcheck.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** sigcheck.c 2000/06/30 23:58:06 2.6 --- sigcheck.c 2000/07/22 18:47:25 2.7 *************** *** 20,24 **** /* ARGSUSED */ int ! PyErr_CheckSignals() { if (!PyOS_InterruptOccurred()) --- 20,24 ---- /* ARGSUSED */ int ! PyErr_CheckSignals(void) { if (!PyOS_InterruptOccurred()) Index: strdup.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/strdup.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** strdup.c 1999/01/27 17:53:11 2.3 --- strdup.c 2000/07/22 18:47:25 2.4 *************** *** 4,9 **** char * ! strdup(str) ! const char *str; { if (str != NULL) { --- 4,8 ---- char * ! strdup(const char *str) { if (str != NULL) { Index: strerror.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/strerror.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** strerror.c 2000/06/30 23:58:06 2.8 --- strerror.c 2000/07/22 18:47:25 2.9 *************** *** 18,23 **** char * ! strerror(err) ! int err; { static char buf[20]; --- 18,22 ---- char * ! strerror(int err) { static char buf[20]; Index: strtod.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/strtod.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** strtod.c 2000/07/16 12:04:32 1.9 --- strtod.c 2000/07/22 18:47:25 1.10 *************** *** 53,57 **** static double HUGE = 1.7976931348623157e308; ! extern double atof(); /* Only called when result known to be ok */ #ifndef DONT_HAVE_ERRNO_H --- 53,57 ---- static double HUGE = 1.7976931348623157e308; ! extern double atof(const char *); /* Only called when result known to be ok */ #ifndef DONT_HAVE_ERRNO_H *************** *** 60,67 **** extern int errno; ! double strtod(str, ptr) ! char *str; ! char **ptr; ! { int sign, scale, dotseen; int esign, expt; --- 60,65 ---- extern int errno; ! double strtod(char *str, char **ptr) ! { int sign, scale, dotseen; int esign, expt; *************** *** 156,158 **** errno = 0; return atof(buffer)*sign; ! } --- 154,156 ---- errno = 0; return atof(buffer)*sign; ! } Index: structmember.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/structmember.c,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** structmember.c 2000/06/30 23:58:06 2.16 --- structmember.c 2000/07/22 18:47:25 2.17 *************** *** 16,21 **** static PyObject * ! listmembers(mlist) ! struct memberlist *mlist; { int i, n; --- 16,20 ---- static PyObject * ! listmembers(struct memberlist *mlist) { int i, n; *************** *** 40,47 **** PyObject * ! PyMember_Get(addr, mlist, name) ! char *addr; ! struct memberlist *mlist; ! char *name; { struct memberlist *l; --- 39,43 ---- PyObject * ! PyMember_Get(char *addr, struct memberlist *mlist, char *name) { struct memberlist *l; *************** *** 140,148 **** int ! PyMember_Set(addr, mlist, name, v) ! char *addr; ! struct memberlist *mlist; ! char *name; ! PyObject *v; { struct memberlist *l; --- 136,140 ---- int ! PyMember_Set(char *addr, struct memberlist *mlist, char *name, PyObject *v) { struct memberlist *l; Index: sysmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v retrieving revision 2.69 retrieving revision 2.70 diff -C2 -r2.69 -r2.70 *** sysmodule.c 2000/07/09 03:09:56 2.69 --- sysmodule.c 2000/07/22 18:47:25 2.70 *************** *** 39,44 **** PyObject * ! PySys_GetObject(name) ! char *name; { PyThreadState *tstate = PyThreadState_Get(); --- 39,43 ---- PyObject * ! PySys_GetObject(char *name) { PyThreadState *tstate = PyThreadState_Get(); *************** *** 50,56 **** FILE * ! PySys_GetFile(name, def) ! char *name; ! FILE *def; { FILE *fp = NULL; --- 49,53 ---- FILE * ! PySys_GetFile(char *name, FILE *def) { FILE *fp = NULL; *************** *** 64,70 **** int ! PySys_SetObject(name, v) ! char *name; ! PyObject *v; { PyThreadState *tstate = PyThreadState_Get(); --- 61,65 ---- int ! PySys_SetObject(char *name, PyObject *v) { PyThreadState *tstate = PyThreadState_Get(); *************** *** 81,87 **** static PyObject * ! sys_exc_info(self, args) ! PyObject *self; ! PyObject *args; { PyThreadState *tstate; --- 76,80 ---- static PyObject * ! sys_exc_info(PyObject *self, PyObject *args) { PyThreadState *tstate; *************** *** 104,110 **** static PyObject * ! sys_exit(self, args) ! PyObject *self; ! PyObject *args; { /* Raise SystemExit so callers may catch it or clean up. */ --- 97,101 ---- static PyObject * ! sys_exit(PyObject *self, PyObject *args) { /* Raise SystemExit so callers may catch it or clean up. */ *************** *** 123,129 **** static PyObject * ! sys_getdefaultencoding(self, args) ! PyObject *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, ":getdefaultencoding")) --- 114,118 ---- static PyObject * ! sys_getdefaultencoding(PyObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":getdefaultencoding")) *************** *** 139,145 **** static PyObject * ! sys_setdefaultencoding(self, args) ! PyObject *self; ! PyObject *args; { char *encoding; --- 128,132 ---- static PyObject * ! sys_setdefaultencoding(PyObject *self, PyObject *args) { char *encoding; *************** *** 158,164 **** static PyObject * ! sys_settrace(self, args) ! PyObject *self; ! PyObject *args; { PyThreadState *tstate = PyThreadState_Get(); --- 145,149 ---- static PyObject * ! sys_settrace(PyObject *self, PyObject *args) { PyThreadState *tstate = PyThreadState_Get(); *************** *** 180,186 **** static PyObject * ! sys_setprofile(self, args) ! PyObject *self; ! PyObject *args; { PyThreadState *tstate = PyThreadState_Get(); --- 165,169 ---- static PyObject * ! sys_setprofile(PyObject *self, PyObject *args) { PyThreadState *tstate = PyThreadState_Get(); *************** *** 202,208 **** static PyObject * ! sys_setcheckinterval(self, args) ! PyObject *self; ! PyObject *args; { PyThreadState *tstate = PyThreadState_Get(); --- 185,189 ---- static PyObject * ! sys_setcheckinterval(PyObject *self, PyObject *args) { PyThreadState *tstate = PyThreadState_Get(); *************** *** 224,230 **** static PyObject * ! sys_mdebug(self, args) ! PyObject *self; ! PyObject *args; { int flag; --- 205,209 ---- static PyObject * ! sys_mdebug(PyObject *self, PyObject *args) { int flag; *************** *** 238,244 **** static PyObject * ! sys_getrefcount(self, args) ! PyObject *self; ! PyObject *args; { PyObject *arg; --- 217,221 ---- static PyObject * ! sys_getrefcount(PyObject *self, PyObject *args) { PyObject *arg; *************** *** 268,273 **** #ifdef COUNT_ALLOCS static PyObject * ! sys_getcounts(self, args) ! PyObject *self, *args; { extern PyObject *get_counts(void); --- 245,249 ---- #ifdef COUNT_ALLOCS static PyObject * ! sys_getcounts(PyObject *self, PyObject *args) { extern PyObject *get_counts(void); *************** *** 316,320 **** static PyObject * ! list_builtin_module_names() { PyObject *list = PyList_New(0); --- 292,296 ---- static PyObject * ! list_builtin_module_names(void) { PyObject *list = PyList_New(0); *************** *** 408,412 **** PyObject * ! _PySys_Init() { extern int fclose(FILE *); --- 384,388 ---- PyObject * ! _PySys_Init(void) { extern int fclose(FILE *); *************** *** 496,502 **** static PyObject * ! makepathobject(path, delim) ! char *path; ! int delim; { int i, n; --- 472,476 ---- static PyObject * ! makepathobject(char *path, int delim) { int i, n; *************** *** 531,536 **** void ! PySys_SetPath(path) ! char *path; { PyObject *v; --- 505,509 ---- void ! PySys_SetPath(char *path) { PyObject *v; *************** *** 543,549 **** static PyObject * ! makeargvobject(argc, argv) ! int argc; ! char **argv; { PyObject *av; --- 516,520 ---- static PyObject * ! makeargvobject(int argc, char **argv) { PyObject *av; *************** *** 571,577 **** void ! PySys_SetArgv(argc, argv) ! int argc; ! char **argv; { PyObject *av = makeargvobject(argc, argv); --- 542,546 ---- void ! PySys_SetArgv(int argc, char **argv) { PyObject *av = makeargvobject(argc, argv); *************** *** 675,683 **** static void ! mywrite(name, fp, format, va) ! char *name; ! FILE *fp; ! const char *format; ! va_list va; { PyObject *file; --- 644,648 ---- static void ! mywrite(char *name, FILE *fp, const char *format, va_list va) { PyObject *file; *************** *** 701,720 **** void - #ifdef HAVE_STDARG_PROTOTYPES PySys_WriteStdout(const char *format, ...) - #else - PySys_WriteStdout(va_alist) - va_dcl - #endif { va_list va; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, format); - #else - char *format; - va_start(va); - format = va_arg(va, char *); - #endif mywrite("stdout", stdout, format, va); va_end(va); --- 666,674 ---- *************** *** 722,741 **** void - #ifdef HAVE_STDARG_PROTOTYPES PySys_WriteStderr(const char *format, ...) - #else - PySys_WriteStderr(va_alist) - va_dcl - #endif { va_list va; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, format); - #else - char *format; - va_start(va); - format = va_arg(va, char *); - #endif mywrite("stderr", stderr, format, va); va_end(va); --- 676,684 ---- Index: thread.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread.c,v retrieving revision 2.31 retrieving revision 2.32 diff -C2 -r2.31 -r2.32 *** thread.c 2000/06/30 23:58:06 2.31 --- thread.c 2000/07/22 18:47:25 2.32 *************** *** 30,34 **** #else #ifdef Py_DEBUG ! extern char *getenv(); #endif #endif --- 30,34 ---- #else #ifdef Py_DEBUG ! extern char *getenv(const char *); #endif #endif *************** *** 74,88 **** #endif /* _POSIX_THREADS */ - #ifdef __STDC__ - #define _P(args) args - #define _P0() (void) - #define _P1(v,t) (t) - #define _P2(v1,t1,v2,t2) (t1,t2) - #else - #define _P(args) () - #define _P0() () - #define _P1(v,t) (v) t; - #define _P2(v1,t1,v2,t2) (v1,v2) t1; t2; - #endif /* __STDC__ */ #ifdef Py_DEBUG --- 74,77 ---- *************** *** 99,103 **** static void PyThread__init_thread(); /* Forward */ ! void PyThread_init_thread _P0() { #ifdef Py_DEBUG --- 88,92 ---- static void PyThread__init_thread(); /* Forward */ ! void PyThread_init_thread(void) { #ifdef Py_DEBUG Index: thread_cthread.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_cthread.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** thread_cthread.h 2000/06/30 23:58:06 2.11 --- thread_cthread.h 2000/07/22 18:47:25 2.12 *************** *** 15,19 **** * Initialization. */ ! static void PyThread__init_thread _P0() { cthread_init(); --- 15,20 ---- * Initialization. */ ! static void ! PyThread__init_thread(void) { cthread_init(); *************** *** 23,27 **** * Thread support. */ ! int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) { int success = 0; /* init not needed when SOLARIS_THREADS and */ --- 24,29 ---- * Thread support. */ ! int ! PyThread_start_new_thread(func, void (*func)(void *), void *arg) { int success = 0; /* init not needed when SOLARIS_THREADS and */ *************** *** 38,42 **** } ! long PyThread_get_thread_ident _P0() { if (!initialized) --- 40,45 ---- } ! long ! PyThread_get_thread_ident(void) { if (!initialized) *************** *** 45,49 **** } ! static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); --- 48,53 ---- } ! static void ! do_PyThread_exit_thread(int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); *************** *** 56,65 **** } ! void PyThread_exit_thread _P0() { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread _P0() { do_PyThread_exit_thread(1); --- 60,71 ---- } ! void ! PyThread_exit_thread(void) { do_PyThread_exit_thread(0); } ! void ! PyThread__exit_thread(void) { do_PyThread_exit_thread(1); *************** *** 67,71 **** #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog _P2(status, int status, no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); --- 73,78 ---- #ifndef NO_EXIT_PROG ! static ! void do_PyThread_exit_prog(int status, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); *************** *** 81,90 **** } ! void PyThread_exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 1); --- 88,99 ---- } ! void ! PyThread_exit_prog(int status) { do_PyThread_exit_prog(status, 0); } ! void ! PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); *************** *** 95,99 **** * Lock support. */ ! PyThread_type_lock PyThread_allocate_lock _P0() { mutex_t lock; --- 104,109 ---- * Lock support. */ ! PyThread_type_lock ! PyThread_allocate_lock(void) { mutex_t lock; *************** *** 113,117 **** } ! void PyThread_free_lock _P1(lock, PyThread_type_lock lock) { dprintf(("PyThread_free_lock(%p) called\n", lock)); --- 123,128 ---- } ! void ! PyThread_free_lock(PyThread_type_lock lock) { dprintf(("PyThread_free_lock(%p) called\n", lock)); *************** *** 119,123 **** } ! int PyThread_acquire_lock _P2(lock, PyThread_type_lock lock, waitflag, int waitflag) { int success = FALSE; --- 130,135 ---- } ! int ! PyThread_acquire_lock(PyThread_type_lock lock, int waitflag) { int success = FALSE; *************** *** 134,138 **** } ! void PyThread_release_lock _P1(lock, PyThread_type_lock lock) { dprintf(("PyThread_release_lock(%p) called\n", lock)); --- 146,151 ---- } ! void ! PyThread_release_lock(PyThread_type_lock lock) { dprintf(("PyThread_release_lock(%p) called\n", lock)); *************** *** 154,158 **** * */ ! PyThread_type_sema PyThread_allocate_sema _P1(value, int value) { char *sema = 0; --- 167,172 ---- * */ ! PyThread_type_sema ! PyThread_allocate_sema(int value) { char *sema = 0; *************** *** 165,174 **** } ! void PyThread_free_sema _P1(sema, PyThread_type_sema sema) { dprintf(("PyThread_free_sema(%p) called\n", sema)); } ! int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag) { dprintf(("PyThread_down_sema(%p, %d) called\n", sema, waitflag)); --- 179,190 ---- } ! void ! PyThread_free_sema(PyThread_type_sema sema) { dprintf(("PyThread_free_sema(%p) called\n", sema)); } ! int ! PyThread_down_sema(PyThread_type_sema sema, int waitflag) { dprintf(("PyThread_down_sema(%p, %d) called\n", sema, waitflag)); *************** *** 177,181 **** } ! void PyThread_up_sema _P1(sema, PyThread_type_sema sema) { dprintf(("PyThread_up_sema(%p)\n", sema)); --- 193,198 ---- } ! void ! PyThread_up_sema(PyThread_type_sema sema) { dprintf(("PyThread_up_sema(%p)\n", sema)); Index: thread_foobar.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_foobar.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** thread_foobar.h 2000/06/30 23:58:06 2.9 --- thread_foobar.h 2000/07/22 18:47:25 2.10 *************** *** 12,16 **** * Initialization. */ ! static void PyThread__init_thread _P0() { } --- 12,17 ---- * Initialization. */ ! static void ! PyThread__init_thread(void) { } *************** *** 19,23 **** * Thread support. */ ! int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) { int success = 0; /* init not needed when SOLARIS_THREADS and */ --- 20,25 ---- * Thread support. */ ! int ! PyThread_start_new_thread(void (*func)(void *), void *arg) { int success = 0; /* init not needed when SOLARIS_THREADS and */ *************** *** 30,34 **** } ! long PyThread_get_thread_ident _P0() { if (!initialized) --- 32,37 ---- } ! long ! PyThread_get_thread_ident(void) { if (!initialized) *************** *** 36,40 **** } ! static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); --- 39,44 ---- } ! static ! void do_PyThread_exit_thread(int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); *************** *** 46,55 **** } ! void PyThread_exit_thread _P0() { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread _P0() { do_PyThread_exit_thread(1); --- 50,61 ---- } ! void ! PyThread_exit_thread(void) { do_PyThread_exit_thread(0); } ! void ! PyThread__exit_thread(void) { do_PyThread_exit_thread(1); *************** *** 57,61 **** #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog _P2(status, int status, no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); --- 63,68 ---- #ifndef NO_EXIT_PROG ! static ! void do_PyThread_exit_prog(int status, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); *************** *** 67,76 **** } ! void PyThread_exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 1); --- 74,85 ---- } ! void ! PyThread_exit_prog(int status) { do_PyThread_exit_prog(status, 0); } ! void ! PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); *************** *** 81,85 **** * Lock support. */ ! PyThread_type_lock PyThread_allocate_lock _P0() { --- 90,95 ---- * Lock support. */ ! PyThread_type_lock ! PyThread_allocate_lock(void) { *************** *** 92,101 **** } ! void PyThread_free_lock _P1(lock, PyThread_type_lock lock) { dprintf(("PyThread_free_lock(%p) called\n", lock)); } ! int PyThread_acquire_lock _P2(lock, PyThread_type_lock lock, waitflag, int waitflag) { int success; --- 102,113 ---- } ! void ! PyThread_free_lock(PyThread_type_lock lock) { dprintf(("PyThread_free_lock(%p) called\n", lock)); } ! int ! PyThread_acquire_lock(PyThread_type_lock lock, int waitflag) { int success; *************** *** 106,110 **** } ! void PyThread_release_lock _P1(lock, PyThread_type_lock lock) { dprintf(("PyThread_release_lock(%p) called\n", lock)); --- 118,123 ---- } ! void ! PyThread_release_lock(PyThread_type_lock lock) { dprintf(("PyThread_release_lock(%p) called\n", lock)); *************** *** 114,118 **** * Semaphore support. */ ! PyThread_type_sema PyThread_allocate_sema _P1(value, int value) { dprintf(("PyThread_allocate_sema called\n")); --- 127,132 ---- * Semaphore support. */ ! PyThread_type_sema ! PyThread_allocate_sema(int value) { dprintf(("PyThread_allocate_sema called\n")); *************** *** 124,133 **** } ! void PyThread_free_sema _P1(sema, PyThread_type_sema sema) { dprintf(("PyThread_free_sema(%p) called\n", sema)); } ! int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag) { dprintf(("PyThread_down_sema(%p, %d) called\n", sema, waitflag)); --- 138,149 ---- } ! void ! PyThread_free_sema(PyThread_type_sema sema) { dprintf(("PyThread_free_sema(%p) called\n", sema)); } ! int ! PyThread_down_sema(PyThread_type_sema sema, int waitflag) { dprintf(("PyThread_down_sema(%p, %d) called\n", sema, waitflag)); *************** *** 136,140 **** } ! void PyThread_up_sema _P1(sema, PyThread_type_sema sema) { dprintf(("PyThread_up_sema(%p)\n", sema)); --- 152,157 ---- } ! void ! PyThread_up_sema(PyThread_type_sema sema) { dprintf(("PyThread_up_sema(%p)\n", sema)); Index: thread_lwp.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_lwp.h,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** thread_lwp.h 2000/07/16 12:04:32 2.11 --- thread_lwp.h 2000/07/22 18:47:25 2.12 *************** *** 26,30 **** * Initialization. */ ! static void PyThread__init_thread _P0() { lwp_setstkcache(STACKSIZE, NSTACKS); --- 26,30 ---- * Initialization. */ ! static void PyThread__init_thread(void) { lwp_setstkcache(STACKSIZE, NSTACKS); *************** *** 36,40 **** ! int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) { thread_t tid; --- 36,40 ---- ! int PyThread_start_new_thread(void (*func)(void *), void *arg) { thread_t tid; *************** *** 47,51 **** } ! long PyThread_get_thread_ident _P0() { thread_t tid; --- 47,51 ---- } ! long PyThread_get_thread_ident(void) { thread_t tid; *************** *** 57,61 **** } ! static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); --- 57,61 ---- } ! static void do_PyThread_exit_thread(int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); *************** *** 68,77 **** } ! void PyThread_exit_thread _P0() { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread _P0() { do_PyThread_exit_thread(1); --- 68,77 ---- } ! void PyThread_exit_thread(void) { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread(void) { do_PyThread_exit_thread(1); *************** *** 79,83 **** #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog _P2(status, int status, no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); --- 79,83 ---- #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog(int status, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); *************** *** 90,99 **** } ! void PyThread_exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 1); --- 90,99 ---- } ! void PyThread_exit_prog(int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); *************** *** 104,108 **** * Lock support. */ ! PyThread_type_lock PyThread_allocate_lock _P0() { struct lock *lock; --- 104,108 ---- * Lock support. */ ! PyThread_type_lock PyThread_allocate_lock(void) { struct lock *lock; *************** *** 121,125 **** } ! void PyThread_free_lock _P1(lock, PyThread_type_lock lock) { dprintf(("PyThread_free_lock(%p) called\n", lock)); --- 121,125 ---- } ! void PyThread_free_lock(PyThread_type_lock lock) { dprintf(("PyThread_free_lock(%p) called\n", lock)); *************** *** 128,132 **** } ! int PyThread_acquire_lock _P2(lock, PyThread_type_lock lock, waitflag, int waitflag) { int success; --- 128,132 ---- } ! int PyThread_acquire_lock(PyThread_type_lock lock, int waitflag) { int success; *************** *** 149,153 **** } ! void PyThread_release_lock _P1(lock, PyThread_type_lock lock) { dprintf(("PyThread_release_lock(%p) called\n", lock)); --- 149,153 ---- } ! void PyThread_release_lock(PyThread_type_lock lock) { dprintf(("PyThread_release_lock(%p) called\n", lock)); *************** *** 161,165 **** * Semaphore support. */ ! PyThread_type_sema PyThread_allocate_sema _P1(value, int value) { PyThread_type_sema sema = 0; --- 161,165 ---- * Semaphore support. */ ! PyThread_type_sema PyThread_allocate_sema(int value) { PyThread_type_sema sema = 0; *************** *** 172,181 **** } ! void PyThread_free_sema _P1(sema, PyThread_type_sema sema) { dprintf(("PyThread_free_sema(%p) called\n", sema)); } ! int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag) { dprintf(("PyThread_down_sema(%p, %d) called\n", sema, waitflag)); --- 172,181 ---- } ! void PyThread_free_sema(PyThread_type_sema sema) { dprintf(("PyThread_free_sema(%p) called\n", sema)); } ! int PyThread_down_sema(PyThread_type_sema sema, int waitflag) { dprintf(("PyThread_down_sema(%p, %d) called\n", sema, waitflag)); *************** *** 184,188 **** } ! void PyThread_up_sema _P1(sema, PyThread_type_sema sema) { dprintf(("PyThread_up_sema(%p)\n", sema)); --- 184,188 ---- } ! void PyThread_up_sema(PyThread_type_sema sema) { dprintf(("PyThread_up_sema(%p)\n", sema)); Index: thread_nt.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_nt.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** thread_nt.h 2000/06/30 23:58:06 2.14 --- thread_nt.h 2000/07/22 18:47:25 2.15 *************** *** 123,127 **** } ! PNRMUTEX AllocNonRecursiveMutex() { PNRMUTEX mutex = (PNRMUTEX)malloc(sizeof(NRMUTEX)) ; --- 123,127 ---- } ! PNRMUTEX AllocNonRecursiveMutex(void) { PNRMUTEX mutex = (PNRMUTEX)malloc(sizeof(NRMUTEX)) ; *************** *** 232,236 **** } ! void PyThread__exit_prog _P1(int status) { do_PyThread_exit_prog(status, 1); --- 232,236 ---- } ! void PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); Index: thread_os2.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_os2.h,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** thread_os2.h 2000/07/16 12:04:32 2.8 --- thread_os2.h 2000/07/22 18:47:25 2.9 *************** *** 30,34 **** * Initialization of the C package, should not be needed. */ ! static void PyThread__init_thread(void) { } --- 30,35 ---- * Initialization of the C package, should not be needed. */ ! static void ! PyThread__init_thread(void) { } *************** *** 37,41 **** * Thread support. */ ! int PyThread_start_new_thread(void (*func)(void *), void *arg) { int aThread; --- 38,43 ---- * Thread support. */ ! int ! PyThread_start_new_thread(void (*func)(void *), void *arg) { int aThread; *************** *** 53,57 **** } ! long PyThread_get_thread_ident(void) { PPIB pib; --- 55,60 ---- } ! long ! PyThread_get_thread_ident(void) { PPIB pib; *************** *** 65,69 **** } ! static void do_PyThread_exit_thread(int no_cleanup) { dprintf(("%ld: PyThread_exit_thread called\n", PyThread_get_thread_ident())); --- 68,73 ---- } ! static void ! do_PyThread_exit_thread(int no_cleanup) { dprintf(("%ld: PyThread_exit_thread called\n", PyThread_get_thread_ident())); *************** *** 76,85 **** } ! void PyThread_exit_thread(void) { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread(void) { do_PyThread_exit_thread(1); --- 80,91 ---- } ! void ! PyThread_exit_thread(void) { do_PyThread_exit_thread(0); } ! void ! PyThread__exit_thread(void) { do_PyThread_exit_thread(1); *************** *** 87,91 **** #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog(int status, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); --- 93,98 ---- #ifndef NO_EXIT_PROG ! static void ! do_PyThread_exit_prog(int status, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); *************** *** 97,106 **** } ! void PyThread_exit_prog(int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog _P1(int status) { do_PyThread_exit_prog(status, 1); --- 104,115 ---- } ! void ! PyThread_exit_prog(int status) { do_PyThread_exit_prog(status, 0); } ! void ! PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); *************** *** 113,117 **** * tell whether a thread already own the lock or not. */ ! PyThread_type_lock PyThread_allocate_lock(void) { HMTX aLock; --- 122,127 ---- * tell whether a thread already own the lock or not. */ ! PyThread_type_lock ! PyThread_allocate_lock(void) { HMTX aLock; *************** *** 132,136 **** } ! void PyThread_free_lock(PyThread_type_lock aLock) { dprintf(("%ld: PyThread_free_lock(%p) called\n", PyThread_get_thread_ident(),aLock)); --- 142,147 ---- } ! void ! PyThread_free_lock(PyThread_type_lock aLock) { dprintf(("%ld: PyThread_free_lock(%p) called\n", PyThread_get_thread_ident(),aLock)); *************** *** 145,149 **** * if the lock has already been acquired by this thread! */ ! int PyThread_acquire_lock(PyThread_type_lock aLock, int waitflag) { int success = 1; --- 156,161 ---- * if the lock has already been acquired by this thread! */ ! int ! PyThread_acquire_lock(PyThread_type_lock aLock, int waitflag) { int success = 1; *************** *** 173,177 **** } ! void PyThread_release_lock(PyThread_type_lock aLock) { dprintf(("%ld: PyThread_release_lock(%p) called\n", PyThread_get_thread_ident(),aLock)); --- 185,190 ---- } ! void ! PyThread_release_lock(PyThread_type_lock aLock) { dprintf(("%ld: PyThread_release_lock(%p) called\n", PyThread_get_thread_ident(),aLock)); *************** *** 186,205 **** * Semaphore support. */ ! PyThread_type_sema PyThread_allocate_sema(int value) { return (PyThread_type_sema) 0; } ! void PyThread_free_sema(PyThread_type_sema aSemaphore) { } ! int PyThread_down_sema(PyThread_type_sema aSemaphore, int waitflag) { return -1; } ! void PyThread_up_sema(PyThread_type_sema aSemaphore) { dprintf(("%ld: PyThread_up_sema(%p)\n", PyThread_get_thread_ident(), aSemaphore)); --- 199,222 ---- * Semaphore support. */ ! PyThread_type_sema ! PyThread_allocate_sema(int value) { return (PyThread_type_sema) 0; } ! void ! PyThread_free_sema(PyThread_type_sema aSemaphore) { } ! int ! PyThread_down_sema(PyThread_type_sema aSemaphore, int waitflag) { return -1; } ! void ! PyThread_up_sema(PyThread_type_sema aSemaphore) { dprintf(("%ld: PyThread_up_sema(%p)\n", PyThread_get_thread_ident(), aSemaphore)); Index: thread_pth.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_pth.h,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** thread_pth.h 2000/06/30 23:58:06 2.4 --- thread_pth.h 2000/07/22 18:47:25 2.5 *************** *** 44,48 **** */ ! static void PyThread__init_thread _P0() { pth_init(); --- 44,48 ---- */ ! static void PyThread__init_thread(void) { pth_init(); *************** *** 54,58 **** ! int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) { pth_t th; --- 54,58 ---- ! int PyThread_start_new_thread(void (*func)(void *), void *arg) { pth_t th; *************** *** 63,67 **** th = pth_spawn(PTH_ATTR_DEFAULT, ! (void* (*)_P((void *)))func, (void *)arg ); --- 63,67 ---- th = pth_spawn(PTH_ATTR_DEFAULT, ! (void* (*)(void *))func, (void *)arg ); *************** *** 70,74 **** } ! long PyThread_get_thread_ident _P0() { volatile pth_t threadid; --- 70,74 ---- } ! long PyThread_get_thread_ident(void) { volatile pth_t threadid; *************** *** 80,84 **** } ! static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); --- 80,84 ---- } ! static void do_PyThread_exit_thread(int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); *************** *** 91,100 **** } ! void PyThread_exit_thread _P0() { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread _P0() { do_PyThread_exit_thread(1); --- 91,100 ---- } ! void PyThread_exit_thread(void) { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread(void) { do_PyThread_exit_thread(1); *************** *** 102,106 **** #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog _P2(status, int status, no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); --- 102,106 ---- #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog(int status, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); *************** *** 112,121 **** } ! void PyThread_exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 1); --- 112,121 ---- } ! void PyThread_exit_prog(int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); *************** *** 126,130 **** * Lock support. */ ! PyThread_type_lock PyThread_allocate_lock _P0() { pth_lock *lock; --- 126,130 ---- * Lock support. */ ! PyThread_type_lock PyThread_allocate_lock(void) { pth_lock *lock; *************** *** 152,156 **** } ! void PyThread_free_lock _P1(lock, PyThread_type_lock lock) { pth_lock *thelock = (pth_lock *)lock; --- 152,156 ---- } ! void PyThread_free_lock(PyThread_type_lock lock) { pth_lock *thelock = (pth_lock *)lock; *************** *** 162,166 **** } ! int PyThread_acquire_lock _P2(lock, PyThread_type_lock lock, waitflag, int waitflag) { int success; --- 162,166 ---- } ! int PyThread_acquire_lock(PyThread_type_lock lock, int waitflag) { int success; *************** *** 199,203 **** } ! void PyThread_release_lock _P1(lock, PyThread_type_lock lock) { pth_lock *thelock = (pth_lock *)lock; --- 199,203 ---- } ! void PyThread_release_lock(PyThread_type_lock lock) { pth_lock *thelock = (pth_lock *)lock; *************** *** 229,233 **** }; ! PyThread_type_sema PyThread_allocate_sema _P1(value, int value) { struct semaphore *sema; --- 229,233 ---- }; ! PyThread_type_sema PyThread_allocate_sema(int value) { struct semaphore *sema; *************** *** 254,258 **** } ! void PyThread_free_sema _P1(sema, PyThread_type_sema sema) { int status, error = 0; --- 254,258 ---- } ! void PyThread_free_sema(PyThread_type_sema sema) { int status, error = 0; *************** *** 263,267 **** } ! int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag) { int status, error = 0, success; --- 263,267 ---- } ! int PyThread_down_sema(PyThread_type_sema sema, int waitflag) { int status, error = 0, success; *************** *** 292,296 **** } ! void PyThread_up_sema _P1(sema, PyThread_type_sema sema) { int status, error = 0; --- 292,296 ---- } ! void PyThread_up_sema(PyThread_type_sema sema) { int status, error = 0; Index: thread_pthread.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_pthread.h,v retrieving revision 2.27 retrieving revision 2.28 diff -C2 -r2.27 -r2.28 *** thread_pthread.h 2000/06/30 23:58:06 2.27 --- thread_pthread.h 2000/07/22 18:47:25 2.28 *************** *** 101,109 **** #ifdef _HAVE_BSDI ! static void _noop() { } ! static void PyThread__init_thread _P0() { /* DO AN INIT BY STARTING THE THREAD */ --- 101,111 ---- #ifdef _HAVE_BSDI ! static ! void _noop(void) { } ! static void ! PyThread__init_thread(void) { /* DO AN INIT BY STARTING THE THREAD */ *************** *** 116,120 **** #else /* !_HAVE_BSDI */ ! static void PyThread__init_thread _P0() { #if defined(_AIX) && defined(__GNUC__) --- 118,123 ---- #else /* !_HAVE_BSDI */ ! static void ! PyThread__init_thread(void) { #if defined(_AIX) && defined(__GNUC__) *************** *** 130,134 **** ! int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) { pthread_t th; --- 133,138 ---- ! int ! PyThread_start_new_thread(void (*func)(void *), void *arg) { pthread_t th; *************** *** 145,149 **** #elif defined(PY_PTHREAD_D6) pthread_attr_default, ! (void* (*)_P((void *)))func, arg #elif defined(PY_PTHREAD_D7) --- 149,153 ---- #elif defined(PY_PTHREAD_D6) pthread_attr_default, ! (void* (*)(void *))func, arg #elif defined(PY_PTHREAD_D7) *************** *** 153,157 **** #elif defined(PY_PTHREAD_STD) (pthread_attr_t*)NULL, ! (void* (*)_P((void *)))func, (void *)arg #endif --- 157,161 ---- #elif defined(PY_PTHREAD_STD) (pthread_attr_t*)NULL, ! (void* (*)(void *))func, (void *)arg #endif *************** *** 168,172 **** } ! long PyThread_get_thread_ident _P0() { volatile pthread_t threadid; --- 172,177 ---- } ! long ! PyThread_get_thread_ident(void) { volatile pthread_t threadid; *************** *** 178,182 **** } ! static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); --- 183,188 ---- } ! static void ! do_PyThread_exit_thread(int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); *************** *** 189,198 **** } ! void PyThread_exit_thread _P0() { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread _P0() { do_PyThread_exit_thread(1); --- 195,206 ---- } ! void ! PyThread_exit_thread(void) { do_PyThread_exit_thread(0); } ! void ! PyThread__exit_thread(void) { do_PyThread_exit_thread(1); *************** *** 200,204 **** #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog _P2(status, int status, no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); --- 208,213 ---- #ifndef NO_EXIT_PROG ! static void ! do_PyThread_exit_prog(int status, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); *************** *** 210,219 **** } ! void PyThread_exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 1); --- 219,230 ---- } ! void ! PyThread_exit_prog(int status) { do_PyThread_exit_prog(status, 0); } ! void ! PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); *************** *** 224,228 **** * Lock support. */ ! PyThread_type_lock PyThread_allocate_lock _P0() { pthread_lock *lock; --- 235,240 ---- * Lock support. */ ! PyThread_type_lock ! PyThread_allocate_lock(void) { pthread_lock *lock; *************** *** 256,260 **** } ! void PyThread_free_lock _P1(lock, PyThread_type_lock lock) { pthread_lock *thelock = (pthread_lock *)lock; --- 268,273 ---- } ! void ! PyThread_free_lock(PyThread_type_lock lock) { pthread_lock *thelock = (pthread_lock *)lock; *************** *** 272,276 **** } ! int PyThread_acquire_lock _P2(lock, PyThread_type_lock lock, waitflag, int waitflag) { int success; --- 285,290 ---- } ! int ! PyThread_acquire_lock(PyThread_type_lock lock, int waitflag) { int success; *************** *** 309,313 **** } ! void PyThread_release_lock _P1(lock, PyThread_type_lock lock) { pthread_lock *thelock = (pthread_lock *)lock; --- 323,328 ---- } ! void ! PyThread_release_lock(PyThread_type_lock lock) { pthread_lock *thelock = (pthread_lock *)lock; *************** *** 339,343 **** }; ! PyThread_type_sema PyThread_allocate_sema _P1(value, int value) { struct semaphore *sema; --- 354,359 ---- }; ! PyThread_type_sema ! PyThread_allocate_sema(int value) { struct semaphore *sema; *************** *** 366,370 **** } ! void PyThread_free_sema _P1(sema, PyThread_type_sema sema) { int status, error = 0; --- 382,387 ---- } ! void ! PyThread_free_sema(PyThread_type_sema sema) { int status, error = 0; *************** *** 379,383 **** } ! int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag) { int status, error = 0, success; --- 396,401 ---- } ! int ! PyThread_down_sema(PyThread_type_sema sema, int waitflag) { int status, error = 0, success; *************** *** 408,412 **** } ! void PyThread_up_sema _P1(sema, PyThread_type_sema sema) { int status, error = 0; --- 426,431 ---- } ! void ! PyThread_up_sema(PyThread_type_sema sema) { int status, error = 0; Index: thread_sgi.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_sgi.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** thread_sgi.h 2000/06/30 23:58:06 2.12 --- thread_sgi.h 2000/07/22 18:47:25 2.13 *************** *** 48,52 **** * well (because of an PyThread_exit_prog()) or whether we should continue on. */ ! static void exit_sig _P0() { d2printf(("exit_sig called\n")); --- 48,52 ---- * well (because of an PyThread_exit_prog()) or whether we should continue on. */ ! static void exit_sig(void) { d2printf(("exit_sig called\n")); *************** *** 69,73 **** * done from the library, we do as if an PyThread_exit_prog() was intended. */ ! static void maybe_exit _P0() { dprintf(("maybe_exit called\n")); --- 69,73 ---- * done from the library, we do as if an PyThread_exit_prog() was intended. */ ! static void maybe_exit(void) { dprintf(("maybe_exit called\n")); *************** *** 83,87 **** * Initialization. */ ! static void PyThread__init_thread _P0() { #ifndef NO_EXIT_PROG --- 83,87 ---- * Initialization. */ ! static void PyThread__init_thread(void) { #ifndef NO_EXIT_PROG *************** *** 144,148 **** */ ! static void clean_threads _P0() { int i, j; --- 144,148 ---- */ ! static void clean_threads(void) { int i, j; *************** *** 178,182 **** } ! int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) { #ifdef USE_DL --- 178,182 ---- } ! int PyThread_start_new_thread(void (*func)(void *), void *arg) { #ifdef USE_DL *************** *** 236,245 **** } ! long PyThread_get_thread_ident _P0() { return getpid(); } ! static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); --- 236,245 ---- } ! long PyThread_get_thread_ident(void) { return getpid(); } ! static void do_PyThread_exit_thread(int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); *************** *** 306,315 **** } ! void PyThread_exit_thread _P0() { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread _P0() { do_PyThread_exit_thread(1); --- 306,315 ---- } ! void PyThread_exit_thread(void) { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread(void) { do_PyThread_exit_thread(1); *************** *** 317,321 **** #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog _P2(status, int status, no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); --- 317,321 ---- #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog(int status, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); *************** *** 330,339 **** } ! void PyThread_exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 1); --- 330,339 ---- } ! void PyThread_exit_prog(int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); *************** *** 344,348 **** * Lock support. */ ! PyThread_type_lock PyThread_allocate_lock _P0() { ulock_t lock; --- 344,348 ---- * Lock support. */ ! PyThread_type_lock PyThread_allocate_lock(void) { ulock_t lock; *************** *** 359,363 **** } ! void PyThread_free_lock _P1(lock, PyThread_type_lock lock) { dprintf(("PyThread_free_lock(%p) called\n", lock)); --- 359,363 ---- } ! void PyThread_free_lock(PyThread_type_lock lock) { dprintf(("PyThread_free_lock(%p) called\n", lock)); *************** *** 365,369 **** } ! int PyThread_acquire_lock _P2(lock, PyThread_type_lock lock, waitflag, int waitflag) { int success; --- 365,369 ---- } ! int PyThread_acquire_lock(PyThread_type_lock lock, int waitflag) { int success; *************** *** 381,385 **** } ! void PyThread_release_lock _P1(lock, PyThread_type_lock lock) { dprintf(("PyThread_release_lock(%p) called\n", lock)); --- 381,385 ---- } ! void PyThread_release_lock(PyThread_type_lock lock) { dprintf(("PyThread_release_lock(%p) called\n", lock)); *************** *** 391,395 **** * Semaphore support. */ ! PyThread_type_sema PyThread_allocate_sema _P1(value, int value) { usema_t *sema; --- 391,395 ---- * Semaphore support. */ ! PyThread_type_sema PyThread_allocate_sema(int value) { usema_t *sema; *************** *** 404,408 **** } ! void PyThread_free_sema _P1(sema, PyThread_type_sema sema) { dprintf(("PyThread_free_sema(%p) called\n", sema)); --- 404,408 ---- } ! void PyThread_free_sema(PyThread_type_sema sema) { dprintf(("PyThread_free_sema(%p) called\n", sema)); *************** *** 410,414 **** } ! int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag) { int success; --- 410,414 ---- } ! int PyThread_down_sema(PyThread_type_sema sema, int waitflag) { int success; *************** *** 425,429 **** } ! void PyThread_up_sema _P1(sema, PyThread_type_sema sema) { dprintf(("PyThread_up_sema(%p)\n", sema)); --- 425,429 ---- } ! void PyThread_up_sema(PyThread_type_sema sema) { dprintf(("PyThread_up_sema(%p)\n", sema)); *************** *** 447,451 **** static PyThread_type_lock keymutex = NULL; ! static struct key *find_key _P2(key, int key, value, void *value) { struct key *p; --- 447,451 ---- static PyThread_type_lock keymutex = NULL; ! static struct key *find_key(int key, void *value) { struct key *p; *************** *** 470,474 **** } ! int PyThread_create_key _P0() { if (keymutex == NULL) --- 470,474 ---- } ! int PyThread_create_key(void) { if (keymutex == NULL) *************** *** 477,481 **** } ! void PyThread_delete_key _P1(key, int key) { struct key *p, **q; --- 477,481 ---- } ! void PyThread_delete_key(int key) { struct key *p, **q; *************** *** 494,498 **** } ! int PyThread_set_key_value _P2(key, int key, value, void *value) { struct key *p = find_key(key, value); --- 494,498 ---- } ! int PyThread_set_key_value(int key, void *value) { struct key *p = find_key(key, value); *************** *** 503,507 **** } ! void *PyThread_get_key_value _P1(key, int key) { struct key *p = find_key(key, NULL); --- 503,507 ---- } ! void *PyThread_get_key_value(int key) { struct key *p = find_key(key, NULL); Index: thread_solaris.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_solaris.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** thread_solaris.h 2000/06/30 23:58:06 2.13 --- thread_solaris.h 2000/07/22 18:47:25 2.14 *************** *** 20,24 **** * Initialization. */ ! static void PyThread__init_thread _P0() { } --- 20,24 ---- * Initialization. */ ! static void PyThread__init_thread(void) { } *************** *** 28,38 **** */ struct func_arg { ! void (*func) _P((void *)); void *arg; }; ! static void *new_func _P1(funcarg, void *funcarg) { ! void (*func) _P((void *)); void *arg; --- 28,39 ---- */ struct func_arg { ! void (*func)(void *); void *arg; }; ! static void * ! new_func(void *funcarg) { ! void (*func)(void *); void *arg; *************** *** 45,49 **** ! int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) { struct func_arg *funcarg; --- 46,51 ---- ! int ! PyThread_start_new_thread(void (*func)(void *), void *arg) { struct func_arg *funcarg; *************** *** 66,70 **** } ! long PyThread_get_thread_ident _P0() { if (!initialized) --- 68,73 ---- } ! long ! PyThread_get_thread_ident(void) { if (!initialized) *************** *** 73,77 **** } ! static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); --- 76,81 ---- } ! static void ! do_PyThread_exit_thread(int no_cleanup) { dprintf(("PyThread_exit_thread called\n")); *************** *** 84,93 **** } ! void PyThread_exit_thread _P0() { do_PyThread_exit_thread(0); } ! void PyThread__exit_thread _P0() { do_PyThread_exit_thread(1); --- 88,99 ---- } ! void ! PyThread_exit_thread(void) { do_PyThread_exit_thread(0); } ! void ! PyThread__exit_thread(void) { do_PyThread_exit_thread(1); *************** *** 95,99 **** #ifndef NO_EXIT_PROG ! static void do_PyThread_exit_prog _P2(status, int status, no_cleanup, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); --- 101,106 ---- #ifndef NO_EXIT_PROG ! static void ! do_PyThread_exit_prog(int status, int no_cleanup) { dprintf(("PyThread_exit_prog(%d) called\n", status)); *************** *** 109,118 **** } ! void PyThread_exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 0); } ! void PyThread__exit_prog _P1(status, int status) { do_PyThread_exit_prog(status, 1); --- 116,127 ---- } ! void ! PyThread_exit_prog(int status) { do_PyThread_exit_prog(status, 0); } ! void ! PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); *************** *** 123,127 **** * Lock support. */ ! PyThread_type_lock PyThread_allocate_lock _P0() { mutex_t *lock; --- 132,137 ---- * Lock support. */ ! PyThread_type_lock ! PyThread_allocate_lock(void) { mutex_t *lock; *************** *** 141,145 **** } ! void PyThread_free_lock _P1(lock, PyThread_type_lock lock) { dprintf(("PyThread_free_lock(%p) called\n", lock)); --- 151,156 ---- } ! void ! PyThread_free_lock(PyThread_type_lock lock) { dprintf(("PyThread_free_lock(%p) called\n", lock)); *************** *** 148,152 **** } ! int PyThread_acquire_lock _P2(lock, PyThread_type_lock lock, waitflag, int waitflag) { int success; --- 159,164 ---- } ! int ! PyThread_acquire_lock(PyThread_type_lock lock, int waitflag) { int success; *************** *** 165,169 **** } ! void PyThread_release_lock _P1(lock, PyThread_type_lock lock) { dprintf(("PyThread_release_lock(%p) called\n", lock)); --- 177,182 ---- } ! void ! PyThread_release_lock(PyThread_type_lock lock) { dprintf(("PyThread_release_lock(%p) called\n", lock)); *************** *** 175,179 **** * Semaphore support. */ ! PyThread_type_sema PyThread_allocate_sema _P1(value, int value) { sema_t *sema; --- 188,193 ---- * Semaphore support. */ ! PyThread_type_sema ! PyThread_allocate_sema(int value) { sema_t *sema; *************** *** 192,196 **** } ! void PyThread_free_sema _P1(sema, PyThread_type_sema sema) { dprintf(("PyThread_free_sema(%p) called\n", sema)); --- 206,211 ---- } ! void ! PyThread_free_sema(PyThread_type_sema sema) { dprintf(("PyThread_free_sema(%p) called\n", sema)); *************** *** 200,204 **** } ! int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag) { int success; --- 215,220 ---- } ! int ! PyThread_down_sema(PyThread_type_sema sema, int waitflag) { int success; *************** *** 221,225 **** } ! void PyThread_up_sema _P1(sema, PyThread_type_sema sema) { dprintf(("PyThread_up_sema(%p)\n", sema)); --- 237,242 ---- } ! void ! PyThread_up_sema(PyThread_type_sema sema) { dprintf(("PyThread_up_sema(%p)\n", sema)); Index: thread_wince.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_wince.h,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** thread_wince.h 2000/06/30 23:58:06 2.4 --- thread_wince.h 2000/07/22 18:47:25 2.5 *************** *** 100,104 **** } ! void PyThread__exit_prog _P1(int status) { do_PyThread_exit_prog(status, 1); --- 100,104 ---- } ! void PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); Index: traceback.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/traceback.c,v retrieving revision 2.30 retrieving revision 2.31 diff -C2 -r2.30 -r2.31 *** traceback.c 2000/06/30 23:58:06 2.30 --- traceback.c 2000/07/22 18:47:25 2.31 *************** *** 37,43 **** static PyObject * ! tb_getattr(tb, name) ! tracebackobject *tb; ! char *name; { return PyMember_Get((char *)tb, tb_memberlist, name); --- 37,41 ---- static PyObject * ! tb_getattr(tracebackobject *tb, char *name) { return PyMember_Get((char *)tb, tb_memberlist, name); *************** *** 45,50 **** static void ! tb_dealloc(tb) ! tracebackobject *tb; { Py_TRASHCAN_SAFE_BEGIN(tb) --- 43,47 ---- static void ! tb_dealloc(tracebackobject *tb) { Py_TRASHCAN_SAFE_BEGIN(tb) *************** *** 76,83 **** static tracebackobject * ! newtracebackobject(next, frame, lasti, lineno) ! tracebackobject *next; ! PyFrameObject *frame; ! int lasti, lineno; { tracebackobject *tb; --- 73,78 ---- static tracebackobject * ! newtracebackobject(tracebackobject *next, PyFrameObject *frame, int lasti, ! int lineno) { tracebackobject *tb; *************** *** 100,105 **** int ! PyTraceBack_Here(frame) ! PyFrameObject *frame; { PyThreadState *tstate = frame->f_tstate; --- 95,99 ---- int ! PyTraceBack_Here(PyFrameObject *frame) { PyThreadState *tstate = frame->f_tstate; *************** *** 115,123 **** static int ! tb_displayline(f, filename, lineno, name) ! PyObject *f; ! char *filename; ! int lineno; ! char *name; { int err = 0; --- 109,113 ---- static int ! tb_displayline(PyObject *f, char *filename, int lineno, char *name) { int err = 0; *************** *** 207,214 **** static int ! tb_printinternal(tb, f, limit) ! tracebackobject *tb; ! PyObject *f; ! int limit; { int err = 0; --- 197,201 ---- static int ! tb_printinternal(tracebackobject *tb, PyObject *f, int limit) { int err = 0; *************** *** 239,245 **** int ! PyTraceBack_Print(v, f) ! PyObject *v; ! PyObject *f; { int err; --- 226,230 ---- int ! PyTraceBack_Print(PyObject *v, PyObject *f) { int err; From python-dev@python.org Sat Jul 22 19:51:38 2000 From: python-dev@python.org (Paul Prescod) Date: Sat, 22 Jul 2000 11:51:38 -0700 Subject: [Python-checkins] CVS: python/nondist/sandbox/doctools textdoc.py,NONE,1.1 README,1.1,1.2 htmldoc.py,1.1,1.2 onlinehelp.py,1.1,1.2 Message-ID: <200007221851.LAA15489@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sandbox/doctools In directory slayer.i.sourceforge.net:/tmp/cvs-serv15410 Modified Files: README htmldoc.py onlinehelp.py Added Files: textdoc.py Log Message: Better support for module documentation. Extracts classes, funcs, etc. automatically. --- NEW FILE --- #!/usr/bin/env python """Generate text documentation from Python objects. This module uses Ka-Ping Yee's inspect module to generate text documentation given a python object. It borrows heavily from Ka-Ping Yee's htmldoc. Further details of those modules can be found at http://www.lfw.org/python/. Use: import textdoc,cgi print textdoc.document(cgi) # document an entire module print textdoc.document(cgi.FieldStorage) # document a class print textdoc.document(cgi.initlog) # document a function print textdoc.document(len) # document a builtin contact: richard_chamberlain@ntlworld.com """ # I, Richard Chamberlain, the author of this contribution, hereby grant to anyone # and everyone a nonexclusive, irrevocable, royalty-free, worldwide license to # reproduce, distribute, perform and/or display publicly, prepare derivative # versions, and otherwise use this contribution in any fashion, or any # derivative versions thereof, at no cost to anyone, and to authorize others # to do so. This software is provided "as is", with NO WARRANTY WHATSOEVER, # not even a warranty of merchantability or fitness for any particular purpose. __version__ = "22 July 2000" import inspect,string def _getdoc(object): """Returns doc string for a given object.""" result='' doc = inspect.getdoc(object) if not doc: try: doc = inspect.getcomments(object) except: pass if doc: for line in string.split(doc,'\n'): result=result+'\t'+line+'\n' if result=='': result='\tno doc string' return result and string.rstrip(result) + "\n" or "" def _tab(str,_tab=2): """Increase the indent on all but the first line""" result=[] lines=string.split(str,'\t') result.append(lines[0]) for line in lines[1:]: result.append(('\t')*_tab+line) result=string.join(result) return result def _document_module(object): """Produce text documentation for a given module.""" results=[] name=object.__name__ if hasattr(object,"__version__"): name=name+" (version: %s)\n" % object.__version__ else: name=name+" \n" results.append(name) doc=_getdoc(object) results.append(doc) cadr = lambda list: list[0] # Get the modules modules = map(cadr,inspect.getmembers(object, inspect.ismodule)) if modules: results.append('\nModules:\n\n') results.append(string.join(modules,', ')) # Get the classes classes=inspect.getmembers(object,inspect.isclass) if classes: results.append('\n\nClasses:\n\n') for aclass in classes: results.append(_document_class(aclass[1])) results.append('\n') functions=inspect.getmembers(object,inspect.isroutine) if functions: results.append('Module Functions:\n\n') for function in functions: results.append(_document_function(function[1])) return results def _document_class(object): """Produce text documentation for a given class object.""" name = object.__name__ bases = object.__bases__ results = [] title = "class %s" % name if bases: parents = [] for base in bases: parents.append(base.__name__) title = title + "(%s)" % string.join(parents, ", ") results.append(title+":\n\n") doc=_getdoc(object) results.append(doc) functions=inspect.getmembers(object,inspect.isroutine) if functions: results.append('\n\tMethods:\n\n') for function in functions: results.append("\t"+_tab(document(function[1]))) return results def _document_method(object): """Produce text documentation for a given method.""" return _document_function(object.im_func) def defaultFormat(object): rep=repr( obj ) match=re.match( r"<(.+?) at ......>", rep ) if match: return "<"+match.group(1)+">" else: return rep def _document_function(object): """Produce text documentation for a given function.""" try: args, varargs, varkw, defaults = inspect.getargspec(object) argspec = inspect.formatargspec( args, varargs, varkw, defaults) except TypeError: argspec = "(no arg info)" if object.__name__ == "": decl = ["lambda ", argspec[1:-1]] else: decl = [object.__name__, argspec, "\n"] doc = _getdoc(object) return [decl, doc+"\n"] def _document_builtin(object): """Produce text documentation for a given builtin.""" results=[] results.append(object.__name__+'\n') doc=_getdoc(object) results.append('\n'+doc) return results def document(object): """Generate documentation for a given object.""" if inspect.ismodule(object): results = _document_module(object) elif inspect.isclass(object): results = _document_class(object) elif inspect.ismethod(object): results = _document_method(object) elif inspect.isfunction(object): results = _document_function(object) elif inspect.isbuiltin(object): results = _document_builtin(object) else: raise TypeError, "don't know how to document this kind of object" return _serialise(results) def _serialise(list): """Combine a list containing strings and nested lists into a single string. This lets us manipulate lists until the last moment, since rearranging lists is faster than rearranging strings.""" results = [] if list==None: return "" for item in list: if type(item) is type(""): results.append(item) else: results.append(_serialise(item)) return string.join(results, "") if __name__=='__main__': # Test Code import Tkinter,cgi,calendar print document(Tkinter) # Try a module with classes print document(calendar) # Module without classes print document(cgi.FieldStorage) # Just a class print document(inspect.getdoc) # a method print document(len) # a builtin Index: README =================================================================== RCS file: /cvsroot/python/python/nondist/sandbox/doctools/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** README 2000/07/21 21:31:27 1.1 --- README 2000/07/22 18:51:36 1.2 *************** *** 4,7 **** onlinehelp.py -- onlinehelp for Python. Read the docstring. - htmldoc.py -- Builds HTML documentation from docstrings inspect.py -- introspection API used by both of the above --- 4,8 ---- onlinehelp.py -- onlinehelp for Python. Read the docstring. inspect.py -- introspection API used by both of the above + htmldoc.py -- Builds HTML documentation from docstrings + textdoc.py -- Builds raw text documentation from docstrings Index: htmldoc.py =================================================================== RCS file: /cvsroot/python/python/nondist/sandbox/doctools/htmldoc.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** htmldoc.py 2000/07/21 21:31:27 1.1 --- htmldoc.py 2000/07/22 18:51:36 1.2 *************** *** 10,15 **** return string.replace(string.replace(str, "&", "&"), "<", "<") def htmlrepr(object): ! return htmlescape(repr(object)) def preformat(str): --- 10,27 ---- return string.replace(string.replace(str, "&", "&"), "<", "<") + + # added by prescod + # physical addresses produced by repr were defeating diff and they are + # ugly anyhow + def smartRepr( obj ): + rep=repr( obj ) + match=re.match( r"<(.+?) at ......>", rep ) + if match: + return "<"+match.group(1)+">" + else: + return rep + def htmlrepr(object): ! return htmlescape(smartRepr(object)) def preformat(str): Index: onlinehelp.py =================================================================== RCS file: /cvsroot/python/python/nondist/sandbox/doctools/onlinehelp.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** onlinehelp.py 2000/07/21 21:31:27 1.1 --- onlinehelp.py 2000/07/22 18:51:36 1.2 *************** *** 41,44 **** --- 41,49 ---- python onlinehelp.py if + + Security warning: this module will attempt to import modules with the same + names as requested topics. Don't use the modules if you + are not confident that everything in your pythonpath is + from a trusted source. """ *************** *** 64,67 **** --- 69,73 ---- import os, sys import re + import textdoc, types prompt="--more-- (enter for more, q to quit) " *************** *** 213,216 **** --- 219,233 ---- envir_var="PYTHONDOCS" + def my_import(name): + try: + mod = __import__(name) + except ImportError: + return None + + components = name.split('.') + for comp in components[1:]: + mod = getattr(mod, comp) + return mod + class Help: def __init__( self, out, line_length, docdir=None ): *************** *** 257,301 **** def call( self, ob, out ): self.pager=out or self.Pager( self.out, self.line_length ) ! if type( ob ) in (type(""),type(u"")): ! if ob.startswith( "<" ): ! ob=ob[1:] ! if ob.endswith( ">" ): ! ob=ob[:-1] ! ! self.write( 'Topic: help( "%s" )\n' % ob ) ! ! if ob.startswith("doc:"): ! path=ob[4:] ! if not self.docdir: ! self.initDocDir() ! fullpath=os.path.join( self.docdir, path ) ! data=open( fullpath ).read() ! index=ob.rfind( "/" ) ! self.writeHTML( ob[:index], data ) else: ! try: ! info=topics[ob] ! docrlmatch=re.search( "(]+>)", info.split("\n")[0] ) ! if docrlmatch: # a first-line redirect ! self( docrlmatch.group(1) ) ! else: ! self.writeHTML( "", info ) ! except KeyError: ! glo=__builtins__.__dict__.get( ob, 0 ) ! if glo: ! self( glo ) ! else: ! sys.stderr.write( "No such topic "+`ob` ) ! return None else: ! self.write( 'Topic: help( %s )\n' % ob ) ! self.writeText( self.getdoc( ob ) ) ! def getdoc( self, ob ): ! if hasattr( ob, "__doc__" ): ! return ob.__doc__ else: ! type( ob ).__doc__ --- 274,374 ---- def call( self, ob, out ): self.pager=out or self.Pager( self.out, self.line_length ) + + if type( ob ) in (types.StringType,types.UnicodeType): #string ! # doc form of URL ! if ob.startswith("doc:") or ob.startswith( "" ! if docrl.startswith( "<" ): ! docrl=docrl[1:] ! if docrl.endswith( ">" ): ! docrl=ob[:-1] ! ! path=docrl[4:] ! if not self.docdir: ! self.initDocDir() ! ! fullpath=os.path.join( self.docdir, path ) ! data=open( fullpath ).read() ! index=docrl.rfind( "/" ) ! ! self.write( 'Topic: help( "%s" )\n' % docrl ) ! self.writeHTML( ob[:index], data ) ! ! def matchDocrlPattern( self, info ): ! firstline=info.split("\n")[0] ! docrlmatch=re.search( "<(doc:[^>]+)>", firstline ) ! if docrlmatch: ! return docrlmatch.group( 1 ) ! else: ! return None ! def handleTopic( self, topic ): ! # otherwise a topic ! info=topics.get(topic, 0 ) ! if info: ! match=self.matchDocrlPattern( info ) ! if match: # a first-line redirect ! self.handledocrl( match ) else: ! self.write( 'Topic: help( "%s" )\n' % topic ) ! self.writeHTML( "", info ) ! return None ! ! # try again -- this time in builtins ! glo=__builtins__.__dict__.get( topic, 0 ) ! if glo: ! self.handleObject( glo ) ! return None ! ! # try again -- this time as a module ! mod=my_import( topic ) ! if mod: ! print mod ! self.handleObject( mod ) ! return None ! ! # try again -- this time as an attribute OF a module ! ### FIXME/XXX/TODO: this code is not finished yet! ! parts=string.split( topic, "." ) ! for i in range( len( parts ), -1, -1 ): ! if i: ! front=string.join( parts[:i], "." ) ! mod=my_import( front ) ! if mod: ! self.handleObject( mod ) ! return None ! ! sys.stderr.write( "No such topic "+`topic` ) ! return None ! ! def handleObject( self, ob ): ! docstr=self.getdocstring( ob ) ! ! if docstr: ! match=self.matchDocrlPattern( docstr ) ! else: ! match=None ! ! if match: # a first-line redirect ! self.handledocrl( match ) ! else: ! text=textdoc.document( ob ) ! self.write( 'Topic: help( %s )\n' % ob ) ! self.writeText( text ) ! ! def getdocstring( self, ob ): ! # todo: use inspect.py instead ! if hasattr( ob, "__doc__" ): ! return ob.__doc__ ! else: ! return type( ob ).__doc__ *************** *** 374,377 **** test() else: ! help( eval( sys.argv[1] ) ) --- 447,450 ---- test() else: ! help( sys.argv[1] ) From python-dev@python.org Sat Jul 22 20:20:57 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 12:20:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser acceler.c,2.15,2.16 bitset.c,2.9,2.10 firstsets.c,2.10,2.11 grammar.c,2.16,2.17 grammar1.c,2.10,2.11 intrcheck.c,2.33,2.34 listnode.c,2.12,2.13 metagrammar.c,2.9,2.10 myreadline.c,2.22,2.23 node.c,2.11,2.12 parser.c,2.15,2.16 parsetok.c,2.22,2.23 pgen.c,2.16,2.17 pgenmain.c,2.20,2.21 printgrammar.c,2.11,2.12 tokenizer.c,2.46,2.47 Message-ID: <200007221920.MAA24453@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv24210 Modified Files: acceler.c bitset.c firstsets.c grammar.c grammar1.c intrcheck.c listnode.c metagrammar.c myreadline.c node.c parser.c parsetok.c pgen.c pgenmain.c printgrammar.c tokenizer.c Log Message: Mass ANSIfication. Work around intrcheck.c's desire to pass 'PyErr_CheckSignals' to 'Py_AddPendingCall' by providing a (static) wrapper function that has the right number of arguments. Index: acceler.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/acceler.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** acceler.c 2000/07/09 03:09:56 2.15 --- acceler.c 2000/07/22 19:20:54 2.16 *************** *** 31,36 **** void ! PyGrammar_AddAccelerators(g) ! grammar *g; { dfa *d; --- 31,35 ---- void ! PyGrammar_AddAccelerators(grammar *g) { dfa *d; *************** *** 49,54 **** void ! PyGrammar_RemoveAccelerators(g) ! grammar *g; { dfa *d; --- 48,52 ---- void ! PyGrammar_RemoveAccelerators(grammar *g) { dfa *d; *************** *** 69,75 **** static void ! fixdfa(g, d) ! grammar *g; ! dfa *d; { state *s; --- 67,71 ---- static void ! fixdfa(grammar *g, dfa *d) { state *s; *************** *** 81,87 **** static void ! fixstate(g, s) ! grammar *g; ! state *s; { arc *a; --- 77,81 ---- static void ! fixstate(grammar *g, state *s) { arc *a; Index: bitset.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/bitset.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** bitset.c 2000/06/30 23:58:05 2.9 --- bitset.c 2000/07/22 19:20:54 2.10 *************** *** 15,20 **** bitset ! newbitset(nbits) ! int nbits; { int nbytes = NBYTES(nbits); --- 15,19 ---- bitset ! newbitset(int nbits) { int nbytes = NBYTES(nbits); *************** *** 31,36 **** void ! delbitset(ss) ! bitset ss; { PyMem_DEL(ss); --- 30,34 ---- void ! delbitset(bitset ss) { PyMem_DEL(ss); *************** *** 38,44 **** int ! addbit(ss, ibit) ! bitset ss; ! int ibit; { int ibyte = BIT2BYTE(ibit); --- 36,40 ---- int ! addbit(bitset ss, int ibit) { int ibyte = BIT2BYTE(ibit); *************** *** 53,59 **** #if 0 /* Now a macro */ int ! testbit(ss, ibit) ! bitset ss; ! int ibit; { return (ss[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0; --- 49,53 ---- #if 0 /* Now a macro */ int ! testbit(bitset ss, int ibit) { return (ss[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0; *************** *** 62,68 **** int ! samebitset(ss1, ss2, nbits) ! bitset ss1, ss2; ! int nbits; { int i; --- 56,60 ---- int ! samebitset(bitset ss1, bitset ss2, int nbits) { int i; *************** *** 75,81 **** void ! mergebitset(ss1, ss2, nbits) ! bitset ss1, ss2; ! int nbits; { int i; --- 67,71 ---- void ! mergebitset(bitset ss1, bitset ss2, int nbits) { int i; Index: firstsets.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/firstsets.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** firstsets.c 2000/07/09 03:09:56 2.10 --- firstsets.c 2000/07/22 19:20:54 2.11 *************** *** 21,26 **** void ! addfirstsets(g) ! grammar *g; { int i; --- 21,25 ---- void ! addfirstsets(grammar *g) { int i; *************** *** 36,42 **** static void ! calcfirstset(g, d) ! grammar *g; ! dfa *d; { int i, j; --- 35,39 ---- static void ! calcfirstset(grammar *g, dfa *d) { int i, j; Index: grammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/grammar.c,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** grammar.c 2000/07/09 03:09:56 2.16 --- grammar.c 2000/07/22 19:20:54 2.17 *************** *** 22,27 **** grammar * ! newgrammar(start) ! int start; { grammar *g; --- 22,26 ---- grammar * ! newgrammar(int start) { grammar *g; *************** *** 40,47 **** dfa * ! adddfa(g, type, name) ! grammar *g; ! int type; ! char *name; { dfa *d; --- 39,43 ---- dfa * ! adddfa(grammar *g, int type, char *name) { dfa *d; *************** *** 61,66 **** int ! addstate(d) ! dfa *d; { state *s; --- 57,61 ---- int ! addstate(dfa *d) { state *s; *************** *** 80,86 **** void ! addarc(d, from, to, lbl) ! dfa *d; ! int lbl; { state *s; --- 75,79 ---- void ! addarc(dfa *d, int from, int to, int lbl) { state *s; *************** *** 100,107 **** int ! addlabel(ll, type, str) ! labellist *ll; ! int type; ! char *str; { int i; --- 93,97 ---- int ! addlabel(labellist *ll, int type, char *str) { int i; *************** *** 125,132 **** int ! findlabel(ll, type, str) ! labellist *ll; ! int type; ! char *str; { int i; --- 115,119 ---- int ! findlabel(labellist *ll, int type, char *str) { int i; *************** *** 146,151 **** void ! translatelabels(g) ! grammar *g; { int i; --- 133,137 ---- void ! translatelabels(grammar *g) { int i; *************** *** 160,166 **** static void ! translabel(g, lb) ! grammar *g; ! label *lb; { int i; --- 146,150 ---- static void ! translabel(grammar *g, label *lb) { int i; Index: grammar1.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/grammar1.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** grammar1.c 2000/06/30 23:58:05 2.10 --- grammar1.c 2000/07/22 19:20:54 2.11 *************** *** 19,25 **** dfa * ! PyGrammar_FindDFA(g, type) ! grammar *g; ! register int type; { register dfa *d; --- 19,23 ---- dfa * ! PyGrammar_FindDFA(grammar *g, register int type) { register dfa *d; *************** *** 43,48 **** char * ! PyGrammar_LabelRepr(lb) ! label *lb; { static char buf[100]; --- 41,45 ---- char * ! PyGrammar_LabelRepr(label *lb) { static char buf[100]; Index: intrcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/intrcheck.c,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -r2.33 -r2.34 *** intrcheck.c 2000/07/09 03:09:56 2.33 --- intrcheck.c 2000/07/22 19:20:54 2.34 *************** *** 31,45 **** void ! PyOS_InitInterrupts() { } void ! PyOS_FiniInterrupts() { } int ! PyOS_InterruptOccurred() { _wyield(); --- 31,45 ---- void ! PyOS_InitInterrupts(void) { } void ! PyOS_FiniInterrupts(void) { } int ! PyOS_InterruptOccurred(void) { _wyield(); *************** *** 67,71 **** void ! PyOS_InitInterrupts() { _go32_want_ctrl_break(1 /* TRUE */); --- 67,71 ---- void ! PyOS_InitInterrupts(void) { _go32_want_ctrl_break(1 /* TRUE */); *************** *** 73,82 **** void ! PyOS_FiniInterrupts() { } int ! PyOS_InterruptOccurred() { return _go32_was_ctrl_break_hit(); --- 73,82 ---- void ! PyOS_FiniInterrupts(void) { } int ! PyOS_InterruptOccurred(void) { return _go32_was_ctrl_break_hit(); *************** *** 88,102 **** void ! PyOS_InitInterrupts() { } void ! PyOS_FiniInterrupts() { } int ! PyOS_InterruptOccurred() { int interrupted = 0; --- 88,102 ---- void ! PyOS_InitInterrupts(void) { } void ! PyOS_FiniInterrupts(void) { } int ! PyOS_InterruptOccurred(void) { int interrupted = 0; *************** *** 137,155 **** void ! PyErr_SetInterrupt() { interrupted = 1; } ! extern int PyErr_CheckSignals(); ! /* ARGSUSED */ static RETSIGTYPE ! #if defined(_M_IX86) && !defined(__QNX__) ! intcatcher(int sig) /* So the C compiler shuts up */ ! #else /* _M_IX86 */ ! intcatcher(sig) ! int sig; /* Not used by required by interface */ ! #endif /* _M_IX86 */ { extern void Py_Exit(int); --- 137,155 ---- void ! PyErr_SetInterrupt(void) { interrupted = 1; } ! extern int PyErr_CheckSignals(void); ! static int ! checksignals_witharg(void * arg) ! { ! return PyErr_CheckSignals(); ! } ! static RETSIGTYPE ! intcatcher(int sig) { extern void Py_Exit(int); *************** *** 168,178 **** } signal(SIGINT, intcatcher); ! Py_AddPendingCall(PyErr_CheckSignals, NULL); } ! static RETSIGTYPE (*old_siginthandler)() = SIG_DFL; void ! PyOS_InitInterrupts() { if ((old_siginthandler = signal(SIGINT, SIG_IGN)) != SIG_IGN) --- 168,178 ---- } signal(SIGINT, intcatcher); ! Py_AddPendingCall(checksignals_witharg, NULL); } ! static RETSIGTYPE (*old_siginthandler)(int) = SIG_DFL; void ! PyOS_InitInterrupts(void) { if ((old_siginthandler = signal(SIGINT, SIG_IGN)) != SIG_IGN) *************** *** 190,194 **** void ! PyOS_FiniInterrupts() { signal(SIGINT, old_siginthandler); --- 190,194 ---- void ! PyOS_FiniInterrupts(void) { signal(SIGINT, old_siginthandler); *************** *** 196,200 **** int ! PyOS_InterruptOccurred() { if (!interrupted) --- 196,200 ---- int ! PyOS_InterruptOccurred(void) { if (!interrupted) *************** *** 207,211 **** void ! PyOS_AfterFork() { } --- 207,211 ---- void ! PyOS_AfterFork(void) { } Index: listnode.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/listnode.c,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** listnode.c 2000/07/09 03:09:56 2.12 --- listnode.c 2000/07/22 19:20:54 2.13 *************** *** 20,25 **** void ! PyNode_ListTree(n) ! node *n; { listnode(stdout, n); --- 20,24 ---- void ! PyNode_ListTree(node *n) { listnode(stdout, n); *************** *** 29,35 **** static void ! listnode(fp, n) ! FILE *fp; ! node *n; { level = 0; --- 28,32 ---- static void ! listnode(FILE *fp, node *n) { level = 0; *************** *** 39,45 **** static void ! list1node(fp, n) ! FILE *fp; ! node *n; { if (n == 0) --- 36,40 ---- static void ! list1node(FILE *fp, node *n) { if (n == 0) Index: metagrammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/metagrammar.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** metagrammar.c 2000/06/30 23:58:05 2.9 --- metagrammar.c 2000/07/22 19:20:54 2.10 *************** *** 157,161 **** grammar * ! meta_grammar() { return &_PyParser_Grammar; --- 157,161 ---- grammar * ! meta_grammar(void) { return &_PyParser_Grammar; Index: myreadline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/myreadline.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** myreadline.c 2000/07/09 03:09:56 2.22 --- myreadline.c 2000/07/22 19:20:54 2.23 *************** *** 24,28 **** #endif ! int (*PyOS_InputHook)() = NULL; /* This function restarts a fgets() after an EINTR error occurred --- 24,28 ---- #endif ! int (*PyOS_InputHook)(void) = NULL; /* This function restarts a fgets() after an EINTR error occurred *************** *** 30,37 **** static int ! my_fgets(buf, len, fp) ! char *buf; ! int len; ! FILE *fp; { char *p; --- 30,34 ---- static int ! my_fgets(char *buf, int len, FILE *fp) { char *p; *************** *** 66,71 **** char * ! PyOS_StdioReadline(prompt) ! char *prompt; { size_t n; --- 63,67 ---- char * ! PyOS_StdioReadline(char *prompt) { size_t n; *************** *** 125,130 **** char * ! PyOS_Readline(prompt) ! char *prompt; { char *rv; --- 121,125 ---- char * ! PyOS_Readline(char *prompt) { char *rv; Index: node.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/node.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** node.c 2000/07/09 03:09:56 2.11 --- node.c 2000/07/22 19:20:54 2.12 *************** *** 18,23 **** node * ! PyNode_New(type) ! int type; { node *n = PyMem_NEW(node, 1); --- 18,22 ---- node * ! PyNode_New(int type) { node *n = PyMem_NEW(node, 1); *************** *** 36,44 **** int ! PyNode_AddChild(n1, type, str, lineno) ! register node *n1; ! int type; ! char *str; ! int lineno; { register int nch = n1->n_nchildren; --- 35,39 ---- int ! PyNode_AddChild(register node *n1, int type, char *str, int lineno) { register int nch = n1->n_nchildren; *************** *** 69,74 **** void ! PyNode_Free(n) ! node *n; { if (n != NULL) { --- 64,68 ---- void ! PyNode_Free(node *n) { if (n != NULL) { *************** *** 79,84 **** static void ! freechildren(n) ! node *n; { int i; --- 73,77 ---- static void ! freechildren(node *n) { int i; Index: parser.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parser.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** parser.c 2000/07/11 17:52:59 2.15 --- parser.c 2000/07/22 19:20:54 2.16 *************** *** 37,42 **** static void ! s_reset(s) ! stack *s; { s->s_top = &s->s_base[MAXSTACK]; --- 37,41 ---- static void ! s_reset(stack *s) { s->s_top = &s->s_base[MAXSTACK]; *************** *** 45,55 **** #define s_empty(s) ((s)->s_top == &(s)->s_base[MAXSTACK]) - static int s_push(stack *, dfa *, node *); - static int ! s_push(s, d, parent) ! register stack *s; ! dfa *d; ! node *parent; { register stackentry *top; --- 44,49 ---- #define s_empty(s) ((s)->s_top == &(s)->s_base[MAXSTACK]) static int ! s_push(register stack *s, dfa *d, node *parent) { register stackentry *top; *************** *** 67,75 **** #ifdef Py_DEBUG - static void s_pop(stack *); - static void ! s_pop(s) ! register stack *s; { if (s_empty(s)) --- 61,66 ---- #ifdef Py_DEBUG static void ! s_pop(register stack *s) { if (s_empty(s)) *************** *** 88,94 **** parser_state * ! PyParser_New(g, start) ! grammar *g; ! int start; { parser_state *ps; --- 79,83 ---- parser_state * ! PyParser_New(grammar *g, int start) { parser_state *ps; *************** *** 111,116 **** void ! PyParser_Delete(ps) ! parser_state *ps; { /* NB If you want to save the parse tree, --- 100,104 ---- void ! PyParser_Delete(parser_state *ps) { /* NB If you want to save the parse tree, *************** *** 123,135 **** /* PARSER STACK OPERATIONS */ - static int shift(stack *, int, char *, int, int); - static int ! shift(s, type, str, newstate, lineno) ! register stack *s; ! int type; ! char *str; ! int newstate; ! int lineno; { int err; --- 111,116 ---- /* PARSER STACK OPERATIONS */ static int ! shift(register stack *s, int type, char *str, int newstate, int lineno) { int err; *************** *** 142,154 **** } - static int push(stack *, int, dfa *, int, int); - static int ! push(s, type, d, newstate, lineno) ! register stack *s; ! int type; ! dfa *d; ! int newstate; ! int lineno; { int err; --- 123,128 ---- } static int ! push(register stack *s, int type, dfa *d, int newstate, int lineno) { int err; *************** *** 166,176 **** /* PARSER PROPER */ - static int classify(grammar *, int, char *); - static int ! classify(g, type, str) ! grammar *g; ! register int type; ! char *str; { register int n = g->g_ll.ll_nlabels; --- 140,145 ---- /* PARSER PROPER */ static int ! classify(grammar *g, int type, char *str) { register int n = g->g_ll.ll_nlabels; *************** *** 206,215 **** int ! PyParser_AddToken(ps, type, str, lineno, expected_ret) ! register parser_state *ps; ! register int type; ! char *str; ! int lineno; ! int *expected_ret; { register int ilabel; --- 175,180 ---- int ! PyParser_AddToken(register parser_state *ps, register int type, char *str, ! int lineno, int *expected_ret) { register int ilabel; *************** *** 306,312 **** void ! dumptree(g, n) ! grammar *g; ! node *n; { int i; --- 271,275 ---- void ! dumptree(grammar *g, node *n) { int i; *************** *** 332,338 **** void ! showtree(g, n) ! grammar *g; ! node *n; { int i; --- 295,299 ---- void ! showtree(grammar *g, node *n) { int i; *************** *** 355,360 **** void ! printtree(ps) ! parser_state *ps; { if (Py_DebugFlag) { --- 316,320 ---- void ! printtree(parser_state *ps) { if (Py_DebugFlag) { Index: parsetok.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parsetok.c,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** parsetok.c 2000/07/11 17:52:59 2.22 --- parsetok.c 2000/07/22 19:20:54 2.23 *************** *** 28,36 **** node * ! PyParser_ParseString(s, g, start, err_ret) ! char *s; ! grammar *g; ! int start; ! perrdetail *err_ret; { struct tok_state *tok; --- 28,32 ---- node * ! PyParser_ParseString(char *s, grammar *g, int start, perrdetail *err_ret) { struct tok_state *tok; *************** *** 61,71 **** node * ! PyParser_ParseFile(fp, filename, g, start, ps1, ps2, err_ret) ! FILE *fp; ! char *filename; ! grammar *g; ! int start; ! char *ps1, *ps2; ! perrdetail *err_ret; { struct tok_state *tok; --- 57,62 ---- node * ! PyParser_ParseFile(FILE *fp, char *filename, grammar *g, int start, ! char *ps1, char *ps2, perrdetail *err_ret) { struct tok_state *tok; *************** *** 96,104 **** static node * ! parsetok(tok, g, start, err_ret) ! struct tok_state *tok; ! grammar *g; ! int start; ! perrdetail *err_ret; { parser_state *ps; --- 87,91 ---- static node * ! parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret) { parser_state *ps; Index: pgen.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgen.c,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** pgen.c 2000/07/16 12:04:32 2.16 --- pgen.c 2000/07/22 19:20:54 2.17 *************** *** 56,61 **** static int ! addnfastate(nf) ! nfa *nf; { nfastate *st; --- 56,60 ---- static int ! addnfastate(nfa *nf) { nfastate *st; *************** *** 71,77 **** static void ! addnfaarc(nf, from, to, lbl) ! nfa *nf; ! int from, to, lbl; { nfastate *st; --- 70,74 ---- static void ! addnfaarc(nfa *nf, int from, int to, int lbl) { nfastate *st; *************** *** 88,93 **** static nfa * ! newnfa(name) ! char *name; { nfa *nf; --- 85,89 ---- static nfa * ! newnfa(char *name) { nfa *nf; *************** *** 115,119 **** static nfagrammar * ! newnfagrammar() { nfagrammar *gr; --- 111,115 ---- static nfagrammar * ! newnfagrammar(void) { nfagrammar *gr; *************** *** 131,137 **** static nfa * ! addnfa(gr, name) ! nfagrammar *gr; ! char *name; { nfa *nf; --- 127,131 ---- static nfa * ! addnfa(nfagrammar *gr, char *name) { nfa *nf; *************** *** 161,166 **** static nfagrammar * ! metacompile(n) ! node *n; { nfagrammar *gr; --- 155,159 ---- static nfagrammar * ! metacompile(node *n) { nfagrammar *gr; *************** *** 180,186 **** static void ! compile_rule(gr, n) ! nfagrammar *gr; ! node *n; { nfa *nf; --- 173,177 ---- static void ! compile_rule(nfagrammar *gr, node *n) { nfa *nf; *************** *** 201,209 **** static void ! compile_rhs(ll, nf, n, pa, pb) ! labellist *ll; ! nfa *nf; ! node *n; ! int *pa, *pb; { int i; --- 192,196 ---- static void ! compile_rhs(labellist *ll, nfa *nf, node *n, int *pa, int *pb) { int i; *************** *** 238,246 **** static void ! compile_alt(ll, nf, n, pa, pb) ! labellist *ll; ! nfa *nf; ! node *n; ! int *pa, *pb; { int i; --- 225,229 ---- static void ! compile_alt(labellist *ll, nfa *nf, node *n, int *pa, int *pb) { int i; *************** *** 269,277 **** static void ! compile_item(ll, nf, n, pa, pb) ! labellist *ll; ! nfa *nf; ! node *n; ! int *pa, *pb; { int i; --- 252,256 ---- static void ! compile_item(labellist *ll, nfa *nf, node *n, int *pa, int *pb) { int i; *************** *** 310,318 **** static void ! compile_atom(ll, nf, n, pa, pb) ! labellist *ll; ! nfa *nf; ! node *n; ! int *pa, *pb; { int i; --- 289,293 ---- static void ! compile_atom(labellist *ll, nfa *nf, node *n, int *pa, int *pb) { int i; *************** *** 340,347 **** static void ! dumpstate(ll, nf, istate) ! labellist *ll; ! nfa *nf; ! int istate; { nfastate *st; --- 315,319 ---- static void ! dumpstate(labellist *ll, nfa *nf, int istate) { nfastate *st; *************** *** 366,372 **** static void ! dumpnfa(ll, nf) ! labellist *ll; ! nfa *nf; { int i; --- 338,342 ---- static void ! dumpnfa(labellist *ll, nfa *nf) { int i; *************** *** 382,389 **** static void ! addclosure(ss, nf, istate) ! bitset ss; ! nfa *nf; ! int istate; { if (addbit(ss, istate)) { --- 352,356 ---- static void ! addclosure(bitset ss, nfa *nf, int istate) { if (addbit(ss, istate)) { *************** *** 427,434 **** static void ! makedfa(gr, nf, d) ! nfagrammar *gr; ! nfa *nf; ! dfa *d; { int nbits = nf->nf_nstates; --- 394,398 ---- static void ! makedfa(nfagrammar *gr, nfa *nf, dfa *d) { int nbits = nf->nf_nstates; *************** *** 534,543 **** static void ! printssdfa(xx_nstates, xx_state, nbits, ll, msg) ! int xx_nstates; ! ss_state *xx_state; ! int nbits; ! labellist *ll; ! char *msg; { int i, ibit, iarc; --- 498,503 ---- static void ! printssdfa(int xx_nstates, ss_state *xx_state, int nbits, ! labellist *ll, char *msg) { int i, ibit, iarc; *************** *** 580,585 **** static int ! samestate(s1, s2) ! ss_state *s1, *s2; { int i; --- 540,544 ---- static int ! samestate(ss_state *s1, ss_state *s2) { int i; *************** *** 596,603 **** static void ! renamestates(xx_nstates, xx_state, from, to) ! int xx_nstates; ! ss_state *xx_state; ! int from, to; { int i, j; --- 555,559 ---- static void ! renamestates(int xx_nstates, ss_state *xx_state, int from, int to) { int i, j; *************** *** 616,622 **** static void ! simplify(xx_nstates, xx_state) ! int xx_nstates; ! ss_state *xx_state; { int changes; --- 572,576 ---- static void ! simplify(int xx_nstates, ss_state *xx_state) { int changes; *************** *** 649,656 **** static void ! convert(d, xx_nstates, xx_state) ! dfa *d; ! int xx_nstates; ! ss_state *xx_state; { int i, j; --- 603,607 ---- static void ! convert(dfa *d, int xx_nstates, ss_state *xx_state) { int i, j; *************** *** 686,691 **** static grammar * ! maketables(gr) ! nfagrammar *gr; { int i; --- 637,641 ---- static grammar * ! maketables(nfagrammar *gr) { int i; *************** *** 715,720 **** grammar * ! pgen(n) ! node *n; { nfagrammar *gr; --- 665,669 ---- grammar * ! pgen(node *n) { nfagrammar *gr; Index: pgenmain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/pgenmain.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** pgenmain.c 2000/07/09 03:09:56 2.20 --- pgenmain.c 2000/07/22 19:20:54 2.21 *************** *** 40,45 **** void ! Py_Exit(sts) ! int sts; { exit(sts); --- 40,44 ---- void ! Py_Exit(int sts) { exit(sts); *************** *** 47,53 **** int ! main(argc, argv) ! int argc; ! char **argv; { grammar *g; --- 46,50 ---- int ! main(int argc, char **argv) { grammar *g; *************** *** 86,91 **** grammar * ! getgrammar(filename) ! char *filename; { FILE *fp; --- 83,87 ---- grammar * ! getgrammar(char *filename) { FILE *fp; *************** *** 133,137 **** #ifdef THINK_C char * ! askfile() { char buf[256]; --- 129,133 ---- #ifdef THINK_C char * ! askfile(void) { char buf[256]; *************** *** 152,157 **** void ! Py_FatalError(msg) ! char *msg; { fprintf(stderr, "pgen: FATAL ERROR: %s\n", msg); --- 148,152 ---- void ! Py_FatalError(char *msg) { fprintf(stderr, "pgen: FATAL ERROR: %s\n", msg); *************** *** 162,167 **** /* ARGSUSED */ int ! guesstabsize(path) ! char *path; { return 4; --- 157,161 ---- /* ARGSUSED */ int ! guesstabsize(char *path) { return 4; *************** *** 172,177 **** char * ! PyOS_Readline(prompt) ! char *prompt; { size_t n = 1000; --- 166,170 ---- char * ! PyOS_Readline(char *prompt) { size_t n = 1000; *************** *** 192,218 **** } - #ifdef HAVE_STDARG_PROTOTYPES #include - #else - #include - #endif void - #ifdef HAVE_STDARG_PROTOTYPES PySys_WriteStderr(const char *format, ...) - #else - PySys_WriteStderr(va_alist) - va_dcl - #endif { va_list va; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, format); - #else - char *format; - va_start(va); - format = va_arg(va, char *); - #endif vfprintf(stderr, format, va); va_end(va); --- 185,196 ---- Index: printgrammar.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/printgrammar.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** printgrammar.c 2000/07/09 03:09:56 2.11 --- printgrammar.c 2000/07/22 19:20:54 2.12 *************** *** 21,27 **** void ! printgrammar(g, fp) ! grammar *g; ! FILE *fp; { fprintf(fp, "#include \"pgenheaders.h\"\n"); --- 21,25 ---- void ! printgrammar(grammar *g, FILE *fp) { fprintf(fp, "#include \"pgenheaders.h\"\n"); *************** *** 38,44 **** void ! printnonterminals(g, fp) ! grammar *g; ! FILE *fp; { dfa *d; --- 36,40 ---- void ! printnonterminals(grammar *g, FILE *fp) { dfa *d; *************** *** 51,58 **** static void ! printarcs(i, d, fp) ! int i; ! dfa *d; ! FILE *fp; { arc *a; --- 47,51 ---- static void ! printarcs(int i, dfa *d, FILE *fp) { arc *a; *************** *** 72,78 **** static void ! printstates(g, fp) ! grammar *g; ! FILE *fp; { state *s; --- 65,69 ---- static void ! printstates(grammar *g, FILE *fp) { state *s; *************** *** 94,100 **** static void ! printdfas(g, fp) ! grammar *g; ! FILE *fp; { dfa *d; --- 85,89 ---- static void ! printdfas(grammar *g, FILE *fp) { dfa *d; *************** *** 116,122 **** static void ! printlabels(g, fp) ! grammar *g; ! FILE *fp; { label *l; --- 105,109 ---- static void ! printlabels(grammar *g, FILE *fp) { label *l; Index: tokenizer.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/tokenizer.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** tokenizer.c 2000/07/11 17:52:59 2.46 --- tokenizer.c 2000/07/22 19:20:54 2.47 *************** *** 89,93 **** static struct tok_state * ! tok_new() { struct tok_state *tok = PyMem_NEW(struct tok_state, 1); --- 89,93 ---- static struct tok_state * ! tok_new(void) { struct tok_state *tok = PyMem_NEW(struct tok_state, 1); *************** *** 117,122 **** struct tok_state * ! PyTokenizer_FromString(str) ! char *str; { struct tok_state *tok = tok_new(); --- 117,121 ---- struct tok_state * ! PyTokenizer_FromString(char *str) { struct tok_state *tok = tok_new(); *************** *** 131,137 **** struct tok_state * ! PyTokenizer_FromFile(fp, ps1, ps2) ! FILE *fp; ! char *ps1, *ps2; { struct tok_state *tok = tok_new(); --- 130,134 ---- struct tok_state * ! PyTokenizer_FromFile(FILE *fp, char *ps1, char *ps2) { struct tok_state *tok = tok_new(); *************** *** 154,159 **** void ! PyTokenizer_Free(tok) ! struct tok_state *tok; { if (tok->fp != NULL && tok->buf != NULL) --- 151,155 ---- void ! PyTokenizer_Free(struct tok_state *tok) { if (tok->fp != NULL && tok->buf != NULL) *************** *** 166,171 **** static int ! tok_nextc(tok) ! register struct tok_state *tok; { for (;;) { --- 162,166 ---- static int ! tok_nextc(register struct tok_state *tok) { for (;;) { *************** *** 322,328 **** static void ! tok_backup(tok, c) ! register struct tok_state *tok; ! register int c; { if (c != EOF) { --- 317,321 ---- static void ! tok_backup(register struct tok_state *tok, register int c) { if (c != EOF) { *************** *** 338,343 **** int ! PyToken_OneChar(c) ! int c; { switch (c) { --- 331,335 ---- int ! PyToken_OneChar(int c) { switch (c) { *************** *** 371,376 **** int ! PyToken_TwoChars(c1, c2) ! int c1, c2; { switch (c1) { --- 363,367 ---- int ! PyToken_TwoChars(int c1, int c2) { switch (c1) { *************** *** 409,414 **** static int ! indenterror(tok) ! struct tok_state *tok; { if (tok->alterror) { --- 400,404 ---- static int ! indenterror(struct tok_state *tok) { if (tok->alterror) { *************** *** 429,435 **** int ! PyTokenizer_Get(tok, p_start, p_end) ! register struct tok_state *tok; /* In/out: tokenizer state */ ! char **p_start, **p_end; /* Out: point to start/end of token */ { register int c; --- 419,424 ---- int ! PyTokenizer_Get(register struct tok_state *tok, char **p_start, ! char **p_end) { register int c; *************** *** 813,819 **** void ! tok_dump(type, start, end) ! int type; ! char *start, *end; { printf("%s", _PyParser_TokenNames[type]); --- 802,806 ---- void ! tok_dump(int type, char *start, char *end) { printf("%s", _PyParser_TokenNames[type]); From python-dev@python.org Sat Jul 22 20:25:54 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 12:25:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Demo/pysvr pysvr.c,1.7,1.8 Message-ID: <200007221925.MAA24809@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/pysvr In directory slayer.i.sourceforge.net:/tmp/cvs-serv24717/Demo/pysvr Modified Files: pysvr.c Log Message: Miscelaneous ANSIfications. I'm assuming here 'main' should take (int, char**) and return an int even on PC platforms. If not, please fix PC/utils/makesrc.c ;-P Index: pysvr.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/pysvr/pysvr.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** pysvr.c 1999/10/05 22:16:07 1.7 --- pysvr.c 2000/07/22 19:25:51 1.8 *************** *** 35,39 **** extern int optind; extern char *optarg; ! extern int getopt(); struct workorder { --- 35,39 ---- extern int optind; extern char *optarg; ! extern int getopt(int, char **, char *); struct workorder { *************** *** 98,102 **** static void ! usage() { fprintf(stderr, usage_line, progname); --- 98,102 ---- static void ! usage(void) { fprintf(stderr, usage_line, progname); *************** *** 221,225 **** static void ! init_python() { if (gtstate) --- 221,225 ---- static void ! init_python(void) { if (gtstate) *************** *** 269,273 **** static void ! oprogname() { int save = errno; --- 269,273 ---- static void ! oprogname(void) { int save = errno; *************** *** 365,369 **** static void ! ps() { char buffer[100]; --- 365,369 ---- static void ! ps(void) { char buffer[100]; From python-dev@python.org Sat Jul 22 20:25:54 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 12:25:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Demo/embed demo.c,1.4,1.5 Message-ID: <200007221925.MAA24806@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/embed In directory slayer.i.sourceforge.net:/tmp/cvs-serv24717/Demo/embed Modified Files: demo.c Log Message: Miscelaneous ANSIfications. I'm assuming here 'main' should take (int, char**) and return an int even on PC platforms. If not, please fix PC/utils/makesrc.c ;-P Index: demo.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/embed/demo.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** demo.c 1999/03/09 17:07:24 1.4 --- demo.c 2000/07/22 19:25:50 1.5 *************** *** 3,11 **** #include "Python.h" ! void initxyzzy(); /* Forward */ ! main(argc, argv) ! int argc; ! char **argv; { /* Pass argv[0] to the Python interpreter */ --- 3,9 ---- #include "Python.h" ! void initxyzzy(void); /* Forward */ ! main(int argc, char **argv) { /* Pass argv[0] to the Python interpreter */ *************** *** 47,54 **** /* A static module */ static PyObject * ! xyzzy_foo(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { if (!PyArg_ParseTuple(args, "")) --- 45,51 ---- /* A static module */ + /* 'self' is not used */ static PyObject * ! xyzzy_foo(PyObject *self, PyObjecT *args) { if (!PyArg_ParseTuple(args, "")) *************** *** 63,67 **** void ! initxyzzy() { PyImport_AddModule("xyzzy"); --- 60,64 ---- void ! initxyzzy(void) { PyImport_AddModule("xyzzy"); From python-dev@python.org Sat Jul 22 20:25:54 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 12:25:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include cStringIO.h,2.13,2.14 Message-ID: <200007221925.MAA24815@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv24717/Include Modified Files: cStringIO.h Log Message: Miscelaneous ANSIfications. I'm assuming here 'main' should take (int, char**) and return an int even on PC platforms. If not, please fix PC/utils/makesrc.c ;-P Index: cStringIO.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/cStringIO.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** cStringIO.h 2000/07/16 12:04:30 2.13 --- cStringIO.h 2000/07/22 19:25:51 2.14 *************** *** 108,114 **** static void * ! xxxPyCObject_Import(module_name, name) ! char *module_name; ! char *name; { PyObject *m, *c; --- 108,112 ---- static void * ! xxxPyCObject_Import(char *module_name, char *name) { PyObject *m, *c; From python-dev@python.org Sat Jul 22 20:25:54 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 12:25:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/perfecthash perfhash.c,1.1,1.2 Message-ID: <200007221925.MAA24839@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/perfecthash In directory slayer.i.sourceforge.net:/tmp/cvs-serv24717/Tools/perfecthash Modified Files: perfhash.c Log Message: Miscelaneous ANSIfications. I'm assuming here 'main' should take (int, char**) and return an int even on PC platforms. If not, please fix PC/utils/makesrc.c ;-P Index: perfhash.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/perfecthash/perfhash.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** perfhash.c 2000/06/28 16:48:05 1.1 --- perfhash.c 2000/07/22 19:25:51 1.2 *************** *** 62,66 **** _declspec(dllexport) #endif ! void initperfhash() { PyObject *m; --- 62,66 ---- _declspec(dllexport) #endif ! void initperfhash(void) { PyObject *m; From python-dev@python.org Sat Jul 22 20:25:54 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 12:25:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects dictobject.c,2.60,2.61 unicodeobject.c,2.51,2.52 Message-ID: <200007221925.MAA24828@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv24717/Objects Modified Files: dictobject.c unicodeobject.c Log Message: Miscelaneous ANSIfications. I'm assuming here 'main' should take (int, char**) and return an int even on PC platforms. If not, please fix PC/utils/makesrc.c ;-P Index: dictobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/dictobject.c,v retrieving revision 2.60 retrieving revision 2.61 diff -C2 -r2.60 -r2.61 *** dictobject.c 2000/07/16 12:04:31 2.60 --- dictobject.c 2000/07/22 19:25:51 2.61 *************** *** 93,97 **** PyObject * ! PyDict_New() { register dictobject *mp; --- 93,97 ---- PyObject * ! PyDict_New(void) { register dictobject *mp; Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.51 retrieving revision 2.52 diff -C2 -r2.51 -r2.52 *** unicodeobject.c 2000/07/17 18:23:13 2.51 --- unicodeobject.c 2000/07/22 19:25:51 2.52 *************** *** 555,559 **** } ! const char *PyUnicode_GetDefaultEncoding() { return unicode_default_encoding; --- 555,559 ---- } ! const char *PyUnicode_GetDefaultEncoding(void) { return unicode_default_encoding; *************** *** 4531,4538 **** static PyObject * ! getnextarg(args, arglen, p_argidx) ! PyObject *args; ! int arglen; ! int *p_argidx; { int argidx = *p_argidx; --- 4531,4535 ---- static PyObject * ! getnextarg(PyObject *args, int arglen, int *p_argidx) { int argidx = *p_argidx; *************** *** 4556,4564 **** static - #ifdef HAVE_STDARG_PROTOTYPES int usprintf(register Py_UNICODE *buffer, char *format, ...) - #else - int usprintf(va_alist) va_dcl - #endif { register int i; --- 4553,4557 ---- *************** *** 4566,4579 **** va_list va; char *charbuffer; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, format); - #else - Py_UNICODE *args; - char *format; - - va_start(va); - buffer = va_arg(va, Py_UNICODE *); - format = va_arg(va, char *); - #endif /* First, format the string as char array, then expand to Py_UNICODE --- 4559,4563 ---- *************** *** 5122,5126 **** /* Initialize the Unicode implementation */ ! void _PyUnicode_Init() { /* Doublecheck the configuration... */ --- 5106,5110 ---- /* Initialize the Unicode implementation */ ! void _PyUnicode_Init(void) { /* Doublecheck the configuration... */ *************** *** 5139,5143 **** void ! _PyUnicode_Fini() { PyUnicodeObject *u = unicode_freelist; --- 5123,5127 ---- void ! _PyUnicode_Fini(void) { PyUnicodeObject *u = unicode_freelist; From python-dev@python.org Sat Jul 22 20:25:54 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 12:25:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC/utils makesrc.c,1.1,1.2 Message-ID: <200007221925.MAA24841@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC/utils In directory slayer.i.sourceforge.net:/tmp/cvs-serv24717/PC/utils Modified Files: makesrc.c Log Message: Miscelaneous ANSIfications. I'm assuming here 'main' should take (int, char**) and return an int even on PC platforms. If not, please fix PC/utils/makesrc.c ;-P Index: makesrc.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/utils/makesrc.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** makesrc.c 1996/06/28 19:10:43 1.1 --- makesrc.c 2000/07/22 19:25:51 1.2 *************** *** 8,12 **** char *usage = "You must be in the \"pc\" directory.\n"; char *list[] = {"..\\Include", "..\\Modules", "..\\Objects", "..\\Parser", "..\\Python", ".", 0}; ! main() { DIR *dpath; --- 8,14 ---- char *usage = "You must be in the \"pc\" directory.\n"; char *list[] = {"..\\Include", "..\\Modules", "..\\Objects", "..\\Parser", "..\\Python", ".", 0}; ! ! int ! main(int argc, char ** argv) { DIR *dpath; *************** *** 65,67 **** } return 0; ! } --- 67,69 ---- } return 0; ! } From python-dev@python.org Sat Jul 22 20:25:54 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 12:25:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC/example_nt example.c,1.1,1.2 Message-ID: <200007221925.MAA24832@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC/example_nt In directory slayer.i.sourceforge.net:/tmp/cvs-serv24717/PC/example_nt Modified Files: example.c Log Message: Miscelaneous ANSIfications. I'm assuming here 'main' should take (int, char**) and return an int even on PC platforms. If not, please fix PC/utils/makesrc.c ;-P Index: example.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/example_nt/example.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** example.c 1996/09/06 21:16:16 1.1 --- example.c 2000/07/22 19:25:51 1.2 *************** *** 2,7 **** static PyObject * ! ex_foo(self, args) ! PyObject *self, *args; { printf("Hello, world\n"); --- 2,6 ---- static PyObject * ! ex_foo(PyObject *self, PyObject *args) { printf("Hello, world\n"); *************** *** 16,20 **** void ! initexample() { Py_InitModule("example", example_methods); --- 15,19 ---- void ! initexample(void) { Py_InitModule("example", example_methods); From python-dev@python.org Sat Jul 22 20:25:55 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 12:25:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC config.c,1.26,1.27 frozen_dllmain.c,1.1,1.2 getpathp.c,1.17,1.18 winsound.c,1.2,1.3 Message-ID: <200007221925.MAA24855@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv24717/PC Modified Files: config.c frozen_dllmain.c getpathp.c winsound.c Log Message: Miscelaneous ANSIfications. I'm assuming here 'main' should take (int, char**) and return an int even on PC platforms. If not, please fix PC/utils/makesrc.c ;-P Index: config.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/config.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** config.c 2000/07/12 12:11:36 1.26 --- config.c 2000/07/22 19:25:51 1.27 *************** *** 16,61 **** #include "Python.h" ! extern void initarray(); #ifndef MS_WIN64 ! extern void initaudioop(); ! extern void initbinascii(); #endif ! extern void initcmath(); ! extern void initerrno(); #ifdef WITH_CYCLE_GC ! extern void initgc(); #endif #ifndef MS_WIN64 ! extern void initimageop(); #endif ! extern void initmath(); ! extern void initmd5(); ! extern void initnew(); ! extern void initnt(); ! extern void initoperator(); ! extern void initregex(); #ifndef MS_WIN64 ! extern void initrgbimg(); #endif ! extern void initrotor(); ! extern void initsignal(); ! extern void initsha(); ! extern void initstrop(); ! extern void initstruct(); ! extern void inittime(); ! extern void initthread(); ! extern void initcStringIO(); ! extern void initcPickle(); ! extern void initpcre(); #ifdef WIN32 ! extern void initmsvcrt(); ! extern void init_locale(); #endif ! extern void init_codecs(); /* -- ADDMODULE MARKER 1 -- */ ! extern void PyMarshal_Init(); ! extern void initimp(); struct _inittab _PyImport_Inittab[] = { --- 16,61 ---- #include "Python.h" ! extern void initarray(void); #ifndef MS_WIN64 ! extern void initaudioop(void); ! extern void initbinascii(void); #endif ! extern void initcmath(void); ! extern void initerrno(void); #ifdef WITH_CYCLE_GC ! extern void initgc(void); #endif #ifndef MS_WIN64 ! extern void initimageop(void); #endif ! extern void initmath(void); ! extern void initmd5(void); ! extern void initnew(void); ! extern void initnt(void); ! extern void initoperator(void); ! extern void initregex(void); #ifndef MS_WIN64 ! extern void initrgbimg(void); #endif ! extern void initrotor(void); ! extern void initsignal(void); ! extern void initsha(void); ! extern void initstrop(void); ! extern void initstruct(void); ! extern void inittime(void); ! extern void initthread(void); ! extern void initcStringIO(void); ! extern void initcPickle(void); ! extern void initpcre(void); #ifdef WIN32 ! extern void initmsvcrt(void); ! extern void init_locale(void); #endif ! extern void init_codecs(void); /* -- ADDMODULE MARKER 1 -- */ ! extern void PyMarshal_Init(void); ! extern void initimp(void); struct _inittab _PyImport_Inittab[] = { Index: frozen_dllmain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/frozen_dllmain.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** frozen_dllmain.c 1998/03/20 17:34:26 1.1 --- frozen_dllmain.c 2000/07/22 19:25:51 1.2 *************** *** 61,65 **** modules are initialized correctly */ ! void PyWinFreeze_ExeInit() { char **modName; --- 61,65 ---- modules are initialized correctly */ ! void PyWinFreeze_ExeInit(void) { char **modName; *************** *** 74,78 **** modules are cleaned up */ ! void PyWinFreeze_ExeTerm() { // Must go backwards --- 74,78 ---- modules are cleaned up */ ! void PyWinFreeze_ExeTerm(void) { // Must go backwards Index: getpathp.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/getpathp.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** getpathp.c 2000/06/30 23:58:05 1.17 --- getpathp.c 2000/07/22 19:25:51 1.18 *************** *** 99,104 **** static int ! is_sep(ch) /* determine if "ch" is a separator character */ ! char ch; { #ifdef ALTSEP --- 99,103 ---- static int ! is_sep(char ch) /* determine if "ch" is a separator character */ { #ifdef ALTSEP *************** *** 111,116 **** static void ! reduce(dir) ! char *dir; { size_t i = strlen(dir); --- 110,114 ---- static void ! reduce(char *dir) { size_t i = strlen(dir); *************** *** 122,127 **** static int ! exists(filename) ! char *filename; { struct stat buf; --- 120,124 ---- static int ! exists(char *filename) { struct stat buf; *************** *** 131,136 **** static int ! ismodule(filename) /* Is module -- check for .pyc/.pyo too */ ! char *filename; { if (exists(filename)) --- 128,132 ---- static int ! ismodule(char *filename) /* Is module -- check for .pyc/.pyo too */ { if (exists(filename)) *************** *** 148,154 **** static void ! join(buffer, stuff) ! char *buffer; ! char *stuff; { size_t n, k; --- 144,148 ---- static void ! join(char *buffer, char *stuff) { size_t n, k; *************** *** 169,174 **** static int ! gotlandmark(landmark) ! char *landmark; { int n, ok; --- 163,167 ---- static int ! gotlandmark(char *landmark) { int n, ok; *************** *** 183,189 **** static int ! search_for_prefix(argv0_path, landmark) ! char *argv0_path; ! char *landmark; { /* Search from argv0_path, until landmark is found */ --- 176,180 ---- static int ! search_for_prefix(char *argv0_path, char *landmark) { /* Search from argv0_path, until landmark is found */ *************** *** 344,348 **** static void ! get_progpath() { extern char *Py_GetProgramName(); --- 335,339 ---- static void ! get_progpath(void) { extern char *Py_GetProgramName(); *************** *** 404,408 **** static void ! calculate_path() { char argv0_path[MAXPATHLEN+1]; --- 395,399 ---- static void ! calculate_path(void) { char argv0_path[MAXPATHLEN+1]; *************** *** 566,570 **** char * ! Py_GetPath() { if (!module_search_path) --- 557,561 ---- char * ! Py_GetPath(void) { if (!module_search_path) *************** *** 574,578 **** char * ! Py_GetPrefix() { if (!module_search_path) --- 565,569 ---- char * ! Py_GetPrefix(void) { if (!module_search_path) *************** *** 582,586 **** char * ! Py_GetExecPrefix() { return Py_GetPrefix(); --- 573,577 ---- char * ! Py_GetExecPrefix(void) { return Py_GetPrefix(); *************** *** 588,592 **** char * ! Py_GetProgramFullPath() { if (!module_search_path) --- 579,583 ---- char * ! Py_GetProgramFullPath(void) { if (!module_search_path) Index: winsound.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/winsound.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** winsound.c 1999/10/01 14:29:17 1.2 --- winsound.c 2000/07/22 19:25:51 1.3 *************** *** 141,145 **** DL_EXPORT(void) ! initwinsound() { PyObject *module=Py_InitModule3("winsound", sound_methods, sound_module_doc); --- 141,145 ---- DL_EXPORT(void) ! initwinsound(void) { PyObject *module=Py_InitModule3("winsound", sound_methods, sound_module_doc); From python-dev@python.org Sat Jul 22 20:25:55 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 12:25:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC/os2vacpp config.c,1.5,1.6 getpathp.c,1.7,1.8 Message-ID: <200007221925.MAA24842@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC/os2vacpp In directory slayer.i.sourceforge.net:/tmp/cvs-serv24717/PC/os2vacpp Modified Files: config.c getpathp.c Log Message: Miscelaneous ANSIfications. I'm assuming here 'main' should take (int, char**) and return an int even on PC platforms. If not, please fix PC/utils/makesrc.c ;-P Index: config.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/os2vacpp/config.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** config.c 2000/06/30 23:58:05 1.5 --- config.c 2000/07/22 19:25:51 1.6 *************** *** 16,54 **** #include "Python.h" ! extern void initarray(); ! extern void initaudioop(); ! extern void initbinascii(); ! extern void initcmath(); ! extern void initerrno(); ! extern void initimageop(); ! extern void initmath(); ! extern void initmd5(); ! extern void initnew(); ! extern void initnt(); ! extern void initos2(); ! extern void initoperator(); ! extern void initposix(); ! extern void initregex(); ! extern void initrgbimg(); ! extern void initrotor(); ! extern void initsignal(); ! extern void initselect(); ! extern void init_socket(); ! extern void initsoundex(); ! extern void initstrop(); ! extern void initstruct(); ! extern void inittime(); ! extern void initthread(); ! extern void initcStringIO(); ! extern void initcPickle(); ! extern void initpcre(); #ifdef WIN32 ! extern void initmsvcrt(); #endif /* -- ADDMODULE MARKER 1 -- */ ! extern void PyMarshal_Init(); ! extern void initimp(); struct _inittab _PyImport_Inittab[] = { --- 16,54 ---- #include "Python.h" ! extern void initarray(void); ! extern void initaudioop(void); ! extern void initbinascii(void); ! extern void initcmath(void); ! extern void initerrno(void); ! extern void initimageop(void); ! extern void initmath(void); ! extern void initmd5(void); ! extern void initnew(void); ! extern void initnt(void); ! extern void initos2(void); ! extern void initoperator(void); ! extern void initposix(void); ! extern void initregex(void); ! extern void initrgbimg(void); ! extern void initrotor(void); ! extern void initsignal(void); ! extern void initselect(void); ! extern void init_socket(void); ! extern void initsoundex(void); ! extern void initstrop(void); ! extern void initstruct(void); ! extern void inittime(void); ! extern void initthread(void); ! extern void initcStringIO(void); ! extern void initcPickle(void); ! extern void initpcre(void); #ifdef WIN32 ! extern void initmsvcrt(void); #endif /* -- ADDMODULE MARKER 1 -- */ ! extern void PyMarshal_Init(void); ! extern void initimp(void); struct _inittab _PyImport_Inittab[] = { Index: getpathp.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/os2vacpp/getpathp.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** getpathp.c 2000/06/30 23:58:05 1.7 --- getpathp.c 2000/07/22 19:25:51 1.8 *************** *** 65,70 **** static int ! is_sep(ch) /* determine if "ch" is a separator character */ ! char ch; { #ifdef ALTSEP --- 65,69 ---- static int ! is_sep(char ch) /* determine if "ch" is a separator character */ { #ifdef ALTSEP *************** *** 77,82 **** static void ! reduce(dir) ! char *dir; { int i = strlen(dir); --- 76,80 ---- static void ! reduce(char *dir) { int i = strlen(dir); *************** *** 88,93 **** static int ! exists(filename) ! char *filename; { struct stat buf; --- 86,90 ---- static int ! exists(char *filename) { struct stat buf; *************** *** 97,103 **** static void ! join(buffer, stuff) ! char *buffer; ! char *stuff; { int n, k; --- 94,98 ---- static void ! join(char *buffer, char *stuff) { int n, k; *************** *** 118,124 **** static int ! search_for_prefix(argv0_path, landmark) ! char *argv0_path; ! char *landmark; { int n; --- 113,117 ---- static int ! search_for_prefix(char *argv0_path, char *landmark) { int n; *************** *** 248,252 **** static void ! get_progpath() { extern char *Py_GetProgramName(); --- 241,245 ---- static void ! get_progpath(void) { extern char *Py_GetProgramName(); *************** *** 300,304 **** static void ! calculate_path() { char argv0_path[MAXPATHLEN+1]; --- 293,297 ---- static void ! calculate_path(void) { char argv0_path[MAXPATHLEN+1]; *************** *** 452,456 **** char * ! Py_GetPath() { if (!module_search_path) --- 445,449 ---- char * ! Py_GetPath(void) { if (!module_search_path) *************** *** 461,465 **** char * ! Py_GetPrefix() { if (!module_search_path) --- 454,458 ---- char * ! Py_GetPrefix(void) { if (!module_search_path) *************** *** 470,474 **** char * ! Py_GetExecPrefix() { if (!module_search_path) --- 463,467 ---- char * ! Py_GetExecPrefix(void) { if (!module_search_path) *************** *** 479,483 **** char * ! Py_GetProgramFullPath() { if (!module_search_path) --- 472,476 ---- char * ! Py_GetProgramFullPath(void) { if (!module_search_path) From python-dev@python.org Sat Jul 22 20:27:46 2000 From: python-dev@python.org (Paul Prescod) Date: Sat, 22 Jul 2000 12:27:46 -0700 Subject: [Python-checkins] CVS: python/nondist/sandbox/doctools onlinehelp.py,1.2,1.3 Message-ID: <200007221927.MAA25065@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sandbox/doctools In directory slayer.i.sourceforge.net:/tmp/cvs-serv25027 Modified Files: onlinehelp.py Log Message: Better introspection. (sorry for the checkin flurry) Index: onlinehelp.py =================================================================== RCS file: /cvsroot/python/python/nondist/sandbox/doctools/onlinehelp.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** onlinehelp.py 2000/07/22 18:51:36 1.2 --- onlinehelp.py 2000/07/22 19:27:43 1.3 *************** *** 70,73 **** --- 70,74 ---- import re import textdoc, types + import __builtin__ prompt="--more-- (enter for more, q to quit) " *************** *** 230,233 **** --- 231,236 ---- return mod + hack_const="__paul_prescod_hack_constant__" + class Help: def __init__( self, out, line_length, docdir=None ): *************** *** 324,328 **** # try again -- this time in builtins ! glo=__builtins__.__dict__.get( topic, 0 ) if glo: self.handleObject( glo ) --- 327,331 ---- # try again -- this time in builtins ! glo=__builtin__.__dict__.get( topic, 0 ) if glo: self.handleObject( glo ) *************** *** 338,349 **** # try again -- this time as an attribute OF a module ### FIXME/XXX/TODO: this code is not finished yet! ! parts=string.split( topic, "." ) ! for i in range( len( parts ), -1, -1 ): ! if i: ! front=string.join( parts[:i], "." ) mod=my_import( front ) if mod: ! self.handleObject( mod ) ! return None sys.stderr.write( "No such topic "+`topic` ) --- 341,361 ---- # try again -- this time as an attribute OF a module ### FIXME/XXX/TODO: this code is not finished yet! ! parts=topic.split( "." ) ! for i in range( len( parts )+1, 0, -1 ): ! dot="." ! front=dot.join( parts[:i] ) mod=my_import( front ) if mod: ! rest=parts[i:] ! obj=mod ! while rest: # try a getattr of a getattr of a getattr ... ! first,rest=rest[0],rest[1:] ! obj=getattr( obj, first, hack_const ) ! if obj==hack_const: # failed! ! break ! ! if obj!=hack_const: # success! ! self.handleObject( obj ) ! return None sys.stderr.write( "No such topic "+`topic` ) From python-dev@python.org Sun Jul 23 00:30:05 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 16:30:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include ceval.h,2.34,2.35 import.h,2.25,2.26 modsupport.h,2.32,2.33 pgenheaders.h,2.20,2.21 sysmodule.h,2.20,2.21 unicodeobject.h,2.15,2.16 Message-ID: <200007222330.QAA09843@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv9681 Modified Files: ceval.h import.h modsupport.h pgenheaders.h sysmodule.h unicodeobject.h Log Message: ANSIfications: fix empty arglists, and remove the checks for 'HAVE_STDARG_PROTOTYPES' (consider it true, remove false branch) Index: ceval.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/ceval.h,v retrieving revision 2.34 retrieving revision 2.35 diff -C2 -r2.34 -r2.35 *** ceval.h 2000/07/08 23:37:28 2.34 --- ceval.h 2000/07/22 23:30:03 2.35 *************** *** 28,40 **** PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL) - #ifdef HAVE_STDARG_PROTOTYPES DL_IMPORT(PyObject *) PyEval_CallFunction(PyObject *obj, char *format, ...); DL_IMPORT(PyObject *) PyEval_CallMethod(PyObject *obj, char *methodname, char *format, ...); - #else - /* Better to have no prototypes at all for varargs functions in this case */ - DL_IMPORT(PyObject *) PyEval_CallFunction(); - DL_IMPORT(PyObject *) PyEval_CallMethod(); - #endif DL_IMPORT(PyObject *) PyEval_GetBuiltins(void); --- 28,34 ---- Index: import.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/import.h,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** import.h 2000/07/08 23:37:28 2.25 --- import.h 2000/07/22 23:30:03 2.26 *************** *** 36,45 **** struct _inittab { char *name; ! void (*initfunc)(); }; extern DL_IMPORT(struct _inittab *) PyImport_Inittab; ! extern DL_IMPORT(int) PyImport_AppendInittab(char *name, void (*initfunc)()); extern DL_IMPORT(int) PyImport_ExtendInittab(struct _inittab *newtab); --- 36,45 ---- struct _inittab { char *name; ! void (*initfunc)(void); }; extern DL_IMPORT(struct _inittab *) PyImport_Inittab; ! extern DL_IMPORT(int) PyImport_AppendInittab(char *name, void (*initfunc)(void)); extern DL_IMPORT(int) PyImport_ExtendInittab(struct _inittab *newtab); Index: modsupport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/modsupport.h,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -r2.32 -r2.33 *** modsupport.h 2000/07/16 12:04:30 2.32 --- modsupport.h 2000/07/22 23:30:03 2.33 *************** *** 17,22 **** /* Module support interface */ - #ifdef HAVE_STDARG_PROTOTYPES - #include --- 17,20 ---- *************** *** 26,40 **** char *, char **, ...); extern DL_IMPORT(PyObject *) Py_BuildValue(char *, ...); - - #else - - #include - - /* Better to have no prototypes at all for varargs functions in this case */ - extern DL_IMPORT(int) PyArg_Parse(); - extern DL_IMPORT(int) PyArg_ParseTuple(); - extern DL_IMPORT(PyObject *) Py_BuildValue(); - - #endif extern DL_IMPORT(int) PyArg_VaParse(PyObject *, char *, va_list); --- 24,27 ---- Index: pgenheaders.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pgenheaders.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** pgenheaders.h 2000/06/30 23:58:04 2.20 --- pgenheaders.h 2000/07/22 23:30:03 2.21 *************** *** 36,47 **** #include "pydebug.h" - #ifdef HAVE_STDARG_PROTOTYPES DL_IMPORT(void) PySys_WriteStdout(const char *format, ...); DL_IMPORT(void) PySys_WriteStderr(const char *format, ...); - #else - /* Better to have no prototypes at all for varargs functions in this case */ - DL_IMPORT(void) PySys_WriteStdout(); - DL_IMPORT(void) PySys_WriteStderr(); - #endif #define addarc _Py_addarc --- 36,41 ---- Index: sysmodule.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/sysmodule.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** sysmodule.h 2000/07/09 00:55:06 2.20 --- sysmodule.h 2000/07/22 23:30:03 2.21 *************** *** 23,34 **** DL_IMPORT(void) PySys_SetPath(char *); - #ifdef HAVE_STDARG_PROTOTYPES DL_IMPORT(void) PySys_WriteStdout(const char *format, ...); DL_IMPORT(void) PySys_WriteStderr(const char *format, ...); - #else - /* Better to have no prototypes at all for varargs functions in this case */ - DL_IMPORT(void) PySys_WriteStdout(); - DL_IMPORT(void) PySys_WriteStderr(); - #endif extern DL_IMPORT(PyObject *) _PySys_TraceFunc, *_PySys_ProfileFunc; --- 23,28 ---- Index: unicodeobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/unicodeobject.h,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** unicodeobject.h 2000/07/16 12:04:30 2.15 --- unicodeobject.h 2000/07/22 23:30:03 2.16 *************** *** 377,381 **** */ ! extern DL_IMPORT(const char*) PyUnicode_GetDefaultEncoding(); /* Sets the currently active default encoding. --- 377,381 ---- */ ! extern DL_IMPORT(const char*) PyUnicode_GetDefaultEncoding(void); /* Sets the currently active default encoding. From python-dev@python.org Sun Jul 23 00:33:24 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 16:33:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser intrcheck.c,2.34,2.35 Message-ID: <200007222333.QAA09998@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv9902 Modified Files: intrcheck.c Log Message: Remember to return something if RETSIGTYPE is not 'void'. Do we still need to worry about systems that have signal-handlers return 'int' ? Not all of the code does, though nothing will break because of it. Index: intrcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/intrcheck.c,v retrieving revision 2.34 retrieving revision 2.35 diff -C2 -r2.34 -r2.35 *** intrcheck.c 2000/07/22 19:20:54 2.34 --- intrcheck.c 2000/07/22 23:33:22 2.35 *************** *** 169,172 **** --- 169,175 ---- signal(SIGINT, intcatcher); Py_AddPendingCall(checksignals_witharg, NULL); + #if RETSIGTYPE != void + return 0; + #endif } From python-dev@python.org Sun Jul 23 00:38:04 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 16:38:04 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python dynload_aix.c,2.7,2.8 dynload_dl.c,2.4,2.5 frozenmain.c,2.23,2.24 import.c,2.142,2.143 thread_lwp.h,2.12,2.13 Message-ID: <200007222338.QAA10244@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv10119 Modified Files: dynload_aix.c dynload_dl.c frozenmain.c import.c thread_lwp.h Log Message: ANSIfy as many declarations as possible. Index: dynload_aix.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_aix.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** dynload_aix.c 2000/07/22 18:47:25 2.7 --- dynload_aix.c 2000/07/22 23:38:01 2.8 *************** *** 29,33 **** ! extern char *Py_GetProgramName(); typedef struct Module { --- 29,33 ---- ! extern char *Py_GetProgramName(void); typedef struct Module { Index: dynload_dl.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_dl.c,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** dynload_dl.c 2000/06/30 23:58:06 2.4 --- dynload_dl.c 2000/07/22 23:38:01 2.5 *************** *** 17,21 **** ! extern char *Py_GetProgramName(); const struct filedescr _PyImport_DynLoadFiletab[] = { --- 17,21 ---- ! extern char *Py_GetProgramName(void); const struct filedescr _PyImport_DynLoadFiletab[] = { Index: frozenmain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/frozenmain.c,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** frozenmain.c 2000/07/22 18:47:25 2.23 --- frozenmain.c 2000/07/22 23:38:01 2.24 *************** *** 14,20 **** #ifdef MS_WIN32 ! extern void PyWinFreeze_ExeInit(); ! extern void PyWinFreeze_ExeTerm(); ! extern int PyInitFrozenExtensions(); #endif --- 14,20 ---- #ifdef MS_WIN32 ! extern void PyWinFreeze_ExeInit(void); ! extern void PyWinFreeze_ExeTerm(void); ! extern int PyInitFrozenExtensions(void); #endif Index: import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.142 retrieving revision 2.143 diff -C2 -r2.142 -r2.143 *** import.c 2000/07/22 18:47:25 2.142 --- import.c 2000/07/22 23:38:01 2.143 *************** *** 818,822 **** #ifdef MS_COREDLL ! extern FILE *PyWin_FindRegisteredModule(); #endif --- 818,823 ---- #ifdef MS_COREDLL ! extern FILE *PyWin_FindRegisteredModule(const char *, struct filedescr **, ! char *, int); #endif Index: thread_lwp.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_lwp.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** thread_lwp.h 2000/07/22 18:47:25 2.12 --- thread_lwp.h 2000/07/22 23:38:01 2.13 *************** *** 107,111 **** { struct lock *lock; ! extern char *malloc(); dprintf(("PyThread_allocate_lock called\n")); --- 107,111 ---- { struct lock *lock; ! extern char *malloc(size_t); dprintf(("PyThread_allocate_lock called\n")); From python-dev@python.org Sun Jul 23 00:49:33 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 16:49:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules signalmodule.c,2.47,2.48 Message-ID: <200007222349.QAA11106@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv10920 Modified Files: signalmodule.c Log Message: Further ANSIfication of functionpointers and declarations. Also, make sure to return something if RETSIGTYPE isn't void, in functions that are defined to return RETSIGTYPE. Work around an argumentlist mismatch ('void' vs. 'void *') by using a static wrapper function. Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.47 retrieving revision 2.48 diff -C2 -r2.47 -r2.48 *** signalmodule.c 2000/07/21 06:00:07 2.47 --- signalmodule.c 2000/07/22 23:49:30 2.48 *************** *** 27,31 **** #ifndef SIG_ERR ! #define SIG_ERR ((RETSIGTYPE (*)())-1) #endif --- 27,31 ---- #ifndef SIG_ERR ! #define SIG_ERR ((RETSIGTYPE (*)(int))-1) #endif *************** *** 93,97 **** static PyObject *IntHandler; ! static RETSIGTYPE (*old_siginthandler)() = SIG_DFL; --- 93,97 ---- static PyObject *IntHandler; ! static RETSIGTYPE (*old_siginthandler)(int) = SIG_DFL; *************** *** 111,114 **** --- 111,121 ---- + + static int + checksignals_witharg(void * unused) + { + return PyErr_CheckSignals(); + } + static RETSIGTYPE signal_handler(int sig_num) *************** *** 120,125 **** is_tripped++; Handlers[sig_num].tripped = 1; ! Py_AddPendingCall( ! (int (*)(ANY *))PyErr_CheckSignals, NULL); #ifdef WITH_THREAD } --- 127,131 ---- is_tripped++; Handlers[sig_num].tripped = 1; ! Py_AddPendingCall(checksignals_witharg, NULL); #ifdef WITH_THREAD } *************** *** 136,141 **** #ifdef HAVE_SIGINTERRUPT siginterrupt(sig_num, 1); #endif - (void)signal(sig_num, &signal_handler); } --- 142,150 ---- #ifdef HAVE_SIGINTERRUPT siginterrupt(sig_num, 1); + #endif + signal(sig_num, signal_handler); + #if RETSIGTYPE != void + return 0; #endif } *************** *** 192,196 **** int sig_num; PyObject *old_handler; ! RETSIGTYPE (*func)(); if (!PyArg_Parse(args, "(iO)", &sig_num, &obj)) return NULL; --- 201,205 ---- int sig_num; PyObject *old_handler; ! RETSIGTYPE (*func)(int); if (!PyArg_Parse(args, "(iO)", &sig_num, &obj)) return NULL; *************** *** 349,353 **** Handlers[0].tripped = 0; for (i = 1; i < NSIG; i++) { ! RETSIGTYPE (*t)(); #ifdef HAVE_SIGACTION struct sigaction act; --- 358,362 ---- Handlers[0].tripped = 0; for (i = 1; i < NSIG; i++) { ! RETSIGTYPE (*t)(int); #ifdef HAVE_SIGACTION struct sigaction act; From python-dev@python.org Sun Jul 23 00:51:22 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 16:51:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules readline.c,2.23,2.24 Message-ID: <200007222351.QAA11217@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv11168 Modified Files: readline.c Log Message: ANSIfication of function-pointers and declarations. Also, make sure to return something if RETSIGTYPE is not void, in functions that are defined as returning RETSIGTYPE. Index: readline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** readline.c 2000/07/21 06:00:07 2.23 --- readline.c 2000/07/22 23:51:19 2.24 *************** *** 39,43 **** /* Pointers needed from outside (but not declared in a header file). */ ! extern int (*PyOS_InputHook)(); extern char *(*PyOS_ReadlineFunctionPointer)(char *); --- 39,43 ---- /* Pointers needed from outside (but not declared in a header file). */ ! extern int (*PyOS_InputHook)(void); extern char *(*PyOS_ReadlineFunctionPointer)(char *); *************** *** 432,435 **** --- 432,438 ---- { longjmp(jbuf, 1); + #if RETSIGTYPE != void + return 0; + #endif } *************** *** 442,446 **** size_t n; char *p, *q; ! RETSIGTYPE (*old_inthandler)(); old_inthandler = signal(SIGINT, onintr); if (setjmp(jbuf)) { --- 445,449 ---- size_t n; char *p, *q; ! RETSIGTYPE (*old_inthandler)(int); old_inthandler = signal(SIGINT, onintr); if (setjmp(jbuf)) { From python-dev@python.org Sun Jul 23 00:56:10 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 16:56:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules cPickle.c,2.45,2.46 Message-ID: <200007222356.QAA11525@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv11278 Modified Files: cPickle.c Log Message: ANSIfication: add proper prototypes to function-pointers and declarations. Also, fix a bug found by said declarations, where a string was defined as unsigned char*, but used as signed. Index: cPickle.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** cPickle.c 2000/07/12 13:05:33 2.45 --- cPickle.c 2000/07/22 23:56:07 2.46 *************** *** 311,315 **** } ! typedef struct { PyObject_HEAD FILE *fp; --- 311,315 ---- } ! typedef struct Picklerobject { PyObject_HEAD FILE *fp; *************** *** 322,326 **** int bin; int fast; /* Fast mode doesn't save in memo, don't use if circ ref */ ! int (*write_func)(); char *write_buf; int buf_size; --- 322,326 ---- int bin; int fast; /* Fast mode doesn't save in memo, don't use if circ ref */ ! int (*write_func)(struct Picklerobject *, char *, int); char *write_buf; int buf_size; *************** *** 330,334 **** staticforward PyTypeObject Picklertype; ! typedef struct { PyObject_HEAD FILE *fp; --- 330,334 ---- staticforward PyTypeObject Picklertype; ! typedef struct Unpicklerobject { PyObject_HEAD FILE *fp; *************** *** 345,350 **** int num_marks; int marks_size; ! int (*read_func)(); ! int (*readline_func)(); int buf_size; char *buf; --- 345,350 ---- int num_marks; int marks_size; ! int (*read_func)(struct Unpicklerobject *, char **, int); ! int (*readline_func)(struct Unpicklerobject *, char **); int buf_size; char *buf; *************** *** 370,392 **** static PyObject * ! #ifdef HAVE_STDARG_PROTOTYPES ! /* VARARGS 2 */ ! cPickle_ErrFormat(PyObject *ErrType, char *stringformat, char *format, ...) { ! #else ! /* VARARGS */ ! cPickle_ErrFormat(va_alist) va_dcl { ! #endif va_list va; PyObject *args=0, *retval=0; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, format); - #else - PyObject *ErrType; - char *stringformat, *format; - va_start(va); - ErrType = va_arg(va, PyObject *); - stringformat = va_arg(va, char *); - format = va_arg(va, char *); - #endif if (format) args = Py_VaBuildValue(format, va); --- 370,378 ---- static PyObject * ! cPickle_ErrFormat(PyObject *ErrType, char *stringformat, char *format, ...) ! { va_list va; PyObject *args=0, *retval=0; va_start(va, format); if (format) args = Py_VaBuildValue(format, va); *************** *** 3204,3208 **** load_long_binget(Unpicklerobject *self) { PyObject *py_key = 0, *value = 0; ! unsigned char c, *s; long key; int rc; --- 3190,3195 ---- load_long_binget(Unpicklerobject *self) { PyObject *py_key = 0, *value = 0; ! unsigned char c; ! char *s; long key; int rc; *************** *** 3255,3259 **** load_binput(Unpicklerobject *self) { PyObject *py_key = 0, *value = 0; ! unsigned char key, *s; int len; --- 3242,3247 ---- load_binput(Unpicklerobject *self) { PyObject *py_key = 0, *value = 0; ! unsigned char key; ! char *s; int len; *************** *** 3275,3279 **** PyObject *py_key = 0, *value = 0; long key; ! unsigned char c, *s; int len; --- 3263,3268 ---- PyObject *py_key = 0, *value = 0; long key; ! unsigned char c; ! char *s; int len; From python-dev@python.org Sun Jul 23 00:57:58 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 16:57:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules cryptmodule.c,2.8,2.9 flmodule.c,1.43,1.44 getpath.c,1.28,1.29 nismodule.c,2.19,2.20 parsermodule.c,2.47,2.48 posixmodule.c,2.158,2.159 python.c,2.5,2.6 selectmodule.c,2.40,2.41 socketmodule.c,1.118,1.119 timemodule.c,2.92,2.93 Message-ID: <200007222357.QAA11642@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv11549 Modified Files: cryptmodule.c flmodule.c getpath.c nismodule.c parsermodule.c posixmodule.c python.c selectmodule.c socketmodule.c timemodule.c Log Message: Even more ANSIfication: fix as many function pointers and declarations as possible. Index: cryptmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cryptmodule.c,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** cryptmodule.c 2000/07/21 06:00:07 2.8 --- cryptmodule.c 2000/07/22 23:57:55 2.9 *************** *** 13,17 **** { char *word, *salt; ! extern char * crypt(); if (!PyArg_Parse(args, "(ss)", &word, &salt)) { --- 13,17 ---- { char *word, *salt; ! extern char * crypt(const char *, const char *); if (!PyArg_Parse(args, "(ss)", &word, &salt)) { Index: flmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/flmodule.c,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -r1.43 -r1.44 *** flmodule.c 2000/07/21 06:00:07 1.43 --- flmodule.c 2000/07/22 23:57:55 1.44 *************** *** 1673,1677 **** static PyObject * ! forms_do_or_check_forms(PyObject *dummy, PyObject *args, FL_OBJECT *(*func)()) { FL_OBJECT *generic; --- 1673,1677 ---- static PyObject * ! forms_do_or_check_forms(PyObject *dummy, PyObject *args, FL_OBJECT *(*func)(void)) { FL_OBJECT *generic; *************** *** 1752,1756 **** #ifdef UNUSED static PyObject * ! fl_call(void (*func)(), PyObject *args) { if (!PyArg_NoArgs(args)) --- 1752,1756 ---- #ifdef UNUSED static PyObject * ! fl_call(void (*func)(void), PyObject *args) { if (!PyArg_NoArgs(args)) *************** *** 2059,2063 **** static PyObject * ! forms_file_selector_func(PyObject *args, char *(*func)()) { char *str; --- 2059,2063 ---- static PyObject * ! forms_file_selector_func(PyObject *args, char *(*func)(void)) { char *str; Index: getpath.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/getpath.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** getpath.c 2000/07/21 06:00:07 1.28 --- getpath.c 2000/07/22 23:57:55 1.29 *************** *** 350,354 **** calculate_path(void) { ! extern char *Py_GetProgramName(); static char delimiter[2] = {DELIM, '\0'}; --- 350,354 ---- calculate_path(void) { ! extern char *Py_GetProgramName(void); static char delimiter[2] = {DELIM, '\0'}; Index: nismodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/nismodule.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -r2.19 -r2.20 *** nismodule.c 2000/07/21 06:00:07 2.19 --- nismodule.c 2000/07/22 23:57:55 2.20 *************** *** 21,25 **** #ifdef __sgi /* This is missing from rpcsvc/ypclnt.h */ ! extern int yp_get_default_domain(); #endif --- 21,25 ---- #ifdef __sgi /* This is missing from rpcsvc/ypclnt.h */ ! extern int yp_get_default_domain(char **); #endif Index: parsermodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v retrieving revision 2.47 retrieving revision 2.48 diff -C2 -r2.47 -r2.48 *** parsermodule.c 2000/07/16 12:04:31 2.47 --- parsermodule.c 2000/07/22 23:57:55 2.48 *************** *** 964,968 **** */ static int ! validate_repeating_list(node *tree, int ntype, int (*vfunc)(), const char *const name) { --- 964,968 ---- */ static int ! validate_repeating_list(node *tree, int ntype, int (*vfunc)(node *), const char *const name) { Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.158 retrieving revision 2.159 diff -C2 -r2.158 -r2.159 *** posixmodule.c 2000/07/22 16:39:39 2.158 --- posixmodule.c 2000/07/22 23:57:55 2.159 *************** *** 131,139 **** #ifdef HAVE_UNISTD_H /* XXX These are for SunOS4.1.3 but shouldn't hurt elsewhere */ ! extern int rename(); ! extern int pclose(); ! extern int lstat(); ! extern int symlink(); ! extern int fsync(); #else /* !HAVE_UNISTD_H */ #if defined(PYCC_VACPP) --- 131,139 ---- #ifdef HAVE_UNISTD_H /* XXX These are for SunOS4.1.3 but shouldn't hurt elsewhere */ ! extern int rename(const char *, const char *); ! extern int pclose(FILE *); ! extern int lstat(const char *, struct stat *); ! extern int symlink(const char *, const char *); ! extern int fsync(int fd); #else /* !HAVE_UNISTD_H */ #if defined(PYCC_VACPP) Index: python.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/python.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** python.c 2000/07/09 20:35:15 2.5 --- python.c 2000/07/22 23:57:55 2.6 *************** *** 3,7 **** #include "Python.h" ! extern DL_EXPORT(int) Py_Main(); int --- 3,7 ---- #include "Python.h" ! extern DL_EXPORT(int) Py_Main(int, char **); int Index: selectmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v retrieving revision 2.40 retrieving revision 2.41 diff -C2 -r2.40 -r2.41 *** selectmodule.c 2000/07/22 16:41:08 2.40 --- selectmodule.c 2000/07/22 23:57:55 2.41 *************** *** 28,32 **** #ifdef __sgi /* This is missing from unistd.h */ ! extern void bzero(); #endif --- 28,32 ---- #ifdef __sgi /* This is missing from unistd.h */ ! extern void bzero(void *, int); #endif Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.118 retrieving revision 1.119 diff -C2 -r1.118 -r1.119 *** socketmodule.c 2000/07/21 06:00:07 1.118 --- socketmodule.c 2000/07/22 23:57:55 1.119 *************** *** 112,116 **** #if !defined(MS_WINDOWS) && !defined(PYOS_OS2) && !defined(__BEOS__) ! extern int gethostname(); /* For Solaris, at least */ #endif --- 112,116 ---- #if !defined(MS_WINDOWS) && !defined(PYOS_OS2) && !defined(__BEOS__) ! extern int gethostname(char *, size_t); /* For Solaris, at least */ #endif Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.92 retrieving revision 2.93 diff -C2 -r2.92 -r2.93 *** timemodule.c 2000/07/21 06:00:07 2.92 --- timemodule.c 2000/07/22 23:57:55 2.93 *************** *** 50,54 **** #include #if !defined(MS_WINDOWS) && !defined(PYOS_OS2) ! extern int ftime(); #endif /* MS_WINDOWS */ #endif /* HAVE_FTIME */ --- 50,54 ---- #include #if !defined(MS_WINDOWS) && !defined(PYOS_OS2) ! extern int ftime(struct timeb *); #endif /* MS_WINDOWS */ #endif /* HAVE_FTIME */ *************** *** 385,389 **** #if 0 ! extern char *strptime(); /* Enable this if it's not declared in */ #endif --- 385,390 ---- #if 0 ! /* Enable this if it's not declared in */ ! extern char *strptime(const char *, const char *, struct tm *); #endif From python-dev@python.org Sun Jul 23 00:59:35 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 16:59:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.42,2.43 Message-ID: <200007222359.QAA11836@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv11697/Objects Modified Files: abstract.c Log Message: ANSIfication: remove very-old-varargs code, fix function declarations so they include prototypes. Index: abstract.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v retrieving revision 2.42 retrieving revision 2.43 diff -C2 -r2.42 -r2.43 *** abstract.c 2000/07/17 09:22:55 2.42 --- abstract.c 2000/07/22 23:59:32 2.43 *************** *** 299,304 **** PyNumber_Or(PyObject *v, PyObject *w) { - extern int PyNumber_Coerce(); - BINOP(v, w, "__or__", "__ror__", PyNumber_Or); if (v->ob_type->tp_as_number != NULL) { --- 299,302 ---- *************** *** 320,325 **** PyNumber_Xor(PyObject *v, PyObject *w) { - extern int PyNumber_Coerce(); - BINOP(v, w, "__xor__", "__rxor__", PyNumber_Xor); if (v->ob_type->tp_as_number != NULL) { --- 318,321 ---- *************** *** 1392,1414 **** PyObject * - #ifdef HAVE_STDARG_PROTOTYPES - /* VARARGS 2 */ PyObject_CallFunction(PyObject *callable, char *format, ...) - #else - /* VARARGS */ - PyObject_CallFunction(va_alist) va_dcl - #endif { va_list va; PyObject *args, *retval; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, format); - #else - PyObject *callable; - char *format; - va_start(va); - callable = va_arg(va, PyObject *); - format = va_arg(va, char *); - #endif if (callable == NULL) { --- 1388,1396 ---- *************** *** 1445,1469 **** PyObject * - #ifdef HAVE_STDARG_PROTOTYPES - /* VARARGS 2 */ PyObject_CallMethod(PyObject *o, char *name, char *format, ...) - #else - /* VARARGS */ - PyObject_CallMethod(va_alist) va_dcl - #endif { va_list va; PyObject *args, *func = 0, *retval; - #ifdef HAVE_STDARG_PROTOTYPES va_start(va, format); - #else - PyObject *o; - char *name; - char *format; - va_start(va); - o = va_arg(va, PyObject *); - name = va_arg(va, char *); - format = va_arg(va, char *); - #endif if (o == NULL || name == NULL) { --- 1427,1435 ---- From python-dev@python.org Sun Jul 23 00:59:35 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 16:59:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC WinMain.c,1.5,1.6 getpathp.c,1.18,1.19 Message-ID: <200007222359.QAA11849@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv11697/PC Modified Files: WinMain.c getpathp.c Log Message: ANSIfication: remove very-old-varargs code, fix function declarations so they include prototypes. Index: WinMain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/WinMain.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** WinMain.c 2000/07/08 20:49:58 1.5 --- WinMain.c 2000/07/22 23:59:33 1.6 *************** *** 6,10 **** #include "Python.h" ! extern int Py_Main(); int WINAPI WinMain( --- 6,10 ---- #include "Python.h" ! extern int Py_Main(int, char **); int WINAPI WinMain( Index: getpathp.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/getpathp.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** getpathp.c 2000/07/22 19:25:51 1.18 --- getpathp.c 2000/07/22 23:59:33 1.19 *************** *** 337,341 **** get_progpath(void) { ! extern char *Py_GetProgramName(); char *path = getenv("PATH"); char *prog = Py_GetProgramName(); --- 337,341 ---- get_progpath(void) { ! extern char *Py_GetProgramName(void); char *path = getenv("PATH"); char *prog = Py_GetProgramName(); From python-dev@python.org Sun Jul 23 00:59:35 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 16:59:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC/os2vacpp getpathp.c,1.8,1.9 Message-ID: <200007222359.QAA11846@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC/os2vacpp In directory slayer.i.sourceforge.net:/tmp/cvs-serv11697/PC/os2vacpp Modified Files: getpathp.c Log Message: ANSIfication: remove very-old-varargs code, fix function declarations so they include prototypes. Index: getpathp.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/os2vacpp/getpathp.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** getpathp.c 2000/07/22 19:25:51 1.8 --- getpathp.c 2000/07/22 23:59:33 1.9 *************** *** 17,21 **** #ifdef MS_WIN32 #include ! extern BOOL PyWin_IsWin32s(); #endif --- 17,21 ---- #ifdef MS_WIN32 #include ! extern BOOL PyWin_IsWin32s(void); #endif *************** *** 243,247 **** get_progpath(void) { ! extern char *Py_GetProgramName(); char *path = getenv("PATH"); char *prog = Py_GetProgramName(); --- 243,247 ---- get_progpath(void) { ! extern char *Py_GetProgramName(void); char *path = getenv("PATH"); char *prog = Py_GetProgramName(); From python-dev@python.org Sun Jul 23 01:02:18 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 22 Jul 2000 17:02:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules config.c.in,1.70,1.71 makesetup,1.25,1.26 Message-ID: <200007230002.RAA18895@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv17423 Modified Files: config.c.in makesetup Log Message: Fix prototypes generated by makesetup, so they include '(void)' rather than empty argumentlists. Index: config.c.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/config.c.in,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -r1.70 -r1.71 *** config.c.in 2000/07/12 12:09:05 1.70 --- config.c.in 2000/07/23 00:02:15 1.71 *************** *** 21,26 **** /* -- ADDMODULE MARKER 1 -- */ ! extern void PyMarshal_Init(); ! extern void initimp(); struct _inittab _PyImport_Inittab[] = { --- 21,26 ---- /* -- ADDMODULE MARKER 1 -- */ ! extern void PyMarshal_Init(void); ! extern void initimp(void); struct _inittab _PyImport_Inittab[] = { Index: makesetup =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/makesetup,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** makesetup 2000/07/07 16:21:31 1.25 --- makesetup 2000/07/23 00:02:15 1.26 *************** *** 24,28 **** # - insert an identifying comment at the start # - for each mentioned in Setup before *noconfig*: ! # + insert 'extern void init();' before MARKER 1 # + insert '{"", initmodule},' before MARKER 2 # --- 24,28 ---- # - insert an identifying comment at the start # - for each mentioned in Setup before *noconfig*: ! # + insert 'extern void init(void);' before MARKER 1 # + insert '{"", initmodule},' before MARKER 2 # *************** *** 235,239 **** for mod in $MODS do ! EXTDECLS="${EXTDECLS}extern void init$mod();$NL" INITBITS="${INITBITS} {\"$mod\", init$mod},$NL" done --- 235,239 ---- for mod in $MODS do ! EXTDECLS="${EXTDECLS}extern void init$mod(void);$NL" INITBITS="${INITBITS} {\"$mod\", init$mod},$NL" done From python-dev@python.org Sun Jul 23 10:20:11 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 23 Jul 2000 02:20:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python import.c,2.143,2.144 Message-ID: <200007230920.CAA31410@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv31316/Python Modified Files: import.c Log Message: Oops. One of last nights ANSIfication patches accidentily upped the bytecode MAGIC number. When updating it next time, be sure it's higher than 50715 * constants. (Shouldn't be a problem if everyone keeps to the proper algorithm.) Index: import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.143 retrieving revision 2.144 diff -C2 -r2.143 -r2.144 *** import.c 2000/07/22 23:38:01 2.143 --- import.c 2000/07/23 09:20:08 2.144 *************** *** 67,71 **** added to the .pyc file header? */ /* New way to come up with the magic number: (YEAR-1995), MONTH, DAY */ ! #define MAGIC (50715 | ((long)'\r'<<16) | ((long)'\n'<<24)) /* Magic word as global; note that _PyImport_Init() can change the --- 67,71 ---- added to the .pyc file header? */ /* New way to come up with the magic number: (YEAR-1995), MONTH, DAY */ ! #define MAGIC (50428 | ((long)'\r'<<16) | ((long)'\n'<<24)) /* Magic word as global; note that _PyImport_Init() can change the From python-dev@python.org Sun Jul 23 17:19:11 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Sun, 23 Jul 2000 09:19:11 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html at.gif,1.3,1.4 Message-ID: <200007231619.JAA07642@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv7606 Modified Files: at.gif Log Message: changed at graphics to one proposed by Vladimir (<- thanx a lot!) Index: at.gif =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/at.gif,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 Binary files /tmp/cvsE4aNBG and /tmp/cvsGyJy5c differ From python-dev@python.org Sun Jul 23 19:10:20 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 23 Jul 2000 11:10:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules signalmodule.c,2.48,2.49 Message-ID: <200007231810.LAA29198@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv28920/python/dist/src/Modules Modified Files: signalmodule.c Log Message: Recent ANSIfication introduced a couple instances of #if RETSIGTYPE != void That isn't C, and MSVC properly refuses to compile it. Introduced new Py_RETURN_FROM_SIGNAL_HANDLER macro in pyport.h to expand to the correct thing based on RETSIGTYPE. However, only void is ANSI! Do we still have platforms that return int? The Unix config mess appears to #define RETSIGTYPE by magic without being asked to, so I assume it's "a problem" across Unices still. Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.48 retrieving revision 2.49 diff -C2 -r2.48 -r2.49 *** signalmodule.c 2000/07/22 23:49:30 2.48 --- signalmodule.c 2000/07/23 18:10:18 2.49 *************** *** 144,150 **** #endif signal(sig_num, signal_handler); ! #if RETSIGTYPE != void ! return 0; ! #endif } --- 144,148 ---- #endif signal(sig_num, signal_handler); ! Py_RETURN_FROM_SIGNAL_HANDLER(0); } From python-dev@python.org Sun Jul 23 19:10:20 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 23 Jul 2000 11:10:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include pyport.h,2.2,2.3 Message-ID: <200007231810.LAA29197@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv28920/python/dist/src/Include Modified Files: pyport.h Log Message: Recent ANSIfication introduced a couple instances of #if RETSIGTYPE != void That isn't C, and MSVC properly refuses to compile it. Introduced new Py_RETURN_FROM_SIGNAL_HANDLER macro in pyport.h to expand to the correct thing based on RETSIGTYPE. However, only void is ANSI! Do we still have platforms that return int? The Unix config mess appears to #define RETSIGTYPE by magic without being asked to, so I assume it's "a problem" across Unices still. Index: pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** pyport.h 2000/07/10 04:59:49 2.2 --- pyport.h 2000/07/23 18:10:16 2.3 *************** *** 12,16 **** /************************************************************************** Symbols and macros to supply platform-independent interfaces to basic ! C-language operations whose spellings vary across platforms. Please try to make documentation here as clear as possible: by definition, --- 12,16 ---- /************************************************************************** Symbols and macros to supply platform-independent interfaces to basic ! C language & library operations whose spellings vary across platforms. Please try to make documentation here as clear as possible: by definition, *************** *** 23,26 **** --- 23,31 ---- signed integral type and i < 0. Used in: Py_ARITHMETIC_RIGHT_SHIFT + + RETSIGTYPE + Meaning: Expands to void or int, depending on what the platform wants + signal handlers to return. Note that only void is ANSI! + Used in: Py_RETURN_FROM_SIGNAL_HANDLER **************************************************************************/ *************** *** 50,53 **** --- 55,77 ---- #define Py_ARITHMETIC_RIGHT_SHIFT(TYPE, I, J) ((I) >> (J)) #endif + + /* Py_FORCE_EXPANSION + * "Simply" returns its argument. However, macro expansions within the + * argument are evaluated. This unfortunate trickery is needed to get + * token-pasting to work as desired in some cases. + */ + #define Py_FORCE_EXPANSION(X) X + + /* Py_RETURN_FROM_SIGNAL_HANDLER + * The return from a signal handler varies depending on whether RETSIGTYPE + * is int or void. The macro Py_RETURN_FROM_SIGNAL_HANDLER(VALUE) expands + * to + * return VALUE + * if RETSIGTYPE is int, else to nothing if RETSIGTYPE is void. + */ + #define int_PySIGRETURN(VALUE) return VALUE + #define void_PySIGRETURN(VALUE) + #define Py_RETURN_FROM_SIGNAL_HANDLER(VALUE) \ + Py_FORCE_EXPANSION(RETSIGTYPE) ## _PySIGRETURN(VALUE) #ifdef __cplusplus From python-dev@python.org Sun Jul 23 19:10:20 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 23 Jul 2000 11:10:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser intrcheck.c,2.35,2.36 Message-ID: <200007231810.LAA29200@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv28920/python/dist/src/Parser Modified Files: intrcheck.c Log Message: Recent ANSIfication introduced a couple instances of #if RETSIGTYPE != void That isn't C, and MSVC properly refuses to compile it. Introduced new Py_RETURN_FROM_SIGNAL_HANDLER macro in pyport.h to expand to the correct thing based on RETSIGTYPE. However, only void is ANSI! Do we still have platforms that return int? The Unix config mess appears to #define RETSIGTYPE by magic without being asked to, so I assume it's "a problem" across Unices still. Index: intrcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/intrcheck.c,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** intrcheck.c 2000/07/22 23:33:22 2.35 --- intrcheck.c 2000/07/23 18:10:18 2.36 *************** *** 169,175 **** signal(SIGINT, intcatcher); Py_AddPendingCall(checksignals_witharg, NULL); ! #if RETSIGTYPE != void ! return 0; ! #endif } --- 169,173 ---- signal(SIGINT, intcatcher); Py_AddPendingCall(checksignals_witharg, NULL); ! Py_RETURN_FROM_SIGNAL_HANDLER(0); } From python-dev@python.org Sun Jul 23 19:24:09 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 23 Jul 2000 11:24:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python marshal.c,1.53,1.54 Message-ID: <200007231824.LAA30162@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv29896/Python Modified Files: marshal.c Log Message: -- changed w_more to take an integer instead of a char (this is what the callers expect). Index: marshal.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/marshal.c,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -r1.53 -r1.54 *** marshal.c 2000/07/22 18:47:25 1.53 --- marshal.c 2000/07/23 18:24:06 1.54 *************** *** 56,60 **** static void ! w_more(char c, WFILE *p) { int size, newsize; --- 56,60 ---- static void ! w_more(int c, WFILE *p) { int size, newsize; *************** *** 70,74 **** p->end = PyString_AS_STRING((PyStringObject *)p->str) + newsize; ! *p->ptr++ = c; } } --- 70,74 ---- p->end = PyString_AS_STRING((PyStringObject *)p->str) + newsize; ! *p->ptr++ = (char) c; } } From python-dev@python.org Sun Jul 23 19:33:57 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 23 Jul 2000 11:33:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules signalmodule.c,2.49,2.50 Message-ID: <200007231833.LAA30730@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv30688/python/dist/src/modules Modified Files: signalmodule.c Log Message: Missed a return from a signal handler -- thanks to /F for pointing it out! Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.49 retrieving revision 2.50 diff -C2 -r2.49 -r2.50 *** signalmodule.c 2000/07/23 18:10:18 2.49 --- signalmodule.c 2000/07/23 18:33:52 2.50 *************** *** 137,141 **** Don't clear the 'func' field as it is our pointer to the Python handler... */ ! return; } #endif --- 137,141 ---- Don't clear the 'func' field as it is our pointer to the Python handler... */ ! Py_RETURN_FROM_SIGNAL_HANDLER(0); } #endif From python-dev@python.org Sun Jul 23 20:28:37 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 23 Jul 2000 12:28:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include Python.h,2.23,2.24 pyport.h,2.3,2.4 Message-ID: <200007231928.MAA08886@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv8641/python/dist/src/Include Modified Files: Python.h pyport.h Log Message: Included assert.h in Python.h -- it's absurd that this basic tool of good C practice hasn't been available to everything all along. Added Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) macro to pyport.h; this just casts VALUE from type WIDE to type NARROW, but assert-fails if Py_DEBUG is defined and info is lost due to casting. Replaced a line in Fredrik's fix to marshal.c to use the new macro. Index: Python.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** Python.h 2000/07/12 17:26:09 2.23 --- Python.h 2000/07/23 19:28:34 2.24 *************** *** 32,36 **** #include "patchlevel.h" #include "config.h" - #include "pyport.h" /* config.h may or may not define DL_IMPORT */ --- 32,35 ---- *************** *** 52,55 **** --- 51,57 ---- #include #endif + #include + + #include "pyport.h" #include "myproto.h" Index: pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** pyport.h 2000/07/23 18:10:16 2.3 --- pyport.h 2000/07/23 19:28:34 2.4 *************** *** 28,31 **** --- 28,35 ---- signal handlers to return. Note that only void is ANSI! Used in: Py_RETURN_FROM_SIGNAL_HANDLER + + Py_DEBUG + Meaning: Extra checks compiled in for debug mode. + Used in: Py_SAFE_DOWNCAST **************************************************************************/ *************** *** 74,77 **** --- 78,94 ---- #define Py_RETURN_FROM_SIGNAL_HANDLER(VALUE) \ Py_FORCE_EXPANSION(RETSIGTYPE) ## _PySIGRETURN(VALUE) + + /* Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) + * Cast VALUE to type NARROW from type WIDE. In Py_DEBUG mode, this + * assert-fails if any information is lost. + * Caution: + * VALUE may be evaluated more than once. + */ + #ifdef Py_DEBUG + #define Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) \ + (assert((WIDE)(NARROW)(VALUE) == (VALUE)), (NARROW)(VALUE)) + #else + #define Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) (NARROW)(VALUE) + #endif #ifdef __cplusplus From python-dev@python.org Sun Jul 23 20:28:37 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 23 Jul 2000 12:28:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python marshal.c,1.54,1.55 Message-ID: <200007231928.MAA08887@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv8641/python/dist/src/Python Modified Files: marshal.c Log Message: Included assert.h in Python.h -- it's absurd that this basic tool of good C practice hasn't been available to everything all along. Added Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) macro to pyport.h; this just casts VALUE from type WIDE to type NARROW, but assert-fails if Py_DEBUG is defined and info is lost due to casting. Replaced a line in Fredrik's fix to marshal.c to use the new macro. Index: marshal.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/marshal.c,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -r1.54 -r1.55 *** marshal.c 2000/07/23 18:24:06 1.54 --- marshal.c 2000/07/23 19:28:35 1.55 *************** *** 70,74 **** p->end = PyString_AS_STRING((PyStringObject *)p->str) + newsize; ! *p->ptr++ = (char) c; } } --- 70,74 ---- p->end = PyString_AS_STRING((PyStringObject *)p->str) + newsize; ! *p->ptr++ = Py_SAFE_DOWNCAST(c, int, char); } } From python-dev@python.org Sun Jul 23 20:47:15 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 23 Jul 2000 12:47:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.159,2.160 Message-ID: <200007231947.MAA10033@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv9617/Modules Modified Files: posixmodule.c Log Message: -- added code to the new Windows popen functions to make close return the exit code. Only works on Windows NT/2000, due to limitations in the Win9X shell. (based on patch #100941 by David Bolen) Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.159 retrieving revision 2.160 diff -C2 -r2.159 -r2.160 *** posixmodule.c 2000/07/22 23:57:55 2.159 --- posixmodule.c 2000/07/23 19:47:12 2.160 *************** *** 2118,2121 **** --- 2118,2122 ---- * Written by Bill Tutt . Minor tweaks * and 2.0 integration by Fredrik Lundh + * Return code handling by David Bolen. */ *************** *** 2131,2135 **** --- 2132,2145 ---- static PyObject *_PyPopen(char *, int, int); + static int _PyPclose(FILE *file); + /* + * Internal dictionary mapping popen* file pointers to process handles, + * in order to maintain a link to the process handle until the file is + * closed, at which point the process exit code is returned to the caller. + */ + static PyObject *_PyPopenProcs = NULL; + + /* popen that works from a GUI. * *************** *** 2286,2290 **** static int ! _PyPopenCreateProcess(char *cmdstring, HANDLE hStdin, HANDLE hStdout, --- 2296,2300 ---- static int ! _PyPopenCreateProcess(char *cmdstring, FILE *file, HANDLE hStdin, HANDLE hStdout, *************** *** 2362,2367 **** &piProcInfo) ) { /* Close the handles now so anyone waiting is woken. */ - CloseHandle(piProcInfo.hProcess); CloseHandle(piProcInfo.hThread); return TRUE; } --- 2372,2397 ---- &piProcInfo) ) { /* Close the handles now so anyone waiting is woken. */ CloseHandle(piProcInfo.hThread); + + /* + * Try to insert our process handle into the internal + * dictionary so we can find it later when trying + * to close this file. + */ + if (!_PyPopenProcs) + _PyPopenProcs = PyDict_New(); + if (_PyPopenProcs) { + PyObject *hProcessObj, *fileObj; + + hProcessObj = PyLong_FromVoidPtr(piProcInfo.hProcess); + fileObj = PyLong_FromVoidPtr(file); + + if (!hProcessObj || !fileObj || + PyDict_SetItem(_PyPopenProcs, + fileObj, hProcessObj) < 0) { + /* Insert failure - close handle to prevent leak */ + CloseHandle(piProcInfo.hProcess); + } + } return TRUE; } *************** *** 2440,2444 **** fd1 = _open_osfhandle((long)hChildStdinWrDup, mode); f1 = _fdopen(fd1, "w"); ! f = PyFile_FromFile(f1, cmdstring, "w", fclose); PyFile_SetBufSize(f, 0); /* We don't care about these pipes anymore, so close them. */ --- 2470,2474 ---- fd1 = _open_osfhandle((long)hChildStdinWrDup, mode); f1 = _fdopen(fd1, "w"); ! f = PyFile_FromFile(f1, cmdstring, "w", _PyPclose); PyFile_SetBufSize(f, 0); /* We don't care about these pipes anymore, so close them. */ *************** *** 2451,2455 **** fd1 = _open_osfhandle((long)hChildStdoutRdDup, mode); f1 = _fdopen(fd1, "r"); ! f = PyFile_FromFile(f1, cmdstring, "r", fclose); PyFile_SetBufSize(f, 0); /* We don't care about these pipes anymore, so close them. */ --- 2481,2485 ---- fd1 = _open_osfhandle((long)hChildStdoutRdDup, mode); f1 = _fdopen(fd1, "r"); ! f = PyFile_FromFile(f1, cmdstring, "r", _PyPclose); PyFile_SetBufSize(f, 0); /* We don't care about these pipes anymore, so close them. */ *************** *** 2462,2466 **** fd1 = _open_osfhandle((long)hChildStdoutRdDup, mode); f1 = _fdopen(fd1, "rb"); ! f = PyFile_FromFile(f1, cmdstring, "rb", fclose); PyFile_SetBufSize(f, 0); /* We don't care about these pipes anymore, so close them. */ --- 2492,2496 ---- fd1 = _open_osfhandle((long)hChildStdoutRdDup, mode); f1 = _fdopen(fd1, "rb"); ! f = PyFile_FromFile(f1, cmdstring, "rb", _PyPclose); PyFile_SetBufSize(f, 0); /* We don't care about these pipes anymore, so close them. */ *************** *** 2473,2477 **** fd1 = _open_osfhandle((long)hChildStdinWrDup, mode); f1 = _fdopen(fd1, "wb"); ! f = PyFile_FromFile(f1, cmdstring, "wb", fclose); PyFile_SetBufSize(f, 0); /* We don't care about these pipes anymore, so close them. */ --- 2503,2507 ---- fd1 = _open_osfhandle((long)hChildStdinWrDup, mode); f1 = _fdopen(fd1, "wb"); ! f = PyFile_FromFile(f1, cmdstring, "wb", _PyPclose); PyFile_SetBufSize(f, 0); /* We don't care about these pipes anymore, so close them. */ *************** *** 2500,2504 **** fd2 = _open_osfhandle((long)hChildStdoutRdDup, mode); f2 = _fdopen(fd2, m1); ! p1 = PyFile_FromFile(f1, cmdstring, m2, fclose); PyFile_SetBufSize(p1, 0); p2 = PyFile_FromFile(f2, cmdstring, m1, fclose); --- 2530,2534 ---- fd2 = _open_osfhandle((long)hChildStdoutRdDup, mode); f2 = _fdopen(fd2, m1); ! p1 = PyFile_FromFile(f1, cmdstring, m2, _PyPclose); PyFile_SetBufSize(p1, 0); p2 = PyFile_FromFile(f2, cmdstring, m1, fclose); *************** *** 2531,2535 **** fd3 = _open_osfhandle((long)hChildStderrRdDup, mode); f3 = _fdopen(fd3, m1); ! p1 = PyFile_FromFile(f1, cmdstring, m2, fclose); p2 = PyFile_FromFile(f2, cmdstring, m1, fclose); p3 = PyFile_FromFile(f3, cmdstring, m1, fclose); --- 2561,2565 ---- fd3 = _open_osfhandle((long)hChildStderrRdDup, mode); f3 = _fdopen(fd3, m1); ! p1 = PyFile_FromFile(f1, cmdstring, m2, _PyPclose); p2 = PyFile_FromFile(f2, cmdstring, m1, fclose); p3 = PyFile_FromFile(f3, cmdstring, m1, fclose); *************** *** 2544,2547 **** --- 2574,2578 ---- if (n == POPEN_4) { if (!_PyPopenCreateProcess(cmdstring, + f1, hChildStdinRd, hChildStdoutWr, *************** *** 2551,2554 **** --- 2582,2586 ---- else { if (!_PyPopenCreateProcess(cmdstring, + f1, hChildStdinRd, hChildStdoutWr, *************** *** 2573,2576 **** --- 2605,2658 ---- return f; + } + + /* + * Wrapper for fclose() to use for popen* files, so we can retrieve the + * exit code for the child process and return as a result of the close. + */ + static int _PyPclose(FILE *file) + { + int result = 0; + DWORD exit_code; + HANDLE hProcess; + PyObject *hProcessObj, *fileObj; + + if (_PyPopenProcs) { + fileObj = PyLong_FromVoidPtr(file); + if (fileObj) { + hProcessObj = PyDict_GetItem(_PyPopenProcs, fileObj); + if (hProcessObj) { + hProcess = PyLong_AsVoidPtr(hProcessObj); + if (GetExitCodeProcess(hProcess, &exit_code)) { + /* Possible truncation here in 16-bit environments, but + * real exit codes are just the lower byte in any event. + */ + result = exit_code; + if (result == STILL_ACTIVE) + result = 0; /* Minimize confusion */ + } else { + /* No good way to bubble up an error, so instead we just + * return the Windows last error shifted above standard + * exit codes. This will truncate in 16-bits but should + * be fine in 32 and at least distinguishes the problem. + */ + result = (GetLastError() << 8); + } + + /* Free up the native handle at this point */ + CloseHandle(hProcess); + + /* Remove from dictionary and flush dictionary if empty */ + PyDict_DelItem(_PyPopenProcs, fileObj); + if (PyDict_Size(_PyPopenProcs) == 0) { + Py_DECREF(_PyPopenProcs); + _PyPopenProcs = NULL; + } + } /* if hProcessObj */ + } /* if fileObj */ + } /* if _PyPopenProcs */ + + fclose(file); + return result; } #else From python-dev@python.org Sun Jul 23 22:18:11 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 23 Jul 2000 14:18:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include pyport.h,2.4,2.5 Message-ID: <200007232118.OAA04639@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv4368/python/dist/src/Include Modified Files: pyport.h Log Message: Removed all instances of RETSIGTYPE from the source code: signal handlers "return void", according to ANSI C. Removed the new Py_RETURN_FROM_SIGNAL_HANDLER macro. Left RETSIGTYPE in the config stuff, because it's not clear to me that others aren't relying on it (e.g., extension modules). Index: pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** pyport.h 2000/07/23 19:28:34 2.4 --- pyport.h 2000/07/23 21:18:08 2.5 *************** *** 24,32 **** Used in: Py_ARITHMETIC_RIGHT_SHIFT - RETSIGTYPE - Meaning: Expands to void or int, depending on what the platform wants - signal handlers to return. Note that only void is ANSI! - Used in: Py_RETURN_FROM_SIGNAL_HANDLER - Py_DEBUG Meaning: Extra checks compiled in for debug mode. --- 24,27 ---- *************** *** 66,81 **** */ #define Py_FORCE_EXPANSION(X) X - - /* Py_RETURN_FROM_SIGNAL_HANDLER - * The return from a signal handler varies depending on whether RETSIGTYPE - * is int or void. The macro Py_RETURN_FROM_SIGNAL_HANDLER(VALUE) expands - * to - * return VALUE - * if RETSIGTYPE is int, else to nothing if RETSIGTYPE is void. - */ - #define int_PySIGRETURN(VALUE) return VALUE - #define void_PySIGRETURN(VALUE) - #define Py_RETURN_FROM_SIGNAL_HANDLER(VALUE) \ - Py_FORCE_EXPANSION(RETSIGTYPE) ## _PySIGRETURN(VALUE) /* Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) --- 61,64 ---- From python-dev@python.org Sun Jul 23 22:18:11 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 23 Jul 2000 14:18:11 -0700 Subject: [Python-checkins] CVS: python/dist/src README,1.88,1.89 Message-ID: <200007232118.OAA04635@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv4368/python/dist/src Modified Files: README Log Message: Removed all instances of RETSIGTYPE from the source code: signal handlers "return void", according to ANSI C. Removed the new Py_RETURN_FROM_SIGNAL_HANDLER macro. Left RETSIGTYPE in the config stuff, because it's not clear to me that others aren't relying on it (e.g., extension modules). Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -r1.88 -r1.89 *** README 2000/07/01 00:34:39 1.88 --- README 2000/07/23 21:18:08 1.89 *************** *** 653,659 **** configuration of your system. Most symbols must simply be defined as 1 only if the corresponding feature is present and can be left alone ! otherwise; however RETSIGTYPE must always be defined, either as int or ! as void, and the *_t type symbols must be defined as some variant of ! int if they need to be defined at all. --- 653,658 ---- configuration of your system. Most symbols must simply be defined as 1 only if the corresponding feature is present and can be left alone ! otherwise; however the *_t type symbols must be defined as some variant ! of int if they need to be defined at all. From python-dev@python.org Sun Jul 23 22:18:11 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 23 Jul 2000 14:18:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser intrcheck.c,2.36,2.37 Message-ID: <200007232118.OAA04648@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv4368/python/dist/src/Parser Modified Files: intrcheck.c Log Message: Removed all instances of RETSIGTYPE from the source code: signal handlers "return void", according to ANSI C. Removed the new Py_RETURN_FROM_SIGNAL_HANDLER macro. Left RETSIGTYPE in the config stuff, because it's not clear to me that others aren't relying on it (e.g., extension modules). Index: intrcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/intrcheck.c,v retrieving revision 2.36 retrieving revision 2.37 diff -C2 -r2.36 -r2.37 *** intrcheck.c 2000/07/23 18:10:18 2.36 --- intrcheck.c 2000/07/23 21:18:09 2.37 *************** *** 150,154 **** } ! static RETSIGTYPE intcatcher(int sig) { --- 150,154 ---- } ! static void intcatcher(int sig) { *************** *** 169,176 **** signal(SIGINT, intcatcher); Py_AddPendingCall(checksignals_witharg, NULL); - Py_RETURN_FROM_SIGNAL_HANDLER(0); } ! static RETSIGTYPE (*old_siginthandler)(int) = SIG_DFL; void --- 169,175 ---- signal(SIGINT, intcatcher); Py_AddPendingCall(checksignals_witharg, NULL); } ! static void (*old_siginthandler)(int) = SIG_DFL; void From python-dev@python.org Sun Jul 23 22:18:11 2000 From: python-dev@python.org (Tim Peters) Date: Sun, 23 Jul 2000 14:18:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules fpectlmodule.c,2.9,2.10 readline.c,2.24,2.25 signalmodule.c,2.50,2.51 Message-ID: <200007232118.OAB04649@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv4368/python/dist/src/Modules Modified Files: fpectlmodule.c readline.c signalmodule.c Log Message: Removed all instances of RETSIGTYPE from the source code: signal handlers "return void", according to ANSI C. Removed the new Py_RETURN_FROM_SIGNAL_HANDLER macro. Left RETSIGTYPE in the config stuff, because it's not clear to me that others aren't relying on it (e.g., extension modules). Index: fpectlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fpectlmodule.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** fpectlmodule.c 1999/04/19 16:50:26 2.9 --- fpectlmodule.c 2000/07/23 21:18:09 2.10 *************** *** 78,82 **** #endif ! typedef RETSIGTYPE Sigfunc(int); static Sigfunc sigfpe_handler; static void fpe_reset(Sigfunc *); --- 78,82 ---- #endif ! typedef void Sigfunc(int); static Sigfunc sigfpe_handler; static void fpe_reset(Sigfunc *); Index: readline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -r2.24 -r2.25 *** readline.c 2000/07/22 23:51:19 2.24 --- readline.c 2000/07/23 21:18:09 2.25 *************** *** 428,438 **** /* ARGSUSED */ ! static RETSIGTYPE onintr(int sig) { longjmp(jbuf, 1); - #if RETSIGTYPE != void - return 0; - #endif } --- 428,435 ---- /* ARGSUSED */ ! static void onintr(int sig) { longjmp(jbuf, 1); } *************** *** 445,449 **** size_t n; char *p, *q; ! RETSIGTYPE (*old_inthandler)(int); old_inthandler = signal(SIGINT, onintr); if (setjmp(jbuf)) { --- 442,446 ---- size_t n; char *p, *q; ! void (*old_inthandler)(int); old_inthandler = signal(SIGINT, onintr); if (setjmp(jbuf)) { Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.50 retrieving revision 2.51 diff -C2 -r2.50 -r2.51 *** signalmodule.c 2000/07/23 18:33:52 2.50 --- signalmodule.c 2000/07/23 21:18:09 2.51 *************** *** 27,31 **** #ifndef SIG_ERR ! #define SIG_ERR ((RETSIGTYPE (*)(int))-1) #endif --- 27,31 ---- #ifndef SIG_ERR ! #define SIG_ERR ((void (*)(int))-1) #endif *************** *** 93,97 **** static PyObject *IntHandler; ! static RETSIGTYPE (*old_siginthandler)(int) = SIG_DFL; --- 93,97 ---- static PyObject *IntHandler; ! static void (*old_siginthandler)(int) = SIG_DFL; *************** *** 118,122 **** } ! static RETSIGTYPE signal_handler(int sig_num) { --- 118,122 ---- } ! static void signal_handler(int sig_num) { *************** *** 137,141 **** Don't clear the 'func' field as it is our pointer to the Python handler... */ ! Py_RETURN_FROM_SIGNAL_HANDLER(0); } #endif --- 137,141 ---- Don't clear the 'func' field as it is our pointer to the Python handler... */ ! return; } #endif *************** *** 144,148 **** #endif signal(sig_num, signal_handler); - Py_RETURN_FROM_SIGNAL_HANDLER(0); } --- 144,147 ---- *************** *** 199,203 **** int sig_num; PyObject *old_handler; ! RETSIGTYPE (*func)(int); if (!PyArg_Parse(args, "(iO)", &sig_num, &obj)) return NULL; --- 198,202 ---- int sig_num; PyObject *old_handler; ! void (*func)(int); if (!PyArg_Parse(args, "(iO)", &sig_num, &obj)) return NULL; *************** *** 356,360 **** Handlers[0].tripped = 0; for (i = 1; i < NSIG; i++) { ! RETSIGTYPE (*t)(int); #ifdef HAVE_SIGACTION struct sigaction act; --- 355,359 ---- Handlers[0].tripped = 0; for (i = 1; i < NSIG; i++) { ! void (*t)(int); #ifdef HAVE_SIGACTION struct sigaction act; From python-dev@python.org Sun Jul 23 22:46:21 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 23 Jul 2000 14:46:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.27,2.28 sre.h,2.14,2.15 Message-ID: <200007232146.OAA06487@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6140/Modules Modified Files: _sre.c sre.h Log Message: -- SRE 0.9.6 sync. this includes: + added "regs" attribute + fixed "pos" and "endpos" attributes + reset "lastindex" and "lastgroup" in scanner methods + removed (?P#id) syntax; the "lastindex" and "lastgroup" attributes are now always set + removed string module dependencies in sre_parse + better debugging support in sre_parse + various tweaks to build under 1.5.2 Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.27 retrieving revision 2.28 diff -C2 -r2.27 -r2.28 *** _sre.c 2000/07/21 06:00:07 2.27 --- _sre.c 2000/07/23 21:46:17 2.28 *************** *** 1,4 **** ! /* -*- Mode: C; tab-width: 4 -*- ! * * Secret Labs' Regular Expression Engine * --- 1,3 ---- ! /* * Secret Labs' Regular Expression Engine * *************** *** 6,27 **** [...3493 lines suppressed...] *** 2100,2108 **** init_sre(void) { ! /* Patch object types */ ! Pattern_Type.ob_type = Match_Type.ob_type = Scanner_Type.ob_type = &PyType_Type; ! Py_InitModule("_" MODULE, _functions); } --- 2193,2201 ---- init_sre(void) { ! /* Patch object types */ ! Pattern_Type.ob_type = Match_Type.ob_type = Scanner_Type.ob_type = &PyType_Type; ! Py_InitModule("_" MODULE, _functions); } Index: sre.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sre.h,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** sre.h 2000/07/03 21:31:48 2.14 --- sre.h 2000/07/23 21:46:17 2.15 *************** *** 1,3 **** --- 1,4 ---- /* + * * Secret Labs' Regular Expression Engine * *************** *** 34,37 **** --- 35,39 ---- PyObject_VAR_HEAD PyObject* string; /* link to the target string */ + PyObject* regs; /* cached list of matching spans */ PatternObject* pattern; /* link to the regex (pattern) object */ int pos, endpos; /* current target slice */ *************** *** 61,64 **** --- 63,69 ---- void* start; /* start of current slice */ void* end; /* end of original string */ + /* attributes for the match object */ + PyObject* string; + int pos, endpos; /* character size */ int charsize; *************** *** 79,83 **** PyObject_HEAD PyObject* pattern; - PyObject* string; SRE_STATE state; } ScannerObject; --- 84,87 ---- From python-dev@python.org Sun Jul 23 22:46:21 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 23 Jul 2000 14:46:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_sre,1.6,1.7 Message-ID: <200007232146.OAA06486@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv6140/Lib/test/output Modified Files: test_sre Log Message: -- SRE 0.9.6 sync. this includes: + added "regs" attribute + fixed "pos" and "endpos" attributes + reset "lastindex" and "lastgroup" in scanner methods + removed (?P#id) syntax; the "lastindex" and "lastgroup" attributes are now always set + removed string module dependencies in sre_parse + better debugging support in sre_parse + various tweaks to build under 1.5.2 Index: test_sre =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_sre,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** test_sre 2000/07/03 21:31:48 1.6 --- test_sre 2000/07/23 21:46:17 1.7 *************** *** 2,4 **** --- 2,6 ---- === Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A') === Failed incorrectly ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a') + === grouping error ('(a)(b)c|ab', 'ab', 0, 'found+"-"+g1+"-"+g2', 'ab-None-None') 'ab-None-b' should be 'ab-None-None' + === grouping error ('(a)+b|aac', 'aac', 0, 'found+"-"+g1', 'aac-None') 'aac-a' should be 'aac-None' === Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A') From python-dev@python.org Sun Jul 23 22:46:21 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sun, 23 Jul 2000 14:46:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre.py,1.20,1.21 sre_compile.py,1.25,1.26 sre_constants.py,1.17,1.18 sre_parse.py,1.25,1.26 Message-ID: <200007232146.OAA06488@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv6140/Lib Modified Files: sre.py sre_compile.py sre_constants.py sre_parse.py Log Message: -- SRE 0.9.6 sync. this includes: + added "regs" attribute + fixed "pos" and "endpos" attributes + reset "lastindex" and "lastgroup" in scanner methods + removed (?P#id) syntax; the "lastindex" and "lastgroup" attributes are now always set + removed string module dependencies in sre_parse + better debugging support in sre_parse + various tweaks to build under 1.5.2 Index: sre.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** sre.py 2000/07/02 22:59:57 1.20 --- sre.py 2000/07/23 21:46:17 1.21 *************** *** 11,17 **** --- 11,21 ---- # + # FIXME: change all FIXME's to XXX ;-) + import sre_compile import sre_parse + import string + # flags I = IGNORECASE = sre_compile.SRE_FLAG_IGNORECASE *************** *** 54,57 **** --- 58,64 ---- return _compile(pattern, flags) + def purge(): + _cache.clear() + def template(pattern, flags=0): return _compile(pattern, flags|T) *************** *** 66,70 **** else: s[i] = "\\" + c ! return pattern[:0].join(s) # -------------------------------------------------------------------- --- 73,77 ---- else: s[i] = "\\" + c ! return _join(s, pattern) # -------------------------------------------------------------------- *************** *** 74,81 **** _MAXCACHE = 100 def _compile(pattern, flags=0): # internal: compile pattern tp = type(pattern) ! if tp not in (type(""), type(u"")): return pattern key = (tp, pattern, flags) --- 81,92 ---- _MAXCACHE = 100 + def _join(seq, sep): + # internal: join into string having the same type as sep + return string.join(seq, sep[:0]) + def _compile(pattern, flags=0): # internal: compile pattern tp = type(pattern) ! if tp not in sre_compile.STRING_TYPES: return pattern key = (tp, pattern, flags) *************** *** 90,97 **** return p - def purge(): - # clear pattern cache - _cache.clear() - def _sub(pattern, template, string, count=0): # internal: pattern.sub implementation hook --- 101,104 ---- *************** *** 121,125 **** n = n + 1 append(string[i:]) ! return string[:0].join(s), n def _split(pattern, string, maxsplit=0): --- 128,132 ---- n = n + 1 append(string[i:]) ! return _join(s, string[:0]), n def _split(pattern, string, maxsplit=0): *************** *** 162,170 **** class Scanner: def __init__(self, lexicon): self.lexicon = lexicon p = [] for phrase, action in lexicon: ! p.append("(?:%s)(?P#%d)" % (phrase, len(p))) ! self.scanner = _compile("|".join(p)) def scan(self, string): result = [] --- 169,185 ---- class Scanner: def __init__(self, lexicon): + from sre_constants import BRANCH, SUBPATTERN, INDEX self.lexicon = lexicon + # combine phrases into a compound pattern p = [] + s = sre_parse.Pattern() for phrase, action in lexicon: ! p.append(sre_parse.SubPattern(s, [ ! (SUBPATTERN, (None, sre_parse.parse(phrase))), ! (INDEX, len(p)) ! ])) ! p = sre_parse.SubPattern(s, [(BRANCH, (None, p))]) ! s.groups = len(p) ! self.scanner = sre_compile.compile(p) def scan(self, string): result = [] Index: sre_compile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** sre_compile.py 2000/07/05 21:14:15 1.25 --- sre_compile.py 2000/07/23 21:46:17 1.26 *************** *** 198,205 **** emit(ATCODES[av]) elif op is BRANCH: - emit(OPCODES[op]) tail = [] for av in av[1]: skip = len(code); emit(0) _compile(code, av, flags) emit(OPCODES[JUMP]) --- 198,206 ---- emit(ATCODES[av]) elif op is BRANCH: tail = [] for av in av[1]: + emit(OPCODES[op]) skip = len(code); emit(0) + emit(MAXCODE) # save mark _compile(code, av, flags) emit(OPCODES[JUMP]) *************** *** 287,295 **** code[skip] = len(code) - skip def compile(p, flags=0): # internal: convert pattern list to internal format # compile, as necessary ! if type(p) in (type(""), type(u"")): import sre_parse pattern = p --- 288,303 ---- code[skip] = len(code) - skip + STRING_TYPES = [type("")] + + try: + STRING_TYPES.append(type(unicode(""))) + except NameError: + pass + def compile(p, flags=0): # internal: convert pattern list to internal format # compile, as necessary ! if type(p) in STRING_TYPES: import sre_parse pattern = p *************** *** 308,311 **** --- 316,321 ---- code.append(OPCODES[SUCCESS]) + + # print code # FIXME: get rid of this limitation! Index: sre_constants.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_constants.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** sre_constants.py 2000/07/16 12:04:30 1.17 --- sre_constants.py 2000/07/23 21:46:17 1.18 *************** *** 173,177 **** SRE_FLAG_TEMPLATE = 1 # template mode (disable backtracking) SRE_FLAG_IGNORECASE = 2 # case insensitive ! SRE_FLAG_LOCALE = 4 # honor system locale SRE_FLAG_MULTILINE = 8 # treat target as multiline string SRE_FLAG_DOTALL = 16 # treat target as a single string --- 173,177 ---- SRE_FLAG_TEMPLATE = 1 # template mode (disable backtracking) SRE_FLAG_IGNORECASE = 2 # case insensitive ! SRE_FLAG_LOCALE = 4 # honour system locale SRE_FLAG_MULTILINE = 8 # treat target as multiline string SRE_FLAG_DOTALL = 16 # treat target as a single string Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** sre_parse.py 2000/07/03 21:31:48 1.25 --- sre_parse.py 2000/07/23 21:46:17 1.26 *************** *** 26,35 **** REPEAT_CHARS = "*+?{" ! DIGITS = tuple(string.digits) OCTDIGITS = tuple("01234567") HEXDIGITS = tuple("0123456789abcdefABCDEF") ! WHITESPACE = tuple(string.whitespace) ESCAPES = { --- 26,35 ---- REPEAT_CHARS = "*+?{" ! DIGITS = tuple("012345689") OCTDIGITS = tuple("01234567") HEXDIGITS = tuple("0123456789abcdefABCDEF") ! WHITESPACE = tuple(" \t\n\r\v\f") ESCAPES = { *************** *** 69,73 **** } ! class State: def __init__(self): self.flags = 0 --- 69,74 ---- } ! class Pattern: ! # master pattern object. keeps track of global attributes def __init__(self): self.flags = 0 *************** *** 89,92 **** --- 90,120 ---- self.data = data self.width = None + def dump(self, level=0): + nl = 1 + for op, av in self.data: + print level*" " + op,; nl = 0 + if op == "in": + # member sublanguage + print; nl = 1 + for op, a in av: + print (level+1)*" " + op, a + elif op == "branch": + print; nl = 1 + i = 0 + for a in av[1]: + if i > 0: + print level*" " + "or" + a.dump(level+1); nl = 1 + i = i + 1 + elif type(av) in (type(()), type([])): + for a in av: + if isinstance(a, SubPattern): + if not nl: print + a.dump(level+1); nl = 1 + else: + print a, ; nl = 0 + else: + print av, ; nl = 0 + if not nl: print def __repr__(self): return repr(self.data) *************** *** 256,264 **** raise error, "bogus escape: %s" % repr(escape) ! def _branch(pattern, items): ! # form a branch operator from a set of items ! subpattern = SubPattern(pattern) # check if all items share a common prefix while 1: --- 284,307 ---- raise error, "bogus escape: %s" % repr(escape) ! def _parse_sub(source, state, nested=1): ! # parse an alternation: a|b|c ! items = [] ! while 1: ! items.append(_parse(source, state)) ! if source.match("|"): ! continue ! if not nested: ! break ! if not source.next or source.match(")"): ! break ! else: ! raise error, "pattern not properly closed" + if len(items) == 1: + return items[0] + + subpattern = SubPattern(state) + # check if all items share a common prefix while 1: *************** *** 286,290 **** else: # we can store this as a character set instead of a ! # branch (FIXME: use a range if possible) set = [] for item in items: --- 329,333 ---- else: # we can store this as a character set instead of a ! # branch (the compiler may optimize this even more) set = [] for item in items: *************** *** 297,302 **** def _parse(source, state): ! ! # parse regular expression pattern into an operator list. subpattern = SubPattern(state) --- 340,344 ---- def _parse(source, state): ! # parse a simple pattern subpattern = SubPattern(state) *************** *** 452,471 **** raise error, "unknown group name" subpattern.append((GROUPREF, gid)) - elif source.match("#"): - index = "" - while 1: - char = source.get() - if char is None: - raise error, "unterminated index" - if char == ")": - break - index = index + char - try: - index = int(index) - if index < 0 or index > MAXREPEAT: - raise ValueError - except ValueError: - raise error, "illegal index" - subpattern.append((INDEX, index)) continue else: --- 494,497 ---- *************** *** 492,511 **** dir = -1 # lookbehind char = source.get() ! b = [] ! while 1: ! p = _parse(source, state) ! if source.next == ")": ! if b: ! b.append(p) ! p = _branch(state, b) ! if char == "=": ! subpattern.append((ASSERT, (dir, p))) ! else: ! subpattern.append((ASSERT_NOT, (dir, p))) ! break ! elif source.match("|"): ! b.append(p) ! else: ! raise error, "pattern not properly closed" else: # flags --- 518,527 ---- dir = -1 # lookbehind char = source.get() ! p = _parse_sub(source, state) ! if char == "=": ! subpattern.append((ASSERT, (dir, p))) ! else: ! subpattern.append((ASSERT_NOT, (dir, p))) ! continue else: # flags *************** *** 514,518 **** if group: # parse group contents - b = [] if group == 2: # anonymous group --- 530,533 ---- *************** *** 520,537 **** else: group = state.getgroup(name) ! while 1: ! p = _parse(source, state) ! if group is not None: ! p.append((INDEX, group)) ! if source.match(")"): ! if b: ! b.append(p) ! p = _branch(state, b) ! subpattern.append((SUBPATTERN, (group, p))) ! break ! elif source.match("|"): ! b.append(p) ! else: ! raise error, "group not properly closed" else: while 1: --- 535,542 ---- else: group = state.getgroup(name) ! p = _parse_sub(source, state) ! subpattern.append((SUBPATTERN, (group, p))) ! if group is not None: ! p.append((INDEX, group)) else: while 1: *************** *** 556,579 **** return subpattern ! def parse(pattern, flags=0): # parse 're' pattern into list of (opcode, argument) tuples ! source = Tokenizer(pattern) ! state = State() ! state.flags = flags ! b = [] ! while 1: ! p = _parse(source, state) ! tail = source.get() ! if tail == "|": ! b.append(p) ! elif tail == ")": ! raise error, "unbalanced parenthesis" ! elif tail is None: ! if b: ! b.append(p) ! p = _branch(state, b) ! break ! else: ! raise error, "bogus characters at end of regular expression" return p --- 561,582 ---- return subpattern ! def parse(str, flags=0): # parse 're' pattern into list of (opcode, argument) tuples ! ! source = Tokenizer(str) ! ! pattern = Pattern() ! pattern.flags = flags ! ! p = _parse_sub(source, pattern, 0) ! ! tail = source.get() ! if tail == ")": ! raise error, "unbalanced parenthesis" ! elif tail: ! raise error, "bogus characters at end of regular expression" ! ! # p.dump() ! return p *************** *** 657,659 **** raise error, "empty group" a(s) ! return sep.join(p) --- 660,662 ---- raise error, "empty group" a(s) ! return string.join(p, sep) From python-dev@python.org Sun Jul 23 23:10:02 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 23 Jul 2000 15:10:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects classobject.c,2.101,2.102 Message-ID: <200007232210.PAA15085@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv15042 Modified Files: classobject.c Log Message: ANSIfy functions that were hiding inside a macro. Index: classobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/classobject.c,v retrieving revision 2.101 retrieving revision 2.102 diff -C2 -r2.101 -r2.102 *** classobject.c 2000/07/16 12:04:31 2.101 --- classobject.c 2000/07/23 22:09:59 2.102 *************** *** 1315,1319 **** #define UNARY(funcname, methodname) \ ! static PyObject *funcname(self) PyInstanceObject *self; { \ static PyObject *o; \ if (o == NULL) o = PyString_InternFromString(methodname); \ --- 1315,1319 ---- #define UNARY(funcname, methodname) \ ! static PyObject *funcname(PyInstanceObject *self) { \ static PyObject *o; \ if (o == NULL) o = PyString_InternFromString(methodname); \ From python-dev@python.org Sun Jul 23 23:21:35 2000 From: python-dev@python.org (Thomas Wouters) Date: Sun, 23 Jul 2000 15:21:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.171,2.172 Message-ID: <200007232221.PAA15801@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv15788/Python Modified Files: bltinmodule.c Log Message: Another missed ansification. Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.171 retrieving revision 2.172 diff -C2 -r2.171 -r2.172 *** bltinmodule.c 2000/07/22 18:47:25 2.171 --- bltinmodule.c 2000/07/23 22:21:32 2.172 *************** *** 1583,1590 **** */ static long ! get_len_of_range(lo, hi, step) ! long lo; ! long hi; ! long step; /* must be > 0 */ { /* ------------------------------------------------------------- --- 1583,1587 ---- */ static long ! get_len_of_range(long lo, long hi, long step) { /* ------------------------------------------------------------- From python-dev@python.org Mon Jul 24 02:45:15 2000 From: python-dev@python.org (Mark Hammond) Date: Sun, 23 Jul 2000 18:45:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.119,1.120 Message-ID: <200007240145.SAA17195@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv17167 Modified Files: socketmodule.c Log Message: Patch #100926 - Better error messages for socket exceptions on Windows. [Slight style differences from posted patch] Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.119 retrieving revision 1.120 diff -C2 -r1.119 -r1.120 *** socketmodule.c 2000/07/22 23:57:55 1.119 --- socketmodule.c 2000/07/24 01:45:11 1.120 *************** *** 232,238 **** { #ifdef MS_WINDOWS ! if (WSAGetLastError()) { PyObject *v; ! v = Py_BuildValue("(is)", WSAGetLastError(), "winsock error"); if (v != NULL) { PyErr_SetObject(PySocket_Error, v); --- 232,314 ---- { #ifdef MS_WINDOWS ! int err_no = WSAGetLastError(); ! if (err_no) { ! static struct { int no; const char *msg; } *msgp, msgs[] = { ! { WSAEINTR, "Interrupted system call" }, ! { WSAEBADF, "Bad file descriptor" }, ! { WSAEACCES, "Permission denied" }, ! { WSAEFAULT, "Bad address" }, ! { WSAEINVAL, "Invalid argument" }, ! { WSAEMFILE, "Too many open files" }, ! { WSAEWOULDBLOCK, ! "The socket operation could not complete " ! "without blocking" }, ! { WSAEINPROGRESS, "Operation now in progress" }, ! { WSAEALREADY, "Operation already in progress" }, ! { WSAENOTSOCK, "Socket operation on non-socket" }, ! { WSAEDESTADDRREQ, "Destination address required" }, ! { WSAEMSGSIZE, "Message too long" }, ! { WSAEPROTOTYPE, "Protocol wrong type for socket" }, ! { WSAENOPROTOOPT, "Protocol not available" }, ! { WSAEPROTONOSUPPORT, "Protocol not supported" }, ! { WSAESOCKTNOSUPPORT, "Socket type not supported" }, ! { WSAEOPNOTSUPP, "Operation not supported" }, ! { WSAEPFNOSUPPORT, "Protocol family not supported" }, ! { WSAEAFNOSUPPORT, "Address family not supported" }, ! { WSAEADDRINUSE, "Address already in use" }, ! { WSAEADDRNOTAVAIL, ! "Can't assign requested address" }, ! { WSAENETDOWN, "Network is down" }, ! { WSAENETUNREACH, "Network is unreachable" }, ! { WSAENETRESET, ! "Network dropped connection on reset" }, ! { WSAECONNABORTED, ! "Software caused connection abort" }, ! { WSAECONNRESET, "Connection reset by peer" }, ! { WSAENOBUFS, "No buffer space available" }, ! { WSAEISCONN, "Socket is already connected" }, ! { WSAENOTCONN, "Socket is not connected" }, ! { WSAESHUTDOWN, "Can't send after socket shutdown" }, ! { WSAETOOMANYREFS, ! "Too many references: can't splice" }, ! { WSAETIMEDOUT, "Operation timed out" }, ! { WSAECONNREFUSED, "Connection refused" }, ! { WSAELOOP, "Too many levels of symbolic links" }, ! { WSAENAMETOOLONG, "File name too long" }, ! { WSAEHOSTDOWN, "Host is down" }, ! { WSAEHOSTUNREACH, "No route to host" }, ! { WSAENOTEMPTY, "Directory not empty" }, ! { WSAEPROCLIM, "Too many processes" }, ! { WSAEUSERS, "Too many users" }, ! { WSAEDQUOT, "Disc quota exceeded" }, ! { WSAESTALE, "Stale NFS file handle" }, ! { WSAEREMOTE, "Too many levels of remote in path" }, ! { WSASYSNOTREADY, ! "Network subsystem is unvailable" }, ! { WSAVERNOTSUPPORTED, ! "WinSock version is not supported" }, ! { WSANOTINITIALISED, ! "Successful WSAStartup() not yet performed" }, ! { WSAEDISCON, "Graceful shutdown in progress" }, ! /* Resolver errors */ ! { WSAHOST_NOT_FOUND, "No such host is known" }, ! { WSATRY_AGAIN, "Host not found, or server failed" }, ! { WSANO_RECOVERY, ! "Unexpected server error encountered" }, ! { WSANO_DATA, "Valid name without requested data" }, ! { WSANO_ADDRESS, "No address, look for MX record" }, ! { 0, NULL } ! }; PyObject *v; ! const char *msg = "winsock error"; ! ! for (msgp = msgs; msgp->msg; msgp++) { ! if (err_no == msgp->no) { ! msg = msgp->msg; ! break; ! } ! } ! ! v = Py_BuildValue("(is)", err_no, msg); if (v != NULL) { PyErr_SetObject(PySocket_Error, v); From python-dev@python.org Mon Jul 24 04:28:43 2000 From: python-dev@python.org (Eric S. Raymond) Date: Sun, 23 Jul 2000 20:28:43 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcurses.tex,1.8,1.9 Message-ID: <200007240328.UAA11716@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv11569 Modified Files: libcurses.tex Log Message: First round of curses documentation improvements; correct errors, flesh out entry point descriptions. Index: libcurses.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** libcurses.tex 2000/07/16 19:01:09 1.8 --- libcurses.tex 2000/07/24 03:28:40 1.9 *************** *** 1,7 **** \section{\module{curses} --- ! Terminal independent console handling} \declaremodule{extension}{curses} \sectionauthor{Moshe Zadka}{mzadka@geocities.com} \modulesynopsis{An interface to the curses library.} --- 1,8 ---- \section{\module{curses} --- ! Screen painting and input handling for character-cell terminals} \declaremodule{extension}{curses} \sectionauthor{Moshe Zadka}{mzadka@geocities.com} + \sectionauthor{Eric Raymond}{esr@thyrsus.com} \modulesynopsis{An interface to the curses library.} *************** *** 11,17 **** While curses is most widely used in the \UNIX{} environment, versions ! are available for DOS, OS/2, and possibly other systems as well. The ! extension module has not been tested with all available versions of ! curses. \begin{seealso} --- 12,19 ---- While curses is most widely used in the \UNIX{} environment, versions ! are available for DOS, OS/2, and possibly other systems as well. This ! extension module is designed to match the API of ncurses, an ! open-source curses library hosted on Linux and the BSD variants of ! Unix. \begin{seealso} *************** *** 19,22 **** --- 21,26 ---- characters, regardless of your locale settings.} + \seemodule{curses.textbox}{Editable text widget for curses supporting + Emacs-like bindings.} \seetext{Tutorial material on using curses with Python is available on the Python Web site as Andrew Kuchling's *************** *** 41,49 **** \begin{funcdesc}{baudrate}{} ! Returns the output speed of the terminal in bits per second. \end{funcdesc} \begin{funcdesc}{beep}{} ! Emit a short sound. \end{funcdesc} --- 45,57 ---- \begin{funcdesc}{baudrate}{} ! Returns the output speed of the terminal in bits per second. On ! software terminal emulators it will have a fixed high value. ! Included for historical reasons; in former times, it was used to ! write output loops for time delays and occasionally to change ! interfaces depending on the line speed. \end{funcdesc} \begin{funcdesc}{beep}{} ! Emit a short attention sound. \end{funcdesc} *************** *** 54,58 **** \begin{funcdesc}{cbreak}{} ! Enter cbreak mode. \end{funcdesc} --- 62,71 ---- \begin{funcdesc}{cbreak}{} ! Enter cbreak mode. In cbreak mode (sometimes called ``rare'' mode) ! normal tty line buffering is turned off and characters are available ! to be read one by one. However, unlike raw mode, special characters ! (interrupt, quit, suspend, and flow control) retain their effects on ! the tty driver and calling program. Calling first \function{raw()} ! then \function{cbreak()} leaves the terminal in cbreak mode. \end{funcdesc} *************** *** 76,80 **** invisible, normal, or very visible. If the terminal supports the visibility requested, the previous cursor state is returned; ! otherwise, an exception is raised. \end{funcdesc} --- 89,94 ---- invisible, normal, or very visible. If the terminal supports the visibility requested, the previous cursor state is returned; ! otherwise, an exception is raised. On many terminals, the ``visible'' ! mode is an underline cursor and the ``very visible'' mode is a block cursor. \end{funcdesc} *************** *** 99,107 **** \begin{funcdesc}{doupdate}{} ! Update the screen. \end{funcdesc} \begin{funcdesc}{echo}{} ! Enter echo mode. \end{funcdesc} --- 113,134 ---- \begin{funcdesc}{doupdate}{} ! Update the physical screen. The curses library keeps two data ! structures, one representing the current physical screen contents ! and a virtual screen representing the desired next state. The ! \function{doupdate()} ground updates the physical screen to match the ! virtual screen. ! ! The virtual screen may be updated by a \method{noutrefresh()} call ! after write operations such as \method{addstr()} have been performed ! on a window. The normal \method{refresh()} call is simply ! \method{noutrefresh()} followed by \function{doupdate()}; if you have ! to update multiple windows, you can speed performance and perhaps ! reduce screen flicker by issuing \method{noutrefresh()} calls on ! all windows, followed by a single \function{doupdate()}. \end{funcdesc} \begin{funcdesc}{echo}{} ! Enter echo mode. In echo mode, each character input is echoed to the ! screen as it is entered. \end{funcdesc} *************** *** 111,132 **** \begin{funcdesc}{erasechar}{} ! Returns the user's current erase character. \end{funcdesc} \begin{funcdesc}{filter}{} ! The \function{filter()} routine, if used, must be called before ! \function{initscr()} is called. ! ! The effect is that, during those calls, LINES is set to 1; the ! capabilities clear, cup, cud, cud1, cuu1, cuu, vpa are disabled; and ! the home string is set to the value of cr. \end{funcdesc} \begin{funcdesc}{flash}{} ! Flash the screen. \end{funcdesc} \begin{funcdesc}{flushinp}{} ! Flush all input buffers. \end{funcdesc} --- 138,165 ---- \begin{funcdesc}{erasechar}{} ! Returns the user's current erase character. Under Unix operating ! systems this is a property of the controlling tty of the curses ! program, and is not set by the curses library itself. \end{funcdesc} \begin{funcdesc}{filter}{} ! The \function{filter()} routine, if used, must be called before ! \function{initscr()} is called. The effect is that, during those ! calls, LINES is set to 1; the capabilities clear, cup, cud, cud1, ! cuu1, cuu, vpa are disabled; and the home string is set to the value of cr. ! The effect is that the cursor is confined to the current line, and so ! are screen updates. This may be used for enabling cgaracter-at-a-time ! line editing without touching the rest of the screen. \end{funcdesc} \begin{funcdesc}{flash}{} ! Flash the screen. That is, change it to reverse-video and then change ! it back in a short interval. Some people prefer such as `visible bell' ! to the audible attention signal produced by \function{beep()}. \end{funcdesc} \begin{funcdesc}{flushinp}{} ! Flush all input buffers. This throws away any typeahead that has ! been typed by the user and has not yet been processed by the program. \end{funcdesc} *************** *** 164,168 **** \begin{funcdesc}{has_colors}{} ! Returns true if the terminal can manipulate colors; otherwise, it returns false. \end{funcdesc} --- 197,201 ---- \begin{funcdesc}{has_colors}{} ! Returns true if the terminal can display colors; otherwise, it returns false. \end{funcdesc} *************** *** 170,174 **** \begin{funcdesc}{has_ic}{} Returns true if the terminal has insert- and delete- character ! capabilities. \end{funcdesc} --- 203,208 ---- \begin{funcdesc}{has_ic}{} Returns true if the terminal has insert- and delete- character ! capabilities. This function is included for historical reasons only, ! as all modern software terminal emulators have such capabilities. \end{funcdesc} *************** *** 176,180 **** Returns true if the terminal has insert- and delete-line capabilities, or can simulate them using ! scrolling regions. \end{funcdesc} --- 210,215 ---- Returns true if the terminal has insert- and delete-line capabilities, or can simulate them using ! scrolling regions. This function is included for historical reasons only, ! as all modern software terminal emulators have such capabilities. \end{funcdesc} *************** *** 189,193 **** However, after blocking for \var{tenths} tenths of seconds, an exception is raised if nothing has been typed. The value of ! \var{tenths} must be a number between 1 and 255. Use nocbreak to leave half-delay mode. \end{funcdesc} --- 224,228 ---- However, after blocking for \var{tenths} tenths of seconds, an exception is raised if nothing has been typed. The value of ! \var{tenths} must be a number between 1 and 255. Use \function{nocbreak()} to leave half-delay mode. \end{funcdesc} *************** *** 200,204 **** value between 0 and 1000. When \function{init_color()} is used, all occurrences of that color on the screen immediately change to the new ! definition. \end{funcdesc} --- 235,240 ---- value between 0 and 1000. When \function{init_color()} is used, all occurrences of that color on the screen immediately change to the new ! definition. This function is a no-op on most terminals; it is active ! only if \function{can_change_color()} returns 1. \end{funcdesc} *************** *** 220,236 **** \begin{funcdesc}{isendwin}{} ! Returns true if \function{endwin()} has been called. \end{funcdesc} \begin{funcdesc}{keyname}{k} ! Return the name of the key numbered \var{k}. \end{funcdesc} \begin{funcdesc}{killchar}{} ! Returns the user's current line kill character. \end{funcdesc} \begin{funcdesc}{longname}{} ! Returns a string containing a verbose description of the current terminal. The maximum length of a verbose description is 128 characters. It is defined only after the call to --- 256,280 ---- \begin{funcdesc}{isendwin}{} ! Returns true if \function{endwin()} has been called (that is, the ! curses library has been deinitialized). \end{funcdesc} \begin{funcdesc}{keyname}{k} ! Return the name of the key numbered \var{k}. The name of a key ! generating printable ASCII character is the key's character. The name ! of a control-key combination is a two-character string consisting of a ! caret followed by the corresponding printable ASCII character. The ! name of an alt-key combination (128-255) is a string consisting of the ! prefix `M-' followed by the name of the corresponding ASCII character. \end{funcdesc} \begin{funcdesc}{killchar}{} ! Returns the user's current line kill character. Under Unix operating ! systems this is a property of the controlling tty of the curses ! program, and is not set by the curses library itself. \end{funcdesc} \begin{funcdesc}{longname}{} ! Returns a string containing the terminfo long name field describing the current terminal. The maximum length of a verbose description is 128 characters. It is defined only after the call to *************** *** 239,243 **** \begin{funcdesc}{meta}{yes} ! If \var{yes} is 1, allow 8-bit characters. If \var{yes} is 0, allow only 7-bit chars. \end{funcdesc} --- 283,287 ---- \begin{funcdesc}{meta}{yes} ! If \var{yes} is 1, allow 8-bit characters to be input. If \var{yes} is 0, allow only 7-bit chars. \end{funcdesc} *************** *** 264,281 **** given number of lines and columns. A pad is returned as a window object. - - A pad is like a window, - except that it is not restricted by the screen size, and is not - necessarily associated with a particular part of the screen. - Pads can be used when a large window is needed, and only a part - of the window will be on the screen at one time. Automatic - refreshes of pads (e.g., from scrolling or echoing of - input) do not occur. It is not legal to call wrefresh - with a pad as an argument; the routines prefresh or - pnoutrefresh should be called instead. Note that these - routines require additional parameters to specify the part of - the pad to be displayed and the location on the screen to be - used for the display. \end{funcdesc} --- 308,324 ---- given number of lines and columns. A pad is returned as a window object. + A pad is like a window, except that it is not restricted by the screen + size, and is not necessarily associated with a particular part of the + screen. Pads can be used when a large window is needed, and only a + part of the window will be on the screen at one time. Automatic + refreshes of pads (e.g., from scrolling or echoing of input) do not + occur. The \method{refresh()} and \method{noutrefresh()} methods of a + pad require 6 arguments to specify the part of the pad to be + displayed and the location on the screen to be used for the display. + The arguments are pminrow, pmincol, sminrow, smincol, smaxrow, + smaxcol; the p arguments refer to the upper left corner of the the pad + region to be displayed and the s arguments define a clipping box on + the screen within which the pad region is to be displayed. \end{funcdesc} *************** *** 290,319 **** \begin{funcdesc}{nl}{} ! Enter nl mode. \end{funcdesc} \begin{funcdesc}{nocbreak}{} ! Leave cbreak mode. \end{funcdesc} \begin{funcdesc}{noecho}{} ! Leave echo mode. \end{funcdesc} \begin{funcdesc}{nonl}{} ! Leave nl mode. \end{funcdesc} \begin{funcdesc}{noqiflush}{} ! When the noqiflush routine is used, normal flush of input and ! output queues associated with the INTR, QUIT and SUSP ! characters will not be done. You may want to call ! \function{noqiflush()} in a signal handler if you want output ! to continue as though the interrupt had not occurred, after the ! handler exits. \end{funcdesc} \begin{funcdesc}{noraw}{} ! Leave raw mode. \end{funcdesc} --- 333,370 ---- \begin{funcdesc}{nl}{} ! Enter newline mode. This mode translates the return key into newline ! on input, and translates newline into return and line-feed on output. ! Newline mode is initially on. \end{funcdesc} \begin{funcdesc}{nocbreak}{} ! Leave cbreak mode. Return to normal ``cooked'' mode with line buffering. \end{funcdesc} \begin{funcdesc}{noecho}{} ! Leave echo mode. Echoing of input characters is turned off, \end{funcdesc} \begin{funcdesc}{nonl}{} ! Leave newline mode. Disable translation of return into newline on ! input, and disable low-level translation of newline into ! newline/return on output (but this does not change the behavior of ! addch('\n') which always does the equivalent of return and line feed ! on the virtual screen). With translation off, curses can sometimes speed ! up vertical motion a little; also, it will be able to detect the ! return key on input \end{funcdesc} \begin{funcdesc}{noqiflush}{} ! When the noqiflush routine is used, normal flush of input and ! output queues associated with the INTR, QUIT and SUSP ! characters will not be done. You may want to call ! \function{noqiflush()} in a signal handler if you want output ! to continue as though the interrupt had not occurred, after the ! handler exits. \end{funcdesc} \begin{funcdesc}{noraw}{} ! Leave raw mode. Return to normal ``cooked'' mode with line buffering. \end{funcdesc} *************** *** 330,335 **** \begin{funcdesc}{putp}{string} ! Equivalent to \code{tputs(str, 1, putchar)}. Note that the output of putp always ! goes to standard output. \end{funcdesc} --- 381,387 ---- \begin{funcdesc}{putp}{string} ! Equivalent to \code{tputs(str, 1, putchar)}; emits the value of a ! specified terminfo capability for the current terminal. Note that the ! output of putp always goes to standard output. \end{funcdesc} *************** *** 342,346 **** \begin{funcdesc}{raw}{} ! Enter raw mode. \end{funcdesc} --- 394,401 ---- \begin{funcdesc}{raw}{} ! Enter raw mode. In raw mode, normal line buffering and ! processing of interrupt, quit, suspend, and flow control keys are ! turned off; characters are presented to curses input functions one ! by one. \end{funcdesc} *************** *** 434,437 **** --- 489,493 ---- \ASCII{} code), rather then a Python character (a string of length 1). (This note is true whenever the documentation mentions a character.) + The builtin \function{ord()} is handy for conveying strings to codes. Paint character \var{ch} at \code{(\var{y}, \var{x})} with attributes *************** *** 453,465 **** \begin{methoddesc}{attroff}{attr} ! Turn off attribute \var{attr}. \end{methoddesc} \begin{methoddesc}{attron}{attr} ! Turn on attribute \var{attr}. \end{methoddesc} \begin{methoddesc}{attrset}{attr} ! Set the attributes to \var{attr}. \end{methoddesc} --- 509,524 ---- \begin{methoddesc}{attroff}{attr} ! Remove attribute \var{attr} from the ``background'' set applied to all ! writes to the current window. \end{methoddesc} \begin{methoddesc}{attron}{attr} ! Add attribute \var{attr} from the ``background'' set applied to all ! writes to the current window. \end{methoddesc} \begin{methoddesc}{attrset}{attr} ! Set the ``background'' set of attributes to \var{attr}. This set is ! initially 0 (no attributes). \end{methoddesc} *************** *** 521,525 **** \begin{methoddesc}{clear}{} ! Like \method{erase()}, but also causes the whole screen to be repainted upon next call to \method{refresh()}. \end{methoddesc} --- 580,584 ---- \begin{methoddesc}{clear}{} ! Like \method{erase()}, but also causes the whole window to be repainted upon next call to \method{refresh()}. \end{methoddesc} *************** *** 527,535 **** \begin{methoddesc}{clearok}{yes} If \var{yes} is 1, the next call to \method{refresh()} ! will clear the screen completely. \end{methoddesc} \begin{methoddesc}{clrtobot}{} ! Erase from cursor to the end of the screen: all lines below the cursor are deleted, and then the equivalent of \method{clrtoeol()} is performed. \end{methoddesc} --- 586,594 ---- \begin{methoddesc}{clearok}{yes} If \var{yes} is 1, the next call to \method{refresh()} ! will clear the window completely. \end{methoddesc} \begin{methoddesc}{clrtobot}{} ! Erase from cursor to the end of the window: all lines below the cursor are deleted, and then the equivalent of \method{clrtoeol()} is performed. \end{methoddesc} *************** *** 563,567 **** \begin{methoddesc}{echochar}{ch\optional{, attr}} Add character \var{ch} with attribute \var{attr}, and immediately ! call \method{refresh}. \end{methoddesc} --- 622,626 ---- \begin{methoddesc}{echochar}{ch\optional{, attr}} Add character \var{ch} with attribute \var{attr}, and immediately ! call \method{refresh} on the window. \end{methoddesc} *************** *** 612,616 **** \begin{methoddesc}{getyx}{} ! Return a tuple \code{(\var{y}, \var{x})} of current cursor position. \end{methoddesc} --- 671,676 ---- \begin{methoddesc}{getyx}{} ! Return a tuple \code{(\var{y}, \var{x})} of current cursor position ! relative to the window's upper-left corner. \end{methoddesc} *************** *** 713,723 **** \begin{methoddesc}{leaveok}{yes} ! If \var{yes} is 1, ! cursor is left where it is, instead of being at ``cursor position.'' ! This reduces cursor movement where possible. If possible it will be made ! invisible. ! If \var{yes} is 0, cursor will always be at ! ``cursor position'' after an update. \end{methoddesc} --- 773,782 ---- \begin{methoddesc}{leaveok}{yes} ! If \var{yes} is 1, cursor is left where it is on update, instead of ! being at ``cursor position.'' This reduces cursor movement where ! possible. If possible the cursor will be made invisible. ! If \var{yes} is 0, cursor will always be at ``cursor position'' after ! an update. \end{methoddesc} *************** *** 793,803 **** \begin{methoddesc}{scrollok}{flag} Controls what happens when the cursor of a window is moved off the ! edge of the window or scrolling region, either as a result of a ! newline action on the bottom line, or typing the last character ! of the last line. If \var{flag} is false, the cursor is left ! on the bottom line. If \var{flag} is true, the window is ! scrolled up one line. Note that in order to get the physical ! scrolling effect on the terminal, it is also necessary to call ! \method{idlok()}. \end{methoddesc} --- 852,862 ---- \begin{methoddesc}{scrollok}{flag} Controls what happens when the cursor of a window is moved off the ! edge of the window or scrolling region, either as a result of a ! newline action on the bottom line, or typing the last character ! of the last line. If \var{flag} is false, the cursor is left ! on the bottom line. If \var{flag} is true, the window is ! scrolled up one line. Note that in order to get the physical ! scrolling effect on the terminal, it is also necessary to call ! \method{idlok()}. \end{methoddesc} *************** *** 808,812 **** \begin{methoddesc}{standend}{} ! Turn off all attributes. \end{methoddesc} --- 867,872 ---- \begin{methoddesc}{standend}{} ! Turn off the standout attribute. On some terminals this has the ! side effect of turning off all attributes. \end{methoddesc} *************** *** 1005,1036 **** \begin{tableii}{c|l}{code}{ACS code}{Meaning} \lineii{ACS_BBSS}{} ! \lineii{ACS_BLOCK}{} ! \lineii{ACS_BOARD}{} \lineii{ACS_BSBS}{} \lineii{ACS_BSSB}{} \lineii{ACS_BSSS}{} ! \lineii{ACS_BTEE}{} ! \lineii{ACS_BULLET}{} ! \lineii{ACS_CKBOARD}{} ! \lineii{ACS_DARROW}{} ! \lineii{ACS_DEGREE}{} ! \lineii{ACS_DIAMOND}{} ! \lineii{ACS_GEQUAL}{ (Not available with SGI curses)} ! \lineii{ACS_HLINE}{} ! \lineii{ACS_LANTERN}{} ! \lineii{ACS_LARROW}{} ! \lineii{ACS_LEQUAL}{ (Not available with SGI curses)} ! \lineii{ACS_LLCORNER}{} ! \lineii{ACS_LRCORNER}{} ! \lineii{ACS_LTEE}{} ! \lineii{ACS_NEQUAL}{ (Not available with SGI curses)} ! \lineii{ACS_PI}{ (Not available with SGI curses)} ! \lineii{ACS_PLMINUS}{} ! \lineii{ACS_PLUS}{} ! \lineii{ACS_RARROW}{} ! \lineii{ACS_RTEE}{} ! \lineii{ACS_S1}{} ! \lineii{ACS_S3}{ (Not available with SGI curses)} ! \lineii{ACS_S9}{} \lineii{ACS_SBBS}{} \lineii{ACS_SBSB}{} --- 1065,1097 ---- \begin{tableii}{c|l}{code}{ACS code}{Meaning} \lineii{ACS_BBSS}{} ! \lineii{ACS_BLOCK}{solid square block} ! \lineii{ACS_BOARD}{board of squares} \lineii{ACS_BSBS}{} \lineii{ACS_BSSB}{} \lineii{ACS_BSSS}{} ! \lineii{ACS_BTEE}{bottom tee} ! \lineii{ACS_BULLET}{bullet} ! \lineii{ACS_CKBOARD}{checker board (stipple)} ! \lineii{ACS_DARROW}{arrow pointing down} ! \lineii{ACS_DEGREE}{degree symbol} ! \lineii{ACS_DIAMOND}{diamond} ! \lineii{ACS_GEQUAL}{greater-than-or-equal-to} ! \lineii{ACS_HLINE}{horizontal line} ! \lineii{ACS_LANTERN}{lantern symbol} ! \lineii{ACS_LARROW}{left arrow} ! \lineii{ACS_LEQUAL}{less-than-or-equal-to} ! \lineii{ACS_LLCORNER}{lower left-hand corner} ! \lineii{ACS_LRCORNER}{lower right-hand corner} ! \lineii{ACS_LTEE}{left tee} ! \lineii{ACS_NEQUAL}{not-equal sign} ! \lineii{ACS_PI}{letter pi} ! \lineii{ACS_PLMINUS}{plus-or-minus sign} ! \lineii{ACS_PLUS}{plus sign} ! \lineii{ACS_RARROW}{right arrow} ! \lineii{ACS_RTEE}{right tee} ! \lineii{ACS_S1}{scan line 1} ! \lineii{ACS_S3}{scan line 3} ! \lineii{ACS_S7}{scan line 7} ! \lineii{ACS_S9}{scan line 9} \lineii{ACS_SBBS}{} \lineii{ACS_SBSB}{} *************** *** 1040,1049 **** \lineii{ACS_SSSB}{} \lineii{ACS_SSSS}{} ! \lineii{ACS_STERLING}{ (Not available with SGI curses)} ! \lineii{ACS_TTEE}{} ! \lineii{ACS_UARROW}{} ! \lineii{ACS_ULCORNER}{} ! \lineii{ACS_URCORNER}{} ! \lineii{ACS_VLINE}{} \end{tableii} --- 1101,1110 ---- \lineii{ACS_SSSB}{} \lineii{ACS_SSSS}{} ! \lineii{ACS_STERLING}{pound sterling} ! \lineii{ACS_TTEE}{top tee} ! \lineii{ACS_UARROW}{up arrow} ! \lineii{ACS_ULCORNER}{upper left corner} ! \lineii{ACS_URCORNER}{upper right corner} ! \lineii{ACS_VLINE}{vertical line} \end{tableii} From python-dev@python.org Mon Jul 24 07:55:03 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 23 Jul 2000 23:55:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_support.py,1.6,1.7 Message-ID: <200007240655.XAA10377@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv10365/Lib/test Modified Files: test_support.py Log Message: Restore TestSkipped exception; appears to have disappeared in last checkin. Make both TextFailed and TestSkipped subclasses of Error, which derives from Exception. Docstrings have been added for the exceptions and module. Index: test_support.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_support.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** test_support.py 2000/07/19 17:14:48 1.6 --- test_support.py 2000/07/24 06:55:00 1.7 *************** *** 1,8 **** ! # Python test set -- supporting definitions. - class TestFailed(Exception): - pass verbose = 1 # Flag set to 0 by regrtest.py def unload(name): --- 1,25 ---- ! """Supporting definitions for the Python regression test.""" + class Error(Exception): + """Base class for regression test exceptions.""" + + class TestFailed(Error): + """Test failed.""" + + class TestSkipped(Error): + """Test skipped. + + This can be raised to indicate that a test was deliberatly + skipped, but not because a feature wasn't available. For + example, if some resource can't be used, such as the network + appears to be unavailable, this should be raised instead of + TestFailed. + + """ + + verbose = 1 # Flag set to 0 by regrtest.py + use_large_resources = 1 # Flag set to 0 by regrtest.py def unload(name): From python-dev@python.org Mon Jul 24 11:58:34 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 03:58:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include grammar.h,2.13,2.14 Message-ID: <200007241058.DAA31711@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv31592/Include Modified Files: grammar.h Log Message: Remove function-less prototype (old function that was removed ?) that happens to be a C++ reserved word, too. Index: grammar.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/grammar.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** grammar.h 2000/07/09 00:20:36 2.13 --- grammar.h 2000/07/24 10:58:31 2.14 *************** *** 83,87 **** void addarc(dfa *d, int from, int to, int lbl); dfa *PyGrammar_FindDFA(grammar *g, int type); - char *typename(grammar *g, int lbl); int addlabel(labellist *ll, int type, char *str); --- 83,86 ---- From python-dev@python.org Mon Jul 24 12:09:40 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 04:09:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules cmathmodule.c,2.16,2.17 Message-ID: <200007241109.EAA02817@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2752 Modified Files: cmathmodule.c Log Message: From python-dev@python.org Mon Jul 24 12:16:14 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 13:16:14 +0200 Subject: [Python-checkins] CVS: python/dist/src/Modules cmathmodule.c,2.16,2.17 In-Reply-To: <200007241109.EAA02817@slayer.i.sourceforge.net>; from twouters@users.sourceforge.net on Mon, Jul 24, 2000 at 04:09:40AM -0700 References: <200007241109.EAA02817@slayer.i.sourceforge.net> Message-ID: <20000724131614.A266@xs4all.nl> On Mon, Jul 24, 2000 at 04:09:40AM -0700, Thomas Wouters wrote: > Update of /cvsroot/python/python/dist/src/Modules > In directory slayer.i.sourceforge.net:/tmp/cvs-serv2752 > > Modified Files: > cmathmodule.c > Log Message: Sorry, something went wrong with checking in (bungled the log message, wanted to check on something, tried to cancel it, broke off the sync-mail instead ;P) The log message should have been: 'fix more sneakily hiding prototype-less function declarations.' And the diff this: Index: cmathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cmathmodule.c,v retrieving revision 2.16 retrieving revision 2.17 diff -c -c -r2.16 -r2.17 *** cmathmodule.c 2000/07/21 06:00:07 2.16 --- cmathmodule.c 2000/07/24 11:09:37 2.17 *************** *** 36,44 **** #endif /* forward declarations */ ! staticforward Py_complex c_log(); ! staticforward Py_complex c_prodi(); ! staticforward Py_complex c_sqrt(); static Py_complex c_acos(Py_complex x) --- 36,44 ---- #endif /* forward declarations */ ! staticforward Py_complex c_log(Py_Complex); ! staticforward Py_complex c_prodi(Py_Complex); ! staticforward Py_complex c_sqrt(Py_Complex); static Py_complex c_acos(Py_complex x) That's when I wondered whether I had the capitalization right, and I started bungling ;) -- Thomas Wouters Hi! I'm a .signature virus! copy me into your .signature file to help me spread! From python-dev@python.org Mon Jul 24 12:17:43 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 04:17:43 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules cmathmodule.c,2.17,2.18 Message-ID: <200007241117.EAA06519@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6160 Modified Files: cmathmodule.c Log Message: Fix typo in previous patch. Index: cmathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cmathmodule.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** cmathmodule.c 2000/07/24 11:09:37 2.17 --- cmathmodule.c 2000/07/24 11:17:40 2.18 *************** *** 37,43 **** /* forward declarations */ ! staticforward Py_complex c_log(Py_Complex); ! staticforward Py_complex c_prodi(Py_Complex); ! staticforward Py_complex c_sqrt(Py_Complex); --- 37,43 ---- /* forward declarations */ ! staticforward Py_complex c_log(Py_complex); ! staticforward Py_complex c_prodi(Py_complex); ! staticforward Py_complex c_sqrt(Py_complex); From python-dev@python.org Mon Jul 24 12:26:29 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 04:26:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules timemodule.c,2.93,2.94 Message-ID: <200007241126.EAA11550@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv11290 Modified Files: timemodule.c Log Message: ANSIfy yet another hidden function definition. Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.93 retrieving revision 2.94 diff -C2 -r2.93 -r2.94 *** timemodule.c 2000/07/22 23:57:55 2.93 --- timemodule.c 2000/07/24 11:26:25 2.94 *************** *** 710,719 **** static int - #ifdef MPW floatsleep(double secs) - #else - floatsleep(secs) - double secs; - #endif /* MPW */ { /* XXX Should test for MS_WIN32 first! */ --- 710,714 ---- From python-dev@python.org Mon Jul 24 12:36:50 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 04:36:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules cPickle.c,2.46,2.47 Message-ID: <200007241136.EAA13366@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv13358 Modified Files: cPickle.c Log Message: ... and yet more ANSIfications... Index: cPickle.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** cPickle.c 2000/07/22 23:56:07 2.46 --- cPickle.c 2000/07/24 11:36:47 2.47 *************** *** 135,141 **** *copy_reg_str, *dispatch_table_str, *safe_constructors_str, *empty_str; - static int save(); - static int put2(); - #ifndef PyList_SET_ITEM #define PyList_SET_ITEM(op, i, v) (((PyListObject *)(op))->ob_item[i] = (v)) --- 135,138 ---- *************** *** 354,357 **** --- 351,358 ---- staticforward PyTypeObject Unpicklertype; + + /* Forward decls that need the above structs */ + static int save(Picklerobject *, PyObject *, int); + static int put2(Picklerobject *, PyObject *); int From python-dev@python.org Mon Jul 24 15:39:52 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 07:39:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python thread.c,2.32,2.33 Message-ID: <200007241439.HAA22848@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv22818/Python Modified Files: thread.c Log Message: Prototype yet another forward declaration. Index: thread.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread.c,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -r2.32 -r2.33 *** thread.c 2000/07/22 18:47:25 2.32 --- thread.c 2000/07/24 14:39:50 2.33 *************** *** 86,90 **** static int initialized; ! static void PyThread__init_thread(); /* Forward */ void PyThread_init_thread(void) --- 86,90 ---- static int initialized; ! static void PyThread__init_thread(void); /* Forward */ void PyThread_init_thread(void) From python-dev@python.org Mon Jul 24 15:43:38 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 07:43:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules bsddbmodule.c,1.22,1.23 _tkinter.c,1.108,1.109 cPickle.c,2.47,2.48 cStringIO.c,2.23,2.24 dbmmodule.c,2.20,2.21 gdbmmodule.c,2.25,2.26 sunaudiodev.c,1.22,1.23 timemodule.c,2.94,2.95 Message-ID: <200007241443.HAA23137@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv23116 Modified Files: bsddbmodule.c _tkinter.c cPickle.c cStringIO.c dbmmodule.c gdbmmodule.c sunaudiodev.c timemodule.c Log Message: ANSIfy some more forward declarations. Index: bsddbmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/bsddbmodule.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** bsddbmodule.c 2000/07/10 17:06:38 1.22 --- bsddbmodule.c 2000/07/24 14:43:34 1.23 *************** *** 787,791 **** DL_EXPORT(void) ! initbsddb() { PyObject *m, *d; --- 787,791 ---- DL_EXPORT(void) ! initbsddb(void) { PyObject *m, *d; Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -r1.108 -r1.109 *** _tkinter.c 2000/07/21 06:00:07 1.108 --- _tkinter.c 2000/07/24 14:43:34 1.109 *************** *** 434,439 **** */ ! static void EnableEventHook(); /* Forward */ ! static void DisableEventHook(); /* Forward */ static TkappObject * --- 434,439 ---- */ ! static void EnableEventHook(void); /* Forward */ ! static void DisableEventHook(void); /* Forward */ static TkappObject * Index: cPickle.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v retrieving revision 2.47 retrieving revision 2.48 diff -C2 -r2.47 -r2.48 *** cPickle.c 2000/07/24 11:36:47 2.47 --- cPickle.c 2000/07/24 14:43:34 2.48 *************** *** 181,185 **** static PyObject * ! Pdata_New() { Pdata *self; --- 181,185 ---- static PyObject * ! Pdata_New(void) { Pdata *self; *************** *** 194,198 **** static int ! stackUnderflow() { PyErr_SetString(UnpicklingError, "unpickling stack underflow"); return -1; --- 194,198 ---- static int ! stackUnderflow(void) { PyErr_SetString(UnpicklingError, "unpickling stack underflow"); return -1; *************** *** 2419,2423 **** static int ! bad_readline() { PyErr_SetString(UnpicklingError, "pickle data was truncated"); return -1; --- 2419,2423 ---- static int ! bad_readline(void) { PyErr_SetString(UnpicklingError, "pickle data was truncated"); return -1; *************** *** 4517,4521 **** #endif DL_EXPORT(void) ! initcPickle() { PyObject *m, *d, *v; char *rev="1.71"; --- 4517,4521 ---- #endif DL_EXPORT(void) ! initcPickle(void) { PyObject *m, *d, *v; char *rev="1.71"; Index: cStringIO.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cStringIO.c,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** cStringIO.c 2000/07/16 12:04:31 2.23 --- cStringIO.c 2000/07/24 14:43:35 2.24 *************** *** 640,644 **** #endif DL_EXPORT(void) ! initcStringIO() { PyObject *m, *d, *v; --- 640,644 ---- #endif DL_EXPORT(void) ! initcStringIO(void) { PyObject *m, *d, *v; Index: dbmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/dbmmodule.c,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -r2.20 -r2.21 *** dbmmodule.c 2000/07/10 17:06:38 2.20 --- dbmmodule.c 2000/07/24 14:43:35 2.21 *************** *** 273,277 **** DL_EXPORT(void) ! initdbm() { PyObject *m, *d; --- 273,277 ---- DL_EXPORT(void) ! initdbm(void) { PyObject *m, *d; Index: gdbmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gdbmmodule.c,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** gdbmmodule.c 2000/07/08 05:00:07 2.25 --- gdbmmodule.c 2000/07/24 14:43:35 2.26 *************** *** 475,479 **** DL_EXPORT(void) ! initgdbm() { PyObject *m, *d; --- 475,479 ---- DL_EXPORT(void) ! initgdbm(void) { PyObject *m, *d; Index: sunaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/sunaudiodev.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** sunaudiodev.c 2000/07/21 06:00:07 1.22 --- sunaudiodev.c 2000/07/24 14:43:35 1.23 *************** *** 52,56 **** staticforward PyTypeObject Sadtype; staticforward PyTypeObject Sadstatustype; ! static sadstatusobject *sads_alloc(); /* Forward */ static PyObject *SunAudioError; --- 52,56 ---- staticforward PyTypeObject Sadtype; staticforward PyTypeObject Sadstatustype; ! static sadstatusobject *sads_alloc(void); /* Forward */ static PyObject *SunAudioError; *************** *** 365,369 **** static sadstatusobject * ! sads_alloc() { return PyObject_New(sadstatusobject, &Sadstatustype); } --- 365,369 ---- static sadstatusobject * ! sads_alloc(void) { return PyObject_New(sadstatusobject, &Sadstatustype); } Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.94 retrieving revision 2.95 diff -C2 -r2.94 -r2.95 *** timemodule.c 2000/07/24 11:26:25 2.94 --- timemodule.c 2000/07/24 14:43:35 2.95 *************** *** 92,96 **** /* Forward declarations */ static int floatsleep(double); ! static double floattime(); /* For Y2K check */ --- 92,96 ---- /* Forward declarations */ static int floatsleep(double); ! static double floattime(double); /* For Y2K check */ From python-dev@python.org Mon Jul 24 16:26:42 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 08:26:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules timemodule.c,2.95,2.96 Message-ID: <200007241526.IAA06892@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6847/Modules Modified Files: timemodule.c Log Message: Fix floattime prototype ((void), not (double)) Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.95 retrieving revision 2.96 diff -C2 -r2.95 -r2.96 *** timemodule.c 2000/07/24 14:43:35 2.95 --- timemodule.c 2000/07/24 15:26:39 2.96 *************** *** 92,96 **** /* Forward declarations */ static int floatsleep(double); ! static double floattime(double); /* For Y2K check */ --- 92,96 ---- /* Forward declarations */ static int floatsleep(double); ! static double floattime(void); /* For Y2K check */ From python-dev@python.org Mon Jul 24 16:49:11 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 08:49:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules parsermodule.c,2.48,2.49 Message-ID: <200007241549.IAA08137@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8108/Modules Modified Files: parsermodule.c Log Message: ANSIfy a bit more. Index: parsermodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v retrieving revision 2.48 retrieving revision 2.49 diff -C2 -r2.48 -r2.49 *** parsermodule.c 2000/07/22 23:57:55 2.48 --- parsermodule.c 2000/07/24 15:49:08 2.49 *************** *** 2634,2638 **** DL_EXPORT(void) ! initparser() { PyObject* module; --- 2634,2638 ---- DL_EXPORT(void) ! initparser(void) { PyObject* module; From python-dev@python.org Mon Jul 24 17:02:03 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 24 Jul 2000 09:02:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/freeze README,1.7,1.8 win32.html,1.1,1.2 Message-ID: <200007241602.JAA14867@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/freeze In directory slayer.i.sourceforge.net:/tmp/cvs-serv12925 Modified Files: README win32.html Log Message: change some occurence of python15.dll to python20.dll closes patch #100956 Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/freeze/README,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** README 1998/08/25 14:06:50 1.7 --- README 2000/07/24 16:02:00 1.8 *************** *** 144,148 **** WARNING: the resulting executable is not self-contained; it requires ! the Python DLL, currently PYTHON15.DLL (it does not require the standard library of .py files though). It may also require one or more extension modules loaded from .DLL or .PYD files; the module --- 144,148 ---- WARNING: the resulting executable is not self-contained; it requires ! the Python DLL, currently PYTHON20.DLL (it does not require the standard library of .py files though). It may also require one or more extension modules loaded from .DLL or .PYD files; the module *************** *** 158,166 **** In order for this to work, you must have built Python using the VC++ (Developer Studio) 5.0 compiler. The provided project builds ! python15.lib in the subdirectory pcbuild\Release of thje Python source tree, and this is where the generated Makefile expects it to be. If this is not the case, you can edit the Makefile or (probably better) winmakemakefile.py (e.g., if you are using the 4.2 compiler, the ! python15.lib file is generated in the subdirectory vc40 of the Python source tree). --- 158,166 ---- In order for this to work, you must have built Python using the VC++ (Developer Studio) 5.0 compiler. The provided project builds ! python20.lib in the subdirectory pcbuild\Release of thje Python source tree, and this is where the generated Makefile expects it to be. If this is not the case, you can edit the Makefile or (probably better) winmakemakefile.py (e.g., if you are using the 4.2 compiler, the ! python20.lib file is generated in the subdirectory vc40 of the Python source tree). Index: win32.html =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/freeze/win32.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** win32.html 1998/05/19 20:18:37 1.1 --- win32.html 2000/07/24 16:02:00 1.2 *************** *** 18,26 ****

    The person freezing the program has control over what external DLLs are required by a frozen program. The following dependencies are supported:

    Minimal frozen programs

    !

    These programs freeze only .py files in your program. All external DLLs are required at run-time. This includes all .pyd/.dll modules used by your program, Python15.dll, and msvcrt.dll.

    A small Python program would typically create a .EXE around 300kb.

    Frozen Extension programs

    Note: For Python1.5.1, you must get a patch from Guido to import.c for this to work.

    !

    These programs also freeze in the sources from all .pyd and .dll files used at runtime. This means the resulting .EXE is only dependent on Python15.dll and msvcrt.dll.

    A small Python program using win32api, win32con and one or 2 other win32 extensions would typically create a .EXE around 400kb.

    Completely frozen programs

    --- 18,26 ----

    The person freezing the program has control over what external DLLs are required by a frozen program. The following dependencies are supported:

    Minimal frozen programs

    !

    These programs freeze only .py files in your program. All external DLLs are required at run-time. This includes all .pyd/.dll modules used by your program, Python20.dll, and msvcrt.dll.

    A small Python program would typically create a .EXE around 300kb.

    Frozen Extension programs

    Note: For Python1.5.1, you must get a patch from Guido to import.c for this to work.

    !

    These programs also freeze in the sources from all .pyd and .dll files used at runtime. This means the resulting .EXE is only dependent on Python20.dll and msvcrt.dll.

    A small Python program using win32api, win32con and one or 2 other win32 extensions would typically create a .EXE around 400kb.

    Completely frozen programs

    *************** *** 110,114 ****

    This is a standard Python demo in the Win32 extensions. It can be found in the "win32\demos\service" directory.

    Command Line used

    !

    This will create a native NT Service EXE, dependent only on the main Python15.dll. All other modules are built-in to the final .EXE

    --- 110,114 ----

    This is a standard Python demo in the Win32 extensions. It can be found in the "win32\demos\service" directory.

    Command Line used

    !

    This will create a native NT Service EXE, dependent only on the main Python20.dll. All other modules are built-in to the final .EXE

    From python-dev@python.org Mon Jul 24 17:06:25 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 09:06:25 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.160,2.161 resource.c,2.15,2.16 socketmodule.c,1.120,1.121 Message-ID: <200007241606.JAA16200@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8962/Modules Modified Files: posixmodule.c resource.c socketmodule.c Log Message: Create a new section of pyport.h to hold all external function declarations for systems that are missing those declarations from system include files. Start by moving a pointy-haired ones from their previous locations to the new section. (The gethostname() one, for instance, breaks on several systems, because some define it as (char *, size_t) and some as (char *, int).) I purposely decided not to include the summary of used #defines like Tim did in the first section of pyport.h. In my opinion, the number of #defines likedly to be used by this section would make such an overview unwieldy. I would suggest documenting the non-obvious ones, though. Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.160 retrieving revision 2.161 diff -C2 -r2.160 -r2.161 *** posixmodule.c 2000/07/23 19:47:12 2.160 --- posixmodule.c 2000/07/24 16:06:23 2.161 *************** *** 129,140 **** #endif ! #ifdef HAVE_UNISTD_H ! /* XXX These are for SunOS4.1.3 but shouldn't hurt elsewhere */ ! extern int rename(const char *, const char *); ! extern int pclose(FILE *); ! extern int lstat(const char *, struct stat *); ! extern int symlink(const char *, const char *); ! extern int fsync(int fd); ! #else /* !HAVE_UNISTD_H */ #if defined(PYCC_VACPP) extern int mkdir(char *); --- 129,133 ---- #endif ! #ifndef HAVE_UNISTD_H #if defined(PYCC_VACPP) extern int mkdir(char *); *************** *** 722,727 **** does not force update of metadata."; - extern int fdatasync(int); /* Prototype just in case */ - static PyObject * posix_fdatasync(PyObject *self, PyObject *args) --- 715,718 ---- *************** *** 1681,1690 **** #ifdef HAVE_LIBUTIL_H #include - #else - /* BSDI does not supply a prototype for the 'openpty' and 'forkpty' - functions, even though they are included in libutil. */ - #include - extern int openpty(int *, int *, char *, struct termios *, struct winsize *); - extern int forkpty(int *, char *, struct termios *, struct winsize *); #endif /* HAVE_LIBUTIL_H */ #endif /* HAVE_PTY_H */ --- 1672,1675 ---- *************** *** 1702,1707 **** #ifndef HAVE_OPENPTY char * slave_name; - /* SGI apparently needs this forward declaration */ - extern char * _getpty(int *, int, mode_t, int); #endif --- 1687,1690 ---- *************** *** 1720,1724 **** if (slave_fd < 0) return posix_error(); ! #endif /* defined(HAVE_OPENPTY) */ return Py_BuildValue("(ii)", master_fd, slave_fd); --- 1703,1707 ---- if (slave_fd < 0) return posix_error(); ! #endif /* HAVE_OPENPTY */ return Py_BuildValue("(ii)", master_fd, slave_fd); *************** *** 3287,3291 **** posix_fdopen(PyObject *self, PyObject *args) { - extern int fclose(FILE *); int fd; char *mode = "r"; --- 3270,3273 ---- Index: resource.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/resource.c,v retrieving revision 2.15 retrieving revision 2.16 diff -C2 -r2.15 -r2.16 *** resource.c 2000/07/21 06:00:07 2.15 --- resource.c 2000/07/24 16:06:23 2.16 *************** *** 23,30 **** when the header files declare it different. Worse, on some Linuxes, getpagesize() returns a size_t... */ - #ifndef linux - int getrusage(); - int getpagesize(); - #endif #define doubletime(TV) ((double)(TV).tv_sec + (TV).tv_usec * 0.000001) --- 23,26 ---- Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.120 retrieving revision 1.121 diff -C2 -r1.120 -r1.121 *** socketmodule.c 2000/07/24 01:45:11 1.120 --- socketmodule.c 2000/07/24 16:06:23 1.121 *************** *** 111,118 **** #endif - #if !defined(MS_WINDOWS) && !defined(PYOS_OS2) && !defined(__BEOS__) - extern int gethostname(char *, size_t); /* For Solaris, at least */ - #endif - #if defined(PYCC_VACPP) #include --- 111,114 ---- *************** *** 130,138 **** #endif - #if defined(__BEOS__) - /* It's in the libs, but not the headers... - [cjh] */ - int shutdown( int, int ); - #endif - #include #include "mytime.h" --- 126,129 ---- *************** *** 2408,2414 **** DL_EXPORT(void) #if defined(MS_WINDOWS) || defined(PYOS_OS2) || defined(__BEOS__) ! init_socket() #else ! initsocket() #endif { --- 2399,2405 ---- DL_EXPORT(void) #if defined(MS_WINDOWS) || defined(PYOS_OS2) || defined(__BEOS__) ! init_socket(void) #else ! initsocket(void) #endif { From python-dev@python.org Mon Jul 24 17:06:26 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 09:06:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include pyport.h,2.5,2.6 Message-ID: <200007241606.JAA16201@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv8962/Include Modified Files: pyport.h Log Message: Create a new section of pyport.h to hold all external function declarations for systems that are missing those declarations from system include files. Start by moving a pointy-haired ones from their previous locations to the new section. (The gethostname() one, for instance, breaks on several systems, because some define it as (char *, size_t) and some as (char *, int).) I purposely decided not to include the summary of used #defines like Tim did in the first section of pyport.h. In my opinion, the number of #defines likedly to be used by this section would make such an overview unwieldy. I would suggest documenting the non-obvious ones, though. Index: pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** pyport.h 2000/07/23 21:18:08 2.5 --- pyport.h 2000/07/24 16:06:23 2.6 *************** *** 75,78 **** --- 75,140 ---- #endif + + + /************************************************************************** + Prototypes that are missing from the standard include files on some systems + (and possibly only some versions of such systems.) + + Please be conservative with adding new ones, document them and enclose them + in platform-specific #ifdefs. + **************************************************************************/ + + #ifdef SOLARIS + /* Unchecked */ + extern int gethostname(char *, int); + #endif + + #ifdef __BEOS__ + /* Unchecked */ + /* It's in the libs, but not the headers... - [cjh] */ + int shutdown( int, int ); + #endif + + #ifdef HAVE__GETPTY + /* Unchecked */ + extern char * _getpty(int *, int, mode_t, int); + #endif + + #if defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) + #if !defined(HAVE_PTY_H) && !defined(HAVE_LIBUTIL_H) + /* BSDI does not supply a prototype for the 'openpty' and 'forkpty' + functions, even though they are included in libutil. */ + #include + extern int openpty(int *, int *, char *, struct termios *, struct winsize *); + extern int forkpty(int *, char *, struct termios *, struct winsize *); + #endif /* !defined(HAVE_PTY_H) && !defined(HAVE_LIBUTIL_H) */ + #endif /* defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) */ + + + /* These are pulled from various places. It isn't obvious on what platforms + they are necessary, nor what the exact prototype should look like (which + is likely to vary between platforms!) If you find you need one of these + declarations, please move them to a platform-specific block and include + proper prototypes. */ + #if 0 + + /* From Modules/resource.c */ + extern int getrusage(); + extern int getpagesize(); + + /* From Python/sysmodule.c and Modules/posixmodule.c */ + extern int fclose(FILE *); + + /* From Modules/posixmodule.c */ + extern int fdatasync(int); + /* XXX These are supposedly for SunOS4.1.3 but "shouldn't hurt elsewhere" */ + extern int rename(const char *, const char *); + extern int pclose(FILE *); + extern int lstat(const char *, struct stat *); + extern int symlink(const char *, const char *); + extern int fsync(int fd); + + #endif /* 0 */ + #ifdef __cplusplus } From python-dev@python.org Mon Jul 24 17:06:25 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 09:06:25 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python sysmodule.c,2.70,2.71 Message-ID: <200007241606.JAA16199@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv8962/Python Modified Files: sysmodule.c Log Message: Create a new section of pyport.h to hold all external function declarations for systems that are missing those declarations from system include files. Start by moving a pointy-haired ones from their previous locations to the new section. (The gethostname() one, for instance, breaks on several systems, because some define it as (char *, size_t) and some as (char *, int).) I purposely decided not to include the summary of used #defines like Tim did in the first section of pyport.h. In my opinion, the number of #defines likedly to be used by this section would make such an overview unwieldy. I would suggest documenting the non-obvious ones, though. Index: sysmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v retrieving revision 2.70 retrieving revision 2.71 diff -C2 -r2.70 -r2.71 *** sysmodule.c 2000/07/22 18:47:25 2.70 --- sysmodule.c 2000/07/24 16:06:23 2.71 *************** *** 386,390 **** _PySys_Init(void) { - extern int fclose(FILE *); PyObject *m, *v, *sysdict; PyObject *sysin, *sysout, *syserr; --- 386,389 ---- From python-dev@python.org Mon Jul 24 17:26:37 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 24 Jul 2000 09:26:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.121,1.122 Message-ID: <200007241626.JAA17570@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv17514/Modules Modified Files: socketmodule.c Log Message: Remove unused variable and what looks like an ancient relic of an old version of SSLeay (now known as OpenSSL.) Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.121 retrieving revision 1.122 diff -C2 -r1.121 -r1.122 *** socketmodule.c 2000/07/24 16:06:23 1.121 --- socketmodule.c 2000/07/24 16:26:35 1.122 *************** *** 1978,1988 **** { SSLObject *self; - char *str; - - #if 0 - meth=SSLv23_client_method(); - meth=SSLv3_client_method(); - meth=SSLv2_client_method(); - #endif self = PyObject_New(SSLObject, &SSL_Type); /* Create new object */ --- 1978,1981 ---- From python-dev@python.org Mon Jul 24 18:38:01 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 24 Jul 2000 10:38:01 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.8,1.9 Message-ID: <200007241738.KAA28560@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv28548 Modified Files: pep-0000.txt Log Message: Added PEP 214, Extended Print Statement, owned by bwarsaw Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** pep-0000.txt 2000/07/21 20:03:17 1.8 --- pep-0000.txt 2000/07/24 17:37:59 1.9 *************** *** 33,36 **** --- 33,37 ---- 212 pep-0212.txt Additional Builtin Generators bwarsaw 213 pep-0213.txt Attribute Access Handlers prescod + 214 pep-0214.txt Extended Print Statement bwarsaw From python-dev@python.org Mon Jul 24 18:38:37 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 24 Jul 2000 10:38:37 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0214.txt,NONE,1.1 Message-ID: <200007241738.KAA28596@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv28587 Added Files: pep-0214.txt Log Message: PEP 214, Extended Print Statement, owned by bwarsaw ***** Error reading new file(2, 'No such file or directory') From python-dev@python.org Mon Jul 24 18:40:03 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 24 Jul 2000 10:40:03 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.3,1.4 Message-ID: <200007241740.KAA28746@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv28717 Modified Files: pep-0201.txt Log Message: Added a few more open issues: - what should "zip()" do (i.e. zip with no arguments). - should zip() be included in the builtins? - the padtuple proposal Index: pep-0201.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** pep-0201.txt 2000/07/19 04:19:54 1.3 --- pep-0201.txt 2000/07/24 17:40:00 1.4 *************** *** 126,130 **** nor will zip() ever raise an exception with lists of different lengths. To accomplish either behavior, the sequences must be ! checked and processed before the call to zip(). --- 126,131 ---- nor will zip() ever raise an exception with lists of different lengths. To accomplish either behavior, the sequences must be ! checked and processed before the call to zip() -- but see the Open ! Issues below for more discussion. *************** *** 391,394 **** --- 392,403 ---- Current scoring seems to generally favor outcome 1. + - What should "zip()" do? + + Along similar lines, zip() with no arguments (or zip() with just + a pad argument) can have ambiguous semantics. Should this + return no elements or an infinite number? For these reaons, + raising a TypeError exception in this case makes the most + sense. + - The name of the built-in `zip' may cause some initial confusion with the zip compression algorithm. Other suggestions include *************** *** 399,402 **** --- 408,429 ---- with `zip' because the same functionality is available in other languages (e.g. Haskell) under the name `zip'[2]. + + - Should zip() be including in the builtins module or should it be + in a separate generators module (possibly with other candidate + functions like irange())? + + - Padding short sequences with different values. A suggestion has + been made to allow a `padtuple' (probably better called `pads' + or `padseq') argument similar to `pad'. This sequence must have + a length equal to the number of sequences given. It is a + sequence of the individual pad values to use for each sequence, + should it be shorter than the maximum length. + + One problem is what to do if `padtuple' itself isn't of the + right length? A TypeError seems to be the only choice here. + + How does `pad' and `padtuple' interact? Perhaps if padtuple + were too short, it could use pad as a fallback. padtuple would + always override pad if both were given. From python-dev@python.org Mon Jul 24 20:01:57 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 24 Jul 2000 12:01:57 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0215.txt,NONE,1.1 Message-ID: <200007241901.MAA12167@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv12050 Added Files: pep-0215.txt Log Message: Added PEP 215, String Interpolation, owned by ping ***** Error reading new file(2, 'No such file or directory') From python-dev@python.org Mon Jul 24 20:01:29 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 24 Jul 2000 12:01:29 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.9,1.10 Message-ID: <200007241901.MAA11170@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv10948 Modified Files: pep-0000.txt Log Message: Added PEP 215, String Interpolation, owned by ping Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** pep-0000.txt 2000/07/24 17:37:59 1.9 --- pep-0000.txt 2000/07/24 19:01:22 1.10 *************** *** 34,37 **** --- 34,38 ---- 213 pep-0213.txt Attribute Access Handlers prescod 214 pep-0214.txt Extended Print Statement bwarsaw + 215 pep-0215.txt String Interpolation ping From python-dev@python.org Mon Jul 24 20:19:46 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 24 Jul 2000 12:19:46 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html index.html,1.3,1.4 Message-ID: <200007241919.MAA17242@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv17232 Modified Files: index.html Log Message: Added trailing / to URLs pointing to directories -- saves a roundtrip and avoids showing seen links as unseen. Index: index.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/index.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** index.html 2000/07/22 02:53:10 1.3 --- index.html 2000/07/24 19:19:43 1.4 *************** *** 15,21 **** alt="SourceForge" border="0" height="79" width="124" />

    ! Python Project Page - CVS repository,  Python Developers and the Patch Manager.
    ! Python Enhancement Proposals - Information on new language features
    Python at SourceForge FAQ - Tips on CVS, SSH and --- 15,21 ---- alt="SourceForge" border="0" height="79" width="124" /> ! Python Project Page - CVS repository,  Python Developers and the Patch Manager.
    ! Python Enhancement Proposals - Information on new language features
    Python at SourceForge FAQ - Tips on CVS, SSH and From python-dev@python.org Mon Jul 24 20:33:52 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 24 Jul 2000 12:33:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcodecs.tex,1.2,1.3 Message-ID: <200007241933.MAA18322@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv18311/lib Modified Files: libcodecs.tex Log Message: Fix small typos and markup consistency nits. Index: libcodecs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcodecs.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libcodecs.tex 2000/04/06 16:09:59 1.2 --- libcodecs.tex 2000/07/24 19:33:49 1.3 *************** *** 66,76 **** also defines these utility functions: ! \begin{funcdesc}{open}{filename, mode\optional{, encoding=None\optional{, errors='strict'\optional{, buffering=1}}}} Open an encoded file using the given \var{mode} and return a wrapped version providing transparent encoding/decoding. \strong{Note:} The wrapped version will only accept the object format ! defined by the codecs, i.e. Unicode objects for most builtin ! codecs. Output is also codec dependent and will usually by Unicode as well. --- 66,77 ---- also defines these utility functions: ! \begin{funcdesc}{open}{filename, mode\optional{, encoding\optional{, ! errors\optional{, buffering}}}} Open an encoded file using the given \var{mode} and return a wrapped version providing transparent encoding/decoding. \strong{Note:} The wrapped version will only accept the object format ! defined by the codecs, i.e.\ Unicode objects for most built-in ! codecs. Output is also codec-dependent and will usually be Unicode as well. *************** *** 79,84 **** \var{errors} may be given to define the error handling. It defaults ! to 'strict' which causes a \exception{ValueError} to be raised in case ! an encoding error occurs. \var{buffering} has the same meaning as for the built-in --- 80,85 ---- \var{errors} may be given to define the error handling. It defaults ! to \code{'strict'} which causes a \exception{ValueError} to be raised ! in case an encoding error occurs. \var{buffering} has the same meaning as for the built-in *************** *** 86,91 **** \end{funcdesc} ! \begin{funcdesc}{EncodedFile}{file, input\optional{, output=None\optional{, errors='strict'}}} ! Return a wrapped version of file which provides transparent encoding translation. --- 87,92 ---- \end{funcdesc} ! \begin{funcdesc}{EncodedFile}{file, input\optional{, ! output\optional{, errors}}} Return a wrapped version of file which provides transparent encoding translation. *************** *** 93,103 **** Strings written to the wrapped file are interpreted according to the given \var{input} encoding and then written to the original file as ! string using the \var{output} encoding. The intermediate encoding will usually be Unicode but depends on the specified codecs. ! If \var{output} is not given, it defaults to input. \var{errors} may be given to define the error handling. It defaults to ! 'strict' which causes \exception{ValueError} to be raised in case an encoding error occurs. \end{funcdesc} --- 94,104 ---- Strings written to the wrapped file are interpreted according to the given \var{input} encoding and then written to the original file as ! strings using the \var{output} encoding. The intermediate encoding will usually be Unicode but depends on the specified codecs. ! If \var{output} is not given, it defaults to \var{input}. \var{errors} may be given to define the error handling. It defaults to ! \code{'strict'}, which causes \exception{ValueError} to be raised in case an encoding error occurs. \end{funcdesc} From python-dev@python.org Mon Jul 24 20:35:54 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 24 Jul 2000 12:35:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcurses.tex,1.9,1.10 Message-ID: <200007241935.MAA18556@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv18548/lib Modified Files: libcurses.tex Log Message: Fix small typos and markup consistency nits. Index: libcurses.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** libcurses.tex 2000/07/24 03:28:40 1.9 --- libcurses.tex 2000/07/24 19:35:52 1.10 *************** *** 22,26 **** settings.} \seemodule{curses.textbox}{Editable text widget for curses supporting ! Emacs-like bindings.} \seetext{Tutorial material on using curses with Python is available on the Python Web site as Andrew Kuchling's --- 22,26 ---- settings.} \seemodule{curses.textbox}{Editable text widget for curses supporting ! Emacs-like bindings.} \seetext{Tutorial material on using curses with Python is available on the Python Web site as Andrew Kuchling's *************** *** 350,357 **** input, and disable low-level translation of newline into newline/return on output (but this does not change the behavior of ! addch('\n') which always does the equivalent of return and line feed ! on the virtual screen). With translation off, curses can sometimes speed ! up vertical motion a little; also, it will be able to detect the ! return key on input \end{funcdesc} --- 350,357 ---- input, and disable low-level translation of newline into newline/return on output (but this does not change the behavior of ! \code{addch('\e n')}, which always does the equivalent of return and ! line feed on the virtual screen). With translation off, curses can ! sometimes speed up vertical motion a little; also, it will be able to ! detect the return key on input. \end{funcdesc} From python-dev@python.org Mon Jul 24 23:35:13 2000 From: python-dev@python.org (Fredrik Lundh) Date: Mon, 24 Jul 2000 15:35:13 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_re,1.10,1.11 Message-ID: <200007242235.PAA28623@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv28481/Lib/test/output Modified Files: test_re Log Message: -- updated to include known problems in SRE 0.9.6 (cf. test/output/test_sre) Index: test_re =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_re,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** test_re 1997/07/17 22:37:07 1.10 --- test_re 2000/07/24 22:35:11 1.11 *************** *** 1,415 **** test_re ! ('abc', 'abc', 0, 'found', 'abc') ! ('abc', 'xbc', 1) ! ('abc', 'axc', 1) ! ('abc', 'abx', 1) ! ('abc', 'xabcy', 0, 'found', 'abc') ! ('abc', 'ababc', 0, 'found', 'abc') ! ('ab*c', 'abc', 0, 'found', 'abc') ! ('ab*bc', 'abc', 0, 'found', 'abc') ! ('ab*bc', 'abbc', 0, 'found', 'abbc') ! ('ab*bc', 'abbbbc', 0, 'found', 'abbbbc') ! ('ab+bc', 'abbc', 0, 'found', 'abbc') ! ('ab+bc', 'abc', 1) ! ('ab+bc', 'abq', 1) ! ('ab+bc', 'abbbbc', 0, 'found', 'abbbbc') ! ('ab?bc', 'abbc', 0, 'found', 'abbc') ! ('ab?bc', 'abc', 0, 'found', 'abc') ! ('ab?bc', 'abbbbc', 1) ! ('ab?c', 'abc', 0, 'found', 'abc') ! ('^abc$', 'abc', 0, 'found', 'abc') ! ('^abc$', 'abcc', 1) ! ('^abc', 'abcc', 0, 'found', 'abc') ! ('^abc$', 'aabc', 1) ! ('abc$', 'aabc', 0, 'found', 'abc') ! ('^', 'abc', 0, 'found+"-"', '-') ! ('$', 'abc', 0, 'found+"-"', '-') ! ('a.c', 'abc', 0, 'found', 'abc') ! ('a.c', 'axc', 0, 'found', 'axc') ! ('a.*c', 'axyzc', 0, 'found', 'axyzc') ! ('a.*c', 'axyzd', 1) ! ('a[bc]d', 'abc', 1) ! ('a[bc]d', 'abd', 0, 'found', 'abd') ! ('a[b-d]e', 'abd', 1) ! ('a[b-d]e', 'ace', 0, 'found', 'ace') ! ('a[b-d]', 'aac', 0, 'found', 'ac') ! ('a[-b]', 'a-', 0, 'found', 'a-') ! ('a[\\-b]', 'a-', 0, 'found', 'a-') ! ('a[b-]', 'a-', 2) ! ('a[]b', '-', 2) ! ('a[', '-', 2) ! ('a\\', '-', 2) ! ('abc)', '-', 2) ! ('(abc', '-', 2) ! ('a]', 'a]', 0, 'found', 'a]') ! ('a[]]b', 'a]b', 0, 'found', 'a]b') ! ('a[\\]]b', 'a]b', 0, 'found', 'a]b') ! ('a[^bc]d', 'aed', 0, 'found', 'aed') ! ('a[^bc]d', 'abd', 1) ! ('a[^-b]c', 'adc', 0, 'found', 'adc') ! ('a[^-b]c', 'a-c', 1) ! ('a[^]b]c', 'a]c', 1) ! ('a[^]b]c', 'adc', 0, 'found', 'adc') ! ('\\ba\\b', 'a-', 0, '"-"', '-') ! ('\\ba\\b', '-a', 0, '"-"', '-') ! ('\\ba\\b', '-a-', 0, '"-"', '-') ! ('\\by\\b', 'xy', 1) ! ('\\by\\b', 'yz', 1) ! ('\\by\\b', 'xyz', 1) ! ('ab|cd', 'abc', 0, 'found', 'ab') ! ('ab|cd', 'abcd', 0, 'found', 'ab') ! ('()ef', 'def', 0, 'found+"-"+g1', 'ef-') ! ('$b', 'b', 1) ! ('a\\(b', 'a(b', 0, 'found+"-"+g1', 'a(b-Error') ! ('a\\(*b', 'ab', 0, 'found', 'ab') ! ('a\\(*b', 'a((b', 0, 'found', 'a((b') ! ('a\\\\b', 'a\\b', 0, 'found', 'a\\b') ! ('((a))', 'abc', 0, 'found+"-"+g1+"-"+g2', 'a-a-a') ! ('(a)b(c)', 'abc', 0, 'found+"-"+g1+"-"+g2', 'abc-a-c') ! ('a+b+c', 'aabbabc', 0, 'found', 'abc') ! ('(a+|b)*', 'ab', 0, 'found+"-"+g1', 'ab-b') ! ('(a+|b)+', 'ab', 0, 'found+"-"+g1', 'ab-b') ! ('(a+|b)?', 'ab', 0, 'found+"-"+g1', 'a-a') ! (')(', '-', 2) ! ('[^ab]*', 'cde', 0, 'found', 'cde') ! ('abc', '', 1) ! ('a*', '', 0, 'found', '') ! ('a|b|c|d|e', 'e', 0, 'found', 'e') ! ('(a|b|c|d|e)f', 'ef', 0, 'found+"-"+g1', 'ef-e') ! ('abcd*efg', 'abcdefg', 0, 'found', 'abcdefg') ! ('ab*', 'xabyabbbz', 0, 'found', 'ab') ! ('ab*', 'xayabbbz', 0, 'found', 'a') ! ('(ab|cd)e', 'abcde', 0, 'found+"-"+g1', 'cde-cd') ! ('[abhgefdc]ij', 'hij', 0, 'found', 'hij') ! ('^(ab|cd)e', 'abcde', 1, 'xg1y', 'xy') ! ('(abc|)ef', 'abcdef', 0, 'found+"-"+g1', 'ef-') ! ('(a|b)c*d', 'abcd', 0, 'found+"-"+g1', 'bcd-b') ! ('(ab|ab*)bc', 'abc', 0, 'found+"-"+g1', 'abc-a') ! ('a([bc]*)c*', 'abc', 0, 'found+"-"+g1', 'abc-bc') ! ('a([bc]*)(c*d)', 'abcd', 0, 'found+"-"+g1+"-"+g2', 'abcd-bc-d') ! ('a([bc]+)(c*d)', 'abcd', 0, 'found+"-"+g1+"-"+g2', 'abcd-bc-d') ! ('a([bc]*)(c+d)', 'abcd', 0, 'found+"-"+g1+"-"+g2', 'abcd-b-cd') ! ('a[bcd]*dcdcde', 'adcdcde', 0, 'found', 'adcdcde') ! ('a[bcd]+dcdcde', 'adcdcde', 1) ! ('(ab|a)b*c', 'abc', 0, 'found+"-"+g1', 'abc-ab') ! ('((a)(b)c)(d)', 'abcd', 0, 'g1+"-"+g2+"-"+g3+"-"+g4', 'abc-a-b-d') ! ('[a-zA-Z_][a-zA-Z0-9_]*', 'alpha', 0, 'found', 'alpha') ! ('^a(bc+|b[eh])g|.h$', 'abh', 0, 'found+"-"+g1', 'bh-None') ! ('(bc+d$|ef*g.|h?i(j|k))', 'effgz', 0, 'found+"-"+g1+"-"+g2', 'effgz-effgz-None') ! ('(bc+d$|ef*g.|h?i(j|k))', 'ij', 0, 'found+"-"+g1+"-"+g2', 'ij-ij-j') ! ('(bc+d$|ef*g.|h?i(j|k))', 'effg', 1) ! ('(bc+d$|ef*g.|h?i(j|k))', 'bcdd', 1) ! ('(bc+d$|ef*g.|h?i(j|k))', 'reffgz', 0, 'found+"-"+g1+"-"+g2', 'effgz-effgz-None') ! ('(((((((((a)))))))))', 'a', 0, 'found', 'a') ! ('multiple words of text', 'uh-uh', 1) ! ('multiple words', 'multiple words, yeah', 0, 'found', 'multiple words') ! ('(.*)c(.*)', 'abcde', 0, 'found+"-"+g1+"-"+g2', 'abcde-ab-de') ! ('\\((.*), (.*)\\)', '(a, b)', 0, 'g2+"-"+g1', 'b-a') ! ('[k]', 'ab', 1) ! ('a[-]?c', 'ac', 0, 'found', 'ac') ! ('(abc)\\1', 'abcabc', 0, 'g1', 'abc') ! ('([a-c]*)\\1', 'abcabc', 0, 'g1', 'abc') ! ('^(.+)?B', 'AB', 0, 'g1', 'A') ! ('(a+).\\1$', 'aaaaa', 0, 'found+"-"+g1', 'aaaaa-aa') ! ('^(a+).\\1$', 'aaaa', 1) ! ('(abc)\\1', 'abcabc', 0, 'found+"-"+g1', 'abcabc-abc') ! ('([a-c]+)\\1', 'abcabc', 0, 'found+"-"+g1', 'abcabc-abc') ! ('(a)\\1', 'aa', 0, 'found+"-"+g1', 'aa-a') ! ('(a+)\\1', 'aa', 0, 'found+"-"+g1', 'aa-a') ! ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a') ! ('(a).+\\1', 'aba', 0, 'found+"-"+g1', 'aba-a') ! ('(a)ba*\\1', 'aba', 0, 'found+"-"+g1', 'aba-a') ! ('(aa|a)a\\1$', 'aaa', 0, 'found+"-"+g1', 'aaa-a') ! ('(a|aa)a\\1$', 'aaa', 0, 'found+"-"+g1', 'aaa-a') ! ('(a+)a\\1$', 'aaa', 0, 'found+"-"+g1', 'aaa-a') ! ('([abc]*)\\1', 'abcabc', 0, 'found+"-"+g1', 'abcabc-abc') ! ('(a)(b)c|ab', 'ab', 0, 'found+"-"+g1+"-"+g2', 'ab-None-None') ! ('(a)+x', 'aaax', 0, 'found+"-"+g1', 'aaax-a') ! ('([ac])+x', 'aacx', 0, 'found+"-"+g1', 'aacx-c') ! ('([^/]*/)*sub1/', 'd:msgs/tdir/sub1/trial/away.cpp', 0, 'found+"-"+g1', 'd:msgs/tdir/sub1/-tdir/') ! ('([^.]*)\\.([^:]*):[T ]+(.*)', 'track1.title:TBlah blah blah', 0, 'found+"-"+g1+"-"+g2+"-"+g3', 'track1.title:TBlah blah blah-track1-title-Blah blah blah') ! ('([^N]*N)+', 'abNNxyzN', 0, 'found+"-"+g1', 'abNNxyzN-xyzN') ! ('([^N]*N)+', 'abNNxyz', 0, 'found+"-"+g1', 'abNN-N') ! ('([abc]*)x', 'abcx', 0, 'found+"-"+g1', 'abcx-abc') ! ('([abc]*)x', 'abc', 1) ! ('([xyz]*)x', 'abcx', 0, 'found+"-"+g1', 'x-') ! ('(a)+b|aac', 'aac', 0, 'found+"-"+g1', 'aac-None') ! ('(?Paaa)a', 'aaaa', 2) ! ('(?Paaa)a', 'aaaa', 0, 'found+"-"+id', 'aaaa-aaa') ! ('(?Paa)(?P=id)', 'aaaa', 0, 'found+"-"+id', 'aaaa-aa') ! ('(?Paa)(?P=xd)', 'aaaa', 2) ! ('\\1', 'a', 2) ! ('\\09', '\0009', 0, 'found', '\0009') ! ('\\141', 'a', 0, 'found', 'a') ! ('(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\\119', 'abcdefghijklk9', 0, 'found+"-"+g11', 'abcdefghijklk9-k') ! ('abc', 'abc', 0, 'found', 'abc') ! ('abc', 'xbc', 1) ! ('abc', 'axc', 1) ! ('abc', 'abx', 1) ! ('abc', 'xabcy', 0, 'found', 'abc') ! ('abc', 'ababc', 0, 'found', 'abc') ! ('ab*c', 'abc', 0, 'found', 'abc') ! ('ab*bc', 'abc', 0, 'found', 'abc') ! ('ab*bc', 'abbc', 0, 'found', 'abbc') ! ('ab*bc', 'abbbbc', 0, 'found', 'abbbbc') ! ('ab{0,}bc', 'abbbbc', 0, 'found', 'abbbbc') ! ('ab+bc', 'abbc', 0, 'found', 'abbc') ! ('ab+bc', 'abc', 1) ! ('ab+bc', 'abq', 1) ! ('ab{1,}bc', 'abq', 1) ! ('ab+bc', 'abbbbc', 0, 'found', 'abbbbc') ! ('ab{1,}bc', 'abbbbc', 0, 'found', 'abbbbc') ! ('ab{1,3}bc', 'abbbbc', 0, 'found', 'abbbbc') ! ('ab{3,4}bc', 'abbbbc', 0, 'found', 'abbbbc') ! ('ab{4,5}bc', 'abbbbc', 1) ! ('ab?bc', 'abbc', 0, 'found', 'abbc') ! ('ab?bc', 'abc', 0, 'found', 'abc') ! ('ab{0,1}bc', 'abc', 0, 'found', 'abc') ! ('ab?bc', 'abbbbc', 1) ! ('ab?c', 'abc', 0, 'found', 'abc') ! ('ab{0,1}c', 'abc', 0, 'found', 'abc') ! ('^abc$', 'abc', 0, 'found', 'abc') ! ('^abc$', 'abcc', 1) ! ('^abc', 'abcc', 0, 'found', 'abc') ! ('^abc$', 'aabc', 1) ! ('abc$', 'aabc', 0, 'found', 'abc') ! ('^', 'abc', 0, 'found', '') ! ('$', 'abc', 0, 'found', '') ! ('a.c', 'abc', 0, 'found', 'abc') ! ('a.c', 'axc', 0, 'found', 'axc') ! ('a.*c', 'axyzc', 0, 'found', 'axyzc') ! ('a.*c', 'axyzd', 1) ! ('a[bc]d', 'abc', 1) ! ('a[bc]d', 'abd', 0, 'found', 'abd') ! ('a[b-d]e', 'abd', 1) ! ('a[b-d]e', 'ace', 0, 'found', 'ace') ! ('a[b-d]', 'aac', 0, 'found', 'ac') ! ('a[-b]', 'a-', 0, 'found', 'a-') ! ('a[b-]', 'a-', 0, 'found', 'a-') ! ('a[b-a]', '-', 2) ! ('a[]b', '-', 2) ! ('a[', '-', 2) ! ('a]', 'a]', 0, 'found', 'a]') ! ('a[]]b', 'a]b', 0, 'found', 'a]b') ! ('a[^bc]d', 'aed', 0, 'found', 'aed') ! ('a[^bc]d', 'abd', 1) ! ('a[^-b]c', 'adc', 0, 'found', 'adc') ! ('a[^-b]c', 'a-c', 1) ! ('a[^]b]c', 'a]c', 1) ! ('a[^]b]c', 'adc', 0, 'found', 'adc') ! ('ab|cd', 'abc', 0, 'found', 'ab') ! ('ab|cd', 'abcd', 0, 'found', 'ab') ! ('()ef', 'def', 0, 'found+"-"+g1', 'ef-') ! ('*a', '-', 2) ! ('(*)b', '-', 2) ! ('$b', 'b', 1) ! ('a\\', '-', 2) ! ('a\\(b', 'a(b', 0, 'found+"-"+g1', 'a(b-Error') ! ('a\\(*b', 'ab', 0, 'found', 'ab') ! ('a\\(*b', 'a((b', 0, 'found', 'a((b') ! ('a\\\\b', 'a\\b', 0, 'found', 'a\\b') ! ('abc)', '-', 2) ! ('(abc', '-', 2) ! ('((a))', 'abc', 0, 'found+"-"+g1+"-"+g2', 'a-a-a') ! ('(a)b(c)', 'abc', 0, 'found+"-"+g1+"-"+g2', 'abc-a-c') ! ('a+b+c', 'aabbabc', 0, 'found', 'abc') ! ('a{1,}b{1,}c', 'aabbabc', 0, 'found', 'abc') ! ('a**', '-', 2) ! ('a.+?c', 'abcabc', 0, 'found', 'abc') ! ('(a+|b)*', 'ab', 0, 'found+"-"+g1', 'ab-b') ! ('(a+|b){0,}', 'ab', 0, 'found+"-"+g1', 'ab-b') ! ('(a+|b)+', 'ab', 0, 'found+"-"+g1', 'ab-b') ! ('(a+|b){1,}', 'ab', 0, 'found+"-"+g1', 'ab-b') ! ('(a+|b)?', 'ab', 0, 'found+"-"+g1', 'a-a') ! ('(a+|b){0,1}', 'ab', 0, 'found+"-"+g1', 'a-a') ! (')(', '-', 2) ! ('[^ab]*', 'cde', 0, 'found', 'cde') ! ('abc', '', 1) ! ('a*', '', 0, 'found', '') ! ('([abc])*d', 'abbbcd', 0, 'found+"-"+g1', 'abbbcd-c') ! ('([abc])*bcd', 'abcd', 0, 'found+"-"+g1', 'abcd-a') ! ('a|b|c|d|e', 'e', 0, 'found', 'e') ! ('(a|b|c|d|e)f', 'ef', 0, 'found+"-"+g1', 'ef-e') ! ('abcd*efg', 'abcdefg', 0, 'found', 'abcdefg') ! ('ab*', 'xabyabbbz', 0, 'found', 'ab') ! ('ab*', 'xayabbbz', 0, 'found', 'a') ! ('(ab|cd)e', 'abcde', 0, 'found+"-"+g1', 'cde-cd') ! ('[abhgefdc]ij', 'hij', 0, 'found', 'hij') ! ('^(ab|cd)e', 'abcde', 1) ! ('(abc|)ef', 'abcdef', 0, 'found+"-"+g1', 'ef-') ! ('(a|b)c*d', 'abcd', 0, 'found+"-"+g1', 'bcd-b') ! ('(ab|ab*)bc', 'abc', 0, 'found+"-"+g1', 'abc-a') ! ('a([bc]*)c*', 'abc', 0, 'found+"-"+g1', 'abc-bc') ! ('a([bc]*)(c*d)', 'abcd', 0, 'found+"-"+g1+"-"+g2', 'abcd-bc-d') ! ('a([bc]+)(c*d)', 'abcd', 0, 'found+"-"+g1+"-"+g2', 'abcd-bc-d') ! ('a([bc]*)(c+d)', 'abcd', 0, 'found+"-"+g1+"-"+g2', 'abcd-b-cd') ! ('a[bcd]*dcdcde', 'adcdcde', 0, 'found', 'adcdcde') ! ('a[bcd]+dcdcde', 'adcdcde', 1) ! ('(ab|a)b*c', 'abc', 0, 'found+"-"+g1', 'abc-ab') ! ('((a)(b)c)(d)', 'abcd', 0, 'g1+"-"+g2+"-"+g3+"-"+g4', 'abc-a-b-d') ! ('[a-zA-Z_][a-zA-Z0-9_]*', 'alpha', 0, 'found', 'alpha') ! ('^a(bc+|b[eh])g|.h$', 'abh', 0, 'found+"-"+g1', 'bh-None') ! ('(bc+d$|ef*g.|h?i(j|k))', 'effgz', 0, 'found+"-"+g1+"-"+g2', 'effgz-effgz-None') ! ('(bc+d$|ef*g.|h?i(j|k))', 'ij', 0, 'found+"-"+g1+"-"+g2', 'ij-ij-j') ! ('(bc+d$|ef*g.|h?i(j|k))', 'effg', 1) ! ('(bc+d$|ef*g.|h?i(j|k))', 'bcdd', 1) ! ('(bc+d$|ef*g.|h?i(j|k))', 'reffgz', 0, 'found+"-"+g1+"-"+g2', 'effgz-effgz-None') ! ('((((((((((a))))))))))', 'a', 0, 'g10', 'a') ! ('((((((((((a))))))))))\\10', 'aa', 0, 'found', 'aa') ! ('((((((((((a))))))))))\\41', '', 2) ! ('(((((((((a)))))))))', 'a', 0, 'found', 'a') ! ('multiple words of text', 'uh-uh', 1) ! ('multiple words', 'multiple words, yeah', 0, 'found', 'multiple words') ! ('(.*)c(.*)', 'abcde', 0, 'found+"-"+g1+"-"+g2', 'abcde-ab-de') ! ('\\((.*), (.*)\\)', '(a, b)', 0, 'g2+"-"+g1', 'b-a') ! ('[k]', 'ab', 1) ! ('a[-]?c', 'ac', 0, 'found', 'ac') ! ('(abc)\\1', 'abcabc', 0, 'g1', 'abc') ! ('([a-c]*)\\1', 'abcabc', 0, 'g1', 'abc') ! ('(?i)abc', 'ABC', 0, 'found', 'ABC') ! ('(?i)abc', 'XBC', 1) ! ('(?i)abc', 'AXC', 1) ! ('(?i)abc', 'ABX', 1) ! ('(?i)abc', 'XABCY', 0, 'found', 'ABC') ! ('(?i)abc', 'ABABC', 0, 'found', 'ABC') ! ('(?i)ab*c', 'ABC', 0, 'found', 'ABC') ! ('(?i)ab*bc', 'ABC', 0, 'found', 'ABC') ! ('(?i)ab*bc', 'ABBC', 0, 'found', 'ABBC') ! ('(?i)ab*?bc', 'ABBBBC', 0, 'found', 'ABBBBC') ! ('(?i)ab{0,}?bc', 'ABBBBC', 0, 'found', 'ABBBBC') ! ('(?i)ab+?bc', 'ABBC', 0, 'found', 'ABBC') ! ('(?i)ab+bc', 'ABC', 1) ! ('(?i)ab+bc', 'ABQ', 1) ! ('(?i)ab{1,}bc', 'ABQ', 1) ! ('(?i)ab+bc', 'ABBBBC', 0, 'found', 'ABBBBC') ! ('(?i)ab{1,}?bc', 'ABBBBC', 0, 'found', 'ABBBBC') ! ('(?i)ab{1,3}?bc', 'ABBBBC', 0, 'found', 'ABBBBC') ! ('(?i)ab{3,4}?bc', 'ABBBBC', 0, 'found', 'ABBBBC') ! ('(?i)ab{4,5}?bc', 'ABBBBC', 1) ! ('(?i)ab??bc', 'ABBC', 0, 'found', 'ABBC') ! ('(?i)ab??bc', 'ABC', 0, 'found', 'ABC') ! ('(?i)ab{0,1}?bc', 'ABC', 0, 'found', 'ABC') ! ('(?i)ab??bc', 'ABBBBC', 1) ! ('(?i)ab??c', 'ABC', 0, 'found', 'ABC') ! ('(?i)ab{0,1}?c', 'ABC', 0, 'found', 'ABC') ! ('(?i)^abc$', 'ABC', 0, 'found', 'ABC') ! ('(?i)^abc$', 'ABCC', 1) ! ('(?i)^abc', 'ABCC', 0, 'found', 'ABC') ! ('(?i)^abc$', 'AABC', 1) ! ('(?i)abc$', 'AABC', 0, 'found', 'ABC') ! ('(?i)^', 'ABC', 0, 'found', '') ! ('(?i)$', 'ABC', 0, 'found', '') ! ('(?i)a.c', 'ABC', 0, 'found', 'ABC') ! ('(?i)a.c', 'AXC', 0, 'found', 'AXC') ! ('(?i)a.*?c', 'AXYZC', 0, 'found', 'AXYZC') ! ('(?i)a.*c', 'AXYZD', 1) ! ('(?i)a[bc]d', 'ABC', 1) ! ('(?i)a[bc]d', 'ABD', 0, 'found', 'ABD') ! ('(?i)a[b-d]e', 'ABD', 1) ! ('(?i)a[b-d]e', 'ACE', 0, 'found', 'ACE') ! ('(?i)a[b-d]', 'AAC', 0, 'found', 'AC') ! ('(?i)a[-b]', 'A-', 0, 'found', 'A-') ! ('(?i)a[b-]', 'A-', 0, 'found', 'A-') ! ('(?i)a[b-a]', '-', 2) ! ('(?i)a[]b', '-', 2) ! ('(?i)a[', '-', 2) ! ('(?i)a]', 'A]', 0, 'found', 'A]') ! ('(?i)a[]]b', 'A]B', 0, 'found', 'A]B') ! ('(?i)a[^bc]d', 'AED', 0, 'found', 'AED') ! ('(?i)a[^bc]d', 'ABD', 1) ! ('(?i)a[^-b]c', 'ADC', 0, 'found', 'ADC') ! ('(?i)a[^-b]c', 'A-C', 1) ! ('(?i)a[^]b]c', 'A]C', 1) ! ('(?i)a[^]b]c', 'ADC', 0, 'found', 'ADC') ! ('(?i)ab|cd', 'ABC', 0, 'found', 'AB') ! ('(?i)ab|cd', 'ABCD', 0, 'found', 'AB') ! ('(?i)()ef', 'DEF', 0, 'found+"-"+g1', 'EF-') ! ('(?i)*a', '-', 2) ! ('(?i)(*)b', '-', 2) ! ('(?i)$b', 'B', 1) ! ('(?i)a\\', '-', 2) ! ('(?i)a\\(b', 'A(B', 0, 'found+"-"+g1', 'A(B-Error') ! ('(?i)a\\(*b', 'AB', 0, 'found', 'AB') ! ('(?i)a\\(*b', 'A((B', 0, 'found', 'A((B') ! ('(?i)a\\\\b', 'A\\B', 0, 'found', 'A\\B') ! ('(?i)abc)', '-', 2) ! ('(?i)(abc', '-', 2) ! ('(?i)((a))', 'ABC', 0, 'found+"-"+g1+"-"+g2', 'A-A-A') ! ('(?i)(a)b(c)', 'ABC', 0, 'found+"-"+g1+"-"+g2', 'ABC-A-C') ! ('(?i)a+b+c', 'AABBABC', 0, 'found', 'ABC') ! ('(?i)a{1,}b{1,}c', 'AABBABC', 0, 'found', 'ABC') ! ('(?i)a**', '-', 2) ! ('(?i)a.+?c', 'ABCABC', 0, 'found', 'ABC') ! ('(?i)a.*?c', 'ABCABC', 0, 'found', 'ABC') ! ('(?i)a.{0,5}?c', 'ABCABC', 0, 'found', 'ABC') ! ('(?i)(a+|b)*', 'AB', 0, 'found+"-"+g1', 'AB-B') ! ('(?i)(a+|b){0,}', 'AB', 0, 'found+"-"+g1', 'AB-B') ! ('(?i)(a+|b)+', 'AB', 0, 'found+"-"+g1', 'AB-B') ! ('(?i)(a+|b){1,}', 'AB', 0, 'found+"-"+g1', 'AB-B') ! ('(?i)(a+|b)?', 'AB', 0, 'found+"-"+g1', 'A-A') ! ('(?i)(a+|b){0,1}', 'AB', 0, 'found+"-"+g1', 'A-A') ! ('(?i)(a+|b){0,1}?', 'AB', 0, 'found+"-"+g1', '-None') ! ('(?i))(', '-', 2) ! ('(?i)[^ab]*', 'CDE', 0, 'found', 'CDE') ! ('(?i)abc', '', 1) ! ('(?i)a*', '', 0, 'found', '') ! ('(?i)([abc])*d', 'ABBBCD', 0, 'found+"-"+g1', 'ABBBCD-C') ! ('(?i)([abc])*bcd', 'ABCD', 0, 'found+"-"+g1', 'ABCD-A') ! ('(?i)a|b|c|d|e', 'E', 0, 'found', 'E') ! ('(?i)(a|b|c|d|e)f', 'EF', 0, 'found+"-"+g1', 'EF-E') ! ('(?i)abcd*efg', 'ABCDEFG', 0, 'found', 'ABCDEFG') ! ('(?i)ab*', 'XABYABBBZ', 0, 'found', 'AB') ! ('(?i)ab*', 'XAYABBBZ', 0, 'found', 'A') ! ('(?i)(ab|cd)e', 'ABCDE', 0, 'found+"-"+g1', 'CDE-CD') ! ('(?i)[abhgefdc]ij', 'HIJ', 0, 'found', 'HIJ') ! ('(?i)^(ab|cd)e', 'ABCDE', 1) ! ('(?i)(abc|)ef', 'ABCDEF', 0, 'found+"-"+g1', 'EF-') ! ('(?i)(a|b)c*d', 'ABCD', 0, 'found+"-"+g1', 'BCD-B') ! ('(?i)(ab|ab*)bc', 'ABC', 0, 'found+"-"+g1', 'ABC-A') ! ('(?i)a([bc]*)c*', 'ABC', 0, 'found+"-"+g1', 'ABC-BC') ! ('(?i)a([bc]*)(c*d)', 'ABCD', 0, 'found+"-"+g1+"-"+g2', 'ABCD-BC-D') ! ('(?i)a([bc]+)(c*d)', 'ABCD', 0, 'found+"-"+g1+"-"+g2', 'ABCD-BC-D') ! ('(?i)a([bc]*)(c+d)', 'ABCD', 0, 'found+"-"+g1+"-"+g2', 'ABCD-B-CD') ! ('(?i)a[bcd]*dcdcde', 'ADCDCDE', 0, 'found', 'ADCDCDE') ! ('(?i)a[bcd]+dcdcde', 'ADCDCDE', 1) ! ('(?i)(ab|a)b*c', 'ABC', 0, 'found+"-"+g1', 'ABC-AB') ! ('(?i)((a)(b)c)(d)', 'ABCD', 0, 'g1+"-"+g2+"-"+g3+"-"+g4', 'ABC-A-B-D') ! ('(?i)[a-zA-Z_][a-zA-Z0-9_]*', 'ALPHA', 0, 'found', 'ALPHA') ! ('(?i)^a(bc+|b[eh])g|.h$', 'ABH', 0, 'found+"-"+g1', 'BH-None') ! ('(?i)(bc+d$|ef*g.|h?i(j|k))', 'EFFGZ', 0, 'found+"-"+g1+"-"+g2', 'EFFGZ-EFFGZ-None') ! ('(?i)(bc+d$|ef*g.|h?i(j|k))', 'IJ', 0, 'found+"-"+g1+"-"+g2', 'IJ-IJ-J') ! ('(?i)(bc+d$|ef*g.|h?i(j|k))', 'EFFG', 1) ! ('(?i)(bc+d$|ef*g.|h?i(j|k))', 'BCDD', 1) ! ('(?i)(bc+d$|ef*g.|h?i(j|k))', 'REFFGZ', 0, 'found+"-"+g1+"-"+g2', 'EFFGZ-EFFGZ-None') ! ('(?i)((((((((((a))))))))))', 'A', 0, 'g10', 'A') ! ('(?i)((((((((((a))))))))))\\10', 'AA', 0, 'found', 'AA') ! ('(?i)((((((((((a))))))))))\\41', '', 2) ! ('(?i)(((((((((a)))))))))', 'A', 0, 'found', 'A') ! ('(?i)(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))', 'A', 0, 'g1', 'A') ! ('(?i)(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))', 'C', 0, 'g1', 'C') ! ('(?i)multiple words of text', 'UH-UH', 1) ! ('(?i)multiple words', 'MULTIPLE WORDS, YEAH', 0, 'found', 'MULTIPLE WORDS') ! ('(?i)(.*)c(.*)', 'ABCDE', 0, 'found+"-"+g1+"-"+g2', 'ABCDE-AB-DE') ! ('(?i)\\((.*), (.*)\\)', '(A, B)', 0, 'g2+"-"+g1', 'B-A') ! ('(?i)[k]', 'AB', 1) ! ('(?i)a[-]?c', 'AC', 0, 'found', 'AC') ! ('(?i)(abc)\\1', 'ABCABC', 0, 'g1', 'ABC') ! ('(?i)([a-c]*)\\1', 'ABCABC', 0, 'g1', 'ABC') ! ('a(?:b|c|d)(.)', 'ace', 0, 'g1', 'e') ! ('a(?:b|c|d)*(.)', 'ace', 0, 'g1', 'e') ! ('a(?:b|c|d)+?(.)', 'ace', 0, 'g1', 'e') ! ('a(?:b|(c|e){1,2}?|d)+?(.)', 'ace', 0, 'g1 + g2', 'ce') ! ('^(.+)?B', 'AB', 0, 'g1', 'A') ! ('w(?# comment', 'w', 2) ! ('w(?# comment 1)xy(?# comment 2)z', 'wxyz', 0, 'found', 'wxyz') ! ('w(?i)', 'W', 2) ! ('(?x)w# comment 1\012 x y\012\011# comment 2\012\011z', 'wxyz', 0, 'found', 'wxyz') ! ('^abc', 'jkl\012abc\012xyz', 1) ! ('(?m)^abc', 'jkl\012abc\012xyz', 0, 'found', 'abc') ! ('(?m)abc$', 'jkl\012xyzabc\012123', 0, 'found', 'abc') ! ('a.b', 'a\012b', 1) ! ('(?s)a.b', 'a\012b', 0, 'found', 'a\012b') ! ('\\w+', '--ab_cd0123--', 0, 'found', 'ab_cd0123') ! ('\\D+', '1234abc5678', 0, 'found', 'abc') ! ('[\\da-fA-F]+', '123abc', 0, 'found', '123abc') ! ('[\\d-x]', '-', 2) --- 1,12 ---- test_re ! === Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A') ! === Fails on case-insensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A') ! === Fails on locale-sensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A') ! === Failed incorrectly ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a') ! === Fails on case-insensitive match ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a') ! === Fails on locale-sensitive match ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a') ! === grouping error ('(a)(b)c|ab', 'ab', 0, 'found+"-"+g1+"-"+g2', 'ab-None-None') 'ab-None-b' should be 'ab-None-None' ! === grouping error ('(a)+b|aac', 'aac', 0, 'found+"-"+g1', 'aac-None') 'aac-a' should be 'aac-None' ! === Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A') ! === Fails on case-insensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A') ! === Fails on locale-sensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A') From python-dev@python.org Tue Jul 25 00:03:37 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 24 Jul 2000 16:03:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools mkhowto,1.9,1.10 Message-ID: <200007242303.QAA05260@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory slayer.i.sourceforge.net:/tmp/cvs-serv5251/tools Modified Files: mkhowto Log Message: Only use one initialization file for LaTeX2HTML; more recent versions only use the last one specified on the command line instead of all of them. Smaller changes to reflect updated support. Index: mkhowto =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkhowto,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** mkhowto 2000/06/29 23:01:40 1.9 --- mkhowto 2000/07/24 23:03:32 1.10 *************** *** 331,335 **** os.mkdir(builddir) args = [LATEX2HTML_BINARY, - "-init_file", L2H_INIT_FILE, "-init_file", self.l2h_aux_init_file, "-dir", builddir, --- 331,334 ---- *************** *** 363,369 **** def write_l2h_aux_init_file(self): fp = open(self.l2h_aux_init_file, "w") ! fp.write("# auxillary init file for latex2html\n" "# generated by mkhowto\n" "$NO_AUTO_LINK = 1;\n" ) options = self.options --- 362,372 ---- def write_l2h_aux_init_file(self): fp = open(self.l2h_aux_init_file, "w") ! fp.write(open(L2H_INIT_FILE).read()) ! fp.write("\n" ! "# auxillary init file for latex2html\n" "# generated by mkhowto\n" + "push (@INC, '%s');\n" "$NO_AUTO_LINK = 1;\n" + % os.path.dirname(L2H_INIT_FILE) ) options = self.options *************** *** 374,379 **** l2hoption(fp, "MAX_LINK_DEPTH", options.max_link_depth) l2hoption(fp, "MAX_SPLIT_DEPTH", options.max_split_depth) - # this line needed in case $IMAGE_TYPE changed - fp.write("adjust_icon_information();\n") fp.write("1;\n") fp.close() --- 377,380 ---- From python-dev@python.org Tue Jul 25 00:54:52 2000 From: python-dev@python.org (A.M. Kuchling) Date: Mon, 24 Jul 2000 16:54:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.32,2.33 Message-ID: <200007242354.QAA08816@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8754 Modified Files: _cursesmodule.c Log Message: Bug report and partial patch from Michael Deegan : reversed tests resulted in an exception when you supplied the correct number of arguments Index: _cursesmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -r2.32 -r2.33 *** _cursesmodule.c 2000/07/21 06:00:06 2.32 --- _cursesmodule.c 2000/07/24 23:54:49 2.33 *************** *** 1438,1442 **** PyCursesInitialisedColor ! if (ARG_COUNT(args)!=1) { PyErr_SetString(PyExc_TypeError, "color_pair requires 1 argument"); return NULL; --- 1438,1442 ---- PyCursesInitialisedColor ! if (ARG_COUNT(args) != 1) { PyErr_SetString(PyExc_TypeError, "color_pair requires 1 argument"); return NULL; *************** *** 1453,1457 **** PyCursesInitialised ! if (ARG_COUNT(args)==1) { PyErr_SetString(PyExc_TypeError, "curs_set requires 1 argument"); return NULL; --- 1453,1457 ---- PyCursesInitialised ! if (ARG_COUNT(args)!=1) { PyErr_SetString(PyExc_TypeError, "curs_set requires 1 argument"); return NULL; *************** *** 1473,1477 **** PyCursesInitialised ! if (ARG_COUNT(args)==1) { PyErr_SetString(PyExc_TypeError, "delay_output requires 1 argument"); return NULL; --- 1473,1477 ---- PyCursesInitialised ! if (ARG_COUNT(args) != 1) { PyErr_SetString(PyExc_TypeError, "delay_output requires 1 argument"); return NULL; *************** *** 1638,1642 **** PyCursesInitialisedColor ! if (ARG_COUNT(args) == 3) { PyErr_SetString(PyExc_TypeError, "init_pair requires 3 arguments"); return NULL; --- 1638,1642 ---- PyCursesInitialisedColor ! if (ARG_COUNT(args) != 3) { PyErr_SetString(PyExc_TypeError, "init_pair requires 3 arguments"); return NULL; From python-dev@python.org Tue Jul 25 01:51:34 2000 From: python-dev@python.org (A.M. Kuchling) Date: Mon, 24 Jul 2000 17:51:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_select.py,1.9,1.10 Message-ID: <200007250051.RAA19916@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv19907 Modified Files: test_select.py Log Message: Made an error message slightly more useful if select() returns something goofy Index: test_select.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_select.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** test_select.py 2000/07/11 15:15:30 1.9 --- test_select.py 2000/07/25 00:51:31 1.10 *************** *** 57,61 **** break continue ! print 'Heh?' p.close() --- 57,61 ---- break continue ! print 'Unexpected return values from select():', rfd, wfd, xfd p.close() From python-dev@python.org Tue Jul 25 03:13:45 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 24 Jul 2000 19:13:45 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.10,1.11 Message-ID: <200007250213.TAA07245@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv7237 Modified Files: pep-0000.txt Log Message: Abscond with PEP-0160 for the 1.6 release schedule. Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** pep-0000.txt 2000/07/24 19:01:22 1.10 --- pep-0000.txt 2000/07/25 02:13:43 1.11 *************** *** 19,22 **** --- 19,24 ---- 1 pep-0001.txt PEP Guidelines bwarsaw, jhylton + 160 pep-0160.txt Python 1.6 Release Schedule fdrake + 200 pep-0200.txt Python 2.0 Release Schedule jhylton 201 pep-0201.txt Parallel Iteration bwarsaw From python-dev@python.org Tue Jul 25 03:26:41 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 24 Jul 2000 19:26:41 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.11,1.12 Message-ID: <200007250226.TAA07962@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv7950 Modified Files: pep-0000.txt Log Message: Minor formatting cleanup; columns should line up with headers. Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** pep-0000.txt 2000/07/25 02:13:43 1.11 --- pep-0000.txt 2000/07/25 02:26:38 1.12 *************** *** 14,40 **** Index ! num filename title owner ! --- ----------- ----- ----- ! 0 pep-0000.txt Index of Python Enhance Proposals bwarsaw ! 1 pep-0001.txt PEP Guidelines bwarsaw, jhylton ! 160 pep-0160.txt Python 1.6 Release Schedule fdrake ! 200 pep-0200.txt Python 2.0 Release Schedule jhylton ! 201 pep-0201.txt Parallel Iteration bwarsaw ! 202 pep-0202.txt List Comprehensions tim_one ! 203 pep-0203.txt Augmented Assignments twouters ! 204 pep-0204.txt Range Literals twouters ! 205 pep-0205.txt Weak References fdrake ! 206 pep-0206.txt 2.0 Batteries Included moshez ! 207 pep-0207.txt Rich Comparisons davida ! 208 pep-0208.txt Reworking the Coercion Model davida ! 209 pep-0209.txt Adding Multidimensional Arrays davida ! 210 pep-0210.txt Decoupling the Interpreter Loop davida ! 211 pep-0211.txt Adding New Operators to Python gvwilson ! 212 pep-0212.txt Additional Builtin Generators bwarsaw ! 213 pep-0213.txt Attribute Access Handlers prescod ! 214 pep-0214.txt Extended Print Statement bwarsaw ! 215 pep-0215.txt String Interpolation ping --- 14,40 ---- Index ! num filename title owner ! --- ------------ ----- ----- ! 0 pep-0000.txt Index of Python Enhance Proposals bwarsaw ! 1 pep-0001.txt PEP Guidelines bwarsaw, jhylton ! 160 pep-0160.txt Python 1.6 Release Schedule fdrake ! 200 pep-0200.txt Python 2.0 Release Schedule jhylton ! 201 pep-0201.txt Parallel Iteration bwarsaw ! 202 pep-0202.txt List Comprehensions tim_one ! 203 pep-0203.txt Augmented Assignments twouters ! 204 pep-0204.txt Range Literals twouters ! 205 pep-0205.txt Weak References fdrake ! 206 pep-0206.txt 2.0 Batteries Included moshez ! 207 pep-0207.txt Rich Comparisons davida ! 208 pep-0208.txt Reworking the Coercion Model davida ! 209 pep-0209.txt Adding Multidimensional Arrays davida ! 210 pep-0210.txt Decoupling the Interpreter Loop davida ! 211 pep-0211.txt Adding New Operators to Python gvwilson ! 212 pep-0212.txt Additional Builtin Generators bwarsaw ! 213 pep-0213.txt Attribute Access Handlers prescod ! 214 pep-0214.txt Extended Print Statement bwarsaw ! 215 pep-0215.txt String Interpolation ping From python-dev@python.org Tue Jul 25 04:25:17 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 24 Jul 2000 20:25:17 -0700 Subject: [Python-checkins] CVS: python/nondist/peps .cvsignore,NONE,1.1 Message-ID: <200007250325.UAA25237@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv25231 Added Files: .cvsignore Log Message: Tell CVS to ignore generated HTML files. --- NEW FILE --- pep-????.html From python-dev@python.org Tue Jul 25 04:38:55 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 24 Jul 2000 20:38:55 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0160.txt,NONE,1.1 Message-ID: <200007250338.UAA26063@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv26056 Added Files: pep-0160.txt Log Message: Start of 1.6 release schedule. --- NEW FILE --- PEP: 160 Title: Python 1.6 Release Schedule Version: $Revision: 1.1 $ Owner: fdrake@beopen.com (Fred L. Drake, Jr.) Python-Version: 2.0 Status: Incomplete Introduction This PEP describes the Python 1.6 release schedule, tracking the status and ownership of the major new features, summarizes discussions held in mailing list forums, and provides URLs for further information, patches, and other outstanding issues. The CVS revision history of this file contains the definitive historical record. Schedule August 1 1.6 beta 1 release. August 15 1.6 final release. Features A number of features are required for Python 1.6 in order to fulfill the various promises that have been made. The following are required to be fully operational, documented, and forward compatible with the plans for Python 2.0: * Unicode support: The Unicode object defined for Python 2.0 must be provided, including all methods and codec support. Local Variables: mode: indented-text indent-tabs-mode: nil End: From python-dev@python.org Tue Jul 25 04:51:46 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 24 Jul 2000 20:51:46 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep2html.py,1.2,1.3 Message-ID: <200007250351.UAA26810@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv26749 Modified Files: pep2html.py Log Message: Revise the generated HTML to be a little nicer, but still pretty simple. Also add a -n option to suppress installing the generated HTML at SourceForge to allow local use. Index: pep2html.py =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pep2html.py 2000/07/20 22:44:36 1.2 --- pep2html.py 2000/07/25 03:51:44 1.3 *************** *** 3,10 **** convert PEP's to (X)HTML - courtesy of /F ! Syntax: pep2html [sf_username] The user name 'sf_username' is used to upload the converted files to the web pages at source forge. """ --- 3,14 ---- convert PEP's to (X)HTML - courtesy of /F ! Syntax: pep2html [-n] [sf_username] The user name 'sf_username' is used to upload the converted files to the web pages at source forge. + + If -n is given, the script doesn't actually try to install the + generated HTML at SourceForge. + """ *************** *** 14,31 **** # tags. but if I change that, the result doesn't look very nice... ! DTD = ('') fixpat = re.compile("((http|ftp):[-_a-zA-Z0-9/.+~:?#$=&]+)|(pep-\d+(.txt)?)|.") ! def fixanchor(match): text = match.group(0) link = None if text[:5] == "http:" or text[:4] == "ftp:": link = text ! elif text[:3] == "pep": link = os.path.splitext(text)[0] + ".html" if link: ! return "%s" % (link, cgi.escape(link)) return cgi.escape(match.group(0)) # really slow, but it works... --- 18,35 ---- # tags. but if I change that, the result doesn't look very nice... ! DTD = ('') fixpat = re.compile("((http|ftp):[-_a-zA-Z0-9/.+~:?#$=&]+)|(pep-\d+(.txt)?)|.") ! def fixanchor(current, match): text = match.group(0) link = None if text[:5] == "http:" or text[:4] == "ftp:": link = text ! elif text[:4] == "pep-" and text != current: link = os.path.splitext(text)[0] + ".html" if link: ! return "%s" % (link, cgi.escape(text)) return cgi.escape(match.group(0)) # really slow, but it works... *************** *** 34,41 **** fi = open(infile) fo = open(outfile, "w") ! fo.write("%s\n\n" % DTD) # head header = [] - fo.write("\n") pep = "" title = "" --- 38,44 ---- fi = open(infile) fo = open(outfile, "w") ! fo.write(DTD + "\n\n\n") # head header = [] pep = "" title = "" *************** *** 58,70 **** # body fo.write("\n") ! fo.write("
    \n")
    !     fo.write("[home]")
    !     if os.path.basename(file) != "pep-0000.txt":
    !         fo.write(" [index]")
    !     fo.write("\n
    \n") ! # fo.write("\n

    \n")
          for k, v in header:
    !         fo.write("%s: %s\n" % (cgi.escape(k), cgi.escape(v)))
          title = 0
          while 1:
              line = fi.readline()
    --- 61,73 ----
          # body
          fo.write("\n")
    !     fo.write("[home]\n")
    !     if os.path.basename(infile) != "pep-0000.txt":
    !         fo.write("[index]\n")
    !     fo.write("
    \n\n") for k, v in header: ! fo.write(" \n" ! % (cgi.escape(k), cgi.escape(v))) title = 0 + fo.write("
    %s:%s
    \n
    ")
          while 1:
              line = fi.readline()
    ***************
    *** 72,87 ****
                  break
              if line[:1] == "\f":
    !             fo.write("\n
    \n") # fo.write("\n

    \n")
                  title = 1
    !         elif title >= 0:
    !             line = fixpat.sub(fixanchor, line)
                  if title:
                      if line.strip() == "Local Variables:":
    !                     title = -1
    !                 else:
    !                     fo.write("

    %s

    \n" % line) ! # fo.write("

    %s

    \n" % line)
    !                     title = 0
                  else:
                      fo.write(line)
    --- 75,89 ----
                  break
              if line[:1] == "\f":
    !             fo.write("
    ") # fo.write("\n

    \n")
                  title = 1
    !         else:
    !             line = fixpat.sub(lambda x, c=infile: fixanchor(c, x), line)
                  if title:
                      if line.strip() == "Local Variables:":
    !                     break
    !                 fo.write("
    \n

    %s

    \n
    " % line.strip())
    !                 # fo.write("

    %s

    \n" % line)
    !                 title = 0
                  else:
                      fo.write(line)
    ***************
    *** 89,103 ****
          fo.write("\n")
          fo.write("\n")
      
    ! for file in glob.glob("pep-*.txt"):
    !     print file, "..."
    !     fixfile(file, os.path.splitext(file)[0] + ".html")
    ! 
    ! if len(sys.argv) == 1:
    !     username = ""
    ! elif len(sys.argv) == 2:
    !     username = sys.argv[1]+"@"
    ! else:
    !     raise "Syntax: "+sys.argv[0]+" [sf_username]"
    !     
    ! os.system("scp pep-*.html "+username+"shell.sourceforge.net:/home/groups/python/htdocs/peps")
    --- 91,118 ----
          fo.write("\n")
          fo.write("\n")
    + 
    + 
    + def main():
    +     update = 1
    +     for file in glob.glob("pep-*.txt"):
    +         print file, "..."
    +         fixfile(file, os.path.splitext(file)[0] + ".html")
    + 
    +     if len(sys.argv) > 1 and sys.argv[1] == "-n":
    +         update = 0
    +         del sys.argv[1]
    + 
    +     if len(sys.argv) == 1:
    +         username = ""
    +     elif len(sys.argv) == 2:
    +         username = sys.argv[1]+"@"
    +     else:
    +         raise "Syntax: "+sys.argv[0]+" [-n] [sf_username]"
    + 
    +     if update:
    +         os.system("scp pep-*.html " + username
    +                   + "shell.sourceforge.net:/home/groups/python/htdocs/peps")
    + 
      
    ! if __name__ == "__main__":
    !     main()
    
    
    
    From python-dev@python.org  Tue Jul 25 05:01:00 2000
    From: python-dev@python.org (Fred L. Drake)
    Date: Mon, 24 Jul 2000 21:01:00 -0700
    Subject: [Python-checkins] CVS: python/nondist/peps pep-0160.txt,1.1,1.2
    Message-ID: <200007250401.VAA30357@slayer.i.sourceforge.net>
    
    Update of /cvsroot/python/python/nondist/peps
    In directory slayer.i.sourceforge.net:/tmp/cvs-serv30219
    
    Modified Files:
    	pep-0160.txt 
    Log Message:
    
    Add statement that this in the public domain.
    
    
    Index: pep-0160.txt
    ===================================================================
    RCS file: /cvsroot/python/python/nondist/peps/pep-0160.txt,v
    retrieving revision 1.1
    retrieving revision 1.2
    diff -C2 -r1.1 -r1.2
    *** pep-0160.txt	2000/07/25 03:38:53	1.1
    --- pep-0160.txt	2000/07/25 04:00:57	1.2
    ***************
    *** 33,36 ****
    --- 33,41 ----
      
      
    + 
    + Copyright
    + 
    +     This document has been placed in the public domain.
    + 
      
      
    
    
    
    From python-dev@python.org  Tue Jul 25 05:12:30 2000
    From: python-dev@python.org (Peter Schneider-Kamp)
    Date: Mon, 24 Jul 2000 21:12:30 -0700
    Subject: [Python-checkins] CVS: python/nondist/peps pep2html.py,1.3,1.4
    Message-ID: <200007250412.VAA02888@slayer.i.sourceforge.net>
    
    Update of /cvsroot/python/python/nondist/peps
    In directory slayer.i.sourceforge.net:/tmp/cvs-serv2859
    
    Modified Files:
    	pep2html.py 
    Log Message:
    
    try to change rights of peps to rw-rw-r--
    
    
    
    Index: pep2html.py
    ===================================================================
    RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v
    retrieving revision 1.3
    retrieving revision 1.4
    diff -C2 -r1.3 -r1.4
    *** pep2html.py	2000/07/25 03:51:44	1.3
    --- pep2html.py	2000/07/25 04:12:28	1.4
    ***************
    *** 18,21 ****
    --- 18,24 ----
      # tags.  but if I change that, the result doesn't look very nice...
      
    + HOST = "shell.sourceforge.net" # host for update
    + HDIR = "/home/groups/python/htdocs/peps" # target host directory
    + 
      DTD = ('')
    ***************
    *** 91,94 ****
    --- 94,99 ----
          fo.write("\n")
          fo.write("\n")
    +     fo.close()
    +     os.chmod(outfile, 0664)
      
      
    ***************
    *** 111,116 ****
      
          if update:
    !         os.system("scp pep-*.html " + username
    !                   + "shell.sourceforge.net:/home/groups/python/htdocs/peps")
      
      
    --- 116,121 ----
      
          if update:
    !         os.system("scp pep-*.html " + username + HOST + ":" + HDIR)
    !         os.system("ssh " + username + HOST + " chmod 664 " + HDIR + "/*")
      
      
    
    
    
    From python-dev@python.org  Tue Jul 25 11:40:01 2000
    From: python-dev@python.org (Peter Schneider-Kamp)
    Date: Tue, 25 Jul 2000 03:40:01 -0700
    Subject: [Python-checkins] CVS: python/nondist/sf-html sf-faq.html,1.10,1.11
    Message-ID: <200007251040.DAA18313@slayer.i.sourceforge.net>
    
    Update of /cvsroot/python/python/nondist/sf-html
    In directory slayer.i.sourceforge.net:/tmp/cvs-serv18260
    
    Modified Files:
    	sf-faq.html 
    Log Message:
    
    mention jitterbug in FAQ
    
    
    
    Index: sf-faq.html
    ===================================================================
    RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v
    retrieving revision 1.10
    retrieving revision 1.11
    diff -C2 -r1.10 -r1.11
    *** sf-faq.html	2000/07/22 09:25:41	1.10
    --- sf-faq.html	2000/07/25 10:39:58	1.11
    ***************
    *** 55,58 ****
    --- 55,64 ----
      
      
    + 

    6. Bug Reporting

    +
      +
    1. Where can I submit/view bugs for Python?
    2. +
    3. How do I use jitterbug?
    4. +
    +

    A. Appendix

      *************** *** 320,325 **** cvs update -j 1.17 -j 1.16 ceval.c
      cvs update
      ! cvs commit ceval.c
      ! This example would create and apply a reverse patch from revision 1.17 to revision 1.16 of ceval.c. --- 326,331 ---- cvs update -j 1.17 -j 1.16 ceval.c
      cvs update
      ! cvs commit ceval.c
      ! This example would create and apply a reverse patch from revision 1.17 to revision 1.16 of ceval.c. *************** *** 334,339 ****
      cvs add -kb newfile.bin
      ! cvs commit newfile.bin
      !

      3. Patches

      --- 340,346 ----
      cvs add -kb newfile.bin
      ! cvs commit newfile.bin
      !
      !

      3. Patches

      *************** *** 460,463 **** --- 467,499 ---- Any reports of getting it to work and/or pointers to more info would be appreciated! + +

      6. Bugs

      + +

      6.1.:

      + +

      Q: Where can I submit/view bugs for Python?

      + +

      A:

      + As of now [25-Jul-200] the Python project does not use SourceForge's bug + tracking facility. This may change when there is a way to import the existing + jitterbug database. The jitterbug database can be accessed through the + following interface: + +
      + http://www.python.org/python-bugs
      + +

      6.1.:

      + +

      Q: How do I use jitterbug?

      + +

      A:

      + To get the list of open bugs click on open (hidden between the second + last and the last horizontal ruler). + +

      To get a list of the bugs which are related to some area, enter an + appropriate regular expression and press "Select Messages". Then select + open (or whatever category you would like to view) as described + above.

      A. Appendix

      From python-dev@python.org Tue Jul 25 13:37:44 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 25 Jul 2000 05:37:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.33,2.34 Message-ID: <200007251237.FAA22232@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv21909 Modified Files: _cursesmodule.c Log Message: Modified version of patch #100963 from Mark Favas: has_key() is an ncurses extension, so it's made conditional depending on STRICT_SYSV_CURSES Index: _cursesmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -r2.33 -r2.34 *** _cursesmodule.c 2000/07/24 23:54:49 2.33 --- _cursesmodule.c 2000/07/25 12:37:41 2.34 *************** *** 44,48 **** #ifdef __osf__ #define _XOPEN_SOURCE_EXTENDED /* Define macro for OSF/1 */ ! #define STRICT_SYSV_CURSES #endif --- 44,48 ---- #ifdef __osf__ #define _XOPEN_SOURCE_EXTENDED /* Define macro for OSF/1 */ ! #define STRICT_SYSV_CURSES /* Don't use ncurses extensions */ #endif *************** *** 54,58 **** #if defined(__sgi__) || defined(__sun__) ! #define STRICT_SYSV_CURSES typedef chtype attr_t; /* No attr_t type is available */ #endif --- 54,58 ---- #if defined(__sgi__) || defined(__sun__) ! #define STRICT_SYSV_CURSES /* Don't use ncurses extensions */ typedef chtype attr_t; /* No attr_t type is available */ #endif *************** *** 1591,1595 **** } ! #if !defined(__sgi__) && !defined(__sun__) /* No has_key! */ static PyObject * PyCurses_has_key(PyObject *self, PyObject *args) --- 1591,1595 ---- } ! #ifndef STRICT_SYSV_CURSES /* No has_key! */ static PyObject * PyCurses_has_key(PyObject *self, PyObject *args) *************** *** 1608,1612 **** return Py_True; } ! #endif static PyObject * --- 1608,1612 ---- return Py_True; } ! #endif /* STRICT_SYSV_CURSES */ static PyObject * *************** *** 2112,2116 **** {"has_ic", (PyCFunction)PyCurses_has_ic}, {"has_il", (PyCFunction)PyCurses_has_il}, ! #if !defined(__sgi__) && !defined(__sun__) {"has_key", (PyCFunction)PyCurses_has_key}, #endif --- 2112,2116 ---- {"has_ic", (PyCFunction)PyCurses_has_ic}, {"has_il", (PyCFunction)PyCurses_has_il}, ! #ifndef STRICT_SYSV_CURSES {"has_key", (PyCFunction)PyCurses_has_key}, #endif From python-dev@python.org Tue Jul 25 13:56:40 2000 From: python-dev@python.org (Thomas Wouters) Date: Tue, 25 Jul 2000 05:56:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser intrcheck.c,2.37,2.38 Message-ID: <200007251256.FAA23522@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv23253/Parser Modified Files: intrcheck.c Log Message: Use 'void' directly instead of the ANY #define, now that all code is ANSI C. Leave the actual #define in for API compatibility. Index: intrcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/intrcheck.c,v retrieving revision 2.37 retrieving revision 2.38 diff -C2 -r2.37 -r2.38 *** intrcheck.c 2000/07/23 21:18:09 2.37 --- intrcheck.c 2000/07/25 12:56:38 2.38 *************** *** 19,27 **** #include "myproto.h" - #include "mymalloc.h" /* For ANY */ #include "intrcheck.h" /* Copied here from ceval.h -- can't include that file. */ ! int Py_AddPendingCall(int (*func)(ANY *), ANY *arg); --- 19,26 ---- #include "myproto.h" #include "intrcheck.h" /* Copied here from ceval.h -- can't include that file. */ ! int Py_AddPendingCall(int (*func)(void *), void *arg); From python-dev@python.org Tue Jul 25 13:56:40 2000 From: python-dev@python.org (Thomas Wouters) Date: Tue, 25 Jul 2000 05:56:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include ceval.h,2.35,2.36 mymalloc.h,2.23,2.24 objimpl.h,2.22,2.23 Message-ID: <200007251256.FAA23513@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv23253/Include Modified Files: ceval.h mymalloc.h objimpl.h Log Message: Use 'void' directly instead of the ANY #define, now that all code is ANSI C. Leave the actual #define in for API compatibility. Index: ceval.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/ceval.h,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** ceval.h 2000/07/22 23:30:03 2.35 --- ceval.h 2000/07/25 12:56:37 2.36 *************** *** 41,45 **** DL_IMPORT(int) Py_FlushLine(void); ! DL_IMPORT(int) Py_AddPendingCall(int (*func)(ANY *), ANY *arg); DL_IMPORT(int) Py_MakePendingCalls(void); --- 41,45 ---- DL_IMPORT(int) Py_FlushLine(void); ! DL_IMPORT(int) Py_AddPendingCall(int (*func)(void *), void *arg); DL_IMPORT(int) Py_MakePendingCalls(void); Index: mymalloc.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mymalloc.h,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** mymalloc.h 2000/07/12 17:21:41 2.23 --- mymalloc.h 2000/07/25 12:56:37 2.24 *************** *** 13,35 **** /* Lowest-level memory allocation interface */ ! #ifdef macintosh ! #define ANY void ! #endif ! ! #ifdef __STDC__ ! #define ANY void ! #endif ! ! #ifdef __TURBOC__ ! #define ANY void ! #endif ! ! #ifdef __GNUC__ ! #define ANY void ! #endif ! ! #ifndef ANY ! #define ANY char ! #endif #ifdef HAVE_STDLIB_H --- 13,17 ---- /* Lowest-level memory allocation interface */ ! #define ANY void /* For API compatibility only. Obsolete, do not use. */ #ifdef HAVE_STDLIB_H *************** *** 50,54 **** #ifndef NULL ! #define NULL ((ANY *)0) #endif --- 32,36 ---- #ifndef NULL ! #define NULL ((void *)0) #endif *************** *** 88,98 **** #undef PyCore_FREE_PROTO #define PyCore_MALLOC_PROTO (size_t) ! #define PyCore_REALLOC_PROTO (ANY *, size_t) ! #define PyCore_FREE_PROTO (ANY *) #endif #ifdef NEED_TO_DECLARE_MALLOC_AND_FRIEND ! extern ANY *PyCore_MALLOC_FUNC PyCore_MALLOC_PROTO; ! extern ANY *PyCore_REALLOC_FUNC PyCore_REALLOC_PROTO; extern void PyCore_FREE_FUNC PyCore_FREE_PROTO; #endif --- 70,80 ---- #undef PyCore_FREE_PROTO #define PyCore_MALLOC_PROTO (size_t) ! #define PyCore_REALLOC_PROTO (void *, size_t) ! #define PyCore_FREE_PROTO (void *) #endif #ifdef NEED_TO_DECLARE_MALLOC_AND_FRIEND ! extern void *PyCore_MALLOC_FUNC PyCore_MALLOC_PROTO; ! extern void *PyCore_REALLOC_FUNC PyCore_REALLOC_PROTO; extern void PyCore_FREE_FUNC PyCore_FREE_PROTO; #endif *************** *** 135,141 **** doesn't. Returned pointers must be checked for NULL explicitly. No action is performed on failure. */ ! extern DL_IMPORT(ANY *) PyMem_Malloc(size_t); ! extern DL_IMPORT(ANY *) PyMem_Realloc(ANY *, size_t); ! extern DL_IMPORT(void) PyMem_Free(ANY *); /* Starting from Python 1.6, the wrappers Py_{Malloc,Realloc,Free} are --- 117,123 ---- doesn't. Returned pointers must be checked for NULL explicitly. No action is performed on failure. */ ! extern DL_IMPORT(void *) PyMem_Malloc(size_t); ! extern DL_IMPORT(void *) PyMem_Realloc(void *, size_t); ! extern DL_IMPORT(void) PyMem_Free(void *); /* Starting from Python 1.6, the wrappers Py_{Malloc,Realloc,Free} are *************** *** 144,149 **** /* Macros */ #define PyMem_MALLOC(n) PyCore_MALLOC(n) ! #define PyMem_REALLOC(p, n) PyCore_REALLOC((ANY *)(p), (n)) ! #define PyMem_FREE(p) PyCore_FREE((ANY *)(p)) /* --- 126,131 ---- /* Macros */ #define PyMem_MALLOC(n) PyCore_MALLOC(n) ! #define PyMem_REALLOC(p, n) PyCore_REALLOC((void *)(p), (n)) ! #define PyMem_FREE(p) PyCore_FREE((void *)(p)) /* Index: objimpl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/objimpl.h,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** objimpl.h 2000/07/10 04:30:56 2.22 --- objimpl.h 2000/07/25 12:56:37 2.23 *************** *** 102,107 **** #ifdef NEED_TO_DECLARE_OBJECT_MALLOC_AND_FRIEND ! extern ANY *PyCore_OBJECT_MALLOC_FUNC PyCore_OBJECT_MALLOC_PROTO; ! extern ANY *PyCore_OBJECT_REALLOC_FUNC PyCore_OBJECT_REALLOC_PROTO; extern void PyCore_OBJECT_FREE_FUNC PyCore_OBJECT_FREE_PROTO; #endif --- 102,107 ---- #ifdef NEED_TO_DECLARE_OBJECT_MALLOC_AND_FRIEND ! extern void *PyCore_OBJECT_MALLOC_FUNC PyCore_OBJECT_MALLOC_PROTO; ! extern void *PyCore_OBJECT_REALLOC_FUNC PyCore_OBJECT_REALLOC_PROTO; extern void PyCore_OBJECT_FREE_FUNC PyCore_OBJECT_FREE_PROTO; #endif *************** *** 138,149 **** bytes returns a non-NULL pointer. Returned pointers must be checked for NULL explicitly; no action is performed on failure. */ ! extern DL_IMPORT(ANY *) PyObject_Malloc(size_t); ! extern DL_IMPORT(ANY *) PyObject_Realloc(ANY *, size_t); ! extern DL_IMPORT(void) PyObject_Free(ANY *); /* Macros */ #define PyObject_MALLOC(n) PyCore_OBJECT_MALLOC(n) ! #define PyObject_REALLOC(op, n) PyCore_OBJECT_REALLOC((ANY *)(op), (n)) ! #define PyObject_FREE(op) PyCore_OBJECT_FREE((ANY *)(op)) /* --- 138,149 ---- bytes returns a non-NULL pointer. Returned pointers must be checked for NULL explicitly; no action is performed on failure. */ ! extern DL_IMPORT(void *) PyObject_Malloc(size_t); ! extern DL_IMPORT(void *) PyObject_Realloc(void *, size_t); ! extern DL_IMPORT(void) PyObject_Free(void *); /* Macros */ #define PyObject_MALLOC(n) PyCore_OBJECT_MALLOC(n) ! #define PyObject_REALLOC(op, n) PyCore_OBJECT_REALLOC((void *)(op), (n)) ! #define PyObject_FREE(op) PyCore_OBJECT_FREE((void *)(op)) /* From python-dev@python.org Tue Jul 25 13:56:40 2000 From: python-dev@python.org (Thomas Wouters) Date: Tue, 25 Jul 2000 05:56:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.186,2.187 Message-ID: <200007251256.FAA23530@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv23253/Python Modified Files: ceval.c Log Message: Use 'void' directly instead of the ANY #define, now that all code is ANSI C. Leave the actual #define in for API compatibility. Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.186 retrieving revision 2.187 diff -C2 -r2.186 -r2.187 *** ceval.c 2000/07/22 18:47:25 2.186 --- ceval.c 2000/07/25 12:56:38 2.187 *************** *** 211,216 **** #define NPENDINGCALLS 32 static struct { ! int (*func)(ANY *); ! ANY *arg; } pendingcalls[NPENDINGCALLS]; static volatile int pendingfirst = 0; --- 211,216 ---- #define NPENDINGCALLS 32 static struct { ! int (*func)(void *); ! void *arg; } pendingcalls[NPENDINGCALLS]; static volatile int pendingfirst = 0; *************** *** 219,223 **** int ! Py_AddPendingCall(int (*func)(ANY *), ANY *arg) { static int busy = 0; --- 219,223 ---- int ! Py_AddPendingCall(int (*func)(void *), void *arg) { static int busy = 0; *************** *** 256,261 **** for (;;) { int i; ! int (*func)(ANY *); ! ANY *arg; i = pendingfirst; if (i == pendinglast) --- 256,261 ---- for (;;) { int i; ! int (*func)(void *); ! void *arg; i = pendingfirst; if (i == pendinglast) From python-dev@python.org Tue Jul 25 13:56:40 2000 From: python-dev@python.org (Thomas Wouters) Date: Tue, 25 Jul 2000 05:56:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects listobject.c,2.82,2.83 object.c,2.89,2.90 Message-ID: <200007251256.FAA23523@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv23253/Objects Modified Files: listobject.c object.c Log Message: Use 'void' directly instead of the ANY #define, now that all code is ANSI C. Leave the actual #define in for API compatibility. Index: listobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v retrieving revision 2.82 retrieving revision 2.83 diff -C2 -r2.82 -r2.83 *** listobject.c 2000/07/15 03:31:31 2.82 --- listobject.c 2000/07/25 12:56:38 2.83 *************** *** 1259,1264 **** return NULL; p = ((PyTupleObject *)w)->ob_item; ! memcpy((ANY *)p, ! (ANY *)((PyListObject *)v)->ob_item, n*sizeof(PyObject *)); while (--n >= 0) { --- 1259,1264 ---- return NULL; p = ((PyTupleObject *)w)->ob_item; ! memcpy((void *)p, ! (void *)((PyListObject *)v)->ob_item, n*sizeof(PyObject *)); while (--n >= 0) { Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.89 retrieving revision 2.90 diff -C2 -r2.89 -r2.90 *** object.c 2000/07/16 12:04:31 2.89 --- object.c 2000/07/25 12:56:38 2.90 *************** *** 963,967 **** /* Python's malloc wrappers (see mymalloc.h) */ ! ANY * PyMem_Malloc(size_t nbytes) { --- 963,967 ---- /* Python's malloc wrappers (see mymalloc.h) */ ! void * PyMem_Malloc(size_t nbytes) { *************** *** 973,978 **** } ! ANY * ! PyMem_Realloc(ANY *p, size_t nbytes) { #if _PyMem_EXTRA > 0 --- 973,978 ---- } ! void * ! PyMem_Realloc(void *p, size_t nbytes) { #if _PyMem_EXTRA > 0 *************** *** 984,988 **** void ! PyMem_Free(ANY *p) { PyMem_FREE(p); --- 984,988 ---- void ! PyMem_Free(void *p) { PyMem_FREE(p); *************** *** 992,996 **** /* Python's object malloc wrappers (see objimpl.h) */ ! ANY * PyObject_Malloc(size_t nbytes) { --- 992,996 ---- /* Python's object malloc wrappers (see objimpl.h) */ ! void * PyObject_Malloc(size_t nbytes) { *************** *** 998,1003 **** } ! ANY * ! PyObject_Realloc(ANY *p, size_t nbytes) { return PyObject_REALLOC(p, nbytes); --- 998,1003 ---- } ! void * ! PyObject_Realloc(void *p, size_t nbytes) { return PyObject_REALLOC(p, nbytes); *************** *** 1005,1009 **** void ! PyObject_Free(ANY *p) { PyObject_FREE(p); --- 1005,1009 ---- void ! PyObject_Free(void *p) { PyObject_FREE(p); From python-dev@python.org Tue Jul 25 13:56:40 2000 From: python-dev@python.org (Thomas Wouters) Date: Tue, 25 Jul 2000 05:56:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules dlmodule.c,2.11,2.12 signalmodule.c,2.51,2.52 socketmodule.c,1.122,1.123 timemodule.c,2.96,2.97 Message-ID: <200007251256.FAA23528@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv23253/Modules Modified Files: dlmodule.c signalmodule.c socketmodule.c timemodule.c Log Message: Use 'void' directly instead of the ANY #define, now that all code is ANSI C. Leave the actual #define in for API compatibility. Index: dlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/dlmodule.c,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** dlmodule.c 2000/07/21 06:00:07 2.11 --- dlmodule.c 2000/07/25 12:56:37 2.12 *************** *** 19,23 **** #endif ! typedef ANY *PyUnivPtr; typedef struct { PyObject_HEAD --- 19,23 ---- #endif ! typedef void *PyUnivPtr; typedef struct { PyObject_HEAD Index: signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.51 retrieving revision 2.52 diff -C2 -r2.51 -r2.52 *** signalmodule.c 2000/07/23 21:18:09 2.51 --- signalmodule.c 2000/07/25 12:56:37 2.52 *************** *** 634,638 **** is_tripped++; Handlers[SIGINT].tripped = 1; ! Py_AddPendingCall((int (*)(ANY *))PyErr_CheckSignals, NULL); } --- 634,638 ---- is_tripped++; Handlers[SIGINT].tripped = 1; ! Py_AddPendingCall((int (*)(void *))PyErr_CheckSignals, NULL); } Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.122 retrieving revision 1.123 diff -C2 -r1.122 -r1.123 *** socketmodule.c 2000/07/24 16:26:35 1.122 --- socketmodule.c 2000/07/25 12:56:37 1.123 *************** *** 800,804 **** return NULL; } ! res = setsockopt(s->sock_fd, level, optname, (ANY *)buf, buflen); if (res < 0) return PySocket_Err(); --- 800,804 ---- return NULL; } ! res = setsockopt(s->sock_fd, level, optname, (void *)buf, buflen); if (res < 0) return PySocket_Err(); *************** *** 842,846 **** socklen_t flagsize = sizeof flag; res = getsockopt(s->sock_fd, level, optname, ! (ANY *)&flag, &flagsize); if (res < 0) return PySocket_Err(); --- 842,846 ---- socklen_t flagsize = sizeof flag; res = getsockopt(s->sock_fd, level, optname, ! (void *)&flag, &flagsize); if (res < 0) return PySocket_Err(); *************** *** 856,860 **** return NULL; res = getsockopt(s->sock_fd, level, optname, ! (ANY *)PyString_AsString(buf), &buflen); if (res < 0) { Py_DECREF(buf); --- 856,860 ---- return NULL; res = getsockopt(s->sock_fd, level, optname, ! (void *)PyString_AsString(buf), &buflen); if (res < 0) { Py_DECREF(buf); *************** *** 1231,1235 **** (struct sockaddr *)addrbuf, &addrlen #else ! (ANY *)addrbuf, &addrlen #endif #else --- 1231,1235 ---- (struct sockaddr *)addrbuf, &addrlen #else ! (void *)addrbuf, &addrlen #endif #else Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.96 retrieving revision 2.97 diff -C2 -r2.96 -r2.97 *** timemodule.c 2000/07/24 15:26:39 2.96 --- timemodule.c 2000/07/25 12:56:37 2.97 *************** *** 294,298 **** { int y; ! memset((ANY *) p, '\0', sizeof(struct tm)); if (!PyArg_Parse(args, "(iiiiiiiii)", --- 294,298 ---- { int y; ! memset((void *) p, '\0', sizeof(struct tm)); if (!PyArg_Parse(args, "(iiiiiiiii)", *************** *** 344,348 **** size_t i; ! memset((ANY *) &buf, '\0', sizeof(buf)); if (!PyArg_ParseTuple(args, "sO:strftime", &fmt, &tup) --- 344,348 ---- size_t i; ! memset((void *) &buf, '\0', sizeof(buf)); if (!PyArg_ParseTuple(args, "sO:strftime", &fmt, &tup) *************** *** 399,403 **** if (!PyArg_ParseTuple(args, "s|s:strptime", &buf, &fmt)) return NULL; ! memset((ANY *) &tm, '\0', sizeof(tm)); s = strptime(buf, fmt, &tm); if (s == NULL) { --- 399,403 ---- if (!PyArg_ParseTuple(args, "s|s:strptime", &buf, &fmt)) return NULL; ! memset((void *) &tm, '\0', sizeof(tm)); s = strptime(buf, fmt, &tm); if (s == NULL) { From python-dev@python.org Tue Jul 25 15:11:23 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 25 Jul 2000 07:11:23 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0200.txt,1.3,1.4 Message-ID: <200007251411.HAA10739@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv10717 Modified Files: pep-0200.txt Log Message: add tentative release schedule and contributor guidelines Index: pep-0200.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0200.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** pep-0200.txt 2000/07/21 18:29:05 1.3 --- pep-0200.txt 2000/07/25 14:11:19 1.4 *************** *** 7,11 **** - Introduction --- 7,10 ---- *************** *** 17,26 **** historical record. ! Accepted and completed - Accepted and in progress --- 16,80 ---- historical record. + Tentative Release Schedule ! Aug. 14: All 2.0 PEPs finished / feature freeze ! Aug. 28: 2.0 beta 1 ! Sep. 29: 2.0 final ! ! Guidelines for submitting patches and making changes ! ! Use good sense when committing changes. You should know what we mean ! by good sense or we wouldn't have given you commit privileges <0.5 ! wink>. Some specific examples of good sense include: ! ! - Do whatever the dictator tells you. ! ! - Discuss any controversial changes on python-dev first. If you ! get a lot of +1 votes and no -1 votes, make the change. If you ! get a some -1 votes, think twice; consider asking Guido what he ! thinks. ! ! - If the change is to code you contributed, it probably makes ! sense for you to fix it. ! ! - If the change affects code someone else wrote, it probably makes ! sense to ask him or her first. ! ! - You can use the SF Patch Manager to submit a patch and assign it ! to someone for review. ! ! Any significant new feature must be described in a PEP and approved ! before it is checked in. ! ! Any significant code addition, such as a new module or large patch, ! must include test cases for the regression test and documentation. A ! patch should not be checked in until the tests and documentation are ! ready. ! ! If you fix a bug, you should write a test case that would have caught ! the bug. ! ! If you commit a patch from the SF Patch Manager or fix a bug from the ! Jitterbug database, be sure to reference the patch/bug number in the ! CVS log message. Also be sure to change the status in the patch ! manager or bug database (if you have access to the bug database). ! ! It is not acceptable for any checked in code to cause the regression ! test to fail. If a checkin causes a failure, it must be fixed within ! 24 hours or it will be backed out. ! ! All contributed C code must be ANSI C. If possible check it with two ! different compilers, e.g. gcc and MSVC. ! ! All contributed Python code must follow Guido's Python style guide. ! http://www.python.org/doc/essays/styleguide.html ! ! It is understood that any code contributed will be released under an ! Open Source license. Do not contribute code if it can't be released ! this way. ! Accepted and completed Accepted and in progress *************** *** 38,47 **** The test suite still fails on test_re. ! * snprintf - owner??? Use snprintf to avoid buffer overflows. Need configure hackery to discovery if it is available on the current platform and a default implementation if it is not. http://www.python.org/pipermail/python-dev/2000-April/010051.html - This function is expected to be part of C9X (check). * Support for opcode arguments > 2**16 - Charles Waldman --- 92,100 ---- The test suite still fails on test_re. ! * PyErr_SafeFormat / snprintf - owner??? Use snprintf to avoid buffer overflows. Need configure hackery to discovery if it is available on the current platform and a default implementation if it is not. http://www.python.org/pipermail/python-dev/2000-April/010051.html * Support for opcode arguments > 2**16 - Charles Waldman *************** *** 54,58 **** - Open: proposed but not accepted or declined --- 107,110 ---- *************** *** 78,82 **** - Declined --- 130,133 ---- From python-dev@python.org Tue Jul 25 15:34:40 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 25 Jul 2000 07:34:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib base64.py,1.9,1.10 Message-ID: <200007251434.HAA12721@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv12615/Lib Modified Files: base64.py Log Message: a couple of nits from Patch #100933 Index: base64.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/base64.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** base64.py 2000/02/02 15:10:14 1.9 --- base64.py 2000/07/25 14:34:38 1.10 *************** *** 54,61 **** sys.stdout = sys.stderr print msg ! print """usage: basd64 [-d] [-e] [-u] [-t] [file|-] -d, -u: decode -e: encode (default) ! -t: decode string 'Aladdin:open sesame'""" sys.exit(2) func = encode --- 54,61 ---- sys.stdout = sys.stderr print msg ! print """usage: %s [-d|-e|-u|-t] [file|-] -d, -u: decode -e: encode (default) ! -t: encode and decode string 'Aladdin:open sesame'"""%sys.argv[0] sys.exit(2) func = encode From python-dev@python.org Tue Jul 25 16:07:31 2000 From: python-dev@python.org (Skip Montanaro) Date: Tue, 25 Jul 2000 08:07:31 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0202.txt,1.2,1.3 Message-ID: <200007251507.IAA24153@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv24082 Modified Files: pep-0202.txt Log Message: some content to start things off (maybe someone else will add to it...) Index: pep-0202.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0202.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pep-0202.txt 2000/07/14 03:29:52 1.2 --- pep-0202.txt 2000/07/25 15:07:28 1.3 *************** *** 7,10 **** --- 7,118 ---- + Introduction + + This PEP describes a proposed syntactical extension to Python, list + comprehensions. + + + + The Proposed Solution + + It is proposed to allow conditional construction of list literals using + for and if clauses. They would nest in the same way for loops and if + statements nest now. + + + + Rationale + + List comprehensions provide a more concise way to create lists in + situations where map() and filter() and/or nested loops would currently + be used. + + + Examples + + >>> print [i for i in range(10)] + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + + >>> print [i for i in range(20) if i%2 == 0] + [0, 2, 4, 6, 8, 10, 12, 14, 16, 18] + + >>> nums = [1,2,3,4] + >>> fruit = ["Apples", "Peaches", "Pears", "Bananas"] + >>> print [i,f for i in nums for f in fruit] + [(1, 'Apples'), (1, 'Peaches'), (1, 'Pears'), (1, 'Bananas'), + (2, 'Apples'), (2, 'Peaches'), (2, 'Pears'), (2, 'Bananas'), + (3, 'Apples'), (3, 'Peaches'), (3, 'Pears'), (3, 'Bananas'), + (4, 'Apples'), (4, 'Peaches'), (4, 'Pears'), (4, 'Bananas')] + >>> print [i,f for i in nums for f in fruit if f[0] == "P"] + [(1, 'Peaches'), (1, 'Pears'), + (2, 'Peaches'), (2, 'Pears'), + (3, 'Peaches'), (3, 'Pears'), + (4, 'Peaches'), (4, 'Pears')] + >>> print [i,f for i in nums for f in fruit if f[0] == "P" if i%2 == 1] + [(1, 'Peaches'), (1, 'Pears'), (3, 'Peaches'), (3, 'Pears')] + >>> def zip(*args): + ... return apply(map, (None,)+args) + ... + >>> print [i for i in zip(nums,fruit) if i[0]%2==0] + [(2, 'Peaches'), (4, 'Bananas')] + + + Reference Implementation + + Please refer to + + https://sourceforge.net/patch/?func=detailpatch&patch_id=100654&group_id=5470 + + for a patch that adds list comprehensions to Python. + + + + Open Issues + + Syntax + + Several people proposed connecting or separating syntax between the + various clauses, for example, requiring a semicolon between them to + set them apart: + + [i,f; for i in nums; for f in fruit; if f[0]=="P"; if i%2==1] + + To minimize strain on the Python parser, Guido has suggested + requiring parentheses around the initial tuple: + + [(i,f) for i in nums for f in fruit if f[0]=="P" if i%2==1] + + Semantics + + The semantics of multiple for clauses is not obvious to many + people. Currently, it nests, so that + + [i,f for i in nums for f in fruit] + + is functionally equivalent to + + tmp = [] + for i in nums: + for f in fruit: + tmp.append((i,f)) + + Other people would read it as if it executed + + map(None, nums, fruit) + + It's not clear that this is necessary. The newly proposed zip() + builtin takes care of that case. + + Stability of the Implementation + + The current reference implementation is simply an adaptation of Greg + Ewing's original demonstration of the concept. Other than tracking + changes to the source code to keep it a valid patch, reindenting the + code and switching to function prototypes, nothing has been done to + it. This obviously raises some questions about how stable the code + is. It has not had a lot of exercise, though the patch does include + a few test cases. + + Local Variables: mode: indented-text From python-dev@python.org Tue Jul 25 16:16:43 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 25 Jul 2000 08:16:43 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib os.py,1.35,1.36 Message-ID: <200007251516.IAA30230@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv30223 Modified Files: os.py Log Message: makedirs(), removedirs(): If the tail of the path is empty, do a second split so the logic does not fail in corner cases. This closes bug #407. Index: os.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/os.py,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** os.py 2000/07/16 12:04:30 1.35 --- os.py 2000/07/25 15:16:40 1.36 *************** *** 127,130 **** --- 127,132 ---- """ head, tail = path.split(name) + if not tail: + head, tail = path.split(head) if head and tail and not path.exists(head): makedirs(head, mode) *************** *** 144,147 **** --- 146,151 ---- rmdir(name) head, tail = path.split(name) + if not tail: + head, tail = path.split(head) while head and tail: try: From python-dev@python.org Tue Jul 25 17:43:25 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 25 Jul 2000 09:43:25 -0700 Subject: [Python-checkins] CVS: python/nondist/src/Compiler demo.py,NONE,1.1 Message-ID: <200007251643.JAA11252@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/src/Compiler In directory slayer.i.sourceforge.net:/tmp/cvs-serv11241 Added Files: demo.py Log Message: This script demonstrates use of the visitor interface of the compiler package. --- NEW FILE --- #! /usr/bin/env python """Print names of all methods defined in module This script demonstrates use of the visitor interface of the compiler package. """ import compiler class MethodFinder: """Print the names of all the methods Each visit method takes two arguments, the node and its current scope. The scope is the name of the current class or None. """ def visitClass(self, node, scope=None): self.visit(node.code, node.name) def visitFunction(self, node, scope=None): if scope is not None: print "%s.%s" % (scope, node.name) self.visit(node.code, None) def main(files): mf = MethodFinder() for file in files: f = open(file) buf = f.read() f.close() ast = compiler.parse(buf) compiler.walk(ast, mf) if __name__ == "__main__": import sys main(sys.argv[1:]) From python-dev@python.org Tue Jul 25 18:59:11 2000 From: python-dev@python.org (Barry Warsaw) Date: Tue, 25 Jul 2000 10:59:11 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0001.txt,1.1,1.2 Message-ID: <200007251759.KAA23775@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv23767 Modified Files: pep-0001.txt Log Message: Fleshed out the bulk of the guidelines, after internal discussion among the PEP authors and the BDFL. Index: pep-0001.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0001.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0001.txt 2000/07/13 06:33:08 1.1 --- pep-0001.txt 2000/07/25 17:59:08 1.2 *************** *** 1,7 **** PEP: 1 ! Title: PEP Guidelines Version: $Revision$ ! Owner: bwarsaw@beopen.com (Barry A. Warsaw) ! Status: Incomplete --- 1,207 ---- PEP: 1 ! Title: PEP Purpose and Guidelines Version: $Revision$ ! Author: bwarsaw@beopen.com (Barry A. Warsaw), ! jeremy@beopen.com (Jeremy Hylton) ! Status: Draft ! Type: Informational ! Created: 13-Jun-2000 ! Post-History: ! ! ! What is a PEP? ! ! PEP standards for Python Enhancement Proposal. A PEP is a design ! document providing information to the Python community, or ! describing a new feature for Python. The PEP should provide a ! concise technical specification of the feature and a rationale for ! the feature. ! ! We intend PEPs to be the primary mechanisms for proposing new ! features, for collecting community input on an issue, and for ! documenting the design decisions that have gone into Python. The ! PEP author is responsible for building consensus within the ! community and documenting dissenting opinions. ! ! Because the PEPs are maintained as plain text files under CVS ! control, their revision history is the historical record of the ! feature proposal. ! ! ! Kinds of PEPs ! ! There are two kinds of PEPs. A standards track PEP describes a ! new feature for Python. An informational PEP describes a Python ! design issue, or provides general guidelines or information to the ! Python community, but does not propose a new feature. ! ! ! PEP Workflow ! ! The PEP editor, Barry Warsaw , assigns numbers ! for each PEP and changes its status. ! ! When a new feature is introduced on python-dev, a brief high-level ! discussion should be conducted, not on the merits of the proposal, ! but on whether the idea is significant enough to warrant a PEP. ! Should consensus on PEP-ability be reached, a champion must be ! identified. The champion offers to take the discussion off-line ! and specifies a location (e.g. egroups, python.org, Roundup). ! ! The champion then emails the PEP editor describing the proposal ! and its title. If the PEP editor approves, he will assign the PEP ! a number, label it as standards track or informational, give it ! status 'draft', and create and check-in an initial template for ! the PEP. The PEP editor will not unreasonably deny a PEP. ! Reasons for denying PEP status include duplication of effort, ! being technically unsound, or not in keeping with the Python ! philosophy; the BDFL (Benevolent Dictator for Life, Guido van ! Rossum ) is the final arbitrator of the latter. ! ! Discussion concerning a PEP should initially be kept out of the ! python-dev and python-list mailing lists. Instead, comments ! should be sent to, and collected by, the PEP owner, who has the ! responsibility to incorporate these comments into the document. ! ! The authors of the PEP are then responsible for writing the PEP ! and marshaling community support for it. The structure of a PEP ! is described in detail below. The PEP consists of two parts, a ! design document and a reference implementation. The PEP should be ! reviewed and accepted before a reference implementation is begun, ! unless a reference implementation will aid people in studying the ! PEP. A Standards Track PEP must include an implementation - in ! the form of code, patch, or URL to same - before it can be ! considered Final. ! ! PEP authors are responsible for collecting community feedback on a ! PEP before submitting it for review. A PEP that has not been ! discussed on python-list and python-dev will not be accepted for ! review. However, wherever possible, long open-ended discussions ! on public mailing lists should be avoided. A better strategy is ! to encourage public feedback directly to the PEP author, who ! collects and integrates the comments back into the PEP. ! ! Once the authors have completed a PEP, they must inform the PEP ! editor that it is ready for review. PEPs are reviewed by the BDFL ! and his chosen consultants, who may accept or reject a PEP or send ! it back to the author(s) for revision. ! ! Once a PEP has been accepted, the reference implementation must be ! completed. When the reference implementation is complete and ! accepted by the BDFL, the status will be changed to `Final.' ! ! A PEP can also be assigned status `Deferred.' The PEP author or ! editor can assign the PEP this status when no progress is being ! made on the PEP. Once a PEP is deferred, the PEP editor can ! re-assign it to draft status. ! ! A PEP can also be `Rejected'. Perhaps after all is said and done ! it was not a good idea. It is still important to have a record of ! this fact. ! ! PEP work flow is as follows: ! ! Draft -> Accepted -> Final ! ^ ! +----> Rejected ! v ! Deferred ! ! ! What belongs in a successful PEP? ! ! Each PEP should have the following parts: ! ! 1. Title -- a short, descriptive title ! ! 2. Author(s) -- names and contact info for each author ! ! 3. Abstract -- a short (~200 word) description of the technical issue ! being addressed ! ! 4. Copyright/public domain -- Each PEP must either be explicitly ! labelled in the public domain or the Open Publication ! License[1]. ! ! 5. Specification -- The technical specification should describe ! the syntax and semantics of any new language feature. The ! specification should be detailed enough to allow competing, ! interoperable implementations for any of the current Python ! platforms (CPython, JPython, Python .NET). ! ! 6. Rationale -- The rationale fleshes out the specification by ! describing what motivated the design and why particular design ! decisions were made. It should describe alternate designs that ! were considered and related work, e.g. how the feature is ! supported in other languages. ! ! The rationale should provide evidence of consensus within the ! community and discuss important objections or concerns raised ! during discussion. ! ! 7. Reference Implementation -- The reference implementation must ! be completed before any PEP is given status 'final,' but it ! need not be completed before the PEP is accepted. It is better ! to finish the specification and rationale first and reach ! consensus on it before writing code. ! ! The final implementation must include test code and ! documentation appropriate for either the Python language ! reference or the standard library reference. ! ! ! PEP Style ! ! PEPs are written in plain ASCII text, and should adhere to a ! rigid style. There is a Python script that parses this style and ! converts the plain text PEP to HTML for viewing on the web. ! ! Each PEP begins with an RFC822 style header section. Required ! headers are as follows, and must appear in this order: ! ! PEP: ! Title: ! Version: ! Author: ! Status: ! Type: ! Created: ! Post-History: ! ! Standards track PEPs should additionally have a Python-Version: ! header which indicates the version of Python that the feature will ! be released with. ! ! While a PEP is in private discussions (usually during the initial ! Draft phase), a Discussions-To: header will indicate the mailing ! list or URL where the PEP is being discussed. ! ! PEP heading should begin in column zero and should be capitalized. ! The body of each section should be indented 4 spaces. Code ! samples inside body sections should be indented a further 4 ! spaces, and other indentation can be used as required to make the ! text readable. You should use two blank lines between the last ! line of a section's body and the next section heading. ! ! No tabs should appear in the document at all. A PEP should ! include the Emacs stanza included by example in this PEP to aid ! Emacs editors. ! ! A PEP must contain a Copyright heading, and it is strongly ! recommended to put the PEP in the public domain. ! ! You should footnote any URLs in the body of the PEP, and a PEP ! should include a References section with those URLs expanded. ! ! ! Copyright ! ! This document has been placed in the public domain. ! ! ! References ! ! [1] http://www.opencontent.org/openpub/ ! From python-dev@python.org Tue Jul 25 20:27:20 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 25 Jul 2000 12:27:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/doc doc.tex,1.22,1.23 Message-ID: <200007251927.MAA12305@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv12293 Modified Files: doc.tex Log Message: Add entries for the distutils documents to the directories table. Index: doc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/doc/doc.tex,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** doc.tex 2000/07/06 05:24:41 1.22 --- doc.tex 2000/07/25 19:27:17 1.23 *************** *** 99,104 **** --- 99,106 ---- \begin{tableii}{p{.75in}|p{3in}}{filenq}{Directory}{Document Title} \lineii{api/}{\citetitle[../api/api.html]{The Python/C API}} + \lineii{dist/}{\citetitle[../dist/dist.html]{Distributing Python Modules}} \lineii{doc/}{\citetitle[../doc/doc.html]{Documenting Python}} \lineii{ext/}{\citetitle[../ext/ext.html]{Extending and Embedding the Python Interpreter}} + \lineii{inst/}{\citetitle[../inst/inst.html]{Installing Python Modules}} \lineii{lib/}{\citetitle[../lib/lib.html]{Python Library Reference}} \lineii{mac/}{\citetitle[../mac/mac.html]{Macintosh Module Reference}} From python-dev@python.org Tue Jul 25 21:49:01 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 25 Jul 2000 13:49:01 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0160.txt,1.2,1.3 Message-ID: <200007252049.NAA26447@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv26434 Modified Files: pep-0160.txt Log Message: More explanation of feature requirements and mechanics of construction. Index: pep-0160.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0160.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pep-0160.txt 2000/07/25 04:00:57 1.2 --- pep-0160.txt 2000/07/25 20:48:58 1.3 *************** *** 1,19 **** ! PEP: 160 ! Title: Python 1.6 Release Schedule ! Version: $Revision$ ! Owner: fdrake@beopen.com (Fred L. Drake, Jr.) ! Python-Version: 2.0 ! Status: Incomplete Introduction ! This PEP describes the Python 1.6 release schedule, tracking the ! status and ownership of the major new features, summarizes ! discussions held in mailing list forums, and provides URLs for ! further information, patches, and other outstanding issues. The ! CVS revision history of this file contains the definitive ! historical record. Schedule --- 1,19 ---- ! PEP: 160 ! Title: Python 1.6 Release Schedule ! Version: $Revision$ ! Owner: Fred L. Drake, Jr. ! Python-Version: 1.6 ! Status: Incomplete Introduction ! This PEP describes the Python 1.6 release schedule. The CVS ! revision history of this file contains the definitive historical ! record. + This release will be produced by BeOpen PythonLabs staff for the + Corporation for National Research Initiatives (CNRI). + Schedule *************** *** 32,35 **** --- 32,52 ---- be provided, including all methods and codec support. + * SRE: Fredrik Lundh's new regular expression engine will be used + to provide support for both 8-bit strings and Unicode strings. + It must pass the regression test used for the pcre-based version + of the re module. + + + Mechanism + + The release will be created as a branch from the development tree + rooted at CNRI's close of business on 16 May 2000. Patches + required from more recent checkins will be merged in by moving the + branch tag on individual files whenever possible in order to + reduce mailing list clutter and avoid divergent and incompatible + implementations. + + Patches and features will be merged to the extent required to pass + regression tests in effect on 16 May 2000. *************** *** 37,41 **** This document has been placed in the public domain. - --- 54,57 ---- From python-dev@python.org Tue Jul 25 22:51:58 2000 From: python-dev@python.org (Barry Warsaw) Date: Tue, 25 Jul 2000 14:51:58 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.4,1.5 Message-ID: <200007252151.OAA12672@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv12662 Modified Files: pep-0201.txt Log Message: In a compromise with JHy, and to be more consistent with the style now documented in PEP1, remove the Emacs page breaks. Also, Owner: -> Author:, added Created: and Post-History: headers Changed "Standard For-Loops" section to "Motivation" and shortened considerably; readers already know how for-loops work in Python. Added notes about Guido's veto of lazy evaluation. Index: pep-0201.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** pep-0201.txt 2000/07/24 17:40:00 1.4 --- pep-0201.txt 2000/07/25 21:51:55 1.5 *************** *** 2,11 **** Title: Parallel Iteration Version: $Revision$ ! Owner: bwarsaw@beopen.com (Barry A. Warsaw) Python-Version: 2.0 Status: Draft - Introduction --- 2,12 ---- Title: Parallel Iteration Version: $Revision$ ! Author: bwarsaw@beopen.com (Barry A. Warsaw) Python-Version: 2.0 Status: Draft + Created: 13-Jul-2000 + Post-History: Introduction *************** *** 20,59 **** ! ! Standard For-Loops ! Motivation for this feature has its roots in a concept described ! as `parallel for loops'. A standard for-loop in Python iterates ! over every element in the sequence until the sequence is ! exhausted. A `break' statement inside the loop suite causes an ! explicit loop exit. For-loops also have else: clauses which get ! executed when the loop exits normally (i.e. not by execution of a ! break). ! ! For-loops can iterate over built-in types such as lists and ! tuples, but they can also iterate over instance types that conform ! to an informal sequence protocol. This protocol states that the ! instance should implement the __getitem__() method, expecting a ! monotonically increasing index starting at 0, and this method ! should raise an IndexError when the sequence is exhausted. This ! protocol is currently undocumented -- a defect in Python's ! documentation hopefully soon corrected. - For-loops are described in the Python language reference - manual[1]. - An example for-loop: - - >>> for i in (1, 2, 3): print i - ... - 1 - 2 - 3 - - In this example, the variable `i' is called the `target', and is - assigned the next element of the list, each time through the loop. - - - Parallel For-Loops --- 21,37 ---- ! Motivation ! Standard for-loops in Python iterate over every element in a ! sequence until the sequence is exhausted[1]. However, for-loops ! iterate over only a single sequence, and it is often desirable to ! loop over more than one sequence, in a lock-step, "Chinese Menu" ! type of way. ! ! The common idioms used to accomplish this are unintuitive and ! inflexible. This PEP proposes a standard way of performing such ! iterations by introducing a new builtin function called `zip'. Parallel For-Loops *************** *** 71,80 **** (2, 5) (3, 6) - - Here, map() returns a list of N-tuples, where N is the number of - sequences in map()'s argument list (after the initial `None'). - Each tuple is constructed of the i-th elements from each of the - argument lists, specifically in this example: - >>> map(None, a, b) [(1, 4), (2, 5), (3, 6)] --- 49,52 ---- *************** *** 107,111 **** - The Proposed Solution --- 79,82 ---- *************** *** 130,134 **** - Lazy Execution --- 101,104 ---- *************** *** 139,144 **** on demand. ! Examples --- 109,115 ---- on demand. + Guido is strongly opposed to lazy execution. See Open Issues. ! Examples *************** *** 195,199 **** - Reference Implementation --- 166,169 ---- *************** *** 293,297 **** - Rejected Elaborations --- 263,266 ---- *************** *** 353,359 **** - Open Issues - What should "zip(a)" do? Given --- 322,331 ---- Open Issues + - Guido opposes lazy evaluation for zip(). He believes zip() + should return a real list, with an xzip() lazy evaluator added + later if necessary. + - What should "zip(a)" do? Given *************** *** 428,432 **** - References --- 400,403 ---- *************** *** 436,440 **** TBD: URL to python-dev archives - Copyright --- 407,410 ---- From python-dev@python.org Tue Jul 25 23:00:08 2000 From: python-dev@python.org (Barry Warsaw) Date: Tue, 25 Jul 2000 15:00:08 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.5,1.6 Message-ID: <200007252200.PAA13379@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv13321 Modified Files: pep-0201.txt Log Message: Added Paul's latest crop of names to the list of proposed alternatives in Open Issues. Index: pep-0201.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** pep-0201.txt 2000/07/25 21:51:55 1.5 --- pep-0201.txt 2000/07/25 22:00:05 1.6 *************** *** 376,383 **** (but are not limited to!): marry, weave, parallel, lace, braid, interlace, permute, furl, tuples, lists, stitch, collate, knit, ! plait, fold, and with. All have disadvantages, and there is no ! clear unanimous choice, therefore the decision was made to go ! with `zip' because the same functionality is available in other ! languages (e.g. Haskell) under the name `zip'[2]. - Should zip() be including in the builtins module or should it be --- 376,386 ---- (but are not limited to!): marry, weave, parallel, lace, braid, interlace, permute, furl, tuples, lists, stitch, collate, knit, ! plait, fold, with, mktuples, maketuples, totuples, gentuples, ! tupleorama. ! ! All have disadvantages, and there is no clear unanimous choice, ! therefore the decision was made to go with `zip' because the ! same functionality is available in other languages ! (e.g. Haskell) under the name `zip'[2]. - Should zip() be including in the builtins module or should it be From python-dev@python.org Tue Jul 25 23:15:47 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Tue, 25 Jul 2000 15:15:47 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_compile,NONE,1.1 Message-ID: <200007252215.PAA21715@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv21660/output Added Files: test_compile Log Message: added test case for fixed duplicate arguments bug in Python/compile.c --- NEW FILE --- test_compile From python-dev@python.org Tue Jul 25 23:15:47 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Tue, 25 Jul 2000 15:15:47 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_compile.py,NONE,1.1 Message-ID: <200007252215.PAA21712@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv21660 Added Files: test_compile.py Log Message: added test case for fixed duplicate arguments bug in Python/compile.c --- NEW FILE --- from test_support import verbose, TestFailed if verbose: print 'Running test on duplicate arguments' try: exec('def f(a, a): pass') raise TestFailed, "duplicate arguments" except SyntaxError: pass try: exec('def f(a = 0, a = 1): pass') raise TestFailed, "duplicate keyword arguments" except SyntaxError: pass From python-dev@python.org Wed Jul 26 03:57:23 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 25 Jul 2000 19:57:23 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.34,2.35 Message-ID: <200007260257.TAA03232@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv3159 Modified Files: _cursesmodule.c Log Message: Added wrappers for tiget{flag,num,str}, for querying terminfo capabilities Index: _cursesmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v retrieving revision 2.34 retrieving revision 2.35 diff -C2 -r2.34 -r2.35 *** _cursesmodule.c 2000/07/25 12:37:41 2.34 --- _cursesmodule.c 2000/07/26 02:57:20 2.35 *************** *** 2005,2008 **** --- 2005,2052 ---- static PyObject * + PyCurses_tigetflag(PyObject *self, PyObject *args) + { + char *capname; + + PyCursesInitialised; + + if (!PyArg_ParseTuple(args, "z", &capname)) + return NULL; + + return PyInt_FromLong( (long) tigetflag( capname ) ); + } + + static PyObject * + PyCurses_tigetnum(PyObject *self, PyObject *args) + { + char *capname; + + PyCursesInitialised; + + if (!PyArg_ParseTuple(args, "z", &capname)) + return NULL; + + return PyInt_FromLong( (long) tigetnum( capname ) ); + } + + static PyObject * + PyCurses_tigetstr(PyObject *self, PyObject *args) + { + char *capname; + + PyCursesInitialised; + + if (!PyArg_ParseTuple(args, "z", &capname)) + return NULL; + + capname = tigetstr( capname ); + if (capname == 0 || capname == (char*) -1) { + Py_INCREF(Py_None); + return Py_None; + } + return PyString_FromString( capname ); + } + + static PyObject * PyCurses_TypeAhead(PyObject *self, PyObject *args) { *************** *** 2150,2153 **** --- 2194,2200 ---- {"termattrs", (PyCFunction)PyCurses_termattrs}, {"termname", (PyCFunction)PyCurses_termname}, + {"tigetflag", (PyCFunction)PyCurses_tigetflag, METH_VARARGS}, + {"tigetnum", (PyCFunction)PyCurses_tigetnum, METH_VARARGS}, + {"tigetstr", (PyCFunction)PyCurses_tigetstr, METH_VARARGS}, {"typeahead", (PyCFunction)PyCurses_TypeAhead}, {"unctrl", (PyCFunction)PyCurses_UnCtrl}, From python-dev@python.org Wed Jul 26 03:59:15 2000 From: python-dev@python.org (A.M. Kuchling) Date: Tue, 25 Jul 2000 19:59:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcurses.tex,1.10,1.11 Message-ID: <200007260259.TAA03402@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv3372 Modified Files: libcurses.tex Log Message: Document tiget{flag,num,str} Index: libcurses.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** libcurses.tex 2000/07/24 19:35:52 1.10 --- libcurses.tex 2000/07/26 02:59:13 1.11 *************** *** 439,442 **** --- 439,463 ---- \end{funcdesc} + \begin{funcdesc}{tigetflag}{capname} + Returns the value of the Boolean capability corresponding to the + terminfo capability name \var{capname}. The value -1 is returned if + \var{capname} is not a Boolean capability, or 0 if it is canceled or + absent from the terminal description. + \end{funcdesc} + + \begin{funcdesc}{tigetnum}{capname} + Returns the value of the numeric capability corresponding to the + terminfo capability name \var{capname}. The value -2 is returned if + \var{capname} is not a numeric capability, or -1 if it is canceled or absent + from the terminal description. + \end{funcdesc} + + \begin{funcdesc}{tigetstr}{capname} + Returns the value of the string capability corresponding to the + terminfo capability name \var{capname}. \code{None} is returned if + \var{capname} is not a string capability, or is canceled or absent + from the terminal description. + \end{funcdesc} + \begin{funcdesc}{typeahead}{fd} Specifies that the file descriptor \var{fd} be used for typeahead From python-dev@python.org Wed Jul 26 04:56:09 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 25 Jul 2000 20:56:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/perfecthash GenUCNHash.py,1.4,1.5 perfect_hash.py,1.2,1.3 perfhash.c,1.2,1.3 Message-ID: <200007260356.UAA19987@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/perfecthash In directory slayer.i.sourceforge.net:/tmp/cvs-serv19915/Tools/perfecthash Modified Files: GenUCNHash.py perfect_hash.py perfhash.c Log Message: Fix UCNs machine with >= 32bit longs originally submitted by Bill Tutt Note: This code is actually going to be replaced in 2.0 by /F's new database. Until then, this patch keeps the test suite working. Index: GenUCNHash.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/perfecthash/GenUCNHash.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** GenUCNHash.py 2000/07/07 17:53:54 1.4 --- GenUCNHash.py 2000/07/26 03:56:06 1.5 *************** *** 13,18 **** # These variables determine which hash function is tried first. # Yields a multiple of 1.7875 for UnicodeData.txt on 2000/06/24/ ! f1Seed = 1694245428 ! f2Seed = -1917331657 # Maximum allowed multipler, if this isn't None then instead of continually --- 13,18 ---- # These variables determine which hash function is tried first. # Yields a multiple of 1.7875 for UnicodeData.txt on 2000/06/24/ ! f1Seed = 0x64fc2234 ! f2Seed = 0x8db7d737 # Maximum allowed multipler, if this isn't None then instead of continually Index: perfect_hash.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/perfecthash/perfect_hash.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** perfect_hash.py 2000/06/30 09:56:00 1.2 --- perfect_hash.py 2000/07/26 03:56:06 1.3 *************** *** 74,80 **** if self.caseInsensitive: key = string.upper(key) ! x = perfhash.hash(self.seed, len(self.junk), key) % self.N ! #h = hash(self.junk + key) % self.N ! #assert x == h return x --- 74,78 ---- if self.caseInsensitive: key = string.upper(key) ! x = perfhash.hash(self.seed, len(self.junk), key, self.N) return x *************** *** 83,96 **** register int len; register unsigned char *p; ! register long x; len = cch; p = (unsigned char *) key; ! x = %(junkSeed)d; while (--len >= 0) ! x = (1000003*x) ^ """ % \ { "lenJunk" : len(self.junk), ! "junkSeed" : self.seed, } --- 81,100 ---- register int len; register unsigned char *p; ! register unsigned long x; len = cch; p = (unsigned char *) key; ! x = %(junkSeed)s; while (--len >= 0) ! { ! /* (1000003 * x) ^ toupper(*(p++)) ! * translated to handle > 32 bit longs ! */ ! x = (0xf4243 * x); ! x = x & 0xFFFFFFFF; ! x = x ^ """ % \ { "lenJunk" : len(self.junk), ! "junkSeed" : hex(self.seed), } *************** *** 100,117 **** s = s + "*(p++);" s = s + """ x ^= cch + %(lenJunk)d; ! if (x == -1) ! x = -2; ! x %%= k_cHashElements; ! /* ensure the returned value is positive so we mimic Python's %% operator */ ! if (x < 0) ! x += k_cHashElements; return x; } """ % { "lenJunk" : len(self.junk), ! "junkSeed" : self.seed, } return s - WHITE, GREY, BLACK = 0,1,2 class Graph: --- 104,130 ---- s = s + "*(p++);" s = s + """ + } x ^= cch + %(lenJunk)d; ! if (x == 0xFFFFFFFF) ! x = 0xfffffffe; ! if (x & 0x80000000) ! { ! /* Emulate 32-bit signed (2's complement) modulo operation */ ! x = (~x & 0xFFFFFFFF) + 1; ! x %%= k_cHashElements; ! if (x != 0) ! { ! x = x + (~k_cHashElements & 0xFFFFFFFF) + 1; ! x = (~x & 0xFFFFFFFF) + 1; ! } ! } ! else ! x %%= k_cHashElements; return x; } """ % { "lenJunk" : len(self.junk), ! "junkSeed" : hex(self.seed), } return s WHITE, GREY, BLACK = 0,1,2 class Graph: *************** *** 140,145 **** if vertex1 > vertex2: vertex1, vertex2 = vertex2, vertex1 ! # if self.edges.has_key( (vertex1, vertex2) ): ! # raise ValueError, 'Collision: vertices already connected' self.edges[ (vertex1, vertex2) ] = value --- 153,158 ---- if vertex1 > vertex2: vertex1, vertex2 = vertex2, vertex1 ! if self.edges.has_key( (vertex1, vertex2) ): ! raise ValueError, 'Collision: vertices already connected' self.edges[ (vertex1, vertex2) ] = value *************** *** 342,347 **** code = code + """ ! static const %s G[k_cHashElements]; ! static const %s %s[k_cKeys]; """ % (self.type, dataArrayType, dataArrayName) --- 355,360 ---- code = code + """ ! staticforward const %s G[k_cHashElements]; ! staticforward const %s %s[k_cKeys]; """ % (self.type, dataArrayType, dataArrayName) *************** *** 554,558 **** for k, v in keys: h1 = f1(k) ; h2 = f2(k) ! G.connect( h1,h2, v) # Check if the resulting graph is acyclic; if it is, --- 567,571 ---- for k, v in keys: h1 = f1(k) ; h2 = f2(k) ! G.connect( h1, h2, v) # Check if the resulting graph is acyclic; if it is, *************** *** 599,605 **** sys.stderr.write('\nIn order to regenerate this hash function, \n') sys.stderr.write('you need to pass these following values back in:\n') ! sys.stderr.write('f1 seed: %s\n' % repr(f1.seed)) ! sys.stderr.write('f2 seed: %s\n' % repr(f2.seed)) sys.stderr.write('initial multipler: %s\n' % c) return PerfectHash(cchMaxKey, f1, f2, G, N, len(keys), maxHashValue) --- 612,619 ---- sys.stderr.write('\nIn order to regenerate this hash function, \n') sys.stderr.write('you need to pass these following values back in:\n') ! sys.stderr.write('f1 seed: %s\n' % hex(f1.seed)) ! sys.stderr.write('f2 seed: %s\n' % hex(f2.seed)) sys.stderr.write('initial multipler: %s\n' % c) return PerfectHash(cchMaxKey, f1, f2, G, N, len(keys), maxHashValue) + Index: perfhash.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/perfecthash/perfhash.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** perfhash.c 2000/07/22 19:25:51 1.2 --- perfhash.c 2000/07/26 03:56:06 1.3 *************** *** 6,14 **** register int len; register unsigned char *p; ! register long x; ! long lSeed; unsigned long cchSeed; ! if (!PyArg_ParseTuple(args, "iiO:hash", &lSeed, &cchSeed, &a)) return NULL; if (!PyString_Check(a)) --- 6,16 ---- register int len; register unsigned char *p; ! register unsigned long x; ! unsigned long ulSeed; unsigned long cchSeed; + unsigned long cHashElements; ! if (!PyArg_ParseTuple(args, "llOl:hash", ! &ulSeed, &cchSeed, &a, &cHashElements)) return NULL; if (!PyString_Check(a)) *************** *** 20,30 **** len = a->ob_size; p = (unsigned char *) a->ob_sval; ! x = lSeed; while (--len >= 0) ! x = (1000003*x) ^ *p++; x ^= a->ob_size + cchSeed; ! if (x == -1) ! x = -2; ! return PyInt_FromLong(x); } --- 22,54 ---- len = a->ob_size; p = (unsigned char *) a->ob_sval; ! x = ulSeed; while (--len >= 0) ! { ! /* (1000003 * x) ^ *p++ ! * translated to handle > 32 bit longs ! */ ! x = (0xf4243 * x); ! x = x & 0xFFFFFFFF; ! x = x ^ *p++; ! } x ^= a->ob_size + cchSeed; ! if (x == 0xFFFFFFFF) ! x = 0xfffffffe; ! if (x & 0x80000000) ! { ! /* Emulate Python 32-bit signed (2's complement) ! * modulo operation ! */ ! x = (~x & 0xFFFFFFFF) + 1; ! x %= cHashElements; ! if (x != 0) ! { ! x = x + (~cHashElements & 0xFFFFFFFF) + 1; ! x = (~x & 0xFFFFFFFF) + 1; ! } ! } ! else ! x %= cHashElements; ! return PyInt_FromLong((long)x); } *************** *** 34,38 **** register int len; register unsigned char *p; ! register long x; if (!PyString_Check(args)) --- 58,62 ---- register int len; register unsigned char *p; ! register unsigned long x; if (!PyString_Check(args)) *************** *** 46,53 **** len = a->ob_size; p = (unsigned char *) a->ob_sval; ! x = *p << 7; while (--len >= 0) ! x = (1000003*x) ^ *p++; ! return PyInt_FromLong(x); } --- 70,84 ---- len = a->ob_size; p = (unsigned char *) a->ob_sval; ! x = (*p << 7) & 0xFFFFFFFF; while (--len >= 0) ! { ! /* (1000003 * x) ^ *p++ ! * translated to handle > 32 bit longs ! */ ! x = (0xf4243 * x); ! x = x & 0xFFFFFFFF; ! x = x ^ *p++; ! } ! return PyInt_FromLong((long)x); } *************** *** 69,72 **** NULL, NULL, PYTHON_API_VERSION); if ( m == NULL ) ! Py_FatalError("can't initialize module hashModule"); } --- 100,114 ---- NULL, NULL, PYTHON_API_VERSION); if ( m == NULL ) ! Py_FatalError("can't initialize module perfhash"); } + + + + + + + + + + + From python-dev@python.org Wed Jul 26 04:56:09 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 25 Jul 2000 20:56:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules ucnhash.c,1.2,1.3 Message-ID: <200007260356.UAA19984@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv19915/Modules Modified Files: ucnhash.c Log Message: Fix UCNs machine with >= 32bit longs originally submitted by Bill Tutt Note: This code is actually going to be replaced in 2.0 by /F's new database. Until then, this patch keeps the test suite working. Index: ucnhash.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/ucnhash.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ucnhash.c 2000/06/29 00:06:39 1.2 --- ucnhash.c 2000/07/26 03:56:06 1.3 *************** *** 12,16 **** * http://starship.python.net/crew/amk/python/code/perfect-hash.html * ! * Generated on: Wed Jun 28 03:34:07 2000 */ --- 12,16 ---- * http://starship.python.net/crew/amk/python/code/perfect-hash.html * ! * Generated on: Fri Jul 14 08:00:58 2000 */ *************** *** 27,44 **** register int len; register unsigned char *p; ! register long x; len = cch; p = (unsigned char *) key; ! x = 1694245428; while (--len >= 0) ! x = (1000003*x) ^ toupper(*(p++)); x ^= cch + 10; ! if (x == -1) ! x = -2; ! x %= k_cHashElements; ! /* ensure the returned value is positive so we mimic Python's % operator */ ! if (x < 0) ! x += k_cHashElements; return x; } --- 27,60 ---- register int len; register unsigned char *p; ! register unsigned long x; len = cch; p = (unsigned char *) key; ! x = 0x64fc2234; while (--len >= 0) ! { ! /* (1000003 * x) ^ toupper(*(p++)) ! * translated to handle > 32 bit longs ! */ ! x = (0xf4243 * x); ! x = x & 0xFFFFFFFF; ! x = x ^ toupper(*(p++)); ! } x ^= cch + 10; ! if (x == 0xFFFFFFFF) ! x = 0xfffffffe; ! if (x & 0x80000000) ! { ! /* Emulate 32-bit signed (2's complement) modulo operation */ ! x = (~x & 0xFFFFFFFF) + 1; ! x %= k_cHashElements; ! if (x != 0) ! { ! x = x + (~k_cHashElements & 0xFFFFFFFF) + 1; ! x = (~x & 0xFFFFFFFF) + 1; ! } ! } ! else ! x %= k_cHashElements; return x; } *************** *** 49,66 **** register int len; register unsigned char *p; ! register long x; len = cch; p = (unsigned char *) key; ! x = -1917331657; while (--len >= 0) ! x = (1000003*x) ^ toupper(*(p++)); x ^= cch + 10; ! if (x == -1) ! x = -2; ! x %= k_cHashElements; ! /* ensure the returned value is positive so we mimic Python's % operator */ ! if (x < 0) ! x += k_cHashElements; return x; } --- 65,98 ---- register int len; register unsigned char *p; ! register unsigned long x; len = cch; p = (unsigned char *) key; ! x = 0x8db7d737; while (--len >= 0) ! { ! /* (1000003 * x) ^ toupper(*(p++)) ! * translated to handle > 32 bit longs ! */ ! x = (0xf4243 * x); ! x = x & 0xFFFFFFFF; ! x = x ^ toupper(*(p++)); ! } x ^= cch + 10; ! if (x == 0xFFFFFFFF) ! x = 0xfffffffe; ! if (x & 0x80000000) ! { ! /* Emulate 32-bit signed (2's complement) modulo operation */ ! x = (~x & 0xFFFFFFFF) + 1; ! x %= k_cHashElements; ! if (x != 0) ! { ! x = x + (~k_cHashElements & 0xFFFFFFFF) + 1; ! x = (~x & 0xFFFFFFFF) + 1; ! } ! } ! else ! x %= k_cHashElements; return x; } From python-dev@python.org Wed Jul 26 05:11:25 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 25 Jul 2000 21:11:25 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0204.txt,1.2,1.3 Message-ID: <200007260411.VAA27894@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv27887 Modified Files: pep-0204.txt Log Message: Do not start non-heading content on the first character of the line (after the header). Index: pep-0204.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0204.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pep-0204.txt 2000/07/18 10:01:12 1.2 --- pep-0204.txt 2000/07/26 04:11:22 1.3 *************** *** 264,269 **** References: ! [1] ! http://sourceforge.net/patch/?func=detailpatch&patch_id=100902&group_id=5470 --- 264,268 ---- References: ! [1] http://sourceforge.net/patch/?func=detailpatch&patch_id=100902&group_id=5470 From python-dev@python.org Wed Jul 26 05:12:44 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 25 Jul 2000 21:12:44 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0200.txt,1.4,1.5 Message-ID: <200007260412.VAA27930@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv27923 Modified Files: pep-0200.txt Log Message: Do not start non-heading content on the first character of the line (after the header). Index: pep-0200.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0200.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** pep-0200.txt 2000/07/25 14:11:19 1.4 --- pep-0200.txt 2000/07/26 04:12:42 1.5 *************** *** 18,30 **** Tentative Release Schedule ! Aug. 14: All 2.0 PEPs finished / feature freeze ! Aug. 28: 2.0 beta 1 ! Sep. 29: 2.0 final Guidelines for submitting patches and making changes ! Use good sense when committing changes. You should know what we mean ! by good sense or we wouldn't have given you commit privileges <0.5 ! wink>. Some specific examples of good sense include: - Do whatever the dictator tells you. --- 18,30 ---- Tentative Release Schedule ! Aug. 14: All 2.0 PEPs finished / feature freeze ! Aug. 28: 2.0 beta 1 ! Sep. 29: 2.0 final Guidelines for submitting patches and making changes ! Use good sense when committing changes. You should know what we ! mean by good sense or we wouldn't have given you commit privileges ! <0.5 wink>. Some specific examples of good sense include: - Do whatever the dictator tells you. *************** *** 44,76 **** to someone for review. ! Any significant new feature must be described in a PEP and approved ! before it is checked in. ! Any significant code addition, such as a new module or large patch, ! must include test cases for the regression test and documentation. A ! patch should not be checked in until the tests and documentation are ! ready. ! ! If you fix a bug, you should write a test case that would have caught ! the bug. ! ! If you commit a patch from the SF Patch Manager or fix a bug from the ! Jitterbug database, be sure to reference the patch/bug number in the ! CVS log message. Also be sure to change the status in the patch ! manager or bug database (if you have access to the bug database). ! ! It is not acceptable for any checked in code to cause the regression ! test to fail. If a checkin causes a failure, it must be fixed within ! 24 hours or it will be backed out. ! ! All contributed C code must be ANSI C. If possible check it with two ! different compilers, e.g. gcc and MSVC. ! ! All contributed Python code must follow Guido's Python style guide. ! http://www.python.org/doc/essays/styleguide.html ! ! It is understood that any code contributed will be released under an ! Open Source license. Do not contribute code if it can't be released ! this way. Accepted and completed --- 44,77 ---- to someone for review. ! Any significant new feature must be described in a PEP and ! approved before it is checked in. ! Any significant code addition, such as a new module or large ! patch, must include test cases for the regression test and ! documentation. A patch should not be checked in until the tests ! and documentation are ready. ! ! If you fix a bug, you should write a test case that would have ! caught the bug. ! ! If you commit a patch from the SF Patch Manager or fix a bug from ! the Jitterbug database, be sure to reference the patch/bug number ! in the CVS log message. Also be sure to change the status in the ! patch manager or bug database (if you have access to the bug ! database). ! ! It is not acceptable for any checked in code to cause the ! regression test to fail. If a checkin causes a failure, it must ! be fixed within 24 hours or it will be backed out. ! ! All contributed C code must be ANSI C. If possible check it with ! two different compilers, e.g. gcc and MSVC. ! ! All contributed Python code must follow Guido's Python style ! guide. http://www.python.org/doc/essays/styleguide.html ! ! It is understood that any code contributed will be released under ! an Open Source license. Do not contribute code if it can't be ! released this way. Accepted and completed *************** *** 116,120 **** Small optimization achieved by using the code object's lnotab instead of the SET_LINENO instruction. Uses code rewriting ! technique (that Guido's growns on) to support debugger, which uses SET_LINENO. --- 117,121 ---- Small optimization achieved by using the code object's lnotab instead of the SET_LINENO instruction. Uses code rewriting ! technique (that Guido's frowns on) to support debugger, which uses SET_LINENO. From python-dev@python.org Wed Jul 26 05:14:32 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 25 Jul 2000 21:14:32 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep2html.py,1.4,1.5 Message-ID: <200007260414.VAA28076@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv28069 Modified Files: pep2html.py Log Message: If form-feeds are not going to be used to indicate what can be marked as a header, use a non-white character in the first column. This looks a little cleaner. Index: pep2html.py =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** pep2html.py 2000/07/25 04:12:28 1.4 --- pep2html.py 2000/07/26 04:14:30 1.5 *************** *** 60,97 **** title = "PEP " + pep + " -- " + title if title: ! fo.write("%s\n" % cgi.escape(title)) fo.write("\n") # body ! fo.write("\n") ! fo.write("[home]\n") if os.path.basename(infile) != "pep-0000.txt": ! fo.write("[index]\n") ! fo.write("
      \n\n") for k, v in header: fo.write(" \n" % (cgi.escape(k), cgi.escape(v))) title = 0 ! fo.write("
      %s:%s
      \n
      ")
            while 1:
                line = fi.readline()
                if not line:
                    break
      !         if line[:1] == "\f":
      !             fo.write("
      ") ! # fo.write("\n

      \n")
      !             title = 1
      !         else:
      !             line = fixpat.sub(lambda x, c=infile: fixanchor(c, x), line)
      !             if title:
                        if line.strip() == "Local Variables:":
                            break
                        fo.write("
      \n

      %s

      \n
      " % line.strip())
      -                 # fo.write("

      %s

      \n" % line)
                        title = 0
                    else:
                        fo.write(line)
      !     fo.write("
      \n") ! fo.write("\n") ! fo.write("\n") fo.close() os.chmod(outfile, 0664) --- 60,92 ---- title = "PEP " + pep + " -- " + title if title: ! fo.write(" %s\n" % cgi.escape(title)) fo.write("\n") # body ! fo.write('\n') ! fo.write('[home]\n') if os.path.basename(infile) != "pep-0000.txt": ! fo.write('[index]\n') ! fo.write('
      \n\n') for k, v in header: fo.write(" \n" % (cgi.escape(k), cgi.escape(v))) title = 0 ! fo.write("
      %s:%s
      \n
      \n
      ")
            while 1:
                line = fi.readline()
                if not line:
                    break
      !         if line[0] != "\f":
      !             if line[0].strip():
                        if line.strip() == "Local Variables:":
                            break
                        fo.write("
      \n

      %s

      \n
      " % line.strip())
                        title = 0
                    else:
      +                 line = fixpat.sub(lambda x, c=infile: fixanchor(c, x), line)
                        fo.write(line)
      !     fo.write("
      \n" ! "\n" ! "\n") fo.close() os.chmod(outfile, 0664) From python-dev@python.org Wed Jul 26 05:22:05 2000 From: python-dev@python.org (Barry Warsaw) Date: Tue, 25 Jul 2000 21:22:05 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.6,1.7 Message-ID: <200007260422.VAA28428@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv28413 Modified Files: pep-0201.txt Log Message: Fixed reference [1] to point to the current documentation, not the devel copy (thanks to Fred Drake, Dr. Docs!) Index: pep-0201.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** pep-0201.txt 2000/07/25 22:00:05 1.6 --- pep-0201.txt 2000/07/26 04:22:03 1.7 *************** *** 405,409 **** References ! [1] http://www.python.org/doc/devel/ref/for.html [2] http://www.haskell.org/onlinereport/standard-prelude.html#$vzip --- 405,409 ---- References ! [1] http://www.python.org/doc/current/ref/for.html [2] http://www.haskell.org/onlinereport/standard-prelude.html#$vzip From python-dev@python.org Wed Jul 26 08:04:41 2000 From: python-dev@python.org (Mark Hammond) Date: Wed, 26 Jul 2000 00:04:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib urllib.py,1.97,1.98 Message-ID: <200007260704.AAA26532@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv26517 Modified Files: urllib.py Log Message: Patch #100873 - Use registry to find proxies for urllib on Win32 Note that this patch looks worse than it is - an existing function (getproxies() for all platforms other than Win/Mac) has been moved, renamed and indentation changed, but the body of that function is identical. Windows now allows the environment variables to override the registry. Index: urllib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/urllib.py,v retrieving revision 1.97 retrieving revision 1.98 diff -C2 -r1.97 -r1.98 *** urllib.py 2000/07/16 12:04:30 1.97 --- urllib.py 2000/07/26 07:04:38 1.98 *************** *** 1030,1033 **** --- 1030,1049 ---- # Proxy handling + def getproxies_environment(): + """Return a dictionary of scheme -> proxy server URL mappings. + + Scan the environment for variables named _proxy; + this seems to be the standard convention. If you need a + different way, you can pass a proxies dictionary to the + [Fancy]URLopener constructor. + + """ + proxies = {} + for name, value in os.environ.items(): + name = string.lower(name) + if value and name[-6:] == '_proxy': + proxies[name[:-6]] = value + return proxies + if os.name == 'mac': def getproxies(): *************** *** 1060,1080 **** # Gopher: XXXX To be done. return proxies ! ! else: ! def getproxies(): """Return a dictionary of scheme -> proxy server URL mappings. ! ! Scan the environment for variables named _proxy; ! this seems to be the standard convention. If you need a ! different way, you can pass a proxies dictionary to the ! [Fancy]URLopener constructor. ! """ proxies = {} ! for name, value in os.environ.items(): ! name = string.lower(name) ! if value and name[-6:] == '_proxy': ! proxies[name[:-6]] = value return proxies --- 1076,1128 ---- # Gopher: XXXX To be done. return proxies ! ! elif os.name == 'nt': ! def getproxies_registry(): """Return a dictionary of scheme -> proxy server URL mappings. ! ! Win32 uses the registry to store proxies. ! """ proxies = {} ! try: ! import _winreg ! except ImportError: ! # Std module, so should be around - but you never know! ! return proxies ! try: ! internetSettings = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, ! 'Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings') ! proxyEnable = _winreg.QueryValueEx(internetSettings, ! 'ProxyEnable')[0] ! if proxyEnable: ! # Returned as Unicode but problems if not converted to ASCII ! proxyServer = str(_winreg.QueryValueEx(internetSettings, ! 'ProxyServer')[0]) ! if ';' in proxyServer: # Per-protocol settings ! for p in proxyServer.split(';'): ! protocol, address = p.split('=') ! proxies[protocol] = '%s://%s' % (protocol, address) ! else: # Use one setting for all protocols ! proxies['http'] = 'http://%s' % proxyServer ! proxies['ftp'] = 'ftp://%s' % proxyServer ! internetSettings.Close() ! except (WindowsError, ValueError, TypeError): ! # Either registry key not found etc, or the value in an ! # unexpected format. ! # proxies already set up to be empty so nothing to do ! pass return proxies + + def getproxies(): + """Return a dictionary of scheme -> proxy server URL mappings. + + Returns settings gathered from the environment, if specified, + or the registry. + + """ + return getproxies_environment() or getproxies_registry() + else: + # By default use environment variables + getproxies = getproxies_environment From python-dev@python.org Wed Jul 26 16:46:32 2000 From: python-dev@python.org (Sjoerd Mullender) Date: Wed, 26 Jul 2000 08:46:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include pyport.h,2.6,2.7 Message-ID: <200007261546.IAA23261@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv23229 Modified Files: pyport.h Log Message: Make mode_t available for the declaration of _getpty(). Index: pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** pyport.h 2000/07/24 16:06:23 2.6 --- pyport.h 2000/07/26 15:46:29 2.7 *************** *** 97,101 **** #ifdef HAVE__GETPTY ! /* Unchecked */ extern char * _getpty(int *, int, mode_t, int); #endif --- 97,101 ---- #ifdef HAVE__GETPTY ! #include /* we need to import mode_t */ extern char * _getpty(int *, int, mode_t, int); #endif From python-dev@python.org Wed Jul 26 18:29:15 2000 From: python-dev@python.org (Fredrik Lundh) Date: Wed, 26 Jul 2000 10:29:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.161,2.162 Message-ID: <200007261729.KAA13886@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv13581/Modules Modified Files: posixmodule.c Log Message: - changed windows pclose to make sure we don't return before the underlying process has terminated (bug fix from David Bolen) Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.161 retrieving revision 2.162 diff -C2 -r2.161 -r2.162 *** posixmodule.c 2000/07/24 16:06:23 2.161 --- posixmodule.c 2000/07/26 17:29:12 2.162 *************** *** 2596,2604 **** static int _PyPclose(FILE *file) { ! int result = 0; DWORD exit_code; HANDLE hProcess; PyObject *hProcessObj, *fileObj; if (_PyPopenProcs) { fileObj = PyLong_FromVoidPtr(file); --- 2596,2609 ---- static int _PyPclose(FILE *file) { ! int result; DWORD exit_code; HANDLE hProcess; PyObject *hProcessObj, *fileObj; + /* Close the file handle first, to ensure it can't block the + * child from exiting when we wait for it below. + */ + result = fclose(file); + if (_PyPopenProcs) { fileObj = PyLong_FromVoidPtr(file); *************** *** 2607,2624 **** if (hProcessObj) { hProcess = PyLong_AsVoidPtr(hProcessObj); ! if (GetExitCodeProcess(hProcess, &exit_code)) { /* Possible truncation here in 16-bit environments, but * real exit codes are just the lower byte in any event. */ result = exit_code; - if (result == STILL_ACTIVE) - result = 0; /* Minimize confusion */ } else { ! /* No good way to bubble up an error, so instead we just ! * return the Windows last error shifted above standard ! * exit codes. This will truncate in 16-bits but should ! * be fine in 32 and at least distinguishes the problem. */ ! result = (GetLastError() << 8); } --- 2612,2636 ---- if (hProcessObj) { hProcess = PyLong_AsVoidPtr(hProcessObj); ! if (result != EOF && ! WaitForSingleObject(hProcess, INFINITE) != WAIT_FAILED && ! GetExitCodeProcess(hProcess, &exit_code)) { /* Possible truncation here in 16-bit environments, but * real exit codes are just the lower byte in any event. */ result = exit_code; } else { ! /* Indicate failure - this will cause the file object ! * to raise an I/O error and translate the last Win32 ! * error code from errno. We do have a problem with ! * last errors that overlap the normal errno table, ! * but that's a consistent problem with the file object. */ ! if (result != EOF) { ! /* If the error wasn't from the fclose(), then ! * set errno for the file object error handling. ! */ ! errno = GetLastError(); ! } ! result = -1; } *************** *** 2636,2640 **** } /* if _PyPopenProcs */ - fclose(file); return result; } --- 2648,2651 ---- From python-dev@python.org Wed Jul 26 19:36:31 2000 From: python-dev@python.org (A.M. Kuchling) Date: Wed, 26 Jul 2000 11:36:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.35,2.36 Message-ID: <200007261836.LAA26227@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv26195 Modified Files: _cursesmodule.c Log Message: Comment out a debugging print (spotted by Michael Deegan) Index: _cursesmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** _cursesmodule.c 2000/07/26 02:57:20 2.35 --- _cursesmodule.c 2000/07/26 18:36:27 2.36 *************** *** 1097,1101 **** } ! printf("Subwin: %i %i %i %i \n", nlines, ncols, begin_y, begin_x); if (self->win->_flags & _ISPAD) win = subpad(self->win, nlines, ncols, begin_y, begin_x); --- 1097,1101 ---- } ! /* printf("Subwin: %i %i %i %i \n", nlines, ncols, begin_y, begin_x); */ if (self->win->_flags & _ISPAD) win = subpad(self->win, nlines, ncols, begin_y, begin_x); From python-dev@python.org Thu Jul 27 02:21:58 2000 From: python-dev@python.org (Greg Ward) Date: Wed, 26 Jul 2000 18:21:58 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command build_ext.py,1.56,1.57 Message-ID: <200007270121.SAA16077@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv16064/command Modified Files: build_ext.py Log Message: Typo fix from David Ascher. Index: build_ext.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/build_ext.py,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -r1.56 -r1.57 *** build_ext.py 2000/07/14 13:35:07 1.56 --- build_ext.py 2000/07/27 01:21:54 1.57 *************** *** 293,297 **** for macro in macros: if not (type(macro) is TupleType and ! 1 <= len(macros) <= 2): raise DistutilsSetupError, \ ("'macros' element of build info dict " --- 293,297 ---- for macro in macros: if not (type(macro) is TupleType and ! 1 <= len(macro) <= 2): raise DistutilsSetupError, \ ("'macros' element of build info dict " From python-dev@python.org Thu Jul 27 02:23:23 2000 From: python-dev@python.org (Greg Ward) Date: Wed, 26 Jul 2000 18:23:23 -0700 Subject: [Python-checkins] CVS: distutils/distutils unixccompiler.py,1.28,1.29 Message-ID: <200007270123.SAA16180@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv16170 Modified Files: unixccompiler.py Log Message: Fix to call 'library_filename()' instead of the non-existent 'shared_library_filename()'. Index: unixccompiler.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/unixccompiler.py,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** unixccompiler.py 2000/06/28 01:29:09 1.28 --- unixccompiler.py 2000/07/27 01:23:19 1.29 *************** *** 206,210 **** self.link_shared_object ( objects, ! self.shared_library_filename (output_libname), output_dir, libraries, --- 206,210 ---- self.link_shared_object ( objects, ! self.library_filename (output_libname, lib_type='shared'), output_dir, libraries, *************** *** 321,326 **** for dir in dirs: ! shared = os.path.join (dir, self.shared_library_filename (lib)) ! static = os.path.join (dir, self.library_filename (lib)) # We're second-guessing the linker here, with not much hard --- 321,328 ---- for dir in dirs: ! shared = os.path.join ( ! dir, self.library_filename (lib, lib_type='shared')) ! static = os.path.join ( ! dir, self.library_filename (lib, lib_type='static')) # We're second-guessing the linker here, with not much hard From python-dev@python.org Thu Jul 27 02:58:48 2000 From: python-dev@python.org (Greg Ward) Date: Wed, 26 Jul 2000 18:58:48 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command sdist.py,1.37,1.38 Message-ID: <200007270158.SAA18478@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv18468 Modified Files: sdist.py Log Message: Remove unused 'search_dir()' method. Comment tweak. Index: sdist.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/sdist.py,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -r1.37 -r1.38 *** sdist.py 2000/07/05 03:06:46 1.37 --- sdist.py 2000/07/27 01:58:45 1.38 *************** *** 320,343 **** - def search_dir (self, dir, pattern=None): - """Recursively find files under 'dir' matching 'pattern' (a string - containing a Unix-style glob pattern). If 'pattern' is None, find - all files under 'dir'. Return the list of found filenames. - """ - allfiles = findall (dir) - if pattern is None: - return allfiles - - pattern_re = translate_pattern (pattern) - files = [] - for file in allfiles: - if pattern_re.match (os.path.basename (file)): - files.append (file) - - return files - - # search_dir () - - def recursive_exclude_pattern (self, dir, pattern=None): """Remove filenames from 'self.files' that are under 'dir' and --- 320,323 ---- *************** *** 718,722 **** for name in names: ! if dir != os.curdir: # avoid the dreaded "./" syndrome fullname = os.path.join (dir, name) else: --- 698,702 ---- for name in names: ! if dir != os.curdir: # avoid leading "./" fullname = os.path.join (dir, name) else: From python-dev@python.org Thu Jul 27 03:13:23 2000 From: python-dev@python.org (Greg Ward) Date: Wed, 26 Jul 2000 19:13:23 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command bdist_rpm.py,1.13,1.14 build_ext.py,1.57,1.58 build_scripts.py,1.3,1.4 install_data.py,1.10,1.11 Message-ID: <200007270213.TAA26481@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv26443/command Modified Files: bdist_rpm.py build_ext.py build_scripts.py install_data.py Log Message: Fixed a grab-bag of typos spotted by Rob Hooft. Index: bdist_rpm.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/bdist_rpm.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** bdist_rpm.py 2000/06/08 14:21:23 1.13 --- bdist_rpm.py 2000/07/27 02:13:20 1.14 *************** *** 401,405 **** for (rpm_opt, attr, default) in script_options: ! # Insert contents of file refered to, if no file is refered to # use 'default' as contents of script val = getattr(self, attr) --- 401,405 ---- for (rpm_opt, attr, default) in script_options: ! # Insert contents of file referred to, if no file is refered to # use 'default' as contents of script val = getattr(self, attr) Index: build_ext.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/build_ext.py,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -r1.57 -r1.58 *** build_ext.py 2000/07/27 01:21:54 1.57 --- build_ext.py 2000/07/27 02:13:20 1.58 *************** *** 395,399 **** # guess it's useful) # The environment variable should take precedence, and ! # any sensible compiler will give precendence to later # command line args. Hence we combine them in order: extra_args = ext.extra_compile_args or [] --- 395,399 ---- # guess it's useful) # The environment variable should take precedence, and ! # any sensible compiler will give precedence to later # command line args. Hence we combine them in order: extra_args = ext.extra_compile_args or [] Index: build_scripts.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/build_scripts.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** build_scripts.py 2000/05/25 20:05:52 1.3 --- build_scripts.py 2000/07/27 02:13:20 1.4 *************** *** 47,51 **** Python script in the Unix way (first line matches 'first_line_re', ie. starts with "\#!" and contains "python"), then adjust the first ! line to refer to the current Python intepreter as we copy. """ outfiles = [] --- 47,51 ---- Python script in the Unix way (first line matches 'first_line_re', ie. starts with "\#!" and contains "python"), then adjust the first ! line to refer to the current Python interpreter as we copy. """ outfiles = [] Index: install_data.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/install_data.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** install_data.py 2000/06/24 17:36:24 1.10 --- install_data.py 2000/07/27 02:13:20 1.11 *************** *** 19,23 **** user_options = [ ('install-dir=', 'd', ! "base directory for installating data files " "(default: installation base dir)"), ('root=', None, --- 19,23 ---- user_options = [ ('install-dir=', 'd', ! "base directory for installing data files " "(default: installation base dir)"), ('root=', None, From python-dev@python.org Thu Jul 27 03:13:33 2000 From: python-dev@python.org (Greg Ward) Date: Wed, 26 Jul 2000 19:13:33 -0700 Subject: [Python-checkins] CVS: distutils/distutils ccompiler.py,1.29,1.30 cmd.py,1.19,1.20 cygwinccompiler.py,1.2,1.3 util.py,1.38,1.39 dist.py,1.32,1.33 Message-ID: <200007270213.TAA26480@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv26443 Modified Files: ccompiler.py cmd.py cygwinccompiler.py util.py dist.py Log Message: Fixed a grab-bag of typos spotted by Rob Hooft. Index: ccompiler.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/ccompiler.py,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** ccompiler.py 2000/07/07 20:41:20 1.29 --- ccompiler.py 2000/07/27 02:13:19 1.30 *************** *** 305,309 **** def add_link_object (self, object): """Add 'object' to the list of object files (or analogues, such as ! explictly named library files or the output of "resource compilers") to be included in every link driven by this compiler object. --- 305,309 ---- def add_link_object (self, object): """Add 'object' to the list of object files (or analogues, such as ! explicitly named library files or the output of "resource compilers") to be included in every link driven by this compiler object. Index: cmd.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/cmd.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** cmd.py 2000/06/28 14:48:01 1.19 --- cmd.py 2000/07/27 02:13:19 1.20 *************** *** 56,60 **** # "not defined, check self.distribution's copy", while 0 or 1 mean # false and true (duh). Note that this means figuring out the real ! # value of each flag is a touch complicatd -- hence "self.verbose" # (etc.) will be handled by __getattr__, below. self._verbose = None --- 56,60 ---- # "not defined, check self.distribution's copy", while 0 or 1 mean # false and true (duh). Note that this means figuring out the real ! # value of each flag is a touch complicated -- hence "self.verbose" # (etc.) will be handled by __getattr__, below. self._verbose = None Index: cygwinccompiler.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/cygwinccompiler.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** cygwinccompiler.py 2000/06/29 22:57:55 1.2 --- cygwinccompiler.py 2000/07/27 02:13:19 1.3 *************** *** 146,150 **** # who wants symbols and a many times larger output file ! # should explicitely switch the debug mode on # otherwise we let dllwrap strip the output file # (On my machine unstripped_file = stripped_file + 254KB --- 146,150 ---- # who wants symbols and a many times larger output file ! # should explicitly switch the debug mode on # otherwise we let dllwrap strip the output file # (On my machine unstripped_file = stripped_file + 254KB Index: util.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/util.py,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** util.py 2000/06/28 14:48:01 1.38 --- util.py 2000/07/27 02:13:19 1.39 *************** *** 106,110 **** options, etc. Currently this includes: HOME - user's home directory (Unix only) ! PLAT - desription of the current platform, including hardware and OS (see 'get_platform()') """ --- 106,110 ---- options, etc. Currently this includes: HOME - user's home directory (Unix only) ! PLAT - description of the current platform, including hardware and OS (see 'get_platform()') """ *************** *** 126,130 **** def subst_vars (str, local_vars): """Perform shell/Perl-style variable substitution on 'string'. ! Every occurence of '$' followed by a name, or a name enclosed in braces, is considered a variable. Every variable is substituted by the value found in the 'local_vars' dictionary, or in 'os.environ' --- 126,130 ---- def subst_vars (str, local_vars): """Perform shell/Perl-style variable substitution on 'string'. ! Every occurrence of '$' followed by a name, or a name enclosed in braces, is considered a variable. Every variable is substituted by the value found in the 'local_vars' dictionary, or in 'os.environ' Index: dist.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/dist.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** dist.py 2000/07/07 20:45:21 1.32 --- dist.py 2000/07/27 02:13:19 1.33 *************** *** 168,172 **** # been instantiated -- a false value will be inserted when the # command object is created, and replaced with a true value when ! # the command is succesfully run. Thus it's probably best to use # '.get()' rather than a straight lookup. self.have_run = {} --- 168,172 ---- # been instantiated -- a false value will be inserted when the # command object is created, and replaced with a true value when ! # the command is successfully run. Thus it's probably best to use # '.get()' rather than a straight lookup. self.have_run = {} *************** *** 678,682 **** def get_command_obj (self, command, create=1): """Return the command object for 'command'. Normally this object ! is cached on a previous call to 'get_command_obj()'; if no comand object for 'command' is in the cache, then we either create and return it (if 'create' is true) or return None. --- 678,682 ---- def get_command_obj (self, command, create=1): """Return the command object for 'command'. Normally this object ! is cached on a previous call to 'get_command_obj()'; if no command object for 'command' is in the cache, then we either create and return it (if 'create' is true) or return None. From python-dev@python.org Thu Jul 27 03:17:42 2000 From: python-dev@python.org (Greg Ward) Date: Wed, 26 Jul 2000 19:17:42 -0700 Subject: [Python-checkins] CVS: distutils setup.py,1.17,1.18 Message-ID: <200007270217.TAA26717@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv26702 Modified Files: setup.py Log Message: Bump version to 0.9.1pre. Index: setup.py =================================================================== RCS file: /cvsroot/python/distutils/setup.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** setup.py 2000/06/30 02:54:36 1.17 --- setup.py 2000/07/27 02:17:39 1.18 *************** *** 12,16 **** setup (name = "Distutils", ! version = "0.9", description = "Python Distribution Utilities", author = "Greg Ward", --- 12,16 ---- setup (name = "Distutils", ! version = "0.9.1pre", description = "Python Distribution Utilities", author = "Greg Ward", From python-dev@python.org Thu Jul 27 03:17:42 2000 From: python-dev@python.org (Greg Ward) Date: Wed, 26 Jul 2000 19:17:42 -0700 Subject: [Python-checkins] CVS: distutils/distutils __init__.py,1.8,1.9 Message-ID: <200007270217.TAA26718@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv26702/distutils Modified Files: __init__.py Log Message: Bump version to 0.9.1pre. Index: __init__.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/__init__.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** __init__.py 2000/06/30 02:54:36 1.8 --- __init__.py 2000/07/27 02:17:40 1.9 *************** *** 11,13 **** __revision__ = "$Id$" ! __version__ = "0.9" --- 11,13 ---- __revision__ = "$Id$" ! __version__ = "0.9.1pre" From python-dev@python.org Thu Jul 27 04:03:42 2000 From: python-dev@python.org (Jeremy Hylton) Date: Wed, 26 Jul 2000 20:03:42 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0200.txt,1.5,1.6 Message-ID: <200007270303.UAA01220@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv881 Modified Files: pep-0200.txt Log Message: add sterner warning about test case problems note error in dictionary comparison that raises exception Index: pep-0200.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0200.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** pep-0200.txt 2000/07/26 04:12:42 1.5 --- pep-0200.txt 2000/07/27 03:03:39 1.6 *************** *** 75,78 **** --- 75,98 ---- released this way. + Failing test cases need to get fixed + + We need to resolve errors in the regression test suite quickly. + Changes should not be committed to the CVS tree unless the + regression test runs cleanly with the changes applied. If it + fails, there may be bugs lurking in the code. (There may be bugs + anyway, but that's another matter.) If the test cases are known + to fail, they serve no useful purpose. + + The current test suite runs correctly on my Linux box (July 26). + Heard reports that test_fork1 fails on some Linux boxes and that + test_winreg and test_winreg32 fail on Windows. + + Open items -- should be done/fixed + + Decoding errors when comparing strings. There is a dictionary bug + that prevents objects from being accessible when an exception is + raised during hashing or comparison. + + Accepted and completed From python-dev@python.org Thu Jul 27 08:42:45 2000 From: python-dev@python.org (Fredrik Lundh) Date: Thu, 27 Jul 2000 00:42:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_popen2.py,1.1,1.2 Message-ID: <200007270742.AAA24391@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv24366 Modified Files: test_popen2.py Log Message: -- changed test to work on platforms which have os.popen but no os.fork Index: test_popen2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_popen2.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_popen2.py 1999/03/11 13:26:18 1.1 --- test_popen2.py 2000/07/27 07:42:43 1.2 *************** *** 6,14 **** # popen2 contains its own testing routine # which is especially useful to see if open files ! # like stdin can be read successfully by a forked # subprocess. def main(): ! from os import fork # skips test through ImportError import popen2 popen2._test() --- 6,20 ---- # popen2 contains its own testing routine # which is especially useful to see if open files ! # like stdin can be read successfully by a forked # subprocess. def main(): ! try: ! from os import popen ! except ImportError: ! # if we don't have os.popen, check that ! # we have os.fork. if not, skip the test ! # (by raising an ImportError) ! from os import fork import popen2 popen2._test() From python-dev@python.org Thu Jul 27 12:58:06 2000 From: python-dev@python.org (A.M. Kuchling) Date: Thu, 27 Jul 2000 04:58:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.36,2.37 Message-ID: <200007271158.EAA25932@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv25763 Modified Files: _cursesmodule.c Log Message: Added list of missing functions as a comment Index: _cursesmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v retrieving revision 2.36 retrieving revision 2.37 diff -C2 -r2.36 -r2.37 *** _cursesmodule.c 2000/07/26 18:36:27 2.36 --- _cursesmodule.c 2000/07/27 11:58:01 2.37 *************** *** 34,37 **** --- 34,63 ---- /* CVS: $Id$ */ + /* + + A number of SysV or ncurses functions don't have wrappers yet; if you need + a given function, add it and send a patch. Here's a list of currently + unsupported functions: + + addchnstr addchstr chgat color_set copywin define_key + del_curterm delscreen dupwin inchnstr inchstr innstr keyok + mcprint mvaddchnstr mvaddchstr mvchgat mvcur mvinchnstr + mvinchstr mvinnstr mmvwaddchnstr mvwaddchstr mvwchgat + mvwgetnstr mvwinchnstr mvwinchstr mvwinnstr napms newterm + overlay overwrite resetty resizeterm restartterm ripoffline + savetty scr_dump scr_init scr_restore scr_set scrl set_curterm + set_term setterm setupterm tgetent tgetflag tgetnum tgetstr + tgoto timeout tparm tputs tputs typeahead use_default_colors + vidattr vidputs waddchnstr waddchstr wchgat wcolor_set + winchnstr winchstr winnstr wmouse_trafo wredrawln wscrl + wtimeout + + Low-priority: + slk_attr slk_attr_off slk_attr_on slk_attr_set slk_attroff + slk_attron slk_attrset slk_clear slk_color slk_init slk_label + slk_noutrefresh slk_refresh slk_restore slk_set slk_touch + + */ + /* Release Number */ From python-dev@python.org Thu Jul 27 19:44:47 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 27 Jul 2000 11:44:47 -0700 Subject: [Python-checkins] CVS: python/nondist/peps style.css,NONE,1.1 pep2html.py,1.5,1.6 Message-ID: <200007271844.LAA26996@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv26987 Modified Files: pep2html.py Added Files: style.css Log Message: Further presentation adjustments, use a style sheet for some things. --- NEW FILE --- .navigation { background: #99ccff; border: thin solid #ffffff; width: 100%; padding: 4pt; } .header th:after { content: " " } Index: pep2html.py =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** pep2html.py 2000/07/26 04:14:30 1.5 --- pep2html.py 2000/07/27 18:44:44 1.6 *************** *** 60,76 **** title = "PEP " + pep + " -- " + title if title: ! fo.write(" %s\n" % cgi.escape(title)) fo.write("\n") # body ! fo.write('\n') ! fo.write('[home]\n') if os.path.basename(infile) != "pep-0000.txt": ! fo.write('[index]\n') ! fo.write('
      \n\n') for k, v in header: fo.write(" \n" % (cgi.escape(k), cgi.escape(v))) title = 0 ! fo.write("
      %s:%s
      \n
      \n
      ")
            while 1:
                line = fi.readline()
      --- 60,81 ----
                title = "PEP " + pep + " -- " + title
            if title:
      !         fo.write("  %s\n"
      !                  '  \n'
      !                  % cgi.escape(title))
            fo.write("\n")
            # body
      !     fo.write('\n'
      !              '\n'
      !              '
      \n\n') for k, v in header: fo.write(" \n" % (cgi.escape(k), cgi.escape(v))) title = 0 ! fo.write("
      %s:%s
      \n
      \n
      \n" ! "
      ")
            while 1:
                line = fi.readline()
      ***************
      *** 111,115 ****
        
            if update:
      !         os.system("scp pep-*.html " + username + HOST + ":" + HDIR)
                os.system("ssh " + username + HOST + " chmod 664 " + HDIR + "/*")
        
      --- 116,120 ----
        
            if update:
      !         os.system("scp pep-*.html style.css " + username + HOST + ":" + HDIR)
                os.system("ssh " + username + HOST + " chmod 664 " + HDIR + "/*")
        
      
      
      
      From python-dev@python.org  Thu Jul 27 19:46:32 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Thu, 27 Jul 2000 11:46:32 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0160.txt,1.3,1.4
      Message-ID: <200007271846.LAA27298@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv27282
      
      Modified Files:
      	pep-0160.txt 
      Log Message:
      
      Identify the branch tag for the Python 1.6 release.
      Remove the ugly form-feed characters some people use with Emacs.
      
      
      Index: pep-0160.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0160.txt,v
      retrieving revision 1.3
      retrieving revision 1.4
      diff -C2 -r1.3 -r1.4
      *** pep-0160.txt	2000/07/25 20:48:58	1.3
      --- pep-0160.txt	2000/07/27 18:46:29	1.4
      ***************
      *** 6,10 ****
        Status:         Incomplete
        
      - 
        Introduction
        
      --- 6,9 ----
      ***************
      *** 16,25 ****
            Corporation for National Research Initiatives (CNRI).
        
      - 
        Schedule
            August 1     1.6 beta 1 release.
            August 15    1.6 final release.
        
      - 
        Features
        
      --- 15,22 ----
      ***************
      *** 37,41 ****
              of the re module.
        
      - 
        Mechanism
        
      --- 34,37 ----
      ***************
      *** 47,59 ****
            implementations.
        
            Patches and features will be merged to the extent required to pass
            regression tests in effect on 16 May 2000.
        
      - 
        Copyright
        
            This document has been placed in the public domain.
        
      - 
        Local Variables:
        mode: indented-text
      --- 43,55 ----
            implementations.
        
      +     The branch tag is "cnri-16-start".
      + 
            Patches and features will be merged to the extent required to pass
            regression tests in effect on 16 May 2000.
        
        Copyright
        
            This document has been placed in the public domain.
        
        Local Variables:
        mode: indented-text
      
      
      
      From python-dev@python.org  Thu Jul 27 20:15:22 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Thu, 27 Jul 2000 12:15:22 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.7,1.8
      Message-ID: <200007271915.MAA04678@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv4670
      
      Modified Files:
      	pep-0201.txt 
      Log Message:
      Updated based on Guido's recent pronouncements on the Open Issues.
      There are now no more open issues.
      
      
      Index: pep-0201.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v
      retrieving revision 1.7
      retrieving revision 1.8
      diff -C2 -r1.7 -r1.8
      *** pep-0201.txt	2000/07/26 04:22:03	1.7
      --- pep-0201.txt	2000/07/27 19:15:20	1.8
      ***************
      *** 85,115 ****
            function is to be called `zip' and has the following signature:
        
      !     zip(seqa, [seqb, [...]], [pad=])
        
            zip() takes one or more sequences and weaves their elements
            together, just as map(None, ...) does with sequences of equal
      !     length.  The optional keyword argument `pad', if supplied, is a
      !     value used to pad all shorter sequences to the length of the
      !     longest sequence.  If `pad' is omitted, then weaving stops when
      !     the shortest sequence is exhausted.
      ! 
      !     It is not possible to pad short lists with different pad values,
      !     nor will zip() ever raise an exception with lists of different
      !     lengths.  To accomplish either behavior, the sequences must be
      !     checked and processed before the call to zip() -- but see the Open
      !     Issues below for more discussion.
      ! 
      ! 
      ! Lazy Execution
      ! 
      !     For performance purposes, zip() does not construct the list of
      !     tuples immediately.  Instead it instantiates an object that
      !     implements a __getitem__() method and conforms to the informal
      !     for-loop protocol.  This method constructs the individual tuples
      !     on demand.
        
      -     Guido is strongly opposed to lazy execution.  See Open Issues.
        
        
        Examples
        
      --- 85,101 ----
            function is to be called `zip' and has the following signature:
        
      !     zip(seqa, [seqb, [...]])
        
            zip() takes one or more sequences and weaves their elements
            together, just as map(None, ...) does with sequences of equal
      !     length.  The weaving stops when the shortest sequence is
      !     exhausted.
        
        
      + Return Value
        
      +     zip() returns a real Python list, the same way map() does.
      + 
      + 
        Examples
        
      ***************
      *** 128,148 ****
            [(1, 12), (2, 13)]
        
      -     >>> zip(a, d, pad=0)
      -     [(1, 12), (2, 13), (3, 0), (4, 0)]
      -     
      -     >>> zip(a, d, pid=0)
      -     Traceback (most recent call last):
      -       File "", line 1, in ?
      -       File "/usr/tmp/python-iKAOxR", line 11, in zip
      -     TypeError: unexpected keyword arguments
      -     
            >>> zip(a, b, c, d)
            [(1, 5, 9, 12), (2, 6, 10, 13)]
        
      -     >>> zip(a, b, c, d, pad=None)
      -     [(1, 5, 9, 12), (2, 6, 10, 13), (3, 7, 11, None), (4, 8, None, None)]
      -     >>> map(None, a, b, c, d)
      -     [(1, 5, 9, 12), (2, 6, 10, 13), (3, 7, 11, None), (4, 8, None, None)]
      - 
            Note that when the sequences are of the same length, zip() is
            reversible:
      --- 114,120 ----
      ***************
      *** 172,404 ****
            replaced by equivalent C code.
        
      !     class _Zipper:
      !         def __init__(self, args, kws):
      !             # Defaults
      !             self.__padgiven = 0
      !             if kws.has_key('pad'):
      !                 self.__padgiven = 1
      !                 self.__pad = kws['pad']
      !                 del kws['pad']
      !             # Assert no unknown arguments are left
      !             if kws:
      !                 raise TypeError('unexpected keyword arguments')
      !             self.__sequences = args
      !             self.__seqlen = len(args)
      ! 
      !         def __getitem__(self, i):
      !             if not self.__sequences:
      !                 raise IndexError
      !             ret = []
      !             exhausted = 0
      !             for s in self.__sequences:
      !                 try:
      !                     ret.append(s[i])
      !                 except IndexError:
      !                     if not self.__padgiven:
      !                         raise
      !                     exhausted = exhausted + 1
      !                     if exhausted == self.__seqlen:
      !                         raise
      !                     ret.append(self.__pad)
      !             return tuple(ret)
      ! 
      !         def __len__(self):
      !             # If we're padding, then len is the length of the longest sequence,
      !             # otherwise it's the length of the shortest sequence.
      !             if not self.__padgiven:
      !                 shortest = -1
      !                 for s in self.__sequences:
      !                     slen = len(s)
      !                     if shortest < 0 or slen < shortest:
      !                         shortest = slen
      !                 if shortest < 0:
      !                     return 0
      !                 return shortest
      !             longest = 0
      !             for s in self.__sequences:
      !                 slen = len(s)
      !                 if slen > longest:
      !                     longest = slen
      !             return longest
      ! 
      !         def __cmp__(self, other):
      !             i = 0
      !             smore = 1
      !             omore = 1
      !             while 1:
      !                 try:
      !                     si = self[i]
      !                 except IndexError:
      !                     smore = 0
      !                 try:
      !                     oi = other[i]
      !                 except IndexError:
      !                     omore = 0
      !                 if not smore and not omore:
      !                     return 0
      !                 elif not smore:
      !                     return -1
      !                 elif not omore:
      !                     return 1
      !                 test = cmp(si, oi)
      !                 if test:
      !                     return test
      !                 i = i + 1
      ! 
      !         def __str__(self):
      !             ret = []
      !             i = 0
      !             while 1:
      !                 try:
      !                     ret.append(self[i])
      !                 except IndexError:
      !                     break
      !                 i = i + 1
      !             return str(ret)
      !         __repr__ = __str__
      ! 
      ! 
      !     def zip(*args, **kws):
      !         return _Zipper(args, kws)
      ! 
      ! 
      ! Rejected Elaborations
      ! 
      !     Some people have suggested that the user be able to specify the
      !     type of the inner and outer containers for the zipped sequence.
      !     This would be specified by additional keyword arguments to zip(),
      !     named `inner' and `outer'.
      ! 
      !     This elaboration is rejected for several reasons.  First, there
      !     really is no outer container, even though there appears to be an
      !     outer list container the example above.  This is simply an
      !     artifact of the repr() of the zipped object.  User code can do its
      !     own looping over the zipped object via __getitem__(), and build
      !     any type of outer container for the fully evaluated, concrete
      !     sequence.  For example, to build a zipped object with lists as an
      !     outer container, use
      ! 
      !         >>> list(zip(sequence_a, sequence_b, sequence_c))
      ! 
      !     for tuple outer container, use
      !     
      !         >>> tuple(zip(sequence_a, sequence_b, sequence_c))
      ! 
      !     This type of construction will usually not be necessary though,
      !     since it is expected that zipped objects will most often appear in
      !     for-loops.
      ! 
      !     Second, allowing the user to specify the inner container
      !     introduces needless complexity and arbitrary decisions.  You might
      !     imagine that instead of the default tuple inner container, the
      !     user could prefer a list, or a dictionary, or instances of some
      !     sequence-like class.
      ! 
      !     One problem is the API.  Should the argument to `inner' be a type
      !     or a template object?  For flexibility, the argument should
      !     probably be a type object (i.e. TupleType, ListType, DictType), or
      !     a class.  For classes, the implementation could just pass the zip
      !     element to the constructor.  But what about built-in types that
      !     don't have constructors?  They would have to be special-cased in
      !     the implementation (i.e. what is the constructor for TupleType?
      !     The tuple() built-in).
      ! 
      !     Another problem that arises is for zips greater than length two.
      !     Say you had three sequences and you wanted the inner type to be a
      !     dictionary.  What would the semantics of the following be?
      ! 
      !         >>> zip(sequence_a, sequence_b, sequence_c, inner=DictType)
      ! 
      !     Would the key be (element_a, element_b) and the value be
      !     element_c, or would the key be element_a and the value be
      !     (element_b, element_c)?  Or should an exception be thrown?
      ! 
      !     This suggests that the specification of the inner container type
      !     is needless complexity.  It isn't likely that the inner container
      !     will need to be specified very often, and it is easy to roll your
      !     own should you need it.  Tuples are chosen for the inner container
      !     type due to their (slight) memory footprint and performance
      !     advantages.
      ! 
      ! 
      ! Open Issues
      ! 
      !     - Guido opposes lazy evaluation for zip().  He believes zip()
      !       should return a real list, with an xzip() lazy evaluator added
      !       later if necessary.
      ! 
      !     - What should "zip(a)" do?  Given
      ! 
      !       a = (1, 2, 3); zip(a)
      ! 
      !       three outcomes are possible.
      ! 
      !       1) Returns [(1,), (2,), (3,)]
      ! 
      !          Pros: no special casing in the implementation or in user
      !          code, and is more consistent with the description of it's
      !          semantics.  Cons: this isn't what map(None, a) would return,
      !          and may be counter to user expectations.
      ! 
      !       2) Returns [1, 2, 3]
      ! 
      !          Pros: consistency with map(None, a), and simpler code for
      !          for-loops, e.g.
      ! 
      !          for i in zip(a):
      ! 
      !          instead of
      ! 
      !          for (i,) in zip(a):
      ! 
      !          Cons: too much complexity and special casing for what should
      !          be a relatively rare usage pattern.
      ! 
      !       3) Raises TypeError
      ! 
      !          Pros: zip(a) doesn't make much sense and could be confusing
      !          to explain.
      ! 
      !          Cons: needless restriction
      ! 
      !       Current scoring seems to generally favor outcome 1.
      ! 
      !     - What should "zip()" do?
      ! 
      !       Along similar lines, zip() with no arguments (or zip() with just
      !       a pad argument) can have ambiguous semantics.  Should this
      !       return no elements or an infinite number?  For these reaons,
      !       raising a TypeError exception in this case makes the most
      !       sense.
      ! 
      !     - The name of the built-in `zip' may cause some initial confusion
      !       with the zip compression algorithm.  Other suggestions include
      !       (but are not limited to!): marry, weave, parallel, lace, braid,
      !       interlace, permute, furl, tuples, lists, stitch, collate, knit,
      !       plait, fold, with, mktuples, maketuples, totuples, gentuples,
      !       tupleorama.
      ! 
      !       All have disadvantages, and there is no clear unanimous choice,
      !       therefore the decision was made to go with `zip' because the
      !       same functionality is available in other languages
      !       (e.g. Haskell) under the name `zip'[2].
      ! 
      !     - Should zip() be including in the builtins module or should it be
      !       in a separate generators module (possibly with other candidate
      !       functions like irange())?
      ! 
      !     - Padding short sequences with different values.  A suggestion has
      !       been made to allow a `padtuple' (probably better called `pads'
      !       or `padseq') argument similar to `pad'.  This sequence must have
      !       a length equal to the number of sequences given.  It is a
      !       sequence of the individual pad values to use for each sequence,
      !       should it be shorter than the maximum length.
      ! 
      !       One problem is what to do if `padtuple' itself isn't of the
      !       right length?  A TypeError seems to be the only choice here.
      ! 
      !       How does `pad' and `padtuple' interact?  Perhaps if padtuple
      !       were too short, it could use pad as a fallback.  padtuple would
      !       always override pad if both were given.
        
        
      --- 144,201 ----
            replaced by equivalent C code.
        
      !     def zip(*args):
      !         if not args:
      !             raise TypeError('zip() expects one or more sequence arguments')
      !         ret = []
      !         # find the length of the shortest sequence
      !         shortest = min(*map(len, args))
      !         for i in range(shortest):
      !             item = []
      !             for s in args:
      !                 item.append(s[i])
      !             ret.append(tuple(item))
      !         return ret
      ! 
      ! 
      ! BDFL Pronouncements
      ! 
      !     Note: the BDFL refers to Guido van Rossum, Python's Benevolent
      !     Dictator For Life.
      ! 
      !     - The function's name.  An earlier version of this PEP included an
      !       open issue listing 20+ proposed alternative names to zip().  In
      !       the face of no overwhelmingly better choice, the BDFL strongly
      !       prefers zip() due to it's Haskell[2] heritage.  See version 1.7
      !       of this PEP for the list of alteratives.
      ! 
      !     - zip() shall be a built-in function.
      ! 
      !     - Optional padding.  An earlier version of this PEP proposed an
      !       optional `pad' keyword argument, which would be used when the
      !       argument sequences were not the same length.  This is similar
      !       behavior to the map(None, ...) semantics except that the user
      !       would be able to specify pad object.  This has been rejected by
      !       the BDFL in favor of always truncating to the shortest sequence.
      ! 
      !     - Lazy evaluation.  An earlier version of this PEP proposed that
      !       zip() return a built-in object that performed lazy evaluation
      !       using __getitem__() protocol.  This has been strongly rejected
      !       by the BDFL in favor of returning a real Python list.  If lazy
      !       evaluation is desired in the future, the BDFL suggests an xzip()
      !       function be added.
      ! 
      !     - zip() with no arguments.  the BDFL strongly prefers this raise a
      !       TypeError exception.
      ! 
      !     - zip() with one argument.  the BDFL strongly prefers that this
      !       return a list of 1-tuples.
      ! 
      !     - Inner and outer container control.  An earlier version of this
      !       PEP contains a rather lengthy discussion on a feature that some
      !       people wanted, namely the ability to control what the inner and
      !       outer container types were (they are tuples and list
      !       respectively in this version of the PEP).  Given the simplified
      !       API and implementation, this elaboration is rejected.  For a
      !       more detailed analysis, see version 1.7 of this PEP.
        
        
      ***************
      *** 409,412 ****
      --- 206,210 ----
        
            TBD: URL to python-dev archives
      + 
        
        Copyright
      
      
      
      From python-dev@python.org  Thu Jul 27 20:17:17 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Thu, 27 Jul 2000 12:17:17 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.8,1.9
      Message-ID: <200007271917.MAA04872@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv4860
      
      Modified Files:
      	pep-0201.txt 
      Log Message:
      small typo
      
      
      Index: pep-0201.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v
      retrieving revision 1.8
      retrieving revision 1.9
      diff -C2 -r1.8 -r1.9
      *** pep-0201.txt	2000/07/27 19:15:20	1.8
      --- pep-0201.txt	2000/07/27 19:17:15	1.9
      ***************
      *** 141,146 ****
        
            Here is a reference implementation, in Python of the zip()
      !     built-in function and helper class.  These would ultimately be
      !     replaced by equivalent C code.
        
            def zip(*args):
      --- 141,146 ----
        
            Here is a reference implementation, in Python of the zip()
      !     built-in function.  These would ultimately be replaced by
      !     equivalent C code.
        
            def zip(*args):
      
      
      
      From python-dev@python.org  Thu Jul 27 20:17:38 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Thu, 27 Jul 2000 12:17:38 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.9,1.10
      Message-ID: <200007271917.MAA04901@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv4893
      
      Modified Files:
      	pep-0201.txt 
      Log Message:
      added Post-History entry
      
      
      Index: pep-0201.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v
      retrieving revision 1.9
      retrieving revision 1.10
      diff -C2 -r1.9 -r1.10
      *** pep-0201.txt	2000/07/27 19:17:15	1.9
      --- pep-0201.txt	2000/07/27 19:17:36	1.10
      ***************
      *** 6,10 ****
        Status: Draft
        Created: 13-Jul-2000
      ! Post-History:
        
        
      --- 6,10 ----
        Status: Draft
        Created: 13-Jul-2000
      ! Post-History: 27-Jul-2000
        
        
      
      
      
      From python-dev@python.org  Thu Jul 27 20:19:02 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Thu, 27 Jul 2000 12:19:02 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep2html.py,1.6,1.7
      Message-ID: <200007271919.MAA04974@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv4962
      
      Modified Files:
      	pep2html.py 
      Log Message:
      
      Handle RFC822-style continuation lines.  One of these appeared in PEP-0001.
      
      
      Index: pep2html.py
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v
      retrieving revision 1.6
      retrieving revision 1.7
      diff -C2 -r1.6 -r1.7
      *** pep2html.py	2000/07/27 18:44:44	1.6
      --- pep2html.py	2000/07/27 19:18:59	1.7
      ***************
      *** 48,59 ****
            while 1:
                line = fi.readline()
      !         if not line or ":" not in line:
                    break
      !         key, value = line.split(":", 1)
      !         value = value.strip()
      !         header.append((key, value))
                if key.lower() == "title":
                    title = value
      !         if key.lower() == "pep":
                    pep = value
            if pep:
      --- 48,67 ----
            while 1:
                line = fi.readline()
      !         if not line.strip():
                    break
      !         if line[0].strip():
      !             if ":" not in line:
      !                 break
      !             key, value = line.split(":", 1)
      !             value = value.strip()
      !             header.append((key, value))
      !         else:
      !             # continuation line
      !             key, value = header[-1]
      !             value = value + line
      !             header[-1] = key, value
                if key.lower() == "title":
                    title = value
      !         elif key.lower() == "pep":
                    pep = value
            if pep:
      
      
      
      From python-dev@python.org  Thu Jul 27 21:13:42 2000
      From: python-dev@python.org (Guido van Rossum)
      Date: Thu, 27 Jul 2000 13:13:42 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0202.txt,1.3,1.4
      Message-ID: <200007272013.NAA17596@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv17584
      
      Modified Files:
      	pep-0202.txt 
      Log Message:
      BDFL pronouncements.
      Got rid of ^L.
      
      
      Index: pep-0202.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0202.txt,v
      retrieving revision 1.3
      retrieving revision 1.4
      diff -C2 -r1.3 -r1.4
      *** pep-0202.txt	2000/07/25 15:07:28	1.3
      --- pep-0202.txt	2000/07/27 20:13:39	1.4
      ***************
      *** 6,10 ****
        Status: Incomplete
        
      ! 
        Introduction
        
      --- 6,10 ----
        Status: Incomplete
        
      ! 
        Introduction
        
      ***************
      *** 12,17 ****
            comprehensions. 
        
        
      - 
        The Proposed Solution
        
      --- 12,17 ----
            comprehensions. 
        
      + 
        
        The Proposed Solution
        
      ***************
      *** 20,25 ****
            statements nest now.
            
        
      - 
        Rationale
        
      --- 20,25 ----
            statements nest now.
            
      + 
        
        Rationale
        
      ***************
      *** 28,32 ****
            be used.
        
      ! 
        Examples
        
      --- 28,32 ----
            be used.
        
      ! 
        Examples
        
      ***************
      *** 39,53 ****
            >>> nums = [1,2,3,4]
            >>> fruit = ["Apples", "Peaches", "Pears", "Bananas"]
      !     >>> print [i,f for i in nums for f in fruit]
            [(1, 'Apples'), (1, 'Peaches'), (1, 'Pears'), (1, 'Bananas'),
             (2, 'Apples'), (2, 'Peaches'), (2, 'Pears'), (2, 'Bananas'),
             (3, 'Apples'), (3, 'Peaches'), (3, 'Pears'), (3, 'Bananas'),
             (4, 'Apples'), (4, 'Peaches'), (4, 'Pears'), (4, 'Bananas')]
      !     >>> print [i,f for i in nums for f in fruit if f[0] == "P"]
            [(1, 'Peaches'), (1, 'Pears'),
             (2, 'Peaches'), (2, 'Pears'),
             (3, 'Peaches'), (3, 'Pears'),
             (4, 'Peaches'), (4, 'Pears')]
      !     >>> print [i,f for i in nums for f in fruit if f[0] == "P" if i%2 == 1]
            [(1, 'Peaches'), (1, 'Pears'), (3, 'Peaches'), (3, 'Pears')]
            >>> def zip(*args):
      --- 39,53 ----
            >>> nums = [1,2,3,4]
            >>> fruit = ["Apples", "Peaches", "Pears", "Bananas"]
      !     >>> print [(i,f) for i in nums for f in fruit]
            [(1, 'Apples'), (1, 'Peaches'), (1, 'Pears'), (1, 'Bananas'),
             (2, 'Apples'), (2, 'Peaches'), (2, 'Pears'), (2, 'Bananas'),
             (3, 'Apples'), (3, 'Peaches'), (3, 'Pears'), (3, 'Bananas'),
             (4, 'Apples'), (4, 'Peaches'), (4, 'Pears'), (4, 'Bananas')]
      !     >>> print [(i,f) for i in nums for f in fruit if f[0] == "P"]
            [(1, 'Peaches'), (1, 'Pears'),
             (2, 'Peaches'), (2, 'Pears'),
             (3, 'Peaches'), (3, 'Pears'),
             (4, 'Peaches'), (4, 'Pears')]
      !     >>> print [(i,f) for i in nums for f in fruit if f[0] == "P" if i%2 == 1]
            [(1, 'Peaches'), (1, 'Pears'), (3, 'Peaches'), (3, 'Pears')]
            >>> def zip(*args):
      ***************
      *** 56,61 ****
            >>> print [i for i in zip(nums,fruit) if i[0]%2==0]
            [(2, 'Peaches'), (4, 'Bananas')]
        
      - 
        Reference Implementation
        
      --- 56,61 ----
            >>> print [i for i in zip(nums,fruit) if i[0]%2==0]
            [(2, 'Peaches'), (4, 'Bananas')]
      + 
        
        Reference Implementation
        
      ***************
      *** 66,71 ****
            for a patch that adds list comprehensions to Python.
        
        
      ! 
        Open Issues
        
      --- 66,84 ----
            for a patch that adds list comprehensions to Python.
        
      + 
      + BDFL Pronouncements
        
      !     Note: the BDFL refers to Guido van Rossum, Python's Benevolent
      !     Dictator For Life.
      ! 
      !     - The syntax proposed above is the Right One.
      ! 
      !     - The form [x, y for ...] should be disallowed; one should be
      !     required to write [(x, y) for ...].
      ! 
      !     - The form [... for x... for y...] nests, with the last index
      !     varying fastest, just like nested for loops.
      ! 
      ! 
        Open Issues
        
      ***************
      *** 113,118 ****
                is.  It has not had a lot of exercise, though the patch does include
                a few test cases.
        
      - 
        Local Variables:
        mode: indented-text
      --- 126,131 ----
                is.  It has not had a lot of exercise, though the patch does include
                a few test cases.
      + 
        
        Local Variables:
        mode: indented-text
      
      
      
      From python-dev@python.org  Thu Jul 27 21:31:18 2000
      From: python-dev@python.org (Skip Montanaro)
      Date: Thu, 27 Jul 2000 13:31:18 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Grammar .cvsignore,NONE,1.1
      Message-ID: <200007272031.NAA19336@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Grammar
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv19326
      
      Added Files:
      	.cvsignore 
      Log Message:
      added .cvsignore so cvs doesn't complain about the generated graminit.h and
      graminit.c files.
      
      
      --- NEW FILE ---
      graminit.h
      graminit.c
      
      
      
      From python-dev@python.org  Thu Jul 27 21:55:15 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Thu, 27 Jul 2000 13:55:15 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Doc/tut tut.tex,1.110,1.111
      Message-ID: <200007272055.NAA21726@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Doc/tut
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv21713/tut
      
      Modified Files:
      	tut.tex 
      Log Message:
      
      Rip out the information about the PSA, since the fate of that is not
      certain.
      
      Update the information about the mailing list, using the python.org
      address instead of cwi.nl, and point to the pipermail archives.  Also
      update the daily average message count (at the risk of scaring people
      off), using the mail archive at http://www.egroups.com/group/python-list
      for the first half of 2000 for statistical information.
      
      
      Index: tut.tex
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v
      retrieving revision 1.110
      retrieving revision 1.111
      diff -C2 -r1.110 -r1.111
      *** tut.tex	2000/07/16 19:05:38	1.110
      --- tut.tex	2000/07/27 20:55:12	1.111
      ***************
      *** 3868,3872 ****
        you an idea of what's available.
        
      ! The major Python Web site is \url{http://www.python.org}; it contains
        code, documentation, and pointers to Python-related pages around the
        Web.  This web site is mirrored in various places around the
      --- 3868,3872 ----
        you an idea of what's available.
        
      ! The major Python Web site is \url{http://www.python.org/}; it contains
        code, documentation, and pointers to Python-related pages around the
        Web.  This web site is mirrored in various places around the
      ***************
      *** 3879,3900 ****
        For Python-related questions and problem reports, you can post to the
        newsgroup \newsgroup{comp.lang.python}, or send them to the mailing
      ! list at \email{python-list@cwi.nl}.  The newsgroup and mailing list
        are gatewayed, so messages posted to one will automatically be
      ! forwarded to the other.  There are around 35--45 postings a day,
        % Postings figure based on average of last six months activity as
      ! % reported by www.findmail.com; Oct. '97 - Mar. '98:  7480 msgs / 182
      ! % days = 41.1 msgs / day.
        asking (and answering) questions, suggesting new features, and
        announcing new modules.  Before posting, be sure to check the list of
        Frequently Asked Questions (also called the FAQ), at
        \url{http://www.python.org/doc/FAQ.html}, or look for it in the
      ! \file{Misc/} directory of the Python source distribution.  The FAQ
      ! answers many of the questions that come up again and again, and may
      ! already contain the solution for your problem.
      ! 
      ! You can support the Python community by joining the Python Software
      ! Activity, which runs the python.org web, ftp and email servers, and
      ! organizes Python workshops.  See \url{http://www.python.org/psa/} for
      ! information on how to join.
        
        
      --- 3879,3896 ----
        For Python-related questions and problem reports, you can post to the
        newsgroup \newsgroup{comp.lang.python}, or send them to the mailing
      ! list at \email{python-list@python.org}.  The newsgroup and mailing list
        are gatewayed, so messages posted to one will automatically be
      ! forwarded to the other.  There are around 120 postings a day,
        % Postings figure based on average of last six months activity as
      ! % reported by www.egroups.com; Jan. 2000 - June 2000: 21272 msgs / 182
      ! % days = 116.9 msgs / day and steadily increasing.
        asking (and answering) questions, suggesting new features, and
        announcing new modules.  Before posting, be sure to check the list of
        Frequently Asked Questions (also called the FAQ), at
        \url{http://www.python.org/doc/FAQ.html}, or look for it in the
      ! \file{Misc/} directory of the Python source distribution.  Mailing
      ! list archives are available at \url{http://www.python.org/pipermail/}.
      ! The FAQ answers many of the questions that come up again and again,
      ! and may already contain the solution for your problem.
        
        
      
      
      
      From python-dev@python.org  Thu Jul 27 21:59:01 2000
      From: python-dev@python.org (Jeremy Hylton)
      Date: Thu, 27 Jul 2000 13:59:01 -0700
      Subject: [Python-checkins] CVS: python/dist/src configure.in,1.138,1.139
      Message-ID: <200007272059.NAA22146@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv22111
      
      Modified Files:
      	configure.in 
      Log Message:
      Gregor Hoffleit: Don't link with the libieee library if it's not necessary
      
      
      Index: configure.in
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/configure.in,v
      retrieving revision 1.138
      retrieving revision 1.139
      diff -C2 -r1.138 -r1.139
      *** configure.in	2000/07/14 14:28:32	1.138
      --- configure.in	2000/07/27 20:58:58	1.139
      ***************
      *** 1012,1016 ****
        
        # Linux requires this for correct f.p. operations
      ! AC_CHECK_LIB(ieee, __fpu_control)
        
        # Check for --with-fpectl
      --- 1012,1019 ----
        
        # Linux requires this for correct f.p. operations
      ! AC_CHECK_FUNC(__fpu_control,
      !   [],
      !   [AC_CHECK_LIB(ieee, __fpu_control)
      ! ])
        
        # Check for --with-fpectl
      
      
      
      From python-dev@python.org  Thu Jul 27 22:03:07 2000
      From: python-dev@python.org (Jeremy Hylton)
      Date: Thu, 27 Jul 2000 14:03:07 -0700
      Subject: [Python-checkins] CVS: python/dist/src configure,1.129,1.130
      Message-ID: <200007272103.OAA29775@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv25091
      
      Modified Files:
      	configure 
      Log Message:
      Gregor Hoffleit: Don't link with the libieee library if it's not necessary
      
      
      Index: configure
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/configure,v
      retrieving revision 1.129
      retrieving revision 1.130
      diff -C2 -r1.129 -r1.130
      *** configure	2000/07/14 14:28:30	1.129
      --- configure	2000/07/27 21:03:04	1.130
      ***************
      *** 1,5 ****
        #! /bin/sh
        
      ! # From configure.in Revision: 1.137 
        
        # Guess values for system-dependent variables and create Makefiles.
      --- 1,5 ----
        #! /bin/sh
        
      ! # From configure.in Revision: 1.139 
        
        # Guess values for system-dependent variables and create Makefiles.
      ***************
      *** 5050,5055 ****
        
        # Linux requires this for correct f.p. operations
        echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
      ! echo "configure:5054: checking for __fpu_control in -lieee" >&5
        ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
        if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
      --- 5050,5101 ----
        
        # Linux requires this for correct f.p. operations
      + echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
      + echo "configure:5054: checking for __fpu_control" >&5
      + if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
      +   echo $ac_n "(cached) $ac_c" 1>&6
      + else
      +   cat > conftest.$ac_ext <
      + /* Override any gcc2 internal prototype to avoid an error.  */
      + /* We use char because int might match the return type of a gcc2
      +     builtin and then its argument prototype would still apply.  */
      + char __fpu_control();
      + 
      + int main() {
      + 
      + /* 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___fpu_control) || defined (__stub_____fpu_control)
      + choke me
      + #else
      + __fpu_control();
      + #endif
      + 
      + ; return 0; }
      + EOF
      + if { (eval echo configure:5082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
      +   rm -rf conftest*
      +   eval "ac_cv_func___fpu_control=yes"
      + else
      +   echo "configure: failed program was:" >&5
      +   cat conftest.$ac_ext >&5
      +   rm -rf conftest*
      +   eval "ac_cv_func___fpu_control=no"
      + fi
      + rm -f conftest*
      + fi
      + 
      + if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
      +   echo "$ac_t""yes" 1>&6
      +   :
      + else
      +   echo "$ac_t""no" 1>&6
        echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
      ! echo "configure:5100: checking for __fpu_control in -lieee" >&5
        ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
        if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
      ***************
      *** 5059,5063 ****
        LIBS="-lieee  $LIBS"
        cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
          rm -rf conftest*
          eval "ac_cv_lib_$ac_lib_var=yes"
      --- 5116,5120 ----
        ; return 0; }
        EOF
      ! if { (eval echo configure:5119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
          rm -rf conftest*
          eval "ac_cv_lib_$ac_lib_var=yes"
      ***************
      *** 5098,5104 ****
        
        
        # Check for --with-fpectl
        echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
      ! echo "configure:5103: checking for --with-fpectl" >&5
        # Check whether --with-fpectl or --without-fpectl was given.
        if test "${with_fpectl+set}" = set; then
      --- 5144,5153 ----
        
        
      + fi
      + 
      + 
        # Check for --with-fpectl
        echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
      ! echo "configure:5152: checking for --with-fpectl" >&5
        # Check whether --with-fpectl or --without-fpectl was given.
        if test "${with_fpectl+set}" = set; then
      ***************
      *** 5125,5129 ****
        esac
        echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
      ! echo "configure:5128: checking for --with-libm=STRING" >&5
        # Check whether --with-libm or --without-libm was given.
        if test "${with_libm+set}" = set; then
      --- 5174,5178 ----
        esac
        echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
      ! echo "configure:5177: checking for --with-libm=STRING" >&5
        # Check whether --with-libm or --without-libm was given.
        if test "${with_libm+set}" = set; then
      ***************
      *** 5146,5150 ****
        
        echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
      ! echo "configure:5149: checking for --with-libc=STRING" >&5
        # Check whether --with-libc or --without-libc was given.
        if test "${with_libc+set}" = set; then
      --- 5195,5199 ----
        
        echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
      ! echo "configure:5198: checking for --with-libc=STRING" >&5
        # Check whether --with-libc or --without-libc was given.
        if test "${with_libc+set}" = set; then
      ***************
      *** 5170,5179 ****
        do
        echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
      ! echo "configure:5173: checking for $ac_func" >&5
        if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <&6
      ! echo "configure:5222: checking for $ac_func" >&5
        if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
          rm -rf conftest*
          eval "ac_cv_func_$ac_func=yes"
      --- 5247,5251 ----
        ; return 0; }
        EOF
      ! if { (eval echo configure:5250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
          rm -rf conftest*
          eval "ac_cv_func_$ac_func=yes"
      ***************
      *** 5225,5234 ****
        do
        echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
      ! echo "configure:5228: checking for $ac_func" >&5
        if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <&6
      ! echo "configure:5277: checking for $ac_func" >&5
        if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
          rm -rf conftest*
          eval "ac_cv_func_$ac_func=yes"
      --- 5302,5306 ----
        ; return 0; }
        EOF
      ! if { (eval echo configure:5305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
          rm -rf conftest*
          eval "ac_cv_func_$ac_func=yes"
      ***************
      *** 5287,5296 ****
        do
        echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
      ! echo "configure:5290: checking for $ac_func" >&5
        if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <&6
      ! echo "configure:5339: checking for $ac_func" >&5
        if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
          rm -rf conftest*
          eval "ac_cv_func_$ac_func=yes"
      --- 5364,5368 ----
        ; return 0; }
        EOF
      ! if { (eval echo configure:5367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
          rm -rf conftest*
          eval "ac_cv_func_$ac_func=yes"
      ***************
      *** 5343,5347 ****
        # check for getopt
        echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
      ! echo "configure:5346: checking for genuine getopt" >&5
        if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
      --- 5392,5396 ----
        # check for getopt
        echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
      ! echo "configure:5395: checking for genuine getopt" >&5
        if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
      ***************
      *** 5351,5355 ****
        else
          cat > conftest.$ac_ext <
      --- 5400,5404 ----
        else
          cat > conftest.$ac_ext <
      ***************
      *** 5363,5367 ****
        }
        EOF
      ! if { (eval echo configure:5366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
        then
          ac_cv_func_getopt=yes
      --- 5412,5416 ----
        }
        EOF
      ! if { (eval echo configure:5415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
        then
          ac_cv_func_getopt=yes
      ***************
      *** 5381,5385 ****
        # check whether malloc(0) returns NULL or not
        echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
      ! echo "configure:5384: checking what malloc(0) returns" >&5
        if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
      --- 5430,5434 ----
        # check whether malloc(0) returns NULL or not
        echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
      ! echo "configure:5433: checking what malloc(0) returns" >&5
        if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
      ***************
      *** 5389,5393 ****
        else
          cat > conftest.$ac_ext <
      --- 5438,5442 ----
        else
          cat > conftest.$ac_ext <
      ***************
      *** 5408,5412 ****
        }
        EOF
      ! if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
        then
          ac_cv_malloc_zero=nonnull
      --- 5457,5461 ----
        }
        EOF
      ! if { (eval echo configure:5460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
        then
          ac_cv_malloc_zero=nonnull
      ***************
      *** 5434,5448 ****
        ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
        echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
      ! echo "configure:5437: checking for wchar.h" >&5
        if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <
        EOF
        ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
      ! { (eval echo configure:5447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
        ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
        if test -z "$ac_err"; then
      --- 5483,5497 ----
        ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
        echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
      ! echo "configure:5486: checking for wchar.h" >&5
        if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <
        EOF
        ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
      ! { (eval echo configure:5496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
        ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
        if test -z "$ac_err"; then
      ***************
      *** 5474,5483 ****
        usable_wchar_t="unkown"
        echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
      ! echo "configure:5477: checking for usable wchar_t" >&5
        if test "$cross_compiling" = yes; then
            { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
        else
          cat > conftest.$ac_ext <&6
      ! echo "configure:5526: checking for usable wchar_t" >&5
        if test "$cross_compiling" = yes; then
            { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
        else
          cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
        then
          cat >> confdefs.h <<\EOF
      --- 5542,5546 ----
        
        EOF
      ! if { (eval echo configure:5545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
        then
          cat >> confdefs.h <<\EOF
      ***************
      *** 5512,5516 ****
        # check for endianness
        echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
      ! echo "configure:5515: checking whether byte ordering is bigendian" >&5
        if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
      --- 5561,5565 ----
        # check for endianness
        echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
      ! echo "configure:5564: checking whether byte ordering is bigendian" >&5
        if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
      ***************
      *** 5519,5523 ****
        # See if sys/param.h defines the BYTE_ORDER macro.
        cat > conftest.$ac_ext <
      --- 5568,5572 ----
        # See if sys/param.h defines the BYTE_ORDER macro.
        cat > conftest.$ac_ext <
      ***************
      *** 5530,5538 ****
        ; return 0; }
        EOF
      ! if { (eval echo configure:5533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
          rm -rf conftest*
          # It does; now see whether it defined to BIG_ENDIAN or not.
        cat > conftest.$ac_ext <
      --- 5579,5587 ----
        ; return 0; }
        EOF
      ! if { (eval echo configure:5582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
          rm -rf conftest*
          # It does; now see whether it defined to BIG_ENDIAN or not.
        cat > conftest.$ac_ext <
      ***************
      *** 5545,5549 ****
        ; return 0; }
        EOF
      ! if { (eval echo configure:5548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
          rm -rf conftest*
          ac_cv_c_bigendian=yes
      --- 5594,5598 ----
        ; return 0; }
        EOF
      ! if { (eval echo configure:5597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
          rm -rf conftest*
          ac_cv_c_bigendian=yes
      ***************
      *** 5565,5569 ****
        else
          cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
        then
          ac_cv_c_bigendian=no
      --- 5627,5631 ----
        }
        EOF
      ! if { (eval echo configure:5630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
        then
          ac_cv_c_bigendian=no
      ***************
      *** 5605,5609 ****
        # or fills with zeros (like the Cray J90, according to Tim Peters).
        echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
      ! echo "configure:5608: checking whether right shift extends the sign bit" >&5
        if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
      --- 5654,5658 ----
        # or fills with zeros (like the Cray J90, according to Tim Peters).
        echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
      ! echo "configure:5657: checking whether right shift extends the sign bit" >&5
        if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
      ***************
      *** 5614,5618 ****
        else
          cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
        then
          ac_cv_rshift_extends_sign=yes
      --- 5672,5676 ----
        
        EOF
      ! if { (eval echo configure:5675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
        then
          ac_cv_rshift_extends_sign=yes
      ***************
      *** 5655,5664 ****
        EOF
        echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
      ! echo "configure:5658: checking for socklen_t" >&5
        if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <
      --- 5704,5713 ----
        EOF
        echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
      ! echo "configure:5707: checking for socklen_t" >&5
        if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <
      
      
      
      From python-dev@python.org  Thu Jul 27 22:10:06 2000
      From: python-dev@python.org (Eric S. Raymond)
      Date: Thu, 27 Jul 2000 14:10:06 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcurses.tex,1.11,1.12
      Message-ID: <200007272110.OAA30336@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Doc/lib
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv30177
      
      Modified Files:
      	libcurses.tex 
      Log Message:
      Second round of curses documentation improvements.  Completes and extends 
      documentation for function keys, special characters. 
      
      
      Index: libcurses.tex
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v
      retrieving revision 1.11
      retrieving revision 1.12
      diff -C2 -r1.11 -r1.12
      *** libcurses.tex	2000/07/26 02:59:13	1.11
      --- libcurses.tex	2000/07/27 21:10:02	1.12
      ***************
      *** 549,556 ****
        character position in that window:
        \begin{itemize}
      ! \item  The attribute of every character in the window  is
      !               changed to the new background attribute.
      ! 
      ! \item    Wherever  the  former background character appears,
        it is changed to the new background character.
        \end{itemize}
      --- 549,557 ----
        character position in that window:
        \begin{itemize}
      ! \item  
      ! The attribute of every character in the window  is
      ! changed to the new background attribute.
      ! \item
      ! Wherever  the  former background character appears,
        it is changed to the new background character.
        \end{itemize}
      ***************
      *** 978,982 ****
        
        Keys are referred to by integer constants with names starting with 
      ! \code{KEY_}.   The exact names available are system dependent.
        
        % XXX this table is far too large!
      --- 979,983 ----
        
        Keys are referred to by integer constants with names starting with 
      ! \code{KEY_}.   The exact keycaps available are system dependent.
        
        % XXX this table is far too large!
      ***************
      *** 1080,1094 ****
        \end{tableii}
        
        The following table lists characters from the alternate character set.
        \strong{Note:} These are available only after \function{initscr()} has 
        been called.
        
        \begin{tableii}{c|l}{code}{ACS code}{Meaning}
      !   \lineii{ACS_BBSS}{}
          \lineii{ACS_BLOCK}{solid square block}
          \lineii{ACS_BOARD}{board of squares}
      !   \lineii{ACS_BSBS}{}
      !   \lineii{ACS_BSSB}{}
      !   \lineii{ACS_BSSS}{}
          \lineii{ACS_BTEE}{bottom tee}
          \lineii{ACS_BULLET}{bullet}
      --- 1081,1115 ----
        \end{tableii}
        
      + On VT100s and their software emulations such as X terminal emulators,
      + there are normally at least four function keys (KEY_F1, KEY_F2,
      + KEY_F3, KEY_F4) available and the arrow keys mapped to KEY_UP,
      + KEY_DOWN, KEY_LEFT and KEY_RIGHT in the obvious way. If your machine has a PC
      + keybboard, it is safe to expect arrow keys and twelve function keys; also,
      + the following keypad mappings are standard:
      + 
      + \begin{tableii}{c|l}{code}{Keycap}{code}
      +    \lineii{Insert}{KEY_IC}
      +    \lineii{Delete}{KEY_DC}
      +    \lineii{Home}{KEY_HOME}
      +    \lineii{End}{KEY_END}
      +    \lineii{Page Up}{KEY_NPAGE}
      +    \lineii{Page Down}{KEY_PPAGE}
      + \end{tableii}
      + 
        The following table lists characters from the alternate character set.
      + These are inherited from the VT100 terminal, and will generally be 
      + available on software emulations such as X terminals.  When there
      + is no graphic available, curses falls back on a crude printable ASCII
      + approximation.
        \strong{Note:} These are available only after \function{initscr()} has 
        been called.
        
        \begin{tableii}{c|l}{code}{ACS code}{Meaning}
      !   \lineii{ACS_BBSS}{alternate name for upper right corner}
          \lineii{ACS_BLOCK}{solid square block}
          \lineii{ACS_BOARD}{board of squares}
      !   \lineii{ACS_BSBS}{alternate name for horizontal line}
      !   \lineii{ACS_BSSB}{alternate name for upper left corner}
      !   \lineii{ACS_BSSS}{alternate name for top tee}
          \lineii{ACS_BTEE}{bottom tee}
          \lineii{ACS_BULLET}{bullet}
      ***************
      *** 1108,1112 ****
          \lineii{ACS_PI}{letter pi}
          \lineii{ACS_PLMINUS}{plus-or-minus sign}
      !   \lineii{ACS_PLUS}{plus sign}
          \lineii{ACS_RARROW}{right arrow}
          \lineii{ACS_RTEE}{right tee}
      --- 1129,1133 ----
          \lineii{ACS_PI}{letter pi}
          \lineii{ACS_PLMINUS}{plus-or-minus sign}
      !   \lineii{ACS_PLUS}{big plus sign}
          \lineii{ACS_RARROW}{right arrow}
          \lineii{ACS_RTEE}{right tee}
      ***************
      *** 1115,1125 ****
          \lineii{ACS_S7}{scan line 7}
          \lineii{ACS_S9}{scan line 9}
      !   \lineii{ACS_SBBS}{}
      !   \lineii{ACS_SBSB}{}
      !   \lineii{ACS_SBSS}{}
      !   \lineii{ACS_SSBB}{}
      !   \lineii{ACS_SSBS}{}
      !   \lineii{ACS_SSSB}{}
      !   \lineii{ACS_SSSS}{}
          \lineii{ACS_STERLING}{pound sterling}
          \lineii{ACS_TTEE}{top tee}
      --- 1136,1146 ----
          \lineii{ACS_S7}{scan line 7}
          \lineii{ACS_S9}{scan line 9}
      !   \lineii{ACS_SBBS}{alternate name for lower right corner}
      !   \lineii{ACS_SBSB}{alternate name for vertical line}
      !   \lineii{ACS_SBSS}{alternate name for right tee}
      !   \lineii{ACS_SSBB}{alternate name for lower left corner}
      !   \lineii{ACS_SSBS}{alternate name for bottom tee}
      !   \lineii{ACS_SSSB}{alternate name for left tee}
      !   \lineii{ACS_SSSS}{alternate name for crossover or big plus}
          \lineii{ACS_STERLING}{pound sterling}
          \lineii{ACS_TTEE}{top tee}
      
      
      
      From python-dev@python.org  Thu Jul 27 22:23:31 2000
      From: python-dev@python.org (Jeremy Hylton)
      Date: Thu, 27 Jul 2000 14:23:31 -0700
      Subject: [Python-checkins] CVS: python/dist/src configure.in,1.139,1.140 configure,1.130,1.131
      Message-ID: <200007272123.OAA31515@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv31476
      
      Modified Files:
      	configure.in configure 
      Log Message:
      Gregor Hoffleit: don't link with libnet on non-BeOS systems
      
      
      Index: configure.in
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/configure.in,v
      retrieving revision 1.139
      retrieving revision 1.140
      diff -C2 -r1.139 -r1.140
      *** configure.in	2000/07/27 20:58:58	1.139
      --- configure.in	2000/07/27 21:23:28	1.140
      ***************
      *** 625,628 ****
      --- 625,632 ----
        AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
        AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
      + ;;
      + esac
      + case "$ac_sys_system" in
      + BeOS*)
        AC_CHECK_LIB(net, socket, [LIBS="-lnet $LIBS"], [], $LIBS) # BeOS
        ;;
      
      Index: configure
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/configure,v
      retrieving revision 1.130
      retrieving revision 1.131
      diff -C2 -r1.130 -r1.131
      *** configure	2000/07/27 21:03:04	1.130
      --- configure	2000/07/27 21:23:28	1.131
      ***************
      *** 2795,2800 ****
        fi
         # SVR4 sockets
        echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
      ! echo "configure:2799: checking for socket in -lnet" >&5
        ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
        if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
      --- 2795,2804 ----
        fi
         # SVR4 sockets
      + ;;
      [...2260 lines suppressed...]
        echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
      ! echo "configure:5707: checking for socklen_t" >&5
        if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <
      --- 5708,5717 ----
        EOF
        echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
      ! echo "configure:5711: checking for socklen_t" >&5
        if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
          echo $ac_n "(cached) $ac_c" 1>&6
        else
          cat > conftest.$ac_ext <
      
      
      
      From python-dev@python.org  Fri Jul 28 00:26:31 2000
      From: python-dev@python.org (Trent Mick)
      Date: Thu, 27 Jul 2000 16:26:31 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_winreg,1.1,1.2
      Message-ID: <200007272326.QAA23239@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Lib/test/output
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv21305
      
      Modified Files:
      	test_winreg 
      Log Message:
      Remove erroneous empty trailing line. (cause test_winreg.py failure)
      
      
      Index: test_winreg
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_winreg,v
      retrieving revision 1.1
      retrieving revision 1.2
      diff -C2 -r1.1 -r1.2
      *** test_winreg	2000/03/28 20:36:51	1.1
      --- test_winreg	2000/07/27 23:26:28	1.2
      ***************
      *** 2,4 ****
        Local registry tests worked
        Remote registry calls can be tested using 'test_winreg.py --remote \\machine_name'
      - 
      --- 2,3 ----
      
      
      
      From python-dev@python.org  Fri Jul 28 04:42:43 2000
      From: python-dev@python.org (Mark Hammond)
      Date: Thu, 27 Jul 2000 20:42:43 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-win winreg.py,1.4,1.5
      Message-ID: <200007280342.UAA12244@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Lib/plat-win
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv12231
      
      Modified Files:
      	winreg.py 
      Log Message:
      Fix a type in the docstrings, and make the module Unicode aware.
      
      Index: winreg.py
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Lib/plat-win/winreg.py,v
      retrieving revision 1.4
      retrieving revision 1.5
      diff -C2 -r1.4 -r1.5
      *** winreg.py	2000/07/21 21:43:09	1.4
      --- winreg.py	2000/07/28 03:42:40	1.5
      ***************
      *** 16,20 ****
            Note: deleteKey may not be recursive on all platforms.
        
      ! >>> key=createKey( r"HKLM\SOFTWARE\Python\Test" )
        
        RemoteKey( machine, top_level_key ): 
      --- 16,20 ----
            Note: deleteKey may not be recursive on all platforms.
        
      ! >>> key=deleteKey( r"HKLM\SOFTWARE\Python\Test" )
        
        RemoteKey( machine, top_level_key ): 
      ***************
      *** 140,144 ****
                    raise IndexError, item
        
      !     elif type( item )==StringType: 
                keyname=item
            else:
      --- 140,144 ----
                    raise IndexError, item
        
      !     elif type( item ) in [StringType, UnicodeType]: 
                keyname=item
            else:
      ***************
      *** 301,311 ****
                    typeint=regtype.intval
                else:
      !             if type( data )==StringType:
                        typeint=_winreg.REG_SZ
                    elif type( data )==IntType:
                        typeint=_winreg.REG_DWORD
                    elif type( data )==array.ArrayType:
                        typeint=_winreg.REG_BINARY
      -                 data=data.tostring()
                _winreg.SetValueEx( self.handle, valname, 0, typeint, data )
        
      --- 301,315 ----
                    typeint=regtype.intval
                else:
      !             if type( data ) in [StringType, UnicodeType]:
                        typeint=_winreg.REG_SZ
      +             elif type( data )==ListType:
      +                  # XXX - _winreg currently only supports lists
      +                  # Also, probably should check each element is
      +                  # string/unicode.
      +                  typeint = _winreg.REG_MULTI_SZ
                    elif type( data )==IntType:
                        typeint=_winreg.REG_DWORD
                    elif type( data )==array.ArrayType:
                        typeint=_winreg.REG_BINARY
                _winreg.SetValueEx( self.handle, valname, 0, typeint, data )
        
      
      
      
      From python-dev@python.org  Fri Jul 28 04:44:43 2000
      From: python-dev@python.org (Mark Hammond)
      Date: Thu, 27 Jul 2000 20:44:43 -0700
      Subject: [Python-checkins] CVS: python/dist/src/PC _winreg.c,1.7,1.8
      Message-ID: <200007280344.UAA12335@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/PC
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv12325
      
      Modified Files:
      	_winreg.c 
      Log Message:
      Allow any object supporting the buffer protocol to be written as a binary object.
      
      Index: _winreg.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/PC/_winreg.c,v
      retrieving revision 1.7
      retrieving revision 1.8
      diff -C2 -r1.7 -r1.8
      *** _winreg.c	2000/07/16 12:04:32	1.7
      --- _winreg.c	2000/07/28 03:44:41	1.8
      ***************
      *** 831,837 ****
        				*retDataSize = 0;
        			else {
      ! 				if (!PyString_Check(value))
      ! 					return 0;
      ! 				*retDataSize = PyString_Size(value);
        				*retDataBuf = (BYTE *)PyMem_NEW(char,
        								*retDataSize);
      --- 831,844 ----
        				*retDataSize = 0;
        			else {
      ! 				void *src_buf;
      ! 				PyBufferProcs *pb = value->ob_type->tp_as_buffer;
      ! 				if (pb==NULL) {
      ! 					PyErr_Format(PyExc_TypeError, 
      ! 						"Objects of type '%s' can not "
      ! 						"be used as binary registry values", 
      ! 						value->ob_type->tp_name);
      ! 					return FALSE;
      ! 				}
      ! 				*retDataSize = (*pb->bf_getreadbuffer)(value, 0, &src_buf);
        				*retDataBuf = (BYTE *)PyMem_NEW(char,
        								*retDataSize);
      ***************
      *** 840,847 ****
        					return FALSE;
        				}
      ! 				memcpy(*retDataBuf,
      ! 				       PyString_AS_STRING(
      ! 				       		(PyStringObject *)value),
      ! 				       *retDataSize);
        			}
        			break;
      --- 847,851 ----
        					return FALSE;
        				}
      ! 				memcpy(*retDataBuf, src_buf, *retDataSize);
        			}
        			break;
      
      
      
      From python-dev@python.org  Fri Jul 28 04:45:34 2000
      From: python-dev@python.org (Mark Hammond)
      Date: Thu, 27 Jul 2000 20:45:34 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_winreg2.py,1.1,1.2
      Message-ID: <200007280345.UAA12378@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Lib/test
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv12371
      
      Modified Files:
      	test_winreg2.py 
      Log Message:
      Was quite broken and incomplete.  Now passes the test suite, but is still incomplete.
      
      Index: test_winreg2.py
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Lib/test/test_winreg2.py,v
      retrieving revision 1.1
      retrieving revision 1.2
      diff -C2 -r1.1 -r1.2
      *** test_winreg2.py	2000/06/30 19:36:23	1.1
      --- test_winreg2.py	2000/07/28 03:45:32	1.2
      ***************
      *** 2,5 ****
      --- 2,6 ----
        import sys, traceback
        import time
      + import array
        
        def testHives():
      ***************
      *** 128,131 ****
      --- 129,139 ----
            assert not hives["HKCU"].getValues().has_key( "Blah" )
        
      +     # Ensure Unicode works as we expect
      +     hives["HKCU"].setValue( u"Blah", u"abc" )
      +     assert hives["HKCU"].getValueData( "Blah" )=="abc"
      +     assert hives["HKCU"].getValues().has_key( u"Blah" )
      +     del hives["HKCU"].getValues()[ u"Blah" ]
      +     assert not hives["HKCU"].getValues().has_key( u"Blah" )
      + 
        def testDeleteValue():
            hives["HKCU"].setValue( "Blah", "abc" )
      ***************
      *** 176,181 ****
            assert key.getValues()[ "abcd" ][1]==5
            key.deleteValue( "abcd" )
      !     key.deleteKey( "HKLM\\Software\\a\\b")
      !     key.deleteKey( "HKLM\\Software\\a")
        
        def testSetBinaryValue(): 
      --- 184,189 ----
            assert key.getValues()[ "abcd" ][1]==5
            key.deleteValue( "abcd" )
      !     deleteKey( "HKLM\\Software\\a\\b")
      !     deleteKey( "HKLM\\Software\\a")
        
        def testSetBinaryValue(): 
      ***************
      *** 184,190 ****
            key.setValue( "abcde", array.array( 'c', "PPPPPPPPPPPPPPP"), 
                               regtypes["REG_BINARY"] )
      !     assert key.getValues()["abcd"]==key.getValues()["abcde"]
      !     key.deleteKey( "HKLM\\Software\\a\\b")
      !     key.deleteKey( "HKLM\\Software\\a")
        
        def testSetNone(): pass
      --- 192,199 ----
            key.setValue( "abcde", array.array( 'c', "PPPPPPPPPPPPPPP"), 
                               regtypes["REG_BINARY"] )
      !     assert key.getValues()["abcd"][1]==key.getValues()["abcde"][1]
      !     key = None # Remove our reference.
      !     deleteKey( "HKLM\\Software\\a\\b")
      !     deleteKey( "HKLM\\Software\\a")
        
        def testSetNone(): pass
      
      
      
      From python-dev@python.org  Fri Jul 28 06:48:28 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Thu, 27 Jul 2000 22:48:28 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.10,1.11
      Message-ID: <200007280548.WAA02083@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv2074
      
      Modified Files:
      	pep-0201.txt 
      Log Message:
      Parallel => Lockstep everywhere.
      
      Replaced the reference implementation with one that's closer to what
      the C code will actually look like; i.e. it obeys the iteration
      protocol.
      
      Other grammar and spelling fixes.
      
      
      Index: pep-0201.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v
      retrieving revision 1.10
      retrieving revision 1.11
      diff -C2 -r1.10 -r1.11
      *** pep-0201.txt	2000/07/27 19:17:36	1.10
      --- pep-0201.txt	2000/07/28 05:48:25	1.11
      ***************
      *** 1,4 ****
        PEP: 201
      ! Title: Parallel Iteration
        Version: $Revision$
        Author: bwarsaw@beopen.com (Barry A. Warsaw)
      --- 1,4 ----
        PEP: 201
      ! Title: Lockstep Iteration
        Version: $Revision$
        Author: bwarsaw@beopen.com (Barry A. Warsaw)
      ***************
      *** 11,22 ****
        Introduction
        
      !     This PEP describes the `parallel iteration' proposal for Python
      !     2.0, previously known as `parallel for loops'.  This PEP tracks
      !     the status and ownership of this feature, slated for introduction
      !     in Python 2.0.  It contains a description of the feature and
      !     outlines changes necessary to support the feature.  This PEP
      !     summarizes discussions held in mailing list forums, and provides
      !     URLs for further information, where appropriate.  The CVS revision
      !     history of this file contains the definitive historical record.
        
        
      --- 11,22 ----
        Introduction
        
      !     This PEP describes the `lockstep iteration' proposal for Python
      !     2.0.  This PEP tracks the status and ownership of this feature,
      !     slated for introduction in Python 2.0.  It contains a description
      !     of the feature and outlines changes necessary to support the
      !     feature.  This PEP summarizes discussions held in mailing list
      !     forums, and provides URLs for further information, where
      !     appropriate.  The CVS revision history of this file contains the
      !     definitive historical record.
        
        
      ***************
      *** 34,40 ****
        
        
      ! Parallel For-Loops
        
      !     Parallel for-loops are non-nested iterations over two or more
            sequences, such that at each pass through the loop, one element
            from each sequence is taken to compose the target.  This behavior
      --- 34,40 ----
        
        
      ! Lockstep For-Loops
        
      !     Lockstep for-loops are non-nested iterations over two or more
            sequences, such that at each pass through the loop, one element
            from each sequence is taken to compose the target.  This behavior
      ***************
      *** 71,78 ****
        
            For these reasons, several proposals were floated in the Python
      !     2.0 beta time frame for providing a better spelling of parallel
            for-loops.  The initial proposals centered around syntactic
            changes to the for statement, but conflicts and problems with the
      !     syntax were unresolvable, especially when parallel for-loops were
            combined with another proposed feature called `list
            comprehensions' (see pep-0202.txt).
      --- 71,78 ----
        
            For these reasons, several proposals were floated in the Python
      !     2.0 beta time frame for providing a better spelling of lockstep
            for-loops.  The initial proposals centered around syntactic
            changes to the for statement, but conflicts and problems with the
      !     syntax were unresolvable, especially when lockstep for-loops were
            combined with another proposed feature called `list
            comprehensions' (see pep-0202.txt).
      ***************
      *** 141,146 ****
        
            Here is a reference implementation, in Python of the zip()
      !     built-in function.  These would ultimately be replaced by
      !     equivalent C code.
        
            def zip(*args):
      --- 141,146 ----
        
            Here is a reference implementation, in Python of the zip()
      !     built-in function.  This will be replaced with a C implementation
      !     after final approval.
        
            def zip(*args):
      ***************
      *** 148,159 ****
                    raise TypeError('zip() expects one or more sequence arguments')
                ret = []
      !         # find the length of the shortest sequence
      !         shortest = min(*map(len, args))
      !         for i in range(shortest):
      !             item = []
      !             for s in args:
      !                 item.append(s[i])
      !             ret.append(tuple(item))
      !         return ret
        
        
      --- 148,161 ----
                    raise TypeError('zip() expects one or more sequence arguments')
                ret = []
      !         i = 0
      !         try:
      !             while 1:
      !                 item = []
      !                 for s in args:
      !                     item.append(s[i])
      !                 ret.append(tuple(item))
      !                 i = i + 1
      !         except IndexError:
      !             return ret
        
        
      ***************
      *** 166,171 ****
              open issue listing 20+ proposed alternative names to zip().  In
              the face of no overwhelmingly better choice, the BDFL strongly
      !       prefers zip() due to it's Haskell[2] heritage.  See version 1.7
      !       of this PEP for the list of alteratives.
        
            - zip() shall be a built-in function.
      --- 168,173 ----
              open issue listing 20+ proposed alternative names to zip().  In
              the face of no overwhelmingly better choice, the BDFL strongly
      !       prefers zip() due to its Haskell[2] heritage.  See version 1.7
      !       of this PEP for the list of alternatives.
        
            - zip() shall be a built-in function.
      
      
      
      From python-dev@python.org  Fri Jul 28 06:48:58 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Thu, 27 Jul 2000 22:48:58 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.12,1.13
      Message-ID: <200007280548.WAA02117@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv2109
      
      Modified Files:
      	pep-0000.txt 
      Log Message:
      PEP 201 renamed "Lockstep Iteration"
      
      
      Index: pep-0000.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v
      retrieving revision 1.12
      retrieving revision 1.13
      diff -C2 -r1.12 -r1.13
      *** pep-0000.txt	2000/07/25 02:26:38	1.12
      --- pep-0000.txt	2000/07/28 05:48:56	1.13
      ***************
      *** 1,3 ****
      ! PEP: 0
        Title: Index of Python Enhancement Proposals (PEPs)
        Version: $Revision$
      --- 1,3 ----
      ! yPEP: 0
        Title: Index of Python Enhancement Proposals (PEPs)
        Version: $Revision$
      ***************
      *** 22,26 ****
        
             200  pep-0200.txt  Python 2.0 Release Schedule          jhylton  
      !      201  pep-0201.txt  Parallel Iteration                   bwarsaw
             202  pep-0202.txt  List Comprehensions                  tim_one
             203  pep-0203.txt  Augmented Assignments                twouters
      --- 22,26 ----
        
             200  pep-0200.txt  Python 2.0 Release Schedule          jhylton  
      !      201  pep-0201.txt  Lockstep Iteration                   bwarsaw
             202  pep-0202.txt  List Comprehensions                  tim_one
             203  pep-0203.txt  Augmented Assignments                twouters
      
      
      
      From python-dev@python.org  Fri Jul 28 06:49:35 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Thu, 27 Jul 2000 22:49:35 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.13,1.14
      Message-ID: <200007280549.WAA02159@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv2151
      
      Modified Files:
      	pep-0000.txt 
      Log Message:
      minor typo
      
      
      Index: pep-0000.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v
      retrieving revision 1.13
      retrieving revision 1.14
      diff -C2 -r1.13 -r1.14
      *** pep-0000.txt	2000/07/28 05:48:56	1.13
      --- pep-0000.txt	2000/07/28 05:49:32	1.14
      ***************
      *** 1,3 ****
      ! yPEP: 0
        Title: Index of Python Enhancement Proposals (PEPs)
        Version: $Revision$
      --- 1,3 ----
      ! PEP: 0
        Title: Index of Python Enhancement Proposals (PEPs)
        Version: $Revision$
      
      
      
      From python-dev@python.org  Fri Jul 28 07:40:13 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Thu, 27 Jul 2000 23:40:13 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep2html.py,1.7,1.8
      Message-ID: <200007280640.XAA12959@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv12950
      
      Modified Files:
      	pep2html.py 
      Log Message:
      Moved "Local Variables:" string farther away from the end of the file,
      so Emacs doesn't think this actually indicates the beginning of a
      local variable section!
      
      
      Index: pep2html.py
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v
      retrieving revision 1.7
      retrieving revision 1.8
      diff -C2 -r1.7 -r1.8
      *** pep2html.py	2000/07/27 19:18:59	1.7
      --- pep2html.py	2000/07/28 06:40:10	1.8
      ***************
      *** 20,23 ****
      --- 20,24 ----
        HOST = "shell.sourceforge.net" # host for update
        HDIR = "/home/groups/python/htdocs/peps" # target host directory
      + LOCALVARS = "Local Variables:"
        
        DTD = ('\n

      %s

      \n
      " % line.strip())
      --- 93,97 ----
                if line[0] != "\f":
                    if line[0].strip():
      !                 if line.strip() == LOCALVARS:
                            break
                        fo.write("
      \n

      %s

      \n
      " % line.strip())
      
      
      
      From python-dev@python.org  Fri Jul 28 11:34:51 2000
      From: python-dev@python.org (Guido van Rossum)
      Date: Fri, 28 Jul 2000 03:34:51 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Tools/freeze makeconfig.py,1.2,1.3
      Message-ID: <200007281034.DAA29333@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Tools/freeze
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv29325
      
      Modified Files:
      	makeconfig.py 
      Log Message:
      Add the exceptions module to the 'never' list -- it is built in.
      
      
      Index: makeconfig.py
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Tools/freeze/makeconfig.py,v
      retrieving revision 1.2
      retrieving revision 1.3
      diff -C2 -r1.2 -r1.3
      *** makeconfig.py	1999/09/30 14:12:44	1.2
      --- makeconfig.py	2000/07/28 10:34:48	1.3
      ***************
      *** 4,8 ****
        # Write the config.c file
        
      ! never = ['marshal', '__main__', '__builtin__', 'sys']
        
        def makeconfig(infp, outfp, modules, with_ifdef=0):
      --- 4,8 ----
        # Write the config.c file
        
      ! never = ['marshal', '__main__', '__builtin__', 'sys', 'exceptions']
        
        def makeconfig(infp, outfp, modules, with_ifdef=0):
      
      
      
      From python-dev@python.org  Fri Jul 28 14:51:29 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Fri, 28 Jul 2000 06:51:29 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Doc/lib liburllib.tex,1.23,1.24
      Message-ID: <200007281351.GAA18778@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Doc/lib
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv18766/lib
      
      Modified Files:
      	liburllib.tex 
      Log Message:
      
      Finally fixed the much-reported bug about "~" in a couple of example.
      This time, it was reported by Skip.
      
      
      Index: liburllib.tex
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/lib/liburllib.tex,v
      retrieving revision 1.23
      retrieving revision 1.24
      diff -C2 -r1.23 -r1.24
      *** liburllib.tex	2000/07/16 19:01:10	1.23
      --- liburllib.tex	2000/07/28 13:51:27	1.24
      ***************
      *** 129,133 ****
        that should not be quoted --- its default value is \code{'/'}.
        
      ! Example: \code{quote('/\~connolly/')} yields \code{'/\%7econnolly/'}.
        \end{funcdesc}
        
      --- 129,133 ----
        that should not be quoted --- its default value is \code{'/'}.
        
      ! Example: \code{quote('/\~{}connolly/')} yields \code{'/\%7econnolly/'}.
        \end{funcdesc}
        
      ***************
      *** 141,145 ****
        Replace \samp{\%xx} escapes by their single-character equivalent.
        
      ! Example: \code{unquote('/\%7Econnolly/')} yields \code{'/\~connolly/'}.
        \end{funcdesc}
        
      --- 141,145 ----
        Replace \samp{\%xx} escapes by their single-character equivalent.
        
      ! Example: \code{unquote('/\%7Econnolly/')} yields \code{'/\~{}connolly/'}.
        \end{funcdesc}
        
      
      
      
      From python-dev@python.org  Sat Jul 29 06:15:58 2000
      From: python-dev@python.org (Moshe Zadka)
      Date: Fri, 28 Jul 2000 22:15:58 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Lib SimpleHTTPServer.py,1.10,1.11
      Message-ID: <200007290515.WAA25057@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Lib
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv24997
      
      Modified Files:
      	SimpleHTTPServer.py 
      Log Message:
      Using shutil's function to copy data between file objects instead
      of rolling our own.
      
      Note:
      This is my first sourceforge checkin. If you see anything funny about
      this patch, please let me know.
      
      
      Index: SimpleHTTPServer.py
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Lib/SimpleHTTPServer.py,v
      retrieving revision 1.10
      retrieving revision 1.11
      diff -C2 -r1.10 -r1.11
      *** SimpleHTTPServer.py	2000/05/21 16:25:29	1.10
      --- SimpleHTTPServer.py	2000/07/29 05:15:56	1.11
      ***************
      *** 16,19 ****
      --- 16,20 ----
        import urllib
        import cgi
      + import shutil
        from StringIO import StringIO
        
      ***************
      *** 152,161 ****
        
                """
      ! 
      !         BLOCKSIZE = 8192
      !         while 1:
      !             data = source.read(BLOCKSIZE)
      !             if not data: break
      !             outputfile.write(data)
        
            def guess_type(self, path):
      --- 153,157 ----
        
                """
      !         shutil.copyfileobj(source, outputfile)
        
            def guess_type(self, path):
      
      
      
      From python-dev@python.org  Sat Jul 29 06:31:43 2000
      From: python-dev@python.org (Moshe Zadka)
      Date: Fri, 28 Jul 2000 22:31:43 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Lib whichdb.py,1.6,1.7
      Message-ID: <200007290531.WAA25830@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Lib
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv25787
      
      Modified Files:
      	whichdb.py 
      Log Message:
      Added support to recognize Python's internal "dumbdbm" database.
      This closes bug 200 on Jitterbug.
      
      
      Index: whichdb.py
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Lib/whichdb.py,v
      retrieving revision 1.6
      retrieving revision 1.7
      diff -C2 -r1.6 -r1.7
      *** whichdb.py	2000/02/10 17:17:14	1.6
      --- whichdb.py	2000/07/29 05:31:40	1.7
      ***************
      *** 26,29 ****
      --- 26,41 ----
                pass
        
      +     # Check for dumbdbm next -- this has a .dir and and a .dat file
      +         f = open(filename + ".dat", "rb")
      +         f.close()
      +         f = open(filename + ".dir", "rb")
      +         try:
      +             if f.read(1) in ["'", '"']:
      +                 return "dumbdbm"
      +         finally:
      +             f.close()
      +     except IOError:
      +         pass
      + 
            # See if the file exists, return None if not
            try:
      
      
      
      From python-dev@python.org  Sat Jul 29 08:05:44 2000
      From: python-dev@python.org (Moshe Zadka)
      Date: Sat, 29 Jul 2000 00:05:44 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0206.txt,1.5,1.6
      Message-ID: <200007290705.AAA11960@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv11914
      
      Modified Files:
      	pep-0206.txt 
      Log Message:
      -- Removed those pesky ^L's
      -- Added line about piddle
      
      
      
      Index: pep-0206.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0206.txt,v
      retrieving revision 1.5
      retrieving revision 1.6
      diff -C2 -r1.5 -r1.6
      *** pep-0206.txt	2000/07/15 23:52:40	1.5
      --- pep-0206.txt	2000/07/29 07:05:41	1.6
      ***************
      *** 7,11 ****
        
        
      - 
        Introduction
        
      --- 7,10 ----
      ***************
      *** 17,21 ****
        
        
      - 
        Batteries Included Philosophy
        
      --- 16,19 ----
      ***************
      *** 36,40 ****
        
        
      - 
        The Proposed Solution
        
      --- 34,37 ----
      ***************
      *** 65,69 ****
            ncurses -- ftp://dickey.his.com/ncurses/ncurses.tar.gz
        
      !     TBD, the following three:
        
            NumPy -- http://download.sourceforge.net/numpy/Numerical-15.3.tgz
      --- 62,66 ----
            ncurses -- ftp://dickey.his.com/ncurses/ncurses.tar.gz
        
      !     TBD, the following:
        
            NumPy -- http://download.sourceforge.net/numpy/Numerical-15.3.tgz
      ***************
      *** 71,75 ****
            BLT -- ftp://ftp.tcltk.com/aa004735/pub/blt/BLT2.4u.tar.gz
        
      ! 
        Connection to Distutils
        
      --- 68,75 ----
            BLT -- ftp://ftp.tcltk.com/aa004735/pub/blt/BLT2.4u.tar.gz
        
      !     Still waiting for information on last-known-good version:
      ! 
      !     piddle -- http://sourceforge.net/project/filelist.php?group_id=1074
      ! 
        Connection to Distutils
        
      ***************
      *** 86,90 ****
        
        
      - 
        Software covered by the GNU Public License
        
      --- 86,89 ----
      ***************
      *** 100,104 ****
        
        
      - 
        Open Issues
        
      --- 99,102 ----
      ***************
      *** 113,117 ****
        
        
      - 
        Local Variables:
        mode: indented-text
      --- 111,114 ----
      
      
      
      From python-dev@python.org  Sat Jul 29 11:11:23 2000
      From: python-dev@python.org (Moshe Zadka)
      Date: Sat, 29 Jul 2000 03:11:23 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0206.txt,1.6,1.7
      Message-ID: <200007291011.DAA17529@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv16339
      
      Modified Files:
      	pep-0206.txt 
      Log Message:
      Changed status of piddle, based on Janko's input.
      
      
      Index: pep-0206.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0206.txt,v
      retrieving revision 1.6
      retrieving revision 1.7
      diff -C2 -r1.6 -r1.7
      *** pep-0206.txt	2000/07/29 07:05:41	1.6
      --- pep-0206.txt	2000/07/29 10:11:19	1.7
      ***************
      *** 67,74 ****
            Pmw --  ftp://ftp.dscpl.com.au/pub/pmw/Pmw.0.8.4.tar.gz
            BLT -- ftp://ftp.tcltk.com/aa004735/pub/blt/BLT2.4u.tar.gz
        
      -     Still waiting for information on last-known-good version:
      - 
      -     piddle -- http://sourceforge.net/project/filelist.php?group_id=1074
        
        Connection to Distutils
      --- 67,72 ----
            Pmw --  ftp://ftp.dscpl.com.au/pub/pmw/Pmw.0.8.4.tar.gz
            BLT -- ftp://ftp.tcltk.com/aa004735/pub/blt/BLT2.4u.tar.gz
      +     piddle -- http://download.sourceforge.net/piddle/piddle-1.0b7.tgz
        
        
        Connection to Distutils
      
      
      
      From python-dev@python.org  Sat Jul 29 14:24:42 2000
      From: python-dev@python.org (A.M. Kuchling)
      Date: Sat, 29 Jul 2000 06:24:42 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Tools/perfecthash GenUCNHash.py,1.5,NONE perfect_hash.py,1.3,NONE perfhash.c,1.3,NONE
      Message-ID: <200007291324.GAA09833@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Tools/perfecthash
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv9732
      
      Removed Files:
      	GenUCNHash.py perfect_hash.py perfhash.c 
      Log Message:
      Removed Tools/perfecthash, per python-dev discussion
      
      
      
      
      
      
      
      From python-dev@python.org  Sat Jul 29 21:15:28 2000
      From: python-dev@python.org (A.M. Kuchling)
      Date: Sat, 29 Jul 2000 13:15:28 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Lib gzip.py,1.18,1.19
      Message-ID: <200007292015.NAA28361@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Lib
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv28353
      
      Modified Files:
      	gzip.py 
      Log Message:
      SF patch #100740: Add optional size arguments to .readline() and
      .readlines() methods.  Inspired by a patch from Wolfgang Grafen,
      though this version of the patch was completely rewritten from his
      code.
      
      
      Index: gzip.py
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Lib/gzip.py,v
      retrieving revision 1.18
      retrieving revision 1.19
      diff -C2 -r1.18 -r1.19
      *** gzip.py	2000/05/08 16:59:59	1.18
      --- gzip.py	2000/07/29 20:15:26	1.19
      ***************
      *** 6,13 ****
        # based on Andrew Kuchling's minigzip.py distributed with the zlib module
        
      ! import time
      ! import string
        import zlib
      - import struct
        import __builtin__
        
      --- 6,11 ----
        # based on Andrew Kuchling's minigzip.py distributed with the zlib module
        
      ! import string, struct, sys, time
        import zlib
        import __builtin__
        
      ***************
      *** 176,180 ****
         	
                if self._new_member:
      !             # If the _new_member flag is set, we have to 
                    # 
                    # First, check if we're at the end of the file;
      --- 174,179 ----
         	
                if self._new_member:
      !             # If the _new_member flag is set, we have to
      !             # jump to the next member, if there is one.
                    # 
                    # First, check if we're at the end of the file;
      ***************
      *** 274,298 ****
                return 0
        
      !     def readline(self):
                bufs = []
      !         readsize = 100
                while 1:
                    c = self.read(readsize)
                    i = string.find(c, '\n')
                    if i >= 0 or c == '':
      !                 bufs.append(c[:i+1])
      !                 self._unread(c[i+1:])
      !                 return string.join(bufs, '')
                    bufs.append(c)
      !             readsize = readsize * 2
        
      !     def readlines(self, ignored=None):
      !         buf = self.read()
      !         lines = string.split(buf, '\n')
      !         for i in range(len(lines)-1):
      !             lines[i] = lines[i] + '\n'
      !         if lines and not lines[-1]:
      !             del lines[-1]
      !         return lines
        
            def writelines(self, L):
      --- 273,316 ----
                return 0
        
      !     def readline(self, size=-1):
      !         if size < 0: size = sys.maxint
                bufs = []
      !         orig_size = size
      !         readsize = min(100, size)    # Read from the file in small chunks
                while 1:
      +             if size == 0:
      +                 return string.join(bufs, '') # Return resulting line
      + 
                    c = self.read(readsize)
                    i = string.find(c, '\n')
      +             if size is not None:
      +                 # We set i=size to break out of the loop under two
      +                 # conditions: 1) there's no newline, and the chunk is 
      +                 # larger than size, or 2) there is a newline, but the
      +                 # resulting line would be longer than 'size'.
      +                 if i==-1 and len(c) > size: i=size-1
      +                 elif size <= i: i = size -1
      + 
                    if i >= 0 or c == '':
      !                 bufs.append(c[:i+1])    # Add portion of last chunk
      !                 self._unread(c[i+1:])   # Push back rest of chunk
      !                 return string.join(bufs, '') # Return resulting line
      ! 
      !             # Append chunk to list, decrease 'size',
                    bufs.append(c)
      !             size = size - len(c)
      !             readsize = min(size, readsize * 2)
      !             
      !     def readlines(self, sizehint=0):
      !         # Negative numbers result in reading all the lines
      !         if sizehint <= 0: sizehint = sys.maxint
      !         L = []
      !         while sizehint > 0:
      !             line = self.readline()
      !             if line == "": break
      !             L.append( line )
      !             sizehint = sizehint - len(line)
        
      !         return L
        
            def writelines(self, L):
      
      
      
      From python-dev@python.org  Sat Jul 29 21:18:37 2000
      From: python-dev@python.org (A.M. Kuchling)
      Date: Sat, 29 Jul 2000 13:18:37 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_gzip.py,1.2,1.3
      Message-ID: <200007292018.NAA28600@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Lib/test
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv28586
      
      Modified Files:
      	test_gzip.py 
      Log Message:
      Exercise .readline() and .readlines().  More data is written to the
      test file, too, so the methods have more work to do.
      
      
      Index: test_gzip.py
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Lib/test/test_gzip.py,v
      retrieving revision 1.2
      retrieving revision 1.3
      diff -C2 -r1.2 -r1.3
      *** test_gzip.py	1999/04/07 19:00:58	1.2
      --- test_gzip.py	2000/07/29 20:18:34	1.3
      ***************
      *** 17,30 ****
        """
        
      ! f = gzip.GzipFile(filename, 'wb') ; f.write(data1) ; f.close()
        
        f = gzip.GzipFile(filename, 'rb') ; d = f.read() ; f.close()
      ! assert d == data1
        
        # Append to the previous file
      ! f = gzip.GzipFile(filename, 'ab') ; f.write(data2) ; f.close()
        
        f = gzip.GzipFile(filename, 'rb') ; d = f.read() ; f.close()
      ! assert d == data1+data2
        
        os.unlink( filename )
      --- 17,54 ----
        """
        
      ! f = gzip.GzipFile(filename, 'wb') ; f.write(data1 * 50) ; f.close()
        
        f = gzip.GzipFile(filename, 'rb') ; d = f.read() ; f.close()
      ! assert d == data1*50
        
        # Append to the previous file
      ! f = gzip.GzipFile(filename, 'ab') ; f.write(data2 * 15) ; f.close()
        
        f = gzip.GzipFile(filename, 'rb') ; d = f.read() ; f.close()
      ! assert d == (data1*50) + (data2*15)
      ! 
      ! # Try .readline() with varying line lengths
      ! 
      ! f = gzip.GzipFile(filename, 'rb')
      ! line_length = 0
      ! while 1:
      !     L = f.readline( line_length )
      !     if L == "" and line_length != 0: break
      !     assert len(L) <= line_length
      !     line_length = (line_length + 1) % 50
      ! f.close()
      ! 
      ! # Try .readlines() 
      ! 
      ! f = gzip.GzipFile(filename, 'rb')
      ! L = f.readlines()
      ! f.close()
      ! 
      ! f = gzip.GzipFile(filename, 'rb')
      ! while 1:
      !     L = f.readlines(150)
      !     if L == []: break    
      ! f.close()
      ! 
        
        os.unlink( filename )
      
      
      
      From python-dev@python.org  Sun Jul 30 01:04:21 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 17:04:21 -0700
      Subject: [Python-checkins] CVS: distutils/distutils filelist.py,NONE,1.1
      Message-ID: <200007300004.RAA14089@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv14077
      
      Added Files:
      	filelist.py 
      Log Message:
      Provides the FileList class for building a list of filenames by exploring
      the filesystem, and filtering the list by applying various patterns.
      
      Initial revision (almost) as supplied in a patch by Rene Liebscher; I
      just renamed the class from Template to FileList, and the module
      accordingly.
      
      ***** Error reading new file(2, 'No such file or directory')
      
      
      From python-dev@python.org  Sun Jul 30 01:08:16 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 17:08:16 -0700
      Subject: [Python-checkins] CVS: distutils/distutils filelist.py,1.1,1.2
      Message-ID: <200007300008.RAA14383@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv14375
      
      Modified Files:
      	filelist.py 
      Log Message:
      Added class docstring and ditched inappropriate class attrs.
      Indentation/whitspace fixes.
      
      Index: filelist.py
      ===================================================================
      RCS file: /cvsroot/python/distutils/distutils/filelist.py,v
      retrieving revision 1.1
      retrieving revision 1.2
      diff -C2 -r1.1 -r1.2
      *** filelist.py	2000/07/30 00:04:17	1.1
      --- filelist.py	2000/07/30 00:08:13	1.2
      ***************
      *** 20,33 ****
        class FileList:
        
      !     files = None # reference to files list to mainpulate
      !     allfiles = None # list of all files, if None will be filled
      !                     # at first use from directory self.dir
      !     dir = None # directory from which files will be taken
      !                # to fill self.allfiles if it was not set otherwise
      ! 
      !     # next both functions (callable objects) can be set by the user
      !     # warn: warning function
      !     # debug_print: debug function  
        
            def __init__(self, 
                         files=[], 
      --- 20,37 ----
        class FileList:
        
      !     """A list of files built by on exploring the filesystem and filtered by
      !     applying various patterns to what we find there.
        
      +     Instance attributes:
      +       dir
      +         directory from which files will be taken -- only used if
      +         'allfiles' not supplied to constructor
      +       files
      +         list of filenames currently being built/filtered/manipulated
      +       allfiles
      +         complete list of files under consideration (ie. without any
      +         filtering applied)
      +     """
      + 
            def __init__(self, 
                         files=[], 
      ***************
      *** 43,53 ****
                self.files = files
                self.dir = dir
                self.allfiles = allfiles 
      -              # if None, it will be filled, when used for first time
        
        
            # standard warning and debug functions, if no other given
            def __warn (self, msg):
      !         sys.stderr.write ("warning: template: %s\n" % msg)
                
            def __debug_print (self, msg):
      --- 47,58 ----
                self.files = files
                self.dir = dir
      + 
      +         # if None, 'allfiles' will be filled when used for first time
                self.allfiles = allfiles 
        
        
            # standard warning and debug functions, if no other given
            def __warn (self, msg):
      !         sys.stderr.write ("warning: %s\n" % msg)
                
            def __debug_print (self, msg):
      ***************
      *** 60,185 ****
        
            
      !     def process_line(self, line):    
        
      !             words = string.split (line)
      !             action = words[0]
        
      !             # First, check that the right number of words are present
      !             # for the given action (which is the first word)
      !             if action in ('include','exclude',
      !                           'global-include','global-exclude'):
      !                 if len (words) < 2:
      !                     self.warn \
      !                         ("invalid template line: " +
      !                          "'%s' expects   ..." %
      !                          action)
      !                     return
        
      !                 pattern_list = map(convert_path, words[1:])
        
      !             elif action in ('recursive-include','recursive-exclude'):
      !                 if len (words) < 3:
      !                     self.warn \
      !                         ("invalid template line: " +
      !                          "'%s' expects    ..." %
      !                          action)
      !                     return
        
      !                 dir = convert_path(words[1])
      !                 pattern_list = map (convert_path, words[2:])
        
      !             elif action in ('graft','prune'):
      !                 if len (words) != 2:
      !                     self.warn \
      !                         ("invalid template line: " +
      !                          "'%s' expects a single " %
      !                          action)
      !                     return
      ! 
      !                 dir_pattern = convert_path (words[1])
      ! 
      !             else:
      !                 self.warn ("invalid template line: " +
      !                                "unknown action '%s'" % action)
                        return
        
      !             # OK, now we know that the action is valid and we have the
      !             # right number of words on the line for that action -- so we
      !             # can proceed with minimal error-checking.  Also, we have
      !             # defined either (pattern), (dir and pattern), or
      !             # (dir_pattern) -- so we don't have to spend any time
      !             # digging stuff up out of 'words'.
      ! 
      !             if action == 'include':
      !                 self.debug_print("include " + string.join(pattern_list))
      !                 for pattern in pattern_list:
      !                     if not self.select_pattern (pattern, anchor=1):
      !                         self.warn ("no files found matching '%s'" %
      !                                        pattern)
      ! 
      !             elif action == 'exclude':
      !                 self.debug_print("exclude " + string.join(pattern_list))
      !                 for pattern in pattern_list:
      !                     if not self.exclude_pattern (pattern, anchor=1):
      !                         self.warn (
      !                             "no previously-included files found matching '%s'"%
      !                             pattern)
      ! 
      !             elif action == 'global-include':
      !                 self.debug_print("global-include " + string.join(pattern_list))
      !                 for pattern in pattern_list:
      !                     if not self.select_pattern (pattern, anchor=0):
      !                         self.warn (("no files found matching '%s' " +
      !                                         "anywhere in distribution") %
      !                                        pattern)
      ! 
      !             elif action == 'global-exclude':
      !                 self.debug_print("global-exclude " + string.join(pattern_list))
      !                 for pattern in pattern_list:
      !                     if not self.exclude_pattern (pattern, anchor=0):
      !                         self.warn \
      !                             (("no previously-included files matching '%s' " +
      !                               "found anywhere in distribution") %
      !                              pattern)
      ! 
      !             elif action == 'recursive-include':
      !                 self.debug_print("recursive-include %s %s" %
      !                                  (dir, string.join(pattern_list)))
      !                 for pattern in pattern_list:
      !                     if not self.select_pattern (pattern, prefix=dir):
      !                         self.warn (("no files found matching '%s' " +
      !                                         "under directory '%s'") %
      !                                        (pattern, dir))
      ! 
      !             elif action == 'recursive-exclude':
      !                 self.debug_print("recursive-exclude %s %s" %
      !                                  (dir, string.join(pattern_list)))
      !                 for pattern in pattern_list:
      !                     if not self.exclude_pattern(pattern, prefix=dir):
      !                         self.warn \
      !                             (("no previously-included files matching '%s' " +
      !                               "found under directory '%s'") %
      !                              (pattern, dir))
      ! 
      !             elif action == 'graft':
      !                 self.debug_print("graft " + dir_pattern)
      !                 if not self.select_pattern(None, prefix=dir_pattern):
      !                     self.warn ("no directories found matching '%s'" %
      !                                    dir_pattern)
      ! 
      !             elif action == 'prune':
      !                 self.debug_print("prune " + dir_pattern)
      !                 if not self.exclude_pattern(None, prefix=dir_pattern):
                            self.warn \
      !                         (("no previously-included directories found " +
      !                           "matching '%s'") %
      !                          dir_pattern)
      !             else:
      !                 raise RuntimeError, \
      !                       "this cannot happen: invalid action '%s'" % action
        
            # process_line ()
      - 
      - 
        
        
      --- 65,188 ----
        
            
      !     def process_line (self, line):    
        
      !         words = string.split (line)
      !         action = words[0]
        
      !         # First, check that the right number of words are present
      !         # for the given action (which is the first word)
      !         if action in ('include','exclude',
      !                       'global-include','global-exclude'):
      !             if len (words) < 2:
      !                 self.warn \
      !                     ("invalid template line: " +
      !                      "'%s' expects   ..." %
      !                      action)
      !                 return
        
      !             pattern_list = map(convert_path, words[1:])
        
      !         elif action in ('recursive-include','recursive-exclude'):
      !             if len (words) < 3:
      !                 self.warn \
      !                     ("invalid template line: " +
      !                      "'%s' expects    ..." %
      !                      action)
      !                 return
        
      !             dir = convert_path(words[1])
      !             pattern_list = map (convert_path, words[2:])
        
      !         elif action in ('graft','prune'):
      !             if len (words) != 2:
      !                 self.warn \
      !                     ("invalid template line: " +
      !                      "'%s' expects a single " %
      !                      action)
                        return
      + 
      +             dir_pattern = convert_path (words[1])
        
      !         else:
      !             self.warn ("invalid template line: " +
      !                            "unknown action '%s'" % action)
      !             return
      ! 
      !         # OK, now we know that the action is valid and we have the
      !         # right number of words on the line for that action -- so we
      !         # can proceed with minimal error-checking.  Also, we have
      !         # defined either (pattern), (dir and pattern), or
      !         # (dir_pattern) -- so we don't have to spend any time
      !         # digging stuff up out of 'words'.
      ! 
      !         if action == 'include':
      !             self.debug_print("include " + string.join(pattern_list))
      !             for pattern in pattern_list:
      !                 if not self.select_pattern (pattern, anchor=1):
      !                     self.warn ("no files found matching '%s'" %
      !                                    pattern)
      ! 
      !         elif action == 'exclude':
      !             self.debug_print("exclude " + string.join(pattern_list))
      !             for pattern in pattern_list:
      !                 if not self.exclude_pattern (pattern, anchor=1):
      !                     self.warn (
      !                         "no previously-included files found matching '%s'"%
      !                         pattern)
      ! 
      !         elif action == 'global-include':
      !             self.debug_print("global-include " + string.join(pattern_list))
      !             for pattern in pattern_list:
      !                 if not self.select_pattern (pattern, anchor=0):
      !                     self.warn (("no files found matching '%s' " +
      !                                     "anywhere in distribution") %
      !                                    pattern)
      ! 
      !         elif action == 'global-exclude':
      !             self.debug_print("global-exclude " + string.join(pattern_list))
      !             for pattern in pattern_list:
      !                 if not self.exclude_pattern (pattern, anchor=0):
      !                     self.warn \
      !                         (("no previously-included files matching '%s' " +
      !                           "found anywhere in distribution") %
      !                          pattern)
      ! 
      !         elif action == 'recursive-include':
      !             self.debug_print("recursive-include %s %s" %
      !                              (dir, string.join(pattern_list)))
      !             for pattern in pattern_list:
      !                 if not self.select_pattern (pattern, prefix=dir):
      !                     self.warn (("no files found matching '%s' " +
      !                                     "under directory '%s'") %
      !                                    (pattern, dir))
      ! 
      !         elif action == 'recursive-exclude':
      !             self.debug_print("recursive-exclude %s %s" %
      !                              (dir, string.join(pattern_list)))
      !             for pattern in pattern_list:
      !                 if not self.exclude_pattern(pattern, prefix=dir):
                            self.warn \
      !                         (("no previously-included files matching '%s' " +
      !                           "found under directory '%s'") %
      !                          (pattern, dir))
      ! 
      !         elif action == 'graft':
      !             self.debug_print("graft " + dir_pattern)
      !             if not self.select_pattern(None, prefix=dir_pattern):
      !                 self.warn ("no directories found matching '%s'" %
      !                                dir_pattern)
      ! 
      !         elif action == 'prune':
      !             self.debug_print("prune " + dir_pattern)
      !             if not self.exclude_pattern(None, prefix=dir_pattern):
      !                 self.warn \
      !                     (("no previously-included directories found " +
      !                       "matching '%s'") %
      !                      dir_pattern)
      !         else:
      !             raise RuntimeError, \
      !                   "this cannot happen: invalid action '%s'" % action
        
            # process_line ()
        
        
      
      
      
      From python-dev@python.org  Sun Jul 30 01:21:39 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 17:21:39 -0700
      Subject: [Python-checkins] CVS: distutils/distutils filelist.py,1.2,1.3
      Message-ID: <200007300021.RAA15051@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv15041
      
      Modified Files:
      	filelist.py 
      Log Message:
      Renamed 'process_line()' to 'process_template_line()', and factored out
      '_parse_template_line()'.
      
      Index: filelist.py
      ===================================================================
      RCS file: /cvsroot/python/distutils/distutils/filelist.py,v
      retrieving revision 1.2
      retrieving revision 1.3
      diff -C2 -r1.2 -r1.3
      *** filelist.py	2000/07/30 00:08:13	1.2
      --- filelist.py	2000/07/30 00:21:36	1.3
      ***************
      *** 17,20 ****
      --- 17,21 ----
        from glob import glob
        from distutils.util import convert_path
      + from distutils.errors import DistutilsTemplateError, DistutilsInternalError
        
        class FileList:
      ***************
      *** 65,188 ****
        
            
      !     def process_line (self, line):    
      ! 
                words = string.split (line)
                action = words[0]
        
      !         # First, check that the right number of words are present
      !         # for the given action (which is the first word)
      !         if action in ('include','exclude',
      !                       'global-include','global-exclude'):
                    if len (words) < 2:
      !                 self.warn \
      !                     ("invalid template line: " +
      !                      "'%s' expects   ..." %
      !                      action)
      !                 return
        
      !             pattern_list = map(convert_path, words[1:])
        
      !         elif action in ('recursive-include','recursive-exclude'):
                    if len (words) < 3:
      !                 self.warn \
      !                     ("invalid template line: " +
      !                      "'%s' expects    ..." %
      !                      action)
      !                 return
        
                    dir = convert_path(words[1])
      !             pattern_list = map (convert_path, words[2:])
        
      !         elif action in ('graft','prune'):
                    if len (words) != 2:
      !                 self.warn \
      !                     ("invalid template line: " +
      !                      "'%s' expects a single " %
      !                      action)
      !                 return
        
      !             dir_pattern = convert_path (words[1])
        
                else:
      !             self.warn ("invalid template line: " +
      !                            "unknown action '%s'" % action)
      !             return
        
                # OK, now we know that the action is valid and we have the
                # right number of words on the line for that action -- so we
      !         # can proceed with minimal error-checking.  Also, we have
      !         # defined either (pattern), (dir and pattern), or
      !         # (dir_pattern) -- so we don't have to spend any time
      !         # digging stuff up out of 'words'.
      ! 
                if action == 'include':
      !             self.debug_print("include " + string.join(pattern_list))
      !             for pattern in pattern_list:
                        if not self.select_pattern (pattern, anchor=1):
      !                     self.warn ("no files found matching '%s'" %
      !                                    pattern)
        
                elif action == 'exclude':
      !             self.debug_print("exclude " + string.join(pattern_list))
      !             for pattern in pattern_list:
                        if not self.exclude_pattern (pattern, anchor=1):
      !                     self.warn (
                                "no previously-included files found matching '%s'"%
                                pattern)
        
                elif action == 'global-include':
      !             self.debug_print("global-include " + string.join(pattern_list))
      !             for pattern in pattern_list:
                        if not self.select_pattern (pattern, anchor=0):
                            self.warn (("no files found matching '%s' " +
      !                                     "anywhere in distribution") %
      !                                    pattern)
        
                elif action == 'global-exclude':
      !             self.debug_print("global-exclude " + string.join(pattern_list))
      !             for pattern in pattern_list:
                        if not self.exclude_pattern (pattern, anchor=0):
      !                     self.warn \
      !                         (("no previously-included files matching '%s' " +
      !                           "found anywhere in distribution") %
      !                          pattern)
        
                elif action == 'recursive-include':
                    self.debug_print("recursive-include %s %s" %
      !                              (dir, string.join(pattern_list)))
      !             for pattern in pattern_list:
                        if not self.select_pattern (pattern, prefix=dir):
                            self.warn (("no files found matching '%s' " +
      !                                     "under directory '%s'") %
      !                                    (pattern, dir))
        
                elif action == 'recursive-exclude':
                    self.debug_print("recursive-exclude %s %s" %
      !                              (dir, string.join(pattern_list)))
      !             for pattern in pattern_list:
                        if not self.exclude_pattern(pattern, prefix=dir):
      !                     self.warn \
      !                         (("no previously-included files matching '%s' " +
      !                           "found under directory '%s'") %
      !                          (pattern, dir))
        
                elif action == 'graft':
                    self.debug_print("graft " + dir_pattern)
                    if not self.select_pattern(None, prefix=dir_pattern):
      !                 self.warn ("no directories found matching '%s'" %
      !                                dir_pattern)
        
                elif action == 'prune':
                    self.debug_print("prune " + dir_pattern)
                    if not self.exclude_pattern(None, prefix=dir_pattern):
      !                 self.warn \
      !                     (("no previously-included directories found " +
      !                       "matching '%s'") %
      !                      dir_pattern)
                else:
      !             raise RuntimeError, \
                          "this cannot happen: invalid action '%s'" % action
        
      !     # process_line ()
        
        
      --- 66,182 ----
        
            
      !     def _parse_template_line (self, line):
                words = string.split (line)
                action = words[0]
      + 
      +         patterns = dir = dir_pattern = None
        
      !         if action in ('include', 'exclude',
      !                       'global-include', 'global-exclude'):
                    if len (words) < 2:
      !                 raise DistutilsTemplateError, \
      !                       "'%s' expects   ..." % action
        
      !             patterns = map(convert_path, words[1:])
        
      !         elif action in ('recursive-include', 'recursive-exclude'):
                    if len (words) < 3:
      !                 raise DistutilsTemplateError, \
      !                       "'%s' expects    ..." % action
        
                    dir = convert_path(words[1])
      !             patterns = map(convert_path, words[2:])
        
      !         elif action in ('graft', 'prune'):
                    if len (words) != 2:
      !                 raise DistutilsTemplateError, \
      !                      "'%s' expects a single " % action
        
      !             dir_pattern = convert_path(words[1])
        
                else:
      !             raise DistutilsTemplateError, "unknown action '%s'" % action
      ! 
      !         return (action, pattern, dir, dir_pattern)
      ! 
      !     # _parse_template_line ()
      !     
      ! 
      !     def process_template_line (self, line):    
        
      +         # Parse the line: split it up, make sure the right number of words
      +         # are there, and return the relevant words.  'action' is always
      +         # defined: it's the first word of the line.  Which of the other
      +         # three are defined depends on the action; it'll be either
      +         # patterns, (dir and patterns), or (dir_pattern).
      +         (action, patterns, dir, dir_pattern) = self._parse_template_line(line)
      + 
                # OK, now we know that the action is valid and we have the
                # right number of words on the line for that action -- so we
      !         # can proceed with minimal error-checking.
                if action == 'include':
      !             self.debug_print("include " + string.join(patterns))
      !             for pattern in patterns:
                        if not self.select_pattern (pattern, anchor=1):
      !                     self.warn("no files found matching '%s'" % pattern)
        
                elif action == 'exclude':
      !             self.debug_print("exclude " + string.join(patterns))
      !             for pattern in patterns:
                        if not self.exclude_pattern (pattern, anchor=1):
      !                     self.warn(
                                "no previously-included files found matching '%s'"%
                                pattern)
        
                elif action == 'global-include':
      !             self.debug_print("global-include " + string.join(patterns))
      !             for pattern in patterns:
                        if not self.select_pattern (pattern, anchor=0):
                            self.warn (("no files found matching '%s' " +
      !                                 "anywhere in distribution") %
      !                                pattern)
        
                elif action == 'global-exclude':
      !             self.debug_print("global-exclude " + string.join(patterns))
      !             for pattern in patterns:
                        if not self.exclude_pattern (pattern, anchor=0):
      !                     self.warn(("no previously-included files matching '%s' " +
      !                                "found anywhere in distribution") %
      !                               pattern)
        
                elif action == 'recursive-include':
                    self.debug_print("recursive-include %s %s" %
      !                              (dir, string.join(patterns)))
      !             for pattern in patterns:
                        if not self.select_pattern (pattern, prefix=dir):
                            self.warn (("no files found matching '%s' " +
      !                                 "under directory '%s'") %
      !                                (pattern, dir))
        
                elif action == 'recursive-exclude':
                    self.debug_print("recursive-exclude %s %s" %
      !                              (dir, string.join(patterns)))
      !             for pattern in patterns:
                        if not self.exclude_pattern(pattern, prefix=dir):
      !                     self.warn(("no previously-included files matching '%s' " +
      !                                "found under directory '%s'") %
      !                               (pattern, dir))
        
                elif action == 'graft':
                    self.debug_print("graft " + dir_pattern)
                    if not self.select_pattern(None, prefix=dir_pattern):
      !                 self.warn ("no directories found matching '%s'" % dir_pattern)
        
                elif action == 'prune':
                    self.debug_print("prune " + dir_pattern)
                    if not self.exclude_pattern(None, prefix=dir_pattern):
      !                 self.warn(("no previously-included directories found " +
      !                            "matching '%s'") %
      !                           dir_pattern)
                else:
      !             raise DistutilsInternalError, \
                          "this cannot happen: invalid action '%s'" % action
        
      !     # process_template_line ()
        
        
      
      
      
      From python-dev@python.org  Sun Jul 30 01:36:27 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 17:36:27 -0700
      Subject: [Python-checkins] CVS: distutils/distutils filelist.py,1.3,1.4
      Message-ID: <200007300036.RAA15856@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv15846
      
      Modified Files:
      	filelist.py 
      Log Message:
      Renamed 'select_pattern()' to 'include_pattern()'.
      Other cosmetic/doc/comment tweaks.
      
      Index: filelist.py
      ===================================================================
      RCS file: /cvsroot/python/distutils/distutils/filelist.py,v
      retrieving revision 1.3
      retrieving revision 1.4
      diff -C2 -r1.3 -r1.4
      *** filelist.py	2000/07/30 00:21:36	1.3
      --- filelist.py	2000/07/30 00:36:25	1.4
      ***************
      *** 106,110 ****
        
                # Parse the line: split it up, make sure the right number of words
      !         # are there, and return the relevant words.  'action' is always
                # defined: it's the first word of the line.  Which of the other
                # three are defined depends on the action; it'll be either
      --- 106,110 ----
        
                # Parse the line: split it up, make sure the right number of words
      !         # is there, and return the relevant words.  'action' is always
                # defined: it's the first word of the line.  Which of the other
                # three are defined depends on the action; it'll be either
      ***************
      *** 118,122 ****
                    self.debug_print("include " + string.join(patterns))
                    for pattern in patterns:
      !                 if not self.select_pattern (pattern, anchor=1):
                            self.warn("no files found matching '%s'" % pattern)
        
      --- 118,122 ----
                    self.debug_print("include " + string.join(patterns))
                    for pattern in patterns:
      !                 if not self.include_pattern (pattern, anchor=1):
                            self.warn("no files found matching '%s'" % pattern)
        
      ***************
      *** 132,136 ****
                    self.debug_print("global-include " + string.join(patterns))
                    for pattern in patterns:
      !                 if not self.select_pattern (pattern, anchor=0):
                            self.warn (("no files found matching '%s' " +
                                        "anywhere in distribution") %
      --- 132,136 ----
                    self.debug_print("global-include " + string.join(patterns))
                    for pattern in patterns:
      !                 if not self.include_pattern (pattern, anchor=0):
                            self.warn (("no files found matching '%s' " +
                                        "anywhere in distribution") %
      ***************
      *** 149,153 ****
                                     (dir, string.join(patterns)))
                    for pattern in patterns:
      !                 if not self.select_pattern (pattern, prefix=dir):
                            self.warn (("no files found matching '%s' " +
                                        "under directory '%s'") %
      --- 149,153 ----
                                     (dir, string.join(patterns)))
                    for pattern in patterns:
      !                 if not self.include_pattern (pattern, prefix=dir):
                            self.warn (("no files found matching '%s' " +
                                        "under directory '%s'") %
      ***************
      *** 165,169 ****
                elif action == 'graft':
                    self.debug_print("graft " + dir_pattern)
      !             if not self.select_pattern(None, prefix=dir_pattern):
                        self.warn ("no directories found matching '%s'" % dir_pattern)
        
      --- 165,169 ----
                elif action == 'graft':
                    self.debug_print("graft " + dir_pattern)
      !             if not self.include_pattern(None, prefix=dir_pattern):
                        self.warn ("no directories found matching '%s'" % dir_pattern)
        
      ***************
      *** 181,193 ****
        
        
      !     def select_pattern (self, pattern,
                                anchor=1, prefix=None, is_regex=0):
      -         """Select strings (presumably filenames) from 'files' that match
      -         'pattern', a Unix-style wildcard (glob) pattern.  Patterns are not
      -         quite the same as implemented by the 'fnmatch' module: '*' and '?'
      -         match non-special characters, where "special" is platform-dependent:
      -         slash on Unix, colon, slash, and backslash on DOS/Windows, and colon on
      -         Mac OS.
        
                If 'anchor' is true (the default), then the pattern match is more
                stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
      --- 181,194 ----
        
        
      !     def include_pattern (self, pattern,
                                anchor=1, prefix=None, is_regex=0):
        
      +         """Select strings (presumably filenames) from 'self.files' that
      +         match 'pattern', a Unix-style wildcard (glob) pattern.  Patterns
      +         are not quite the same as implemented by the 'fnmatch' module: '*'
      +         and '?'  match non-special characters, where "special" is platform-
      +         dependent: slash on Unix; colon, slash, and backslash on
      +         DOS/Windows; and colon on Mac OS.
      + 
                If 'anchor' is true (the default), then the pattern match is more
                stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
      ***************
      *** 209,213 ****
                files_found = 0
                pattern_re = translate_pattern (pattern, anchor, prefix, is_regex)
      !         self.debug_print("select_pattern: applying regex r'%s'" %
                                 pattern_re.pattern)
        
      --- 210,214 ----
                files_found = 0
                pattern_re = translate_pattern (pattern, anchor, prefix, is_regex)
      !         self.debug_print("include_pattern: applying regex r'%s'" %
                                 pattern_re.pattern)
        
      ***************
      *** 223,227 ****
                return files_found
        
      !     # select_pattern ()
        
        
      --- 224,228 ----
                return files_found
        
      !     # include_pattern ()
        
        
      ***************
      *** 230,234 ****
                """Remove strings (presumably filenames) from 'files' that match
                'pattern'.  Other parameters are the same as for
      !         'select_pattern()', above.  
                The list 'self.files' is modified in place.
                Return 1 if files are found.
      --- 231,235 ----
                """Remove strings (presumably filenames) from 'files' that match
                'pattern'.  Other parameters are the same as for
      !         'include_pattern()', above.  
                The list 'self.files' is modified in place.
                Return 1 if files are found.
      
      
      
      From python-dev@python.org  Sun Jul 30 01:37:06 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 17:37:06 -0700
      Subject: [Python-checkins] CVS: distutils/distutils filelist.py,1.4,1.5
      Message-ID: <200007300037.RAA15906@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv15884
      
      Modified Files:
      	filelist.py 
      Log Message:
      Ditched the unused 'recursive_exclude_pattern()' method.
      
      Index: filelist.py
      ===================================================================
      RCS file: /cvsroot/python/distutils/distutils/filelist.py,v
      retrieving revision 1.4
      retrieving revision 1.5
      diff -C2 -r1.4 -r1.5
      *** filelist.py	2000/07/30 00:36:25	1.4
      --- filelist.py	2000/07/30 00:37:04	1.5
      ***************
      *** 249,276 ****
            # exclude_pattern ()
        
      - 
      -     def recursive_exclude_pattern (self, dir, pattern=None):
      -         """Remove filenames from 'self.files' that are under 'dir' and
      -         whose basenames match 'pattern'.
      -         Return 1 if files are found.
      -         """
      -         files_found = 0
      -         self.debug_print("recursive_exclude_pattern: dir=%s, pattern=%s" %
      -                          (dir, pattern))
      -         if pattern is None:
      -             pattern_re = None
      -         else:
      -             pattern_re = translate_pattern (pattern)
      - 
      -         for i in range (len (self.files)-1, -1, -1):
      -             (cur_dir, cur_base) = os.path.split (self.files[i])
      -             if (cur_dir == dir and
      -                 (pattern_re is None or pattern_re.match (cur_base))):
      -                 self.debug_print("removing %s" % self.files[i])
      -                 del self.files[i]
      -                 files_found = 1
      -     
      -         return files_found
      - 
        # class FileList
        
      --- 249,252 ----
      
      
      
      From python-dev@python.org  Sun Jul 30 02:03:34 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 18:03:34 -0700
      Subject: [Python-checkins] CVS: distutils/distutils errors.py,1.9,1.10
      Message-ID: <200007300103.SAA25177@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv25165
      
      Modified Files:
      	errors.py 
      Log Message:
      Added DistutilsTemplateError.
      
      Index: errors.py
      ===================================================================
      RCS file: /cvsroot/python/distutils/distutils/errors.py,v
      retrieving revision 1.9
      retrieving revision 1.10
      diff -C2 -r1.9 -r1.10
      *** errors.py	2000/06/25 02:12:14	1.9
      --- errors.py	2000/07/30 01:03:31	1.10
      ***************
      *** 74,77 ****
      --- 74,80 ----
            pass
        
      + class DistutilsTemplateError (DistutilsError):
      +     """Syntax error in a file list template."""
      + 
        
        # Exception classes used by the CCompiler implementation classes
      
      
      
      From python-dev@python.org  Sun Jul 30 02:04:26 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 18:04:26 -0700
      Subject: [Python-checkins] CVS: distutils/distutils filelist.py,1.5,1.6
      Message-ID: <200007300104.SAA25268@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv25221
      
      Modified Files:
      	filelist.py 
      Log Message:
      Typo fix.
      
      Index: filelist.py
      ===================================================================
      RCS file: /cvsroot/python/distutils/distutils/filelist.py,v
      retrieving revision 1.5
      retrieving revision 1.6
      diff -C2 -r1.5 -r1.6
      *** filelist.py	2000/07/30 00:37:04	1.5
      --- filelist.py	2000/07/30 01:04:22	1.6
      ***************
      *** 98,102 ****
                    raise DistutilsTemplateError, "unknown action '%s'" % action
        
      !         return (action, pattern, dir, dir_pattern)
        
            # _parse_template_line ()
      --- 98,102 ----
                    raise DistutilsTemplateError, "unknown action '%s'" % action
        
      !         return (action, patterns, dir, dir_pattern)
        
            # _parse_template_line ()
      
      
      
      From python-dev@python.org  Sun Jul 30 02:05:04 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 18:05:04 -0700
      Subject: [Python-checkins] CVS: distutils/distutils/command sdist.py,1.38,1.39
      Message-ID: <200007300105.SAA25316@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils/command
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv25287
      
      Modified Files:
      	sdist.py 
      Log Message:
      The other half of Rene Liebscher's patch to add the Template class,
      which I renamed to FileList: remove all the file-list-generation code from
      the sdist command and adapt it to use the new FileList class instead.
      
      Index: sdist.py
      ===================================================================
      RCS file: /cvsroot/python/distutils/distutils/command/sdist.py,v
      retrieving revision 1.38
      retrieving revision 1.39
      diff -C2 -r1.38 -r1.39
      *** sdist.py	2000/07/27 01:58:45	1.38
      --- sdist.py	2000/07/30 01:05:02	1.39
      ***************
      *** 7,20 ****
        __revision__ = "$Id$"
        
      ! import sys, os, string, re
      ! import fnmatch
        from types import *
        from glob import glob
        from distutils.core import Command
        from distutils.util import \
      !      convert_path, create_tree, remove_tree, newer, write_file, \
             check_archive_formats
        from distutils.text_file import TextFile
        from distutils.errors import DistutilsExecError, DistutilsOptionError
        
        
      --- 7,20 ----
        __revision__ = "$Id$"
        
      ! import sys, os, string
        from types import *
        from glob import glob
        from distutils.core import Command
        from distutils.util import \
      !      create_tree, remove_tree, newer, write_file, \
             check_archive_formats
        from distutils.text_file import TextFile
        from distutils.errors import DistutilsExecError, DistutilsOptionError
      + from distutils.filelist import FileList
        
        
      ***************
      *** 320,342 ****
            
        
      -     def recursive_exclude_pattern (self, dir, pattern=None):
      -         """Remove filenames from 'self.files' that are under 'dir' and
      -         whose basenames match 'pattern'.
      -         """
      -         self.debug_print("recursive_exclude_pattern: dir=%s, pattern=%s" %
      -                          (dir, pattern))
      -         if pattern is None:
      -             pattern_re = None
      -         else:
      -             pattern_re = translate_pattern (pattern)
      - 
      -         for i in range (len (self.files)-1, -1, -1):
      -             (cur_dir, cur_base) = os.path.split (self.files[i])
      -             if (cur_dir == dir and
      -                 (pattern_re is None or pattern_re.match (cur_base))):
      -                 self.debug_print("removing %s" % self.files[i])
      -                 del self.files[i]
      - 
      - 
            def read_template (self):
                """Read and parse the manifest template file named by
      --- 320,323 ----
      ***************
      *** 357,507 ****
                                     collapse_ws=1)
        
      !         all_files = findall ()
        
                while 1:
      - 
                    line = template.readline()
                    if line is None:            # end of file
                        break
      - 
      -             words = string.split (line)
      -             action = words[0]
        
      !             # First, check that the right number of words are present
      !             # for the given action (which is the first word)
      !             if action in ('include','exclude',
      !                           'global-include','global-exclude'):
      !                 if len (words) < 2:
      !                     template.warn \
      !                         ("invalid manifest template line: " +
      !                          "'%s' expects   ..." %
      !                          action)
      !                     continue
      ! 
      !                 pattern_list = map(convert_path, words[1:])
      ! 
      !             elif action in ('recursive-include','recursive-exclude'):
      !                 if len (words) < 3:
      !                     template.warn \
      !                         ("invalid manifest template line: " +
      !                          "'%s' expects    ..." %
      !                          action)
      !                     continue
      ! 
      !                 dir = convert_path(words[1])
      !                 pattern_list = map (convert_path, words[2:])
      ! 
      !             elif action in ('graft','prune'):
      !                 if len (words) != 2:
      !                     template.warn \
      !                         ("invalid manifest template line: " +
      !                          "'%s' expects a single " %
      !                          action)
      !                     continue
        
      -                 dir_pattern = convert_path (words[1])
      - 
      -             else:
      -                 template.warn ("invalid manifest template line: " +
      -                                "unknown action '%s'" % action)
      -                 continue
      - 
      -             # OK, now we know that the action is valid and we have the
      -             # right number of words on the line for that action -- so we
      -             # can proceed with minimal error-checking.  Also, we have
      -             # defined either (pattern), (dir and pattern), or
      -             # (dir_pattern) -- so we don't have to spend any time
      -             # digging stuff up out of 'words'.
      - 
      -             if action == 'include':
      -                 self.debug_print("include " + string.join(pattern_list))
      -                 for pattern in pattern_list:
      -                     files = self.select_pattern (all_files, pattern, anchor=1)
      -                     if not files:
      -                         template.warn ("no files found matching '%s'" %
      -                                        pattern)
      -                     else:
      -                         self.files.extend (files)
      - 
      -             elif action == 'exclude':
      -                 self.debug_print("exclude " + string.join(pattern_list))
      -                 for pattern in pattern_list:
      -                     num = self.exclude_pattern (self.files, pattern, anchor=1)
      -                     if num == 0:
      -                         template.warn (
      -                             "no previously-included files found matching '%s'"%
      -                             pattern)
      - 
      -             elif action == 'global-include':
      -                 self.debug_print("global-include " + string.join(pattern_list))
      -                 for pattern in pattern_list:
      -                     files = self.select_pattern (all_files, pattern, anchor=0)
      -                     if not files:
      -                         template.warn (("no files found matching '%s' " +
      -                                         "anywhere in distribution") %
      -                                        pattern)
      -                     else:
      -                         self.files.extend (files)
      - 
      -             elif action == 'global-exclude':
      -                 self.debug_print("global-exclude " + string.join(pattern_list))
      -                 for pattern in pattern_list:
      -                     num = self.exclude_pattern (self.files, pattern, anchor=0)
      -                     if num == 0:
      -                         template.warn \
      -                             (("no previously-included files matching '%s' " +
      -                               "found anywhere in distribution") %
      -                              pattern)
      - 
      -             elif action == 'recursive-include':
      -                 self.debug_print("recursive-include %s %s" %
      -                                  (dir, string.join(pattern_list)))
      -                 for pattern in pattern_list:
      -                     files = self.select_pattern (
      -                         all_files, pattern, prefix=dir)
      -                     if not files:
      -                         template.warn (("no files found matching '%s' " +
      -                                         "under directory '%s'") %
      -                                        (pattern, dir))
      -                     else:
      -                         self.files.extend (files)
      - 
      -             elif action == 'recursive-exclude':
      -                 self.debug_print("recursive-exclude %s %s" %
      -                                  (dir, string.join(pattern_list)))
      -                 for pattern in pattern_list:
      -                     num = self.exclude_pattern(
      -                         self.files, pattern, prefix=dir)
      -                     if num == 0:
      -                         template.warn \
      -                             (("no previously-included files matching '%s' " +
      -                               "found under directory '%s'") %
      -                              (pattern, dir))
      - 
      -             elif action == 'graft':
      -                 self.debug_print("graft " + dir_pattern)
      -                 files = self.select_pattern(
      -                     all_files, None, prefix=dir_pattern)
      -                 if not files:
      -                     template.warn ("no directories found matching '%s'" %
      -                                    dir_pattern)
      -                 else:
      -                     self.files.extend (files)
      - 
      -             elif action == 'prune':
      -                 self.debug_print("prune " + dir_pattern)
      -                 num = self.exclude_pattern(
      -                     self.files, None, prefix=dir_pattern)
      -                 if num == 0:
      -                     template.warn \
      -                         (("no previously-included directories found " +
      -                           "matching '%s'") %
      -                          dir_pattern)
      -             else:
      -                 raise RuntimeError, \
      -                       "this cannot happen: invalid action '%s'" % action
      - 
      -         # while loop over lines of template file
      - 
            # read_template ()
        
      --- 338,353 ----
                                     collapse_ws=1)
        
      !         # if we give Template() a list, it modifies this list
      !         filelist = FileList(files=self.files,
      !                             warn=self.warn,
      !                             debug_print=self.debug_print)
        
                while 1:
                    line = template.readline()
                    if line is None:            # end of file
                        break
        
      !             filelist.process_template_line(line)
        
            # read_template ()
        
      ***************
      *** 517,581 ****
                build = self.get_finalized_command('build')
                base_dir = self.distribution.get_fullname()
      -         self.exclude_pattern (self.files, None, prefix=build.build_base)
      -         self.exclude_pattern (self.files, None, prefix=base_dir)
      -         self.exclude_pattern (self.files, r'/(RCS|CVS)/.*', is_regex=1)
      - 
      - 
      -     def select_pattern (self, files, pattern,
      -                         anchor=1, prefix=None, is_regex=0):
      -         """Select strings (presumably filenames) from 'files' that match
      -         'pattern', a Unix-style wildcard (glob) pattern.  Patterns are not
      -         quite the same as implemented by the 'fnmatch' module: '*' and '?'
      -         match non-special characters, where "special" is platform-dependent:
      -         slash on Unix, colon, slash, and backslash on DOS/Windows, and colon on
      -         Mac OS.
      - 
      -         If 'anchor' is true (the default), then the pattern match is more
      -         stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
      -         'anchor' is false, both of these will match.
      - 
      -         If 'prefix' is supplied, then only filenames starting with 'prefix'
      -         (itself a pattern) and ending with 'pattern', with anything in between
      -         them, will match.  'anchor' is ignored in this case.
      - 
      -         If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
      -         'pattern' is assumed to be either a string containing a regex or a
      -         regex object -- no translation is done, the regex is just compiled
      -         and used as-is.
      - 
      -         Return the list of matching strings, possibly empty.
      -         """
      -         matches = []
      -         pattern_re = translate_pattern (pattern, anchor, prefix, is_regex)
      -         self.debug_print("select_pattern: applying regex r'%s'" %
      -                          pattern_re.pattern)
      -         for name in files:
      -             if pattern_re.search (name):
      -                 matches.append (name)
      -                 self.debug_print(" adding " + name)
      - 
      -         return matches
      - 
      -     # select_pattern ()
      - 
      - 
      -     def exclude_pattern (self, files, pattern,
      -                          anchor=1, prefix=None, is_regex=0):
      -         """Remove strings (presumably filenames) from 'files' that match
      -         'pattern'.  Other parameters are the same as for
      -         'select_pattern()', above.  The list 'files' is modified in place.
      -         """
        
      !         pattern_re = translate_pattern (pattern, anchor, prefix, is_regex)
      !         self.debug_print("exclude_pattern: applying regex r'%s'" %
      !                          pattern_re.pattern)
      !         for i in range (len(files)-1, -1, -1):
      !             if pattern_re.search (files[i]):
      !                 self.debug_print(" removing " + files[i])
      !                 del files[i]
        
      -     # exclude_pattern ()
        
      - 
            def write_manifest (self):
                """Write the file list in 'self.files' (presumably as filled in by
      --- 363,376 ----
                build = self.get_finalized_command('build')
                base_dir = self.distribution.get_fullname()
        
      !         # if we give FileList a list, it modifies this list
      !         filelist = FileList(files=self.files,
      !                             warn=self.warn,
      !                             debug_print=self.debug_print)
      !         filelist.exclude_pattern(None, prefix=build.build_base)
      !         filelist.exclude_pattern(None, prefix=base_dir)
      !         filelist.exclude_pattern(r'/(RCS|CVS)/.*', is_regex=1)
        
        
            def write_manifest (self):
                """Write the file list in 'self.files' (presumably as filled in by
      ***************
      *** 677,763 ****
        
        # class sdist
      - 
      - 
      - # ----------------------------------------------------------------------
      - # Utility functions
      - 
      - def findall (dir = os.curdir):
      -     """Find all files under 'dir' and return the list of full filenames
      -     (relative to 'dir').
      -     """
      -     from stat import ST_MODE, S_ISREG, S_ISDIR, S_ISLNK
      - 
      -     list = []
      -     stack = [dir]
      -     pop = stack.pop
      -     push = stack.append
      - 
      -     while stack:
      -         dir = pop()
      -         names = os.listdir (dir)
      - 
      -         for name in names:
      -             if dir != os.curdir:        # avoid leading "./"
      -                 fullname = os.path.join (dir, name)
      -             else:
      -                 fullname = name
      - 
      -             # Avoid excess stat calls -- just one will do, thank you!
      -             stat = os.stat(fullname)
      -             mode = stat[ST_MODE]
      -             if S_ISREG(mode):
      -                 list.append (fullname)
      -             elif S_ISDIR(mode) and not S_ISLNK(mode):
      -                 push (fullname)
      - 
      -     return list
      - 
      - 
      - def glob_to_re (pattern):
      -     """Translate a shell-like glob pattern to a regular expression; return
      -     a string containing the regex.  Differs from 'fnmatch.translate()' in
      -     that '*' does not match "special characters" (which are
      -     platform-specific).
      -     """
      -     pattern_re = fnmatch.translate (pattern)
      - 
      -     # '?' and '*' in the glob pattern become '.' and '.*' in the RE, which
      -     # IMHO is wrong -- '?' and '*' aren't supposed to match slash in Unix,
      -     # and by extension they shouldn't match such "special characters" under
      -     # any OS.  So change all non-escaped dots in the RE to match any
      -     # character except the special characters.
      -     # XXX currently the "special characters" are just slash -- i.e. this is
      -     # Unix-only.
      -     pattern_re = re.sub (r'(^|[^\\])\.', r'\1[^/]', pattern_re)
      -     return pattern_re
      - 
      - # glob_to_re ()
      - 
      - 
      - def translate_pattern (pattern, anchor=1, prefix=None, is_regex=0):
      -     """Translate a shell-like wildcard pattern to a compiled regular
      -     expression.  Return the compiled regex.  If 'is_regex' true,
      -     then 'pattern' is directly compiled to a regex (if it's a string)
      -     or just returned as-is (assumes it's a regex object).
      -     """
      -     if is_regex:
      -         if type(pattern) is StringType:
      -             return re.compile(pattern)
      -         else:
      -             return pattern
      - 
      -     if pattern:
      -         pattern_re = glob_to_re (pattern)
      -     else:
      -         pattern_re = ''
      -         
      -     if prefix is not None:
      -         prefix_re = (glob_to_re (prefix))[0:-1] # ditch trailing $
      -         pattern_re = "^" + os.path.join (prefix_re, ".*" + pattern_re)
      -     else:                               # no prefix -- respect anchor flag
      -         if anchor:
      -             pattern_re = "^" + pattern_re
      -         
      -     return re.compile (pattern_re)
      - 
      - # translate_pattern ()
      --- 472,473 ----
      
      
      
      From python-dev@python.org  Sun Jul 30 02:30:34 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 18:30:34 -0700
      Subject: [Python-checkins] CVS: distutils/distutils/command sdist.py,1.39,1.40
      Message-ID: <200007300130.SAA26822@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils/command
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv26799
      
      Modified Files:
      	sdist.py 
      Log Message:
      Replaced 'self.files' with 'self.filelist': now we carry around a FileList
      instance instead of a list of filenames.  Simplifies the "sdist" command
      only a bit, but should allow greater simplification of FileList.
      
      Index: sdist.py
      ===================================================================
      RCS file: /cvsroot/python/distutils/distutils/command/sdist.py,v
      retrieving revision 1.39
      retrieving revision 1.40
      diff -C2 -r1.39 -r1.40
      *** sdist.py	2000/07/30 01:05:02	1.39
      --- sdist.py	2000/07/30 01:30:31	1.40
      ***************
      *** 129,134 ****
            def run (self):
        
      !         # 'files' is the list of files that will make up the manifest
      !         self.files = []
                
                # Ensure that all required meta-data is given; warn if not (but
      --- 129,135 ----
            def run (self):
        
      !         # 'filelist' contains the list of files that will make up the
      !         # manifest
      !         self.filelist = FileList()
                
                # Ensure that all required meta-data is given; warn if not (but
      ***************
      *** 138,142 ****
                # Do whatever it takes to get the list of files to process
                # (process the manifest template, read an existing manifest,
      !         # whatever).  File list is put into 'self.files'.
                self.get_file_list ()
        
      --- 139,143 ----
                # Do whatever it takes to get the list of files to process
                # (process the manifest template, read an existing manifest,
      !         # whatever).  File list is accumulated in 'self.filelist'.
                self.get_file_list ()
        
      ***************
      *** 185,189 ****
            def get_file_list (self):
                """Figure out the list of files to include in the source
      !         distribution, and put it in 'self.files'.  This might involve
                reading the manifest template (and writing the manifest), or just
                reading the manifest, or just using the default file set -- it all
      --- 186,190 ----
            def get_file_list (self):
                """Figure out the list of files to include in the source
      !         distribution, and put it in 'self.filelist'.  This might involve
                reading the manifest template (and writing the manifest), or just
                reading the manifest, or just using the default file set -- it all
      ***************
      *** 193,199 ****
                # If we have a manifest template, see if it's newer than the
                # manifest; if so, we'll regenerate the manifest.
      !         template_exists = os.path.isfile (self.template)
                if template_exists:
      !             template_newer = newer (self.template, self.manifest)
        
                # The contents of the manifest file almost certainly depend on the
      --- 194,200 ----
                # If we have a manifest template, see if it's newer than the
                # manifest; if so, we'll regenerate the manifest.
      !         template_exists = os.path.isfile(self.template)
                if template_exists:
      !             template_newer = newer(self.template, self.manifest)
        
                # The contents of the manifest file almost certainly depend on the
      ***************
      *** 223,237 ****
        
                    if not template_exists:
      !                 self.warn (("manifest template '%s' does not exist " +
      !                             "(using default file list)") %
      !                            self.template)
        
                    # Add default file set to 'files'
                    if self.use_defaults:
      !                 self.add_defaults ()
        
                    # Read manifest template if it exists
                    if template_exists:
      !                 self.read_template ()
        
                    # Prune away any directories that don't belong in the source
      --- 224,238 ----
        
                    if not template_exists:
      !                 self.warn(("manifest template '%s' does not exist " +
      !                            "(using default file list)") %
      !                           self.template)
        
                    # Add default file set to 'files'
                    if self.use_defaults:
      !                 self.add_defaults()
        
                    # Read manifest template if it exists
                    if template_exists:
      !                 self.read_template()
        
                    # Prune away any directories that don't belong in the source
      ***************
      *** 242,263 ****
                    # File list now complete -- sort it so that higher-level files
                    # come first
      !             sortable_files = map (os.path.split, self.files)
      !             sortable_files.sort ()
      !             self.files = []
      !             for sort_tuple in sortable_files:
      !                 self.files.append (apply (os.path.join, sort_tuple))
        
                    # Remove duplicates from the file list
      !             for i in range (len(self.files)-1, 0, -1):
      !                 if self.files[i] == self.files[i-1]:
      !                     del self.files[i]
        
                    # And write complete file list (including default file set) to
                    # the manifest.
      !             self.write_manifest ()
        
                # Don't regenerate the manifest, just read it in.
                else:
      !             self.read_manifest ()
        
            # get_file_list ()
      --- 243,258 ----
                    # File list now complete -- sort it so that higher-level files
                    # come first
      !             self.filelist.sort()
        
                    # Remove duplicates from the file list
      !             self.filelist.remove_duplicates()
        
                    # And write complete file list (including default file set) to
                    # the manifest.
      !             self.write_manifest()
        
                # Don't regenerate the manifest, just read it in.
                else:
      !             self.read_manifest()
        
            # get_file_list ()
      ***************
      *** 265,269 ****
        
            def add_defaults (self):
      !         """Add all the default files to self.files:
                  - README or README.txt
                  - setup.py
      --- 260,264 ----
        
            def add_defaults (self):
      !         """Add all the default files to self.filelist:
                  - README or README.txt
                  - setup.py
      ***************
      *** 287,291 ****
                            if os.path.exists (fn):
                                got_it = 1
      !                         self.files.append (fn)
                                break
        
      --- 282,286 ----
                            if os.path.exists (fn):
                                got_it = 1
      !                         self.filelist.append (fn)
                                break
        
      ***************
      *** 295,299 ****
                    else:
                        if os.path.exists (fn):
      !                     self.files.append (fn)
                        else:
                            self.warn ("standard file '%s' not found" % fn)
      --- 290,294 ----
                    else:
                        if os.path.exists (fn):
      !                     self.filelist.append (fn)
                        else:
                            self.warn ("standard file '%s' not found" % fn)
      ***************
      *** 303,319 ****
                    files = filter (os.path.isfile, glob (pattern))
                    if files:
      !                 self.files.extend (files)
        
                if self.distribution.has_pure_modules():
                    build_py = self.get_finalized_command ('build_py')
      !             self.files.extend (build_py.get_source_files ())
        
                if self.distribution.has_ext_modules():
                    build_ext = self.get_finalized_command ('build_ext')
      !             self.files.extend (build_ext.get_source_files ())
        
                if self.distribution.has_c_libraries():
                    build_clib = self.get_finalized_command ('build_clib')
      !             self.files.extend (build_clib.get_source_files ())
        
            # add_defaults ()
      --- 298,314 ----
                    files = filter (os.path.isfile, glob (pattern))
                    if files:
      !                 self.filelist.extend (files)
        
                if self.distribution.has_pure_modules():
                    build_py = self.get_finalized_command ('build_py')
      !             self.filelist.extend (build_py.get_source_files ())
        
                if self.distribution.has_ext_modules():
                    build_ext = self.get_finalized_command ('build_ext')
      !             self.filelist.extend (build_ext.get_source_files ())
        
                if self.distribution.has_c_libraries():
                    build_clib = self.get_finalized_command ('build_clib')
      !             self.filelist.extend (build_clib.get_source_files ())
        
            # add_defaults ()
      ***************
      *** 321,333 ****
        
            def read_template (self):
                """Read and parse the manifest template file named by
      !         'self.template' (usually "MANIFEST.in").  Process all file
      !         specifications (include and exclude) in the manifest template and
      !         update 'self.files' accordingly (filenames may be added to
      !         or removed from 'self.files' based on the manifest template).
                """
      -         assert self.files is not None and type (self.files) is ListType
                self.announce("reading manifest template '%s'" % self.template)
      - 
                template = TextFile (self.template,
                                     strip_comments=1,
      --- 316,326 ----
        
            def read_template (self):
      + 
                """Read and parse the manifest template file named by
      !         'self.template' (usually "MANIFEST.in").  The parsing and
      !         processing is done by 'self.filelist', which updates itself
      !         accordingly.
                """
                self.announce("reading manifest template '%s'" % self.template)
                template = TextFile (self.template,
                                     strip_comments=1,
      ***************
      *** 338,346 ****
                                     collapse_ws=1)
        
      -         # if we give Template() a list, it modifies this list
      -         filelist = FileList(files=self.files,
      -                             warn=self.warn,
      -                             debug_print=self.debug_print)
      - 
                while 1:
                    line = template.readline()
      --- 331,334 ----
      ***************
      *** 348,352 ****
                        break
        
      !             filelist.process_template_line(line)
        
            # read_template ()
      --- 336,340 ----
                        break
        
      !             self.filelist.process_template_line(line)
        
            # read_template ()
      ***************
      *** 364,383 ****
                base_dir = self.distribution.get_fullname()
        
      !         # if we give FileList a list, it modifies this list
      !         filelist = FileList(files=self.files,
      !                             warn=self.warn,
      !                             debug_print=self.debug_print)
      !         filelist.exclude_pattern(None, prefix=build.build_base)
      !         filelist.exclude_pattern(None, prefix=base_dir)
      !         filelist.exclude_pattern(r'/(RCS|CVS)/.*', is_regex=1)
        
        
            def write_manifest (self):
      !         """Write the file list in 'self.files' (presumably as filled in by
      !         'add_defaults()' and 'read_template()') to the manifest file named
      !         by 'self.manifest'.
                """
                self.execute(write_file,
      !                      (self.manifest, self.files),
                             "writing manifest file '%s'" % self.manifest)
        
      --- 352,367 ----
                base_dir = self.distribution.get_fullname()
        
      !         self.filelist.exclude_pattern(None, prefix=build.build_base)
      !         self.filelist.exclude_pattern(None, prefix=base_dir)
      !         self.filelist.exclude_pattern(r'/(RCS|CVS)/.*', is_regex=1)
        
        
            def write_manifest (self):
      !         """Write the file list in 'self.filelist' (presumably as filled in
      !         by 'add_defaults()' and 'read_template()') to the manifest file
      !         named by 'self.manifest'.
                """
                self.execute(write_file,
      !                      (self.manifest, self.filelist.files),
                             "writing manifest file '%s'" % self.manifest)
        
      ***************
      *** 387,391 ****
            def read_manifest (self):
                """Read the manifest file (named by 'self.manifest') and use it to
      !         fill in 'self.files', the list of files to include in the source
                distribution.
                """
      --- 371,375 ----
            def read_manifest (self):
                """Read the manifest file (named by 'self.manifest') and use it to
      !         fill in 'self.filelist', the list of files to include in the source
                distribution.
                """
      ***************
      *** 398,402 ****
                    if line[-1] == '\n':
                        line = line[0:-1]
      !             self.files.append (line)
        
            # read_manifest ()
      --- 382,386 ----
                    if line[-1] == '\n':
                        line = line[0:-1]
      !             self.filelist.append (line)
        
            # read_manifest ()
      ***************
      *** 452,456 ****
                base_name = os.path.join(self.dist_dir, base_dir)
        
      !         self.make_release_tree (base_dir, self.files)
                archive_files = []              # remember names of files we create
                if self.dist_dir:
      --- 436,440 ----
                base_name = os.path.join(self.dist_dir, base_dir)
        
      !         self.make_release_tree (base_dir, self.filelist.files)
                archive_files = []              # remember names of files we create
                if self.dist_dir:
      
      
      
      From python-dev@python.org  Sun Jul 30 02:45:45 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 18:45:45 -0700
      Subject: [Python-checkins] CVS: distutils/distutils filelist.py,1.6,1.7
      Message-ID: <200007300145.SAA27720@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv27616
      
      Modified Files:
      	filelist.py 
      Log Message:
      Added list-like methods: 'append()', 'extend()', 'sort()'.
      Added 'remove_duplicates()'.
      Simplified constructor: no longer take 'files' or 'allfiles' as args,
        and no longer have 'dir' attribute at all.
      Added 'set_allfiles()' and 'findall()' so the client does have a
        way to set the list of all files.
      Changed 'include_pattern()' to use the 'findall()' method instead of
        the external function.  (Of course, the method is just a trivial
        wrapper around the function.)
      
      
      Index: filelist.py
      ===================================================================
      RCS file: /cvsroot/python/distutils/distutils/filelist.py,v
      retrieving revision 1.6
      retrieving revision 1.7
      diff -C2 -r1.6 -r1.7
      *** filelist.py	2000/07/30 01:04:22	1.6
      --- filelist.py	2000/07/30 01:45:42	1.7
      ***************
      *** 36,57 ****
        
            def __init__(self, 
      -                  files=[], 
      -                  dir=os.curdir, 
      -                  allfiles=None, 
                         warn=None, 
                         debug_print=None):
      !         # use standard warning and debug functions, if no other given
      !         if warn is None: warn = self.__warn 
      !         if debug_print is None: debug_print = self.__debug_print
      !         self.warn = warn
      !         self.debug_print = debug_print
      !         self.files = files
      !         self.dir = dir
        
      !         # if None, 'allfiles' will be filled when used for first time
      !         self.allfiles = allfiles 
        
        
      !     # standard warning and debug functions, if no other given
            def __warn (self, msg):
                sys.stderr.write ("warning: %s\n" % msg)
      --- 36,58 ----
        
            def __init__(self, 
                         warn=None, 
                         debug_print=None):
      !         # use standard warning and debug functions if no other given
      !         self.warn = warn or self.__warn
      !         self.debug_print = debug_print or self.__debug_print
        
      !         self.allfiles = None
      !         self.files = []
        
        
      !     def set_allfiles (self, allfiles):
      !         self.allfiles = allfiles
      ! 
      !     def findall (self, dir=os.curdir):
      !         self.allfiles = findall(dir)
      ! 
      ! 
      !     # -- Fallback warning/debug functions ------------------------------
      !     
            def __warn (self, msg):
                sys.stderr.write ("warning: %s\n" % msg)
      ***************
      *** 65,68 ****
      --- 66,97 ----
                    print msg
        
      + 
      +     # -- List-like methods ---------------------------------------------
      + 
      +     def append (self, item):
      +         self.files.append(item)
      + 
      +     def extend (self, items):
      +         self.files.extend(items)
      + 
      +     def sort (self):
      +         # Not a strict lexical sort!
      +         sortable_files = map(os.path.split, self.files)
      +         sortable_files.sort()
      +         self.files = []
      +         for sort_tuple in sortable_files:
      +             self.files.append(apply(os.path.join, sort_tuple))
      + 
      + 
      +     # -- Other miscellaneous utility methods ---------------------------
      + 
      +     def remove_duplicates (self):
      +         # Assumes list has been sorted!
      +         for i in range (len(self.files)-1, 0, -1):
      +             if self.files[i] == self.files[i-1]:
      +                 del self.files[i]
      + 
      + 
      +     # -- "File template" methods ---------------------------------------
            
            def _parse_template_line (self, line):
      ***************
      *** 181,184 ****
      --- 210,215 ----
        
        
      +     # -- Filtering/selection methods -----------------------------------
      + 
            def include_pattern (self, pattern,
                                anchor=1, prefix=None, is_regex=0):
      ***************
      *** 214,218 ****
        
                # delayed loading of allfiles list
      !         if self.allfiles is None: self.allfiles = findall (self.dir)
        
                for name in self.allfiles:
      --- 245,250 ----
        
                # delayed loading of allfiles list
      !         if self.allfiles is None:
      !             self.findall()
        
                for name in self.allfiles:
      
      
      
      From python-dev@python.org  Sun Jul 30 02:47:19 2000
      From: python-dev@python.org (Greg Ward)
      Date: Sat, 29 Jul 2000 18:47:19 -0700
      Subject: [Python-checkins] CVS: distutils/distutils/command sdist.py,1.40,1.41
      Message-ID: <200007300147.SAA27817@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/distutils/distutils/command
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv27807/command
      
      Modified Files:
      	sdist.py 
      Log Message:
      Catch syntax errors from processing template lines and turn them into
        mere warnings.
      Call 'findall()' on our FileList object before we start using it seriously.
      
      Index: sdist.py
      ===================================================================
      RCS file: /cvsroot/python/distutils/distutils/command/sdist.py,v
      retrieving revision 1.40
      retrieving revision 1.41
      diff -C2 -r1.40 -r1.41
      *** sdist.py	2000/07/30 01:30:31	1.40
      --- sdist.py	2000/07/30 01:47:16	1.41
      ***************
      *** 15,19 ****
             check_archive_formats
        from distutils.text_file import TextFile
      ! from distutils.errors import DistutilsExecError, DistutilsOptionError
        from distutils.filelist import FileList
        
      --- 15,19 ----
             check_archive_formats
        from distutils.text_file import TextFile
      ! from distutils.errors import *
        from distutils.filelist import FileList
        
      ***************
      *** 228,231 ****
      --- 228,233 ----
                                  self.template)
        
      +             self.filelist.findall()
      + 
                    # Add default file set to 'files'
                    if self.use_defaults:
      ***************
      *** 336,340 ****
                        break
        
      !             self.filelist.process_template_line(line)
        
            # read_template ()
      --- 338,347 ----
                        break
        
      !             try:
      !                 self.filelist.process_template_line(line)
      !             except DistutilsTemplateError, msg:
      !                 self.warn("%s, line %d: %s" % (template.filename,
      !                                                template.current_line,
      !                                                msg))
        
            # read_template ()
      
      
      
      From python-dev@python.org  Sun Jul 30 03:20:40 2000
      From: python-dev@python.org (Mark Hammond)
      Date: Sat, 29 Jul 2000 19:20:40 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_mmap.py,1.7,1.8
      Message-ID: <200007300220.TAA04467@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Lib/test
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv4458
      
      Modified Files:
      	test_mmap.py 
      Log Message:
      Test that after resizing the mmap'd file, we can't seek beyond the new size.
      
      Index: test_mmap.py
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Lib/test/test_mmap.py,v
      retrieving revision 1.7
      retrieving revision 1.8
      diff -C2 -r1.7 -r1.8
      *** test_mmap.py	2000/07/11 11:24:41	1.7
      --- test_mmap.py	2000/07/30 02:20:38	1.8
      ***************
      *** 106,110 ****
            else:
                # resize() is supported
      !         pass
            
            m.close()
      --- 106,117 ----
            else:
                # resize() is supported
      ! 	assert len(m) == 512, "len(m) is %d, but expecting 512" % (len(m),)
      ! 	# Check that we can no longer seek beyond the new size.
      ! 	try:
      ! 		m.seek(513,0)
      ! 	except ValueError:
      ! 		pass
      ! 	else:
      ! 	        assert 0, 'Could seek beyond the new size'
            
            m.close()
      
      
      
      From python-dev@python.org  Sun Jul 30 03:22:46 2000
      From: python-dev@python.org (Mark Hammond)
      Date: Sat, 29 Jul 2000 19:22:46 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.20,2.21
      Message-ID: <200007300222.TAA04516@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Modules
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv4507
      
      Modified Files:
      	mmapmodule.c 
      Log Message:
      Fixes for Windows (but also tested on Linux).  Test suite now completes, and this module should not leak in the face of errors.
      
      Checkin that replaces the INT_PTR types with HANDLEs still TBD (but as that is a "spelling" patch, rather than a functional one, I will commit it seperately.
      
      Index: mmapmodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v
      retrieving revision 2.20
      retrieving revision 2.21
      diff -C2 -r2.20 -r2.21
      *** mmapmodule.c	2000/07/16 12:04:31	2.20
      --- mmapmodule.c	2000/07/30 02:22:43	2.21
      ***************
      *** 62,68 ****
        {
        #ifdef MS_WIN32
      ! 	UnmapViewOfFile (m_obj->data);
      ! 	CloseHandle (m_obj->map_handle);
      ! 	CloseHandle ((HANDLE)m_obj->file_handle);
        #endif /* MS_WIN32 */
        
      --- 62,73 ----
        {
        #ifdef MS_WIN32
      ! 	if (m_obj->data != NULL)
      ! 		UnmapViewOfFile (m_obj->data);
      ! 	if (m_obj->map_handle != INVALID_HANDLE_VALUE)
      ! 		CloseHandle (m_obj->map_handle);
      ! 	if ((HANDLE)m_obj->file_handle != INVALID_HANDLE_VALUE)
      ! 		CloseHandle ((HANDLE)m_obj->file_handle);
      ! 	if (m_obj->tagname)
      ! 		PyMem_Free(m_obj->tagname);
        #endif /* MS_WIN32 */
        
      ***************
      *** 827,833 ****
        
        	m_obj = PyObject_New (mmap_object, &mmap_object_type);
      !     
        	if (fh) {
      ! 		m_obj->file_handle = fh;
        		if (!map_size) {
        			m_obj->size = GetFileSize ((HANDLE)fh, NULL);
      --- 832,860 ----
        
        	m_obj = PyObject_New (mmap_object, &mmap_object_type);
      ! 	if (m_obj==NULL)
      ! 		return NULL;
      ! 	/* Set every field to an invalid marker, so we can safely
      ! 	   destruct the object in the face of failure */
      ! 	m_obj->data = NULL;
      ! 	m_obj->file_handle = (INT_PTR)INVALID_HANDLE_VALUE;
      ! 	m_obj->map_handle = INVALID_HANDLE_VALUE;
      ! 	m_obj->tagname = NULL;
      ! 
        	if (fh) {
      ! 		/* It is necessary to duplicate the handle, so the
      ! 		   Python code can close it on us */
      ! 		if (!DuplicateHandle(
      ! 			    GetCurrentProcess(), /* source process handle */
      ! 			    (HANDLE)fh, /* handle to be duplicated */
      ! 			    GetCurrentProcess(), /* target proc handle */
      ! 			    (LPHANDLE)&m_obj->file_handle, /* result */
      ! 			    0, /* access - ignored due to options value */
      ! 			    FALSE, /* inherited by child processes? */
      ! 			    DUPLICATE_SAME_ACCESS)) { /* options */
      ! 			dwErr = GetLastError();
      ! 			Py_DECREF(m_obj);
      ! 			PyErr_SetFromWindowsErr(dwErr);
      ! 			return NULL;
      ! 		}
        		if (!map_size) {
        			m_obj->size = GetFileSize ((HANDLE)fh, NULL);
      ***************
      *** 837,841 ****
        	}
        	else {
      - 		m_obj->file_handle = (INT_PTR) -1;
        		m_obj->size = map_size;
        	}
      --- 864,867 ----
      ***************
      *** 844,847 ****
      --- 870,886 ----
        	m_obj->pos = (size_t) 0;
        
      + 	/* set the tag name */
      + 	if (tagname != NULL) {
      + 		m_obj->tagname = PyMem_Malloc(strlen(tagname)+1);
      + 		if (m_obj->tagname == NULL) {
      + 			PyErr_NoMemory();
      + 			Py_DECREF(m_obj);
      + 			return NULL;
      + 		}
      + 		strcpy(m_obj->tagname, tagname);
      + 	}
      + 	else
      + 		m_obj->tagname = NULL;
      + 
        	m_obj->map_handle = CreateFileMapping ((HANDLE) m_obj->file_handle,
        					       NULL,
      ***************
      *** 864,867 ****
      --- 903,907 ----
        		dwErr = GetLastError();
        	}
      + 	Py_DECREF(m_obj);
        	PyErr_SetFromWindowsErr(dwErr);
        	return (NULL);
      
      
      
      From python-dev@python.org  Sun Jul 30 03:46:29 2000
      From: python-dev@python.org (Mark Hammond)
      Date: Sat, 29 Jul 2000 19:46:29 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.21,2.22
      Message-ID: <200007300246.TAA05870@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Modules
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv5859
      
      Modified Files:
      	mmapmodule.c 
      Log Message:
      More Windows changes.
      
      * After discussion with Trent, all INT_PTR references have been removed in favour of the HANDLE it should always have been.  Trent can see no 64bit issues here.
      
      * In this process, I noticed that the close operation was dangerous, in that we could end up passing bogus results to the Win32 API.  These result of the API functions passed the bogus values were never (and still are not) checked, but this is closer to "the right thing" (tm) than before.
      
      Tested on Windows and Linux.
      
      Index: mmapmodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v
      retrieving revision 2.21
      retrieving revision 2.22
      diff -C2 -r2.21 -r2.22
      *** mmapmodule.c	2000/07/30 02:22:43	2.21
      --- mmapmodule.c	2000/07/30 02:46:26	2.22
      ***************
      *** 13,17 ****
         /   sizes.
         /
      !  / The latest version of mmapfile is maintained by Sam at
         / ftp://squirl.nightmare.com/pub/python/python-ext.
        */
      --- 13,19 ----
         /   sizes.
         /
      !  / This version of mmapmodule.c has been changed significantly
      !  / from the original mmapfile.c on which it was based.
      !  / The original version of mmapfile is maintained by Sam at
         / ftp://squirl.nightmare.com/pub/python/python-ext.
        */
      ***************
      *** 25,32 ****
        #ifdef MS_WIN32
        #include 
      - #if _MSC_VER < 1200
      - #define INT_PTR unsigned long
        #endif
      - #endif
        
        #ifdef UNIX
      --- 27,31 ----
      ***************
      *** 49,53 ****
        #ifdef MS_WIN32
        	HANDLE	map_handle;
      ! 	INT_PTR	file_handle;
        	char *	tagname;
        #endif
      --- 48,52 ----
        #ifdef MS_WIN32
        	HANDLE	map_handle;
      ! 	HANDLE	file_handle;
        	char *	tagname;
        #endif
      ***************
      *** 66,71 ****
        	if (m_obj->map_handle != INVALID_HANDLE_VALUE)
        		CloseHandle (m_obj->map_handle);
      ! 	if ((HANDLE)m_obj->file_handle != INVALID_HANDLE_VALUE)
      ! 		CloseHandle ((HANDLE)m_obj->file_handle);
        	if (m_obj->tagname)
        		PyMem_Free(m_obj->tagname);
      --- 65,70 ----
        	if (m_obj->map_handle != INVALID_HANDLE_VALUE)
        		CloseHandle (m_obj->map_handle);
      ! 	if (m_obj->file_handle != INVALID_HANDLE_VALUE)
      ! 		CloseHandle (m_obj->file_handle);
        	if (m_obj->tagname)
        		PyMem_Free(m_obj->tagname);
      ***************
      *** 88,95 ****
        		return NULL;
        #ifdef MS_WIN32
      ! 	UnmapViewOfFile (self->data);
      ! 	CloseHandle (self->map_handle);
      ! 	CloseHandle ((HANDLE)self->file_handle);
      ! 	self->map_handle = (HANDLE) NULL;
        #endif /* MS_WIN32 */
        
      --- 87,109 ----
        		return NULL;
        #ifdef MS_WIN32
      ! 	/* For each resource we maintain, we need to check
      ! 	   the value is valid, and if so, free the resource 
      ! 	   and set the member value to an invalid value so
      ! 	   the dealloc does not attempt to resource clearing
      ! 	   again.
      ! 	   TODO - should we check for errors in the close operations???
      ! 	*/
      ! 	if (self->data != NULL) {
      ! 		UnmapViewOfFile (self->data);
      ! 		self->data = NULL;
      ! 	}
      ! 	if (self->map_handle != INVALID_HANDLE_VALUE) {
      ! 		CloseHandle (self->map_handle);
      ! 		self->map_handle = INVALID_HANDLE_VALUE;
      ! 	}
      ! 	if (self->file_handle != INVALID_HANDLE_VALUE) {
      ! 		CloseHandle (self->file_handle);
      ! 		self->file_handle = INVALID_HANDLE_VALUE;
      ! 	}
        #endif /* MS_WIN32 */
        
      ***************
      *** 264,271 ****
        
        #ifdef MS_WIN32
      ! 	if (self->file_handle != (INT_PTR) -1) {
        		return (Py_BuildValue (
        			"l", (long)
      ! 			GetFileSize ((HANDLE)self->file_handle, NULL)));
        	} else {
        		return (Py_BuildValue ("l", (long) self->size) );
      --- 278,285 ----
        
        #ifdef MS_WIN32
      ! 	if (self->file_handle != INVALID_HANDLE_VALUE) {
        		return (Py_BuildValue (
        			"l", (long)
      ! 			GetFileSize (self->file_handle, NULL)));
        	} else {
        		return (Py_BuildValue ("l", (long) self->size) );
      ***************
      *** 308,320 ****
        		UnmapViewOfFile (self->data);
        		/* Close the mapping object */
      ! 		CloseHandle ((HANDLE)self->map_handle);
        		/* Move to the desired EOF position */
      ! 		SetFilePointer ((HANDLE)self->file_handle,
        				new_size, NULL, FILE_BEGIN);
        		/* Change the size of the file */
      ! 		SetEndOfFile ((HANDLE)self->file_handle);
        		/* Create another mapping object and remap the file view */
        		self->map_handle = CreateFileMapping (
      ! 			(HANDLE) self->file_handle,
        			NULL,
        			PAGE_READWRITE,
      --- 322,334 ----
        		UnmapViewOfFile (self->data);
        		/* Close the mapping object */
      ! 		CloseHandle (self->map_handle);
        		/* Move to the desired EOF position */
      ! 		SetFilePointer (self->file_handle,
        				new_size, NULL, FILE_BEGIN);
        		/* Change the size of the file */
      ! 		SetEndOfFile (self->file_handle);
        		/* Create another mapping object and remap the file view */
        		self->map_handle = CreateFileMapping (
      ! 			self->file_handle,
        			NULL,
        			PAGE_READWRITE,
      ***************
      *** 803,807 ****
        	DWORD dwErr = 0;
        	int fileno;
      ! 	INT_PTR fh = 0;
        
        	/* Patch the object type */
      --- 817,821 ----
        	DWORD dwErr = 0;
        	int fileno;
      ! 	HANDLE fh = 0;
        
        	/* Patch the object type */
      ***************
      *** 822,827 ****
        	/* if an actual filename has been specified */
        	if (fileno != 0) {
      ! 		fh = _get_osfhandle(fileno);
      ! 		if (fh==-1) {
        		    PyErr_SetFromErrno(mmap_module_error);
        		    return NULL;
      --- 836,841 ----
        	/* if an actual filename has been specified */
        	if (fileno != 0) {
      ! 		fh = (HANDLE)_get_osfhandle(fileno);
      ! 		if (fh==(HANDLE)-1) {
        		    PyErr_SetFromErrno(mmap_module_error);
        		    return NULL;
      ***************
      *** 837,841 ****
        	   destruct the object in the face of failure */
        	m_obj->data = NULL;
      ! 	m_obj->file_handle = (INT_PTR)INVALID_HANDLE_VALUE;
        	m_obj->map_handle = INVALID_HANDLE_VALUE;
        	m_obj->tagname = NULL;
      --- 851,855 ----
        	   destruct the object in the face of failure */
        	m_obj->data = NULL;
      ! 	m_obj->file_handle = INVALID_HANDLE_VALUE;
        	m_obj->map_handle = INVALID_HANDLE_VALUE;
        	m_obj->tagname = NULL;
      ***************
      *** 846,850 ****
        		if (!DuplicateHandle(
        			    GetCurrentProcess(), /* source process handle */
      ! 			    (HANDLE)fh, /* handle to be duplicated */
        			    GetCurrentProcess(), /* target proc handle */
        			    (LPHANDLE)&m_obj->file_handle, /* result */
      --- 860,864 ----
        		if (!DuplicateHandle(
        			    GetCurrentProcess(), /* source process handle */
      ! 			    fh, /* handle to be duplicated */
        			    GetCurrentProcess(), /* target proc handle */
        			    (LPHANDLE)&m_obj->file_handle, /* result */
      ***************
      *** 858,862 ****
        		}
        		if (!map_size) {
      ! 			m_obj->size = GetFileSize ((HANDLE)fh, NULL);
        		} else {
        			m_obj->size = map_size;
      --- 872,876 ----
        		}
        		if (!map_size) {
      ! 			m_obj->size = GetFileSize (fh, NULL);
        		} else {
        			m_obj->size = map_size;
      ***************
      *** 883,887 ****
        		m_obj->tagname = NULL;
        
      ! 	m_obj->map_handle = CreateFileMapping ((HANDLE) m_obj->file_handle,
        					       NULL,
        					       PAGE_READWRITE,
      --- 897,901 ----
        		m_obj->tagname = NULL;
        
      ! 	m_obj->map_handle = CreateFileMapping (m_obj->file_handle,
        					       NULL,
        					       PAGE_READWRITE,
      
      
      
      From python-dev@python.org  Sun Jul 30 16:38:39 2000
      From: python-dev@python.org (Thomas Wouters)
      Date: Sun, 30 Jul 2000 08:38:39 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_mmap.py,1.8,1.9
      Message-ID: <200007301538.IAA22518@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Lib/test
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv22380/Lib/test
      
      Modified Files:
      	test_mmap.py 
      Log Message:
      
      Fix inconsistent use of tab/space in indentation.
      
      
      
      Index: test_mmap.py
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Lib/test/test_mmap.py,v
      retrieving revision 1.8
      retrieving revision 1.9
      diff -C2 -r1.8 -r1.9
      *** test_mmap.py	2000/07/30 02:20:38	1.8
      --- test_mmap.py	2000/07/30 15:38:35	1.9
      ***************
      *** 106,117 ****
            else:
                # resize() is supported
      ! 	assert len(m) == 512, "len(m) is %d, but expecting 512" % (len(m),)
      ! 	# Check that we can no longer seek beyond the new size.
      ! 	try:
      ! 		m.seek(513,0)
      ! 	except ValueError:
      ! 		pass
      ! 	else:
      ! 	        assert 0, 'Could seek beyond the new size'
            
            m.close()
      --- 106,117 ----
            else:
                # resize() is supported
      !         assert len(m) == 512, "len(m) is %d, but expecting 512" % (len(m),)
      !         # Check that we can no longer seek beyond the new size.
      !         try:
      !             m.seek(513,0)
      !         except ValueError:
      !             pass
      !         else:
      !             assert 0, 'Could seek beyond the new size'
            
            m.close()
      
      
      
      From python-dev@python.org  Mon Jul 31 15:31:30 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Mon, 31 Jul 2000 07:31:30 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Doc/texinputs boilerplate.tex,1.41,1.42
      Message-ID: <200007311431.HAA28434@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Doc/texinputs
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv28425/texinputs
      
      Modified Files:
      	boilerplate.tex 
      Log Message:
      
      Update, 'cause Guido said it should be this way.
      
      
      Index: boilerplate.tex
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/boilerplate.tex,v
      retrieving revision 1.41
      retrieving revision 1.42
      diff -C2 -r1.41 -r1.42
      *** boilerplate.tex	2000/06/30 15:35:16	1.41
      --- boilerplate.tex	2000/07/31 14:31:28	1.42
      ***************
      *** 1,9 ****
      ! \author{Guido van Rossum}
      ! 
        \authoraddress{
        	BeOpen PythonLabs \\
      ! 	E-mail: \email{guido@python.org}
        }
        
      ! \date{July 1, 2000}			% XXX update before release!
        \release{2.0b1}
      --- 1,9 ----
      ! \author{Guido van Rossum \\
      ! 	Fred L. Drake, Jr., editor}
        \authoraddress{
        	BeOpen PythonLabs \\
      ! 	E-mail: \email{python-docs@python.org}
        }
        
      ! \date{\today}			% XXX update before release!
        \release{2.0b1}
      
      
      
      From python-dev@python.org  Mon Jul 31 16:05:22 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Mon, 31 Jul 2000 08:05:22 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0216.txt,NONE,1.1
      Message-ID: <200007311505.IAA03387@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv3329
      
      Added Files:
      	pep-0216.txt 
      Log Message:
      PEP 216, Docstring Format, assigned to Moshe Zadka
      
      
      ***** Error reading new file(2, 'No such file or directory')
      
      
      From python-dev@python.org  Mon Jul 31 16:06:49 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Mon, 31 Jul 2000 08:06:49 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.14,1.15
      Message-ID: <200007311506.IAA06026@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv6017
      
      Modified Files:
      	pep-0000.txt 
      Log Message:
      Added PEP 216, Docstring Format, assigned to Moshe Zadka
      
      
      Index: pep-0000.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v
      retrieving revision 1.14
      retrieving revision 1.15
      diff -C2 -r1.14 -r1.15
      *** pep-0000.txt	2000/07/28 05:49:32	1.14
      --- pep-0000.txt	2000/07/31 15:06:47	1.15
      ***************
      *** 5,9 ****
        Status: Active
        
      - 
        Introduction
        
      --- 5,8 ----
      ***************
      *** 12,15 ****
      --- 11,15 ----
            once assigned are never changed.
        
      + 
        Index
        
      ***************
      *** 37,40 ****
      --- 37,41 ----
             214  pep-0214.txt  Extended Print Statement             bwarsaw
             215  pep-0215.txt  String Interpolation                 ping
      +      216  pep-0216.txt  Docstring Format                     moshez
        
        
      
      
      
      From python-dev@python.org  Mon Jul 31 16:11:03 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Mon, 31 Jul 2000 08:11:03 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Doc/texinputs boilerplate.tex,1.42,1.42.2.1
      Message-ID: <200007311511.IAA06480@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Doc/texinputs
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv6467/texinputs
      
      Modified Files:
            Tag: cnri-16-start
      	boilerplate.tex 
      Log Message:
      
      Update for 1.6b1 release (on 1.6 branch only!).
      
      
      Index: boilerplate.tex
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/boilerplate.tex,v
      retrieving revision 1.42
      retrieving revision 1.42.2.1
      diff -C2 -r1.42 -r1.42.2.1
      *** boilerplate.tex	2000/07/31 14:31:28	1.42
      --- boilerplate.tex	2000/07/31 15:11:01	1.42.2.1
      ***************
      *** 6,9 ****
        }
        
      ! \date{\today}			% XXX update before release!
      ! \release{2.0b1}
      --- 6,9 ----
        }
        
      ! \date{August 1, 2000}			% XXX update before release!
      ! \release{1.6b1}
      
      
      
      From python-dev@python.org  Mon Jul 31 16:28:06 2000
      From: python-dev@python.org (Peter Schneider-Kamp)
      Date: Mon, 31 Jul 2000 08:28:06 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Include Python.h,2.24,2.25 mymalloc.h,2.24,2.25 mymath.h,2.11,2.12 myselect.h,2.12,2.13 mytime.h,2.6,2.7 objimpl.h,2.23,2.24 pgenheaders.h,2.21,2.22 pyport.h,2.7,2.8
      Message-ID: <200007311528.IAA14497@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Include
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv14376/Include
      
      Modified Files:
      	Python.h mymalloc.h mymath.h myselect.h mytime.h objimpl.h 
      	pgenheaders.h pyport.h 
      Log Message:
      
      merge Include/my*.h into Include/pyport.h
      
      marked my*.h as obsolete
      
      
      
      Index: Python.h
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v
      retrieving revision 2.24
      retrieving revision 2.25
      diff -C2 -r2.24 -r2.25
      *** Python.h	2000/07/23 19:28:34	2.24
      --- Python.h	2000/07/31 15:28:03	2.25
      ***************
      *** 55,60 ****
        #include "pyport.h"
        
      - #include "myproto.h"
      - 
        #include "object.h"
        #include "objimpl.h"
      --- 55,58 ----
      ***************
      *** 86,90 ****
        #include "codecs.h"
        #include "pyerrors.h"
      - #include "mymalloc.h"
        
        #include "pystate.h"
      --- 84,87 ----
      
      Index: mymalloc.h
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Include/mymalloc.h,v
      retrieving revision 2.24
      retrieving revision 2.25
      diff -C2 -r2.24 -r2.25
      *** mymalloc.h	2000/07/25 12:56:37	2.24
      --- mymalloc.h	2000/07/31 15:28:03	2.25
      ***************
      *** 11,14 ****
      --- 11,19 ----
        ******************************************************************/
        
      + /***************************************
      + THIS FILE IS OBSOLETE
      + USE "pyport.h" INSTEAD
      + ***************************************/
      + 
        /* Lowest-level memory allocation interface */
        
      
      Index: mymath.h
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Include/mymath.h,v
      retrieving revision 2.11
      retrieving revision 2.12
      diff -C2 -r2.11 -r2.12
      *** mymath.h	2000/07/12 17:21:41	2.11
      --- mymath.h	2000/07/31 15:28:03	2.12
      ***************
      *** 1,2 ****
      --- 1,7 ----
      + /***************************************
      + THIS FILE IS OBSOLETE
      + USE "pyport.h" INSTEAD
      + ***************************************/
      + 
        /* On the 68K Mac, when using CFM (Code Fragment Manager),
            requires special treatment -- we need to surround it with
      
      Index: myselect.h
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Include/myselect.h,v
      retrieving revision 2.12
      retrieving revision 2.13
      diff -C2 -r2.12 -r2.13
      *** myselect.h	2000/06/30 23:58:04	2.12
      --- myselect.h	2000/07/31 15:28:03	2.13
      ***************
      *** 15,18 ****
      --- 15,23 ----
        ******************************************************************/
        
      + /***************************************
      + THIS FILE IS OBSOLETE
      + USE "pyport.h" INSTEAD
      + ***************************************/
      + 
        /* Include file for users of select() */
        
      
      Index: mytime.h
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Include/mytime.h,v
      retrieving revision 2.6
      retrieving revision 2.7
      diff -C2 -r2.6 -r2.7
      *** mytime.h	2000/06/30 23:58:04	2.6
      --- mytime.h	2000/07/31 15:28:03	2.7
      ***************
      *** 15,18 ****
      --- 15,23 ----
        ******************************************************************/
        
      + /***************************************
      + THIS FILE IS OBSOLETE
      + USE "pyport.h" INSTEAD
      + ***************************************/
      + 
        /* Include file instead of  and/or  */
        
      
      Index: objimpl.h
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Include/objimpl.h,v
      retrieving revision 2.23
      retrieving revision 2.24
      diff -C2 -r2.23 -r2.24
      *** objimpl.h	2000/07/25 12:56:37	2.23
      --- objimpl.h	2000/07/31 15:28:03	2.24
      ***************
      *** 15,19 ****
        #endif
        
      ! #include "mymalloc.h"
        
        /*
      --- 15,19 ----
        #endif
        
      ! #include "pyport.h"
        
        /*
      
      Index: pgenheaders.h
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Include/pgenheaders.h,v
      retrieving revision 2.21
      retrieving revision 2.22
      diff -C2 -r2.21 -r2.22
      *** pgenheaders.h	2000/07/22 23:30:03	2.21
      --- pgenheaders.h	2000/07/31 15:28:03	2.22
      ***************
      *** 31,36 ****
        #endif
        
      ! #include "myproto.h"
      ! #include "mymalloc.h"
        
        #include "pydebug.h"
      --- 31,35 ----
        #endif
        
      ! #include "pyport.h"
        
        #include "pydebug.h"
      
      Index: pyport.h
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v
      retrieving revision 2.7
      retrieving revision 2.8
      diff -C2 -r2.7 -r2.8
      *** pyport.h	2000/07/26 15:46:29	2.7
      --- pyport.h	2000/07/31 15:28:03	2.8
      ***************
      *** 30,34 ****
      --- 30,42 ----
        
        
      + #define ANY void /* For API compatibility only. Obsolete, do not use. */
      + 
      + #ifdef HAVE_STDLIB_H
      + #include 
      + #endif
      + 
        #ifdef __cplusplus
      + /* Move this down here since some C++ #include's don't like to be included
      +    inside an extern "C" */
        extern "C" {
        #endif
      ***************
      *** 137,140 ****
      --- 145,457 ----
        #endif /* 0 */
        
      + 
      + /************************
      +  * WRAPPER FOR  *
      +  ************************/
      + 
      + /* On the 68K Mac, when using CFM (Code Fragment Manager),
      +     requires special treatment -- we need to surround it with
      +    #pragma lib_export off / on...
      +    This is because MathLib.o is a static library, and exporting its
      +    symbols doesn't quite work...
      +    XXX Not sure now...  Seems to be something else going on as well... */
      + 
      + #ifndef HAVE_HYPOT
      + extern double hypot(double, double);
      + #ifdef MWERKS_BEFORE_PRO4
      + #define hypot we_dont_want_faulty_hypot_decl
      + #endif
      + #endif
      + 
      + #include 
      + 
      + #ifndef HAVE_HYPOT
      + #ifdef __MWERKS__
      + #undef hypot
      + #endif
      + #endif
      + 
      + #if defined(USE_MSL) && defined(__MC68K__)
      + /* CodeWarrior MSL 2.1.1 has weird define overrides that don't work
      + ** when you take the address of math functions. If I interpret the
      + ** ANSI C standard correctly this is illegal, but I haven't been able
      + ** to convince the MetroWerks folks of this...
      + */
      + #undef acos
      + #undef asin
      + #undef atan
      + #undef atan2
      + #undef ceil
      + #undef cos
      + #undef cosh
      + #undef exp
      + #undef fabs
      + #undef floor
      + #undef fmod
      + #undef log
      + #undef log10
      + #undef pow
      + #undef rint
      + #undef sin
      + #undef sinh
      + #undef sqrt
      + #undef tan
      + #undef tanh
      + #define acos acosd
      + #define asin asind
      + #define atan atand
      + #define atan2 atan2d
      + #define ceil ceild
      + #define cos cosd
      + #define cosh coshd
      + #define exp expd
      + #define fabs fabsd
      + #define floor floord
      + #define fmod fmodd
      + #define log logd
      + #define log10 log10d
      + #define pow powd
      + #define rint rintd
      + #define sin sind
      + #define sinh sinhd
      + #define sqrt sqrtd
      + #define tan tand
      + #define tanh tanhd
      + #endif 
      + 
      + 
      + /***********************************
      +  * WRAPPER FOR malloc/realloc/free *
      +  ***********************************/
      + 
      + #ifndef DL_IMPORT       /* declarations for DLL import */
      + #define DL_IMPORT(RTYPE) RTYPE
      + #endif
      + 
      + #ifndef NULL
      + #define NULL ((void *)0)
      + #endif
      + 
      + #ifdef MALLOC_ZERO_RETURNS_NULL
      + /* XXX Always allocate one extra byte, since some malloc's return NULL
      +    XXX for malloc(0) or realloc(p, 0). */
      + #define _PyMem_EXTRA 1
      + #else
      + #define _PyMem_EXTRA 0
      + #endif
      + 
      + /*
      +  * Core memory allocator
      +  * =====================
      +  */
      + 
      + /* To make sure the interpreter is user-malloc friendly, all memory
      +    APIs are implemented on top of this one.
      + 
      +    The PyCore_* macros can be defined to make the interpreter use a
      +    custom allocator. Note that they are for internal use only. Both
      +    the core and extension modules should use the PyMem_* API.
      + 
      +    See the comment block at the end of this file for two scenarios
      +    showing how to use this to use a different allocator. */
      + 
      + #ifndef PyCore_MALLOC_FUNC
      + #undef PyCore_REALLOC_FUNC
      + #undef PyCore_FREE_FUNC
      + #define PyCore_MALLOC_FUNC      malloc
      + #define PyCore_REALLOC_FUNC     realloc
      + #define PyCore_FREE_FUNC        free
      + #endif
      + 
      + #ifndef PyCore_MALLOC_PROTO
      + #undef PyCore_REALLOC_PROTO
      + #undef PyCore_FREE_PROTO
      + #define PyCore_MALLOC_PROTO    (size_t)
      + #define PyCore_REALLOC_PROTO   (void *, size_t)
      + #define PyCore_FREE_PROTO      (void *)
      + #endif
      + 
      + #ifdef NEED_TO_DECLARE_MALLOC_AND_FRIEND
      + extern void *PyCore_MALLOC_FUNC PyCore_MALLOC_PROTO;
      + extern void *PyCore_REALLOC_FUNC PyCore_REALLOC_PROTO;
      + extern void PyCore_FREE_FUNC PyCore_FREE_PROTO;
      + #endif
      + 
      + #ifndef PyCore_MALLOC
      + #undef PyCore_REALLOC
      + #undef PyCore_FREE
      + #define PyCore_MALLOC(n)        PyCore_MALLOC_FUNC(n)
      + #define PyCore_REALLOC(p, n)    PyCore_REALLOC_FUNC((p), (n))
      + #define PyCore_FREE(p)          PyCore_FREE_FUNC(p)
      + #endif
      + 
      + /* BEWARE:
      + 
      +    Each interface exports both functions and macros. Extension modules
      +    should normally use the functions for ensuring binary compatibility
      +    of the user's code across Python versions. Subsequently, if the
      +    Python runtime switches to its own malloc (different from standard
      +    malloc), no recompilation is required for the extensions.
      + 
      +    The macro versions trade compatibility for speed. They can be used
      +    whenever there is a performance problem, but their use implies
      +    recompilation of the code for each new Python release. The Python
      +    core uses the macros because it *is* compiled on every upgrade.
      +    This might not be the case with 3rd party extensions in a custom
      +    setup (for example, a customer does not always have access to the
      +    source of 3rd party deliverables). You have been warned! */
      + 
      + /*
      +  * Raw memory interface
      +  * ====================
      +  */
      + 
      + /* Functions */
      + 
      + /* Function wrappers around PyCore_MALLOC and friends; useful if you
      +    need to be sure that you are using the same memory allocator as
      +    Python.  Note that the wrappers make sure that allocating 0 bytes
      +    returns a non-NULL pointer, even if the underlying malloc
      +    doesn't. Returned pointers must be checked for NULL explicitly.
      +    No action is performed on failure. */
      + extern DL_IMPORT(void *) PyMem_Malloc(size_t);
      + extern DL_IMPORT(void *) PyMem_Realloc(void *, size_t);
      + extern DL_IMPORT(void) PyMem_Free(void *);
      + 
      + /* Starting from Python 1.6, the wrappers Py_{Malloc,Realloc,Free} are
      +    no longer supported. They used to call PyErr_NoMemory() on failure. */
      + 
      + /* Macros */
      + #define PyMem_MALLOC(n)         PyCore_MALLOC(n)
      + #define PyMem_REALLOC(p, n)     PyCore_REALLOC((void *)(p), (n))
      + #define PyMem_FREE(p)           PyCore_FREE((void *)(p))
      + 
      + /*
      +  * Type-oriented memory interface
      +  * ==============================
      +  */
      + 
      + /* Functions */
      + #define PyMem_New(type, n) \
      + 	( (type *) PyMem_Malloc((n) * sizeof(type)) )
      + #define PyMem_Resize(p, type, n) \
      + 	( (p) = (type *) PyMem_Realloc((n) * sizeof(type)) )
      + #define PyMem_Del(p) PyMem_Free(p)
      + 
      + /* Macros */
      + #define PyMem_NEW(type, n) \
      + 	( (type *) PyMem_MALLOC(_PyMem_EXTRA + (n) * sizeof(type)) )
      + #define PyMem_RESIZE(p, type, n) \
      + 	if ((p) == NULL) \
      + 		(p) = (type *)(PyMem_MALLOC( \
      + 				    _PyMem_EXTRA + (n) * sizeof(type))); \
      + 	else \
      + 		(p) = (type *)(PyMem_REALLOC((p), \
      + 				    _PyMem_EXTRA + (n) * sizeof(type)))
      + #define PyMem_DEL(p) PyMem_FREE(p)
      + 
      + /* PyMem_XDEL is deprecated. To avoid the call when p is NULL,
      +    it is recommended to write the test explicitly in the code.
      +    Note that according to ANSI C, free(NULL) has no effect. */
      + 
      + /* SCENARIOS
      + 
      +    Here are two scenarios by Vladimir Marangozov (the author of the
      +    memory allocation redesign).
      + 
      +    1) Scenario A
      + 
      +    Suppose you want to use a debugging malloc library that collects info on
      +    where the malloc calls originate from. Assume the interface is:
      + 
      +    d_malloc(size_t n, char* src_file, unsigned long src_line) c.s.
      + 
      +    In this case, you would define (for example in config.h) :
      + 
      +    #define PyCore_MALLOC_FUNC      d_malloc
      +    ...
      +    #define PyCore_MALLOC_PROTO	(size_t, char *, unsigned long)
      +    ...
      +    #define NEED_TO_DECLARE_MALLOC_AND_FRIEND
      + 
      +    #define PyCore_MALLOC(n)	PyCore_MALLOC_FUNC((n), __FILE__, __LINE__)
      +    ...
      + 
      +    2) Scenario B
      + 
      +    Suppose you want to use malloc hooks (defined & initialized in a 3rd party
      +    malloc library) instead of malloc functions.  In this case, you would
      +    define:
      + 
      +    #define PyCore_MALLOC_FUNC	(*malloc_hook)
      +    ...
      +    #define NEED_TO_DECLARE_MALLOC_AND_FRIEND
      + 
      +    and ignore the previous definitions about PyCore_MALLOC_FUNC, etc.
      + 
      + 
      + */
      + 
      + /********************************************
      +  * WRAPPER FOR  and/or  *
      +  ********************************************/
      + 
      + #ifdef TIME_WITH_SYS_TIME
      + #include 
      + #include 
      + #else /* !TIME_WITH_SYS_TIME */
      + #ifdef HAVE_SYS_TIME_H
      + #include 
      + #else /* !HAVE_SYS_TIME_H */
      + #include 
      + #endif /* !HAVE_SYS_TIME_H */
      + #endif /* !TIME_WITH_SYS_TIME */
      + 
      + 
      + /******************************
      +  * WRAPPER FOR  *
      +  ******************************/
      + 
      + /* NB caller must include  */
      + 
      + #ifdef HAVE_SYS_SELECT_H
      + 
      + #include 
      + 
      + #else /* !HAVE_SYS_SELECT_H */
      + 
      + #ifdef USE_GUSI1
      + /* If we don't have sys/select the definition may be in unistd.h */
      + #include 
      + #endif
      + 
      + #endif /* !HAVE_SYS_SELECT_H */
      + 
      + /* If the fd manipulation macros aren't defined,
      +    here is a set that should do the job */
      + 
      + #ifndef	FD_SETSIZE
      + #define	FD_SETSIZE	256
      + #endif
      + 
      + #ifndef FD_SET
      + 
      + typedef long fd_mask;
      + 
      + #define NFDBITS	(sizeof(fd_mask) * NBBY)	/* bits per mask */
      + #ifndef howmany
      + #define	howmany(x, y)	(((x)+((y)-1))/(y))
      + #endif /* howmany */
      + 
      + typedef	struct fd_set {
      + 	fd_mask	fds_bits[howmany(FD_SETSIZE, NFDBITS)];
      + } fd_set;
      + 
      + #define	FD_SET(n, p)	((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
      + #define	FD_CLR(n, p)	((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
      + #define	FD_ISSET(n, p)	((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
      + #define FD_ZERO(p)	memset((char *)(p), '\0', sizeof(*(p)))
      + 
      + #endif /* FD_SET */
        #ifdef __cplusplus
        }
      
      
      
      From python-dev@python.org  Mon Jul 31 16:28:06 2000
      From: python-dev@python.org (Peter Schneider-Kamp)
      Date: Mon, 31 Jul 2000 08:28:06 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Parser intrcheck.c,2.38,2.39
      Message-ID: <200007311528.IAA14517@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Parser
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv14376/Parser
      
      Modified Files:
      	intrcheck.c 
      Log Message:
      
      merge Include/my*.h into Include/pyport.h
      
      marked my*.h as obsolete
      
      
      
      Index: intrcheck.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Parser/intrcheck.c,v
      retrieving revision 2.38
      retrieving revision 2.39
      diff -C2 -r2.38 -r2.39
      *** intrcheck.c	2000/07/25 12:56:38	2.38
      --- intrcheck.c	2000/07/31 15:28:04	2.39
      ***************
      *** 18,22 ****
        #endif
        
      - #include "myproto.h"
        #include "intrcheck.h"
        
      --- 18,21 ----
      
      
      
      From python-dev@python.org  Mon Jul 31 16:28:06 2000
      From: python-dev@python.org (Peter Schneider-Kamp)
      Date: Mon, 31 Jul 2000 08:28:06 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.172,2.173 fmod.c,2.11,2.12 hypot.c,2.2,2.3
      Message-ID: <200007311528.IAA14529@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Python
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv14376/Python
      
      Modified Files:
      	bltinmodule.c fmod.c hypot.c 
      Log Message:
      
      merge Include/my*.h into Include/pyport.h
      
      marked my*.h as obsolete
      
      
      
      Index: bltinmodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v
      retrieving revision 2.172
      retrieving revision 2.173
      diff -C2 -r2.172 -r2.173
      *** bltinmodule.c	2000/07/23 22:21:32	2.172
      --- bltinmodule.c	2000/07/31 15:28:04	2.173
      ***************
      *** 17,22 ****
        #include "eval.h"
        
      - #include "mymath.h"
      - 
        #include 
        
      --- 17,20 ----
      
      Index: fmod.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Python/fmod.c,v
      retrieving revision 2.11
      retrieving revision 2.12
      diff -C2 -r2.11 -r2.12
      *** fmod.c	2000/06/30 23:58:06	2.11
      --- fmod.c	2000/07/31 15:28:04	2.12
      ***************
      *** 13,17 ****
        #include "config.h"
        
      ! #include "mymath.h"
        #include 
        
      --- 13,17 ----
        #include "config.h"
        
      ! #include "pyport.h"
        #include 
        
      
      Index: hypot.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Python/hypot.c,v
      retrieving revision 2.2
      retrieving revision 2.3
      diff -C2 -r2.2 -r2.3
      *** hypot.c	2000/07/22 18:47:25	2.2
      --- hypot.c	2000/07/31 15:28:04	2.3
      ***************
      *** 2,7 ****
        
        #include "config.h"
      ! #include "myproto.h"
      ! #include "mymath.h"
        
        double hypot(double x, double y)
      --- 2,6 ----
        
        #include "config.h"
      ! #include "pyport.h"
        
        double hypot(double x, double y)
      
      
      
      From python-dev@python.org  Mon Jul 31 16:28:06 2000
      From: python-dev@python.org (Peter Schneider-Kamp)
      Date: Mon, 31 Jul 2000 08:28:06 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Objects complexobject.c,2.28,2.29 floatobject.c,2.64,2.65 longobject.c,1.64,1.65 object.c,2.90,2.91 stringobject.c,2.83,2.84 unicodeobject.c,2.52,2.53
      Message-ID: <200007311528.IAA14531@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Objects
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv14376/Objects
      
      Modified Files:
      	complexobject.c floatobject.c longobject.c object.c 
      	stringobject.c unicodeobject.c 
      Log Message:
      
      merge Include/my*.h into Include/pyport.h
      
      marked my*.h as obsolete
      
      
      
      Index: complexobject.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Objects/complexobject.c,v
      retrieving revision 2.28
      retrieving revision 2.29
      diff -C2 -r2.28 -r2.29
      *** complexobject.c	2000/07/09 04:36:04	2.28
      --- complexobject.c	2000/07/31 15:28:04	2.29
      ***************
      *** 18,22 ****
        
        #include "Python.h"
      - #include "mymath.h"
        
        #ifdef HAVE_LIMITS_H
      --- 18,21 ----
      
      Index: floatobject.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v
      retrieving revision 2.64
      retrieving revision 2.65
      diff -C2 -r2.64 -r2.65
      *** floatobject.c	2000/07/09 05:31:24	2.64
      --- floatobject.c	2000/07/31 15:28:04	2.65
      ***************
      *** 17,21 ****
        
        #include 
      - #include "mymath.h"
        
        #ifdef i860
      --- 17,20 ----
      
      Index: longobject.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v
      retrieving revision 1.64
      retrieving revision 1.65
      diff -C2 -r1.64 -r1.65
      *** longobject.c	2000/07/08 04:17:21	1.64
      --- longobject.c	2000/07/31 15:28:04	1.65
      ***************
      *** 15,19 ****
        #include "Python.h"
        #include "longintrepr.h"
      - #include "mymath.h"
        
        #include 
      --- 15,18 ----
      
      Index: object.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v
      retrieving revision 2.90
      retrieving revision 2.91
      diff -C2 -r2.90 -r2.91
      *** object.c	2000/07/25 12:56:38	2.90
      --- object.c	2000/07/31 15:28:04	2.91
      ***************
      *** 17,22 ****
        #endif
        
      - #include "mymath.h"
      - 
        /* just for trashcan: */
        #include "compile.h"
      --- 17,20 ----
      
      Index: stringobject.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v
      retrieving revision 2.83
      retrieving revision 2.84
      diff -C2 -r2.83 -r2.84
      *** stringobject.c	2000/07/16 12:04:31	2.83
      --- stringobject.c	2000/07/31 15:28:04	2.84
      ***************
      *** 13,17 ****
        #include "Python.h"
        
      - #include "mymath.h"
        #include 
        
      --- 13,16 ----
      
      Index: unicodeobject.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v
      retrieving revision 2.52
      retrieving revision 2.53
      diff -C2 -r2.52 -r2.53
      *** unicodeobject.c	2000/07/22 19:25:51	2.52
      --- unicodeobject.c	2000/07/31 15:28:04	2.53
      ***************
      *** 65,69 ****
        #include "Python.h"
        
      - #include "mymath.h"
        #include "unicodeobject.h"
        #include "ucnhash.h"
      --- 65,68 ----
      
      
      
      From python-dev@python.org  Mon Jul 31 16:28:07 2000
      From: python-dev@python.org (Peter Schneider-Kamp)
      Date: Mon, 31 Jul 2000 08:28:07 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Modules _tkinter.c,1.109,1.110 audioop.c,1.40,1.41 cPickle.c,2.48,2.49 cmathmodule.c,2.18,2.19 mathmodule.c,2.51,2.52 posixmodule.c,2.162,2.163 pypcre.c,2.20,2.21 resource.c,2.16,2.17 rotormodule.c,2.28,2.29 selectmodule.c,2.41,2.42 socketmodule.c,1.123,1.124 structmodule.c,2.36,2.37 timemodule.c,2.97,2.98
      Message-ID: <200007311528.IAA14538@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Modules
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv14376/Modules
      
      Modified Files:
      	_tkinter.c audioop.c cPickle.c cmathmodule.c mathmodule.c 
      	posixmodule.c pypcre.c resource.c rotormodule.c selectmodule.c 
      	socketmodule.c structmodule.c timemodule.c 
      Log Message:
      
      merge Include/my*.h into Include/pyport.h
      
      marked my*.h as obsolete
      
      
      
      Index: _tkinter.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v
      retrieving revision 1.109
      retrieving revision 1.110
      diff -C2 -r1.109 -r1.110
      *** _tkinter.c	2000/07/24 14:43:34	1.109
      --- _tkinter.c	2000/07/31 15:28:04	1.110
      ***************
      *** 50,60 ****
        #ifdef macintosh
        #define MAC_TCL
      - #include "myselect.h"
        #endif
        
      - #ifdef PYOS_OS2
      - #include "myselect.h"
      - #endif
      - 
        #include 
        #include 
      --- 50,55 ----
      ***************
      *** 256,261 ****
        #ifdef WITH_THREAD
        #ifndef MS_WINDOWS
      - #include "mytime.h"
      - #include "myselect.h"
        
        /* Millisecond sleep() for Unix platforms. */
      --- 251,254 ----
      
      Index: audioop.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/audioop.c,v
      retrieving revision 1.40
      retrieving revision 1.41
      diff -C2 -r1.40 -r1.41
      *** audioop.c	2000/07/21 06:00:07	1.40
      --- audioop.c	2000/07/31 15:28:04	1.41
      ***************
      *** 32,37 ****
        #endif
        
      - #include "mymath.h"
      - 
        /* Code shamelessly stolen from sox,
        ** (c) Craig Reese, Joe Campbell and Jeff Poskanzer 1989 */
      --- 32,35 ----
      
      Index: cPickle.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v
      retrieving revision 2.48
      retrieving revision 2.49
      diff -C2 -r2.48 -r2.49
      *** cPickle.c	2000/07/24 14:43:34	2.48
      --- cPickle.c	2000/07/31 15:28:04	2.49
      ***************
      *** 55,59 ****
        #include "Python.h"
        #include "cStringIO.h"
      - #include "mymath.h"
        
        #ifndef Py_eval_input
      --- 55,58 ----
      
      Index: cmathmodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/cmathmodule.c,v
      retrieving revision 2.18
      retrieving revision 2.19
      diff -C2 -r2.18 -r2.19
      *** cmathmodule.c	2000/07/24 11:17:40	2.18
      --- cmathmodule.c	2000/07/31 15:28:04	2.19
      ***************
      *** 5,10 ****
        #include "Python.h"
        
      - #include "mymath.h"
      - 
        #ifdef i860
        /* Cray APP has bogus definition of HUGE_VAL in  */
      --- 5,8 ----
      
      Index: mathmodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v
      retrieving revision 2.51
      retrieving revision 2.52
      diff -C2 -r2.51 -r2.52
      *** mathmodule.c	2000/07/21 06:00:07	2.51
      --- mathmodule.c	2000/07/31 15:28:04	2.52
      ***************
      *** 13,18 ****
        #include "Python.h"
        
      - #include "mymath.h"
      - 
        #ifndef _MSC_VER
        #ifndef __STDC__
      --- 13,16 ----
      
      Index: posixmodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
      retrieving revision 2.162
      retrieving revision 2.163
      diff -C2 -r2.162 -r2.163
      *** posixmodule.c	2000/07/26 17:29:12	2.162
      --- posixmodule.c	2000/07/31 15:28:04	2.163
      ***************
      *** 46,51 ****
        #endif
        
      - #include "mytime.h"		/* For clock_t on some systems */
      - 
        #ifdef HAVE_FCNTL_H
        #include 
      --- 46,49 ----
      
      Index: pypcre.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/pypcre.c,v
      retrieving revision 2.20
      retrieving revision 2.21
      diff -C2 -r2.20 -r2.21
      *** pypcre.c	2000/07/16 12:04:31	2.20
      --- pypcre.c	2000/07/31 15:28:04	2.21
      ***************
      *** 48,52 ****
        #include "pcre-int.h"
        #include "Python.h"
      - #include "mymalloc.h"
        #include 
        #include "graminit.h"
      --- 48,51 ----
      
      Index: resource.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/resource.c,v
      retrieving revision 2.16
      retrieving revision 2.17
      diff -C2 -r2.16 -r2.17
      *** resource.c	2000/07/24 16:06:23	2.16
      --- resource.c	2000/07/31 15:28:04	2.17
      ***************
      *** 10,14 ****
        
        #include "Python.h"
      - #include "mytime.h" /* needed for SunOS4.1 */
        #include 
        #include 
      --- 10,13 ----
      
      Index: rotormodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/rotormodule.c,v
      retrieving revision 2.28
      retrieving revision 2.29
      diff -C2 -r2.28 -r2.29
      *** rotormodule.c	2000/07/21 06:00:07	2.28
      --- rotormodule.c	2000/07/31 15:28:04	2.29
      ***************
      *** 57,61 ****
        
        #include "Python.h"
      - #include "mymath.h"
        
        #ifndef TRUE
      --- 57,60 ----
      
      Index: selectmodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v
      retrieving revision 2.41
      retrieving revision 2.42
      diff -C2 -r2.41 -r2.42
      *** selectmodule.c	2000/07/22 23:57:55	2.41
      --- selectmodule.c	2000/07/31 15:28:04	2.42
      ***************
      *** 47,51 ****
        #define SOCKET int
        #else
      - #include "myselect.h" /* Also includes mytime.h */
        #define SOCKET int
        #endif
      --- 47,50 ----
      
      Index: socketmodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
      retrieving revision 1.123
      retrieving revision 1.124
      diff -C2 -r1.123 -r1.124
      *** socketmodule.c	2000/07/25 12:56:37	1.123
      --- socketmodule.c	2000/07/31 15:28:04	1.124
      ***************
      *** 127,131 ****
        
        #include 
      - #include "mytime.h"
        
        #include 
      --- 127,130 ----
      
      Index: structmodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/structmodule.c,v
      retrieving revision 2.36
      retrieving revision 2.37
      diff -C2 -r2.36 -r2.37
      *** structmodule.c	2000/07/21 06:00:07	2.36
      --- structmodule.c	2000/07/31 15:28:04	2.37
      ***************
      *** 40,44 ****
        
        #include "Python.h"
      - #include "mymath.h"
        
        #include 
      --- 40,43 ----
      
      Index: timemodule.c
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v
      retrieving revision 2.97
      retrieving revision 2.98
      diff -C2 -r2.97 -r2.98
      *** timemodule.c	2000/07/25 12:56:37	2.97
      --- timemodule.c	2000/07/31 15:28:04	2.98
      ***************
      *** 15,22 ****
        #include 
        
      - #ifdef HAVE_SELECT
      - #include "mymath.h"
      - #endif
      - 
        #ifdef macintosh
        #include 
      --- 15,18 ----
      ***************
      *** 39,48 ****
        #ifdef HAVE_UNISTD_H
        #include 
      - #endif
      - 
      - #if defined(HAVE_SELECT) && !defined(__BEOS__)
      - #include "myselect.h"
      - #else
      - #include "mytime.h"
        #endif
        
      --- 35,38 ----
      
      
      
      From python-dev@python.org  Mon Jul 31 16:45:49 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Mon, 31 Jul 2000 08:45:49 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libshutil.tex,1.5,1.6
      Message-ID: <200007311545.IAA16086@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Doc/lib
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv16079/lib
      
      Modified Files:
      	libshutil.tex 
      Log Message:
      
      Moshe Zadka :
      Document new method in shutil (copyfileobj).
      Minor clarification by Fred.
      
      
      Index: libshutil.tex
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/lib/libshutil.tex,v
      retrieving revision 1.5
      retrieving revision 1.6
      diff -C2 -r1.5 -r1.6
      *** libshutil.tex	1999/11/09 18:03:00	1.5
      --- libshutil.tex	2000/07/31 15:45:46	1.6
      ***************
      *** 24,27 ****
      --- 24,36 ----
        \end{funcdesc}
        
      + \begin{funcdesc}{copyfileobj}{fsrc, fdst\optional{, length}}
      +   Copy the contents of the file-like object \var{fsrc} to the
      +   file-like object \var{fdst}.  The integer \var{length}, if given,
      +   is the buffer size. In particular, a negative \var{length} value
      +   means to copy the data without looping over the source data in
      +   chunks; by default the data is read in chunks to avoid uncontrolled
      +   memory consumption.
      + \end{funcdesc}
      + 
        \begin{funcdesc}{copymode}{src, dst}
          Copy the permission bits from \var{src} to \var{dst}.  The file
      
      
      
      From python-dev@python.org  Mon Jul 31 16:52:48 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Mon, 31 Jul 2000 08:52:48 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.11,1.12
      Message-ID: <200007311552.IAA16575@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv16561
      
      Modified Files:
      	pep-0201.txt 
      Log Message:
      Integrated many suggestions from c.l.py and others.  Nothing
      substantial w.r.t. the proposed solution, just clarifications,
      additional references, and an explanation of why most syntax changes
      don't work.
      
      
      Index: pep-0201.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v
      retrieving revision 1.11
      retrieving revision 1.12
      diff -C2 -r1.11 -r1.12
      *** pep-0201.txt	2000/07/28 05:48:25	1.11
      --- pep-0201.txt	2000/07/31 15:52:45	1.12
      ***************
      *** 11,22 ****
        Introduction
        
      !     This PEP describes the `lockstep iteration' proposal for Python
      !     2.0.  This PEP tracks the status and ownership of this feature,
      !     slated for introduction in Python 2.0.  It contains a description
      !     of the feature and outlines changes necessary to support the
      !     feature.  This PEP summarizes discussions held in mailing list
      !     forums, and provides URLs for further information, where
      !     appropriate.  The CVS revision history of this file contains the
      !     definitive historical record.
        
        
      --- 11,22 ----
        Introduction
        
      !     This PEP describes the `lockstep iteration' proposal.  This PEP
      !     tracks the status and ownership of this feature, slated for
      !     introduction in Python 2.0.  It contains a description of the
      !     feature and outlines changes necessary to support the feature.
      !     This PEP summarizes discussions held in mailing list forums, and
      !     provides URLs for further information, where appropriate.  The CVS
      !     revision history of this file contains the definitive historical
      !     record.
        
        
      ***************
      *** 26,37 ****
            sequence until the sequence is exhausted[1].  However, for-loops
            iterate over only a single sequence, and it is often desirable to
      !     loop over more than one sequence, in a lock-step, "Chinese Menu"
      !     type of way.
        
      -     The common idioms used to accomplish this are unintuitive and
      -     inflexible.  This PEP proposes a standard way of performing such
      -     iterations by introducing a new builtin function called `zip'.
      - 
      - 
        Lockstep For-Loops
        
      --- 26,41 ----
            sequence until the sequence is exhausted[1].  However, for-loops
            iterate over only a single sequence, and it is often desirable to
      !     loop over more than one sequence in a lock-step fashion.  In other
      !     words, in a way such that nthe i-th iteration through the loop
      !     returns an object containing the i-th element from each sequence.
      ! 
      !     The common idioms used to accomplish this are unintuitive.  This
      !     PEP proposes a standard way of performing such iterations by
      !     introducing a new builtin function called `zip'.
      ! 
      !     While the primary motivation for zip() comes from lock-step
      !     iteration, by implementing zip() as a built-in function, it has
      !     additional utility in contexts other than for-loops.
        
        Lockstep For-Loops
        
      ***************
      *** 71,81 ****
        
            For these reasons, several proposals were floated in the Python
      !     2.0 beta time frame for providing a better spelling of lockstep
      !     for-loops.  The initial proposals centered around syntactic
      !     changes to the for statement, but conflicts and problems with the
      !     syntax were unresolvable, especially when lockstep for-loops were
      !     combined with another proposed feature called `list
      !     comprehensions' (see pep-0202.txt).
        
        
        The Proposed Solution
      --- 75,92 ----
        
            For these reasons, several proposals were floated in the Python
      !     2.0 beta time frame for syntactic support of lockstep for-loops.
      !     Here are two suggestions:
      ! 
      !     for x in seq1, y in seq2:
      !         # stuff
      ! 
      !     for x, y in seq1, seq2:
      !         # stuff
        
      +     Neither of these forms would work, since they both already mean
      +     something in Python and changing the meanings would break existing
      +     code.  All other suggestions for new syntax suffered the same
      +     problem, or were in conflict with other another proposed feature
      +     called `list comprehensions' (see pep-0202.txt).
        
        The Proposed Solution
      ***************
      *** 207,211 ****
            [2] http://www.haskell.org/onlinereport/standard-prelude.html#$vzip
        
      !     TBD: URL to python-dev archives
        
        
      --- 218,223 ----
            [2] http://www.haskell.org/onlinereport/standard-prelude.html#$vzip
        
      !     Greg Wilson's questionaire on proposed syntax to some CS grad students
      !     http://www.python.org/pipermail/python-dev/2000-July/013139.html
        
        
      
      
      
      From python-dev@python.org  Mon Jul 31 16:55:24 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Mon, 31 Jul 2000 08:55:24 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Doc/html Makefile,1.32,1.33
      Message-ID: <200007311555.IAA16837@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Doc/html
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv16829/html
      
      Modified Files:
      	Makefile 
      Log Message:
      
      Always pass the split level to LaTeX2HTML as a command line option since
      newer versions only process one initialization file, and do so at a
      different time than previous versions.
      
      
      Index: Makefile
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/html/Makefile,v
      retrieving revision 1.32
      retrieving revision 1.33
      diff -C2 -r1.32 -r1.33
      *** Makefile	2000/04/28 17:03:26	1.32
      --- Makefile	2000/07/31 15:55:22	1.33
      ***************
      *** 70,74 ****
        
        api/api.html:  $(PAPERDIR)/api.aux $(BUILDINDEX) $(TOOLSDIR)/mkhtml.sh
      ! 	$(MKHTML) api $(L2HARGS)
        
        doc/doc.html:  $(DOCFILES) $(BUILDINDEX) $(TOPDIR)/perl/ltxmarkup.perl
      --- 70,74 ----
        
        api/api.html:  $(PAPERDIR)/api.aux $(BUILDINDEX) $(TOOLSDIR)/mkhtml.sh
      ! 	$(MKHTML) api $(L2HARGS) -split 5
        
        doc/doc.html:  $(DOCFILES) $(BUILDINDEX) $(TOPDIR)/perl/ltxmarkup.perl
      ***************
      *** 77,86 ****
        
        ext/ext.html:  $(PAPERDIR)/ext.aux $(TOOLSDIR)/mkhtml.sh
      ! 	$(MKHTML) ext $(L2HARGS)
        
        lib/lib.html:  $(PAPERDIR)/lib.aux $(BUILDINDEX) $(TOOLSDIR)/mkhtml.sh
        	$(TOOLSDIR)/fix_libaux.sed <`$(KPSEWHICH) lib.aux` >lib1.aux
        	mv lib1.aux `$(KPSEWHICH) lib.aux`
      ! 	$(MKHTML) lib $(L2HARGS)
        
        mac/mac.html:  $(MACFILES) $(BUILDINDEX)
      --- 77,86 ----
        
        ext/ext.html:  $(PAPERDIR)/ext.aux $(TOOLSDIR)/mkhtml.sh
      ! 	$(MKHTML) ext $(L2HARGS) -split 5
        
        lib/lib.html:  $(PAPERDIR)/lib.aux $(BUILDINDEX) $(TOOLSDIR)/mkhtml.sh
        	$(TOOLSDIR)/fix_libaux.sed <`$(KPSEWHICH) lib.aux` >lib1.aux
        	mv lib1.aux `$(KPSEWHICH) lib.aux`
      ! 	$(MKHTML) lib $(L2HARGS) -split 5
        
        mac/mac.html:  $(MACFILES) $(BUILDINDEX)
      ***************
      *** 89,93 ****
        
        ref/ref.html:  $(PAPERDIR)/ref.aux $(BUILDINDEX) $(TOOLSDIR)/mkhtml.sh
      ! 	$(MKHTML) ref $(L2HARGS)
        
        tut/tut.html:  $(PAPERDIR)/tut.aux $(TOOLSDIR)/mkhtml.sh
      --- 89,93 ----
        
        ref/ref.html:  $(PAPERDIR)/ref.aux $(BUILDINDEX) $(TOOLSDIR)/mkhtml.sh
      ! 	$(MKHTML) ref $(L2HARGS) -split 5
        
        tut/tut.html:  $(PAPERDIR)/tut.aux $(TOOLSDIR)/mkhtml.sh
      
      
      
      From python-dev@python.org  Mon Jul 31 17:34:53 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Mon, 31 Jul 2000 09:34:53 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libstdtypes.tex,1.23,1.24
      Message-ID: <200007311634.JAA27188@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Doc/lib
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv27177/lib
      
      Modified Files:
      	libstdtypes.tex 
      Log Message:
      
      Two minor nits from Gerry Weiner (no working email address) about
      describing the methods of dictionaries.
      
      
      Index: libstdtypes.tex
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v
      retrieving revision 1.23
      retrieving revision 1.24
      diff -C2 -r1.23 -r1.24
      *** libstdtypes.tex	2000/06/30 16:06:19	1.23
      --- libstdtypes.tex	2000/07/31 16:34:46	1.24
      ***************
      *** 570,575 ****
          \lineiii{len(\var{a})}{the number of items in \var{a}}{}
          \lineiii{\var{a}[\var{k}]}{the item of \var{a} with key \var{k}}{(1)}
      !   \lineiii{\var{a}[\var{k}] = \var{x}}
      !           {set \code{\var{a}[\var{k}]} to \var{x}}
                  {}
          \lineiii{del \var{a}[\var{k}]}
      --- 570,575 ----
          \lineiii{len(\var{a})}{the number of items in \var{a}}{}
          \lineiii{\var{a}[\var{k}]}{the item of \var{a} with key \var{k}}{(1)}
      !   \lineiii{\var{a}[\var{k}] = \var{v}}
      !           {set \code{\var{a}[\var{k}]} to \var{v}}
                  {}
          \lineiii{del \var{a}[\var{k}]}
      ***************
      *** 586,590 ****
          \lineiii{\var{a}.keys()}{a copy of \var{a}'s list of keys}{(2)}
          \lineiii{\var{a}.update(\var{b})}
      !           {\code{for k, v in \var{b}.items(): \var{a}[k] = v}}
                  {(3)}
          \lineiii{\var{a}.values()}{a copy of \var{a}'s list of values}{(2)}
      --- 586,590 ----
          \lineiii{\var{a}.keys()}{a copy of \var{a}'s list of keys}{(2)}
          \lineiii{\var{a}.update(\var{b})}
      !           {\code{for k in \var{b}.keys(): \var{a}[k] = \var{b}[k]}}
                  {(3)}
          \lineiii{\var{a}.values()}{a copy of \var{a}'s list of values}{(2)}
      
      
      
      From python-dev@python.org  Mon Jul 31 17:38:15 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Mon, 31 Jul 2000 09:38:15 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.15,1.16
      Message-ID: <200007311638.JAA27412@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv27404
      
      Modified Files:
      	pep-0000.txt 
      Log Message:
      PEP 211 renamed to "Adding New Linear Algebra Operators" at request of
      gvwilson.  More accurately describes the narrower focus.
      
      
      Index: pep-0000.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v
      retrieving revision 1.15
      retrieving revision 1.16
      diff -C2 -r1.15 -r1.16
      *** pep-0000.txt	2000/07/31 15:06:47	1.15
      --- pep-0000.txt	2000/07/31 16:38:12	1.16
      ***************
      *** 32,36 ****
             209  pep-0209.txt  Adding Multidimensional Arrays       davida
             210  pep-0210.txt  Decoupling the Interpreter Loop      davida
      !      211  pep-0211.txt  Adding New Operators to Python       gvwilson
             212  pep-0212.txt  Additional Builtin Generators        bwarsaw
             213  pep-0213.txt  Attribute Access Handlers            prescod
      --- 32,36 ----
             209  pep-0209.txt  Adding Multidimensional Arrays       davida
             210  pep-0210.txt  Decoupling the Interpreter Loop      davida
      !      211  pep-0211.txt  Adding New Linear Algebra Operators  gvwilson
             212  pep-0212.txt  Additional Builtin Generators        bwarsaw
             213  pep-0213.txt  Attribute Access Handlers            prescod
      
      
      
      From python-dev@python.org  Mon Jul 31 17:52:55 2000
      From: python-dev@python.org (Barry Warsaw)
      Date: Mon, 31 Jul 2000 09:52:55 -0700
      Subject: [Python-checkins] CVS: python/nondist/peps pep-0201.txt,1.12,1.13
      Message-ID: <200007311652.JAA28497@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/nondist/peps
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv28484
      
      Modified Files:
      	pep-0201.txt 
      Log Message:
      Added a BDFL justification to why there's no optional pad argument.
      
      
      Index: pep-0201.txt
      ===================================================================
      RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v
      retrieving revision 1.12
      retrieving revision 1.13
      diff -C2 -r1.12 -r1.13
      *** pep-0201.txt	2000/07/31 15:52:45	1.12
      --- pep-0201.txt	2000/07/31 16:52:52	1.13
      ***************
      *** 189,193 ****
              behavior to the map(None, ...) semantics except that the user
              would be able to specify pad object.  This has been rejected by
      !       the BDFL in favor of always truncating to the shortest sequence.
        
            - Lazy evaluation.  An earlier version of this PEP proposed that
      --- 189,196 ----
              behavior to the map(None, ...) semantics except that the user
              would be able to specify pad object.  This has been rejected by
      !       the BDFL in favor of always truncating to the shortest sequence,
      !       because of the KISS principle.  If there's a true need, it is
      !       easier to add later.  If it is not needed, it would still be
      !       impossible to delete it in the future.
        
            - Lazy evaluation.  An earlier version of this PEP proposed that
      
      
      
      From python-dev@python.org  Mon Jul 31 18:47:52 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Mon, 31 Jul 2000 10:47:52 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Doc/tools mkhowto,1.10,1.11 mkhtml.sh,1.12,1.13
      Message-ID: <200007311747.KAA07621@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Doc/tools
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv7610/tools
      
      Modified Files:
      	mkhowto mkhtml.sh 
      Log Message:
      
      Small changes to reflect changes in LaTeX2HTML support for newer versions
      of LaTeX2HTML.
      
      
      Index: mkhowto
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkhowto,v
      retrieving revision 1.10
      retrieving revision 1.11
      diff -C2 -r1.10 -r1.11
      *** mkhowto	2000/07/24 23:03:32	1.10
      --- mkhowto	2000/07/31 17:47:49	1.11
      ***************
      *** 362,372 ****
            def write_l2h_aux_init_file(self):
                fp = open(self.l2h_aux_init_file, "w")
                fp.write(open(L2H_INIT_FILE).read())
                fp.write("\n"
                         "# auxillary init file for latex2html\n"
                         "# generated by mkhowto\n"
      -                  "push (@INC, '%s');\n"
                         "$NO_AUTO_LINK = 1;\n"
      -                  % os.path.dirname(L2H_INIT_FILE)
                         )
                options = self.options
      --- 362,375 ----
            def write_l2h_aux_init_file(self):
                fp = open(self.l2h_aux_init_file, "w")
      +         d = string_to_perl(os.path.dirname(L2H_INIT_FILE))
      +         fp.write("package main;\n"
      +                  "push (@INC, '%s');\n"
      +                  "$mydir = '%s';\n"
      +                  % (d, d))
                fp.write(open(L2H_INIT_FILE).read())
                fp.write("\n"
                         "# auxillary init file for latex2html\n"
                         "# generated by mkhowto\n"
                         "$NO_AUTO_LINK = 1;\n"
                         )
                options = self.options
      
      Index: mkhtml.sh
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkhtml.sh,v
      retrieving revision 1.12
      retrieving revision 1.13
      diff -C2 -r1.12 -r1.13
      *** mkhtml.sh	2000/04/03 04:19:14	1.12
      --- mkhtml.sh	2000/07/31 17:47:49	1.13
      ***************
      *** 32,36 ****
        fi
        
      ! echo "latex2html -init_file $srcdir/perl/l2hinit.perl -dir $part" \
         "${1:+$@} $srcdir/$part/$part.tex"
        latex2html \
      --- 32,38 ----
        fi
        
      ! echo "latex2html -no_auto_link" \
      !  "-up_url '../index.html' -up_title 'Documentation Index'" \
      !  "-init_file $srcdir/perl/l2hinit.perl -dir $part" \
         "${1:+$@} $srcdir/$part/$part.tex"
        latex2html \
      
      
      
      From python-dev@python.org  Mon Jul 31 18:53:48 2000
      From: python-dev@python.org (Fred L. Drake)
      Date: Mon, 31 Jul 2000 10:53:48 -0700
      Subject: [Python-checkins] CVS: python/dist/src/Doc/perl l2hinit.perl,1.42,1.43
      Message-ID: <200007311753.KAA08137@slayer.i.sourceforge.net>
      
      Update of /cvsroot/python/python/dist/src/Doc/perl
      In directory slayer.i.sourceforge.net:/tmp/cvs-serv8122/perl
      
      Modified Files:
      	l2hinit.perl 
      Log Message:
      
      Many changes to work with newer versions of LaTeX2HTML.  This has been 
      tested with version 99.2beta8.
      
      
      Index: l2hinit.perl
      ===================================================================
      RCS file: /cvsroot/python/python/dist/src/Doc/perl/l2hinit.perl,v
      retrieving revision 1.42
      retrieving revision 1.43
      diff -C2 -r1.42 -r1.43
      *** l2hinit.perl	2000/04/03 04:41:18	1.42
      --- l2hinit.perl	2000/07/31 17:53:45	1.43
      ***************
      *** 1,21 ****
      ! #LaTeX2HTML Version 96.1 : dot.latex2html-init		-*- perl -*-
      ! #
      ! #  Significantly revised by Fred L. Drake, Jr.  for use
      ! #  with the Python documentation.
      ! #
      ! #  New name to avoid distributing "dot" files with the Python documentation.
      ! #
      ! 
      ! package Override;
      ! 
      ! use Cwd qw(getcwd);
      ! 
        
        package main;
        
        $HTML_VERSION = 4.0;
        
        $MAX_LINK_DEPTH = 2;
      - $MAX_SPLIT_DEPTH = 5;      # split at subsections but not sub-subsections
        $ADDRESS = '';
        
      --- 1,11 ----
      ! # LaTeX2HTML support base for use with Python documentation.
        
        package main;
        
      + use L2hos;
      + 
        $HTML_VERSION = 4.0;
        
        $MAX_LINK_DEPTH = 2;
        $ADDRESS = '';
        
      ***************
      *** 35,41 ****
        $AUTO_NAVIGATION = 0;
        
      - $SUPPRESS_CONTENTS = 0;
      - $SUPPRESS_INDEXES = 0;
      - 
        # these exactly match the python.org colors
        $BODYTEXT = ('bgcolor="#ffffff" text="#000000"'
      --- 25,28 ----
      ***************
      *** 50,61 ****
        
        # A little painful, but lets us clean up the top level directory a little,
      ! # and not be tied to the current directory (as far as I can tell).
      ! #
      ! use Cwd;
      ! use File::Basename;
      ! ($myname, $mydir, $myext) = fileparse(__FILE__, '\..*');
      ! chop $mydir;			# remove trailing '/'
      ! $mydir = getcwd() . "$dd$mydir"
      !   unless $mydir =~ s|^/|/|;
        $LATEX2HTMLSTYLES = "$mydir$envkey$LATEX2HTMLSTYLES";
        push (@INC, $mydir);
      --- 37,54 ----
        
        # A little painful, but lets us clean up the top level directory a little,
      ! # and not be tied to the current directory (as far as I can tell).  Testing
      ! # an existing definition of $mydir is needed since it cannot be computed when
      ! # run under mkhowto with recent versions of LaTeX2HTML, since this file is
      ! # not read directly by LaTeX2HTML any more.  mkhowto is required to prepend
      ! # the required definition at the top of the actual input file.
      ! #
      ! if (!defined $mydir) {
      !     use Cwd;
      !     use File::Basename;
      !     ($myname, $mydir, $myext) = fileparse(__FILE__, '\..*');
      !     chop $mydir;			# remove trailing '/'
      !     $mydir = getcwd() . "$dd$mydir"
      !         unless $mydir =~ s|^/|/|;
      ! }
        $LATEX2HTMLSTYLES = "$mydir$envkey$LATEX2HTMLSTYLES";
        push (@INC, $mydir);
      ***************
      *** 85,89 ****
        
        
      ! sub custom_driver_hook{
            #
            # This adds the directory of the main input file to $TEXINPUTS; it
      --- 78,82 ----
        
        
      ! sub custom_driver_hook {
            #
            # This adds the directory of the main input file to $TEXINPUTS; it
      ***************
      *** 92,153 ****
            #
            my $file = @_[0];
      !     my($jobname,$dir,$ext) = fileparse($file, '\..*');
      !     $dir = make_directory_absolute($dir);
            $dir =~ s/$dd$//;
            $TEXINPUTS = "$dir$envkey$mytexinputs";
      !     print "\nadding $dir to \$TEXINPUTS\n";
        }
        
      - # Defining this allows us to remove all table of contents and index
      - # processing using an init file; this is required to get rid of the
      - # Table of Contents or we'd get a blank page.  Based on a suggestion
      - # from Ross Moore .
      - #
      - # Seems to require a more recent version of LaTeX2HTML than I've
      - # been using, though.
      - #
      - sub preprocess{
      -     if ($SUPPRESS_CONTENTS) {
      - 	s/\\(tableofcontents|listof(figures|tables))/\2/g;
      -     }
      -     if ($SUPPRESS_INDEXES) {
      - 	s/\\(print|make)index//g;
      -     }
      - }
      - 
        
      ! sub set_icon_size{
      !     my($name, $w, $h) = @_;
      !     $iconsizes{$name} = "width=$w height=$h";
      ! }
      ! 
      ! foreach $name (split(/ /, 'up next previous contents index modules blank')) {
      !     set_icon_size($name, 32, 32);
      ! }
      ! sub adjust_icon_information{
      !     # The '_motif' is really annoying, and makes the HTML larger with no value
      !     # added, so strip it off:
      !     foreach $name (keys %icons) {
      !         my $icon = $icons{$name};
      !         # Strip off the wasteful '_motif':
      !         $icon =~ s/_motif//;
      !         # Change the greyed-out icons to be blank:
      !         $icon =~ s/[a-z]*_gr[.]/blank./;
      !         # make sure we're using the latest $IMAGE_TYPE
      !         $icon =~ s/[.](gif|png)$/.$IMAGE_TYPE/;
      !         $icons{$name} = $icon;
      !     }
      !     $icons{'blank'} = 'blank.' . $IMAGE_TYPE;
      !     
      !     $CUSTOM_BUTTONS = '';
      !     $BLANK_ICON = "\n" . img_tag('blank.' . $IMAGE_TYPE) . "";
      !     $BLANK_ICON =~ s/alt="blank"/alt=""/;
      !     $NAV_BGCOLOR = " bgcolor=\"#99CCFF\"";
      ! }
      ! 
      ! adjust_icon_information();
        
      ! 
      ! sub make_nav_sectref{
            my($label,$title) = @_;
            if ($title) {
      --- 85,100 ----
            #
            my $file = @_[0];
      !     my($jobname, $dir, $ext) = fileparse($file, '\..*');
      !     $dir = L2hos->Make_directory_absolute($dir);
            $dir =~ s/$dd$//;
            $TEXINPUTS = "$dir$envkey$mytexinputs";
      !     print "\nAdding $dir to \$TEXINPUTS\n";
        }
        
        
      ! $CUSTOM_BUTTONS = '';
      ! $NAV_BGCOLOR = " bgcolor=\"#99CCFF\"";
        
      ! sub make_nav_sectref {
            my($label,$title) = @_;
            if ($title) {
      ***************
      *** 157,198 ****
            return '';
        }
        
      ! sub make_nav_panel{
            my $s;
      !     $s = ""
      !          . "\n"
      ! 	 . "\n"
      ! 	 . "\n"
      ! 	 . "\n";
      !     if ($SUPPRESS_CONTENTS && $SUPPRESS_INDEXES) {
      ! 	$s .= ("\n");
      !     }
      !     else {
      ! 	$s .= ("\n"
      ! 	       . ($CONTENTS ? "\n" : $BLANK_ICON)
      ! 	       . "\n" # module index
      ! 	       . ($INDEX ? "\n" : $BLANK_ICON));
      !     }
      !     $s .= ("\n
      $NEXT$UP$PREVIOUS" ! . "\n $t_title\ \ \ " ! . "\n $t_title$CONTENTS$CUSTOM_BUTTONS$INDEX
      " ! . make_nav_sectref("Next", $NEXT_TITLE) ! . make_nav_sectref("Up", $UP_TITLE) ! . make_nav_sectref("Previous", $PREVIOUS_TITLE)); ! # remove these; they are unnecessary and cause error from validation ! $s =~ s/ NAME="tex2html\d+"\n//g; return $s; } sub top_navigation_panel { ! "'; } sub bot_navigation_panel { ! "

      \n

      '; } --- 104,181 ---- return ''; } + + sub make_my_icon { + my($name, $text) = @_; + my $iconserver = ($ICONSERVER eq '.') ? '' : "$ICONSERVER/"; + return "\"$text\""; + } + + $BLANK_ICON = make_my_icon("blank", ""); + + @my_icons = (); + $my_icons{'next_page_inactive'} = $BLANK_ICON; + $my_icons{'previous_page_inactive'} = $BLANK_ICON; + $my_icons{'up_page_inactive'} = $BLANK_ICON; + $x = make_my_icon("next", "Next Page"); + $my_icons{'next_page'} = $x; + $my_icons{'next'} = $x; + $x = make_my_icon("previous", "Previous Page"); + $my_icons{'previous_page'} = $x; + $my_icons{'previous'} = $x; + $my_icons{'up'} = make_my_icon("up", "Up One Level"); + $my_icons{'contents'} = make_my_icon("contents", "Contents"); + $my_icons{'index'} = make_my_icon("index", "Index"); + $my_icons{'modules'} = make_my_icon("modules", "Module Index"); + + + sub use_my_icon { + my $s = @_[0]; + $s =~ s/\/$my_icons{$1}/; + return $s; + } ! sub make_nav_panel { my $s; ! $NEXT = use_my_icon("$NEXT"); ! $UP = use_my_icon("$UP"); ! $PREVIOUS = use_my_icon("$PREVIOUS"); ! $CONTENTS = use_my_icon("$CONTENTS"); ! $INDEX = $INDEX ? use_my_icon("$INDEX") : $BLANK_ICON; ! if (!$CUSTOM_BUTTONS) { ! $CUSTOM_BUTTONS = $BLANK_ICON; ! } ! $s = ('' ! . "\n" ! # left-hand side ! . "\n" ! . "\n" ! . "\n" ! # title box ! . "\n" ! # right-hand side ! . "\n" ! . "\n" # module index ! . "\n" ! . "\n
      $NEXT$UP$PREVIOUS" ! . "\n $t_title$CONTENTS$CUSTOM_BUTTONS$INDEX
      \n" ! # textual navigation ! . make_nav_sectref("Next", $NEXT_TITLE) ! . make_nav_sectref("Up", $UP_TITLE) ! . make_nav_sectref("Previous", $PREVIOUS_TITLE)); ! # remove these; they are unnecessary and cause errors from validation ! $s =~ s/ NAME="tex2html\d+"\n */ /g; return $s; } + sub top_navigation_panel { ! return make_nav_panel() ! . '

      '; } sub bot_navigation_panel { ! return "


      " ! . make_nav_panel(); } *************** *** 202,205 **** --- 185,189 ---- my($dummy, $file, $title) = split($delim, $section_info{join(' ',@link)}); + $icon =~ s/\/$my_icons{$1}/; if ($title && ($file ne $current_file)) { $title = purify($title); *************** *** 207,280 **** return (make_href($file, $icon), make_href($file, "$title")) } ! elsif ($icon eq $up_visible_mark && $EXTERNAL_UP_LINK) { return (make_href($EXTERNAL_UP_LINK, $icon), make_href($EXTERNAL_UP_LINK, "$EXTERNAL_UP_TITLE")) } ! elsif (($icon eq $previous_visible_mark ! || $icon eq $previous_page_visible_mark) && $EXTERNAL_PREV_LINK && $EXTERNAL_PREV_TITLE) { return (make_href($EXTERNAL_PREV_LINK, $icon), make_href($EXTERNAL_PREV_LINK, "$EXTERNAL_PREV_TITLE")) } ! elsif (($icon eq $next_visible_mark ! || $icon eq $next_page_visible_mark) && $EXTERNAL_DOWN_LINK && $EXTERNAL_DOWN_TITLE) { return (make_href($EXTERNAL_DOWN_LINK, $icon), make_href($EXTERNAL_DOWN_LINK, "$EXTERNAL_DOWN_TITLE")) } ! (&inactive_img($icon), ""); } sub add_special_link { my($icon, $file, $current_file) = @_; ! (($file && ($file ne $current_file)) ? make_href($file, $icon) : undef) } ! sub img_tag { ! local($icon) = @_; ! my $alt; ! my $align = " align=bottom "; ! ! # having this list hardcoded here is really bogus.... ! $alt = join('|', 'up', 'next_group', 'previous_group' ! , 'next', 'previous', 'change_begin_right', 'change_begin' ! , 'change_end_right', 'change_end', 'change_delete_right' ! , 'change_delete', 'contents', 'index', 'modules', 'blank'); ! ! if ($icon =~ /(gif|png)$/) { ! $used_icons{$icon} = 1; ! if ($icon =~ /change_(begin|end|delete)_right/) { $align = ' ' }; ! my $nav_border = "$NAV_BORDER"; ! if ($icon =~ /($alt)/) { ! $alt = $1; ! $alt = "" ! if ($alt eq "blank"); ! } ! else { ! $nav_border = '1'; ! $alt = '[*]'; ! }; ! if ($LOCAL_ICONS) { ! return join('', '', $alt
! 			,'' ); ! } ! my $s = join('', '', $alt, ' ); ! # if $ICONSERVER starts with "./", remove "./": ! $s =~ s|src="(.\/)+|src="|; ! return $s; ! } ! else { ! return $icon; ! } ! } ! sub do_cmd_arabic { # get rid of that nasty ... ! local($ctr, $val, $id, $_) = &read_counter_value(@_[0]); ! return ($val ? &farabic($val) : "0") . $_; } --- 191,231 ---- return (make_href($file, $icon), make_href($file, "$title")) } ! elsif ($icon eq $my_icons{"up"} && $EXTERNAL_UP_LINK) { return (make_href($EXTERNAL_UP_LINK, $icon), make_href($EXTERNAL_UP_LINK, "$EXTERNAL_UP_TITLE")) } ! elsif ($icon eq $my_icons{"previous"} && $EXTERNAL_PREV_LINK && $EXTERNAL_PREV_TITLE) { return (make_href($EXTERNAL_PREV_LINK, $icon), make_href($EXTERNAL_PREV_LINK, "$EXTERNAL_PREV_TITLE")) } ! elsif ($icon eq $my_icons{"next"} && $EXTERNAL_DOWN_LINK && $EXTERNAL_DOWN_TITLE) { return (make_href($EXTERNAL_DOWN_LINK, $icon), make_href($EXTERNAL_DOWN_LINK, "$EXTERNAL_DOWN_TITLE")) } ! return (&inactive_img($icon), ""); } sub add_special_link { my($icon, $file, $current_file) = @_; ! $icon =~ s/\/$my_icons{$1}/; ! return (($file && ($file ne $current_file)) ! ? make_href($file, $icon) ! : undef) } ! # The img_tag() function seems only to be called with the parameter ! # 'anchor_invisible_mark', which we want to turn into ''. Since ! # replace_icon_marks() is the only interesting caller, and all it really ! # does is call img_tag(), we can just define the hook alternative to be ! # a no-op instead. ! # ! sub replace_icons_hook {} sub do_cmd_arabic { # get rid of that nasty ... ! my($ctr, $val, $id, $text) = &read_counter_value(@_[0]); ! return ($val ? farabic($val) : "0") . $text; } *************** *** 286,290 **** } ! sub insert_index{ my($mark,$datafile,$columns,$letters,$prefix) = @_; my $prog = "$myrootdir/tools/buildindex.py"; --- 237,241 ---- } ! sub insert_index { my($mark,$datafile,$columns,$letters,$prefix) = @_; my $prog = "$myrootdir/tools/buildindex.py"; *************** *** 299,303 **** } ! sub add_idx{ print "\nBuilding HTML for the index ..."; close(IDXFILE); --- 250,254 ---- } ! sub add_idx { print "\nBuilding HTML for the index ..."; close(IDXFILE); *************** *** 309,313 **** $idx_module_title = 'Module Index'; ! sub add_module_idx{ print "\nBuilding HTML for the module index ..."; my $key; --- 260,264 ---- $idx_module_title = 'Module Index'; ! sub add_module_idx { print "\nBuilding HTML for the module index ..."; my $key; *************** *** 357,361 **** # replace both indexes as needed: ! sub add_idx_hook{ add_idx() if (/$idx_mark/); add_module_idx() if (/$idx_module_mark/); --- 308,312 ---- # replace both indexes as needed: ! sub add_idx_hook { add_idx() if (/$idx_mark/); add_module_idx() if (/$idx_module_mark/); *************** *** 368,374 **** sub do_cmd_tableofcontents { local($_) = @_; - # if ($SUPPRESS_CONTENTS) { - # return $_; - # } $TITLE = $toc_title; $tocfile = $CURRENT_FILE; --- 319,322 ---- *************** *** 466,494 **** s/([\\]begin\s*$O\d+$C\s*thebibliography)/$bbl_cnt++; $1/eg; s/([\\]begin\s*$O\d+$C\s*thebibliography)/$id++; "\\bibliography$O$id$C$O$id$C $1"/geo; ! #---------------------------------------------------------------------- ! # (FLD) This was added ! if ($SUPPRESS_INDEXES) { ! $CUSTOM_BUTTONS .= img_tag('blank.' . $IMAGE_TYPE); } else { ! my(@parts) = split(/\\begin\s*$O\d+$C\s*theindex/); ! if (scalar(@parts) == 3) { ! # Be careful to re-write the string in place, since $_ is *not* ! # returned explicity; *** nasty side-effect dependency! *** ! print "\nadd_bbl_and_idx_dummy_commands ==> adding module index"; ! my $rx = "([\\\\]begin\\s*$O\\d+$C\\s*theindex[\\s\\S]*)" ! . "([\\\\]begin\\s*$O\\d+$C\\s*theindex)"; ! s/$rx/\\textohtmlmoduleindex \1 \\textohtmlindex \2/o; ! # Add a button to the navigation areas: ! $CUSTOM_BUTTONS .= ("" ! . img_tag('modules.'.$IMAGE_TYPE) . ""); ! } ! else { ! $CUSTOM_BUTTONS .= img_tag('blank.' . $IMAGE_TYPE); ! $global{'max_id'} = $id; # not sure why.... ! s/([\\]begin\s*$O\d+$C\s*theindex)/\\textohtmlindex $1/o; s/[\\]printindex/\\textohtmlindex /o; } - } #---------------------------------------------------------------------- lib_add_bbl_and_idx_dummy_commands() --- 414,434 ---- s/([\\]begin\s*$O\d+$C\s*thebibliography)/$bbl_cnt++; $1/eg; s/([\\]begin\s*$O\d+$C\s*thebibliography)/$id++; "\\bibliography$O$id$C$O$id$C $1"/geo; ! my(@parts) = split(/\\begin\s*$O\d+$C\s*theindex/); ! if (scalar(@parts) == 3) { ! # Be careful to re-write the string in place, since $_ is *not* ! # returned explicity; *** nasty side-effect dependency! *** ! print "\nadd_bbl_and_idx_dummy_commands ==> adding module index"; ! my $rx = "([\\\\]begin\\s*$O\\d+$C\\s*theindex[\\s\\S]*)" ! . "([\\\\]begin\\s*$O\\d+$C\\s*theindex)"; ! s/$rx/\\textohtmlmoduleindex \1 \\textohtmlindex \2/o; ! # Add a button to the navigation areas: ! $CUSTOM_BUTTONS .= $my_icons{'modules'}; } else { ! $CUSTOM_BUTTONS .= $BLANK_ICON; ! $global{'max_id'} = $id; # not sure why.... ! s/([\\]begin\s*$O\d+$C\s*theindex)/\\textohtmlindex $1/o; s/[\\]printindex/\\textohtmlindex /o; } #---------------------------------------------------------------------- lib_add_bbl_and_idx_dummy_commands() *************** *** 532,553 **** - # Fix from Ross Moore for ']' in \item[...]; this can be removed once the next - # patch to LaTeX2HTML is released and tested ... if the patch gets included. - # Be very careful to keep this around, just in case things break again! - # - sub protect_useritems { - local(*_) = @_; - local($preitems,$thisitem); - while (/\\item\s*\[/) { - $preitems .= $`; - $_ = $'; - $thisitem = $&.'<<'.++$global{'max_id'}.'>>'; - s/^(((($O|$OP)\d+($C|$CP)).*\3|<[^<>]*>|[^\]<]+)*)\]/$thisitem.=$1;''/e; - $preitems .= $thisitem . '<<' . $global{'max_id'} . '>>]'; - s/^]//; - } - $_ = $preitems . $_; - } - # This changes the markup used for {verbatim} environments, and is the # best way I've found that ensures the
      goes on the outside of the --- 472,475 ---- *************** *** 567,578 **** # page. sub make_head_and_body { ! local($title,$body) = @_; ! local($DTDcomment) = ''; ! local($version,$isolanguage) = ($HTML_VERSION, 'EN'); ! local(%isolanguages) = ( 'english', 'EN' , 'USenglish', 'EN.US' ! , 'original', 'EN' , 'german' , 'DE' ! , 'austrian', 'DE.AT', 'french' , 'FR' ! , 'spanish', 'ES' ! , %isolanguages ); $isolanguage = $isolanguages{$default_language}; $isolanguage = 'EN' unless $isolanguage; --- 489,499 ---- # page. sub make_head_and_body { ! my($title, $body) = @_; ! my $DTDcomment = ''; ! my($version, $isolanguage) = ($HTML_VERSION, 'EN'); ! my %isolanguages = ( 'english', 'EN' , 'USenglish', 'EN.US' ! , 'original', 'EN' , 'german' , 'DE' ! , 'austrian', 'DE.AT', 'french' , 'FR' ! , 'spanish', 'ES'); $isolanguage = $isolanguages{$default_language}; $isolanguage = 'EN' unless $isolanguage; From python-dev@python.org Mon Jul 31 18:57:01 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 31 Jul 2000 10:57:01 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc README,1.39,1.40 Message-ID: <200007311757.KAA08518@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv8503 Modified Files: README Log Message: Update to indicate the appropriate version of LaTeX2HTML. Update pointer for retrieving new versions. Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/README,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** README 2000/06/30 23:50:37 1.39 --- README 2000/07/31 17:56:58 1.40 *************** *** 127,138 **** . ! - LaTeX2HTML 98.2b6. Older version will fail with the new ! directory layout. Version 98.2b8 specifically does not ! work; it translates `` and '' to “ and ”, which ! are not supported by popular Web browsers. This also screws ! up code fragments. ;-( Releases are available at: ! . ! Really new versions also don't work, but I'm not sure when ! things broke. --- 127,136 ---- . ! - LaTeX2HTML 99.2b8. Older versions are not supported; each ! version changes enough that supporting multiple versions is not ! likely to work. Many older versions don't work with Perl ! 5.6 as well. This also screws up code fragments. ;-( ! Releases are available at: ! . From python-dev@python.org Mon Jul 31 19:18:33 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 31 Jul 2000 11:18:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc TODO,1.28,1.29 Message-ID: <200007311818.LAA17764@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv17750/Doc Modified Files: TODO Log Message: Organized a little bit; merged in some items from the 1.5.2p2 branch that did not get handled. Index: TODO =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/TODO,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** TODO 2000/06/29 03:33:28 1.28 --- TODO 2000/07/31 18:18:27 1.29 *************** *** 2,6 **** --- 2,18 ---- =============================== + General + ------- + * Figure out HTMLHelp generation for the Windows world. + + * Straighten out random/whrandom. Things are generally in the right + place, but need to respond to comments in email from Jan Kim + . + + + Python/C API + ------------ + * The "Very High Level Interface" in the API document has been requested; I guess it wouldn't hurt to fill in a bit there. Request *************** *** 10,25 **** parameter to the method implementation function. (Missing material mentioned in the Extending & Embedding manual, section 1.1; problem ! reported by Clay Spence .) ! * In the extensions manual, more information is needed about building ! dynamically linked extensions in C++. Specifically, the extensions ! must be linked against the C++ libraries (and possibly runtime). ! Also noted by Albert Hofkamp . ! ! * Python/C API reference missing PyArg_ParseTuple(), ! PyArg_ParseTupleAndKeywords(), Py_BuildValue(). Information ! requested by Greg Kochanski . PyEval_EvalCode() ! has also been requested. * Update the pickle documentation to describe all of the current behavior; only a subset is described. __reduce__, etc. Partial --- 22,54 ---- parameter to the method implementation function. (Missing material mentioned in the Extending & Embedding manual, section 1.1; problem ! reported by Clay Spence .) Heavily impacts one ! chapter of the Python/C API manual. ! ! * Missing PyArg_ParseTuple(), PyArg_ParseTupleAndKeywords(), ! Py_BuildValue(). Information requested by Greg Kochanski ! . PyEval_EvalCode() has also been requested. ! ! Extending & Embedding ! --------------------- ! ! * More information is needed about building dynamically linked ! extensions in C++. Specifically, the extensions must be linked ! against the C++ libraries (and possibly runtime). Also noted by ! Albert Hofkamp . ! ! Reference Manual ! ---------------- ! * Document the Extended Call Syntax in the language reference. ! [Jeremy Hylton] + * Document new comparison support for recursive objects (lang. ref.? + library ref.? (cmp() function). [Jeremy Hylton] + + Library Reference + ----------------- + + * urllib2 module reference. [Jeremy Hylton] + * Update the pickle documentation to describe all of the current behavior; only a subset is described. __reduce__, etc. Partial *************** *** 28,40 **** * Update the code/codeop module documentation. - * Figure out HTMLHelp generation for the Windows world. - - * Straighten out random/whrandom. - - * Update the filecmp documentation (Moshe?). - * Update the httplib documentation to match Greg Stein's HTTP/1.1 support and new classes. (Greg, this is yours!) NOT WORTH THE TROUBLE --- 57,69 ---- * Update the code/codeop module documentation. * Update the httplib documentation to match Greg Stein's HTTP/1.1 support and new classes. (Greg, this is yours!) + Tutorial + -------- + + * Update tutorial to use string methods and talk about backward + compatibility of same. + NOT WORTH THE TROUBLE *************** *** 46,50 **** really worth the pain. (Only an issue at all when a header-letter and the first index entry get separated -- can change as soon as we ! change the index entries in the text.) * Fix problem with howto documents getting the last module synopsis --- 75,80 ---- really worth the pain. (Only an issue at all when a header-letter and the first index entry get separated -- can change as soon as we ! change the index entries in the text.) Also only a problem in the ! print version. * Fix problem with howto documents getting the last module synopsis From python-dev@python.org Mon Jul 31 19:26:37 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 31 Jul 2000 11:26:37 -0700 Subject: [Python-checkins] CVS: python/dist/src Makefile.in,1.91,1.92 Message-ID: <200007311826.LAA18697@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv18682 Modified Files: Makefile.in Log Message: A different solution for Patch #100979: support for out-of-tree "make TAGS" The version there built the tags and TAGS files in the build directory. I like them in the source directory. The simplest solution is to cd to the source directory before running ctags or etags. Tested both superficially and they work for me, on Linux Red Hat 6.1. Index: Makefile.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Makefile.in,v retrieving revision 1.91 retrieving revision 1.92 diff -C2 -r1.91 -r1.92 *** Makefile.in 2000/07/04 04:15:53 1.91 --- Makefile.in 2000/07/31 18:26:35 1.92 *************** *** 461,471 **** # Create a tags file for vi tags:: ! ctags -w -t Include/*.h ! for i in $(SUBDIRS); do ctags -w -t -a $$i/*.[ch]; done sort tags -o tags # Create a tags file for GNU Emacs TAGS:: ! etags Include/*.h for i in $(SUBDIRS); do etags -a $$i/*.[ch]; done --- 461,474 ---- # Create a tags file for vi tags:: ! cd $(srcdir); \ ! ctags -w -t Include/*.h; \ ! for i in $(SUBDIRS); do ctags -w -t -a $$i/*.[ch]; \ ! done; \ sort tags -o tags # Create a tags file for GNU Emacs TAGS:: ! cd $(srcdir); \ ! etags Include/*.h; \ for i in $(SUBDIRS); do etags -a $$i/*.[ch]; done From python-dev@python.org Mon Jul 31 21:08:26 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 31 Jul 2000 13:08:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/ref ref5.tex,1.30,1.31 Message-ID: <200007312008.NAA10428@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ref In directory slayer.i.sourceforge.net:/tmp/cvs-serv10421/ref Modified Files: ref5.tex Log Message: Change as suggested by Peter Funk : Create a hyperlink between the language reference and documentation for the built in functions. Index: ref5.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref5.tex,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -r1.30 -r1.31 *** ref5.tex 2000/07/11 19:43:47 1.30 --- ref5.tex 2000/07/31 20:08:23 1.31 *************** *** 454,459 **** \item[a built-in function or method:] The result is up to the ! interpreter; see the library reference manual for the descriptions of ! built-in functions and methods. \indexii{function}{call} \indexii{built-in function}{call} --- 454,460 ---- \item[a built-in function or method:] The result is up to the ! interpreter; see the \citetitle[../lib/built-in-funcs.html]{Python ! Library Reference} for the descriptions of built-in functions and ! methods. \indexii{function}{call} \indexii{built-in function}{call} From python-dev@python.org Mon Jul 31 21:13:26 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 31 Jul 2000 13:13:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/perl l2hinit.perl,1.43,1.44 Message-ID: <200007312013.NAA10779@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/perl In directory slayer.i.sourceforge.net:/tmp/cvs-serv10768/perl Modified Files: l2hinit.perl Log Message: Change as suggested by Peter Funk : Move around the navigational links on the left-hand side of the navigation bar to be more like the cursor keys. Index: l2hinit.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/l2hinit.perl,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -r1.43 -r1.44 *** l2hinit.perl 2000/07/31 17:53:45 1.43 --- l2hinit.perl 2000/07/31 20:13:23 1.44 *************** *** 149,155 **** . "\n" # left-hand side - . "\n$NEXT" - . "\n$UP" . "\n$PREVIOUS" # title box . "\n" --- 149,155 ---- . "\n" # left-hand side . "\n$PREVIOUS" + . "\n$UP" + . "\n$NEXT" # title box . "\n" *************** *** 161,167 **** . "\n\n" # textual navigation ! . make_nav_sectref("Next", $NEXT_TITLE) . make_nav_sectref("Up", $UP_TITLE) ! . make_nav_sectref("Previous", $PREVIOUS_TITLE)); # remove these; they are unnecessary and cause errors from validation $s =~ s/ NAME="tex2html\d+"\n */ /g; --- 161,168 ---- . "\n\n" # textual navigation ! . make_nav_sectref("Previous", $PREVIOUS_TITLE) . make_nav_sectref("Up", $UP_TITLE) ! . make_nav_sectref("Next", $NEXT_TITLE) ! ); # remove these; they are unnecessary and cause errors from validation $s =~ s/ NAME="tex2html\d+"\n */ /g; From python-dev@python.org Mon Jul 31 21:15:20 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 31 Jul 2000 13:15:20 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0217.txt,NONE,1.1 Message-ID: <200007312015.NAA10935@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv10925 Added Files: pep-0217.txt Log Message: PEP 217, Display Hook for Interactive Use, assigned moshez ***** Error reading new file(2, 'No such file or directory') From python-dev@python.org Mon Jul 31 21:15:50 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 31 Jul 2000 13:15:50 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.16,1.17 Message-ID: <200007312015.NAA11059@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv11051 Modified Files: pep-0000.txt Log Message: Added PEP 217, Display Hook for Interactive Use, assigned moshez Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** pep-0000.txt 2000/07/31 16:38:12 1.16 --- pep-0000.txt 2000/07/31 20:15:48 1.17 *************** *** 38,41 **** --- 38,42 ---- 215 pep-0215.txt String Interpolation ping 216 pep-0216.txt Docstring Format moshez + 217 pep-0217.txt Display Hook for Interactive Use moshez From python-dev@python.org Mon Jul 31 21:20:34 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 31 Jul 2000 13:20:34 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0218.txt,NONE,1.1 Message-ID: <200007312020.NAA11401@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv11391 Added Files: pep-0218.txt Log Message: PEP 218, Adding a Built-In Set Object Type, assigned to gvwilson. --- NEW FILE --- PEP: 218 Title: Adding a Built-In Set Object Type Version: $Revision: 1.1 $ Author: gvwilson@nevex.com (Greg Wilson) Python-Version: 2.1 Status: Draft Created: 31-Jul-2000 Post-History: Abstract Sets are a fundamental mathematical structure, and are commonly used to both specify and implement programs. Sets are often implemented as dictionaries with "don't care" values, but this leaves the meaning of intersection, union, difference, and other basic operations are ambiguous. This PEP therefore proposes syntax and semantics for a concrete, built-in set type. Local Variables: mode: indented-text indent-tabs-mode: nil End: From python-dev@python.org Mon Jul 31 21:20:54 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 31 Jul 2000 13:20:54 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.17,1.18 Message-ID: <200007312020.NAA11511@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv11500 Modified Files: pep-0000.txt Log Message: Added PEP 218, Adding a Built-In Set Object Type, assigned to gvwilson. Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** pep-0000.txt 2000/07/31 20:15:48 1.17 --- pep-0000.txt 2000/07/31 20:20:52 1.18 *************** *** 39,42 **** --- 39,43 ---- 216 pep-0216.txt Docstring Format moshez 217 pep-0217.txt Display Hook for Interactive Use moshez + 218 pep-0218.txt Adding a Built-In Set Object Type gvwilson From python-dev@python.org Mon Jul 31 21:47:20 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 31 Jul 2000 13:47:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules arraymodule.c,2.49,2.50 Message-ID: <200007312047.NAA13896@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv13844 Modified Files: arraymodule.c Log Message: added count, extend, index, pop and remove to arraymodule Index: arraymodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v retrieving revision 2.49 retrieving revision 2.50 diff -C2 -r2.49 -r2.50 *** arraymodule.c 2000/07/21 06:00:07 2.49 --- arraymodule.c 2000/07/31 20:47:15 2.50 *************** *** 675,678 **** --- 675,835 ---- static PyObject * + array_count(arrayobject *self, PyObject *args) + { + int count = 0; + int i; + PyObject *v; + + if (!PyArg_ParseTuple(args, "O:count", &v)) + return NULL; + for (i = 0; i < self->ob_size; i++) { + PyObject *selfi = getarrayitem((PyObject *)self, i); + if (PyObject_Compare(selfi, v) == 0) + count++; + Py_DECREF(selfi); + if (PyErr_Occurred()) + return NULL; + } + return PyInt_FromLong((long)count); + } + + static char count_doc [] = + "count (x)\n\ + \n\ + Return number of occurences of x in the array."; + + static PyObject * + array_index(arrayobject *self, PyObject *args) + { + int i; + PyObject *v; + + if (!PyArg_ParseTuple(args, "O:index", &v)) + return NULL; + for (i = 0; i < self->ob_size; i++) { + PyObject *selfi = getarrayitem((PyObject *)self, i); + if (PyObject_Compare(selfi, v) == 0) { + Py_DECREF(selfi); + return PyInt_FromLong((long)i); + } + Py_DECREF(selfi); + if (PyErr_Occurred()) + return NULL; + } + PyErr_SetString(PyExc_ValueError, "array.index(x): x not in list"); + return NULL; + } + + static char index_doc [] = + "index (x)\n\ + \n\ + Return index of first occurence of x in the array."; + + static PyObject * + array_remove(arrayobject *self, PyObject *args) + { + int i; + PyObject *v; + + if (!PyArg_ParseTuple(args, "O:remove", &v)) + return NULL; + for (i = 0; i < self->ob_size; i++) { + PyObject *selfi = getarrayitem((PyObject *)self,i); + if (PyObject_Compare(selfi, v) == 0) { + Py_DECREF(selfi); + if (array_ass_slice(self, i, i+1, + (PyObject *)NULL) != 0) + return NULL; + Py_INCREF(Py_None); + return Py_None; + } + Py_DECREF(selfi); + if (PyErr_Occurred()) + return NULL; + } + PyErr_SetString(PyExc_ValueError, "array.remove(x): x not in list"); + return NULL; + } + + static char remove_doc [] = + "remove (x)\n\ + \n\ + Remove the first occurence of x in the array."; + + static PyObject * + array_pop(arrayobject *self, PyObject *args) + { + int i = -1; + PyObject *v; + if (!PyArg_ParseTuple(args, "|i:pop", &i)) + return NULL; + if (self->ob_size == 0) { + /* Special-case most common failure cause */ + PyErr_SetString(PyExc_IndexError, "pop from empty array"); + return NULL; + } + if (i < 0) + i += self->ob_size; + if (i < 0 || i >= self->ob_size) { + PyErr_SetString(PyExc_IndexError, "pop index out of range"); + return NULL; + } + v = getarrayitem((PyObject *)self,i); + if (array_ass_slice(self, i, i+1, (PyObject *)NULL) != 0) { + Py_DECREF(v); + return NULL; + } + return v; + } + + static char pop_doc [] = + "pop ([i])\n\ + \n\ + Return the i-th element and delete it from the array. i defaults to -1."; + + static PyObject * + array_extend(self, args) + arrayobject *self; + PyObject *args; + { + int size; + PyObject *bb; + arrayobject *np; + + if (!PyArg_ParseTuple(args, "O:extend", &bb)) + return NULL; + + if (!is_arrayobject(bb)) { + PyErr_Format(PyExc_TypeError, + "can only append array (not \"%.200s\") to array", + bb->ob_type->tp_name); + return NULL; + } + #define b ((arrayobject *)bb) + if (self->ob_descr != b->ob_descr) { + PyErr_SetString(PyExc_TypeError, + "can only append arrays of same kind"); + return NULL; + } + size = self->ob_size + b->ob_size; + PyMem_RESIZE(self->ob_item, char, size*self->ob_descr->itemsize); + if (self->ob_item == NULL) { + PyObject_Del(self); + return PyErr_NoMemory(); + } + memcpy(self->ob_item + self->ob_size*self->ob_descr->itemsize, + b->ob_item, b->ob_size*b->ob_descr->itemsize); + self->ob_size = size; + Py_INCREF(Py_None); + return Py_None; + #undef b + } + + static char extend_doc [] = + "extend(array)\n\ + \n\ + Append array items to the end of the array."; + + static PyObject * array_insert(arrayobject *self, PyObject *args) { *************** *** 817,888 **** Reverse the order of the items in the array."; - /* The following routines were adapted from listobject.c but not converted. - To make them work you will have to work! */ - - #if 0 - static PyObject * - array_index(arrayobject *self, PyObject *args) - { - int i; - - if (args == NULL) { - PyErr_BadArgument(); - return NULL; - } - for (i = 0; i < self->ob_size; i++) { - if (PyObject_Compare(self->ob_item[i], args) == 0) - return PyInt_FromLong((long)i); - /* XXX PyErr_Occurred */ - } - PyErr_SetString(PyExc_ValueError, "array.index(x): x not in array"); - return NULL; - } - #endif - - #if 0 - static PyObject * - array_count(arrayobject *self, PyObject *args) - { - int count = 0; - int i; - - if (args == NULL) { - PyErr_BadArgument(); - return NULL; - } - for (i = 0; i < self->ob_size; i++) { - if (PyObject_Compare(self->ob_item[i], args) == 0) - count++; - /* XXX PyErr_Occurred */ - } - return PyInt_FromLong((long)count); - } - #endif - - #if 0 - static PyObject * - array_remove(arrayobject *self, PyObject *args) - { - int i; - - if (args == NULL) { - PyErr_BadArgument(); - return NULL; - } - for (i = 0; i < self->ob_size; i++) { - if (PyObject_Compare(self->ob_item[i], args) == 0) { - if (array_ass_slice(self, i, i+1, - (PyObject *)NULL) != 0) - return NULL; - Py_INCREF(Py_None); - return Py_None; - } - /* XXX PyErr_Occurred */ - } - PyErr_SetString(PyExc_ValueError, "array.remove(x): x not in array"); - return NULL; - } - #endif - static PyObject * array_fromfile(arrayobject *self, PyObject *args) --- 974,977 ---- *************** *** 1096,1109 **** {"byteswap", (PyCFunction)array_byteswap, METH_VARARGS, byteswap_doc}, ! /* {"count", (method)array_count},*/ {"fromfile", (PyCFunction)array_fromfile, 0, fromfile_doc}, {"fromlist", (PyCFunction)array_fromlist, 0, fromlist_doc}, {"fromstring", (PyCFunction)array_fromstring, 0, fromstring_doc}, ! /* {"index", (method)array_index},*/ {"insert", (PyCFunction)array_insert, 0, insert_doc}, {"read", (PyCFunction)array_fromfile, 0, fromfile_doc}, ! /* {"remove", (method)array_remove},*/ {"reverse", (PyCFunction)array_reverse, 0, reverse_doc}, ! /* {"sort", (method)array_sort},*/ {"tofile", (PyCFunction)array_tofile, 0, tofile_doc}, {"tolist", (PyCFunction)array_tolist, 0, tolist_doc}, --- 1185,1200 ---- {"byteswap", (PyCFunction)array_byteswap, METH_VARARGS, byteswap_doc}, ! {"count", (PyCFunction)array_count, 1, count_doc}, ! {"extend", (PyCFunction)array_extend, 1, extend_doc}, {"fromfile", (PyCFunction)array_fromfile, 0, fromfile_doc}, {"fromlist", (PyCFunction)array_fromlist, 0, fromlist_doc}, {"fromstring", (PyCFunction)array_fromstring, 0, fromstring_doc}, ! {"index", (PyCFunction)array_index, 1, index_doc}, {"insert", (PyCFunction)array_insert, 0, insert_doc}, + {"pop", (PyCFunction)array_pop, 1, pop_doc}, {"read", (PyCFunction)array_fromfile, 0, fromfile_doc}, ! {"remove", (PyCFunction)array_remove, 1, remove_doc}, {"reverse", (PyCFunction)array_reverse, 0, reverse_doc}, ! /* {"sort", (PyCFunction)array_sort, 0, sort_doc},*/ {"tofile", (PyCFunction)array_tofile, 0, tofile_doc}, {"tolist", (PyCFunction)array_tolist, 0, tolist_doc}, *************** *** 1365,1373 **** --- 1456,1469 ---- buffer_info() -- return information giving the current memory info\n\ byteswap() -- byteswap all the items of the array\n\ + count() -- return number of occurences of an object\n\ + extend() -- extend array by appending array elements\n\ fromfile() -- read items from a file object\n\ fromlist() -- append items from the list\n\ fromstring() -- append items from the string\n\ + index() -- return index of first occurence of an object\n\ insert() -- insert a new item into the array at a provided position\n\ + pop() -- remove and return item (default last)\n\ read() -- DEPRECATED, use fromfile()\n\ + remove() -- remove first occurence of an object\n\ reverse() -- reverse the order of the items in the array\n\ tofile() -- write all items to a file object\n\ From python-dev@python.org Mon Jul 31 21:50:00 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 31 Jul 2000 13:50:00 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_array.py,1.7,1.8 Message-ID: <200007312050.NAA14034@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv14022 Modified Files: test_array.py Log Message: added count, extend, index, pop and remove to arraymodule Index: test_array.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_array.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** test_array.py 2000/06/28 17:50:51 1.7 --- test_array.py 2000/07/31 20:49:58 1.8 *************** *** 106,109 **** --- 106,129 ---- if a != array.array(type, "aabcdee"): raise TestFailed, "array(%s) self-slice-assign (cntr)" % `type` + if a.index("e") != 5: + raise TestFailed, "array(%s) index-test" % `type` + if a.count("a") != 2: + raise TestFailed, "array(%s) count-test" % `type` + a.remove("e") + if a != array.array(type, "aabcde"): + raise TestFailed, "array(%s) remove-test" % `type` + if a.pop(0) != "a": + raise TestFailed, "array(%s) pop-test" % `type` + if a.pop(1) != "b": + raise TestFailed, "array(%s) pop-test" % `type` + a.extend(array.array(type, "xyz")) + if a != array.array(type, "acdexyz"): + raise TestFailed, "array(%s) extend-test" % `type` + a.pop() + a.pop() + a.pop() + a.pop() + if a != array.array(type, "acd"): + raise TestFailed, "array(%s) pop-test" % `type` else: a = array.array(type, [1, 2, 3, 4, 5]) *************** *** 119,122 **** --- 139,162 ---- if a != array.array(type, [1, 1, 2, 3, 4, 5, 5]): raise TestFailed, "array(%s) self-slice-assign (cntr)" % `type` + if a.index(5) != 5: + raise TestFailed, "array(%s) index-test" % `type` + if a.count(1) != 2: + raise TestFailed, "array(%s) count-test" % `type` + a.remove(5) + if a != array.array(type, [1, 1, 2, 3, 4, 5]): + raise TestFailed, "array(%s) remove-test" % `type` + if a.pop(0) != 1: + raise TestFailed, "array(%s) pop-test" % `type` + if a.pop(1) != 2: + raise TestFailed, "array(%s) pop-test" % `type` + a.extend(array.array(type, [7, 8, 9])) + if a != array.array(type, [1, 3, 4, 5, 7, 8, 9]): + raise TestFailed, "array(%s) extend-test" % `type` + a.pop() + a.pop() + a.pop() + a.pop() + if a != array.array(type, [1, 3, 4]): + raise TestFailed, "array(%s) pop-test" % `type` # test that overflow exceptions are raised as expected for assignment From python-dev@python.org Mon Jul 31 21:52:24 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 31 Jul 2000 13:52:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libarray.tex,1.24,1.25 libstdtypes.tex,1.24,1.25 Message-ID: <200007312052.NAA14268@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv14223 Modified Files: libarray.tex libstdtypes.tex Log Message: added count, extend, index, pop and remove to arraymodule Index: libarray.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libarray.tex,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** libarray.tex 2000/04/03 20:13:52 1.24 --- libarray.tex 2000/07/31 20:52:21 1.25 *************** *** 84,87 **** --- 84,95 ---- \end{methoddesc} + \begin{methoddesc}[array]{count}{x} + Return the number of occurences of \var{x} in the array. + \end{methoddesc} + + \begin{methoddesc}[array]{extend}{a} + Append array items from \var{a} to the end of the array. + \end{methoddesc} + \begin{methoddesc}[array]{fromfile}{f, n} Read \var{n} items (as machine values) from the file object \var{f} *************** *** 105,108 **** --- 113,121 ---- \end{methoddesc} + \begin{methoddesc}[array]{index}{x} + Return the smallest \var{i} such that \var{i} is the index of + the first occurence of \var{x} in the array. + \end{methoddesc} + \begin{methoddesc}[array]{insert}{i, x} Insert a new item with value \var{x} in the array before position *************** *** 110,113 **** --- 123,132 ---- \end{methoddesc} + \begin{methoddesc}[array]{pop}{\optional{i}} + Removes the item with the index \var{i} from the array and returns + it. The optional argument defaults to \code{-1}, so that by default + the last item is removed and returned. + \end{methoddesc} + \begin{methoddesc}[array]{read}{f, n} \deprecated {1.5.1} *************** *** 119,122 **** --- 138,145 ---- built-in file object; something else with a \method{read()} method won't do. + \end{methoddesc} + + \begin{methoddesc}[array]{remove}{x} + Remove the first occurence of \var{x} from the array. \end{methoddesc} Index: libstdtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** libstdtypes.tex 2000/07/31 16:34:46 1.24 --- libstdtypes.tex 2000/07/31 20:52:21 1.25 *************** *** 507,512 **** \var{s}. ! \item[(4)] The \method{pop()} method is experimental and not supported ! by other mutable sequence types than lists. The optional argument \var{i} defaults to \code{-1}, so that by default the last item is removed and returned. --- 507,512 ---- \var{s}. ! \item[(4)] The \method{pop()} method is experimental and at the moment ! only supported by the list and array types. The optional argument \var{i} defaults to \code{-1}, so that by default the last item is removed and returned. From python-dev@python.org Mon Jul 31 22:57:33 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 31 Jul 2000 14:57:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules arraymodule.c,2.50,2.51 Message-ID: <200007312157.OAA02291@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2155 Modified Files: arraymodule.c Log Message: replaced PyArgs_Parse by PyArgs_ParseTuple changed error messages for extend method from "append" to "extend" Index: arraymodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v retrieving revision 2.50 retrieving revision 2.51 diff -C2 -r2.50 -r2.51 *** arraymodule.c 2000/07/31 20:47:15 2.50 --- arraymodule.c 2000/07/31 21:57:30 2.51 *************** *** 802,806 **** if (!is_arrayobject(bb)) { PyErr_Format(PyExc_TypeError, ! "can only append array (not \"%.200s\") to array", bb->ob_type->tp_name); return NULL; --- 802,806 ---- if (!is_arrayobject(bb)) { PyErr_Format(PyExc_TypeError, ! "can only extend array with array (not \"%.200s\")", bb->ob_type->tp_name); return NULL; *************** *** 809,813 **** if (self->ob_descr != b->ob_descr) { PyErr_SetString(PyExc_TypeError, ! "can only append arrays of same kind"); return NULL; } --- 809,813 ---- if (self->ob_descr != b->ob_descr) { PyErr_SetString(PyExc_TypeError, ! "can only extend with array of same kind"); return NULL; } *************** *** 836,840 **** int i; PyObject *v; ! if (!PyArg_Parse(args, "(iO)", &i, &v)) return NULL; return ins(self, i, v); --- 836,840 ---- int i; PyObject *v; ! if (!PyArg_ParseTuple(args, "iO:insert", &i, &v)) return NULL; return ins(self, i, v); *************** *** 870,874 **** { PyObject *v; ! if (!PyArg_Parse(args, "O", &v)) return NULL; return ins(self, (int) self->ob_size, v); --- 870,874 ---- { PyObject *v; ! if (!PyArg_ParseTuple(args, "O:append", &v)) return NULL; return ins(self, (int) self->ob_size, v); *************** *** 980,984 **** int n; FILE *fp; ! if (!PyArg_Parse(args, "(Oi)", &f, &n)) return NULL; fp = PyFile_AsFile(f); --- 980,984 ---- int n; FILE *fp; ! if (!PyArg_ParseTuple(args, "Oi:fromfile", &f, &n)) return NULL; fp = PyFile_AsFile(f); *************** *** 1033,1037 **** PyObject *f; FILE *fp; ! if (!PyArg_Parse(args, "O", &f)) return NULL; fp = PyFile_AsFile(f); --- 1033,1037 ---- PyObject *f; FILE *fp; ! if (!PyArg_ParseTuple(args, "O:tofile", &f)) return NULL; fp = PyFile_AsFile(f); *************** *** 1065,1069 **** PyObject *list; int itemsize = self->ob_descr->itemsize; ! if (!PyArg_Parse(args, "O", &list)) return NULL; if (!PyList_Check(list)) { --- 1065,1069 ---- PyObject *list; int itemsize = self->ob_descr->itemsize; ! if (!PyArg_ParseTuple(args, "O:fromlist", &list)) return NULL; if (!PyList_Check(list)) { *************** *** 1109,1112 **** --- 1109,1114 ---- PyObject *list = PyList_New(self->ob_size); int i; + if (!PyArg_ParseTuple(args, ":tolist")) + return NULL; if (list == NULL) return NULL; *************** *** 1134,1138 **** int n; int itemsize = self->ob_descr->itemsize; ! if (!PyArg_Parse(args, "s#", &str, &n)) return NULL; if (n % itemsize != 0) { --- 1136,1140 ---- int n; int itemsize = self->ob_descr->itemsize; ! if (!PyArg_ParseTuple(args, "s#:fromstring", &str, &n)) return NULL; if (n % itemsize != 0) { *************** *** 1168,1172 **** array_tostring(arrayobject *self, PyObject *args) { ! if (!PyArg_Parse(args, "")) return NULL; return PyString_FromStringAndSize(self->ob_item, --- 1170,1174 ---- array_tostring(arrayobject *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":tostring")) return NULL; return PyString_FromStringAndSize(self->ob_item, *************** *** 1181,1204 **** PyMethodDef array_methods[] = { ! {"append", (PyCFunction)array_append, 0, append_doc}, ! {"buffer_info", (PyCFunction)array_buffer_info, 0, buffer_info_doc}, ! {"byteswap", (PyCFunction)array_byteswap, METH_VARARGS, ! byteswap_doc}, ! {"count", (PyCFunction)array_count, 1, count_doc}, ! {"extend", (PyCFunction)array_extend, 1, extend_doc}, ! {"fromfile", (PyCFunction)array_fromfile, 0, fromfile_doc}, ! {"fromlist", (PyCFunction)array_fromlist, 0, fromlist_doc}, ! {"fromstring", (PyCFunction)array_fromstring, 0, fromstring_doc}, ! {"index", (PyCFunction)array_index, 1, index_doc}, ! {"insert", (PyCFunction)array_insert, 0, insert_doc}, ! {"pop", (PyCFunction)array_pop, 1, pop_doc}, ! {"read", (PyCFunction)array_fromfile, 0, fromfile_doc}, ! {"remove", (PyCFunction)array_remove, 1, remove_doc}, ! {"reverse", (PyCFunction)array_reverse, 0, reverse_doc}, ! /* {"sort", (PyCFunction)array_sort, 0, sort_doc},*/ ! {"tofile", (PyCFunction)array_tofile, 0, tofile_doc}, ! {"tolist", (PyCFunction)array_tolist, 0, tolist_doc}, ! {"tostring", (PyCFunction)array_tostring, 0, tostring_doc}, ! {"write", (PyCFunction)array_tofile, 0, tofile_doc}, {NULL, NULL} /* sentinel */ }; --- 1183,1205 ---- PyMethodDef array_methods[] = { ! {"append", (PyCFunction)array_append, METH_VARARGS, append_doc}, ! {"buffer_info", (PyCFunction)array_buffer_info, METH_VARARGS, buffer_info_doc}, ! {"byteswap", (PyCFunction)array_byteswap, METH_VARARGS, byteswap_doc}, ! {"count", (PyCFunction)array_count, METH_VARARGS, count_doc}, ! {"extend", (PyCFunction)array_extend, METH_VARARGS, extend_doc}, ! {"fromfile", (PyCFunction)array_fromfile, METH_VARARGS, fromfile_doc}, ! {"fromlist", (PyCFunction)array_fromlist, METH_VARARGS, fromlist_doc}, ! {"fromstring", (PyCFunction)array_fromstring, METH_VARARGS, fromstring_doc}, ! {"index", (PyCFunction)array_index, METH_VARARGS, index_doc}, ! {"insert", (PyCFunction)array_insert, METH_VARARGS, insert_doc}, ! {"pop", (PyCFunction)array_pop, METH_VARARGS, pop_doc}, ! {"read", (PyCFunction)array_fromfile, METH_VARARGS, fromfile_doc}, ! {"remove", (PyCFunction)array_remove, METH_VARARGS, remove_doc}, ! {"reverse", (PyCFunction)array_reverse, METH_VARARGS, reverse_doc}, ! /* {"sort", (PyCFunction)array_sort, METH_VARARGS, sort_doc},*/ ! {"tofile", (PyCFunction)array_tofile, METH_VARARGS, tofile_doc}, ! {"tolist", (PyCFunction)array_tolist, METH_VARARGS, tolist_doc}, ! {"tostring", (PyCFunction)array_tostring, METH_VARARGS, tostring_doc}, ! {"write", (PyCFunction)array_tofile, METH_VARARGS, tofile_doc}, {NULL, NULL} /* sentinel */ }; *************** *** 1236,1239 **** --- 1237,1241 ---- int ok = 0; int i, len; + PyObject *t_empty = PyTuple_New(0); PyObject *v; len = a->ob_size; *************** *** 1244,1248 **** if (a->ob_descr->typecode == 'c') { fprintf(fp, "array('c', "); ! v = array_tostring(a, (PyObject *)NULL); ok = PyObject_Print(v, fp, 0); Py_XDECREF(v); --- 1246,1251 ---- if (a->ob_descr->typecode == 'c') { fprintf(fp, "array('c', "); ! v = array_tostring(a, t_empty); ! Py_DECREF(t_empty);; ok = PyObject_Print(v, fp, 0); Py_XDECREF(v); *************** *** 1356,1362 **** PyObject *initial = NULL; struct arraydescr *descr; ! if (!PyArg_Parse(args, "c", &c)) { PyErr_Clear(); ! if (!PyArg_Parse(args, "(cO)", &c, &initial)) return NULL; if (!PyList_Check(initial) && !PyString_Check(initial)) { --- 1359,1365 ---- PyObject *initial = NULL; struct arraydescr *descr; ! if (!PyArg_ParseTuple(args, "c:array", &c)) { PyErr_Clear(); ! if (!PyArg_ParseTuple(args, "cO:array", &c, &initial)) return NULL; if (!PyList_Check(initial) && !PyString_Check(initial)) { *************** *** 1389,1394 **** } if (initial != NULL && PyString_Check(initial)) { PyObject *v = ! array_fromstring((arrayobject *)a, initial); if (v == NULL) { Py_DECREF(a); --- 1392,1399 ---- } if (initial != NULL && PyString_Check(initial)) { + PyObject *t_initial = Py_BuildValue("(O)", initial); PyObject *v = ! array_fromstring((arrayobject *)a, t_initial); ! Py_DECREF(t_initial); if (v == NULL) { Py_DECREF(a); *************** *** 1413,1417 **** static PyMethodDef a_methods[] = { ! {"array", a_array, 0, a_array_doc}, {NULL, NULL} /* sentinel */ }; --- 1418,1422 ---- static PyMethodDef a_methods[] = { ! {"array", a_array, METH_VARARGS, a_array_doc}, {NULL, NULL} /* sentinel */ }; From python-dev@python.org Mon Jul 31 23:19:33 2000 From: python-dev@python.org (Peter Schneider-Kamp) Date: Mon, 31 Jul 2000 15:19:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include pymem.h,NONE,2.1 Python.h,2.25,2.26 mymalloc.h,2.25,2.26 mymath.h,2.12,2.13 myproto.h,2.9,2.10 myselect.h,2.13,2.14 mytime.h,2.7,2.8 objimpl.h,2.24,2.25 pgenheaders.h,2.22,2.23 pyport.h,2.8,2.9 Message-ID: <200007312219.PAA11538@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv11485/Include Modified Files: Python.h mymalloc.h mymath.h myproto.h myselect.h mytime.h objimpl.h pgenheaders.h pyport.h Added Files: pymem.h Log Message: patch from Vladimir (move Py_Mem* interface to Include/pymem.h) --- NEW FILE --- /*********************************************************** Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. Copyright (c) 1990-1995, Stichting Mathematisch Centrum. All rights reserved. See the file "Misc/COPYRIGHT" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ******************************************************************/ /* Lowest-level memory allocation interface */ #ifndef Py_PYMEM_H #define Py_PYMEM_H #include "pyport.h" #ifdef __cplusplus extern "C" { #endif /* * Core memory allocator * ===================== */ /* To make sure the interpreter is user-malloc friendly, all memory APIs are implemented on top of this one. The PyCore_* macros can be defined to make the interpreter use a custom allocator. Note that they are for internal use only. Both the core and extension modules should use the PyMem_* API. See the comment block at the end of this file for two scenarios showing how to use this to use a different allocator. */ #ifndef PyCore_MALLOC_FUNC #undef PyCore_REALLOC_FUNC #undef PyCore_FREE_FUNC #define PyCore_MALLOC_FUNC malloc #define PyCore_REALLOC_FUNC realloc #define PyCore_FREE_FUNC free #endif #ifndef PyCore_MALLOC_PROTO #undef PyCore_REALLOC_PROTO #undef PyCore_FREE_PROTO #define PyCore_MALLOC_PROTO (size_t) #define PyCore_REALLOC_PROTO (void *, size_t) #define PyCore_FREE_PROTO (void *) #endif #ifdef NEED_TO_DECLARE_MALLOC_AND_FRIEND extern void *PyCore_MALLOC_FUNC PyCore_MALLOC_PROTO; extern void *PyCore_REALLOC_FUNC PyCore_REALLOC_PROTO; extern void PyCore_FREE_FUNC PyCore_FREE_PROTO; #endif #ifndef PyCore_MALLOC #undef PyCore_REALLOC #undef PyCore_FREE #define PyCore_MALLOC(n) PyCore_MALLOC_FUNC(n) #define PyCore_REALLOC(p, n) PyCore_REALLOC_FUNC((p), (n)) #define PyCore_FREE(p) PyCore_FREE_FUNC(p) #endif /* BEWARE: Each interface exports both functions and macros. Extension modules should normally use the functions for ensuring binary compatibility of the user's code across Python versions. Subsequently, if the Python runtime switches to its own malloc (different from standard malloc), no recompilation is required for the extensions. The macro versions trade compatibility for speed. They can be used whenever there is a performance problem, but their use implies recompilation of the code for each new Python release. The Python core uses the macros because it *is* compiled on every upgrade. This might not be the case with 3rd party extensions in a custom setup (for example, a customer does not always have access to the source of 3rd party deliverables). You have been warned! */ /* * Raw memory interface * ==================== */ /* Functions */ /* Function wrappers around PyCore_MALLOC and friends; useful if you need to be sure that you are using the same memory allocator as Python. Note that the wrappers make sure that allocating 0 bytes returns a non-NULL pointer, even if the underlying malloc doesn't. Returned pointers must be checked for NULL explicitly. No action is performed on failure. */ extern DL_IMPORT(void *) PyMem_Malloc(size_t); extern DL_IMPORT(void *) PyMem_Realloc(void *, size_t); extern DL_IMPORT(void) PyMem_Free(void *); /* Starting from Python 1.6, the wrappers Py_{Malloc,Realloc,Free} are no longer supported. They used to call PyErr_NoMemory() on failure. */ /* Macros */ #define PyMem_MALLOC(n) PyCore_MALLOC(n) #define PyMem_REALLOC(p, n) PyCore_REALLOC((void *)(p), (n)) #define PyMem_FREE(p) PyCore_FREE((void *)(p)) /* * Type-oriented memory interface * ============================== */ /* Functions */ #define PyMem_New(type, n) \ ( (type *) PyMem_Malloc((n) * sizeof(type)) ) #define PyMem_Resize(p, type, n) \ ( (p) = (type *) PyMem_Realloc((n) * sizeof(type)) ) #define PyMem_Del(p) PyMem_Free(p) /* Macros */ #define PyMem_NEW(type, n) \ ( (type *) PyMem_MALLOC(_PyMem_EXTRA + (n) * sizeof(type)) ) #define PyMem_RESIZE(p, type, n) \ if ((p) == NULL) \ (p) = (type *)(PyMem_MALLOC( \ _PyMem_EXTRA + (n) * sizeof(type))); \ else \ (p) = (type *)(PyMem_REALLOC((p), \ _PyMem_EXTRA + (n) * sizeof(type))) #define PyMem_DEL(p) PyMem_FREE(p) /* PyMem_XDEL is deprecated. To avoid the call when p is NULL, it is recommended to write the test explicitly in the code. Note that according to ANSI C, free(NULL) has no effect. */ #ifdef __cplusplus } #endif /* SCENARIOS Here are two scenarios by Vladimir Marangozov (the author of the memory allocation redesign). 1) Scenario A Suppose you want to use a debugging malloc library that collects info on where the malloc calls originate from. Assume the interface is: d_malloc(size_t n, char* src_file, unsigned long src_line) c.s. In this case, you would define (for example in config.h) : #define PyCore_MALLOC_FUNC d_malloc ... #define PyCore_MALLOC_PROTO (size_t, char *, unsigned long) ... #define NEED_TO_DECLARE_MALLOC_AND_FRIEND #define PyCore_MALLOC(n) PyCore_MALLOC_FUNC((n), __FILE__, __LINE__) ... 2) Scenario B Suppose you want to use malloc hooks (defined & initialized in a 3rd party malloc library) instead of malloc functions. In this case, you would define: #define PyCore_MALLOC_FUNC (*malloc_hook) ... #define NEED_TO_DECLARE_MALLOC_AND_FRIEND and ignore the previous definitions about PyCore_MALLOC_FUNC, etc. */ #endif /* !Py_PYMEM_H */ Index: Python.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** Python.h 2000/07/31 15:28:03 2.25 --- Python.h 2000/07/31 22:19:30 2.26 *************** *** 55,58 **** --- 55,60 ---- #include "pyport.h" + #include "pymem.h" + #include "object.h" #include "objimpl.h" Index: mymalloc.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mymalloc.h,v retrieving revision 2.25 retrieving revision 2.26 diff -C2 -r2.25 -r2.26 *** mymalloc.h 2000/07/31 15:28:03 2.25 --- mymalloc.h 2000/07/31 22:19:30 2.26 *************** *** 1,4 **** - #ifndef Py_MYMALLOC_H - #define Py_MYMALLOC_H /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 15,18 **** --- 13,19 ---- USE "pyport.h" INSTEAD ***************************************/ + + #ifndef Py_MYMALLOC_H + #define Py_MYMALLOC_H /* Lowest-level memory allocation interface */ Index: mymath.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mymath.h,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** mymath.h 2000/07/31 15:28:03 2.12 --- mymath.h 2000/07/31 22:19:30 2.13 *************** *** 1,2 **** --- 1,12 ---- + /*********************************************************** + Copyright (c) 2000, BeOpen.com. + Copyright (c) 1995-2000, Corporation for National Research Initiatives. + Copyright (c) 1990-1995, Stichting Mathematisch Centrum. + All rights reserved. + + See the file "Misc/COPYRIGHT" for information on usage and + redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. + ******************************************************************/ + /*************************************** THIS FILE IS OBSOLETE Index: myproto.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/myproto.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** myproto.h 2000/07/09 03:09:55 2.9 --- myproto.h 2000/07/31 22:19:30 2.10 *************** *** 1,8 **** - #ifndef Py_PROTO_H - #define Py_PROTO_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 19,22 **** --- 13,22 ---- DON'T USE Py_PROTO or Py_FPROTO anymore. ***************************************/ + + #ifndef Py_PROTO_H + #define Py_PROTO_H + #ifdef __cplusplus + extern "C" { + #endif #ifdef HAVE_PROTOTYPES Index: myselect.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/myselect.h,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** myselect.h 2000/07/31 15:28:03 2.13 --- myselect.h 2000/07/31 22:19:30 2.14 *************** *** 1,8 **** - #ifndef Py_MYSELECT_H - #define Py_MYSELECT_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 19,22 **** --- 13,22 ---- USE "pyport.h" INSTEAD ***************************************/ + + #ifndef Py_MYSELECT_H + #define Py_MYSELECT_H + #ifdef __cplusplus + extern "C" { + #endif /* Include file for users of select() */ Index: mytime.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/mytime.h,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** mytime.h 2000/07/31 15:28:03 2.7 --- mytime.h 2000/07/31 22:19:30 2.8 *************** *** 1,8 **** - #ifndef Py_MYTIME_H - #define Py_MYTIME_H - #ifdef __cplusplus - extern "C" { - #endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. --- 1,2 ---- *************** *** 19,22 **** --- 13,22 ---- USE "pyport.h" INSTEAD ***************************************/ + + #ifndef Py_MYTIME_H + #define Py_MYTIME_H + #ifdef __cplusplus + extern "C" { + #endif /* Include file instead of and/or */ Index: objimpl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/objimpl.h,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -r2.24 -r2.25 *** objimpl.h 2000/07/31 15:28:03 2.24 --- objimpl.h 2000/07/31 22:19:30 2.25 *************** *** 11,19 **** #ifndef Py_OBJIMPL_H #define Py_OBJIMPL_H #ifdef __cplusplus extern "C" { #endif - - #include "pyport.h" /* --- 11,20 ---- #ifndef Py_OBJIMPL_H #define Py_OBJIMPL_H + + #include "pymem.h" + #ifdef __cplusplus extern "C" { #endif /* Index: pgenheaders.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pgenheaders.h,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** pgenheaders.h 2000/07/31 15:28:03 2.22 --- pgenheaders.h 2000/07/31 22:19:30 2.23 *************** *** 31,35 **** #endif ! #include "pyport.h" #include "pydebug.h" --- 31,35 ---- #endif ! #include "pymem.h" #include "pydebug.h" Index: pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** pyport.h 2000/07/31 15:28:03 2.8 --- pyport.h 2000/07/31 22:19:30 2.9 *************** *** 10,13 **** --- 10,15 ---- #define Py_PYPORT_H + #include "config.h" /* include for defines */ + /************************************************************************** Symbols and macros to supply platform-independent interfaces to basic *************** *** 221,227 **** ! /*********************************** ! * WRAPPER FOR malloc/realloc/free * ! ***********************************/ #ifndef DL_IMPORT /* declarations for DLL import */ --- 223,229 ---- ! /************************************ ! * MALLOC COMPATIBILITY FOR pymem.h * ! ************************************/ #ifndef DL_IMPORT /* declarations for DLL import */ *************** *** 241,395 **** #endif - /* - * Core memory allocator - * ===================== - */ - - /* To make sure the interpreter is user-malloc friendly, all memory - APIs are implemented on top of this one. - - The PyCore_* macros can be defined to make the interpreter use a - custom allocator. Note that they are for internal use only. Both - the core and extension modules should use the PyMem_* API. - - See the comment block at the end of this file for two scenarios - showing how to use this to use a different allocator. */ - - #ifndef PyCore_MALLOC_FUNC - #undef PyCore_REALLOC_FUNC - #undef PyCore_FREE_FUNC - #define PyCore_MALLOC_FUNC malloc - #define PyCore_REALLOC_FUNC realloc - #define PyCore_FREE_FUNC free - #endif - - #ifndef PyCore_MALLOC_PROTO - #undef PyCore_REALLOC_PROTO - #undef PyCore_FREE_PROTO - #define PyCore_MALLOC_PROTO (size_t) - #define PyCore_REALLOC_PROTO (void *, size_t) - #define PyCore_FREE_PROTO (void *) - #endif - - #ifdef NEED_TO_DECLARE_MALLOC_AND_FRIEND - extern void *PyCore_MALLOC_FUNC PyCore_MALLOC_PROTO; - extern void *PyCore_REALLOC_FUNC PyCore_REALLOC_PROTO; - extern void PyCore_FREE_FUNC PyCore_FREE_PROTO; - #endif - - #ifndef PyCore_MALLOC - #undef PyCore_REALLOC - #undef PyCore_FREE - #define PyCore_MALLOC(n) PyCore_MALLOC_FUNC(n) - #define PyCore_REALLOC(p, n) PyCore_REALLOC_FUNC((p), (n)) - #define PyCore_FREE(p) PyCore_FREE_FUNC(p) - #endif - - /* BEWARE: - - Each interface exports both functions and macros. Extension modules - should normally use the functions for ensuring binary compatibility - of the user's code across Python versions. Subsequently, if the - Python runtime switches to its own malloc (different from standard - malloc), no recompilation is required for the extensions. - - The macro versions trade compatibility for speed. They can be used - whenever there is a performance problem, but their use implies - recompilation of the code for each new Python release. The Python - core uses the macros because it *is* compiled on every upgrade. - This might not be the case with 3rd party extensions in a custom - setup (for example, a customer does not always have access to the - source of 3rd party deliverables). You have been warned! */ - - /* - * Raw memory interface - * ==================== - */ - - /* Functions */ - - /* Function wrappers around PyCore_MALLOC and friends; useful if you - need to be sure that you are using the same memory allocator as - Python. Note that the wrappers make sure that allocating 0 bytes - returns a non-NULL pointer, even if the underlying malloc - doesn't. Returned pointers must be checked for NULL explicitly. - No action is performed on failure. */ - extern DL_IMPORT(void *) PyMem_Malloc(size_t); - extern DL_IMPORT(void *) PyMem_Realloc(void *, size_t); - extern DL_IMPORT(void) PyMem_Free(void *); - - /* Starting from Python 1.6, the wrappers Py_{Malloc,Realloc,Free} are - no longer supported. They used to call PyErr_NoMemory() on failure. */ - - /* Macros */ - #define PyMem_MALLOC(n) PyCore_MALLOC(n) - #define PyMem_REALLOC(p, n) PyCore_REALLOC((void *)(p), (n)) - #define PyMem_FREE(p) PyCore_FREE((void *)(p)) - - /* - * Type-oriented memory interface - * ============================== - */ - - /* Functions */ - #define PyMem_New(type, n) \ - ( (type *) PyMem_Malloc((n) * sizeof(type)) ) - #define PyMem_Resize(p, type, n) \ - ( (p) = (type *) PyMem_Realloc((n) * sizeof(type)) ) - #define PyMem_Del(p) PyMem_Free(p) - - /* Macros */ - #define PyMem_NEW(type, n) \ - ( (type *) PyMem_MALLOC(_PyMem_EXTRA + (n) * sizeof(type)) ) - #define PyMem_RESIZE(p, type, n) \ - if ((p) == NULL) \ - (p) = (type *)(PyMem_MALLOC( \ - _PyMem_EXTRA + (n) * sizeof(type))); \ - else \ - (p) = (type *)(PyMem_REALLOC((p), \ - _PyMem_EXTRA + (n) * sizeof(type))) - #define PyMem_DEL(p) PyMem_FREE(p) - - /* PyMem_XDEL is deprecated. To avoid the call when p is NULL, - it is recommended to write the test explicitly in the code. - Note that according to ANSI C, free(NULL) has no effect. */ - - /* SCENARIOS - - Here are two scenarios by Vladimir Marangozov (the author of the - memory allocation redesign). - - 1) Scenario A - - Suppose you want to use a debugging malloc library that collects info on - where the malloc calls originate from. Assume the interface is: - - d_malloc(size_t n, char* src_file, unsigned long src_line) c.s. - - In this case, you would define (for example in config.h) : - - #define PyCore_MALLOC_FUNC d_malloc - ... - #define PyCore_MALLOC_PROTO (size_t, char *, unsigned long) - ... - #define NEED_TO_DECLARE_MALLOC_AND_FRIEND - - #define PyCore_MALLOC(n) PyCore_MALLOC_FUNC((n), __FILE__, __LINE__) - ... - - 2) Scenario B - - Suppose you want to use malloc hooks (defined & initialized in a 3rd party - malloc library) instead of malloc functions. In this case, you would - define: - - #define PyCore_MALLOC_FUNC (*malloc_hook) - ... - #define NEED_TO_DECLARE_MALLOC_AND_FRIEND - - and ignore the previous definitions about PyCore_MALLOC_FUNC, etc. - - - */ /******************************************** --- 243,246 ----